/* =========================================================
   BeforeNoon.ai — CSS Design System
   Theme: Calm, premium, noon-sky accent. Minimal. High legibility.
   Notes: Uses CSS variables for easy tuning.
   ========================================================= */

/* ---------- Fonts ----------
   Recommended pairing:
   - UI / body: Inter (clean, modern, readable)
   - Headlines: Fraunces (subtle authority, human warmth)
   Fallbacks included.
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&display=swap');

:root {
  /* Font stacks - Inter for body, Fraunces for headlines */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times,
    serif;

  /* ---------- Color Palette ----------
     Core idea:
     - Warm paper background, dark ink text
     - Noon-sky blue as PRIMARY accent (buttons, links, highlights)
     - Soft slate borders and subtle surfaces
  */
  --bg: #fbfaf7;              /* warm paper */
  --surface: #ffffff;         /* cards */
  --surface-2: #f4f6fb;       /* cool mist section */
  --ink: #111827;             /* near-black */
  --muted: #4b5563;           /* gray text */
  --muted-2: #6b7280;         /* lighter gray */
  --border: #e6e7eb;          /* soft border */

  /* Noon Sky Blue */
  --primary: #2d6cdf;         /* noon sky */
  --primary-600: #255bc1;     /* hover */
  --primary-700: #1f4da5;     /* active */
  --primary-050: #eef4ff;     /* tinted background */

  /* Optional secondary accent (warm sun) — use sparingly */
  --sun: #f7c948;             /* sun accent */
  --sun-100: #fff2c2;

  /* Feedback */
  --success: #1f9d55;
  --success-soft: rgba(31, 157, 85, 0.12);
  --warning: #b7791f;
  --warning-soft: rgba(183, 121, 31, 0.12);
  --danger: #c53030;
  --danger-soft: rgba(197, 48, 48, 0.12);
  --info: #2d6cdf;
  --info-soft: rgba(45, 108, 223, 0.12);

  /* ---------- Spacing ----------
     8pt rhythm; keep things roomy.
  */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* ---------- Radius ----------
     Modern but not bubbly.
  */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  /* ---------- Shadows ----------
     Soft, "banking-inspired" polish. Avoid harsh drop shadows.
  */
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 20px rgba(17, 24, 39, 0.10);
  --shadow-lg: 0 18px 50px rgba(17, 24, 39, 0.12);

  /* ---------- Motion ----------
     Calm motion; no bouncy effects.
  */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur-med: 220ms;
}

/* ---------- Global Reset-ish ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  color-scheme: light; /* Force light mode */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: radial-gradient(
      900px 420px at 50% -120px,
      rgba(45, 108, 223, 0.16),
      rgba(45, 108, 223, 0.00) 55%
    ),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-feature-settings: "cv11", "ss01";  /* Inter stylistic alternates */
}

/* ---------- Layout Container ---------- */
.container {
  width: min(1120px, calc(100% - 2 * var(--space-6)));
  margin-inline: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4) 0;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 600;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 2.5vw, 2.5rem);
  line-height: 1.15;
  font-weight: 600;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  line-height: 1.2;
  font-weight: 600;
}

/* Bootstrap .h2 class used on many pages */
.h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
}

h4 {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 600;
}

h5 {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
}

h6 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin: 0 0 var(--space-4) 0;
  color: var(--muted);
  max-width: 68ch;
}

.small {
  font-size: 0.9375rem;
  color: var(--muted-2);
}

/* Emphasized text: understated, not shouty */
strong {
  color: var(--ink);
  font-weight: 650;
}

/* Display numbers - large stats */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  color: var(--ink) !important;
  font-weight: 700;
}

/* ---------- Links ---------- */
a {
  color: var(--primary);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

/* Focus styles (accessible, on-brand) */
:focus-visible {
  outline: 3px solid rgba(45, 108, 223, 0.35);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Navbar - Floating glass header ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(251, 250, 247, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 231, 235, 0.7);
  padding: 0.75rem 0;
  min-height: 64px;
}

.navbar-dark {
  background: rgba(251, 250, 247, 0.72) !important;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
  padding: 0.5rem 0;
}

.navbar-brand::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--sun) 0%, #ffd36a 25%, var(--primary) 70%);
  box-shadow: 0 6px 18px rgba(45, 108, 223, 0.22);
}

.navbar-brand:hover {
  color: var(--primary) !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all var(--dur-fast) var(--ease);
  border-radius: 8px;
  margin: 0 0.125rem;
  font-size: 0.875rem;
}

.navbar-nav .nav-link:hover {
  color: var(--ink) !important;
  background-color: rgba(45, 108, 223, 0.07);
}

.navbar-nav .nav-link.text-muted {
  color: var(--muted-2) !important;
  font-weight: 400;
  font-size: 0.8125rem;
}

.navbar-toggler {
  border-color: var(--border);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(17, 24, 39, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Sidebar - Modern navigation panel ---------- */
.sidebar {
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 1.5rem 0;
  background: var(--surface);
  border-right: 1px solid rgba(230, 231, 235, 0.9);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-sm);
}

.sidebar .nav-link {
  font-weight: 500;
  color: var(--muted);
  padding: 0.75rem 1.25rem;
  margin: 0.125rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease);
  font-size: 0.875rem;
  position: relative;
}

.sidebar .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  transition: transform var(--dur-fast) var(--ease);
}

.sidebar .nav-link:hover {
  color: var(--ink);
  background-color: var(--primary-050);
}

.sidebar .nav-link:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar .nav-link.active {
  color: var(--primary-700);
  background: var(--primary-050);
  font-weight: 600;
}

.sidebar .nav-link.active::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar-heading {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--muted-2);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding: 0 1.25rem;
}

/* ---------- Main content ---------- */
main {
  margin-top: 64px;
  padding: 2rem 0;
  padding-top: 1.5rem;
  min-height: calc(100vh - 64px);
  animation: fadeIn 0.4s var(--ease);
}

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

/* Ensure container-fluid accounts for fixed navbar */
body > .container-fluid {
  padding-top: 64px;
}

/* Reset main margin when inside container that has padding */
body > .container-fluid main {
  margin-top: 0;
}

/* ---------- Cards - Elevated surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(230, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-med) var(--ease);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 108, 223, 0.18);
}

.card-header {
  background: var(--surface-2);
  border-bottom: 1px solid rgba(230, 231, 235, 0.9);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
}

.card-header h5 {
  font-family: var(--font-sans);
  font-weight: 600;
  margin: 0;
}

/* Override dark card headers for light theme */
.card-header.bg-dark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%) !important;
  border-bottom: none;
}

.card-header.bg-dark h5,
.card-header.bg-dark .text-white {
  color: #ffffff !important;
}

.card-header.bg-dark .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.card-header.bg-dark .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--muted);
}

/* Stat cards with accent borders */
.card.border-0.bg-light {
  background: var(--surface) !important;
  border: 1px solid rgba(230, 231, 235, 0.9) !important;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.card.border-0.bg-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--sun));
}

.card.border-0.bg-light .display-5 {
  color: var(--ink) !important;
  font-weight: 700;
}

.card.border-0.bg-light .text-muted {
  color: var(--muted) !important;
}

/* Card stagger animation for dashboard */
.row .card {
  animation: cardSlideIn 0.5s var(--ease) backwards;
}

.row .col-md-3:nth-child(1) .card { animation-delay: 0.05s; }
.row .col-md-3:nth-child(2) .card { animation-delay: 0.1s; }
.row .col-md-3:nth-child(3) .card { animation-delay: 0.15s; }
.row .col-md-3:nth-child(4) .card { animation-delay: 0.2s; }
.row .col-md-4:nth-child(1) .card { animation-delay: 0.1s; }
.row .col-md-4:nth-child(2) .card { animation-delay: 0.15s; }
.row .col-md-4:nth-child(3) .card { animation-delay: 0.2s; }

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

/* ---------- Buttons - Modern with subtle gradients ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 16px;
  border-radius: 999px; /* pill */
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
  user-select: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(180deg, #3a7af0 0%, var(--primary) 70%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(45, 108, 223, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #3272e8 0%, var(--primary-600) 70%);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(45, 108, 223, 0.24);
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0px);
  background: var(--primary-700);
}

.btn-secondary,
.btn-outline-secondary {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
  border-color: rgba(45, 108, 223, 0.25);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.btn-outline-dark {
  border: 1px solid var(--border);
  color: var(--ink);
  background: transparent;
}

.btn-outline-dark:hover {
  background: var(--primary-050);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-dark {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-dark:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #ffffff;
}

.btn-outline-danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}

.btn-outline-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #178a49;
  color: #ffffff;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #a52828;
  color: #ffffff;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* ---------- Tables - Clean data presentation ---------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--primary-050);
  color: var(--ink);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  padding: 1rem 1.5rem;
}

.table tbody td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(230, 231, 235, 0.7);
  color: var(--muted);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--primary-050);
}

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

.table-light {
  --bs-table-bg: var(--surface-2);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: var(--primary-050);
  color: var(--ink);
}

.table-responsive {
  border-radius: var(--radius-md);
}

/* ---------- Forms - Calm, premium inputs ---------- */
.form-label {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.form-control,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.04);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  font-size: 0.9375rem;
}

.form-control:focus,
textarea:focus,
select:focus {
  border-color: rgba(45, 108, 223, 0.45);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.12);
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.form-control::placeholder {
  color: var(--muted-2);
}

.form-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.9375rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.form-select:focus {
  border-color: rgba(45, 108, 223, 0.45);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.12);
}

.form-text {
  font-size: 0.8125rem;
  color: var(--muted-2);
  margin-top: 0.375rem;
}

/* ---------- Alerts - Modern notifications ---------- */
.alert {
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
  font-weight: 500;
  animation: slideIn 0.3s var(--ease);
}

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

.alert-info {
  background-color: var(--info-soft);
  color: var(--info);
  border-color: rgba(45, 108, 223, 0.2);
}

.alert-success {
  background-color: var(--success-soft);
  color: var(--success);
  border-color: rgba(31, 157, 85, 0.2);
}

.alert-warning {
  background-color: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(183, 121, 31, 0.2);
}

.alert-danger {
  background-color: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(197, 48, 48, 0.2);
}

.btn-close {
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 1;
}

/* ---------- Badges - Pill-shaped status indicators ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(230, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.bg-success {
  border-color: rgba(31, 157, 85, 0.18);
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.badge.bg-warning {
  border-color: rgba(183, 121, 31, 0.18);
  background: var(--warning-soft) !important;
  color: var(--warning) !important;
}

.badge.bg-danger {
  border-color: rgba(197, 48, 48, 0.18);
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.badge.bg-info {
  border-color: rgba(45, 108, 223, 0.18);
  background: var(--info-soft) !important;
  color: var(--info) !important;
}

.badge.bg-secondary {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
}

.badge.bg-primary {
  border-color: rgba(45, 108, 223, 0.18);
  background: rgba(45, 108, 223, 0.08) !important;
  color: var(--primary-700) !important;
}

/* ---------- Code blocks ---------- */
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background-color: var(--surface-2);
  color: var(--primary-700);
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8125em;
  border: 1px solid rgba(230, 231, 235, 0.7);
}

pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background-color: var(--surface-2);
  border: 1px solid rgba(230, 231, 235, 0.9);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: var(--muted);
}

/* ---------- Page headers with gradient underline ---------- */
.d-flex.justify-content-between.align-items-center.pt-3.pb-2.mb-3.border-bottom {
  border-bottom: none !important;
  padding-bottom: 1.5rem !important;
  margin-bottom: 2rem !important;
  position: relative;
}

.d-flex.justify-content-between.align-items-center.pt-3.pb-2.mb-3.border-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--sun));
  border-radius: 3px;
}

/* ---------- Text utilities override ---------- */
.text-muted {
  color: var(--muted) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-dark {
  color: var(--ink) !important;
}

.text-primary {
  color: var(--primary) !important;
}

/* ---------- Background utilities ---------- */
.bg-light {
  background-color: var(--surface-2) !important;
}

.bg-white {
  background-color: var(--surface) !important;
}

/* ---------- List styling ---------- */
.list-unstyled li {
  color: var(--muted);
}

.list-unstyled .border-bottom {
  border-color: var(--border) !important;
}

/* ---------- Dividers ---------- */
.hr,
hr {
  height: 1px;
  background: rgba(230, 231, 235, 0.9);
  border: none;
  margin: var(--space-7) 0;
}

/* ---------- Site Footer ---------- */
.site-footer {
  padding: var(--space-6) 0;
  margin-top: var(--space-8);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.875rem;
}

/* ---------- Responsive design ---------- */
@media (max-width: 767.98px) {
  .sidebar {
    position: relative;
    top: 0;
    padding: 1rem 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  main {
    margin-top: 0;
    padding: 1rem 0;
  }

  .navbar {
    min-height: 56px;
    position: relative;
  }
}

/* ---------- Utility classes ---------- */
.text-accent {
  color: var(--primary) !important;
}

.bg-surface {
  background-color: var(--surface) !important;
}

.border-accent {
  border-color: var(--primary) !important;
}

/* ---------- Progress bars ---------- */
.progress {
  background-color: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar {
  background-color: var(--primary);
}

.progress-bar.bg-dark {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-600) 100%) !important;
}

/* ---------- Loading states ---------- */
.spinner-border {
  border-color: var(--primary);
  border-right-color: transparent;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-2);
}

/* Sidebar specific scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted-2);
}

/* ---------- Selection styling ---------- */
::selection {
  background: rgba(45, 108, 223, 0.2);
  color: var(--ink);
}

/* ---------- Micro-interactions ----------
   Keep calm: slight lift, no bounce.
*/
.lift {
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hover glow effect on interactive elements */
.card:hover {
  box-shadow: var(--shadow-md), 0 0 40px rgba(45, 108, 223, 0.05);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(45, 108, 223, 0.24), 0 0 30px rgba(45, 108, 223, 0.1);
}

/* ---------- Dark Mode (disabled - light theme only) ---------- */
/* 
   To enable dark mode, uncomment the @media block below.
   Currently forcing light theme for consistent branding.
*/
