/* Vision Dashboard — Complete Design System */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════════════
   CSS VARIABLES — Dark Mode (Default)
═══════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
  /* Brand (UI chrome — buttons, active nav, links, charts) */
  --primary: #2563eb;
  --primary-hover: #3b82f6;
  --primary-dim: rgba(37, 99, 235, 0.12);
  --primary-dim2: rgba(37, 99, 235, 0.2);
  --shadow-primary: 0 0 20px rgba(37, 99, 235, 0.25);

  /* Semantic: Success / Profit / Active / Connect (always green — human cognition) */
  --success: #22c55e;
  --success-hover: #4ade80;
  --success-dim: rgba(34, 197, 94, 0.12);
  --success-dim2: rgba(34, 197, 94, 0.2);

  /* Legacy brand compatibility aliases — point to primary (blue) */
  --green: var(--primary);
  --green-hover: var(--primary-hover);
  --green-dim: var(--primary-dim);
  --green-dim2: var(--primary-dim2);

  --warning: #F59B23;
  --error: #E22134;
  --info: #5DADE2;
  --purple: #9B59B6;
  --equal-return: #eab308;

  /* Dark theme */
  --bg: #121212;
  --surface: #181818;
  --surface-2: #282828;
  --surface-3: #333333;
  --border: #282828;
  --border-2: #383838;
  --text-primary: #FFFFFF;
  --text-secondary: #A7A7A7;
  --text-muted: #535353;
  --sidebar-bg: #000000;
  --sidebar-text: #B3B3B3;

  /* Typography */
  --font: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-green: var(--shadow-primary);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition: 200ms var(--ease);

  /* Layout */
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 76px;
  --navbar-h: 64px;
}

/* Light Theme Overrides */
[data-theme="light"] {
  color-scheme: light;
  --primary: #1d4ed8;
  --primary-hover: #2563eb;
  --primary-dim: rgba(29, 78, 216, 0.12);
  --primary-dim2: rgba(29, 78, 216, 0.2);
  --shadow-primary: 0 0 20px rgba(29, 78, 216, 0.15);

  /* Semantic green stays the same in light mode */
  --success: #16a34a;
  --success-hover: #22c55e;
  --success-dim: rgba(22, 163, 74, 0.12);
  --success-dim2: rgba(22, 163, 74, 0.2);
  --equal-return: #ca8a04;

  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --surface-3: #E8EBEF;
  --border: #E2E8F0;
  --border-2: #CBD5E0;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --sidebar-bg: #0F172A;
  --sidebar-text: #94A3B8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); line-height: 1.5; overflow-x: hidden; transition: background var(--transition), color var(--transition); }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
svg { display: block; flex-shrink: 0; max-width: 100%; }
.sidebar__link svg, .sidebar__bottom button svg { width: 18px !important; height: 18px !important; max-width: 18px !important; max-height: 18px !important; flex-shrink: 0; }
.sidebar__logo-icon svg { width: 20px !important; height: 20px !important; max-width: 20px !important; max-height: 20px !important; }


/* ═══════════════════════════════════════════════════════════
   LAYOUT — App Shell
═══════════════════════════════════════════════════════════ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--navbar-h) 1fr;
  min-height: 100vh;
  grid-template-areas: "sidebar navbar" "sidebar main";
  transition: grid-template-columns var(--transition);
}
@media (min-width: 1025px) {
  html.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
#sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform var(--transition);
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: var(--r-full); }

.sidebar__top { padding: var(--sp-5) 0 var(--sp-4); }
.sidebar__bottom { padding: var(--sp-4) 0 var(--sp-5); border-top: 1px solid var(--border); }

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4) var(--sp-5);
  color: #FFFFFF !important;
  transition: opacity var(--transition);
}
.sidebar__logo:hover { opacity: 0.85; }
.sidebar__logo-icon { width: 36px; height: 36px; background: var(--green-dim2); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar__logo-icon svg { width: 20px; height: 20px; }
.sidebar__logo-name { display: block; font-size: 16px; font-weight: 800; color: #FFFFFF !important; line-height: 1.2; }
.sidebar__logo-sub { display: block; font-size: 10px; font-weight: 600; color: var(--green) !important; letter-spacing: 0.1em; text-transform: uppercase; }

.sidebar__nav { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--sp-3); }

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  color: #94A3B8 !important;
  transition: all var(--transition);
  position: relative;
}
.sidebar__link span { color: inherit !important; }
.sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar__link:hover { color: #FFFFFF !important; background: rgba(255,255,255,0.08); }
.sidebar__link:hover span { color: #FFFFFF !important; }
.sidebar__link.active { color: #FFFFFF !important; background: rgba(255,255,255,0.1); }
.sidebar__link.active span { color: #FFFFFF !important; }
.sidebar__link.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: var(--green); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.sidebar__badge { margin-left: auto; background: var(--error); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; padding: 0 5px; }

.sidebar__org { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4) var(--sp-3); }
.sidebar__org-badge { width: 36px; height: 36px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #000; flex-shrink: 0; }
.sidebar__org-name { display: block; font-size: 13px; font-weight: 700; color: #FFFFFF !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.sidebar__org-role { display: block; font-size: 11px; color: #94A3B8 !important; }

.sidebar__link--profile { margin: var(--sp-2) var(--sp-3); }
.sidebar__logout { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-3); margin: 0 var(--sp-3); width: calc(100% - var(--sp-6)); border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: #94A3B8 !important; transition: all var(--transition); }

/* Collapse toggle */
.sidebar__collapse-toggle { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-3); margin: 0 var(--sp-3) var(--sp-2); width: calc(100% - var(--sp-6)); border-radius: var(--r-md); font-size: 13px; font-weight: 600; color: #94A3B8 !important; transition: all var(--transition); }
.sidebar__collapse-toggle svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--transition); }
.sidebar__collapse-toggle:hover { color: #FFFFFF !important; background: rgba(255,255,255,0.08); }
@media (max-width: 1024px) { .sidebar__collapse-toggle { display: none; } }

/* Collapsed state (desktop only) */
@media (min-width: 1025px) {
  html.sidebar-collapsed #sidebar .sidebar__logo { justify-content: center; padding: var(--sp-3) 0 var(--sp-5); }
  html.sidebar-collapsed #sidebar .sidebar__logo-text,
  html.sidebar-collapsed #sidebar .sidebar__link span,
  html.sidebar-collapsed #sidebar .sidebar__badge,
  html.sidebar-collapsed #sidebar .sidebar__logout span,
  html.sidebar-collapsed #sidebar .sidebar__collapse-toggle span { display: none; }
  html.sidebar-collapsed #sidebar .sidebar__nav { padding: 0 var(--sp-2); }
  html.sidebar-collapsed #sidebar .sidebar__link,
  html.sidebar-collapsed #sidebar .sidebar__logout,
  html.sidebar-collapsed #sidebar .sidebar__collapse-toggle { justify-content: center; padding: 10px; margin-left: 0; margin-right: 0; width: 100%; }
  html.sidebar-collapsed #sidebar .sidebar__collapse-toggle svg { transform: rotate(180deg); }
}
.sidebar__logout span { color: inherit !important; }
.sidebar__logout svg { width: 18px; height: 18px; }
.sidebar__logout:hover { color: var(--error) !important; background: rgba(226,33,52,0.12); }

/* ═══════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════ */
#navbar {
  grid-area: navbar;
  height: var(--navbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  position: sticky;
  top: 0;
  z-index: 90;
  gap: var(--sp-4);
}

.navbar__left { display: flex; align-items: center; gap: var(--sp-4); flex: 1; min-width: 0; }
.navbar__right { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }

.navbar__hamburger { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--r-md); color: var(--text-secondary); background: var(--surface-2); transition: all var(--transition); }
.navbar__hamburger svg { width: 20px; height: 20px; }
.navbar__hamburger:hover { color: var(--text-primary); }

.navbar__breadcrumbs { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; min-width: 0; }
.breadcrumb__link { color: var(--text-secondary); font-weight: 500; transition: color var(--transition); white-space: nowrap; }
.breadcrumb__link:hover { color: var(--text-primary); }
.breadcrumb__sep { color: var(--text-muted); font-size: 16px; }
.breadcrumb__current { color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.navbar__search { position: relative; display: flex; align-items: center; }
.navbar__search-icon { position: absolute; left: 12px; color: var(--text-muted); width: 16px; height: 16px; pointer-events: none; }
.navbar__search-icon svg { width: 16px; height: 16px; }
.navbar__search input { background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-full); padding: 8px 16px 8px 38px; font-size: 13px; color: var(--text-primary); width: 260px; transition: all var(--transition); }
.navbar__search input::placeholder { color: var(--text-muted); }
.navbar__search input:focus { outline: none; border-color: var(--border-2); background: var(--surface-3); width: 300px; }

.navbar__icon-btn { position: relative; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-full); color: var(--text-secondary); background: var(--surface-2); transition: all var(--transition); }
.navbar__icon-btn svg { width: 18px; height: 18px; }
.navbar__icon-btn:hover { color: var(--text-primary); background: var(--surface-3); }
.navbar__notif-badge { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; background: var(--error); color: #fff; font-size: 10px; font-weight: 700; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }

.navbar__avatar { width: 36px; height: 36px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #000; transition: transform var(--transition), box-shadow var(--transition); cursor: pointer; flex-shrink: 0; }
.navbar__avatar:hover { transform: scale(1.08); box-shadow: var(--shadow-green); }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════ */
#main-content {
  grid-area: main;
  padding: var(--sp-6);
  overflow-y: auto;
  overflow-x: hidden;
  min-height: calc(100vh - var(--navbar-h));
  min-width: 0;
}

.page-header { margin-bottom: var(--sp-6); }
.page-title { font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: var(--sp-2); }
.page-subtitle { font-size: 14px; color: var(--text-secondary); }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.v-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 36px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.v-btn svg { width: 16px; height: 16px; }
/* Primary (brand blue) — UI actions like Save, Submit, Create */
.v-btn--primary { background: var(--primary); color: #fff; }
.v-btn--primary:hover { background: var(--primary-hover); transform: scale(1.03); }
.v-btn--secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border-2); }
.v-btn--secondary:hover { background: var(--surface-3); border-color: var(--text-muted); }
.v-btn--ghost { background: transparent; color: var(--text-secondary); }
.v-btn--ghost:hover { color: var(--text-primary); background: var(--surface-2); }
/* Danger (semantic red) — Remove, Disconnect, Delete */
.v-btn--danger { background: rgba(226,33,52,0.12); color: var(--error); }
.v-btn--danger:hover { background: rgba(226,33,52,0.2); }
/* Success (semantic green) — Connect, Approve, Activate */
.v-btn--success { background: var(--success-dim); color: var(--success); }
.v-btn--success:hover { background: var(--success-dim2); transform: scale(1.03); }
.v-btn--sm { height: 30px; padding: 0 var(--sp-3); font-size: 12px; }
.v-btn--lg { height: 44px; padding: 0 var(--sp-6); font-size: 15px; }
.v-btn--icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-md); justify-content: center; }
.v-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.v-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.v-card:hover { border-color: var(--border-2); }
.v-card--interactive:hover { box-shadow: var(--shadow-md); border-color: var(--surface-3); }

.card-grid { display: grid; gap: var(--sp-4); min-width: 0; }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* KPI card grid: only scrolls if its cards can't fit the available height */
.card-grid.card-grid--4.mb-5 { max-height: 260px; overflow-y: auto; overflow-x: hidden; }

.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid > * { min-width: 0; }

/* Metric Cards */
.metric-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.metric-card__label { font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.1em; text-transform: uppercase; display: flex; align-items: center; gap: var(--sp-2); }
.metric-card__label svg { width: 14px; height: 14px; }
.metric-card__value { font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.1; }
.metric-card__change { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-full); }
.metric-card__change--up { background: var(--success-dim); color: var(--success); }
.metric-card__change--down { background: rgba(226,33,52,0.12); color: var(--error); }
.metric-card__change--neutral { background: var(--surface-2); color: var(--text-secondary); }
.metric-card__sparkline { height: 40px; margin-top: var(--sp-2); }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.v-table-wrap { overflow-x: auto; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); }
.v-table { width: 100%; border-collapse: collapse; }
.v-table thead { border-bottom: 1px solid var(--border); }
.v-table th { padding: var(--sp-3) var(--sp-4); text-align: left; font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.v-table td { padding: var(--sp-3) var(--sp-4); font-size: 13px; color: var(--text-primary); border-bottom: 1px solid var(--border); vertical-align: middle; }
.v-table tbody tr:last-child td { border-bottom: none; }
.v-table tbody tr { transition: background var(--transition); }
.v-table tbody tr:hover { background: var(--surface-2); }
.v-table tbody tr.clickable { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   BADGES & CHIPS
═══════════════════════════════════════════════════════════ */
.v-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; white-space: nowrap; }
.v-badge--active { background: var(--success-dim); color: var(--success); }
.v-badge--suspended { background: rgba(226,33,52,0.12); color: var(--error); }
.v-badge--pending { background: rgba(245,155,35,0.12); color: var(--warning); }
.v-badge--info { background: rgba(93,173,226,0.12); color: var(--info); }
.v-badge--neutral { background: var(--surface-2); color: var(--text-secondary); }
.v-badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-full); background: currentColor; }

/* ═══════════════════════════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
.form-input {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 10px var(--sp-3);
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font);
  transition: all var(--transition);
  width: 100%;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--border-2); background: var(--surface-3); }
.form-input:focus-visible { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
select.form-input { cursor: pointer; }
.form-input[disabled] { opacity: 0.5; cursor: not-allowed; }
.form-error { font-size: 12px; color: var(--error); margin-top: var(--sp-1); display: none; }
.form-error.visible { display: block; }
.form-grid { display: grid; gap: var(--sp-4); }
.form-grid--2 { grid-template-columns: 1fr 1fr; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
#vision-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  padding: var(--sp-4);
}
#vision-modal-overlay.v-modal__overlay--active { opacity: 1; pointer-events: auto; }

.v-modal { background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--r-xl); width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transform: translateY(10px); transition: transform var(--transition); }
#vision-modal-overlay.v-modal__overlay--active .v-modal { transform: translateY(0); }
.v-modal--lg { max-width: 720px; }
.v-modal--sm { max-width: 400px; }
.v-modal__header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-5) 0; }
.v-modal__title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.v-modal__close { width: 32px; height: 32px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition); }
.v-modal__close svg { width: 18px; height: 18px; }
.v-modal__close:hover { background: var(--surface-2); color: var(--text-primary); }
.v-modal__body { padding: var(--sp-5); overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: var(--sp-4); }
.v-modal__footer { padding: 0 var(--sp-5) var(--sp-5); display: flex; gap: var(--sp-3); justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
#toast-container { position: fixed; bottom: var(--sp-5); right: var(--sp-5); z-index: 2000; display: flex; flex-direction: column; gap: var(--sp-3); max-width: 400px; }

.v-toast {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--surface-3); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease) both;
}
.v-toast--success { border-left: 3px solid var(--success); }
.v-toast--error { border-left: 3px solid var(--error); }
.v-toast--warning { border-left: 3px solid var(--warning); }
.v-toast--info { border-left: 3px solid var(--info); }
.v-toast--exit { animation: toastOut 0.3s var(--ease) both; }
.v-toast__icon { width: 20px; height: 20px; flex-shrink: 0; }
.v-toast--success .v-toast__icon { color: var(--success); }
.v-toast--error .v-toast__icon { color: var(--error); }
.v-toast--warning .v-toast__icon { color: var(--warning); }
.v-toast--info .v-toast__icon { color: var(--info); }
.v-toast__icon svg { width: 18px; height: 18px; }
.v-toast__msg { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.v-toast__close { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); color: var(--text-muted); transition: all var(--transition); }
.v-toast__close:hover { color: var(--text-primary); background: var(--surface-2); }
.v-toast__close svg { width: 14px; height: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

/* ═══════════════════════════════════════════════════════════
   SKELETON LOADER
═══════════════════════════════════════════════════════════ */
.skeleton-line {
  height: 14px; border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  width: 100%;
}
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line--sm { height: 10px; }
.skeleton-line--lg { height: 20px; }
.skeleton-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); padding: var(--sp-8) var(--sp-6); text-align: center; }
.empty-state__icon { width: 64px; height: 64px; background: var(--surface-2); border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; }
.empty-state__icon svg { width: 28px; height: 28px; color: var(--text-muted); }
.empty-state__title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.empty-state__desc { font-size: 13px; color: var(--text-secondary); max-width: 320px; }

/* ═══════════════════════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════════════════════ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); gap: var(--sp-4); }
.section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.section-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   CHARTS
═══════════════════════════════════════════════════════════ */
.chart-wrap { position: relative; }
.chart-wrap canvas { border-radius: var(--r-md); }

/* ═══════════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════════ */
.v-tabs { display: flex; gap: 2px; background: var(--surface-2); border-radius: var(--r-lg); padding: 3px; }
.v-tab { padding: 7px var(--sp-4); border-radius: var(--r-md); font-size: 13px; font-weight: 600; color: var(--text-secondary); transition: all var(--transition); cursor: pointer; }
.v-tab.active { background: var(--surface-3); color: var(--text-primary); }
.v-tab:hover:not(.active) { color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════
   DOMAIN CARD
═══════════════════════════════════════════════════════════ */
.domain-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.domain-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.domain-card__name { font-size: 16px; font-weight: 700; color: var(--text-primary); transition: color var(--transition); }
.domain-card__name:hover { color: var(--green); }
.domain-card__desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.domain-card__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.domain-card__metric-label { font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.domain-card__metric-value { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.domain-card__metric-value--profit { color: var(--success); }
.domain-card__metric-value--loss { color: var(--error); }
.domain-card__progress { height: 4px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; }
.domain-card__progress-bar { height: 100%; background: var(--success); border-radius: var(--r-full); transition: width 0.6s var(--ease); }
.domain-card__progress-bar--loss { background: var(--error); }
.domain-card__footer { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.domain-card__owner { font-size: 12px; color: var(--text-secondary); }
.domain-card__owner span { color: var(--text-primary); font-weight: 600; }
.domain-card__actions { display: flex; gap: var(--sp-2); }

/* ═══════════════════════════════════════════════════════════
   EMPLOYEE CARD
═══════════════════════════════════════════════════════════ */
.employee-card {
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
  cursor: pointer;
  transition: all var(--transition);
}
.employee-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.employee-card__avatar { width: 56px; height: 56px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: #000; flex-shrink: 0; }
.employee-card__name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-top: var(--sp-3); }
.employee-card__dept { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.employee-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-2); }
.employee-card__stat-label { font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.employee-card__stat-value { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.employee-card__top-domain { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: var(--sp-2); }
.employee-card__top-domain strong { color: var(--success); }

/* ═══════════════════════════════════════════════════════════
   INTEGRATION CARD
═══════════════════════════════════════════════════════════ */
.integration-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.integration-card__header { display: flex; align-items: center; gap: var(--sp-3); }
.integration-card__icon { width: 44px; height: 44px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 22px; flex-shrink: 0; }
.integration-card__name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.integration-card__desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.integration-card__meta { display: flex; flex-direction: column; gap: var(--sp-2); }
.integration-card__meta-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.integration-card__meta-label { color: var(--text-secondary); }
.integration-card__meta-value { color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); font-size: 11px; }
.integration-card__actions { display: flex; gap: var(--sp-2); margin-top: auto; }

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION ITEM
═══════════════════════════════════════════════════════════ */
.notif-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); transition: all var(--transition); }
.notif-item--unread { background: rgba(37, 99, 235, 0.04); border-color: var(--primary-dim); }
.notif-item:hover { border-color: var(--border-2); background: var(--surface-2); }
.notif-item__icon { width: 36px; height: 36px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item__icon svg { width: 18px; height: 18px; }
.notif-item__icon--success { background: var(--success-dim); color: var(--success); }
.notif-item__icon--error { background: rgba(226,33,52,0.12); color: var(--error); }
.notif-item__icon--warning { background: rgba(245,155,35,0.12); color: var(--warning); }
.notif-item__icon--info { background: rgba(93,173,226,0.12); color: var(--info); }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.notif-item__msg { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.notif-item__time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.notif-item__actions { display: flex; gap: var(--sp-2); align-items: center; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   ACTIVITY FEED
═══════════════════════════════════════════════════════════ */
.activity-item { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-item__dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--success); flex-shrink: 0; margin-top: 5px; }
.activity-item__msg { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.activity-item__msg strong { color: var(--text-primary); }
.activity-item__time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════
   PUBLIC PAGES (Landing, Login, Register)
═══════════════════════════════════════════════════════════ */
.public-page { min-height: 100vh; display: flex; flex-direction: column; }

/* Public Nav */
.public-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp-7); height: 72px; border-bottom: 1px solid var(--border); background: var(--sidebar-bg); }
.public-nav__logo { display: flex; align-items: center; gap: var(--sp-3); }
.public-nav__logo-icon { width: 32px; height: 32px; background: var(--green-dim2); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.public-nav__logo-icon svg { width: 18px; height: 18px; }
.public-nav__brand { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.public-nav__links { display: flex; align-items: center; gap: var(--sp-3); }

/* Auth Forms */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--sp-6); background: var(--bg); position: relative; overflow: hidden; }
.auth-page::before {
  content: ""; position: absolute; top: -200px; right: -200px;
  width: 500px; height: 500px; border-radius: var(--r-full);
  background: radial-gradient(circle, var(--green-dim2) 0%, transparent 70%);
  pointer-events: none;
}
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-7); width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.auth-logo-icon { width: 40px; height: 40px; background: var(--green-dim2); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.auth-logo-icon svg { width: 22px; height: 22px; }
.auth-logo-name { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.auth-logo-sub { font-size: 11px; font-weight: 700; color: var(--green); letter-spacing: 0.12em; text-transform: uppercase; }
.auth-title { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: var(--sp-2); letter-spacing: -0.02em; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: var(--sp-5); }
.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-submit { width: 100%; height: 44px; justify-content: center; font-size: 15px; margin-top: var(--sp-2); }
.auth-links { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-4); font-size: 13px; color: var(--text-secondary); }
.auth-link { color: var(--green); font-weight: 600; transition: color var(--transition); }
.auth-link:hover { color: var(--green-hover); text-decoration: underline; }
.auth-divider { text-align: center; font-size: 12px; color: var(--text-muted); margin: var(--sp-3) 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ""; position: absolute; top: 50%; width: calc(50% - 24px); height: 1px; background: var(--border); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════════════════ */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); padding: var(--sp-8) var(--sp-7); align-items: center; max-width: 1400px; margin: 0 auto; min-height: calc(100vh - 72px); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: var(--sp-2); background: var(--primary-dim); border: 1px solid var(--primary-dim2); border-radius: var(--r-full); padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.hero__title { font-size: 56px; font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; color: var(--text-primary); margin-bottom: var(--sp-5); }
.hero__title span { color: var(--green); }
.hero__desc { font-size: 16px; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--sp-6); max-width: 480px; }
.hero__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.hero__preview { position: relative; }
.hero__preview-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-5); box-shadow: var(--shadow-lg); }
.hero__stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.hero__stat { background: var(--surface-2); border-radius: var(--r-lg); padding: var(--sp-4); }
.hero__stat-label { font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--sp-1); }
.hero__stat-value { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.hero__stat-change { font-size: 11px; font-weight: 700; color: var(--green); }

.features-section { padding: var(--sp-8) var(--sp-7); max-width: 1400px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-6); }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-5); transition: all var(--transition); }
.feature-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-primary); }
.feature-card__icon { width: 44px; height: 44px; background: var(--green-dim); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-4); }
.feature-card__icon svg { width: 22px; height: 22px; color: var(--green); }
.feature-card__title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--sp-2); }
.feature-card__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.pricing-section { padding: var(--sp-8) var(--sp-7); max-width: 1200px; margin: 0 auto; text-align: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-6); text-align: left; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); transition: all var(--transition); }
.pricing-card--featured { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--shadow-green); }
.pricing-card__tag { display: inline-block; background: var(--green); color: #000; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-full); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.pricing-card__name { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.pricing-card__desc { font-size: 13px; color: var(--text-secondary); margin-top: var(--sp-2); margin-bottom: var(--sp-4); }
.pricing-card__price { font-size: 40px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: var(--sp-5); }
.pricing-card__price span { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.pricing-card__features { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.pricing-card__feature { display: flex; align-items: center; gap: var(--sp-3); font-size: 13px; color: var(--text-secondary); }
.pricing-card__feature svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

.landing-footer { border-top: 1px solid var(--border); padding: var(--sp-6) var(--sp-7); display: flex; align-items: center; justify-content: space-between; background: var(--sidebar-bg); }
.landing-footer__brand { display: flex; align-items: center; gap: var(--sp-3); }
.landing-footer__copy { font-size: 12px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD PAGE
═══════════════════════════════════════════════════════════ */
.dashboard-grid { display: grid; gap: var(--sp-5); min-width: 0; }
.dashboard-grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dashboard-grid > * { min-width: 0; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

/* ═══════════════════════════════════════════════════════════
   FILTERS ROW
═══════════════════════════════════════════════════════════ */
.filters-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.filter-search { position: relative; flex: 1; min-width: 200px; }
.filter-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.filter-search__icon svg { width: 16px; height: 16px; }
.filter-search input { width: 100%; height: 36px; padding: 0 var(--sp-3) 0 38px; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-full); font-size: 13px; color: var(--text-primary); transition: all var(--transition); }
.filter-search input::placeholder { color: var(--text-muted); }
.filter-search input:focus { outline: none; border-color: var(--border-2); }
.filter-select { height: 36px; padding: 0 var(--sp-3); background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-full); font-size: 13px; color: var(--text-primary); font-family: var(--font); transition: all var(--transition); cursor: pointer; }
.filter-select:focus { outline: none; border-color: var(--border-2); }
.filter-select option { background: var(--surface-2); }

/* ═══════════════════════════════════════════════════════════
   PROFILE PAGE
═══════════════════════════════════════════════════════════ */
.profile-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); display: flex; align-items: center; gap: var(--sp-5); }
.profile-avatar { width: 80px; height: 80px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #000; flex-shrink: 0; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.profile-dept { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.profile-bio { font-size: 13px; color: var(--text-secondary); margin-top: var(--sp-2); line-height: 1.6; }
.profile-meta { display: flex; gap: var(--sp-4); margin-top: var(--sp-3); flex-wrap: wrap; }
.profile-meta-item { display: flex; align-items: center; gap: var(--sp-2); font-size: 12px; color: var(--text-secondary); }
.profile-meta-item svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════════════════════ */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-5); }
.settings-sidebar { display: flex; flex-direction: column; gap: var(--sp-1); }
.settings-nav-item { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-3); border-radius: var(--r-md); font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--transition); }
.settings-nav-item svg { width: 16px; height: 16px; }
.settings-nav-item:hover { color: var(--text-primary); background: var(--surface-2); }
.settings-nav-item.active { color: var(--text-primary); background: var(--surface-2); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-5); margin-bottom: var(--sp-4); }
.settings-section-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════
   SCROLL STYLE
═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-green { color: var(--success) !important; }
.text-red { color: var(--error) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-primary { color: var(--text-primary) !important; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.d-flex { display: flex; }
.ai-center { align-items: center; }
.jc-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mono { font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; grid-template-areas: "navbar" "main"; }
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; transform: translateX(-100%); z-index: 200; transition: transform 0.3s var(--ease); box-shadow: var(--shadow-lg); }
  #sidebar.sidebar--open { transform: translateX(0); }
  .navbar__hamburger { display: flex !important; }
  .card-grid--4, .card-grid--5 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid--12 .col-span-4 { grid-column: span 6; }
  .dashboard-grid--12 .col-span-5 { grid-column: span 12; }
  .dashboard-grid--12 .col-span-7 { grid-column: span 12; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: var(--sp-6) var(--sp-5); }
  .hero__preview { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #main-content { padding: var(--sp-4); }
  #navbar { padding: 0 var(--sp-4); }
  .card-grid--4, .card-grid--5, .card-grid--3, .card-grid--2 { grid-template-columns: 1fr; }
  .dashboard-grid--12 .col-span-4, .dashboard-grid--12 .col-span-6, .dashboard-grid--12 .col-span-8 { grid-column: span 12; }
  .features-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 36px; }
  .navbar__search { display: none; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .auth-card { padding: var(--sp-5); }
  .public-nav { padding: 0 var(--sp-4); }
}

/* ═══════════════════════════════════════════════════════════
   PAGE-SPECIFIC TWEAKS
═══════════════════════════════════════════════════════════ */
/* Admin employee management table */
.admin-table-actions { display: flex; gap: var(--sp-2); }

/* Campaign metrics row */
.campaign-metrics-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-3); }
@media (max-width: 900px) { .campaign-metrics-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .campaign-metrics-row { grid-template-columns: repeat(2, 1fr); } }

/* Placement table row */
.placement-row-icon { width: 28px; height: 28px; background: var(--primary-dim); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.placement-row-icon svg { width: 14px; height: 14px; color: var(--primary); }

/* Stats counter with animated number */
.animated-number { display: inline-block; transition: all 0.6s var(--ease); }

/* Mini progress bar */
.mini-bar { height: 3px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; margin-top: 4px; }
.mini-bar__fill { height: 100%; background: var(--success); border-radius: var(--r-full); }
.mini-bar__fill--red { background: var(--error); }
.mini-bar__fill--orange { background: var(--warning); }

/* Switch Toggle Component */
.v-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.v-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.v-switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--surface-2);
  border-radius: var(--r-full);
  transition: background-color var(--transition);
}
.v-switch__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  border-radius: var(--r-full);
  transition: transform var(--transition), background-color var(--transition);
}
.v-switch input:checked + .v-switch__slider {
  background-color: var(--success);
}
.v-switch input:checked + .v-switch__slider::before {
  transform: translateX(20px);
  background-color: #ffffff;
}

/* Yellow Mini Bar Fill for Equal Returns */
.mini-bar__fill--yellow {
  background: var(--equal-return) !important;
}

/* Custom Crazy Loader Spinner for Charts */
.chart-loading-overlay {
  backdrop-filter: blur(5px);
}
.crazy-spinner-wrap {
  position: relative;
  width: 54px;
  height: 54px;
}
.crazy-spinner {
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: var(--primary);
  border-bottom-color: var(--success);
  border-radius: 50%;
  animation: crazySpin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}
.crazy-spinner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 4px solid transparent;
  border-left-color: var(--warning);
  border-right-color: var(--error);
  border-radius: 50%;
  animation: crazySpinInner 1.5s ease-in-out infinite;
}

@keyframes crazySpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes crazySpinInner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Guide Mode Header Toggle styling */
.guide-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.guide-mode-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}
.guide-mode-btn--active {
  background: rgba(234,179,8,0.15) !important;
  border-color: #eab308 !important;
  color: #eab308 !important;
  box-shadow: 0 0 10px rgba(234,179,8,0.2);
}
[data-theme="light"] .guide-mode-btn--active {
  background: rgba(202,138,4,0.1) !important;
  border-color: #ca8a04 !important;
  color: #ca8a04 !important;
}

/* Guide mode notifications & elements */
.guide-mode-banner {
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.3s var(--ease);
}
@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.senior-helper {
  animation: fadeIn 0.4s var(--ease);
}

/* ═══════════════════════════════════════════════════════════
   PREMIUM ONBOARDING & EMPTY STATE CARDS
   ═══════════════════════════════════════════════════════════ */
.v-onboarding-card {
  padding: 48px 32px;
  text-align: center;
  max-width: 680px;
  margin: 40px auto;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transition: all var(--transition);
}

[data-theme="light"] .v-onboarding-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.v-onboarding-card--dashed {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.15);
  padding: 40px 24px;
  margin: 20px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .v-onboarding-card--dashed {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.v-onboarding-card__icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  transition: all var(--transition);
}

[data-theme="light"] .v-onboarding-card__icon-wrap {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}

.v-onboarding-card__icon-wrap.success {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.3);
}

[data-theme="light"] .v-onboarding-card__icon-wrap.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
}

.v-onboarding-card__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.v-onboarding-card__desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.v-onboarding-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  height: auto;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

[data-theme="light"] .v-onboarding-card__btn {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.v-onboarding-card__btn.success {
  background: var(--success);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.35);
}

.v-onboarding-card__btn.success:hover {
  background: var(--success-hover);
}

[data-theme="light"] .v-onboarding-card__btn.success {
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* Color calendar picker indicator for date input */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: opacity var(--transition);
}
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.7);
}
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1) opacity(1);
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: opacity(0.6);
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: opacity(0.9);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.85; }
}


