/* ============================================================
   GST Billing App — Global Design System (app.css)
   Mobile-first | Bootstrap 5 augmented
   ============================================================ */

/* --- Google Font ------------------------------------------ */
/* Import Inter font for a professional, clean typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS Custom Properties -------------------------------- */
/* Define global CSS variables for consistent theming and easy maintenance */
:root {
  /* Brand colors */
  --primary:        #4f46e5;
  --primary-dark:   #3730a3;
  --primary-light:  #818cf8;
  
  /* Status colors */
  --success:        #10b981;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #3b82f6;

  /* Background and Surface colors (Light Mode Default) */
  --bg:             #f8fafc;
  --surface:        #ffffff;
  --surface-2:      #f1f5f9;
  --border:         #e2e8f0;
  
  /* Typography colors */
  --text:           #1e293b;
  --muted:          #64748b;
  --heading:        #0f172a;

  /* Border radius settings */
  --radius-sm:      8px;
  --radius:         12px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  /* Shadows for depth and elevation */
  --shadow-sm:      0 2px 4px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
  --shadow:         0 10px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  --shadow-lg:      0 20px 40px -10px rgba(0,0,0,.15);

  /* Layout dimensions */
  --navbar-h:       72px;
  --sidebar-w:      260px;
}

/* Dark mode overrides (Activated via Bootstrap data-bs-theme="dark") */
[data-bs-theme="dark"] {
  --bg:        #09090b;
  --surface:   #18181b;
  --surface-2: #27272a;
  --border:    #27272a;
  --text:      #e4e4e7;
  --muted:     #a1a1aa;
  --heading:   #fafafa;
}

/* --- Reset & Base ----------------------------------------- */
/* Ensure all elements use border-box sizing */
*, *::before, *::after { box-sizing: border-box; }

/* Enable smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Base body styling */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings base styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--heading);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* Global anchor links */
a { color: var(--primary); transition: color .2s ease; }
a:hover { color: var(--primary-dark); text-decoration: none; }

/* --- Navbar ----------------------------------------------- */
/* Main top navigation bar */
.app-navbar {
  height: var(--navbar-h);
  background: rgba(255, 255, 255, 0.85); /* Glassmorphism effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0 1.5rem;
  transition: all 0.3s ease;
}

/* Dark mode navbar glassmorphism */
[data-bs-theme="dark"] .app-navbar {
  background: rgba(24, 24, 27, 0.85);
  border-bottom-color: var(--border);
}

/* Navbar branding/logo area */
.app-navbar .navbar-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-navbar .navbar-brand:hover { color: var(--primary-dark); }

/* Icon inside navbar brand */
.app-navbar .brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* Navigation links */
.app-navbar .nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: all .2s ease;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: var(--primary);
  background: rgba(79, 70, 229, .08);
}

/* Outline button variant in navbar */
.btn-nav-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-nav-outline:hover {
  background: var(--surface-2);
  color: var(--heading);
  border-color: var(--muted);
}

/* Primary button variant in navbar */
.btn-nav-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
.btn-nav-primary:hover { 
  background: var(--primary-dark); 
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79,70,229,0.35);
}

/* Theme toggle button */
.btn-theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  flex-shrink: 0;
}
.btn-theme-toggle:hover { 
  background: var(--surface-2); 
  color: var(--text); 
}

/* --- Page Wrapper ----------------------------------------- */
/* Ensures content fills screen excluding navbar height */
.page-wrapper {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  flex-direction: column;
}

/* --- Auth Layout (Login/Register) ------------------------- */
/* Full screen auth background */
.auth-layout {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
}

/* Card containing auth form */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,.03); /* Glass effect */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: 0 32px 64px rgba(0,0,0,.5);
  animation: fadeUp .5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Auth card icon */
.auth-card .auth-brand-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  margin: 0 auto 1.5rem;
  box-shadow: 0 12px 28px rgba(79,70,229,.4);
}

/* Auth headings */
.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fafafa;
  text-align: center;
  margin-bottom: .25rem;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: #a1a1aa;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Auth form labels */
.auth-card .form-label {
  color: #d4d4d8;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Auth inputs */
.auth-card .form-control,
.auth-card .input-group-text {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  color: #fafafa !important;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.auth-card .form-control { border-radius: var(--radius-sm) !important; }
.auth-card .form-control::placeholder { color: #52525b !important; }
.auth-card .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(79,70,229,.2) !important;
  background: rgba(255,255,255,.08) !important;
}

/* Addon grouping for auth */
.auth-card .input-group .input-group-text {
  border-right: none !important;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  color: #a1a1aa !important;
}
.auth-card .input-group .form-control {
  border-left: none !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* Auth submit button */
.btn-auth {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 8px 24px rgba(79,70,229,.4);
  margin-top: 1rem;
}
.btn-auth:hover { 
  opacity: .95; 
  transform: translateY(-2px); 
  box-shadow: 0 12px 32px rgba(79,70,229,.5);
}
.btn-auth:active { transform: scale(.98); }

/* Divider line OR */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.75rem 0; color: #52525b; font-size: .85rem; font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,.1);
}

/* Links below auth */
.auth-links {
  display: flex; justify-content: space-between;
  margin-top: 1.5rem; font-size: .9rem;
}
.auth-links a { color: #818cf8; text-decoration: none; font-weight: 500; transition: color .2s ease; }
.auth-links a:hover { color: #fff; text-decoration: none; }

/* --- App Page Layout (Dashboard sidebar layout) ------------ */
/* Wrapper for sidebar + main content */
.app-body {
  display: flex;
  min-height: calc(100vh - var(--navbar-h));
}

/* Sidebar navigation */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  padding: 1.5rem 1rem;
  display: none; /* Hidden on mobile by default */
  flex-direction: column;
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
  transition: width 0.3s ease;
}

@media (min-width: 768px) {
  .app-sidebar { display: flex; }
}

/* Label above sidebar link groups */
.sidebar-section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .75rem 1rem .5rem;
  margin-top: 1rem;
}

/* Sidebar links */
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s ease;
  margin-bottom: 4px;
}
.sidebar-nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-nav-link:hover,
.sidebar-nav-link.active {
  color: var(--primary);
  background: rgba(79,70,229,.1);
}
.sidebar-nav-link.active { font-weight: 600; }

/* Danger/Logout sidebar link */
.sidebar-nav-link.danger:hover { color: var(--danger); background: rgba(239,68,68,.1); }

/* Main content area */
.app-main {
  flex: 1;
  padding: 2rem 1.5rem;
  min-width: 0; /* Prevents flex blowout */
  overflow-x: hidden;
  background: var(--bg);
}

@media (min-width: 768px) {
  .app-main { padding: 2.5rem 3rem; }
}

/* Mobile sidebar toggle button */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}
.sidebar-toggle-btn:hover { background: var(--surface-2); }
@media (min-width: 768px) { .sidebar-toggle-btn { display: none; } }

/* --- Cards (Main UI Containers) --------------------------- */
/* Base card style */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

/* Card header section */
.app-card-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02); /* Slight contrast */
}

/* Card header typography */
.app-card-header h2,
.app-card-header h3,
.app-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Icon in card header */
.app-card-header .card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

/* Card body content */
.app-card-body { padding: 2rem; }

/* Dashboard statistics cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s ease, transform .3s ease;
  cursor: default;
}
.stat-card:hover { 
  box-shadow: var(--shadow); 
  transform: translateY(-4px); 
  border-color: var(--primary-light);
}

/* Icon for stat card */
.stat-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
/* Stat icon colors */
.stat-icon.indigo  { background: rgba(79,70,229,.15);  color: var(--primary); }
.stat-icon.green   { background: rgba(16,185,129,.15);  color: var(--success); }
.stat-icon.amber   { background: rgba(245,158,11,.15);  color: var(--warning); }
.stat-icon.blue    { background: rgba(59,130,246,.15);  color: var(--info); }
.stat-icon.red     { background: rgba(239,68,68,.15);   color: var(--danger); }

/* Stat text content */
.stat-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--heading); line-height: 1; }

/* --- Page Header ------------------------------------------ */
/* Dashboard section titles */
.page-header {
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 .5rem;
  color: var(--heading);
  letter-spacing: -0.02em;
}
@media (min-width: 768px) { .page-header h1 { font-size: 2rem; } }

.page-header .page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

/* Action buttons on the right of header */
.page-header-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
@media (min-width: 576px) {
  .page-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
  .page-header-actions { margin-top: 0; }
}

/* --- Buttons ---------------------------------------------- */
/* Primary action button */
.btn-primary-app {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  border: none;
  padding: .65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
.btn-primary-app:hover { 
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; 
  transform: translateY(-2px); 
  box-shadow: 0 6px 16px rgba(79,70,229,0.35);
}
.btn-primary-app:active { transform: scale(.98); }
.btn-primary-app.lg { padding: .85rem 1.75rem; font-size: 1.1rem; border-radius: var(--radius); }

/* Secondary action button (outline style) */
.btn-secondary-app {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: .65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}
.btn-secondary-app:hover { 
  background: var(--border); 
  color: var(--heading); 
}

/* Danger action button */
.btn-danger-app {
  background: rgba(239,68,68,.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.2);
  padding: .65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-danger-app:hover { 
  background: var(--danger); 
  color: #fff; 
  border-color: var(--danger); 
  box-shadow: 0 4px 12px rgba(239,68,68,.3);
}

/* --- Forms ------------------------------------------------ */
/* Form input labels */
.app-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: .5rem;
  letter-spacing: .02em;
}

/* Form input fields */
.app-form-control {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all .2s ease;
}
.app-form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,.15);
}
.app-form-control::placeholder { color: var(--muted); }

/* Textareas */
textarea.app-form-control { resize: vertical; min-height: 120px; }

/* Select fields */
select.app-form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

/* --- Alerts (Notifications/Feedback) ---------------------- */
/* Base alert styling */
.alert-app {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.5rem;
  animation: slideIn .3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Alert Variants */
.alert-app.success { background: rgba(16,185,129,.1);  color: #065f46; border: 1px solid rgba(16,185,129,.3); }
.alert-app.error   { background: rgba(239,68,68,.1);   color: #991b1b; border: 1px solid rgba(239,68,68,.3); }
.alert-app.info    { background: rgba(59,130,246,.1);  color: #1e40af; border: 1px solid rgba(59,130,246,.3); }
.alert-app.warning { background: rgba(245,158,11,.1);  color: #92400e; border: 1px solid rgba(245,158,11,.3); }

/* Dark mode alerts */
[data-bs-theme="dark"] .alert-app.success { color: #6ee7b7; border-color: rgba(16,185,129,.2); }
[data-bs-theme="dark"] .alert-app.error   { color: #fca5a5; border-color: rgba(239,68,68,.2); }
[data-bs-theme="dark"] .alert-app.info    { color: #93c5fd; border-color: rgba(59,130,246,.2); }
[data-bs-theme="dark"] .alert-app.warning { color: #fcd34d; border-color: rgba(245,158,11,.2); }

/* --- Tables (Data Grids) ---------------------------------- */
/* Core table component */
.app-table {
  width: 100%;
  border-collapse: separate; /* Allows border radius */
  border-spacing: 0;
  font-size: 0.95rem;
}

/* Table Header */
.app-table thead th {
  background: var(--surface-2);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

/* Table Body Cells */
.app-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.app-table tbody tr:last-child td { border-bottom: none; }
.app-table tbody tr:hover td { background: var(--surface-2); transition: background 0.2s; }

/* Responsive table container */
.table-responsive-app { 
  overflow-x: auto; 
  border-radius: var(--radius-lg); 
  border: 1px solid var(--border); 
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* --- Badges (Tags/Status) --------------------------------- */
.badge-app {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-app.green  { background: rgba(16,185,129,.15);  color: var(--success); }
.badge-app.red    { background: rgba(239,68,68,.15);   color: var(--danger); }
.badge-app.amber  { background: rgba(245,158,11,.15);  color: var(--warning); }
.badge-app.indigo { background: rgba(79,70,229,.15);   color: var(--primary); }

/* --- Quick Action Cards ----------------------------------- */
.quick-action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all .3s ease;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.quick-action-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: var(--primary);
  color: var(--text);
}
.quick-action-card .qa-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.quick-action-card .qa-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
}
.quick-action-card .qa-desc {
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- Hero (Public Pages Landing) -------------------------- */
.hero-section {
  background: linear-gradient(135deg, #09090b 0%, #1e1b4b 50%, #312e81 100%);
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Hero section decorative badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9999px;
  padding: .4rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Hero Typography */
.hero-section h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}
.hero-section h1 span {
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p.lead {
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  line-height: 1.8;
}

/* Hero Call-to-Actions */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 480px) {
  .hero-cta-group { flex-direction: row; justify-content: center; }
}

/* --- Feature Grid (Public Pages) -------------------------- */
.features-section { padding: 6rem 1.5rem; background: var(--bg); }
.features-section .section-label {
  font-size: 0.85rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--primary); margin-bottom: 1rem;
}
.features-section h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800; margin-bottom: 1.5rem; color: var(--heading);
  line-height: 1.2;
}
.features-section p.sub { color: var(--muted); max-width: 520px; font-size: 1.1rem; line-height: 1.8; }

/* Individual Feature Card */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  height: 100%;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { 
  box-shadow: var(--shadow-lg); 
  transform: translateY(-6px); 
  border-color: var(--primary-light);
}

/* Feature icon wrapper */
.feature-card .fc-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.feature-card h4 {
  font-size: 1.1rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--heading);
}
.feature-card p { font-size: 0.95rem; color: var(--muted); margin: 0; line-height: 1.7; }

/* --- Footer (Public Pages) -------------------------------- */
.app-footer {
  background: #09090b; /* Deep dark for professional contrast */
  color: #a1a1aa;
  padding: 4rem 1.5rem 2rem;
  font-size: 0.95rem;
}
.app-footer .footer-brand {
  font-weight: 800;
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.app-footer .footer-brand i { color: var(--primary-light); }
.app-footer a {
  color: #a1a1aa;
  text-decoration: none;
  transition: color .2s ease;
}
.app-footer a:hover { color: #fff; }

.footer-divider {
  border: none;
  border-top: 1px solid #27272a;
  margin: 2rem 0 1.5rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.footer-links a { font-size: 0.9rem; font-weight: 500; }
.footer-copyright { font-size: 0.85rem; color: #52525b; }

/* Ads block placeholder */
.ads-block {
  width: 100%;
  min-height: 80px;
  background: rgba(255,255,255,.02);
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  transition: background .2s ease;
}
.ads-block:hover { background: rgba(255,255,255,.04); }

/* Subscription Pricing Badge */
.pricing-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* --- Helper Utilities ------------------------------------- */
.text-muted-app { color: var(--muted); }
.text-heading   { color: var(--heading); }
.border-app     { border-color: var(--border) !important; }
.bg-surface     { background: var(--surface); }
.bg-surface-2   { background: var(--surface-2); }
.rounded-app    { border-radius: var(--radius); }
.rounded-app-lg { border-radius: var(--radius-lg); }
.shadow-app     { box-shadow: var(--shadow); }
.shadow-app-sm  { box-shadow: var(--shadow-sm); }

/* Offcanvas Sidebar overrides (Bootstrap mobile drawer) */
.offcanvas.sidebar-offcanvas .offcanvas-body {
  padding: 1.5rem 1rem;
  background: var(--surface);
}
.offcanvas.sidebar-offcanvas .offcanvas-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* Spacing utilities for sections */
.section-gap { padding: 4rem 0; }
@media (min-width: 768px) { .section-gap { padding: 6rem 0; } }

/* Subscription Table Details */
.sub-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.sub-table th, .sub-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); text-align: left; }
.sub-table th { font-weight: 700; color: var(--muted); font-size: 0.85rem; width: 40%; text-transform: uppercase; letter-spacing: 0.05em; }
.sub-table td { color: var(--text); font-weight: 500; }
.sub-table tr:last-child th, .sub-table tr:last-child td { border-bottom: none; }
