/* ==========================================================================
   GSTrio — Design System
   Loaded after Bootstrap CDN — overrides via CSS custom properties
   ========================================================================== */

/* ── 1. Brand & semantic tokens ─────────────────────────────────────────── */
:root {
  /* Brand palette */
  --color-brand-navy:     #1B2F5E;
  --color-brand-saffron:  #E8781A;
  --color-brand-green:    #16803C;

  /* Surfaces */
  --color-surface:        #F4F6FB;
  --color-surface-card:   #FFFFFF;
  --color-border:         #E2E7F1;

  /* Text */
  --color-text-primary:   #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted:     #9CA3AF;

  /* Semantic */
  --color-danger:         #DC2626;
  --color-warning:        #D97706;
  --color-info:           #2563EB;
  --color-success:        #16803C;

  /* Sidebar */
  --sidebar-bg:           #0F1E3E;
  --sidebar-text:         #8FA3C8;
  --sidebar-active-bg:    #1B2F5E;
  --sidebar-hover-bg:     rgba(255,255,255,0.07);

  /* Typography */
  --font-family-base:     'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-xs:         11px;
  --font-size-sm:         12.5px;
  --font-size-base:       14px;
  --font-size-md:         15px;
  --font-size-lg:         17px;
  --font-size-xl:         20px;
  --font-size-stat:       32px;
  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;
  --font-weight-extrabold:800;

  /* Shape & shadow */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
}

/* ── 2. Bootstrap `:root` overrides ─────────────────────────────────────── */
:root {
  --bs-primary:                  var(--color-brand-navy);
  --bs-primary-rgb:              27, 47, 94;
  --bs-primary-text-emphasis:    #0d1e3a;
  --bs-primary-bg-subtle:        #e8edf7;
  --bs-primary-border-subtle:    #c0ccdf;

  --bs-success:                  var(--color-brand-green);
  --bs-success-rgb:              22, 128, 60;
  --bs-success-bg-subtle:        #dcfce7;
  --bs-success-border-subtle:    #86efac;
  --bs-success-text-emphasis:    #14532d;

  --bs-warning:                  var(--color-brand-saffron);
  --bs-warning-rgb:              232, 120, 26;
  --bs-warning-bg-subtle:        #fff3e0;
  --bs-warning-border-subtle:    #ffcc80;

  --bs-body-font-family:         var(--font-family-base);
  --bs-body-font-size:           var(--font-size-base);
  --bs-body-color:               var(--color-text-primary);
  --bs-body-bg:                  var(--color-surface);

  --bs-border-radius:            var(--radius-md);
  --bs-border-radius-sm:         var(--radius-sm);
  --bs-border-radius-lg:         var(--radius-lg);
  --bs-border-radius-xl:         var(--radius-xl);

  --bs-link-color:               var(--color-brand-navy);
  --bs-link-color-rgb:           27, 47, 94;
  --bs-link-hover-color:         var(--color-brand-saffron);
  --bs-link-hover-color-rgb:     232, 120, 26;

  --bs-card-border-color:        var(--color-border);
  --bs-card-border-radius:       var(--radius-lg);
  --bs-card-box-shadow:          var(--shadow-sm);
  --bs-card-cap-bg:              var(--color-surface);

  --bs-modal-border-radius:      var(--radius-xl);
  --bs-modal-box-shadow:         var(--shadow-lg);
  --bs-modal-header-bg:          var(--color-surface);
}

/* ── 3. Base / reset ────────────────────────────────────────────────────── */
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 4. Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  width: 248px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.05);
}

/* Brand area */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
}

.sidebar-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--color-brand-saffron);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  flex-shrink: 0;
}

.sidebar-product-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sidebar-tagline {
  display: block;
  font-size: 10px;
  color: var(--sidebar-text);
  letter-spacing: .4px;
}

/* Plan badge */
.sidebar-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(232,120,26,.15);
  border: 1px solid rgba(232,120,26,.3);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: #FFA94D;
  margin: 10px 18px 4px;
  width: fit-content;
}

/* Nav list */
.sidebar-nav {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}

.sidebar-link:hover {
  background: var(--sidebar-hover-bg);
  color: #fff;
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: #fff;
  border-left-color: var(--color-brand-saffron);
  font-weight: 600;
}

.sidebar-link i {
  font-size: 15px;
  width: 18px;
  flex-shrink: 0;
  text-align: center;
}

/* Setup warning link */
.sidebar-link.setup-warning {
  color: #FCD34D;
  background: rgba(252,211,77,.07);
}
.sidebar-link.setup-warning:hover {
  background: rgba(252,211,77,.14);
  color: #FEF08A;
}

/* Footer */
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--sidebar-text);
  margin-top: 1px;
  margin-bottom: 10px;
  text-transform: capitalize;
}

.btn-sidebar-logout {
  width: 100%;
  padding: 6px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-family-base);
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-sidebar-logout:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* ── 5. Mobile topbar & drawer ───────────────────────────────────────────── */
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-brand-navy);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}

.sidebar-backdrop.show { display: block; }

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    padding: 20px 16px !important;
  }
}

/* ── 6. Main content area ───────────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 36px;
  background: var(--color-surface);
}

/* Page header pattern */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.3;
}

.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 2px 0 0;
}

/* ── 7. Cards ───────────────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface-card);
}

.card-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 20px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

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

/* Stat card — dashboard */
.stat-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-card);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-accent-color, var(--color-brand-navy));
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--stat-icon-bg, #E8EDF7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--stat-accent-color, var(--color-brand-navy));
  margin-bottom: 14px;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: var(--font-size-stat);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.stat-card .stat-sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* Report card */
.report-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.report-card.locked {
  opacity: .55;
  pointer-events: none;
  cursor: not-allowed;
}

/* Period colors via data attribute */
.report-card[data-period-color="monthly"]   { border-left: 3px solid var(--color-brand-green); }
.report-card[data-period-color="quarterly"] { border-left: 3px solid var(--color-info); }
.report-card[data-period-color="annual"]    { border-left: 3px solid var(--color-brand-saffron); }
.report-card[data-period-color="one-time"]  { border-left: 3px solid var(--color-danger); }
.report-card[data-period-color="qrmp"]      { border-left: 3px solid #7C3AED; }

/* Pricing card — billing/plans */
.pricing-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  background: var(--color-surface-card);
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
  border: 2px solid var(--color-brand-navy);
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(27,47,94,.06);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-brand-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: .5px;
  white-space: nowrap;
}

.plan-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -1.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plan-price .currency {
  font-size: 22px;
  font-weight: 600;
  vertical-align: super;
  letter-spacing: 0;
}

.plan-price .period {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0;
}

/* ── 8. Buttons ─────────────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-md);
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-medium);
  letter-spacing: .01em;
}

.btn-primary {
  --bs-btn-bg:            var(--color-brand-navy);
  --bs-btn-border-color:  var(--color-brand-navy);
  --bs-btn-hover-bg:      #152448;
  --bs-btn-hover-border-color: #152448;
  --bs-btn-active-bg:     #0e1930;
  --bs-btn-color:         #fff;
  --bs-btn-hover-color:   #fff;
  --bs-btn-active-color:  #fff;
}

/* CTA variant — saffron, for upgrades and wizard CTAs */
.btn-cta {
  background: var(--color-brand-saffron);
  border-color: var(--color-brand-saffron);
  color: #fff;
  font-weight: var(--font-weight-semibold);
  transition: background .15s, border-color .15s;
}
.btn-cta:hover {
  background: #c96512;
  border-color: #c96512;
  color: #fff;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── 9. Badges ──────────────────────────────────────────────────────────── */
/* Invoice type */
.badge-invoice-regular {
  background: #EFF6FF;
  color: var(--color-brand-navy);
  border: 1px solid #BFDBFE;
  font-weight: 600;
}
.badge-invoice-credit {
  background: #F5F3FF;
  color: #5B21B6;
  border: 1px solid #DDD6FE;
  font-weight: 600;
}
.badge-invoice-debit {
  background: #F0F9FF;
  color: #0369A1;
  border: 1px solid #BAE6FD;
  font-weight: 600;
}

/* Report period */
.badge-period {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .2px;
}
.badge-monthly   { background: #DCFCE7; color: #166534; }
.badge-quarterly { background: #DBEAFE; color: #1E40AF; }
.badge-annual    { background: #FEF3C7; color: #92400E; }
.badge-one-time  { background: #FEE2E2; color: #991B1B; }
.badge-qrmp      { background: #EDE9FE; color: #5B21B6; }

/* Plan display */
.badge-plan-trial    { background: rgba(232,120,26,.15); border: 1px solid rgba(232,120,26,.3); color: #C96512; }
.badge-plan-starter  { background: #EFF6FF; border: 1px solid #BFDBFE; color: var(--color-brand-navy); }
.badge-plan-pro      { background: #F5F3FF; border: 1px solid #DDD6FE; color: #5B21B6; }

/* ── 10. Tables ─────────────────────────────────────────────────────────── */
.table-app thead th {
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  vertical-align: middle;
}

.table-app tbody td {
  padding: 13px 16px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
}

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

.table-app tbody tr:hover td {
  background: #F8F9FF;
}

/* Invoice number — monospace, navy */
.table-app .inv-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-brand-navy);
  letter-spacing: .3px;
}

/* Amount cells */
.table-app .amount-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
  color: var(--color-text-primary);
}

/* ── 11. Forms ──────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background-color: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-brand-navy);
  box-shadow: 0 0 0 3px rgba(27,47,94,.12);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: 5px;
}

.form-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Section heading inside forms */
.form-section-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding-top: 4px;
}

.input-group-text {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

/* Invoice number preview chip */
.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 20px;
}
.preview-chip .preview-value {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  color: var(--color-brand-navy);
}

/* Org settings — registration type option rows */
.reg-type-option {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  margin-bottom: 8px;
  transition: border-color .15s, background .15s;
}

.reg-type-option:has(input:checked) {
  border-color: var(--color-brand-navy);
  background: #F0F4FC;
}

/* ── 12. Modals ─────────────────────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 24px 16px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  gap: 8px;
}

/* ── 13. Alerts ─────────────────────────────────────────────────────────── */
/* Trial countdown banner */
.alert-trial {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid var(--color-brand-saffron);
  border-radius: var(--radius-md);
  color: #92400E;
}

/* Upgrade prompt (replaces alert-warning on locked pages) */
.alert-upgrade {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  color: #1E40AF;
}

/* ── 14. Usage / progress bars ──────────────────────────────────────────── */
.usage-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}

.usage-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--color-brand-navy);
  transition: width .4s ease;
}

.usage-bar-fill.usage-warning { background: var(--color-brand-saffron); }
.usage-bar-fill.usage-danger  { background: var(--color-danger); }

/* ── 15. Empty states ───────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 26px;
  color: var(--color-text-muted);
}

.empty-state-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

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

/* ── 16. Loading states ─────────────────────────────────────────────────── */
.spinner-border-sm {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

/* ── 17. Setup wizard stepper ───────────────────────────────────────────── */
.wizard-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  align-items: center;
  flex: 1;
}

.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}

.wizard-step-circle.done     { background: var(--color-brand-green); color: #fff; }
.wizard-step-circle.current  { background: var(--color-brand-navy);  color: #fff; box-shadow: 0 0 0 3px rgba(27,47,94,.2); }
.wizard-step-circle.upcoming { background: var(--color-border);      color: var(--color-text-muted); }

.wizard-step-label {
  font-size: 12px;
  margin-left: 8px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.wizard-step-label.current {
  font-weight: 600;
  color: var(--color-text-primary);
}

.wizard-step-connector {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 8px;
  min-width: 20px;
}

.wizard-step-connector.done {
  background: var(--color-brand-green);
}

/* ── 18. Auth pages ─────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--color-surface);
  display: flex;
}

.auth-brand-panel {
  width: 440px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 52px;
}

.auth-brand-panel .brand-mark {
  width: 44px;
  height: 44px;
  background: var(--color-brand-saffron);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
}

.auth-brand-panel .brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.auth-brand-panel .brand-tagline {
  font-size: 14px;
  color: var(--sidebar-text);
  line-height: 1.6;
  margin-bottom: 40px;
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--sidebar-text);
  font-size: 13px;
}

.auth-trust-item i {
  font-size: 16px;
  color: var(--color-brand-saffron);
  width: 20px;
  flex-shrink: 0;
}

@media (max-width: 991.98px) {
  .auth-brand-panel { display: none; }
}

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 36px 40px;
  border: 1px solid var(--color-border);
}

.auth-card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.auth-card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.auth-trust-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.auth-trust-bar span {
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-trust-bar i {
  font-size: 12px;
  color: var(--color-brand-green);
}

/* ── 19. Report output panel ─────────────────────────────────────────────── */
.report-output-panel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  margin-top: 20px;
}

.report-output-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.report-output-toolbar-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.report-output-pre {
  background: #0F1E3E;
  color: #C8D8F4;
  font-size: 12px;
  padding: 20px;
  max-height: 420px;
  overflow: auto;
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── 20. Section labels ──────────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

/* ── 21. Plan tier display (billing/subscription) ───────────────────────── */
.plan-tier-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.plan-tier-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.plan-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-green);
  flex-shrink: 0;
}

.plan-status-dot.inactive {
  background: var(--color-text-muted);
}

/* ── 22. Member avatar initials ─────────────────────────────────────────── */
.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .5px;
}

/* ── 23. Segmented control (billing plan toggle) ─────────────────────────── */
.billing-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--color-surface);
}

.billing-toggle-btn {
  padding: 8px 20px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-family-base);
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.billing-toggle-btn.active {
  background: var(--color-brand-navy);
  color: #fff;
}

/* ── 24. Utility overrides ───────────────────────────────────────────────── */
/* Monospace for GSTIN, PAN, API keys */
.font-mono {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  letter-spacing: .3px;
}

/* Text color helpers matching brand */
.text-brand-navy    { color: var(--color-brand-navy) !important; }
.text-brand-saffron { color: var(--color-brand-saffron) !important; }
.text-brand-green   { color: var(--color-brand-green) !important; }
