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

/* Notion-Style Minimalist CSS */

/* ============================================
   CSS VARIABLES (Design System)
   ============================================ */
:root {
  /* Colors - Health Dashboard Palette */
  --bg-color: #f4f7f9;
  /* Soft off-white/gray */
  --surface-color: #ffffff;
  --surface-hover: #f8fafc;
  --surface-active: #f1f5f9;

  --text-primary: #1e293b;
  /* Deep slate */
  --text-secondary: #64748b;
  /* Slate gray */
  --text-light: #94a3b8;

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary-color: #3b82f6;
  /* Vibrant Blue */
  --primary-text: #ffffff;

  /* Test Type Accents */
  --accent-burnout: #ef4444;
  /* Red */
  --accent-phq9: #6366f1;
  /* Indigo/Blue */
  --accent-gad7: #10b981;
  /* Green */
  --accent-ptsd: #a855f7;
  /* Purple */

  /* Status Colors */
  --success-bg: #f0fdf4;
  --success-text: #16a34a;
  --warning-bg: #fffbeb;
  --warning-text: #d97706;
  --danger-bg: #fee2e2;
  --danger-text: #dc2626;
  --info-bg: #eff6ff;
  --info-text: #3b82f6;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Borders */
  --border-radius-sm: 6px;
  --border-radius: 12px;
  /* Smoother corners */

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;

  /* Shadows - Layered & Soft */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);

  /* Layout */
  --sidebar-width: 260px;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent transitions on load */
.preload * {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(55, 53, 47, 0.16);
  transition: border-color 0.1s;
}

a:hover {
  border-bottom-color: var(--text-primary);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-lg);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
/* ============================================
   APP LAYOUT (Sidebar + Main)
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface-color);
  /* White sidebar */
  border-right: 1px solid var(--border-color);
  padding: var(--spacing-xl) var(--spacing-md);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, transform 0.3s ease;
  z-index: 2000;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.sidebar-toggle-btn:hover {
  background: var(--surface-hover);
}

.sidebar-mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1100;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1900;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-content {
  flex: 1;
}

.sidebar-brand {
  font-weight: 600;
  font-size: 1.1em;
  padding: 0 var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center the logo */
  color: var(--text-primary);
  text-decoration: none;
  min-height: 48px;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  z-index: 2000;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
  border: 1px solid transparent;
}

/* Add a vertical indicator for active/hover states */
.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--primary-color);
  border-radius: 0 4px 4px 0;
  transition: height 0.2s ease;
}

.sidebar-link.active::before {
  height: 20px;
}

.sidebar-icon {
  flex-shrink: 0;
  color: var(--text-light);
  transition: color 0.2s;
}

.sidebar-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: transparent;
}

.sidebar-link:hover .sidebar-icon {
  color: var(--text-primary);
}

.sidebar-link.active {
  background: #eff6ff;
  color: var(--primary-color);
  font-weight: 600;
  border-color: rgba(59, 130, 246, 0.1);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.05);
}

.sidebar-link.active .sidebar-icon {
  color: var(--primary-color);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--spacing-xl) 4%;
  background: var(--bg-color);
  /* Gray background */
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.no-sidebar .sidebar {
  display: none !important;
}

.no-sidebar .main-content {
  margin-left: 0 !important;
  padding-top: 80px;
  /* Space for top-nav-simple */
}

.top-nav-simple {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.top-nav-simple .container,
.top-nav-simple .container-fluid {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Collapsed State Refining (Desktop ONLY) */
@media (min-width: 769px) {
  .sidebar-collapsed .sidebar {
    width: 80px;
    padding: var(--spacing-xl) 0;
    align-items: center;
    overflow-x: hidden;
    /* Remove horizontal scrollbar */
  }

  .sidebar-collapsed .sidebar-brand {
    flex-direction: column;
    gap: 8px;
    padding: 0;
    width: 100%;
    justify-content: center;
  }

  .sidebar-collapsed .sidebar-brand-text {
    display: none;
  }
}

.sidebar-logo {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

@media (min-width: 769px) {
  .sidebar-collapsed .sidebar-logo {
    height: 48px;
    width: 48px;
    object-fit: contain;
    margin: 0 auto;
  }

  .sidebar-collapsed .sidebar-toggle-btn {
    position: absolute;
    right: -12px;
    top: 44px;
    /* Matches the vertical center of the logo area */
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1001;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    font-size: 10px;
  }

  .sidebar-collapsed .sidebar-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sidebar-collapsed .sidebar-link {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    margin: 4px 0;
  }

  .sidebar-collapsed .sidebar-link span:not(.sidebar-icon) {
    display: none;
  }

  .sidebar-collapsed .sidebar-icon {
    width: 22px;
    height: 22px;
  }

  .sidebar-collapsed .sidebar-footer {
    padding: var(--spacing-md) 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sidebar-collapsed .sidebar-footer>div {
    justify-content: center;
    margin-bottom: 12px;
  }

  .sidebar-collapsed .sidebar-footer>div>div:last-child {
    display: none;
  }

  .sidebar-collapsed .sidebar-footer a.sidebar-link {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.1);
  }

  .sidebar-collapsed .logout-text {
    display: none;
  }

  .sidebar-collapsed .logout-icon {
    width: 20px;
    height: 20px;
  }

  .sidebar-collapsed .main-content {
    margin-left: 80px;
  }
}

/* Mobile State */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 64px 16px var(--spacing-xl);
  }

  .sidebar-mobile-toggle {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2100;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
  }

  /* Hide the outside toggle when the sidebar is already open to avoid duplicates */
  .sidebar-mobile-active .sidebar-mobile-toggle {
    display: none !important;
  }

  .sidebar-mobile-active .sidebar {
    transform: translateX(0);
  }

  .sidebar-mobile-active .sidebar-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

.navbar {
  display: none;
  /* Hide old navbar */
}

.navbar-brand {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  border: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.navbar-menu {
  display: flex;
  gap: 4px;
  /* Tight gap for button-like links */
  list-style: none;
}

.navbar-link {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  border: none;
  transition: background 0.1s, color 0.1s;
}

.navbar-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border: none;
}

.navbar-link.active {
  background: var(--surface-hover);
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 32px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: nowrap;
  gap: 6px;
  font-family: var(--font-family);
  text-decoration: none;
  /* Reset link styles */
}

.btn-primary {
  background: var(--primary-color);
  color: var(--primary-text);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn:active,
.sidebar-link:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
  /* Override link hover */
}

.btn-danger {
  background: transparent;
  color: var(--danger-text);
  border: 1px solid transparent;
  /* No border initially */
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-bottom-color: transparent;
}

.btn-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.btn-sm {
  height: 28px;
  font-size: 13px;
  padding: 0 8px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ============================================
   CARDS (Notion Callouts / Sections)
   ============================================ */
.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  /* Subtle Notion-like elevation */
}

/* Variant: Flat Card (no border, just spacing) */
.card-flat {
  border: none;
  padding: 0;
}

.card-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-hover);
  /* Subtle header background */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: normal;
}

.card-body {
  padding: var(--spacing-md);
}

/* ============================================
   QUESTION LIST (Test Details)
   ============================================ */
.question-list {
  overflow: hidden;
}

.question-row {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  background: white;
}

.question-row:last-child {
  border-bottom: none;
}

.question-row:nth-child(even) {
  background: #fcfcfc;
}

.question-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  min-width: 20px;
}

.question-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.answer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  min-width: 85px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

/* Badge Variants - Light Style */
.badge-neutral {
  background: #f8fafc;
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.badge-info {
  background: #eff6ff;
  color: #2563eb;
  border-color: #dbeafe;
}

.badge-success {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #dcfce7;
}

.badge-warning {
  background: #fffbeb;
  color: #d97706;
  border-color: #fef3c7;
}

.badge-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fee2e2;
}

/* ============================================
   TABLES (Database View)
   ============================================ */
/* ============================================
   TABLE ENHANCEMENTS
   ============================================ */
.table-container {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-top: var(--spacing-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th {
  text-align: left;
  padding: 12px;
  background: transparent;
  color: var(--text-light);
  /* Lighter text for headers */
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: normal;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

.table tr:hover td {
  background: var(--surface-hover);
}



/* ============================================
   BADGES (Properties)
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  height: 22px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-family);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(22, 163, 74, 0.1);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid rgba(217, 119, 6, 0.1);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(220, 38, 38, 0.1);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-input,
.form-select {
  width: 100%;
  max-width: 100%;
  /* Prevent overly wide inputs */
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  transition: border-color 0.1s, box-shadow 0.1s;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #2383e2;
  box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.2);
}

/* ============================================
   UTILITIES & FULL-WIDTH
   ============================================ */
.full-width-header {
  width: 100%;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0;
  margin-bottom: var(--spacing-xl);
}

.full-width-header .container {
  max-width: 1200px;
}

.text-center {
  text-align: center !important;
}

.d-flex {
  display: flex !important;
}

.flex-column {
  flex-direction: column !important;
}

.justify-between {
  justify-content: space-between !important;
}

.align-center {
  align-items: center !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: var(--spacing-xs) !important;
}

.mb-2 {
  margin-bottom: var(--spacing-sm) !important;
}

.mb-3 {
  margin-bottom: var(--spacing-md) !important;
}

/* Grid */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Mobile */
@media (max-width: 600px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .navbar-content {
    padding: 0 var(--spacing-md);
  }

  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Interactive Elements */
details>summary {
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

details>summary::before {
  content: "▶";
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform 0.1s;
}

details[open]>summary::before {
  transform: rotate(90deg);
}

details>summary::-webkit-details-marker {
  display: none;
}

/* ============================================
   TABS (Notion Style)
   ============================================ */
.tab-btn {
  /* flex: 1; Removed to prevent stretching */
  padding: var(--spacing-md);
  margin-right: var(--spacing-sm);
  border: none;
  background: none;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  /* default */
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: inherit;
  font-size: var(--font-size-sm);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.tab-btn.active {
  color: var(--text-primary);
  border-bottom: 2px solid var(--text-primary);
  /* Black line */
  font-weight: 600;
}

/* ============================================
   HERO SECTION (Landing Page)
   ============================================ */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  /* Clean background */
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  /* Strict monochrome */
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

/* ============================================
   STATS LAYOUT
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-sm);
  }
}

/* ============================================
   STATS CARD
   ============================================ */
.stat-card {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  /* Border instead of shadow */
  border-radius: var(--radius-md);
  padding: 16px;
}

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ============================================
   FLATPICKR CUSTOM STYLING
   ============================================ */
.flatpickr-calendar {
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  font-family: var(--font-family) !important;
  margin-top: 4px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.flatpickr-months .flatpickr-month {
  color: var(--text-primary) !important;
  fill: var(--text-primary) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 600 !important;
}

.flatpickr-weekday {
  color: var(--text-light) !important;
  font-weight: 500 !important;
}

/* Hide the native date picker icon in some browsers if needed, 
   Flatpickr handles the UI now */
input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

/* ============================================
   TEST HISTORY CARDS
   ============================================ */
.session-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
}

.session-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.session-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  width: 100%;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.session-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.session-summary-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 0;
}

.summary-pill {
  padding: 2px 8px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left-width: 3px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.summary-pill-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.summary-pill-value {
  font-size: 13px;
  font-weight: 800;
}

.session-details {
  border-top: 1px solid var(--border-color);
  background: #fafafa;
  padding: var(--spacing-lg) 24px;
}

.subtest-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  width: 100%;
}

.subtest-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #f1f5f9;
  transition: background 0.2s;
}

.subtest-header:hover {
  background: #e2e8f0;
}

.subtest-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
}

.subtest-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
}

.subtest-score-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtest-score-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: white;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}