/* ============================================================
   VYAPAARBOOK — Professional Design System v3
   Light + Dark mode | Inter font | Indigo brand
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700;800&display=swap');

/* ─────────────────────────────────────────────
   LIGHT THEME TOKENS
───────────────────────────────────────────── */
:root {
  /* Brand */
  --vb-brand-50:   #EEF2FF;
  --vb-brand-100:  #E0E7FF;
  --vb-brand-500:  #6366F1;
  --vb-brand-600:  #4F46E5;
  --vb-brand-700:  #4338CA;
  --vb-brand-glow: rgba(99,102,241,.18);

  /* Page bg */
  --vb-bg:        #F0F2F8;

  /* Surfaces */
  --vb-surface:   #FFFFFF;
  --vb-surface-2: #F7F8FC;
  --vb-surface-3: #EEF0F7;

  /* Sidebar */
  --vb-sb-bg:           #1E1B4B;
  --vb-sb-bg-deep:      #17154A;
  --vb-sb-text:         #C7D2FE;
  --vb-sb-text-hover:   #EEF2FF;
  --vb-sb-active-bg:    rgba(129,140,248,.28);
  --vb-sb-active-text:  #E0E7FF;
  --vb-sb-active-dot:   #818CF8;
  --vb-sb-border:       rgba(129,140,248,.15);
  --vb-sb-section:      #6366F1;

  /* Text */
  --vb-text:       #111827;
  --vb-text-2:     #374151;
  --vb-text-muted: #6B7280;
  --vb-text-hint:  #9CA3AF;

  /* Borders */
  --vb-border:       rgba(17,24,39,.09);
  --vb-border-md:    rgba(17,24,39,.14);
  --vb-border-focus: #6366F1;

  /* Semantic */
  --vb-success:        #059669; --vb-success-light: #ECFDF5; --vb-success-border: #A7F3D0;
  --vb-warning:        #D97706; --vb-warning-light: #FFFBEB; --vb-warning-border: #FDE68A;
  --vb-danger:         #DC2626; --vb-danger-light:  #FEF2F2; --vb-danger-border:  #FECACA;
  --vb-info:           #2563EB; --vb-info-light:    #EFF6FF; --vb-info-border:    #BFDBFE;

  /* Aliases for backwards compat */
  --vb-success-bg: var(--vb-success-light);
  --vb-warning-bg: var(--vb-warning-light);
  --vb-danger-bg:  var(--vb-danger-light);
  --vb-info-bg:    var(--vb-info-light);
  --vb-success-border: var(--vb-success-border);
  --vb-warning-border: var(--vb-warning-border);
  --vb-danger-border:  var(--vb-danger-border);
  --vb-info-border:    var(--vb-info-border);

  /* Radii */
  --vb-r-xs: 4px;
  --vb-r-sm: 8px;
  --vb-r-md: 10px;
  --vb-r-lg: 14px;
  --vb-r-xl: 20px;

  /* Aliases */
  --vb-radius-sm: var(--vb-r-sm);
  --vb-radius-md: var(--vb-r-md);
  --vb-radius-lg: var(--vb-r-lg);
  --vb-radius-xl: var(--vb-r-xl);

  /* Shadows */
  --vb-sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --vb-sh-sm: 0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --vb-sh-md: 0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --vb-sh-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05);
  --vb-shadow-xs: var(--vb-sh-xs);
  --vb-shadow-sm: var(--vb-sh-sm);
  --vb-shadow-md: var(--vb-sh-md);
  --vb-shadow-lg: var(--vb-sh-lg);

  /* Layout */
  --vb-sidebar-w: 56px;
  --vb-sidebar-expanded-w: 232px;
  --vb-topbar-h:  60px;

  /* Typography */
  --vb-font:       'Plus Jakarta Sans','Inter','Segoe UI',system-ui,sans-serif;
  --vb-font-mono:  'JetBrains Mono','Fira Code','Consolas',monospace;
  --vb-font-size:  14px;
  --vb-line-height: 1.65;
  --vb-transition: 0.16s cubic-bezier(.4,0,.2,1);
}

/* ─────────────────────────────────────────────
   DARK THEME — rich, deep, true dark
───────────────────────────────────────────── */
[data-theme="dark"] {
  /* Brand shifts lighter in dark */
  --vb-brand-500:  #818CF8;
  --vb-brand-600:  #6366F1;
  --vb-brand-glow: rgba(129,140,248,.15);

  /* Page bg — true deep dark, not grey */
  --vb-bg:        #080C14;

  /* Surfaces — layered dark blues */
  --vb-surface:   #0E1525;
  --vb-surface-2: #141E30;
  --vb-surface-3: #1A2540;

  /* Sidebar — even deeper */
  --vb-sb-bg:           #0F172A;
  --vb-sb-bg-deep:      #0B1120;
  --vb-sb-text:         #CBD5E1;
  --vb-sb-text-hover:   #FFFFFF;
  --vb-sb-active-bg:    rgba(148,163,184,.15);
  --vb-sb-active-text:  #F1F5F9;
  --vb-sb-active-dot:   #94A3B8;
  --vb-sb-border:       rgba(255,255,255,.08);
  --vb-sb-section:      #475569;

  /* Text — crisp whites, not full white */
  --vb-text:       #E8EDF5;
  --vb-text-2:     #C5CDD8;
  --vb-text-muted: #5A6A84;
  --vb-text-hint:  #3A4A5C;

  /* Borders — subtle blue-tinted dark */
  --vb-border:     rgba(100,130,200,.1);
  --vb-border-md:  rgba(100,130,200,.16);
  --vb-border-focus: #818CF8;

  /* Semantic — vibrant in dark for readability */
  --vb-success:        #34D399; --vb-success-light: #022C22; --vb-success-border: #065F46;
  --vb-warning:        #FBBF24; --vb-warning-light: #1C1200; --vb-warning-border: #78350F;
  --vb-danger:         #F87171; --vb-danger-light:  #1A0808; --vb-danger-border:  #7F1D1D;
  --vb-info:           #60A5FA; --vb-info-light:    #071428; --vb-info-border:    #1E3A5F;

  --vb-success-bg: var(--vb-success-light);
  --vb-warning-bg: var(--vb-warning-light);
  --vb-danger-bg:  var(--vb-danger-light);
  --vb-info-bg:    var(--vb-info-light);

  /* Shadows stronger in dark */
  --vb-sh-xs: 0 1px 3px rgba(0,0,0,.4);
  --vb-sh-sm: 0 2px 8px rgba(0,0,0,.5);
  --vb-sh-md: 0 6px 24px rgba(0,0,0,.6);
  --vb-sh-lg: 0 16px 48px rgba(0,0,0,.7);
}

/* ─────────────────────────────────────────────
   BASE RESET
───────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--vb-font-size); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--vb-font);
  background: var(--vb-bg);
  color: var(--vb-text);
  line-height: var(--vb-line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--vb-transition), color var(--vb-transition);
}
a { color: var(--vb-brand-500); text-decoration: none; }
a:hover { text-decoration: none; }

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.vb-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.vb-sidebar {
  width: var(--vb-sidebar-w);
  background: var(--vb-sb-bg);
  background-image: linear-gradient(180deg, var(--vb-sb-bg) 0%, var(--vb-sb-bg-deep) 100%);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  border-right: 1px solid var(--vb-sb-border);
  transition: width .22s cubic-bezier(.4,0,.2,1),
              transform .22s cubic-bezier(.4,0,.2,1);
  will-change: width;
}

/* Expanded state — driven purely by CSS attribute selector */
.vb-sidebar[data-expanded="true"] {
  width: var(--vb-sidebar-expanded-w);
}

.vb-sidebar-brand {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--vb-sb-border);
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #818CF8, #6366F1);
  border-radius: var(--vb-r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
}
.brand-icon i { font-size: 19px; color: #fff; }
.brand-name {
  font-size: 15px; font-weight: 700;
  color: #fff; letter-spacing: -.4px; line-height: 1.2;
}
.brand-tag {
  font-size: 11px; color: #A5B4FC;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 150px;
}

.vb-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.vb-nav::-webkit-scrollbar { width: 4px; }
.vb-nav::-webkit-scrollbar-track { background: transparent; }
.vb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.vb-nav-section {
  padding: 16px 16px 5px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--vb-sb-section);
}
.vb-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 13px;
  margin: 1px 8px;
  color: var(--vb-sb-text);
  font-size: 13.5px; font-weight: 500;
  border-radius: var(--vb-r-sm);
  transition: background var(--vb-transition), color var(--vb-transition);
  position: relative;
  letter-spacing: .01em;
}
.vb-nav a:hover {
  background: rgba(255,255,255,.07);
  color: var(--vb-sb-text-hover);
}
.vb-nav a.active {
  background: var(--vb-sb-active-bg);
  color: var(--vb-sb-active-text);
  font-weight: 600;
}
.vb-nav a.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 6px; bottom: 6px;
  width: 3px;
  background: #818CF8;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(129,140,248,.7);
}
.vb-nav a i { font-size: 17px; flex-shrink: 0; opacity: .85; }
.vb-nav a.active i { opacity: 1; color: var(--vb-sb-active-dot); }
.vb-nav a:hover i { opacity: 1; }

.vb-sidebar-footer {
  padding: 10px 8px 14px;
  border-top: 1px solid var(--vb-sb-border);
  display: flex; flex-direction: column; gap: 1px;
}
.vb-sidebar-footer a {
  display: flex; align-items: center; gap: 8px;
  color: #A5B4FC; font-size: 12.5px; font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--vb-r-sm);
  transition: background var(--vb-transition), color var(--vb-transition);
}
.vb-sidebar-footer a:hover {
  background: rgba(129,140,248,.15);
  color: #EEF2FF;
}
.vb-sidebar-footer a i { font-size: 16px; }

/* ── Main area ── */
.vb-main {
  margin-left: var(--vb-sidebar-w);
  transition: margin-left .22s cubic-bezier(.4,0,.2,1);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

/* ── Topbar ── */
.vb-topbar {
  height: var(--vb-topbar-h);
  background: var(--vb-surface);
  border-bottom: 1px solid var(--vb-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
[data-theme="dark"] .vb-topbar {
  background: rgba(10,15,30,.92);
  border-bottom-color: rgba(255,255,255,.07);
}

.vb-topbar-title {
  font-size: 15px; font-weight: 600;
  color: var(--vb-text); letter-spacing: -.3px;
}

.vb-topbar-actions { display: flex; align-items: center; gap: 6px; }

/* Icon buttons */
.vb-icon-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--vb-r-sm);
  cursor: pointer;
  color: var(--vb-text-muted); font-size: 17px;
  transition: background var(--vb-transition), color var(--vb-transition);
}
.vb-icon-btn:hover {
  background: var(--vb-surface-2);
  color: var(--vb-text);
}

/* User chip — avatar style */
.vb-user-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--vb-text);
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: var(--vb-surface-2);
  border: 1px solid var(--vb-border);
  cursor: default;
  transition: background var(--vb-transition);
}
.vb-user-chip:hover { background: var(--vb-surface-3); }
.vb-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vb-brand-500), var(--vb-brand-600));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}
.vb-user-chip i { font-size: 16px; color: var(--vb-brand-500); }

/* Topbar divider between actions */
.vb-topbar-sep {
  width: 1px; height: 20px;
  background: var(--vb-border);
  margin: 0 4px;
}

/* ── Page content ── */
.vb-page { padding: 24px; flex: 1; }

/* ─────────────────────────────────────────────
   CARDS
───────────────────────────────────────────── */
.vb-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-lg);
  box-shadow: var(--vb-sh-sm);
  transition: box-shadow var(--vb-transition);
}
[data-theme="dark"] .vb-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  border-color: var(--vb-border);
}

.vb-card-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--vb-border);
  font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--vb-text);
  background: transparent;
  border-radius: var(--vb-r-lg) var(--vb-r-lg) 0 0;
  gap: 10px;
}
[data-theme="dark"] .vb-card-header { background: transparent; }

.vb-card-body { padding: 20px; }

/* ─────────────────────────────────────────────
   STAT CARDS
───────────────────────────────────────────── */
.vb-stat {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-lg);
  padding: 18px 20px;
  box-shadow: var(--vb-sh-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--vb-transition), box-shadow var(--vb-transition);
}
.vb-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--vb-sh-md);
}
.vb-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vb-brand-500), var(--vb-brand-600));
  opacity: .7;
}
[data-theme="dark"] .vb-stat {
  background: var(--vb-surface);
  border-color: var(--vb-border);
  box-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.vb-stat-label {
  font-size: 11px; font-weight: 600;
  color: var(--vb-text-muted);
  margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .06em;
}
.vb-stat-value {
  font-size: 22px; font-weight: 700;
  color: var(--vb-text);
  letter-spacing: -.5px; line-height: 1;
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.vb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px;
  border-radius: var(--vb-r-sm);
  font-size: 13px; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--vb-transition);
  white-space: nowrap;
  line-height: 1.4;
  font-family: var(--vb-font);
  letter-spacing: -.1px;
}
.vb-btn i { font-size: 15px; }

.vb-btn-primary {
  background: var(--vb-brand-500);
  color: #fff;
  border-color: var(--vb-brand-600);
  box-shadow: 0 1px 4px var(--vb-brand-glow), 0 1px 2px rgba(0,0,0,.1);
}
.vb-btn-primary:hover {
  background: var(--vb-brand-600);
  color: #fff;
  box-shadow: 0 3px 10px var(--vb-brand-glow), 0 1px 4px rgba(0,0,0,.15);
  transform: translateY(-1px);
}
.vb-btn-primary:active { transform: translateY(0); box-shadow: none; }

.vb-btn-outline {
  background: var(--vb-surface);
  color: var(--vb-text-muted);
  border-color: var(--vb-border-md);
}
.vb-btn-outline:hover {
  background: var(--vb-surface-2);
  color: var(--vb-text);
  border-color: var(--vb-text-muted);
}
[data-theme="dark"] .vb-btn-outline {
  background: var(--vb-surface-2);
  border-color: var(--vb-border-md);
}
[data-theme="dark"] .vb-btn-outline:hover {
  background: var(--vb-surface-3);
  color: var(--vb-text);
}

.vb-btn-danger { background: var(--vb-danger); color: #fff; border-color: var(--vb-danger); }
.vb-btn-danger:hover { opacity: .88; color: #fff; transform: translateY(-1px); }

.vb-btn-sm  { padding: 5px 10px; font-size: 12px; }
.vb-btn-sm i { font-size: 13px; }
.vb-btn-lg  { padding: 10px 22px; font-size: 14px; }
.vb-btn-lg i { font-size: 16px; }

/* ─────────────────────────────────────────────
   FORMS
───────────────────────────────────────────── */
.vb-form-group { margin-bottom: 16px; }

.vb-label {
  display: block;
  font-size: 11.5px; font-weight: 600;
  color: var(--vb-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .05em;
}

.vb-input, .vb-select, .vb-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--vb-border-md);
  border-radius: var(--vb-r-sm);
  background: var(--vb-surface);
  color: var(--vb-text);
  font-size: 14px;
  font-family: var(--vb-font);
  line-height: 1.5;
  transition: border-color var(--vb-transition), box-shadow var(--vb-transition), background var(--vb-transition);
  outline: none;
}
[data-theme="dark"] .vb-input,
[data-theme="dark"] .vb-select,
[data-theme="dark"] .vb-textarea {
  background: var(--vb-surface-2);
  border-color: var(--vb-border-md);
  color: var(--vb-text);
}
.vb-input:focus, .vb-select:focus, .vb-textarea:focus {
  border-color: var(--vb-border-focus);
  box-shadow: 0 0 0 3px var(--vb-brand-glow);
  background: var(--vb-surface);
}
[data-theme="dark"] .vb-input:focus,
[data-theme="dark"] .vb-select:focus,
[data-theme="dark"] .vb-textarea:focus {
  background: var(--vb-surface-2);
}
.vb-input:hover:not(:focus),
.vb-select:hover:not(:focus),
.vb-textarea:hover:not(:focus) {
  border-color: var(--vb-text-hint);
}
.vb-input::placeholder { color: var(--vb-text-hint); }
.vb-textarea { resize: vertical; min-height: 72px; }
.vb-select { cursor: pointer; }

/* ─────────────────────────────────────────────
   TABLES
───────────────────────────────────────────── */
.vb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vb-table thead tr { background: transparent; }
.vb-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--vb-text-muted);
  border-bottom: 2px solid var(--vb-border);
  white-space: nowrap;
  user-select: none;
}
.vb-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--vb-border);
  color: var(--vb-text);
  vertical-align: middle;
  font-size: 14px;
}
.vb-table tbody tr {
  transition: background var(--vb-transition);
}
.vb-table tbody tr:hover { background: var(--vb-surface-2); }
[data-theme="dark"] .vb-table tbody tr:hover { background: rgba(255,255,255,.04); }
.vb-table tbody tr:last-child td { border-bottom: none; }

/* ─────────────────────────────────────────────
   BADGES
───────────────────────────────────────────── */
.vb-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap; letter-spacing: .01em;
}
.vb-badge-success { background: var(--vb-success-light); color: var(--vb-success); border: 1px solid var(--vb-success-border); }
.vb-badge-warning { background: var(--vb-warning-light); color: var(--vb-warning); border: 1px solid var(--vb-warning-border); }
.vb-badge-danger  { background: var(--vb-danger-light);  color: var(--vb-danger);  border: 1px solid var(--vb-danger-border); }
.vb-badge-info    { background: var(--vb-info-light);    color: var(--vb-info);    border: 1px solid var(--vb-info-border); }

/* ─────────────────────────────────────────────
   ALERTS
───────────────────────────────────────────── */
.vb-alert {
  padding: 11px 15px;
  border-radius: var(--vb-r-sm);
  font-size: 13px;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
  line-height: 1.55;
  border-left: 3px solid;
}
.vb-alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.vb-alert-danger  { background: var(--vb-danger-light);  color: var(--vb-danger);  border-color: var(--vb-danger);  border: 1px solid var(--vb-danger-border); border-left: 3px solid var(--vb-danger); }
.vb-alert-success { background: var(--vb-success-light); color: var(--vb-success); border: 1px solid var(--vb-success-border); border-left: 3px solid var(--vb-success); }
.vb-alert-warning { background: var(--vb-warning-light); color: var(--vb-warning); border: 1px solid var(--vb-warning-border); border-left: 3px solid var(--vb-warning); }
.vb-alert-info    { background: var(--vb-info-light);    color: var(--vb-info);    border: 1px solid var(--vb-info-border);    border-left: 3px solid var(--vb-info); }

/* ─────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────── */
.vb-login-bg {
  min-height: 100vh;
  background: var(--vb-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.vb-login-bg::before {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(ellipse, rgba(99,102,241,.07) 0%, transparent 70%);
  pointer-events: none;
}
.vb-login-bg::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 50%; height: 70%;
  background: radial-gradient(ellipse, rgba(99,102,241,.05) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .vb-login-bg::before {
  background: radial-gradient(ellipse, rgba(99,102,241,.12) 0%, transparent 70%);
}

.vb-login-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border-md);
  border-radius: var(--vb-r-xl);
  box-shadow: var(--vb-sh-lg);
  width: 100%; max-width: 400px;
  padding: 40px 36px;
  position: relative; z-index: 1;
}
[data-theme="dark"] .vb-login-card {
  box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
  background: var(--vb-surface);
}

.vb-login-logo { text-align: center; margin-bottom: 32px; }
.vb-login-logo .logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--vb-brand-500), var(--vb-brand-700));
  border-radius: var(--vb-r-lg);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px var(--vb-brand-glow);
}
.vb-login-logo .logo-icon i { font-size: 30px; color: #fff; }
.vb-login-logo .logo-name {
  font-size: 23px; font-weight: 800;
  color: var(--vb-text); letter-spacing: -.6px;
}
.vb-login-logo .logo-tag {
  font-size: 13px; color: var(--vb-text-muted); margin-top: 4px;
}

/* ─────────────────────────────────────────────
   MOBILE
───────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Sidebar drawer ── */
  .vb-sidebar {
    left: auto !important;
    right: 0 !important;
    top: 0 !important; bottom: 0 !important;
    width: 280px !important;
    transform: translateX(110%) !important;
    transition: transform .28s cubic-bezier(.4,0,.2,1) !important;
    box-shadow: none;
    z-index: 300;
    overflow: hidden !important;
    border-radius: 0 !important;
  }
  .vb-sidebar.open {
    transform: translateX(0) !important;
    box-shadow: -6px 0 40px rgba(0,0,0,.4) !important;
  }

  /* ── Brand ── */
  .vb-sidebar .rail-brand {
    height: 64px !important;
    padding: 0 16px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  .vb-sidebar .rail-brand-text { display: block !important; }
  .vb-sidebar .rail-app-name   { opacity: 1 !important; font-size: 15px !important; }
  .vb-sidebar .rail-firm-name  { opacity: 1 !important; font-size: 11px !important; }

  /* Pin button hide, close button show */
  .vb-sidebar .rail-toggle-btn { display: none !important; }
  .vb-sidebar .rail-close-btn  { display: flex !important; }

  /* Edge pill hide */
  .vb-sidebar .rail-edge-pill { display: none !important; }

  /* ── Nav items — bigger touch targets ── */
  .vb-sidebar .rail-item {
    width: auto !important;
    height: 48px !important;
    margin: 2px 8px !important;
    padding: 0 16px !important;
    justify-content: flex-start !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }
  .vb-sidebar .rail-icon {
    width: 24px !important;
    font-size: 20px !important;
  }

  /* ── Group heads — section labels (no accordion on mobile) ── */
  .vb-sidebar .rail-group-head {
    height: 32px !important;
    width: auto !important;
    margin: 10px 8px 2px !important;
    padding: 0 16px !important;
    justify-content: flex-start !important;
    background: transparent !important;
    pointer-events: none !important;
    cursor: default !important;
    font-size: 10px !important;
    letter-spacing: .1em !important;
  }
  /* Show section label text, hide icon and arrow */
  .vb-sidebar .rail-group-head .rail-icon   { display: none !important; }
  .vb-sidebar .rail-group-head .rail-label  { opacity: 1 !important; display: block !important; }
  .vb-sidebar .rail-group-arrow             { display: none !important; }
  .vb-sidebar .rail-group-head .rail-tooltip{ display: none !important; }

  /* ── Group body — always visible on mobile ── */
  .vb-sidebar .rail-group-body {
    max-height: none !important;
    overflow: visible !important;
  }

  /* ── Sub-items — slight indent ── */
  .vb-sidebar .rail-sub {
    width: auto !important;
    padding: 0 16px 0 20px !important;
    margin: 2px 8px !important;
    height: 44px !important;
    justify-content: flex-start !important;
  }
  .vb-sidebar .rail-sub .rail-icon { font-size: 17px !important; }

  /* Show labels */
  .vb-sidebar .rail-label { opacity: 1 !important; }

  /* ── Footer items ── */
  .vb-sidebar .rail-footer .rail-item {
    height: 46px !important;
    margin: 2px 8px !important;
    padding: 0 16px !important;
    width: auto !important;
    justify-content: flex-start !important;
  }

  /* ── Main ── */
  .vb-main { margin-left: 0 !important; transition: none !important; }
  .vb-page { padding: 14px; }
  .vb-topbar { padding: 0 14px; height: 52px; }

  /* ── Overlay ── */
  .vb-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 299;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .vb-overlay.show,
  .vb-overlay.active { display: block; }

  /* ── Hamburger ── */
}

/* ─────────────────────────────────────────────
   GRID HELPERS
───────────────────────────────────────────── */
.vb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vb-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.vb-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 1100px) { .vb-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width:  768px) { .vb-grid-2,.vb-grid-3,.vb-grid-4 { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────
   UTILITIES
───────────────────────────────────────────── */
.text-muted    { color: var(--vb-text-muted) !important; }
.text-success  { color: var(--vb-success) !important; }
.text-danger   { color: var(--vb-danger) !important; }
.text-info     { color: var(--vb-info) !important; }
.text-warning  { color: var(--vb-warning) !important; }
.text-sm  { font-size: 12px; }
.text-xs  { font-size: 11px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-0   { margin-bottom: 0 !important; }
.mb-8   { margin-bottom: 8px; }
.mb-14  { margin-bottom: 14px; }
.mb-16  { margin-bottom: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.w-100  { width: 100%; }
.font-mono { font-family: var(--vb-font-mono); }

.vb-divider { border: none; border-top: 1px solid var(--vb-border); margin: 18px 0; }

.vb-empty { text-align: center; padding: 52px 24px; color: var(--vb-text-muted); }
.vb-empty i { font-size: 44px; display: block; margin-bottom: 14px; opacity: .3; }
.vb-empty p { font-size: 14px; margin-bottom: 16px; }

/* ─────────────────────────────────────────────
   SCROLLBAR (webkit)
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.15);
  border-radius: 6px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.25);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.18);
}

/* ─────────────────────────────────────────────
   SELECTION
───────────────────────────────────────────── */
::selection {
  background: var(--vb-brand-glow);
  color: var(--vb-brand-600);
}
[data-theme="dark"] ::selection {
  background: rgba(129,140,248,.25);
  color: #A5B4FC;
}

/* ─────────────────────────────────────────────
   MOBILE RESPONSIVE — Extra rules
   480px = small phones, 768px = tablets
───────────────────────────────────────────── */

/* Inline grid override for mobile */
@media (max-width: 640px) {
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Line item tables — horizontal scroll on mobile */
.vb-line-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -18px;
  padding: 0 18px;
}
.vb-line-table-wrap::after {
  content: '';
  display: block;
  height: 1px;
}

/* Topbar title truncate on small screens */
@media (max-width: 480px) {
  .vb-topbar-title {
    font-size: 14px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .vb-user-chip span { display: none; }
  .vb-page { padding: 12px; }
  .vb-card-body { padding: 14px; }
  .vb-card-header { padding: 11px 14px; font-size: 13px; }
  .vb-stat-value { font-size: 17px; }
  .vb-stat { padding: 13px 14px; }
  .vb-btn-lg { padding: 9px 16px; font-size: 13.5px; }
}

/* Toolbar — search + button row */
@media (max-width: 600px) {
  .vb-toolbar, .vb-toolbar > div,
  [style*="display:flex;align-items:center;justify-content:space-between"] {
    flex-wrap: wrap !important;
  }
  /* Action buttons full width on very small */
  .vb-toolbar .vb-btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* Form grids inside cards — single column on mobile */
@media (max-width: 600px) {
  .vb-card-body .vb-grid-2 {
    grid-template-columns: 1fr !important;
  }
  .vb-card-body .vb-grid-2 > [style*="grid-column:1/-1"] {
    grid-column: 1 !important;
  }
}

/* Stat grid — 2 col on mobile instead of 1 */
@media (max-width: 600px) {
  .vb-grid-4 { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .vb-grid-3 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 380px) {
  .vb-grid-4, .vb-grid-3 { grid-template-columns: 1fr !important; }
}

/* Tables — hide less important columns on mobile */
@media (max-width: 600px) {
  .vb-table .hide-mobile { display: none !important; }
  .vb-table th, .vb-table td { padding: 9px 10px; font-size: 12.5px; }
}

/* Summary card in invoice create/edit */
@media (max-width: 600px) {
  .vb-summary-card {
    min-width: unset !important;
    width: 100%;
  }
}

/* Login card */
@media (max-width: 420px) {
  .vb-login-card { padding: 28px 20px; }
  .vb-login-logo .logo-name { font-size: 20px; }
}

/* Print button row mobile */
@media (max-width: 600px) {
  .print-bar {
    flex-direction: column;
    align-items: center;
  }
}

/* Sidebar footer spacing */
@media (max-width: 768px) {
  .vb-sidebar-footer { padding-bottom: 20px; }
}

/* Invoice/Purchase line items scroll hint */
.scroll-hint {
  display: none;
  font-size: 11px;
  color: var(--vb-text-muted);
  text-align: center;
  padding: 5px;
  margin-bottom: 6px;
}
@media (max-width: 768px) {
  .scroll-hint { display: block; }
}

/* Quick action buttons grid */
@media (max-width: 480px) {
  .vb-quick-actions {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Payment page tabs */
@media (max-width: 500px) {
  .vb-payment-tabs {
    flex-direction: column;
  }
  .vb-payment-tabs .vb-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Report filter bar */
@media (max-width: 650px) {
  .vb-report-filter {
    flex-direction: column;
    align-items: stretch !important;
  }
  .vb-report-filter .vb-input,
  .vb-report-filter .vb-select {
    width: 100%;
  }
  .vb-report-filter button {
    width: 100%;
    justify-content: center;
  }
}

/* Ledger stat cards */
@media (max-width: 500px) {
  .vb-ledger-actions {
    flex-direction: column;
    width: 100%;
  }
  .vb-ledger-actions .vb-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ─────────────────────────────────────────────
   ACCORDION NAV — Variant A
───────────────────────────────────────────── */
.vb-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 13px;
  margin: 1px 8px;
  color: var(--vb-sb-text);
  font-size: 13px; font-weight: 500;
  border-radius: var(--vb-r-sm);
  text-decoration: none;
  transition: background var(--vb-transition), color var(--vb-transition);
  position: relative;
  letter-spacing: .01em;
}
.vb-nav-link:hover {
  background: rgba(255,255,255,.07);
  color: var(--vb-sb-text-hover);
}
.vb-nav-link.active {
  background: var(--vb-sb-active-bg);
  color: var(--vb-sb-active-text);
  font-weight: 600;
}
.vb-nav-link.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 6px; bottom: 6px;
  width: 3px;
  background: #818CF8;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(129,140,248,.7);
}
.vb-nav-link i { font-size: 17px; flex-shrink: 0; opacity: .85; }
.vb-nav-link.active i { opacity: 1; color: var(--vb-sb-active-dot); }
.vb-nav-link:hover i { opacity: 1; }

/* Group container */
.vb-nav-group { margin: 2px 0; }

/* Group header — clickable */
.vb-nav-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 6px 14px;
  margin: 4px 8px 2px;
  cursor: pointer;
  user-select: none;
  border-radius: var(--vb-r-sm);
  transition: background var(--vb-transition);
}
.vb-nav-group-head:hover {
  background: rgba(255,255,255,.05);
}
.vb-nav-group-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--vb-sb-section);
  transition: color var(--vb-transition);
}
.vb-nav-group-head:hover .vb-nav-group-label,
.vb-nav-group-head.open .vb-nav-group-label {
  color: #818CF8;
}
.vb-nav-group-ic {
  font-size: 14px;
  color: var(--vb-sb-section);
  transition: transform .22s cubic-bezier(.4,0,.2,1), color var(--vb-transition);
  flex-shrink: 0;
}
.vb-nav-group-head:hover .vb-nav-group-ic { color: #818CF8; }
.vb-nav-group-head.open .vb-nav-group-ic {
  transform: rotate(45deg);
  color: #818CF8;
}

/* Collapsible body */
.vb-nav-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s cubic-bezier(.4,0,.2,1);
}
.vb-nav-group-body.open {
  max-height: 300px;
}

/* ═══════════════════════════════════════════════════════════
   ICON RAIL SIDEBAR
═══════════════════════════════════════════════════════════ */

/* Brand area */
.rail-brand {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  border-bottom: 1px solid var(--vb-sb-border);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  user-select: none;
}
/* Collapsed — center logo */
.vb-sidebar:not([data-expanded="true"]) .rail-brand {
  padding: 0;
  justify-content: center;
  gap: 0;
}
.vb-sidebar:not([data-expanded="true"]) .rail-brand-text,
.vb-sidebar:not([data-expanded="true"]) .rail-toggle-btn {
  display: none;
}
.rail-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #818CF8, #6366F1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(99,102,241,.4);
  font-size: 17px; color: #fff;
}
.rail-brand-text { flex: 1; min-width: 0; overflow: hidden; }
.rail-app-name {
  font-size: 14px; font-weight: 700; color: #fff;
  letter-spacing: -.3px; line-height: 1.2;
  white-space: nowrap;
  opacity: 0; transition: opacity .15s .05s;
}
.rail-firm-name {
  font-size: 10.5px; color: #A5B4FC;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity .15s .05s;
}
.vb-sidebar[data-expanded="true"] .rail-app-name,
.vb-sidebar[data-expanded="true"] .rail-firm-name { opacity: 1; }

/* Toggle / Pin button */
.rail-toggle-btn {
  width: 28px; height: 28px;
  background: rgba(129,140,248,.12);
  border: 1px solid rgba(129,140,248,.2);
  border-radius: 8px;
  cursor: pointer;
  color: #A5B4FC;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .18s, background .15s, border-color .15s, transform .15s;
}
/* Show on hover or when expanded */
.vb-sidebar:hover .rail-toggle-btn { opacity: 1; }
.vb-sidebar[data-expanded="true"] .rail-toggle-btn { opacity: 1; }
.rail-toggle-btn:hover {
  background: rgba(129,140,248,.25);
  border-color: rgba(129,140,248,.4);
  color: #C7D2FE;
}
/* Pinned state — filled look */
.vb-sidebar[data-pinned="true"] .rail-toggle-btn {
  background: rgba(99,102,241,.3);
  border-color: rgba(129,140,248,.5);
  color: #E0E7FF;
}
#rail-toggle-ic { transition: transform .2s; }
/* Pin icon rotates when pinned */
.vb-sidebar[data-pinned="true"] #rail-toggle-ic { transform: rotate(45deg); }

/* Nav */
.rail-nav { flex: 1; padding: 6px 0; overflow-y: auto; overflow-x: hidden; }
.rail-nav::-webkit-scrollbar { width: 3px; }
.rail-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* Rail item (link) */
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  border-radius: var(--vb-r-sm);
  color: var(--vb-sb-text);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;

  /* Collapsed default — icon perfectly centered in 56px rail */
  width: 40px;
  margin: 1px auto;
  padding: 0;
  justify-content: center;
}

/* Expanded — full width left-aligned */
.vb-sidebar[data-expanded="true"] .rail-item {
  width: auto;
  margin: 1px 6px;
  padding: 0 12px;
  justify-content: flex-start;
}
.rail-item:hover {
  background: rgba(255,255,255,.07);
  color: var(--vb-sb-text-hover);
}
.rail-item:hover .rail-icon i { opacity: 1; }
.rail-item.active {
  background: var(--vb-sb-active-bg);
  color: var(--vb-sb-active-text);
  font-weight: 600;
}
.rail-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: #818CF8;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(129,140,248,.6);
}
/* Expanded — pull bar to outer edge */
.vb-sidebar[data-expanded="true"] .rail-item.active::before {
  left: -6px;
}
.rail-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
  transition: color .15s;
}
.rail-icon i { opacity: .82; transition: opacity .15s, color .15s; }
.rail-item.active .rail-icon i { opacity: 1; color: #A5B4FC; }
.rail-item:hover .rail-icon i { opacity: 1; }

/* Sub items */
.rail-sub .rail-icon { font-size: 16px; }
/* Collapsed — sub items same as top items (already handled by rail-item) */
.vb-sidebar:not([data-expanded="true"]) .rail-sub {
  width: 40px;
  margin: 1px auto !important;
  padding: 0 !important;
  justify-content: center !important;
}

/* Label — hidden when collapsed */
.rail-label {
  flex: 1;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vb-sidebar[data-expanded="true"] .rail-label { opacity: 1; }

/* Tooltip — shown when collapsed */
.rail-tooltip {
  position: fixed;
  left: calc(var(--vb-sidebar-w) + 12px);
  background: #0F172A;
  color: #f1f5f9;
  font-size: 12.5px; font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
  transform: none;
  top: auto;
}

/* Tooltip shown by JS (mouseenter/mouseleave) for accurate fixed positioning */

/* Group head */
.rail-group-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 28px;
  padding: 0 10px;
  margin: 6px 4px 2px;
  border-radius: var(--vb-r-sm);
  cursor: pointer;
  color: var(--vb-sb-section);
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
/* Collapsed — show only a thin divider line, no icon/text */
.vb-sidebar:not([data-expanded="true"]) .rail-group-head {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: 8px auto;
  width: 32px;
  padding: 0;
  border-radius: 1px;
  cursor: default;
  pointer-events: none;
}
.vb-sidebar:not([data-expanded="true"]) .rail-group-head * { display: none; }
/* Expanded — normal */
.vb-sidebar[data-expanded="true"] .rail-group-head {
  justify-content: flex-start;
  padding: 0 14px;
  margin: 8px 6px 2px;
  height: 28px;
  background: transparent;
}
.rail-group-head:hover { background: rgba(255,255,255,.06); color: #A5B4FC; }
.vb-sidebar:not([data-expanded="true"]) .rail-group-head:hover { background: rgba(255,255,255,.1); }
.rail-group-head.open { color: #818CF8; }
.rail-group-head.open .rail-icon i { color: #818CF8; }
.rail-group-head .rail-icon { font-size: 16px; }

.rail-group-arrow {
  margin-left: auto;
  font-size: 13px;
  transition: transform .22s, opacity .18s;
  flex-shrink: 0;
  opacity: 0;
}
.vb-sidebar[data-expanded="true"] .rail-group-arrow { opacity: 1; }
.rail-group-head.open .rail-group-arrow { transform: rotate(180deg); }

/* Group body */
.rail-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s cubic-bezier(.4,0,.2,1);
}
/* Only expand group body when sidebar is also expanded */
.vb-sidebar[data-expanded="true"] .rail-group-body.open {
  max-height: 300px;
}
/* Collapsed — show ALL items flat (no accordion), hide group structure */
.vb-sidebar:not([data-expanded="true"]) .rail-group-body {
  max-height: none !important;
  overflow: visible !important;
}

/* Sub-item indent when expanded */
.vb-sidebar[data-expanded="true"] .rail-sub {
  padding-left: 20px;
}

/* Footer */
.rail-footer {
  padding: 4px 0 6px;
  border-top: 1px solid var(--vb-sb-border);
  flex-shrink: 0;
}
/* Footer items same height as nav items */
.rail-footer .rail-item {
  height: 38px;
}
.vb-sidebar:not([data-expanded="true"]) .rail-footer .rail-item {
  width: 40px;
  margin: 1px auto;
  padding: 0;
  justify-content: center;
}

/* Topbar height sync */


/* Responsive */
/* Mobile rules consolidated above */

/* ═══════════════════════════════════════════
   FLYOUT MENU (collapsed sidebar)
═══════════════════════════════════════════ */
.rail-flyout {
  position: fixed;
  left: var(--vb-sidebar-w);
  top: 0;
  z-index: 200;
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: 0 var(--vb-r-lg) var(--vb-r-lg) 0;
  box-shadow: 4px 4px 24px rgba(0,0,0,.15);
  min-width: 200px;
  padding: 8px 0 10px;
  animation: flyout-in .15s cubic-bezier(.4,0,.2,1);
}
@keyframes flyout-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.rail-flyout-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--vb-text-muted);
  padding: 4px 14px 8px;
  border-bottom: 1px solid var(--vb-border);
  margin-bottom: 4px;
}
.rail-flyout-items a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--vb-text);
  text-decoration: none;
  transition: background .12s;
  white-space: nowrap;
}
.rail-flyout-items a:hover {
  background: var(--vb-surface-2);
}
.rail-flyout-items a.active {
  color: var(--vb-brand-500);
  background: var(--vb-brand-50);
}
.rail-flyout-items a i {
  font-size: 16px;
  color: var(--vb-text-muted);
  flex-shrink: 0;
}
.rail-flyout-items a.active i { color: var(--vb-brand-500); }
.rail-flyout-items a:hover i  { color: var(--vb-text); }

/* ── Edge Pill — expand/collapse trigger ─────────────────── */
.rail-edge-pill {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 48px;
  background: #6366F1;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  box-shadow: 3px 0 12px rgba(99,102,241,.45);
  transition: background .15s, box-shadow .15s, width .15s;
}
.rail-edge-pill:hover {
  background: #4F46E5;
  width: 18px;
  box-shadow: 3px 0 16px rgba(99,102,241,.6);
}
.rail-edge-pill i {
  font-size: 12px;
  color: #fff;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
/* Expanded — arrow flips */
.vb-sidebar[data-expanded="true"] .rail-edge-pill i {
  transform: rotate(180deg);
}
/* Hide inside sidebar overflow — pill needs overflow:visible on sidebar */
.vb-sidebar { overflow: visible !important; }

/* ── Mobile close button ─────────────────────────── */
.rail-close-btn {
  display: none; /* hidden on desktop */
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  align-items: center; justify-content: center;
  cursor: pointer;
  color: #94A3B8;
  font-size: 16px;
  flex-shrink: 0;
  transition: background .15s;
}
.rail-close-btn:hover {
  background: rgba(255,255,255,.15);
  color: #E2E8F0;
}

/* ════════════════════════════════════════════════════════════
   GLOBAL MOBILE RESPONSIVE — all modules
   ════════════════════════════════════════════════════════════ */

/* Scrollable table wrapper */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--vb-r-md);
}

/* Action bar — stack on mobile */
@media (max-width: 600px) {
  /* Page header row */
  .vb-page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .vb-page-header .vb-btn { width: 100%; justify-content: center; }

  /* Card body padding reduce */
  .vb-card-body { padding: 14px !important; }
  .vb-card-header { padding: 12px 14px !important; }

  /* Filter bar — stack */
  .vb-filter-bar { flex-wrap: wrap !important; }
  .vb-filter-bar .vb-input,
  .vb-filter-bar select { width: 100% !important; }

  /* Form grids — single column */
  .vb-form-grid { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns"]:not(.items-table):not(.vb-table) {
    grid-template-columns: 1fr !important;
  }

  /* Inline grids in cards */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1.2fr"],
  div[style*="grid-template-columns: 200px"],
  div[style*="grid-template-columns: 220px"],
  div[style*="grid-template-columns: 1fr 200px"],
  div[style*="grid-template-columns: 1fr 260px"] {
    grid-template-columns: 1fr !important;
  }

  /* Stat strip */
  .kpi-strip { grid-template-columns: 1fr 1fr !important; }

  /* Buttons full width in forms */
  .vb-form-actions { flex-direction: column !important; }
  .vb-form-actions .vb-btn { width: 100%; justify-content: center; }

  /* Hide less important table columns */
  .col-hide-sm { display: none !important; }

  /* Tables — horizontal scroll */
  .vb-card > div[style*="overflow-x"] { overflow-x: auto !important; }
  .vb-table { min-width: 500px; }

  /* Modal / overlay panels */
  .vb-modal { width: 95vw !important; margin: 10px auto !important; }

  /* Tab bars — scroll */
  .vb-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; }
  .vb-tab { white-space: nowrap; flex-shrink: 0; }

  /* Topbar title — shorter */
  .vb-topbar-title { font-size: 15px !important; }
  .vb-user-chip span { display: none; }

  /* Dashboard middle grid */
  .dash-grid,
  div[style*="grid-template-columns:1fr 200px"],
  div[style*="grid-template-columns: 1fr 200px"],
  div[style*="grid-template-columns:200px 1fr 200px"],
  div[style*="grid-template-columns:1fr 260px"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .kpi-strip { grid-template-columns: 1fr !important; }
  .vb-page { padding: 10px !important; }
}

/* ── Hamburger button ─────────────────────── */
.vb-menu-btn-mobile { display: none; }         /* hidden on desktop */
@media (max-width: 768px) {
  .vb-menu-btn-mobile { display: flex !important; }   /* visible on mobile */
  .vb-topbar-title { font-size: 15px; max-width: 160px;
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-name-text  { display: none; }   /* hide username text, keep icon */
  .vb-user-chip    { padding: 5px 8px; }
  .vb-topbar       { padding: 0 14px; }
}
@media (max-width: 380px) {
  .vb-topbar-title { max-width: 110px; font-size: 14px; }
  .vb-theme-btn-wrap { display: none; }  /* hide theme btn on tiny screens */
}

/* ════════════════════════════════════════════
   PAGE LISTING IMPROVEMENTS
════════════════════════════════════════════ */

/* Page header row */
.vb-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.vb-page-head-left { display: flex; flex-direction: column; gap: 2px; }
.vb-page-head-title {
  font-size: 19px; font-weight: 700;
  color: var(--vb-text); letter-spacing: -.4px;
  line-height: 1.2;
}
.vb-page-head-sub {
  font-size: 13.5px; color: var(--vb-text-muted);
  margin-top: 2px;
}
.vb-page-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Filter/search bar */
.vb-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.vb-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}
.vb-search-wrap i {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--vb-text-muted);
  pointer-events: none;
}
.vb-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-sm);
  background: var(--vb-surface);
  color: var(--vb-text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  height: 36px;
}
.vb-search-input:focus {
  outline: none;
  border-color: var(--vb-brand-400);
  box-shadow: 0 0 0 3px var(--vb-brand-glow);
}
.vb-search-input::placeholder { color: var(--vb-text-muted); }

/* Table card — tighter, cleaner */
.vb-table-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-lg);
  box-shadow: var(--vb-sh-sm);
  overflow: hidden;
}

/* Empty state */
.vb-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--vb-text-muted);
}
.vb-empty-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--vb-surface-2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  color: var(--vb-text-muted);
}
.vb-empty-title {
  font-size: 15px; font-weight: 600;
  color: var(--vb-text); margin-bottom: 6px;
}
.vb-empty-sub {
  font-size: 13px; margin-bottom: 20px;
  color: var(--vb-text-muted);
}

/* Table action column */
.vb-table .col-actions { width: 80px; text-align: right; }
.vb-table td.col-actions { padding-right: 12px; }

/* Amount cells */
.vb-table td.col-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

/* Row link style */
.vb-table tbody tr.clickable { cursor: pointer; }

/* Count badge in card header */
.vb-count-badge {
  display: inline-flex; align-items: center;
  background: var(--vb-surface-2);
  border: 1px solid var(--vb-border);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 12px; font-weight: 600;
  color: var(--vb-text-muted);
  margin-left: 6px;
}

/* Status dots */
.vb-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.vb-dot-success { background: var(--vb-success); }
.vb-dot-danger  { background: var(--vb-danger); }
.vb-dot-warning { background: var(--vb-warning); }
.vb-dot-muted   { background: var(--vb-text-muted); }

/* ════════════════════════════════════════════════════════════
   PAGE POLISH — listing pages
════════════════════════════════════════════════════════════ */

/* vb-table inside table-card — tighter first/last td padding */
.vb-table-card .vb-table th:first-child,
.vb-table-card .vb-table td:first-child { padding-left: 20px; }
.vb-table-card .vb-table th:last-child,
.vb-table-card .vb-table td:last-child  { padding-right: 20px; }

/* Page head icon */
.vb-page-head-title i { vertical-align: -3px; margin-right: 6px; }

/* Subtle row number in tables */
.vb-table td.col-sr {
  color: var(--vb-text-muted);
  font-size: 12px;
  width: 36px;
  text-align: center;
}

/* Amount cells */
.vb-table td.fw-600,
.vb-table td.text-right.fw-600 { font-weight: 600; letter-spacing: -.2px; }

/* Action buttons in table rows */
.tbl-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.tbl-action-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--vb-text-muted);
  text-decoration: none;
  font-size: 16px;
  border: none; background: transparent;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.tbl-action-btn:hover { background: var(--vb-surface-2); color: var(--vb-text); }
.tbl-action-btn.danger:hover { background: rgba(244,63,94,.1); color: var(--vb-danger); }
.tbl-action-btn.success:hover { background: rgba(16,185,129,.1); color: var(--vb-success); }

/* Filter row search input height */
.vb-filter-row .vb-input,
.vb-filter-row .vb-select { height: 36px; }
.vb-filter-row .vb-search-input { height: 36px; }

/* Form pages — card layout */
.form-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-lg);
  box-shadow: var(--vb-sh-sm);
}
.form-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--vb-border);
  font-size: 14px; font-weight: 600;
  color: var(--vb-text);
  display: flex; align-items: center; gap: 8px;
}
.form-card-header i { font-size: 17px; color: var(--vb-text-muted); }
.form-card-body { padding: 20px; }

/* Section dividers in forms */
.form-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--vb-border);
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; }
.form-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--vb-text-muted);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--vb-border);
}

/* vb-select base style */
.vb-select {
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-sm);
  background: var(--vb-surface);
  color: var(--vb-text);
  font-size: 13px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  transition: border-color .15s;
}
.vb-select:focus {
  outline: none;
  border-color: var(--vb-brand-400);
  box-shadow: 0 0 0 3px var(--vb-brand-glow);
}

/* ════════════════════════════════════════════════════════
   FINAL POLISH — listing pages
════════════════════════════════════════════════════════ */

/* Segmented tab control */
.vb-tab-group {
  display: flex;
  gap: 3px;
  background: var(--vb-surface-2);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-sm);
  padding: 3px;
}
.vb-tab-group a {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 13px; font-weight: 500;
  text-decoration: none;
  color: var(--vb-text-muted);
  transition: background .12s, color .12s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.vb-tab-group a.active {
  background: var(--vb-surface);
  color: var(--vb-text);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.vb-tab-group a:hover:not(.active) { color: var(--vb-text); }

/* Empty state */
.vb-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--vb-text-muted);
}
.vb-empty-state .icon {
  width: 52px; height: 52px;
  background: var(--vb-surface-2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
}
.vb-empty-state h3 {
  font-size: 15px; font-weight: 600;
  color: var(--vb-text); margin-bottom: 5px;
}
.vb-empty-state p { font-size: 13.5px; margin-bottom: 16px; }

/* Table action column */
.vb-table .col-actions { width: 90px; }
.vb-table td.col-actions {
  padding-right: 16px;
}

/* Doc number pill style */
.doc-no {
  font-family: var(--vb-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--vb-brand-600);
  letter-spacing: -.2px;
}
[data-theme="dark"] .doc-no { color: var(--vb-brand-400); }

/* Amount — green for receivable, red for payable */
.amt-positive { color: var(--vb-success); font-weight: 600; }
.amt-negative { color: var(--vb-danger);  font-weight: 600; }
.amt-neutral  { color: var(--vb-text);    font-weight: 600; }

/* Table: first col padding */
.vb-table-card .vb-table th:first-child,
.vb-table-card .vb-table td:first-child { padding-left: 20px; }
.vb-table-card .vb-table th:last-child,
.vb-table-card .vb-table td:last-child  { padding-right: 20px; }

/* Row hover — subtle indigo tint */
.vb-table tbody tr:hover { background: rgba(99,102,241,.04); }
[data-theme="dark"] .vb-table tbody tr:hover { background: rgba(99,102,241,.08); }

/* vb-btn-sm tighter */
.vb-btn-sm { padding: 4px 10px; font-size: 12.5px; height: 30px; }

/* Search input focus ring */
.vb-search-input:focus {
  outline: none;
  border-color: var(--vb-brand-400);
  box-shadow: 0 0 0 3px var(--vb-brand-glow);
}

/* Filter row gap */
.vb-filter-row { gap: 8px; }

/* Stat strip — cashbook summary */
.vb-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.vb-stat-strip-item {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-md);
  padding: 12px 16px;
}
.vb-stat-strip-item .label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--vb-text-muted); margin-bottom: 4px;
}
.vb-stat-strip-item .value {
  font-size: 20px; font-weight: 700;
  letter-spacing: -.5px; line-height: 1;
}

/* font-mono utility */
.font-mono { font-family: var(--vb-font-mono); }
.fw-600 { font-weight: 600; }
.text-right { text-align: right; }
.text-muted { color: var(--vb-text-muted); }
.text-sm { font-size: 12.5px; }
.text-success { color: var(--vb-success); }
.text-danger  { color: var(--vb-danger);  }
.text-warning { color: var(--vb-warning); }

/* ════════════════════════════════════════════════════════════
   LISTING PAGE FINAL POLISH
════════════════════════════════════════════════════════════ */

/* Party name — bold in listing */
.vb-table td.party-name { font-weight: 500; color: var(--vb-text); }

/* Invoice/doc number — monospace */
.vb-table td.doc-no {
  font-family: var(--vb-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--vb-brand-500);
  letter-spacing: -.2px;
}

/* Amount — tabular nums */
.vb-table td.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.3px;
  text-align: right;
}
.vb-table td.amount.receivable { color: var(--vb-danger); }
.vb-table td.amount.paid       { color: var(--vb-success); }

/* Empty state — better */
.vb-empty-state {
  text-align: center;
  padding: 56px 24px;
}
.vb-empty-state .empty-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--vb-surface-2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
  color: var(--vb-text-muted);
}
.vb-empty-state .empty-title {
  font-size: 15px; font-weight: 600;
  color: var(--vb-text); margin-bottom: 6px;
}
.vb-empty-state .empty-sub {
  font-size: 13.5px; color: var(--vb-text-muted);
  margin-bottom: 18px;
}

/* Table row — hover highlight stronger */
.vb-table tbody tr:hover { background: var(--vb-surface-2); }
[data-theme="dark"] .vb-table tbody tr:hover { background: rgba(255,255,255,.04); }

/* Table last row — no border */
.vb-table tbody tr:last-child td { border-bottom: none; }

/* Compact filter label */
.filter-label {
  font-size: 11.5px; font-weight: 500;
  color: var(--vb-text-muted);
  white-space: nowrap;
}

/* vb-table-card — clean wrapper */
.vb-table-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-lg);
  box-shadow: var(--vb-sh-sm);
  overflow: hidden;
}
.vb-table-card .vb-table th:first-child,
.vb-table-card .vb-table td:first-child { padding-left: 20px; }
.vb-table-card .vb-table th:last-child,
.vb-table-card .vb-table td:last-child  { padding-right: 20px; }

/* Page head icon size consistent */
.vb-page-head-title i.page-icon {
  font-size: 20px;
  vertical-align: -3px;
  margin-right: 8px;
  color: var(--vb-brand-500);
}

/* Status badge — dot style alternative */
.status-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 500;
}
.status-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.paid::before    { background: var(--vb-success); }
.status-dot.unpaid::before  { background: var(--vb-danger); }
.status-dot.partial::before { background: var(--vb-warning); }

/* Muted text helper */
.text-muted { color: var(--vb-text-muted); }
.text-sm    { font-size: 12.5px; }
.fw-600     { font-weight: 600; }
.text-right { text-align: right; }
.text-center{ text-align: center; }

/* ── Form submit loading state ─────────────────────────── */
.vb-btn.loading {
  opacity: .7;
  pointer-events: none;
  cursor: not-allowed;
  position: relative;
}
.vb-btn.loading .btn-text { opacity: 0; }
.vb-btn.loading::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
}
.vb-btn-outline.loading::after {
  border-color: rgba(99,102,241,.25);
  border-top-color: var(--vb-brand-500);
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ── Breadcrumb back nav ────────────────────────────────── */
.vb-breadcrumb { margin-bottom: 14px; }
.vb-breadcrumb-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500;
  color: var(--vb-text-muted);
  padding: 6px 10px 6px 6px;
  border-radius: var(--vb-r-sm);
  transition: background var(--vb-transition), color var(--vb-transition);
  text-decoration: none;
}
.vb-breadcrumb-back i { font-size: 16px; transition: transform var(--vb-transition); }
.vb-breadcrumb-back:hover {
  background: var(--vb-surface-2);
  color: var(--vb-brand-500);
}
.vb-breadcrumb-back:hover i { transform: translateX(-3px); }

/* ── Quick action cards — Dashboard ─────────────────────── */
.vb-quick-action {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 12px;
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-lg);
  box-shadow: var(--vb-sh-xs);
  text-decoration: none; cursor: pointer;
  transition: all var(--vb-transition);
  text-align: center;
}
.vb-quick-action span {
  font-size: 12.5px; font-weight: 600;
  color: var(--vb-text); white-space: nowrap;
}
.vb-quick-action:hover {
  border-color: var(--vb-brand-500);
  box-shadow: 0 4px 16px rgba(99,102,241,.15);
  transform: translateY(-2px);
}
.vb-quick-action:hover span { color: var(--vb-brand-500); }

/* ── GSTIN input validation ─────────────────────────────── */
input.gstin-input:valid   { border-color: var(--vb-success); }
input.gstin-input:invalid { border-color: var(--vb-danger); }
input.gstin-input:placeholder-shown { border-color: var(--vb-border); }

/* ════════════════════════════════════════════════════════════
   LIST PAGE TOP — Premium redesign
════════════════════════════════════════════════════════════ */

/* Page head — bordered bottom, icon box */
.vb-page-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--vb-border);
  margin-bottom: 18px;
}
.vb-page-head-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vb-page-head-title i {
  width: 36px; height: 36px;
  background: var(--vb-brand-50);
  border: 1px solid rgba(99,102,241,.15);
  border-radius: var(--vb-r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--vb-brand-500);
  flex-shrink: 0;
  vertical-align: unset;
  margin-right: 0;
}
[data-theme="dark"] .vb-page-head-title i {
  background: rgba(99,102,241,.12);
  border-color: rgba(129,140,248,.2);
}
.vb-page-head-sub {
  font-size: 13px;
  color: var(--vb-text-muted);
  margin-top: 4px;
}

/* Filter row — unified toolbar */
.vb-filter-row {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-md);
  padding: 6px 8px;
  box-shadow: var(--vb-sh-xs);
  margin-bottom: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
@media (max-width: 600px) { .vb-filter-row { flex-wrap: wrap; } }

/* Inputs inside filter row — borderless, seamless */
.vb-filter-row .vb-search-input,
.vb-filter-row .vb-input,
.vb-filter-row .vb-select {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 34px;
  outline: none;
}
.vb-filter-row .vb-search-wrap {
  border-right: 1px solid var(--vb-border);
}
.vb-filter-row .vb-input {
  border-right: 1px solid var(--vb-border) !important;
}
.vb-filter-row .vb-select {
  border-left: 1px solid var(--vb-border) !important;
}
.vb-filter-row .vb-search-input:focus,
.vb-filter-row .vb-input:focus,
.vb-filter-row .vb-select:focus {
  background: var(--vb-surface-2) !important;
}

/* Filter row submit button */
.vb-filter-row .vb-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Report page KPI strip — matches dashboard ───────────── */
.rpt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .rpt-kpi-strip { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .rpt-kpi-strip { grid-template-columns: 1fr 1fr; } }

/* ── KPI Strip — Dashboard & Reports (global) ────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--vb-sh-xs);
  transition: box-shadow .18s, transform .18s;
}
.kpi:hover { box-shadow: var(--vb-sh-sm); transform: translateY(-1px); }
.kpi-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.kpi-body { min-width: 0; flex: 1; }
.kpi-lbl {
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--vb-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-val {
  font-size: 18px; font-weight: 700;
  letter-spacing: -.4px; line-height: 1.2;
  color: var(--vb-text);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-sub {
  font-size: 12px;
  color: var(--vb-text-muted);
  margin-top: 2px;
}
/* Dot colors */
.dot-blue  { background: #6366F1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.dot-amber { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.dot-green { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.dot-red   { background: #F43F5E; box-shadow: 0 0 0 3px rgba(244,63,94,.15);  }
.dot-sky   { background: #0EA5E9; box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
/* Responsive */
@media (max-width: 900px) { .kpi-strip { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) { .kpi-strip { grid-template-columns: 1fr 1fr; } }
