/* ==========================================================================
   VANTA MARKETING CO. — CLIENT PORTAL
   Matches main site aesthetic exactly.
   Design tokens, typography, and component patterns sourced from live site.
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #080808;
  --color-bg-card: #0f0f0f;
  --color-bg-card-alt: #111111;
  --color-bg-sidebar: #0a0a0a;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.45);
  --color-text-faint: rgba(255, 255, 255, 0.22);
  --color-accent: #c0392b;
  --color-accent-hover: #a93226;
  --color-accent-glow: rgba(192, 57, 43, 0.35);
  --color-accent-glow-sm: rgba(192, 57, 43, 0.15);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.35);
  --color-border-focus: rgba(192, 57, 43, 0.6);

  /* Status colors */
  --color-status-pending-bg: rgba(255, 255, 255, 0.08);
  --color-status-pending-text: rgba(255, 255, 255, 0.55);
  --color-status-progress-bg: rgba(217, 158, 0, 0.15);
  --color-status-progress-text: #d99e00;
  --color-status-completed-bg: rgba(39, 174, 96, 0.15);
  --color-status-completed-text: #27ae60;
  --color-status-error-bg: rgba(192, 57, 43, 0.15);
  --color-status-error-text: #e74c3c;

  /* Toast */
  --color-toast-success-bg: #0d1f0f;
  --color-toast-success-border: rgba(39, 174, 96, 0.4);
  --color-toast-error-bg: #1a0a09;
  --color-toast-error-border: rgba(192, 57, 43, 0.4);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-semi: 600;
  --weight-bold: 800;
  --weight-black: 900;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 56px;
  --space-xl: 88px;
  --space-2xl: 140px;

  /* Border radius */
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 100px;

  /* Layout */
  --nav-height: 72px;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 0px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Durations */
  --duration-fast: 0.2s;
  --duration-mid: 0.5s;
  --duration-slow: 0.8s;
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
}


/* ==========================================================================
   3. SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}


/* ==========================================================================
   4. TYPOGRAPHY UTILITIES
   ========================================================================== */

.text-muted {
  color: var(--color-text-muted);
}

.text-faint {
  color: var(--color-text-faint);
}

.text-accent {
  color: var(--color-accent);
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: var(--weight-semi);
}

.text-label {
  font-size: 11px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}


/* ==========================================================================
   5. BUTTONS — Matching main site exactly
   ========================================================================== */

/* Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 34px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

/* Primary */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-accent);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-border-hover);
}

/* Small variant */
.btn-sm {
  padding: 9px 20px;
  font-size: 11px;
}

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid rgba(192, 57, 43, 0.35);
}

.btn-danger:hover {
  background: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent);
}

/* Icon button */
.btn-icon {
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: color var(--duration-fast), border-color var(--duration-fast);
}

.btn-icon:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

/* Full width */
.btn-full {
  width: 100%;
}

/* Disabled state */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.38;
  pointer-events: none;
}


/* ==========================================================================
   6. FORM ELEMENTS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 11px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 14px;
  font-weight: var(--weight-regular);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-faint);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-border-focus);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px var(--color-accent-glow-sm);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: #1a1a1a;
  color: var(--color-text);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-error {
  font-size: 12px;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-error::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-size: 9px;
  font-weight: var(--weight-black);
  flex-shrink: 0;
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-faint);
}

/* Inline task input row */
.task-input-row {
  display: flex;
  gap: var(--space-xs);
}

.task-input-row .form-input {
  flex: 1;
}

.task-input-row .btn {
  flex-shrink: 0;
}


/* ==========================================================================
   7. LOGIN PAGE
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

/* Animated background */
.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Gradient orbs */
.login-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.06) 0%, transparent 65%);
  animation: orb-drift 18s ease-in-out infinite alternate;
}

.login-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.04) 0%, transparent 65%);
  animation: orb-drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.05); }
  100% { transform: translate(-20px, 40px) scale(0.97); }
}

/* Floating particles */
.login-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.login-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-10vh) translateX(30px); opacity: 0; }
}

/* Login card */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  animation: fade-up var(--duration-slow) var(--ease-out) both;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  border-radius: var(--radius-pill);
}

.login-logo {
  margin-bottom: var(--space-md);
}

.login-logo img {
  height: 28px;
  width: auto;
}

.login-logo-text {
  font-size: 18px;
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.login-logo-text span {
  color: var(--color-accent);
}

.login-heading {
  font-size: 22px;
  font-weight: var(--weight-bold);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.login-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.login-error {
  padding: 12px 16px;
  background: var(--color-status-error-bg);
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #e74c3c;
  display: none;
}

.login-error.is-visible {
  display: block;
  animation: shake 0.35s var(--ease-out);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

.login-footer {
  margin-top: var(--space-md);
  font-size: 12px;
  color: var(--color-text-faint);
  text-align: center;
}


/* ==========================================================================
   8. PORTAL LAYOUT — Sidebar + Main
   ========================================================================== */

.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-bg-sidebar);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--duration-mid) var(--ease-out);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar top accent line */
.portal-sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  opacity: 0.7;
}

/* Sidebar logo area */
.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-img {
  height: 24px;
  width: auto;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.sidebar-logo-text em {
  font-style: normal;
  color: var(--color-accent);
}

/* Sidebar section label */
.sidebar-section-label {
  padding: 20px 24px 8px;
  font-size: 10px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.sidebar-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  font-size: 13px;
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  border-left: 2px solid transparent;
}

.sidebar-nav-item:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-nav-item.is-active {
  color: var(--color-text);
  background: rgba(192, 57, 43, 0.07);
  border-left-color: var(--color-accent);
  font-weight: var(--weight-semi);
}

.sidebar-nav-item.is-active .sidebar-nav-icon {
  color: var(--color-accent);
}

/* Nav icons — Unicode symbols as CSS content */
.sidebar-nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-faint);
  flex-shrink: 0;
  transition: color var(--duration-fast);
}

.sidebar-nav-item:hover .sidebar-nav-icon {
  color: var(--color-text-muted);
}

/* Icon definitions via data-icon attribute */
.sidebar-nav-icon[data-icon="dashboard"]::before  { content: '◈'; }
.sidebar-nav-icon[data-icon="tasks"]::before      { content: '◻'; }
.sidebar-nav-icon[data-icon="reports"]::before    { content: '◫'; }
.sidebar-nav-icon[data-icon="analytics"]::before  { content: '◰'; }
.sidebar-nav-icon[data-icon="clients"]::before    { content: '◑'; }
.sidebar-nav-icon[data-icon="settings"]::before   { content: '⚙'; font-size: 13px; }
.sidebar-nav-icon[data-icon="logout"]::before     { content: '↩'; font-size: 15px; }

/* Badge on nav item */
.sidebar-nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sidebar bottom: client info + logout */
.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-client-name {
  font-size: 12px;
  font-weight: var(--weight-semi);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-client-label {
  font-size: 11px;
  color: var(--color-text-faint);
  margin-bottom: 16px;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  cursor: pointer;
  transition: color var(--duration-fast);
  padding: 0;
  background: none;
  border: none;
}

.sidebar-logout:hover {
  color: var(--color-accent);
}

/* --- Main content area --- */
.portal-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  gap: var(--space-sm);
}

.portal-topbar-title {
  font-size: 14px;
  font-weight: var(--weight-semi);
  letter-spacing: -0.01em;
  flex: 1;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Hamburger (hidden on desktop) */
.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.sidebar-toggle-line {
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--duration-fast), opacity var(--duration-fast);
}

.sidebar-toggle.is-open .sidebar-toggle-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.sidebar-toggle.is-open .sidebar-toggle-line:nth-child(2) {
  opacity: 0;
}

.sidebar-toggle.is-open .sidebar-toggle-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Page content */
.portal-content {
  flex: 1;
  padding: var(--space-md);
}

.portal-page-header {
  margin-bottom: var(--space-md);
}

.portal-page-title {
  font-size: 26px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.portal-page-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
}


/* ==========================================================================
   9. STAT CARDS
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 24px var(--space-sm);
  position: relative;
  overflow: hidden;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent-glow-sm) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 38px;
  font-weight: var(--weight-black);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
}

.stat-label {
  font-size: 11px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  position: relative;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: var(--weight-semi);
  margin-top: 8px;
  position: relative;
}

.stat-change.up {
  color: var(--color-status-completed-text);
}

.stat-change.down {
  color: var(--color-accent);
}


/* ==========================================================================
   10. DATA TABLES
   ========================================================================== */

.table-wrapper {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  overflow-x: auto;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.table-title {
  font-size: 13px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  padding: 12px 24px;
  text-align: left;
  font-size: 10px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--duration-fast);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.data-table tbody td {
  padding: 14px 24px;
  color: var(--color-text-muted);
  vertical-align: middle;
}

.data-table tbody td:first-child {
  color: var(--color-text);
  font-weight: var(--weight-semi);
}

.table-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-faint);
  font-size: 13px;
}


/* ==========================================================================
   11. CHARTS CONTAINER
   ========================================================================== */

.chart-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.chart-card-title {
  font-size: 13px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.chart-card-body {
  padding: 24px;
  position: relative;
}

.chart-container {
  position: relative;
  width: 100%;
}

/* Aspect ratio helpers for Chart.js */
.chart-container--16x6 { aspect-ratio: 16 / 6; }
.chart-container--4x3  { aspect-ratio: 4 / 3; }
.chart-container--1x1  { aspect-ratio: 1 / 1; }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}


/* ==========================================================================
   12. TASK BOARD
   ========================================================================== */

.task-board {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.task-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition:
    border-color var(--duration-fast),
    background var(--duration-fast),
    box-shadow var(--duration-fast);
  position: relative;
}

.task-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--color-bg-card-alt);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.task-card.is-completed {
  opacity: 0.6;
}

.task-card.is-completed .task-title {
  text-decoration: line-through;
  text-decoration-color: var(--color-text-faint);
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 14px;
  font-weight: var(--weight-semi);
  margin-bottom: 6px;
  line-height: 1.4;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--color-text-faint);
  margin-bottom: 10px;
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-description {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Admin note inside task card */
.task-admin-note {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(192, 57, 43, 0.06);
  border-left: 2px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.task-admin-note-label {
  font-size: 10px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Task column layout (kanban style) */
.task-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  align-items: start;
}

.task-column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.task-column-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.task-column-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.task-column-body .task-card {
  flex-direction: column;
  gap: 10px;
}


/* ==========================================================================
   13. STATUS BADGES
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Pending */
.badge-pending {
  background: var(--color-status-pending-bg);
  color: var(--color-status-pending-text);
}
.badge-pending::before {
  background: var(--color-status-pending-text);
}

/* In Progress */
.badge-progress {
  background: var(--color-status-progress-bg);
  color: var(--color-status-progress-text);
}
.badge-progress::before {
  background: var(--color-status-progress-text);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Completed */
.badge-completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed-text);
}
.badge-completed::before {
  background: var(--color-status-completed-text);
}

/* Error / Blocked */
.badge-error {
  background: var(--color-status-error-bg);
  color: var(--color-status-error-text);
}
.badge-error::before {
  background: var(--color-status-error-text);
}

/* New */
.badge-new {
  background: rgba(192, 57, 43, 0.15);
  color: var(--color-accent);
}
.badge-new::before {
  background: var(--color-accent);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}


/* ==========================================================================
   14. REPORT CARDS
   ========================================================================== */

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-sm);
}

.report-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.report-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.report-card-week {
  font-size: 10px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.report-card-title {
  font-size: 15px;
  font-weight: var(--weight-semi);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.report-card-preview {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.report-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.report-card-date {
  font-size: 11px;
  color: var(--color-text-faint);
}


/* ==========================================================================
   15. ADMIN PANEL
   ========================================================================== */

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-md);
  align-items: start;
}

/* Client list sidebar */
.admin-client-list {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.admin-client-list-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-client-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  border-bottom: 1px solid var(--color-border);
}

.admin-client-item:last-child {
  border-bottom: none;
}

.admin-client-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-client-item.is-active {
  border-left-color: var(--color-accent);
  background: rgba(192, 57, 43, 0.06);
}

.admin-client-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(192, 57, 43, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  flex-shrink: 0;
  text-transform: uppercase;
}

.admin-client-info {
  min-width: 0;
}

.admin-client-name {
  font-size: 13px;
  font-weight: var(--weight-semi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-client-sub {
  font-size: 11px;
  color: var(--color-text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin main panel */
.admin-panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-panel-title {
  font-size: 15px;
  font-weight: var(--weight-semi);
  letter-spacing: -0.01em;
}

.admin-panel-body {
  padding: 24px;
}


/* ==========================================================================
   16. TABS
   ========================================================================== */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

.tab {
  padding: 12px 20px;
  font-size: 12px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--duration-fast), border-color var(--duration-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover {
  color: var(--color-text-muted);
}

.tab.is-active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}


/* ==========================================================================
   17. MODAL
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: var(--color-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--duration-mid) var(--ease-out);
  position: relative;
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

/* Accent line */
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
}

.modal-header {
  padding: 24px 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-size: 16px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1;
  transition: color var(--duration-fast), border-color var(--duration-fast);
  cursor: pointer;
  background: none;
}

.modal-close:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
  border-top: 1px solid var(--color-border);
}

/* Confirmation modal variant */
.modal--confirm .modal-body {
  text-align: center;
  padding: 32px 28px;
}

.modal--confirm .modal-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.modal--confirm .modal-message {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Large modal */
.modal--lg {
  max-width: 720px;
}


/* ==========================================================================
   18. EMPTY STATES
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.empty-state-icon {
  font-size: 36px;
  margin-bottom: 20px;
  opacity: 0.25;
  line-height: 1;
}

.empty-state-title {
  font-size: 15px;
  font-weight: var(--weight-semi);
  margin-bottom: 8px;
  color: var(--color-text-muted);
}

.empty-state-text {
  font-size: 13px;
  color: var(--color-text-faint);
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}


/* ==========================================================================
   19. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: var(--space-sm);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: 340px;
  max-width: calc(100vw - var(--space-md));
}

.toast {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  pointer-events: all;
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  transition:
    transform var(--duration-mid) var(--ease-out),
    opacity var(--duration-mid) var(--ease-out);
}

.toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast.is-hiding {
  transform: translateX(calc(100% + 20px));
  opacity: 0;
}

/* Variants */
.toast-success {
  background: var(--color-toast-success-bg);
  border-color: var(--color-toast-success-border);
}

.toast-error {
  background: var(--color-toast-error-bg);
  border-color: var(--color-toast-error-border);
}

.toast-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--weight-black);
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-success .toast-icon {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed-text);
}

.toast-error .toast-icon {
  background: var(--color-status-error-bg);
  color: var(--color-status-error-text);
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: var(--weight-semi);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.toast-dismiss {
  flex-shrink: 0;
  color: var(--color-text-faint);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--duration-fast);
  background: none;
  border: none;
  padding: 0;
  margin-top: 1px;
}

.toast-dismiss:hover {
  color: var(--color-text-muted);
}


/* ==========================================================================
   20. LOADING STATES
   ========================================================================== */

/* Skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  border-radius: 3px;
}

.skeleton-text--sm {
  height: 10px;
  width: 60%;
}

.skeleton-text--lg {
  height: 22px;
}

.skeleton-rect {
  border-radius: var(--radius-md);
}

.skeleton-circle {
  border-radius: 50%;
}

/* Skeleton card */
.skeleton-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

.spinner--lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

/* Full-screen loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(8, 8, 8, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay-text {
  font-size: 12px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* Button loading state */
.btn.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* ==========================================================================
   21. FADE-IN ANIMATIONS (matching main site)
   ========================================================================== */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-right {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Utility classes */
.animate-fade-up {
  animation: fade-up var(--duration-slow) var(--ease-out) both;
}

.animate-fade-in {
  animation: fade-in var(--duration-mid) var(--ease-out) both;
}

/* Stagger delays */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }

/* Intersection-observer triggered class */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   22. DIVIDERS & LAYOUT HELPERS
   ========================================================================== */

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-md) 0;
}

.divider--sm {
  margin: var(--space-sm) 0;
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card-alt {
  background: var(--color-bg-card-alt);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.card-title {
  font-size: 13px;
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  gap: var(--space-sm);
}

.section-title {
  font-size: 18px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-sm);
}

.flex-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }


/* ==========================================================================
   23. SIDEBAR OVERLAY (mobile)
   ========================================================================== */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--duration-mid);
}

.sidebar-overlay.is-open {
  opacity: 1;
}


/* ==========================================================================
   24. RESPONSIVE — Mobile First Breakpoints
   ========================================================================== */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .task-columns {
    grid-template-columns: 1fr 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-client-list {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .admin-client-list-header {
    grid-column: 1 / -1;
  }
}

/* Mobile: 768px — sidebar collapse */
@media (max-width: 768px) {
  .portal-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .portal-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.6);
  }

  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  .sidebar-overlay.is-open {
    pointer-events: all;
  }

  .portal-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .portal-content {
    padding: var(--space-sm);
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .task-columns {
    grid-template-columns: 1fr;
  }

  .reports-grid {
    grid-template-columns: 1fr;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 0;
    border-radius: var(--radius-md);
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-overlay.is-open .modal {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .toast-container {
    top: auto;
    bottom: var(--space-sm);
    right: var(--space-sm);
    left: var(--space-sm);
    width: auto;
  }

  .login-card {
    padding: 32px 24px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Small mobile: 480px */
@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    padding: 0 var(--space-sm);
  }

  .table-wrapper {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0 calc(-1 * var(--space-sm));
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}


/* ==========================================================================
   25. MISC UTILITY & POLISH
   ========================================================================== */

/* Focus-visible ring */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Selection */
::selection {
  background: var(--color-accent-glow);
  color: var(--color-text);
}

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Visually hidden (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* No-JS fallback */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* Print */
@media print {
  .portal-sidebar,
  .portal-topbar,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }

  .portal-main {
    margin-left: 0;
  }

  body {
    background: white;
    color: black;
  }
}
