/* ======================================================================
   Smart Solution Computer — Design System v2 (Stripe Dashboard inspired)
   ====================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sarabun:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* Surface */
  --bg-app: #F3F6F5;
  --bg-card: #FFFFFF;
  --bg-subtle: #EEF3F1;
  --bg-hover: #F7FAF8;
  --bg-elevated: rgba(255, 255, 255, 0.92);

  /* Border */
  --v2-border: #DDE5E1;
  --border-soft: #E9EFEC;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;

  /* Brand (Smart Solution CI green) */
  --brand: #22C55E;
  --brand-dark: #15803D;
  --brand-grad: linear-gradient(135deg, #14B8A6 0%, #22C55E 58%, #A3E635 100%);
  --brand-glow: 0 16px 40px -18px rgba(20, 184, 166, 0.75);
  --sidebar-bg: #08110F;
  --sidebar-panel: rgba(255,255,255,0.06);

  /* Status */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px -22px rgba(15, 23, 42, 0.32);
  --shadow-md: 0 12px 28px -22px rgba(15, 23, 42, 0.42), 0 2px 7px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 26px 70px -38px rgba(15, 23, 42, 0.55), 0 12px 28px -22px rgba(15, 23, 42, 0.28);
  --focus-ring: 0 0 0 4px rgba(20, 184, 166, 0.16);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Spacing scale */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;

  /* Sidebar */
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 18% -8%, rgba(34,197,94,0.14), transparent 32rem),
    radial-gradient(circle at 88% 2%, rgba(20,184,166,0.12), transparent 30rem),
    linear-gradient(180deg, #F8FAF9 0%, var(--bg-app) 42%, #EEF4F1 100%) !important;
  font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.num, .mono { font-family: 'JetBrains Mono', 'Inter', monospace; font-variant-numeric: tabular-nums; }

/* ======================== APP SHELL ======================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  isolation: isolate;
}

/* ======================== SIDEBAR ======================== */
.sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(34,197,94,0.22), transparent 15rem),
    linear-gradient(180deg, #0B1714 0%, var(--sidebar-bg) 56%, #060A09 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-5) var(--space-3);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: 18px 0 48px -44px rgba(15, 23, 42, 0.9);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.16) transparent;
}
.brand {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-3);
  text-decoration: none; color: #F8FAFC;
}
.brand-logo {
  width: 38px; height: 38px;
  background: var(--brand-grad);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 16px;
  box-shadow: var(--brand-glow), inset 0 1px 0 rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: rgba(226, 232, 240, 0.6); }
.mobile-session-bar { display: none; }

.nav-section { margin-bottom: var(--space-4); }
.nav-label {
  font-size: 11px; font-weight: 700; color: rgba(226, 232, 240, 0.45);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: var(--space-2) var(--space-3); margin-bottom: 2px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--space-3); margin-bottom: 2px;
  color: rgba(226, 232, 240, 0.72); text-decoration: none;
  border-radius: 11px; font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.nav-link:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.08);
  color: #FFFFFF;
  transform: translateX(2px);
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(20,184,166,0.2), rgba(34,197,94,0.16));
  border-color: rgba(34,197,94,0.32);
  color: #D9F99D;
  font-weight: 800;
  box-shadow: inset 3px 0 0 #22C55E;
}
.nav-link .ico { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-link .badge-count {
  margin-left: auto; background: var(--danger); color: white;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: var(--r-full); min-width: 18px; text-align: center;
}

.nav-spacer { flex: 1; }

.user-card {
  background: var(--sidebar-panel); border-radius: 16px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  width: 100%; color: inherit; font: inherit; text-align: left;
  border: 1px solid rgba(255,255,255,0.09);
  transition: background 0.16s ease, transform 0.16s ease;
}
.user-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.user-avatar {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: var(--brand-grad); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { color:#F8FAFC; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: rgba(226,232,240,0.54); }
.user-logout-label {
  color: rgba(226,232,240,0.7); font-size: 11px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--r-full);
  padding: 4px 8px; flex-shrink: 0;
}

/* ======================== MAIN ======================== */
.main {
  padding: 30px 36px;
  min-width: 0;
  max-width: 1480px;
  width: 100%;
}

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: var(--space-6); gap: var(--space-4); flex-wrap: wrap;
}
.page-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.page-subtitle { color: var(--text-secondary); font-size: 13px; margin-top: 5px; }

/* ======================== FORMS ======================== */
.pill-select, .pill-input {
  background: var(--bg-elevated); border: 1px solid var(--v2-border);
  border-radius: 12px; padding: 8px 13px;
  font-size: 13px; font-weight: 500; font-family: inherit;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}
.pill-select { padding-right: 30px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.pill-select:hover, .pill-input:hover { border-color: var(--text-tertiary); }
.pill-input:focus, .pill-select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

/* Form groups */
.v2-form-group { margin-bottom: var(--space-4); }
.v2-form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.v2-form-control {
  width: 100%; padding: 10px 12px;
  background: var(--bg-elevated); border: 1px solid var(--v2-border);
  border-radius: 12px; font-size: 14px; font-family: inherit;
  color: var(--text-primary);
  transition: all 0.12s ease;
}
.v2-form-control:focus {
  outline: none; border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

/* ======================== BUTTONS ======================== */
.v2-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease; line-height: 1.2;
}
.v2-btn-primary {
  background: var(--brand-grad); color: white;
  box-shadow: var(--brand-glow);
}
.v2-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(20,184,166,0.72); }
.v2-btn-ghost {
  background: var(--bg-card); border-color: var(--v2-border); color: var(--text-secondary);
}
.v2-btn-ghost:hover { border-color: var(--text-tertiary); background: var(--bg-hover); color: var(--text-primary); }
.v2-btn-danger {
  background: var(--danger); color: white;
}
.v2-btn-danger:hover { background: #DC2626; transform: translateY(-1px); }
.v2-btn-success {
  background: var(--success); color: white;
}
.v2-btn-success:hover { background: #059669; transform: translateY(-1px); }
.v2-btn-sm { padding: 5px 10px; font-size: 12px; }
.v2-btn-lg { padding: 11px 20px; font-size: 14px; }

/* ======================== KPI CARDS ======================== */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4); margin-bottom: var(--space-6);
}
.kpi {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.9));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 20px; padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
  position: relative; overflow: hidden;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-grad);
  opacity: 0.9;
}
.kpi.warn::before { background: linear-gradient(135deg, #FBBF24, #F59E0B); }
.kpi.danger::before { background: linear-gradient(135deg, #F87171, #EF4444); }
.kpi.info::before { background: linear-gradient(135deg, #60A5FA, #3B82F6); }
.kpi-label {
  font-size: 12px; color: var(--text-tertiary); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-2);
}
.kpi-value {
  font-size: 32px; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.kpi-sub { font-size: 12px; color: var(--text-tertiary); margin-top: var(--space-2); }
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ======================== CARDS ======================== */
.v2-card {
  background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.72);
  border-radius: 20px; box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5); overflow: hidden;
  backdrop-filter: blur(14px);
}
.v2-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(221,229,225,0.78);
  gap: var(--space-3); flex-wrap: wrap;
}
.v2-card-title { font-size: 15px; font-weight: 800; margin: 0; letter-spacing:-0.01em; }
.v2-card-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.v2-card-body { padding: var(--space-5); }

/* ======================== TABS ======================== */
.v2-tabs {
  display: flex; gap: 2px; padding: var(--space-1);
  background: rgba(8,17,15,0.06); border-radius: 14px;
  margin-bottom: var(--space-5); width: fit-content;
  flex-wrap: wrap;
}
.v2-tab {
  padding: 8px 14px; border-radius: 11px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--text-secondary); background: transparent;
  border: none; cursor: pointer;
  transition: all 0.12s ease;
}
.v2-tab:hover { color: var(--text-primary); }
.v2-tab.active {
  background: var(--bg-card); color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ======================== TABLES ======================== */
.v2-table-wrap { overflow-x: auto; }
table.v2-tbl { width: 100%; border-collapse: collapse; }
table.v2-tbl th {
  text-align: left; padding: 12px var(--space-5);
  background: linear-gradient(180deg, #F4F8F6, #EEF3F1);
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--v2-border);
  position: sticky; top: 0; z-index: 1;
}
table.v2-tbl td {
  padding: 12px var(--space-5); border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--text-primary);
}
table.v2-tbl tr:hover td { background: var(--bg-hover); }

/* ======================== LEGACY COMPONENT POLISH INSIDE APP ======================== */
.app .main .card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}
.app .main .card-header {
  border-bottom-color: rgba(221,229,225,0.78);
}
.app .main .card-header h2,
.app .main .card h2 {
  letter-spacing: -0.02em;
}
.app .main .form-control,
.app .main input,
.app .main select,
.app .main textarea {
  border-radius: 12px;
}
.app .main .form-control:focus,
.app .main input:focus,
.app .main select:focus,
.app .main textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: var(--focus-ring) !important;
}
.app .main .btn {
  border-radius: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.app .main .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.app .main .btn-primary {
  background: var(--brand-grad);
  color: #052E26;
  box-shadow: var(--brand-glow);
}
.app .main .btn-primary:hover:not(:disabled) {
  color: #052E26;
  box-shadow: 0 18px 34px -16px rgba(20,184,166,0.72);
}
.app .main .btn-outline {
  background: rgba(255,255,255,0.82);
  border-color: var(--v2-border);
}
.app .main .data-table,
.app .main table:not(.sum-table) {
  border-collapse: separate;
  border-spacing: 0;
}
.app .main .data-table th,
.app .main table:not(.sum-table) th {
  background: linear-gradient(180deg, #F4F8F6, #EEF3F1);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--v2-border);
}
.app .main .data-table td,
.app .main table:not(.sum-table) td {
  border-bottom-color: var(--border-soft);
}
.app .main .table-wrapper,
.app .main .sum-table-wrap {
  border-radius: 16px;
}
.app .main .leave-item {
  border-color: rgba(221,229,225,0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
}
.app .main .leave-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.app .main .balance-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow-xs);
}
table.v2-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.v2-tbl .ctr { text-align: center; }
table.v2-tbl .name { font-weight: 600; display: flex; align-items: center; gap: 10px; }

.avatar-mini {
  width: 28px; height: 28px; border-radius: var(--r-full);
  background: var(--brand-grad); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; flex-shrink: 0;
}
.dept-tag {
  display: inline-block; padding: 2px 8px;
  background: var(--bg-subtle); color: var(--text-secondary);
  border-radius: var(--r-full); font-size: 11px; font-weight: 500;
}

/* ======================== STATUS BADGES ======================== */
.v2-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 600;
}
.v2-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.v2-badge.b-ok { background: var(--success-bg); color: var(--success); }
.v2-badge.b-pen { background: var(--warning-bg); color: var(--warning); }
.v2-badge.b-rej { background: var(--danger-bg); color: var(--danger); }
.v2-badge.b-can { background: #F1F4F8; color: var(--text-tertiary); }

/* ======================== EMPTY / LOADING ======================== */
.v2-empty { text-align: center; padding: 60px 20px; color: var(--text-tertiary); }
.v2-empty-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.5; }
.v2-loading { padding: 40px 20px; text-align: center; color: var(--text-tertiary); }

.v2-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2.5px solid var(--bg-subtle);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: v2-spin 0.7s linear infinite;
}
@keyframes v2-spin { to { transform: rotate(360deg); } }

/* ======================== ALERTS ======================== */
.v2-alert {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 13px; line-height: 1.5;
  margin-bottom: var(--space-4);
  border: 1px solid; display: flex; align-items: flex-start; gap: 10px;
}
.v2-alert.info { background: var(--info-bg); color: #1E40AF; border-color: #BFDBFE; }
.v2-alert.success { background: var(--success-bg); color: #065F46; border-color: #A7F3D0; }
.v2-alert.warning { background: var(--warning-bg); color: #92400E; border-color: #FDE68A; }
.v2-alert.error { background: var(--danger-bg); color: #991B1B; border-color: #FECACA; }

/* ======================== TOAST ======================== */
.v2-toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--text-primary); color: white;
  padding: 10px 16px; border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500;
  animation: v2-slideIn 0.2s ease-out;
  z-index: 10000;
}
@keyframes v2-slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ======================== MODAL ======================== */
.v2-modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 17, 15, 0.54);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998; padding: var(--space-4);
}
.v2-modal {
  background: var(--bg-card); border-radius: 20px;
  max-width: 520px; width: 100%; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
}
.v2-modal-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.v2-modal-title { font-size: 15px; font-weight: 700; margin: 0; }
.v2-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-tertiary); padding: 0; line-height: 1; }
.v2-modal-body { padding: var(--space-5); }
.v2-modal-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border-soft); display: flex; gap: var(--space-2); justify-content: flex-end; }

/* ======================== HELPERS ======================== */
.v2-hidden { display: none !important; }
.v2-text-muted { color: var(--text-tertiary); }
.v2-flex { display: flex; gap: var(--space-2); align-items: center; }
.v2-flex-wrap { flex-wrap: wrap; }
.v2-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.v2-mb-2 { margin-bottom: var(--space-2); }
.v2-mb-4 { margin-bottom: var(--space-4); }
.v2-mt-2 { margin-top: var(--space-2); }
.v2-mt-4 { margin-top: var(--space-4); }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .main { padding: var(--space-5) var(--space-5); }
}
@media (max-width: 700px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto; z-index: 60;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 10px 12px 8px;
    display: flex; flex-direction: column; gap: 8px;
    overflow: hidden;
    white-space: normal;
  }
  .brand {
    width: 100%;
    padding: 0 0 10px;
    margin: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .brand-logo { width: 34px; height: 34px; border-radius: 12px; }
  .brand-name { font-size: 13px; max-width: calc(100vw - 78px); }
  .brand-sub { font-size: 10.5px; }
  .mobile-session-bar {
    display: flex; align-items: center; gap: 9px; width: 100%;
    min-height: 50px; padding: 7px 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-md);
  }
  .mobile-session-info { flex: 1; min-width: 0; }
  .mobile-session-name {
    color: #F8FAFC; font-weight: 700; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mobile-session-role { color: rgba(226,232,240,0.58); font-size: 10.5px; }
  .mobile-logout-button {
    min-height: 38px; padding: 8px 11px; flex-shrink: 0;
    border: 1px solid rgba(248,113,113,0.38); border-radius: var(--r-md);
    background: rgba(127,29,29,0.28); color: #FECACA;
    font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  }
  .mobile-logout-button:focus-visible {
    outline: 2px solid #FCA5A5; outline-offset: 2px;
  }
  .nav-section {
    display: flex; width: 100%; margin: 0; gap: 6px;
    overflow-x: auto; overflow-y: hidden; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav-section::-webkit-scrollbar { display: none; }
  .nav-label { display: none; }
  .nav-link {
    flex: 0 0 auto; display: inline-flex;
    padding: 8px 10px; margin-bottom: 0;
    border-radius: var(--r-full); font-size: 13px;
  }
  .nav-link:hover { transform: none; }
  .nav-link.active { box-shadow: inset 0 -2px 0 #22C55E; }
  .nav-link .ico { width: auto; }
  .nav-link .badge-count { margin-left: 4px; }
  .nav-spacer, .user-card { display: none; }
  .main { padding: var(--space-4); }
  .kpi-row { grid-template-columns: 1fr; }
  .kpi-value { font-size: 26px; }
  .v2-grid-2 { grid-template-columns: 1fr; }
}

/* ======================== HIDE OLD STYLES ======================== */
/* Hide old top navbar when v2 sidebar is present */
.app nav.navbar { display: none !important; }
/* Reset container styles inside main */
.app .main .container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
