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

@font-face {
  font-family: 'MCAT Genie Brand';
  src: url('mcat-genie-cabin-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

:root {
  color-scheme: dark;
  /* Modern Inter font stack */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Inter', sans-serif;

  /* Core color tokens - exact values from spec */
  --bg: #0E0F12;
  --sidebar-bg: #13151A;
  --card-surface: #181B22;
  --card-elevated: #1C2028;
  --border: #232734;
  --text-muted: #9AA3B2;
  --text: #E8ECF2;
  --text-main: #D0D6DD;
  --text-faint: #6C7380;
  --accent: #6C7CFF;
  --accent-hover: #7D8CFF;
  --accent-glow: rgba(108, 124, 255, 0.35);
  --success: #4CD964;
  --warning: #FFB547;
  --danger: #FF6B6B;

  /* Derived semantic colors */
  --surface: var(--card-surface);
  --surface-muted: var(--card-elevated);
  --muted: var(--text-muted);
  --sidebar-surface: var(--sidebar-bg);
  --sidebar-border: var(--border);
  --sidebar-text: var(--text);
  --sidebar-muted: var(--text-muted);
  --accent-strong: var(--accent-hover);
  --accent-soft: rgba(108, 124, 255, 0.12);
  --accent-ghost: rgba(108, 124, 255, 0.06);
  --wizard-row-hover: rgba(108, 124, 255, 0.08);
  --wizard-row-active: rgba(108, 124, 255, 0.15);

  /* Calendar semantic status colors */
  --calendar-success: var(--success);
  --calendar-success-soft: rgba(76, 217, 100, 0.12);
  --calendar-success-border: rgba(76, 217, 100, 0.3);
  --calendar-warning: var(--warning);
  --calendar-warning-soft: rgba(255, 181, 71, 0.12);
  --calendar-warning-border: rgba(255, 181, 71, 0.3);
  --calendar-error: var(--danger);
  --calendar-error-soft: rgba(255, 107, 107, 0.12);
  --calendar-error-border: rgba(255, 107, 107, 0.3);
  --calendar-info: var(--accent);
  --calendar-info-soft: var(--accent-soft);
  --calendar-info-border: rgba(108, 124, 255, 0.3);
  --calendar-connecting: #A78BFA;
  --calendar-connecting-soft: rgba(167, 139, 250, 0.12);
  --calendar-connecting-border: rgba(167, 139, 250, 0.3);

  /* Modern shadow system - soft, ambient */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow: var(--shadow-md);

  /* Border radius system */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Numeric font */
  --numeric-font: 'Inter', system-ui, sans-serif;

  /* Smooth transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar-specific tokens */
  --sidebar-surface: #171A21;
  --sidebar-active: #1F232C;
  --sidebar-border: #232734;
  --badge: #FF8A4C;

  /* Spacing system */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;

  /* Icon & label sizes */
  --icon-size: 18px;
  --label-size: 14px;
  --section-label-size: 11px;

  background-color: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  font-variant-numeric: proportional-nums;
  font-feature-settings: "pnum" 1, "lnum" 1;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 124, 255, 0.4);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

.app-shell {
  display: grid;
  grid-template-rows: 52px 1fr;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.app-shell-content {
  overflow-y: auto;
  overflow-x: auto;
  /* Enable horizontal scroll for small screens */
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: margin-right 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  /* Ensure smooth close transition */
}

/* Preferences loading overlay */
.preferences-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #0e1117);
  z-index: 100;
  transition: opacity 300ms ease;
}

.preferences-loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preferences-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preferences-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(94, 230, 150, 0.25);
  border-top-color: rgba(94, 230, 150, 1);
  box-shadow: 0 0 16px rgba(94, 230, 150, 0.6);
  animation: pref-spin 0.8s linear infinite;
}

@keyframes pref-spin {
  to { transform: rotate(360deg); }
}

.preferences-loading-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #e4e8ee);
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 1.5rem;
  background: rgba(14, 15, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 52px;
  width: 100%;
  z-index: 50;
  position: relative;
  text-align: left;
}

.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: #ffffff;
}

.topbar-brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-brand-icon .brand-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topbar-brand-text {
  font-family: 'MCAT Genie Brand', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  color: #ffffff;
  margin-left: 0.75rem;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(8, 10, 12, 0.825);
  border: 1px solid rgba(71, 85, 105, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  width: 420px;
  color: var(--text-muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-left: 12px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.25);
  position: relative;
  font-family: "Inter", sans-serif;
}

.topbar-search:focus-within {
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.4), 0 8px 24px rgba(2, 6, 23, 0.35);
}

.topbar-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  width: 100%;
  font-size: 13px;
  font-weight: 500;
}

.topbar-search input:focus,
.topbar-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.topbar-search input::placeholder {
  color: #475569;
}

.search-icon {
  font-size: 16px;
  color: var(--text-faint);
}

.search-overlay {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(640px, 90vw);
  background: rgba(8, 10, 12, 0.965);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6), inset 0 0 0 1px rgba(148, 163, 184, 0.08);
  padding: 12px;
  z-index: 120;
  backdrop-filter: blur(18px);
  font-family: "Inter", sans-serif;
}

.search-overlay.is-hidden {
  display: none;
}

.search-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 10px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.search-overlay-title {
  font-weight: 700;
}

.search-overlay-meta {
  font-weight: 600;
  text-transform: none;
}

.search-overlay-status {
  padding: 14px 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.search-overlay-status.is-error {
  color: #fca5a5;
}

.search-results {
  margin: 0;
  padding: 6px 4px 2px;
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}

.search-group {
  display: grid;
  gap: 8px;
}

.search-group-header {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
  padding: 4px 4px 0;
}

.search-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.search-result {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(51, 65, 85, 0.5);
  background: rgba(12, 14, 18, 0.745);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: 14px;
  display: grid;
  justify-content: start;
  justify-items: start;
  align-items: start;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-result:hover,
.search-result:focus-visible {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(18, 20, 24, 0.95);
}

.search-result-main {
  display: grid;
  gap: 4px;
}

.search-result-title {
  font-weight: 600;
  font-size: 14px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.search-result-snippet {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.search-result-snippet strong {
  color: #e2e8f0;
  font-weight: 700;
}

.container {
  max-width: min(100vw, 2560px);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.container-fluid {
  width: 100%;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  letter-spacing: -0.01em;
}

h2,
h3,
h4,
h5,
h6,
.brand-name,
.step-kicker,
.summary-chip {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-surface);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.brand-logo:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 124, 255, 0.3);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent-ghost) 0%, var(--accent-soft) 100%);
  color: var(--accent);
  border: 1px solid rgba(108, 124, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand-mark {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.brand-name {
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  letter-spacing: -0.01em;
}

.intro {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.card {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.usage-summary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.usage-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.usage-total-card,
.usage-category-card {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.usage-total-provider,
.usage-category-title {
  margin: 0;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.usage-category-title {
  font-size: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
}

.usage-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.usage-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.usage-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.usage-progress {
  width: 100%;
  height: 0.55rem;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.usage-progress-fill {
  height: 100%;
  background: var(--usage-progress-color, linear-gradient(90deg, #4b90f0 0%, #7bb0ff 100%));
  border-radius: inherit;
  width: var(--usage-progress-value, 0%);
  transition: width 0.3s ease;
}

.usage-row-meta {
  margin: 0;
  font-size: 0.78rem;
  color: #cbd5f5;
}

.usage-subsection {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.usage-subsection h3 {
  margin: 0;
  font-size: 1rem;
  color: #f8fafc;
}

/* Selection UI */
.selection-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.selection-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.selection-actions-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.selection-summary {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.selection-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.selection-toolbar .selection-hint {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
  line-height: 1.3;
}

.selection-toolbar .selection-actions-row {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

@media (max-width: 1200px) {
  .selection-toolbar {
    grid-template-columns: 1fr;
  }
}

.subtopic-phases {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5f5;
  font-size: 0.5rem;
  font-weight: 600;
}

.phase-chip input {
  margin: 0;
}

.checkbox-row .subtopic-title {
  flex: 1 1 220px;
}

.selection-topics {
  margin: 0.5rem 0 1rem;
  max-height: 60vh;
  overflow: auto;
  padding-right: 0.4rem;
}

/* Denser selection topics in Focus section for dashboard layout */
#step-focus-target .selection-topics {
  max-height: 65vh;
  margin: 0.75rem 0;
  padding-right: 0.5rem;
}

#step-focus-target .selection-card {
  margin-bottom: 0.75rem;
}

#step-focus-target .selection-card summary {
  padding: 0.85rem 1rem;
}

#step-focus-target .selection-card-body {
  padding: 0 1rem 1rem;
}

#step-focus-target .subtopic-row {
  padding: 0.5rem 0.4rem;
}

#step-focus-target .subtopic-coverage.is-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: #fca5a5;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.65rem;
}

.selection-card {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.selection-card:hover {
  border-color: rgba(108, 124, 255, 0.3);
  box-shadow: var(--shadow-md);
}

.selection-card summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
  list-style: none;
}

.selection-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.selection-card summary::-webkit-details-marker {
  display: none;
}

.selection-card .chevron {
  display: inline-block;
  margin-right: 0.4rem;
  transition: transform 0.2s ease;
}

.selection-card[open] .chevron {
  transform: rotate(90deg);
}

@media (max-width: 1100px) {
  .selection-toolbar {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .selection-actions-row {
    justify-content: flex-start;
  }
}

.selection-actions button {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5f5;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.selection-actions button:hover {
  border-color: rgba(59, 130, 246, 0.6);
}

.selection-subtopics {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

.selection-subtopics label {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 0.4rem;
  font-weight: 500;
  color: #e2e8f0;
  line-height: 1.2;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.88rem;
}

.selection-subtopics input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
}

.selection-subtopics label.disabled {
  opacity: 0.5;
}

.selection-subtopics label:nth-child(even) {
  background: rgba(148, 163, 184, 0.08);
}

.selection-subtopics label:hover {
  border-color: rgba(148, 163, 184, 0.35);
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
  font-size: 0.75rem;
}

.selection-subtopics input[type="checkbox"] {
  accent-color: var(--accent);
}

.subtopic-title {
  flex: 1;
}

.subtopic-coverage {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: #e2e8f0;
  text-align: left;
  max-width: 55%;
}

.subtopic-coverage.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

/* ============================================
   FOCUS SECTION REDESIGN
   ============================================ */

/* Focus Toolbar */
.focus-toolbar {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.focus-toolbar-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.focus-toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.focus-toolbar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Mode Toggle */
.focus-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.focus-mode-toggle-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.focus-mode-buttons {
  display: flex;
  gap: 0.5rem;
}

.focus-mode-button {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.focus-mode-button.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.focus-mode-button:hover:not(.is-active) {
  background: var(--sidebar-surface);
  border-color: rgba(148, 163, 184, 0.3);
}

.mode-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
}

/* Preset Mode */
.focus-preset-mode label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.focus-preset-mode select {
  min-width: 180px;
  padding: 0.45rem 0.75rem;
}

/* Global Intent Controls */
.focus-global-intent {
  display: grid;
  grid-template-columns: auto max-content;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  align-items: center;
}

.focus-intent-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.focus-intent-buttons {
  display: flex;
  gap: 0.25rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.focus-intent-button {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.focus-intent-button {
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.focus-intent-button:hover {
  background: rgba(148, 163, 184, 0.14);
}

.focus-intent-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.focus-intent-button:disabled,
.focus-intent-button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.08);
}

.focus-intent-tip {
  display: none;
  grid-column: 2;
  margin-top: 0;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.6);
  max-width: 220px;
  white-space: normal;
}

.focus-intent-tip.is-visible {
  display: block;
}

/* Global Actions */
.focus-global-actions {
  display: flex;
  gap: 0.25rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.focus-action-button {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.focus-action-button:hover {
  background: var(--sidebar-surface);
}

.focus-action-button--primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.focus-action-button--primary:hover {
  background: var(--accent-hover);
}

/* Category Card Updates */
.selection-card {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: all 0.2s;
}

.selection-card:hover {
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

.selection-card summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.selection-card summary:hover {
  background: rgba(148, 163, 184, 0.04);
}

.selection-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.selection-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.selection-card-title-main {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.selection-category-toggle {
  display: inline-flex;
  align-items: center;
}

.selection-category-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.selection-card-code {
  font-family: 'SF Mono', monospace;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 700;
}

.selection-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.selection-chip--count {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.selection-chip--intent-content,
.selection-chip--intent-practice,
.selection-chip--intent-both {
  background: rgba(108, 124, 255, 0.18);
  color: #b9c7ff;
}

.selection-chip--info {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted);
}

.selection-chip--estimate-content,
.selection-chip--estimate-practice {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  font-weight: 600;
}

.selection-chip--total {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  font-weight: 600;
}

.selection-chip--suggested {
  background: rgba(251, 191, 36, 0.15);
  color: #FCD34D;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.selection-card-body {
  padding: 0 1.5rem 1.5rem;
}

.selection-card-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.category-intent-row,
.category-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-intent-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 70px;
}

.category-intent-buttons {
  display: flex;
  gap: 0.4rem;
  flex: 1;
}

.category-intent-button {
  flex: 1;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.category-intent-button {
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.category-intent-button:hover {
  background: rgba(148, 163, 184, 0.14);
}

.category-intent-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.category-intent-button:disabled,
.category-intent-button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.08);
}

.category-actions-row {
  justify-content: flex-end;
}

.category-action-button {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.category-action-button:hover {
  background: rgba(148, 163, 184, 0.1);
}

/* Subtopic Row */
.subtopic-row {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "check info"
    "check intent";
  gap: 0.5rem 0.75rem;
  align-items: start;
  padding: 0.5rem 0.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

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

.subtopic-row:hover {
  background: rgba(148, 163, 184, 0.06);
}

.subtopic-row.is-enabled {
  background: rgba(139, 92, 246, 0.05);
}

.subtopic-row.is-suggested {
  position: relative;
}

.subtopic-row-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.subtopic-row-checkbox {
  grid-area: check;
  align-self: center;
}

.subtopic-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  grid-area: info;
}

.subtopic-row-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.subtopic-row-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0;
  order: 2;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
  white-space: nowrap;
}

.subtopic-row-time-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2399A6BD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.focus-aamc-totals {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card-elevated);
  display: grid;
  gap: 0.5rem;
}

/* Dashboard-style AAMC totals in Focus section */
#step-focus-target .focus-aamc-totals {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: rgba(28, 32, 40, 0.6);
  border: 1px solid rgba(35, 39, 52, 0.8);
}

#step-focus-target .focus-toolbar {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(28, 32, 40, 0.5);
  border: 1px solid rgba(35, 39, 52, 0.8);
}

.focus-aamc-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.focus-aamc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.focus-aamc-row strong {
  color: var(--text);
  font-weight: 600;
}

.subtopic-row-code {
  font-family: 'SF Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.subtopic-row-title {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.2;
  flex: 1 1 100%;
  white-space: normal;
}

.subtopic-row .subtopic-coverage {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 0.15rem;
}

.subtopic-row-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.15);
  color: #FCD34D;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.subtopic-row-intent {
  flex-shrink: 0;
  grid-area: intent;
  display: flex;
  justify-content: flex-start;
  margin-top: 0.1rem;
}

/* Intent Label (Simple Mode) */
.intent-label {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.intent-label--content {
  color: #60A5FA;
}

.intent-label--practice {
  color: #34D399;
}

.intent-label--both {
  color: #A78BFA;
}

.intent-label.is-disabled {
  opacity: 0.4;
}

/* Segmented Control (Advanced Mode) */
.segmented-control {
  display: inline-flex;
  background: rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.segmented-control--sm {
  padding: 2px;
}

.segmented-control__option {
  padding: 0.25rem 0.625rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: calc(var(--radius-sm) - 2px);
  transition: all 0.15s;
  white-space: nowrap;
}

.subtopic-row-intent .segmented-control {
  gap: 1px;
}

.subtopic-row-intent .segmented-control__option {
  padding: 0.1rem 0.3rem;
  font-size: 0.65rem;
  letter-spacing: -0.02em;
}

.segmented-control__option:hover:not(:disabled):not(.is-active) {
  background: rgba(148, 163, 184, 0.15);
}

.segmented-control__option.is-active {
  background: var(--card-surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.segmented-control__option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Keep per-subtopic intent controls visible in simple mode */
.focus-mode-simple .intent-label {
  display: none;
}

/* Hide intent labels in advanced mode */
.focus-mode-advanced .intent-label {
  display: none;
}

.focus-mode-advanced .segmented-control {
  display: inline-flex;
}

/* Responsive */
@media (max-width: 1024px) {

  .focus-toolbar-top,
  .focus-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .focus-global-intent,
  .focus-global-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .selection-grid {
    grid-template-columns: 1fr;
  }

  .focus-intent-buttons,
  .category-intent-buttons {
    flex-direction: column;
  }

  .focus-global-actions {
    flex-direction: column;
  }
}

.view-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.wizard-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.wizard-step-button {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-step-button.is-active {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.wizard-step-button.is-complete {
  border-color: rgba(34, 197, 94, 0.8);
  color: #bbf7d0;
}

.wizard-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.wizard-footer {
  margin-top: 2rem;
}

.wizard-step.is-hidden {
  display: none;
}

.view-tab {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.view-tab.is-active {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.wizard-sidebar-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.dev-only {
  display: none !important;
}

.notes-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(20, 32, 46, 0.9) 0%, rgba(10, 15, 24, 1) 55%);
  border-radius: 18px;
  overflow: hidden;
}

.notes-topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(11, 18, 28, 0.92);
  border-bottom: 1px solid rgba(40, 52, 74, 0.8);
}

.notes-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #f8fafc;
}

.notes-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #f8fafc;
}

.notes-search {
  flex: 1;
  max-width: 360px;
}

.notes-search input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(40, 52, 74, 0.8);
  background: rgba(14, 22, 34, 0.9);
  color: #e2e8f0;
}

.notes-search input:focus,
.notes-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.notes-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.notes-nav-link {
  background: transparent;
  border: none;
  color: #9fb0c8;
  font-weight: 600;
  cursor: pointer;
}

.notes-nav-link.is-active {
  color: #60a5fa;
}

.notes-icon-button {
  border: 1px solid rgba(48, 60, 86, 0.8);
  background: rgba(20, 30, 45, 0.9);
  color: #e2e8f0;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.notes-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.notes-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(12, 18, 28, 0.92);
  border: 1px solid rgba(35, 45, 68, 0.9);
  border-radius: 18px;
  padding: 1.2rem;
  min-height: 720px;
}

.notes-scope-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.85);
}

.notes-scope-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #a7b7cc;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.notes-scope-btn:hover {
  color: #d7e3f5;
}

.notes-scope-btn.is-active {
  border-color: rgba(59, 130, 246, 0.75);
  background: rgba(30, 64, 114, 0.65);
  color: #f8fbff;
}

.notes-tree {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 520px;
  overflow: auto;
}

.notes-tree summary {
  cursor: pointer;
  list-style: none;
}

.notes-tree summary::-webkit-details-marker {
  display: none;
}

.notes-tree-group>summary {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0.4rem 0 0.2rem;
}

.notes-tree-group {
  border: none;
  background: transparent;
}

.notes-tree-subtopic>summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #d4e2f5;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
}

.notes-tree-subtopic>summary::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
}

.notes-tree-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.35rem 0 0.6rem 0.6rem;
}

.notes-tree-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(18, 26, 40, 0.9);
  color: #e7edf6;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.notes-tree-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.notes-tree-item.is-active {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(30, 58, 100, 0.7);
}

.notes-item-title {
  font-weight: 600;
}

.notes-item-meta {
  color: #94a3b8;
  font-size: 0.7rem;
}

.notes-new-btn {
  border-radius: 14px;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.notes-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.notes-account {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notes-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.notes-footer-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  text-align: left;
  cursor: pointer;
}

.notes-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: #e2e8f0;
}

.notes-main-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.notes-main-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #f8fafc;
}

.notes-detail-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #45d7a3;
  font-weight: 600;
}

.notes-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: #9fb0c8;
  font-size: 0.82rem;
}

.notes-cta-row {
  display: flex;
  gap: 0.6rem;
}

.notes-detail-tabs {
  display: flex;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(42, 54, 78, 0.8);
  padding-bottom: 0.5rem;
}

.notes-tab {
  background: transparent;
  border: none;
  color: #8fa3c2;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding-bottom: 0.4rem;
}

.notes-tab.is-active {
  color: #4cc3ff;
  border-bottom: 2px solid #4cc3ff;
}

.notes-tab-panel {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
}

.notes-tab-panel.is-active {
  display: flex;
}

.notes-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.notes-files-grid .status-note {
  grid-column: 1 / -1;
}

.notes-file-card {
  background: rgba(14, 22, 34, 0.95);
  border: 1px solid rgba(40, 52, 74, 0.8);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.notes-file-thumb {
  position: relative;
  background: rgba(20, 30, 45, 0.9);
  height: 140px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 600;
  background-size: cover;
  background-position: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.notes-file-thumb.has-image {
  color: rgba(255, 255, 255, 0.9);
}

.notes-file-thumb.is-generic {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  color: #0f172a;
}

.notes-file-doc {
  width: 84px;
  height: 108px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  position: relative;
}

.notes-file-doc-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #e2e8f0 50%, #ffffff 50%);
  border-bottom-left-radius: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.6);
}


.notes-file-type {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.9);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.notes-file-type.is-pdf {
  background: rgba(248, 113, 113, 0.95);
}

.notes-file-type.is-image {
  background: rgba(59, 130, 246, 0.95);
}

.notes-file-type.is-doc {
  background: rgba(16, 185, 129, 0.95);
}

.notes-file-type.is-sheet,
.notes-file-type.is-slides {
  background: rgba(168, 85, 247, 0.95);
}

.notes-file-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notes-file-body h4 {
  font-size: 0.95rem;
  margin: 0;
  color: #f1f5f9;
}

.notes-file-meta {
  color: #9fb0c8;
  font-size: 0.75rem;
}

.notes-file-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #38bdf8;
  font-weight: 600;
}

.notes-file-link {
  color: #60a5fa;
  font-size: 0.75rem;
  text-decoration: none;
}

.notes-file-link:hover {
  text-decoration: underline;
}

.notes-upload-card {
  border: 1px dashed rgba(60, 72, 96, 0.8);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(11, 18, 28, 0.6);
}

.notes-upload-icon {
  font-size: 1.6rem;
}

.notes-upload-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  align-items: center;
}

.notes-editor-header,
.notes-files-header,
.notes-practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#notes-editor-input {
  min-height: 240px;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(60, 72, 96, 0.6);
  background: rgba(12, 18, 28, 0.8);
  color: #e7edf7;
  font-size: 0.9rem;
  resize: vertical;
}

.notes-editor-actions {
  display: flex;
  gap: 0.5rem;
}

.notes-practice-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notes-practice-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.notes-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
}

.notes-progress-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(40, 52, 74, 0.8);
  border-radius: 18px;
  padding: 1rem 1.5rem;
  background: rgba(12, 18, 28, 0.9);
}

.notes-progress-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(59, 130, 246, 0.3);
  display: grid;
  place-items: center;
  color: #38bdf8;
  font-weight: 700;
}

.notes-progress-link {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
}

.notes-assignment {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.notes-assignment:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 124, 255, 0.3);
}

.notes-assignment summary {
  cursor: pointer;
  font-weight: 600;
  color: #f8fafc;
  list-style: none;
}

.notes-assignment summary::-webkit-details-marker {
  display: none;
}

.notes-assignment-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.notes-assignment-meta {
  font-size: 0.78rem;
  color: #cbd5f5;
}

.notes-assignment-date {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.notes-assignment-body {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.notes-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notes-attempts,
.notes-attachments {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5f5;
  font-size: 0.9rem;
}

.notes-attempt-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.notes-attempts ul,
.notes-attachments ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.notes-attachment-title {
  font-weight: 600;
  color: #e2e8f0;
}

.notes-attachment-meta {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.event-review-sheet {
  margin-top: 0.85rem;
}

.event-attempts {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
}


.event-review-sheet-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.event-review-sheet-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.65), rgba(12, 19, 30, 0.9));
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
}

.event-review-sheet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.16);
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.event-review-sheet-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

button.event-review-sheet-btn {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5f5;
}

.event-review-sheet-btn:hover {
  background: rgba(16, 185, 129, 0.26);
  border-color: rgba(52, 211, 153, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.35);
}

button.event-review-sheet-btn:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.6);
}

.event-review-sheet-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.event-review-sheet-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.event-review-sheet-name {
  flex: 1 1 200px;
  min-width: 160px;
  margin-left: 0;
  color: #cbd5f5;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-review-sheet-list .event-attachment-delete {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  padding: 0.2rem 0.6rem;
}

.event-attachments {
  margin-top: 0.75rem;
}

.event-attachments h5 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #cbd5f5;
  letter-spacing: 0.01em;
}

.event-attachment-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.event-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #d7deea;
  text-decoration: none;
  font-size: 0.78rem;
}

.event-attachment-link:hover {
  text-decoration: underline;
  color: #eef2ff;
}

.event-attachment-delete {
  margin-left: 0.5rem;
  border: 1px solid #f87171;
  background: transparent;
  color: #f87171;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  cursor: pointer;
}

.event-attachment-delete:hover {
  background: rgba(248, 113, 113, 0.15);
}

.event-attachment-label {
  color: #e2e8f0;
}

.event-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 20px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  background: rgba(108, 124, 255, 0.18);
  border: 1px solid rgba(108, 124, 255, 0.35);
}

.event-attachment-icon.is-pdf {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.45);
  color: #ffe4e4;
}

.event-attachment-icon.is-image {
  background: rgba(255, 181, 71, 0.18);
  border-color: rgba(255, 181, 71, 0.45);
  color: #ffe9c2;
}

.event-attachment-icon.is-doc {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}

.event-attachment-icon.is-sheet {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #d1fae5;
}

.event-attachment-icon.is-slides {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #ffedd5;
}

.notes-attachment-delete {
  margin-left: 0.5rem;
  border: 1px solid #f87171;
  background: transparent;
  color: #f87171;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  cursor: pointer;
}

.notes-attachment-delete:hover {
  background: rgba(248, 113, 113, 0.15);
}

.notes-attempt-form {
  display: grid;
  gap: 0.6rem;
}

.notes-time-toggle {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.notes-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.notes-warning {
  color: #facc15;
  font-size: 0.78rem;
}

.subtopic-coverage.is-warning {
  color: #e2e8f0;
}

.coverage-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5f5;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-row.compact {
  margin: 0;
}

.hidden {
  display: none !important;
}

.usage-practice-grid,
.usage-highyield-grid,
.usage-aamc-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.usage-practice-card,
.usage-provider-card,
.usage-highyield-card,
.usage-aamc-pack-card {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.usage-breakdown-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.usage-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.usage-practice-metrics {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.usage-practice-metrics span {
  flex: 1;
}

.usage-highyield-card .usage-row-meta {
  color: #f8fafc;
}

.usage-aamc-pack-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.usage-pack-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #e2e8f0;
}

/* UWorld category/detail styling */
.uw-set-list {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.uw-set-row {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.uw-set-row--muted {
  border-style: dashed;
  color: #cbd5f5;
  font-size: 0.9rem;
}

.uw-set-title {
  font-weight: 600;
  color: #f8fafc;
}

.uw-set-meta {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.uw-set-progress {
  height: 0.45rem;
}

.server-url-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.server-url-row label {
  flex: 1 1 260px;
}

.help-text {
  flex: 1 1 260px;
  margin: 0;
  color: #cbd5f5;
  font-size: 0.95rem;
  line-height: 1.4;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

label {
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="file"],
select,
textarea {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  resize: vertical;
  min-height: 44px;
  font-family: var(--numeric-font);
  transition: all var(--transition-base);
}

input[type="text"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
  border-color: rgba(108, 124, 255, 0.3);
}

input[type="time"],
.day-total,
.availability-total {
  font-variant-numeric: proportional-nums;
  letter-spacing: 0.01em;
  font-family: var(--numeric-font);
  font-weight: 500;
}

textarea {
  min-height: 110px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.availability-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.day {
  background: var(--card-elevated);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.day:hover {
  border-color: rgba(108, 124, 255, 0.3);
}

.day.is-active {
  border-color: var(--accent);
  background: var(--card-surface);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-md);
}

.day label {
  font-weight: 600;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.day-left {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 160px;
  flex: 0 0 160px;
}

.day-right {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.8rem;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.day-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.day-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.link {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--accent-strong);
  padding: 0.25rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.link:hover {
  color: #dbeafe;
  background: rgba(75, 144, 240, 0.12);
}

.day.is-disabled {
  opacity: 0.6;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.day-total {
  font-size: 0.78rem;
  color: var(--muted);
}

.ghost {
  background: rgba(75, 144, 240, 0.12);
  border: 1px solid rgba(75, 144, 240, 0.35);
  color: #dbeafe;
  box-shadow: none;
}

.ghost:hover {
  border-color: rgba(75, 144, 240, 0.7);
  background: rgba(75, 144, 240, 0.18);
}

.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1 1 auto;
}

.slot-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-variant-numeric: proportional-nums;
  letter-spacing: 0.01em;
  font-family: var(--numeric-font);
  font-weight: 500;
}

.step-kicker,
.summary-chip,
.pill,
.badge,
.status-note,
.fl-plan-summary,
.fl-plan-summary *,
.fl-card,
.fl-card * {
  font-family: var(--numeric-font);
  font-variant-numeric: proportional-nums;
}

.slot-row input[type="time"] {
  min-width: 130px;
}

.availability-list .slot-row input[type="time"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}

.slot-sep {
  color: var(--muted);
  font-size: 0.78rem;
}

.slot-remove {
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.9);
  border-radius: 999px;
  padding: 0.2rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
}

.slot-remove:hover {
  border-color: rgba(248, 113, 113, 0.7);
  color: #fecaca;
}

.slot-empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.slot-empty.is-hidden {
  display: none;
}

.day-disabled-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  display: none;
}

.day-right .slot-empty,
.day-right .day-disabled-hint {
  margin: 0;
}

.day.is-disabled .day-disabled-hint {
  display: block;
}

.day.is-disabled .slot-list,
.day.is-disabled .slot-empty,
.day.is-disabled .link {
  display: none;
}

.availability-panels {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.availability-panel {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.availability-panel:not(.calendar-panel) {
  border-color: rgba(108, 124, 255, 0.25);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.availability-panel.calendar-panel {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.calendar-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calendar-panel.connected::before {
  opacity: 0.6;
}

.calendar-panel:hover {
  border-color: rgba(75, 144, 240, 0.2);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(75, 144, 240, 0.1);
}

.calendar-panel.connected {
  border-color: var(--calendar-success-border);
}

.calendar-panel.error {
  border-color: var(--calendar-error-border);
}

.pill-list {
  margin-top: 0.75rem;
  padding: 0.75rem;
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: var(--card-elevated);
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(108, 124, 255, 0.3);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.pill-remove {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0 0.35rem;
  line-height: 1.1;
  cursor: pointer;
}

.pill-remove:hover {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.panel-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

.panel-header .help-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.25rem 0 0 0;
}

.calendar-steps {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

.calendar-steps li {
  padding: 0.15rem 0;
}

.calendar-status-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.calendar-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.3s ease;
}

.calendar-status-badge[data-status="disconnected"] {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--muted);
}

.calendar-status-badge[data-status="connecting"] {
  background: var(--calendar-connecting-soft);
  border-color: var(--calendar-connecting-border);
  color: var(--calendar-connecting);
  box-shadow: 0 0 16px -6px var(--calendar-connecting);
}

.calendar-status-badge[data-status="connected"] {
  background: var(--calendar-success-soft);
  border-color: var(--calendar-success-border);
  color: var(--calendar-success);
  box-shadow: 0 0 16px -6px var(--calendar-success);
}

.calendar-status-badge[data-status="importing"] {
  background: var(--calendar-info-soft);
  border-color: var(--calendar-info-border);
  color: var(--calendar-info);
  box-shadow: 0 0 16px -6px var(--calendar-info);
}

.calendar-status-badge[data-status="error"] {
  background: var(--calendar-error-soft);
  border-color: var(--calendar-error-border);
  color: var(--calendar-error);
  box-shadow: 0 0 16px -6px var(--calendar-error);
}

.status-icon {
  font-size: 0.75rem;
  line-height: 1;
  animation: pulse 2s ease-in-out infinite;
}

.calendar-status-badge[data-status="connecting"] .status-icon,
.calendar-status-badge[data-status="importing"] .status-icon {
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.calendar-meta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calendar-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.meta-icon {
  opacity: 0.6;
}

.calendar-meta-item strong {
  color: var(--text);
  font-weight: 600;
}

.calendar-input-group {
  margin: 1rem 0 1.25rem;
}

.calendar-input-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.label-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.label-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
}

.calendar-input {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.calendar-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 0 0 3px var(--accent-ghost);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -0.25rem;
}

.calendar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calendar-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.calendar-actions-secondary {
  display: flex;
  justify-content: flex-end;
}

.calendar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.calendar-btn-small {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-icon {
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.calendar-btn:hover .btn-icon {
  opacity: 1;
  transform: translateX(1px);
}

button.primary.calendar-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -24px rgba(75, 144, 240, 0.9);
}

button.secondary.calendar-btn:hover {
  background: rgba(75, 144, 240, 0.25);
  border-color: rgba(75, 144, 240, 0.6);
  transform: translateY(-1px);
}

button.calendar-btn:active {
  transform: translateY(0);
}

button.calendar-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ghost);
}

button.calendar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

button.calendar-btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

button.calendar-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

button.tertiary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

button.tertiary:hover {
  background: rgba(248, 113, 113, 0.12);
  color: var(--calendar-error);
  border-color: var(--calendar-error-border);
}

/* Calendar Selector Styles */
.calendar-selector-group {
  margin: 1rem 0 1.25rem;
}

.calendar-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calendar-selector-header .label-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.calendar-icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.refresh-btn {
  padding: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent-soft);
}

.calendar-placeholder {
  padding: 1.5rem;
  text-align: center;
  background: var(--card-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.875rem;
}

.calendar-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.calendar-list::-webkit-scrollbar {
  width: 6px;
}

.calendar-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 999px;
}

.calendar-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

.calendar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-soft);
}

.calendar-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.calendar-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}

.primary-badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ghost);
  border-radius: 4px;
}

.calendar-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.google-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.google-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.google-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin-top 0.3s ease;
}

.google-progress.active {
  opacity: 1;
  max-height: 100px;
  padding: 0.75rem;
  margin-top: 1rem;
}

.google-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  position: relative;
}

.google-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.google-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 50%, var(--calendar-info) 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: gradient-shift 2s ease infinite;
  position: relative;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.google-progress-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  min-width: 10rem;
  text-align: right;
}

.google-log {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  color: #cbd5f5;
  font-size: 0.85rem;
  min-height: 3.5rem;
  max-height: 160px;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0.75rem;
}

.google-log::-webkit-scrollbar {
  width: 6px;
}

.google-log::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 999px;
}

.google-log::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

.google-log::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

.google-log .muted {
  color: var(--muted);
  font-style: italic;
}

.google-log li {
  line-height: 1.5;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 2px solid var(--accent-soft);
  animation: slideInLog 0.3s ease;
  transform-origin: top;
}

@keyframes slideInLog {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.google-log li:first-child {
  border-left-color: var(--accent);
}

.availability-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.9rem 1.4rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.availability-copy-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.85rem;
}

.availability-copy-panel.is-hidden {
  display: none;
}

.copy-panel-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.copy-source {
  font-weight: 600;
  color: #e2e8f0;
}

.copy-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.copy-target-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.copy-target-label select {
  min-width: 150px;
}

.copy-target-label select,
#availability-copy-apply,
#availability-copy-clear {
  align-self: center;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.toolbar-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.availability-actions {
  margin-left: auto;
}

.availability-active {
  font-weight: 600;
  color: #e2e8f0;
}

.availability-hint {
  font-size: 0.9rem;
  color: var(--muted);
}

.btn-small {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
}

.button-row.compact {
  gap: 0.5rem;
}

.availability-summary {
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 0.75rem 1rem;
}

.availability-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.availability-total {
  font-weight: 600;
  color: #e2e8f0;
}

.availability-summary-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.availability-summary-list li {
  color: #cbd5f5;
  font-size: 0.9rem;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.checkbox-row label {
  font-weight: 500;
  flex-direction: row;
  gap: 0.5rem;
}

.checkbox-row .disabled {
  opacity: 0.7;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

button {
  border: none;
  border-radius: var(--radius-xl);
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow), 0 1px 2px rgba(0, 0, 0, 0.3);
}

button.primary:hover {
  box-shadow: 0 6px 24px var(--accent-glow), 0 2px 4px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

button.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px var(--accent-glow), 0 1px 2px rgba(0, 0, 0, 0.3);
}

button.secondary {
  background: var(--card-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

button.secondary:hover {
  border-color: var(--accent);
  background: var(--card-surface);
  box-shadow: var(--shadow-md);
}

button.tertiary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

button.tertiary:hover {
  background: var(--card-surface);
  color: var(--text);
  border-color: var(--border);
}

button.danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

button.danger:hover {
  background: rgba(255, 107, 107, 0.25);
  border-color: var(--danger);
}

.wizard-sidebar .sidebar-group-toggle,
.wizard-sidebar .sidebar-link {
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.actions #status,
.status-note {
  flex: 1 1 260px;
  font-weight: 500;
  color: #facc15;
  min-height: 1.5rem;
  margin: 0;
  transition: color 0.2s ease;
}


.actions #status.success,
.status-note.success {
  color: #4ade80;
}

.actions #status.error,
.status-note.error {
  color: #f87171;
}

.actions #status.warn,
.status-note.warn {
  color: #fbbf24;
}

.upload-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.upload-controls input[type="file"] {
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  padding: 0.75rem;
  color: #e2e8f0;
}

.fl-container {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  margin-top: 1rem;
}

.fl-card {
  background: var(--card-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.fl-card:hover {
  box-shadow: var(--shadow-lg);
}

.fl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(2, 6, 23, 0.25);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.fl-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.fl-card-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.fl-card-summary {
  margin-top: 0.6rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

.fl-card.is-collapsed .fl-card-summary {
  display: flex;
}

.fl-summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fl-summary-test {
  font-weight: 600;
  color: #e2e8f0;
}

.fl-summary-meta {
  display: flex;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.fl-summary-score {
  font-weight: 700;
  color: #e2e8f0;
}

.fl-summary-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fl-summary-score-chip {
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5f5;
}

.fl-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fl-summary-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #dbeafe;
}

.fl-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.fl-card-toggle,
.fl-card-delete {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(108, 124, 255, 0.35);
  background: rgba(108, 124, 255, 0.12);
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.fl-card-toggle:hover,
.fl-card-delete:hover {
  border-color: rgba(108, 124, 255, 0.6);
  background: rgba(108, 124, 255, 0.22);
}

.fl-card-delete {
  color: #fca5a5;
}

.fl-card-toggle {
  transition: transform 0.2s ease;
  border-color: rgba(108, 124, 255, 0.45);
  background: rgba(108, 124, 255, 0.16);
}

.fl-card.is-collapsed .fl-card-toggle {
  transform: rotate(-90deg);
}

.fl-card-body {
  padding: 1rem 1.25rem 1.25rem;
  display: grid;
  gap: 1rem;
  max-height: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.fl-card.is-collapsed .fl-card-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.fl-top-group {
  display: grid;
  gap: 0.85rem;
}

.fl-meta-row,
.fl-score-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.fl-score-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.fl-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: #e2e8f0;
}

.fl-field-full {
  width: 100%;
}

.fl-card .fl-field input,
.fl-card .fl-field select {
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: #e2e8f0;
  padding: 0.6rem 0.75rem;
  min-height: 2.6rem;
  font-size: 0.95rem;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239AA3B2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.fl-card .fl-field input:focus,
.fl-card .fl-field select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.fl-score-error {
  font-size: 0.78rem;
  color: #fca5a5;
  margin-top: 0.2rem;
}

.fl-card-invalid .fl-score {
  border-color: rgba(248, 113, 113, 0.6);
}

.fl-score-invalid {
  border-color: rgba(248, 113, 113, 0.6) !important;
}

.fl-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.fl-breakdown-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.fl-breakdown-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ====================
   FL Breakdown Cards
   Dashboard-inspired
   ==================== */

.fl-breakdowns {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .fl-breakdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fl-section-panel {
  background: var(--card-elevated);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 12px 30px -24px rgba(0, 0, 0, 0.8);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
}

.fl-section-panel:hover {
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.9);
  border-color: rgba(148, 163, 184, 0.18);
}

.fl-section-panel.is-collapsed .fl-section-body,
.fl-section-panel.is-collapsed .fl-section-columns {
  display: none;
}

.fl-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  min-height: 56px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.fl-section-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.fl-section-title {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
}

.fl-section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.fl-section-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.fl-section-header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fl-section-add {
  background: var(--accent-soft);
  border: 1px solid rgba(108, 124, 255, 0.25);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: unset;
}

.fl-section-add:hover {
  background: rgba(108, 124, 255, 0.18);
  border-color: var(--accent);
  transform: none;
}

.fl-section-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(108, 124, 255, 0.45);
  background: rgba(108, 124, 255, 0.14);
  color: #e2e8f0;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: unset;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
}

.fl-section-toggle:hover {
  background: rgba(108, 124, 255, 0.22);
  border-color: rgba(108, 124, 255, 0.6);
  transform: none;
}

.fl-section-panel.is-collapsed .fl-section-toggle {
  transform: rotate(-90deg);
}

.fl-section-columns {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 52px 52px 24px;
  gap: 12px;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 16px;
  padding: 0 4px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-weight: 600;
}

.fl-section-columns span:nth-child(2),
.fl-section-columns span:nth-child(3) {
  text-align: right;
}

.fl-section-body {
  margin-top: 8px;
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.fl-section-body::-webkit-scrollbar {
  width: 6px;
}

.fl-section-body::-webkit-scrollbar-track {
  background: transparent;
}

.fl-section-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
}

.fl-section-rows {
  display: flex;
  flex-direction: column;
}

.fl-section-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 52px 52px 24px;
  gap: 12px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  min-height: 40px;
  transition: background var(--transition-fast);
}

.fl-section-columns-cars,
.fl-section-row-cars {
  grid-template-columns: minmax(260px, 1fr) 52px 52px 24px;
}

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

.fl-section-row:hover {
  background: rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-sm);
}

.fl-section-row input {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 4px 0;
  font-weight: 600;
  font-family: var(--numeric-font);
  min-height: unset;
  box-shadow: none;
  text-align: center;
}

.fl-section-topic {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 2px 1.4rem 2px 0;
  font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  min-height: unset;
  width: 100%;
  display: block;
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239AA3B2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.fl-section-topic:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.fl-section-topic:hover {
  color: #f8fafc;
  box-shadow: inset 0 -2px 0 rgba(108, 124, 255, 0.4);
}

.fl-section-topic::-ms-expand {
  display: none;
}

.fl-section-row input:hover {
  border-color: transparent;
}

.fl-section-row input:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.fl-section-row input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.fl-section-row input[type='number']::-webkit-outer-spin-button,
.fl-section-row input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fl-section-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 600;
  padding: 4px 0;
  font-family: 'Inter', system-ui, sans-serif;
  min-height: unset;
}

.fl-section-select:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.fl-section-label {
  font-family: inherit;
  letter-spacing: 0;
  font-weight: 500;
}

.fl-section-code {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fl-section-code input {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  text-transform: uppercase;
  width: 80px;
}

.fl-section-code select {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  text-transform: none;
  width: 100%;
  padding-right: 1.5rem;
  cursor: pointer;
}

.fl-section-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-height: 1rem;
  line-height: 1.3;
}

.fl-section-code-fixed {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fl-section-label-fixed {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
}

.fl-section-correct,
.fl-section-total {
  text-align: center;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.fl-section-correct input,
.fl-section-total input {
  text-align: center;
  width: 52px;
  font-size: 0.875rem;
}

.fl-section-sep {
  color: var(--text-muted);
  text-align: center;
  font-weight: 400;
  opacity: 0.5;
}

.fl-section-remove {
  background: transparent;
  border: none;
  color: rgba(255, 107, 107, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: unset;
}

.fl-section-remove.is-hidden {
  opacity: 0;
  pointer-events: none;
  cursor: default;
}

.fl-section-remove:hover {
  background: rgba(255, 107, 107, 0.15);
  color: var(--danger);
  opacity: 1;
  transform: none;
}

.fl-section-row:hover .fl-section-remove,
.fl-section-row:focus-within .fl-section-remove {
  opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .fl-section-panel {
    padding: 16px;
  }

  .fl-section-header {
    min-height: unset;
  }

  .fl-section-columns {
    grid-template-columns: minmax(160px, 1fr) 44px 44px 24px;
    gap: 8px;
    font-size: 0.625rem;
  }

  .fl-section-row {
    grid-template-columns: minmax(160px, 1fr) 44px 44px 24px;
    gap: 8px;
    padding: 6px 2px;
  }

  .fl-section-code input {
    width: 64px;
    font-size: 0.8125rem;
  }

  .fl-section-code select {
    width: 100%;
    font-size: 0.8125rem;
  }

  .fl-section-columns-cars,
  .fl-section-row-cars {
    grid-template-columns: minmax(160px, 1fr) 44px 44px 24px;
  }

  .fl-section-correct input,
  .fl-section-total input {
    width: 44px;
    font-size: 0.8125rem;
  }

  .fl-section-desc {
    font-size: 0.6875rem;
  }
}

.analytics-landing-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  background: radial-gradient(circle at top, rgba(20, 32, 46, 0.85) 0%, rgba(10, 15, 24, 0.98) 55%);
  border: 1px solid rgba(40, 52, 74, 0.65);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.analytics-landing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.analytics-landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.analytics-landing-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(40, 52, 74, 0.7);
  background: rgba(14, 22, 34, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.analytics-landing-label {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-landing-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 6px 0 4px;
}

.analytics-landing-subtle {
  font-size: 0.8rem;
  color: #9fb0c8;
}

.analytics-screen {
  display: grid;
  gap: 16px;
  background: radial-gradient(circle at top, rgba(68, 76, 88, 0.25), transparent 45%),
    linear-gradient(180deg, #0a0c0f 0%, #0e1116 45%, #0a0c0f 100%);
  border-radius: 18px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.analytics-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px 20px;
  align-items: end;
  text-align: left;
}

.analytics-hero {
  max-width: 620px;
}

.analytics-hero .analytics-kicker {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #7f8b98;
  font-size: 0.6rem;
  font-weight: 700;
}

.analytics-hero h2 {
  color: #f7f8fa;
  font-family: "Sora", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin: 0.2rem 0 0.35rem;
}

.analytics-hero .step-lede {
  color: #9aa3ae;
  margin: 0;
  max-width: 520px;
}

.analytics-tabs {
  display: flex;
  gap: 0.6rem;
  margin: 0 0 1.2rem;
}

.analytics-tab {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 64, 82, 0.7);
  background: rgba(18, 24, 34, 0.9);
  color: #9aa5b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.analytics-tab.is-active {
  background: rgba(120, 134, 162, 0.25);
  color: #e4e8f3;
  border-color: rgba(120, 134, 162, 0.5);
}

.analytics-filter-shell {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #2d3139;
  background: #11151b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  --analytics-control-height: 34px;
  --analytics-control-pill: 28px;
  --analytics-control-font: 0.7rem;
  --analytics-control-radius: 10px;
  --analytics-control-pad-x: 12px;
}

.analytics-filter-shell--chart {
  margin-bottom: 4px;
}

.analytics-filter-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.analytics-filter-row--global {
  align-items: end;
}

.analytics-filter-row--global .analytics-filter-block {
  align-items: flex-start;
  text-align: left;
}

.analytics-filter-row--scoped {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.analytics-filter-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.analytics-filter-block--resource {
  min-width: 220px;
  position: relative;
  width: 100%;
}

.analytics-filter-block--provider {
  position: relative;
}

@media (min-width: 900px) {
  .analytics-filter-row--global .analytics-filter-block:first-child {
    padding-right: 16px;
  }

  .analytics-filter-row--global .analytics-filter-block--provider,
  .analytics-filter-row--global .analytics-filter-block--resource {
    border-left: 1px solid rgba(45, 49, 57, 0.7);
    padding-left: 16px;
  }

  .analytics-filter-row--global .analytics-filter-block--provider {
    padding-right: 12px;
  }
}

.analytics-filter-label {
  font-size: 0.6rem;
  color: #8a94a1;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-filter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.analytics-provider-types-summary {
  border: 1px solid rgba(88, 166, 255, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: #cdd9f1;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  line-height: 1.1;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.analytics-provider-types-summary:hover,
.analytics-provider-types-summary:focus-visible {
  border-color: rgba(88, 166, 255, 0.65);
  color: #eff6ff;
  outline: none;
}

.analytics-provider-types-summary.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.analytics-segment-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  height: var(--analytics-control-height);
  border-radius: var(--analytics-control-radius);
  background: #1a1d23;
  border: 1px solid #2d3139;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.analytics-segment-group::-webkit-scrollbar {
  display: none;
}

.analytics-segment {
  border: none;
  background: transparent;
  color: #8a93a1;
  font-weight: 600;
  font-size: var(--analytics-control-font);
  padding: 0 var(--analytics-control-pad-x);
  height: var(--analytics-control-pill);
  line-height: var(--analytics-control-pill);
  border-radius: calc(var(--analytics-control-radius) - 2px);
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;
}

.analytics-segment.is-active {
  background: #2d3139;
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.analytics-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-type-dropdown {
  position: relative;
  min-width: 220px;
}

.analytics-type-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--analytics-control-pad-x);
  height: var(--analytics-control-height);
  border-radius: var(--analytics-control-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 18, 24, 0.72);
  color: #dfe6ee;
  font-weight: 600;
  font-size: var(--analytics-control-font);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.analytics-type-trigger:hover,
.analytics-type-trigger:focus {
  border-color: rgba(88, 166, 255, 0.65);
  outline: none;
}

.analytics-type-trigger.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.analytics-type-trigger-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.2);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #e2e8f0;
  white-space: nowrap;
}

.analytics-type-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: rgba(13, 17, 23, 0.98);
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 20;
}

.analytics-type-panel.is-open {
  display: block;
}

.analytics-type-panel[hidden] {
  display: none;
}

.analytics-type-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.analytics-type-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #c9d1d9;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  font-size: 0.7rem;
  font-weight: 600;
}

.analytics-type-item input {
  margin: 0;
  accent-color: #58a6ff;
}

.analytics-type-item:hover {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.08);
  color: #f0f6fc;
}

.analytics-chip-group--provider {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  min-height: var(--analytics-control-height);
  width: 100%;
  min-width: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.analytics-provider-types-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  max-width: min(340px, 90vw);
  background: #0f1318;
  border: 1px solid #2d3139;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 30;
}

.analytics-provider-types-panel.is-open {
  display: block;
}

.analytics-provider-types-header {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #9aa5b2;
  padding: 4px 6px 8px;
}

@media (max-width: 720px) {
  .analytics-chip-group--provider {
    flex-wrap: wrap;
    width: 100%;
  }
}

.analytics-chip-group--provider .analytics-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  border: 1px solid #2d3139;
  background: transparent;
  color: #94a3b8;
  padding: 6px 12px;
  font-size: 0.62rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.analytics-chip-group--provider .analytics-chip:hover:not(.is-active) {
  border-color: #475569;
  color: #e2e8f0;
}

.analytics-chip-group--provider .analytics-chip.is-active {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.analytics-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(26, 29, 35, 0.85);
  color: #d5dde6;
  padding: 0 var(--analytics-control-pad-x);
  height: var(--analytics-control-pill);
  line-height: var(--analytics-control-pill);
  border-radius: calc(var(--analytics-control-radius) - 2px);
  font-size: var(--analytics-control-font);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.analytics-chip.is-active {
  background: rgba(88, 166, 255, 0.2);
  border-color: rgba(88, 166, 255, 0.45);
  color: #eff6ff;
}

.analytics-chip-group.is-disabled .analytics-chip {
  opacity: 0.45;
  cursor: not-allowed;
}

.analytics-filter-panel {
  display: grid;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.analytics-filter-block--section .analytics-chip-group {
  flex-wrap: wrap;
  gap: 6px;
}

.analytics-filter-block--section .analytics-chip {
  padding: 0 calc(var(--analytics-control-pad-x) - 4px);
  font-size: var(--analytics-control-font);
  border-radius: calc(var(--analytics-control-radius) - 2px);
}

.analytics-filter-block--section .analytics-chip {
  padding: 6px 12px;
  font-size: 0.7rem;
}

.analytics-filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}

.analytics-filter-field span {
  font-size: 0.6rem;
  color: #8a94a1;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.analytics-filter-field select {
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, #8b949e 50%),
    linear-gradient(135deg, #8b949e 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 10px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.analytics-filter-panel-actions {
  display: flex;
  justify-content: flex-end;
}

.analytics-clear {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.analytics-clear--inline {
  align-self: center;
  height: 30px;
  padding: 0 12px;
  margin-left: auto;
}

.analytics-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .analytics-filter-primary {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-filter-row--scoped {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-clear--inline {
    margin-left: 0;
    align-self: flex-start;
  }
}


.analytics-select-native {
  display: none;
}

.analytics-dropdown {
  position: relative;
  width: 100%;
}

.analytics-dropdown-trigger {
  width: 100%;
  height: 32px;
  padding: 0 36px 0 12px;
  line-height: 32px;
  border-radius: 8px;
  border: 1px solid #2d3139;
  background: transparent;
  color: #cbd5f5;
  text-align: left;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  font-weight: 600;
}

.analytics-dropdown-trigger::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid #8b949e;
  border-bottom: 2px solid #8b949e;
  transform: translateY(-50%) rotate(45deg);
}

.analytics-dropdown-trigger:hover,
.analytics-dropdown-trigger:focus {
  border-color: #58a6ff;
  outline: none;
}

.analytics-dropdown-trigger.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.analytics-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: max-content;
  min-width: 100%;
  background: rgba(13, 17, 23, 0.98);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 20;
}

.analytics-dropdown-panel.is-open {
  display: grid;
  gap: 8px;
}

.analytics-dropdown-search {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: rgba(11, 14, 17, 0.95);
  color: #f0f6fc;
  padding: 8px 10px;
}

.analytics-dropdown-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.analytics-dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: #c9d1d9;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-dropdown-item.is-selected,
.analytics-dropdown-item:hover {
  border-color: #58a6ff;
  color: #f0f6fc;
  background: rgba(88, 166, 255, 0.1);
}

.analytics-dropdown-item.is-hidden {
  display: none;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.analytics-kpi-grid,
.analytics-trend-grid,
.analytics-topic-grid,
.analytics-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.analytics-wide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.analytics-chart-card--wide {
  min-height: 320px;
}

.analytics-kpi-card {
  padding: 20px 22px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  align-content: start;
  min-height: 180px;
  border-radius: 16px;
  background: linear-gradient(145deg, #171d26 0%, #0f131a 100%);
  border: 1px solid #2b313a;
  box-shadow: 0 18px 30px rgba(5, 8, 13, 0.45);
}

.analytics-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9aa4b2;
}

.analytics-kpi-value {
  font-size: 2.4rem;
  font-weight: 700;
  color: #f0f6fc;
  letter-spacing: -0.02em;
}

.analytics-kpi-trend {
  font-size: 0.75rem;
  color: #8b949e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
  border: 1px solid transparent;
  background: rgba(56, 139, 253, 0.12);
  text-transform: capitalize;
  letter-spacing: 0.04em;
}

.analytics-kpi-chart {
  height: 48px;
  opacity: 0.85;
  justify-self: end;
  width: 140px;
}

.analytics-kpi-fl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 4px;
  color: #b6bec9;
}

.analytics-kpi-fl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.analytics-kpi-fl-label {
  color: #7e8794;
}

.analytics-kpi-fl-value {
  color: #f0f6fc;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.analytics-chart-card {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
  min-height: 320px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(68, 104, 168, 0.18), transparent 45%),
    #11141a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.analytics-chart-card--single {
  min-height: 420px;
}

.analytics-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.analytics-chart-subtle {
  margin-top: 6px;
  color: #8f9aa6;
  font-size: 0.85rem;
}

.analytics-card-meta {
  font-size: 0.68rem;
  color: #7d8894;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: rgba(9, 11, 14, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 12px;
}

.analytics-card-metrics {
  display: grid;
  gap: 6px;
  text-align: right;
}

.analytics-card-metric {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
}

.analytics-metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #7b8692;
  font-weight: 600;
}

.analytics-metric-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: #f7f8fa;
  font-family: "Sora", "Space Grotesk", sans-serif;
}

.analytics-metric-trend {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2bd576;
}

.analytics-chart {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13, 16, 22, 0.9), rgba(10, 12, 15, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (max-width: 900px) {
  .analytics-header {
    grid-template-columns: 1fr;
  }

  .analytics-card-header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .analytics-card-metrics {
    text-align: left;
    align-items: flex-start;
  }
}

.analytics-chart-canvas {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
}

.analytics-chart svg {
  width: 100%;
  height: 100%;
}

.analytics-chart-yaxis {
  position: absolute;
  inset: 6px auto 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #8b949e;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.analytics-chart-axis {
  position: relative;
  height: 28px;
  font-size: 0.72rem;
  color: #8b949e;
  letter-spacing: 0.03em;
  padding-top: 6px;
}

.analytics-chart-axis--dense {
  font-size: 0.6rem;
}

.analytics-axis-label {
  position: absolute;
  bottom: 0;
  white-space: nowrap;
}

.analytics-axis-label[data-row="2"] {
  bottom: -10px;
}

.analytics-axis-label.is-secondary {
  opacity: 0.7;
}

.analytics-chart-tooltip {
  position: absolute;
  pointer-events: auto;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid #30363d;
  color: #f0f6fc;
  font-size: 0.75rem;
  transform: translate(-50%, -100%);
  white-space: normal;
  max-width: 320px;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.analytics-tooltip-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.analytics-tooltip-title {
  color: #f0f6fc;
}

.analytics-tooltip-date {
  color: #8b949e;
  font-weight: 500;
  white-space: nowrap;
}

.analytics-tooltip-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow: auto;
}

.analytics-tooltip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f0f6fc;
  text-decoration: none;
}

.analytics-tooltip-item:hover {
  text-decoration: underline;
}

.analytics-tooltip-link-title {
  flex: 1 1 auto;
}

.analytics-tooltip-link-score {
  color: #9aa3ae;
  font-size: 0.7rem;
  white-space: nowrap;
}

.analytics-tooltip-empty {
  margin-top: 6px;
  color: #9aa3ae;
  font-size: 0.72rem;
}

.analytics-tooltip-more {
  margin-top: 4px;
  color: #9aa3ae;
  font-size: 0.7rem;
}

.analytics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: #8b949e;
}

.analytics-table-shell {
  display: none;
  overflow-x: auto;
}

.analytics-table-shell--practice,
.analytics-table-shell--fl {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 6px;
}

.analytics-screen.analytics-mode-tables .analytics-chart,
.analytics-screen.analytics-mode-tables .analytics-chart-legend {
  display: none;
}

.analytics-screen.analytics-mode-tables .analytics-table-shell {
  display: block;
}

.analytics-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.analytics-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.analytics-inline-filter {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: #8b949e;
  min-width: 160px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-inline-filter select {
  padding: 8px 34px 8px 10px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: rgba(13, 17, 23, 0.85);
  color: #f0f6fc;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8b949e 50%),
    linear-gradient(135deg, #8b949e 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.analytics-inline-filter select:hover,
.analytics-inline-filter select:focus {
  border-color: #58a6ff;
  outline: none;
}

.analytics-card {
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #161b22;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.analytics-screen .status-note {
  color: #8b949e;
}

.analytics-screen .status-note.warn,
.analytics-screen .status-note.error {
  color: #8b949e;
}

.analytics-ghost {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  color: #8b949e;
  padding: 12px;
}

.analytics-ghost-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(72, 79, 88, 0.2);
  color: #484f58;
}

.analytics-ghost-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c9d1d9;
}

.analytics-ghost-link {
  font-size: 0.82rem;
  color: #58a6ff;
  text-decoration: none;
}

.analytics-card h3 {
  margin-bottom: 12px;
  color: #f0f6fc;
}

.analytics-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.analytics-data-table--practice,
.analytics-data-table--fl {
  border-collapse: separate;
  border-spacing: 0;
}

.analytics-data-table--fl-matrix {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

.analytics-data-table th,
.analytics-data-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.analytics-data-table th {
  color: #8b949e;
  font-weight: 600;
}

.analytics-data-table--practice th,
.analytics-data-table--fl th {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  background: #050505;
}

.analytics-data-table--fl-matrix th,
.analytics-data-table--fl-matrix td {
  text-align: center;
  padding: 10px 8px;
}

.analytics-data-table--fl-matrix th:first-child,
.analytics-data-table--fl-matrix td:first-child {
  text-align: left;
  min-width: 220px;
  max-width: 320px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.analytics-data-table--fl-matrix th:nth-child(2),
.analytics-data-table--fl-matrix td:nth-child(2) {
  width: 140px;
}

.analytics-data-table--fl-matrix th:last-child,
.analytics-data-table--fl-matrix td:last-child {
  width: 160px;
}

.analytics-data-table--fl-matrix th:nth-last-child(2),
.analytics-data-table--fl-matrix td:nth-last-child(2) {
  width: 140px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-data-table--fl-matrix th:not(:first-child):not(:nth-last-child(2)):not(:last-child),
.analytics-data-table--fl-matrix td:not(:first-child):not(:nth-last-child(2)):not(:last-child) {
  width: 180px;
}

.analytics-data-table--fl-matrix th:not(:first-child):not(:nth-last-child(2)):not(:last-child),
.analytics-data-table--fl-matrix td:not(:first-child):not(:nth-last-child(2)):not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-data-table--fl-matrix th:nth-last-child(2),
.analytics-data-table--fl-matrix td:nth-last-child(2) {
  padding-right: 18px;
}

.analytics-data-table--fl-matrix th:last-child,
.analytics-data-table--fl-matrix td:last-child {
  padding-left: 18px;
}

.analytics-fl-col-header {
  display: grid;
  gap: 4px;
  min-width: 150px;
  text-transform: none;
  letter-spacing: normal;
}

.analytics-fl-col-header * {
  text-transform: none;
  letter-spacing: normal;
}

.analytics-fl-col-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.analytics-fl-col-title {
  color: #f0f6fc;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

.analytics-fl-col-provider {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: normal;
}

.analytics-fl-cell {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.analytics-fl-cell-main {
  font-weight: 600;
  color: #f0f6fc;
}

.analytics-fl-cell-sub {
  font-size: 0.7rem;
  color: #8b949e;
}

.analytics-fl-cell--total .analytics-fl-cell-main {
  color: #a5d6ff;
}

.analytics-fl-cell-bar {
  width: 100%;
  max-width: 160px;
  margin-top: 4px;
}

.analytics-fl-cell-bar .analytics-bar--score {
  height: 8px;
}

.analytics-sparkline--fl {
  width: 110px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.analytics-bar {
  height: 8px;
  border-radius: 999px;
  background: #21262d;
  overflow: hidden;
}

.analytics-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #c9d1d9);
}

.analytics-bar--score {
  position: relative;
  height: 10px;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.analytics-bar--score .analytics-bar-fill {
  background: linear-gradient(90deg, var(--bar-accent, #58a6ff), rgba(255, 255, 255, 0.85));
  box-shadow: 0 0 12px var(--bar-accent, #58a6ff);
}

.analytics-bar--score .analytics-bar-glow {
  position: absolute;
  top: -1px;
  left: 0;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bar-accent, #58a6ff), transparent);
  pointer-events: none;
}

.analytics-table-shell--practice .analytics-data-table {
  table-layout: fixed;
}

.analytics-data-table--practice tbody tr td,
.analytics-data-table--fl tbody tr td {
  background: #000;
  backdrop-filter: none;
}

.analytics-data-table--practice tbody tr:hover td,
.analytics-data-table--fl tbody tr:hover td {
  background: #080808;
}

.analytics-data-table--practice tbody tr.analytics-row--section td {
  background: #0d0d0d;
}

.analytics-data-table--practice tbody tr.analytics-row--category td {
  background: #070707;
}

.analytics-table-shell--practice .analytics-data-table th:nth-child(2),
.analytics-table-shell--practice .analytics-data-table td:nth-child(2) {
  width: 110px;
}

.analytics-table-shell--practice .analytics-data-table th:nth-child(3),
.analytics-table-shell--practice .analytics-data-table td:nth-child(3) {
  width: 140px;
}

.analytics-table-shell--practice .analytics-data-table th:nth-child(4),
.analytics-table-shell--practice .analytics-data-table td:nth-child(4) {
  width: 180px;
}

.analytics-sparkline-cell {
  padding-right: 28px;
}

.analytics-sparkline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 110px;
  height: 32px;
  color: inherit;
}

.analytics-data-table--practice td:nth-child(3),
.analytics-data-table--practice th:nth-child(3) {
  text-align: center;
  padding-left: 28px;
  padding-right: 18px;
}

.analytics-data-table--practice td:nth-child(4),
.analytics-data-table--practice th:nth-child(4) {
  padding-left: 28px;
}

.analytics-sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}
}

.analytics-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.12);
  color: #8fd1ff;
  white-space: nowrap;
}

.analytics-topic {
  display: grid;
  gap: 6px;
}

.analytics-topic-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-left: calc(var(--level, 0) * 14px);
}

.analytics-topic-body {
  min-width: 0;
}

.analytics-topic-title {
  font-weight: 600;
  color: #f5f5f5;
  line-height: 1.3;
  word-break: break-word;
}

.analytics-topic-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.analytics-topic-divider {
  color: rgba(255, 255, 255, 0.2);
}

.analytics-topic-category {
  max-width: 320px;
}

.analytics-topic-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9bb5ff;
}

.analytics-topic-tag--cp {
  color: #6ecbff;
}

.analytics-topic-tag--bb {
  color: #6fe7b1;
}

.analytics-topic-tag--ps {
  color: #e1a6ff;
}

.analytics-topic-tag--cars {
  color: #ffc98a;
}

.analytics-topic-note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: none;
  letter-spacing: 0.02em;
}

.analytics-topic-source {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.analytics-row-toggle,
.analytics-row-spacer {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  flex: 0 0 16px;
}

.analytics-row-toggle {
  border: none;
  border-radius: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.analytics-row-toggle[aria-expanded="true"] {
  transform: rotate(90deg);
  color: #ffffff;
}

.analytics-provider-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.analytics-provider-more {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px dashed #30363d;
}

.analytics-row--provider td {
  color: #9aa4b2;
}


.analytics-score-cell {
  display: grid;
  gap: 0;
  text-align: center;
}

.analytics-score-main {
  font-weight: 600;
  color: #f5f5f5;
}

.analytics-score-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.analytics-accuracy-cell {
  display: grid;
  gap: 6px;
}

.analytics-accuracy-main {
  font-weight: 600;
  color: #f5f5f5;
}

.analytics-muted {
  color: rgba(255, 255, 255, 0.4);
}

.analytics-recent {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #161b22;
  border: 1px solid #30363d;
}

.analytics-recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.analytics-recent-list {
  display: grid;
  gap: 10px;
}

.analytics-recent-item {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
}

.analytics-recent-meta {
  font-size: 0.85rem;
  color: #8b949e;
}

.analytics-score-pill {
  align-self: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #21262d;
  border: 1px solid #30363d;
  color: #f0f6fc;
  font-weight: 600;
}

.fl-plan-summary {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(108, 124, 255, 0.35);
  background: linear-gradient(180deg, var(--card-surface) 0%, rgba(24, 27, 34, 0.6) 100%);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  position: relative;
}

.fl-plan-summary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(108, 124, 255, 0.3), transparent 50%, rgba(108, 124, 255, 0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.fl-plan-summary .fl-summary-shell {
  display: grid;
  gap: 0.75rem;
}

.fl-plan-summary .fl-summary-section {
  background: rgba(28, 32, 40, 0.6);
  border: 1px solid rgba(35, 39, 52, 0.85);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
}

.fl-plan-summary h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.fl-plan-summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.fl-plan-summary li {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(140px, 0.9fr) minmax(160px, 1fr);
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}

.fl-plan-summary .fl-pref-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(24, 27, 34, 0.72);
  padding: 0.65rem 0.75rem;
}

.fl-plan-summary .fl-pref-copy {
  min-width: 0;
  display: grid;
  gap: 0.38rem;
}

.fl-plan-summary .fl-report-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.fl-plan-summary .fl-pref-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}

.fl-plan-summary .fl-pref-title {
  font-weight: 600;
  color: var(--text-main);
}

.fl-plan-summary .fl-pref-meta {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fl-plan-summary .fl-report-date-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.16rem 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.3);
}

.fl-plan-summary .fl-report-date-inline span {
  font-size: 0.64rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fl-plan-summary .fl-report-date-inline strong {
  font-size: 0.75rem;
  color: var(--text-main);
  font-weight: 600;
}

.fl-plan-summary .fl-report-scoreline {
  display: grid;
  gap: 0.4rem;
}

.fl-plan-summary .fl-report-total {
  display: inline-flex;
  align-items: baseline;
  gap: 0.38rem;
  width: max-content;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(108, 124, 255, 0.15);
  border: 1px solid rgba(108, 124, 255, 0.34);
}

.fl-plan-summary .fl-report-total .fl-report-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}

.fl-plan-summary .fl-report-total strong {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 700;
}

.fl-plan-summary .fl-report-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.fl-plan-summary .fl-report-section-chip {
  display: inline-flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.22rem 0.42rem;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.28);
}

.fl-plan-summary .fl-report-section-chip em {
  font-style: normal;
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fl-plan-summary .fl-report-section-chip strong {
  font-size: 0.78rem;
  color: var(--text-main);
  font-weight: 700;
}

.fl-plan-summary .fl-pref-control {
  min-width: 0;
}

.fl-plan-summary .fl-pref-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.fl-plan-summary .fl-order-list {
  gap: 0.5rem;
}

.fl-plan-summary .fl-order-item {
  grid-template-columns: auto auto minmax(0, 1fr) minmax(146px, 176px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(24, 27, 34, 0.72);
  padding: 0.65rem 0.75rem;
  cursor: default;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.fl-plan-summary .fl-order-item.is-dragging {
  opacity: 0.85;
  border-color: rgba(108, 124, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(108, 124, 255, 0.2), var(--shadow-sm);
}

.fl-plan-summary .fl-order-item.is-drag-over {
  border-color: rgba(108, 124, 255, 0.7);
  background: rgba(108, 124, 255, 0.1);
}

.fl-plan-summary .drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0.26rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
}

.fl-plan-summary .drag-handle:active {
  cursor: grabbing;
}

.fl-plan-summary .fl-order-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(108, 124, 255, 0.35);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
}

.fl-plan-summary .fl-order-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.fl-plan-summary .fl-date-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
}

.fl-plan-summary .fl-date-input:hover {
  border-color: rgba(148, 163, 184, 0.5);
}

.fl-plan-summary .fl-name {
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.fl-plan-summary .fl-order-meta {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.fl-plan-summary .fl-override-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(35, 39, 52, 0.8);
}

.fl-plan-summary .redo-select select {
  width: 100%;
  min-height: 36px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.45rem 0.6rem;
  font-size: 0.84rem;
}

.fl-plan-summary .redo-select select:hover {
  border-color: rgba(148, 163, 184, 0.5);
}

.fl-score-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0.5rem 0 0.75rem;
}

.fl-plan-summary .muted {
  color: var(--text-muted);
}

.fl-plan-summary .fl-apply-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.fl-plan-summary .fl-apply-status.is-pending {
  color: var(--accent);
  border-color: rgba(108, 124, 255, 0.4);
  background: rgba(108, 124, 255, 0.15);
}

.fl-plan-summary .fl-apply-status.is-preview {
  color: #b7c2d6;
  border-color: rgba(148, 163, 184, 0.28);
}

.fl-plan-summary .warning {
  margin: 0 0 0.55rem;
  color: #fcd34d;
  font-weight: 600;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.08);
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
}

.fl-plan-summary .drag-handle:focus-visible,
.fl-plan-summary .fl-date-input:focus-visible,
.fl-plan-summary .redo-select select:focus-visible,
.fl-plan-summary #fl-apply-overrides:focus-visible {
  outline: 2px solid rgba(108, 124, 255, 0.65);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .fl-plan-summary li {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.9fr);
  }

  .fl-plan-summary .fl-order-item {
    grid-template-columns: auto auto minmax(0, 1fr) minmax(128px, 156px);
  }
}

@media (max-width: 720px) {
  .fl-plan-summary {
    padding: 0.75rem;
  }

  .fl-plan-summary li,
  .fl-plan-summary .fl-order-item {
    grid-template-columns: 1fr;
  }

  .fl-plan-summary .fl-order-item {
    gap: 0.55rem;
  }

  .fl-plan-summary .fl-report-head {
    align-items: flex-start;
  }

  .fl-plan-summary .fl-report-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fl-plan-summary .fl-override-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .fl-plan-summary #fl-apply-overrides {
    width: 100%;
  }

  .fl-plan-summary .fl-apply-status {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fl-plan-summary .fl-order-item,
  .fl-plan-summary .drag-handle {
    transition: none;
  }
}

.response {
  min-height: 160px;
  background: #f6f5ff;
  border: 1px solid #e2defa;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
  color: #1f2433;
  box-shadow: 0 12px 24px rgba(88, 78, 255, 0.12);
}

.response.collapsed {
  display: none;
}

.selection-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0;
  padding-bottom: 0;
  align-items: center;
}

.resource-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.3);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.resource-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.resource-chip .resource-label::before {
  content: '';
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  margin-right: 0.2rem;
  vertical-align: middle;
  background: rgba(148, 163, 184, 0.5);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.75);
}

.resource-chip input:checked+.resource-label {
  color: #f8fafc;
}

.resource-chip input:checked+.resource-label::before {
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.6);
}

.resource-chip.is-checked {
  background: transparent;
  border-color: rgba(99, 179, 237, 0.45);
}

.resource-chip[data-resource="kaplan"] {
  color: #f97316;
}

.resource-chip[data-resource="ka"] {
  color: #14b8a6;
}

.resource-chip[data-resource="jw"] {
  color: #60a5fa;
}

.resource-chip[data-resource="uworld"] {
  color: #c084fc;
}

.resource-chip.disabled,
.resource-chip input:disabled+.resource-label {
  opacity: 0.5;
  cursor: not-allowed;
}

.estimate-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.estimate-row .response {
  flex: 1 1 auto;
}

@media (max-width: 900px) {
  .estimate-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.collapse-toggle {
  margin-bottom: 0.75rem;
}

.calendar-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row dense;
  gap: 1.25rem;
  align-items: flex-start;
}

.calendar-wrapper.calendar-layout {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.calendar-wrapper.calendar-layout.calendar-layout--full {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-rail {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 22, 30, 0.95), rgba(14, 18, 26, 0.95));
  border: 1px solid rgba(42, 52, 68, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 24px rgba(6, 9, 16, 0.6);
}

.calendar-main {
  min-width: 0;
  position: relative;
}

.calendar-main.is-loading {
  cursor: progress;
}

/* .calendar-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(48, 52, 58, 0.25);
  border-radius: 16px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.calendar-main.is-loading .calendar-loading {
  opacity: 1;
  pointer-events: auto;
}

.calendar-loading-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  background: rgba(16, 20, 26, 0.8);
  border: 1px solid rgba(94, 230, 150, 0.55);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(6, 10, 16, 0.5);
}

.calendar-loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.calendar-loading-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(94, 230, 150, 0.35);
  border-top-color: rgba(94, 230, 150, 1);
  box-shadow: 0 0 16px rgba(94, 230, 150, 0.85), 0 0 32px rgba(94, 230, 150, 0.35);
  animation: calendar-spin 0.8s linear infinite;
}

@keyframes calendar-spin {
  to {
    transform: rotate(360deg);
  }
} */

.mini-calendar {
  background: rgba(16, 20, 28, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(38, 48, 64, 0.8);
  padding: 0.75rem;
  box-shadow: inset 0 0 18px rgba(8, 12, 18, 0.6);
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mini-calendar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d6dbe6;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.mini-calendar-nav {
  width: 28px;
  height: 28px;
  min-width: 28px;
  /* Force minimum */
  min-height: 28px;
  /* Force minimum */
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #c9d2e3;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0;
  cursor: pointer;
  flex-shrink: 0;
  /* Prevent squishing */
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mini-calendar-nav:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.mini-calendar-nav svg {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
}

.mini-calendar-grid {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #a7b0c2;
}

.mini-calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}

.mini-calendar-weekdays span {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: #7d8799;
}

.mini-calendar-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border-radius: 8px;
}

.mini-calendar-row .is-muted {
  color: #505a6c;
}

.mini-calendar-row .is-active {
  background: rgba(83, 209, 222, 0.18);
  color: #d6f4f6;
  box-shadow: inset 0 0 0 1px rgba(83, 209, 222, 0.4);
}

.mini-tabs {
  display: flex;
  gap: 0.5rem;
}

.mini-tab {
  flex: 1 1 0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 64, 82, 0.7);
  background: rgba(18, 24, 34, 0.9);
  color: #9aa5b8;
  font-size: 0.75rem;
}

.mini-tab.is-active {
  background: rgba(120, 134, 162, 0.25);
  color: #e4e8f3;
  border-color: rgba(120, 134, 162, 0.5);
}

.mini-upnext {
  display: grid;
  gap: 0.5rem;
}

.mini-event {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(16, 20, 28, 0.85);
  border: 1px solid rgba(38, 48, 64, 0.7);
}

.mini-event-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(128, 144, 190, 0.9), rgba(96, 118, 170, 0.9));
}

.mini-event-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e3e7f2;
  margin: 0;
}

.mini-event-meta {
  font-size: 0.75rem;
  color: #9aa5b8;
  margin: 0.1rem 0 0;
}

.mini-event:hover {
  border-color: rgba(95, 116, 164, 0.6);
  box-shadow: 0 8px 16px rgba(7, 10, 18, 0.45);
}

@media (max-width: 1100px) {
  .calendar-wrapper.calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-rail {
    order: 2;
  }
}

.calendar-wrapper.use-popup {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-wrapper.has-popup .event-details {
  display: none;
}

#calendar-status {
  grid-column: 1 / -1;
}

.calendar {
  grid-column: 1 / 2;
}

.event-details {
  display: none;
  grid-column: 2 / 3;
}

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.75rem;
  min-height: 720px;
  width: 100%;
  box-shadow: inset 0 0 24px rgba(10, 12, 18, 0.65);
}

.event-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

.event-popup {
  position: fixed;
  top: 120px;
  right: 24px;
  width: 380px;
  max-width: 92vw;
  max-height: 80vh;
  background: #111522;
  border: 1px solid #23283a;
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(8, 10, 18, 0.55);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.event-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.event-popup.is-dragging {
  cursor: grabbing;
}

.day-events-popup {
  position: fixed;
  top: 140px;
  left: 0;
  width: 420px;
  max-width: 92vw;
  max-height: 75vh;
  background: linear-gradient(135deg, #0d0f16 0%, #12151e 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03);
  padding: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 45;
  backdrop-filter: blur(40px);
}

.day-events-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.day-events-popup.is-dragging {
  cursor: grabbing;
}

.day-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: grab;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.day-events-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.day-events-close {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #b4b9c5;
  padding: 0.35rem 0.65rem;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.day-events-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: scale(1.05);
}

.day-events-body {
  padding: 0.75rem 1rem 1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Modern scrollbar for popup */
.day-events-body::-webkit-scrollbar {
  width: 8px;
}

.day-events-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.day-events-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.day-events-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.day-events-item {
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid var(--item-accent, rgba(124, 92, 255, 0.6));
  box-shadow: inset 3px 0 9px var(--item-glow, rgba(124, 92, 255, 0.2));
  /* Remove button default styles */
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.day-events-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--item-accent, rgba(124, 92, 255, 0.6)) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.day-events-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 7px;
  background: linear-gradient(90deg, var(--item-accent, rgba(124, 92, 255, 0.6)) 0%, transparent 100%);
  opacity: 0.45;
  box-shadow:
    0 0 6px var(--item-glow, rgba(124, 92, 255, 0.2)),
    0 0 10px var(--item-glow, rgba(124, 92, 255, 0.2));
  pointer-events: none;
  z-index: 1;
}

.day-events-item:hover::before {
  opacity: 0.08;
}

.day-events-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
  box-shadow: 0 0 20px var(--item-glow, rgba(124, 92, 255, 0.15));
}

.day-events-popup.debug-glow .day-events-item {
  box-shadow: inset 10px 0 28px rgba(0, 255, 170, 0.85);
  border-left-color: rgba(0, 255, 170, 1);
}

.day-events-popup.debug-glow .day-events-item::after {
  opacity: 1;
  width: 16px;
  background: linear-gradient(90deg, rgba(0, 255, 170, 0.95) 0%, transparent 100%);
}

.day-events-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 2;
  line-height: 1.3;
  /* Truncate long titles with ellipsis */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  text-align: left;
  text-indent: 0;
}

.day-events-item-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  position: relative;
  z-index: 2;
  line-height: 1.4;
  /* Prevent text wrapping - keep provider and time on one line */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-events-empty {
  margin: 1.5rem 0;
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
}

.event-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: grab;
  padding: 0.35rem 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.event-popup-title h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #f8fafc;
}

.event-popup-title .event-date {
  margin: 0.1rem 0 0;
  color: #9aa3b2;
  font-size: 0.9rem;
}

.event-popup-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.event-popup-link .event-link {
  white-space: nowrap;
}

.event-popup-close {
  border: none;
  background: #1f2636;
  color: #c7d2fe;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}

.event-popup-close:hover {
  background: #2a3348;
}

.event-popup-body {
  padding: 0.75rem 0.5rem 0.5rem;
  overflow: auto;
  color: #e5e7eb;
}

.event-details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.event-details h3 {
  margin: 0;
  font-size: 1.2rem;
}

.event-date {
  margin: 0.15rem 0 0;
  color: #cbd5f5;
  font-size: 0.95rem;
}

.event-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1.5rem;
  margin: 1rem 0;
}

.event-popup .event-details-grid dt {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.event-popup .event-details-grid dd {
  margin: 0;
  font-weight: 600;
  color: #e2e8f0;
}

.event-notes-wrapper h4 {
  margin: 0 0 0.5rem;
}

.event-notes {
  padding-left: 1.2rem;
  margin: 0;
  color: #4b5563;
}

.event-popup .event-notes {
  color: #cbd5e1;
}

.event-notes.empty {
  padding-left: 0;
  color: #9ca3af;
}

.event-notes-editor {
  margin-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 0.9rem;
}

.event-completion {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.event-completion-toggle {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 0.45rem;
  font-weight: 600;
  color: #1f2937;
}

.event-completion-toggle input {
  display: inline-block;
  margin: 0;
}

.event-completion-toggle span {
  display: inline-block;
}

.event-completion .status-note {
  margin-left: auto;
  text-align: right;
}

.event-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.event-notes-editor h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.event-notes-input {
  width: 100%;
  background: #141a28;
  border: 1px solid #26324a;
  border-radius: 10px;
  padding: 10px 12px;
  color: #f8fafc;
  font-size: 0.9rem;
  resize: vertical;
}

.event-notes-input::placeholder {
  color: #7b869a;
}

.event-notes-editor.is-disabled {
  opacity: 0.7;
}

.event-notes-upload {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.event-notes-upload input[type="file"] {
  display: none;
}

.notes-assignment-note {
  margin: 0 0 0.75rem 0;
  padding: 0.65rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  font-size: 0.9rem;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.event-tag {
  background: #1a1f33;
  border: 1px solid #2f3a58;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  color: #c7d2fe;
}

.event-tag.muted {
  opacity: 0.6;
}

.event-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(139, 92, 246, 0.55);
  color: #e9d5ff;
  background: #251a3b;
  text-decoration: none;
  white-space: nowrap;
}

.event-link:hover {
  background: #2f2250;
}

.event-link.disabled {
  border-color: rgba(148, 163, 184, 0.4);
  color: #94a3b8;
  background: #1a2030;
  cursor: default;
}

.fc .fc-toolbar.fc-header-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.9rem;
}

.fc .fc-toolbar-title {
  font-size: 1.15rem;
  font-family: 'Space Grotesk', 'IBM Plex Sans', 'Manrope', sans-serif;
  color: var(--text);
}

.fc .fc-button-primary {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text);
  text-transform: capitalize;
  border-radius: 999px;
}

.fc-theme-standard .fc-scrollgrid {
  border-color: rgba(65, 72, 90, 0.55);
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: rgba(65, 72, 90, 0.45);
}

.fc .fc-col-header-cell {
  background: #12161e;
  box-shadow: inset 0 -1px rgba(65, 72, 90, 0.35);
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
  color: var(--text);
  font-weight: 600;
}

.calendar-event,
.fc .fc-daygrid-event,
.fc .fc-list-event {
  --provider-bg: rgba(124, 92, 255, 0.12);
  --provider-border: rgba(124, 92, 255, 0.6);
  --provider-title: #e6e7ef;
  --provider-meta: #a9b2c2;
  --provider-list-text: #e6e7ef;
  --provider-list-bg: rgba(124, 92, 255, 0.12);
}

.fc .fc-daygrid-event {
  border-radius: 10px;
  border-width: 1px;
  border-color: rgba(60, 68, 86, 0.8);
  border-left: 3px solid var(--provider-border, rgba(124, 92, 255, 0.6));
  font-weight: 600;
  background-color: color-mix(in srgb, var(--surface) 78%, var(--provider-bg) 22%);
  color: var(--provider-title, #e6e7ef);
  box-shadow: 0 6px 16px rgba(8, 10, 16, 0.35);
}

.fc .fc-daygrid-day-frame {
  background: var(--surface);
}

.fc .fc-daygrid-event .fc-event-main {
  color: inherit;
  text-shadow: none;
}

.fc .fc-daygrid-event:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 20px rgba(12, 14, 22, 0.4);
}

/* Remove outer border/white line */
.fc .fc-list,
.fc .fc-list-table,
.fc-theme-standard .fc-list {
  border: none !important;
  box-shadow: none !important;
}

.fc .fc-list-event {
  background: color-mix(in srgb, var(--surface) 70%, var(--provider-bg, #7c5cff) 30%);
  border-color: transparent !important;
  /* Remove individual event borders */
  border-left: none !important;
  color: var(--provider-list-text, #e6e7ef);
  box-shadow: none !important;
  /* Remove inner shadow/line */
  position: relative;
  transition: background-color 0.2s ease;
}

/* Fix hover state - darker interaction instead of washout */
.fc .fc-list-event:hover {
  background: color-mix(in srgb, var(--surface) 60%, var(--provider-bg, #7c5cff) 40%) !important;
  cursor: pointer;
  transform: none !important;
  /* styling TR transform is buggy */
}

/* Ensure td backgrounds don't block the row hover color */
.fc .fc-list-event:hover td {
  background: transparent !important;
}

/* Provider Color Mappings for List View */
.fc .fc-list-event.event-kaplan,
.fc .fc-list-event.provider-kaplan {
  --provider-bg: rgba(138, 156, 178, 0.16);
  --provider-border: #4b90f0;
  /* Matches month view blue */
  --provider-list-text: #eef2f7;
}

.fc .fc-list-event.event-khan-academy,
.fc .fc-list-event.provider-khan-academy {
  --provider-bg: rgba(132, 150, 172, 0.16);
  --provider-border: #4CD964;
  /* Matches month view green */
  --provider-list-text: #eef2f7;
}

.fc .fc-list-event.event-jack-westin,
.fc .fc-list-event.provider-jack-westin {
  --provider-bg: rgba(140, 130, 178, 0.16);
  --provider-border: #A78BFA;
  /* Matches month view purple */
  --provider-list-text: #f1eff9;
  --item-accent: #A78BFA;
  /* For glowing pill */
}

.fc .fc-list-event.event-uworld,
.fc .fc-list-event.provider-uworld {
  --provider-bg: rgba(127, 150, 178, 0.16);
  --provider-border: #FF6B6B;
  /* Matches month view red */
  --provider-list-text: #eef2f7;
}

.fc .fc-list-event.event-aamc,
.fc .fc-list-event.provider-aamc {
  --provider-bg: rgba(139, 134, 178, 0.16);
  --provider-border: #FFB547;
  /* Matches month view orange */
  --provider-list-text: #f1eff9;
  --item-accent: #FFB547;
  /* For glowing pill */
}

.fc .fc-list-event.event-system,
.fc .fc-list-event.provider-system {
  --provider-bg: rgba(154, 166, 178, 0.16);
  --provider-border: #6c7cff;
  /* Matches system default */
  --provider-list-text: #eef2f7;
}

.fc .fc-list-event td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  /* Better vertical alignment */
  background: inherit;
  border: none !important;
  /* Remove cell borders */
  position: relative;
  /* For pseudo-elements */
}

/* Rounded corners for the "Card" look in list view */
.fc .fc-list-event td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  /* Replicate the Week View left accent (border-left: 3px solid) using inset shadow */
  /* This ensures it hugs the rounded corners perfectly without layout shifts */
  box-shadow: inset 4px 0 0 0 var(--provider-border, rgba(124, 92, 255, 0.6)) !important;
  border-left: none !important;
  /* Ensure no conflicting real border */
}

.fc .fc-list-event td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Time Column Alignment */
.fc .fc-list-event-time {
  border-left: none !important;
  /* Remove user's temporary test border */
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  display: block;
  width: 160px;
  /* Fixed width to prevent overlap */
  min-width: 160px;
  line-height: 1.25;
  padding-right: 1.5rem;
  /* More breathing room */
  white-space: nowrap;
  text-align: left;
  /* Ensure left alignment */
}

/* Title Column Alignment */
.fc .fc-list-event-title,
.fc .fc-list-event-title a {
  color: var(--provider-list-text, #e6e7ef);
  font-weight: 500;
  display: block;
  line-height: 1.4;
  padding-left: 0;
  /* padding handled by time column's right padding or td */
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc .fc-list-event-graphic {
  display: none;
}

.fc .fc-list-day-text {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.fc .fc-list-day-side-text {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.fc .fc-list-event-dot {
  display: none;
  /* Hide the dot, use colored left border */
}

.fc .fc-list-table {
  background: transparent !important;
  /* Remove table background */
}

.fc .fc-list-day-cushion {
  background: #0f131a !important;
  /* Darker header background */
  color: var(--text);
  border: none !important;
  /* Remove header border */
  padding: 0.75rem 1.25rem;
}

.fc .fc-list-day,
.fc .fc-list-day th {
  background: #0f131a !important;

}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
  color: var(--text);
  font-weight: 600;
}

/* Hide default FullCalendar popover completely - we use custom popup instead */
.fc .fc-popover {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.calendar-event {
  border-radius: 12px !important;
  border-width: 1px !important;
  border-left: 3px solid var(--provider-border, rgba(124, 92, 255, 0.6));
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  height: calc(100% - 2px);
}

.calendar-event.is-completed,
.fc .fc-list-event.is-completed,
.fc .fc-daygrid-event.is-completed {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.calendar-event-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
  width: 100%;
  height: 100%;
}

.calendar-event-title {
  font-weight: 600;
  color: var(--provider-title, #e6e7ef);
  font-size: 0.9rem;
  line-height: 1.2;
  word-break: break-word;
}

.calendar-event-meta {
  color: var(--provider-meta, #a9b2c2);
  font-size: 0.72rem;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event-meta .meta-part {
  display: inline;
}

.calendar-event-meta .meta-separator {
  color: inherit;
}

.resource-type-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  opacity: 0.65;
  margin-right: 0.3rem;
  vertical-align: -0.15em;
}

.resource-type-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Style FullCalendar's native more link */
.fc .fc-daygrid-more-link,
.fc .fc-more-link {
  background: rgba(108, 124, 255, 0.14) !important;
  border: 1px solid rgba(108, 124, 255, 0.25) !important;
  border-left: 3px solid rgba(108, 124, 255, 0.7) !important;
  border-radius: 10px !important;
  color: #c9d4ff !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  padding: 0.25rem 0.5rem !important;
  margin: 2px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.fc .fc-daygrid-more-link:hover,
.fc .fc-more-link:hover {
  background: rgba(108, 124, 255, 0.2) !important;
  border-color: rgba(108, 124, 255, 0.4) !important;
}

/* DEPRECATED: Old custom more event styles (now using native FullCalendar) */
/* .calendar-more-event { ... } */
/* .calendar-more-event .calendar-event-title { ... } */
/* .calendar-more-inner { ... } */

.calendar-event.is-compact .calendar-event-meta {
  display: none;
}

.calendar-event.is-compact .calendar-event-title {
  font-size: 0.78rem;
  line-height: 1.15;
}

.fc-view-timeGridWeek .calendar-event-inner {
  padding: 0.35rem 0.5rem;
  justify-content: flex-start;
}

.fc-view-timeGridWeek .calendar-event-title {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact styling for short timeGrid events (week/day views). */
.fc .fc-timegrid-event.fc-event-short .calendar-event-inner {
  padding: 0.3rem 0.45rem;
  gap: 0.2rem;
}

.fc .fc-timegrid-event.fc-event-short .calendar-event-title {
  font-size: 0.74rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc .fc-timegrid-event.fc-event-short .calendar-event-meta {
  display: none;
}

@media (max-width: 1200px) {
  .calendar-event-inner {
    gap: 0.25rem;
  }

  .calendar-event-title {
    line-height: 1.05;
  }

  .fc-view-timeGridWeek .calendar-event-title {
    white-space: normal;
    line-height: 1.05;
  }
}

.fc-view-timeGridWeek .calendar-event-meta {
  font-size: 0.68rem;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: none;
}

.fc .provider-kaplan {
  --provider-bg: rgba(138, 156, 178, 0.16);
  --provider-border: rgba(154, 174, 196, 0.45);
  --provider-title: #eef2f7;
  --provider-meta: rgba(224, 231, 240, 0.75);
  --provider-list-text: #eef2f7;
  --provider-list-bg: rgba(138, 156, 178, 0.16);
}

.fc .provider-khan-academy {
  --provider-bg: rgba(132, 150, 172, 0.16);
  --provider-border: rgba(150, 170, 194, 0.45);
  --provider-title: #eef2f7;
  --provider-meta: rgba(224, 231, 240, 0.75);
  --provider-list-text: #eef2f7;
  --provider-list-bg: rgba(132, 150, 172, 0.16);
}

.fc .provider-jack-westin {
  --provider-bg: rgba(140, 130, 178, 0.16);
  --provider-border: rgba(168, 156, 206, 0.5);
  --provider-title: #f1eff9;
  --provider-meta: rgba(228, 223, 241, 0.78);
  --provider-list-text: #f1eff9;
  --provider-list-bg: rgba(140, 130, 178, 0.16);
}

.fc .provider-uworld {
  --provider-bg: rgba(127, 150, 178, 0.16);
  --provider-border: rgba(153, 178, 206, 0.5);
  --provider-title: #eef2f7;
  --provider-meta: rgba(224, 231, 240, 0.75);
  --provider-list-text: #eef2f7;
  --provider-list-bg: rgba(127, 150, 178, 0.16);
}

.fc .provider-aamc {
  --provider-bg: rgba(139, 134, 178, 0.16);
  --provider-border: rgba(169, 162, 210, 0.5);
  --provider-title: #f1eff9;
  --provider-meta: rgba(228, 223, 241, 0.78);
  --provider-list-text: #f1eff9;
  --provider-list-bg: rgba(139, 134, 178, 0.16);
}

.fc .provider-system {
  --provider-bg: rgba(154, 166, 178, 0.16);
  --provider-border: rgba(176, 188, 200, 0.45);
  --provider-title: #eef2f7;
  --provider-meta: rgba(224, 231, 240, 0.75);
  --provider-list-text: #eef2f7;
  --provider-list-bg: rgba(154, 166, 178, 0.16);
}

.calendar-event.mini-review-event,
.fc .mini-review-event {
  --provider-bg: rgba(122, 140, 178, 0.2);
  --provider-border: rgba(148, 170, 210, 0.55);
  --provider-title: #eef2f7;
  --provider-meta: rgba(224, 231, 240, 0.78);
  --provider-list-text: #eef2f7;
  --provider-list-bg: rgba(122, 140, 178, 0.2);
}

.calendar-event.is-selected,
.calendar-event:focus-visible,
.fc .fc-timegrid-event.is-selected,
.fc .fc-daygrid-event.is-selected,
.fc .fc-list-event.is-selected {
  box-shadow:
    0 0 0 2px rgba(255, 252, 232, 0.96),
    0 0 18px rgba(255, 220, 120, 0.42),
    0 12px 24px rgba(8, 10, 16, 0.5);
  border-color: rgba(255, 245, 210, 0.96) !important;
  transform: translateY(-1px);
}

.calendar-event.is-selected {
  background: color-mix(in srgb, var(--surface) 70%, rgba(250, 204, 21, 0.2) 30%);
}

.fc .fc-daygrid-event.is-selected,
.fc .fc-timegrid-event.is-selected {
  background: color-mix(in srgb, var(--surface) 65%, rgba(250, 204, 21, 0.2) 35%);
}

.fc .fc-list-event.is-selected td {
  background: color-mix(in srgb, var(--surface) 60%, rgba(250, 204, 21, 0.18) 40%) !important;
}

.calendar-event.is-selected .calendar-event-title,
.fc .fc-daygrid-event.is-selected .fc-event-main,
.fc .fc-timegrid-event.is-selected .fc-event-main {
  color: #fff6d1;
}

.calendar-event:hover {
  transform: translateY(-1px);
}

.calendar-event:focus {
  outline: none;
}

@media (max-width: 1024px) {

  /* Stack dashboard layout on tablets and mobile */
  #step-focus-target .step-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #step-focus-target .focus-selections-primary {
    order: 1;
  }

  #step-focus-target .step-aside {
    order: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 720px) {
  .availability-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

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

  /* Mobile: Stack right rail vertically */
  #step-focus-target .step-aside {
    grid-template-columns: 1fr;
  }

  #step-focus-target .step-header h2 {
    font-size: 1.5rem;
  }

  #step-focus-target .focus-selections-primary {
    padding: 1.5rem;
  }

  .step-meta {
    justify-content: flex-start;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }

  .calendar-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .calendar-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.fc .fc-timegrid-slot {
  height: 120px;
}

.fc .fc-timegrid-axis-cushion,
.fc .fc-timegrid-slot-label-cushion {
  padding: 0.4rem;
}

/* Wizard theme overrides */
header .intro,
.help-text,
.selection-summary,
.selection-hint,
.usage-row-meta,
.status-note,
.actions #status {
  color: var(--muted);
}

h2,
h3,
.card h2,
.usage-total-provider,
.usage-category-title {
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card,
.usage-total-card,
.usage-category-card,
.selection-card,
.day,
.event-card,
.notes-card,
.wizard-footer,
.wizard-header,
.wizard-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.wizard-header {
  border-radius: 18px;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.step-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.step-lede {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.chip {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(108, 124, 255, 0.25);
}

.step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 1.5rem;
  align-items: start;
}

#step-review-generate-target .step-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* Focus Selection Topics Grid */
#selection-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

/* Ensure cards take full height for alignment */
.selection-card {
  height: 100%;
}

/* Dashboard-style layout for Focus section */
#step-focus-target .step-grid {
  grid-template-columns: minmax(0, 3fr) minmax(220px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

#step-focus-target .step-header {
  margin-bottom: 1rem;
}

#step-focus-target .step-aside {
  max-width: 320px;
  justify-self: end;
}

/* Enhanced visual prominence for Focus Selections */
#step-focus-target .focus-selections-primary {
  background: linear-gradient(180deg, var(--card-surface) 0%, rgba(24, 27, 34, 0.6) 100%);
  border: 1.5px solid rgba(108, 124, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  position: relative;
}

#step-focus-target .focus-selections-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(108, 124, 255, 0.3), transparent 50%, rgba(108, 124, 255, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Prominent header styling for Focus section */
#step-focus-target .step-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, rgba(232, 236, 242, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aside-card {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Compact right rail cards in Focus section */
#step-focus-target .aside-card {
  padding: 1rem;
  background: rgba(28, 32, 40, 0.8);
  border: 1px solid rgba(35, 39, 52, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-base);
}

#step-focus-target .aside-card:hover {
  border-color: rgba(108, 124, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#step-focus-target .aside-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

#step-focus-target .aside-card .help-text {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

#step-focus-target .aside-card .hint-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

#step-focus-target .aside-card .hint-list li {
  margin-bottom: 0.35rem;
}

#step-focus-target .aside-card .hint-list li:last-child {
  margin-bottom: 0;
}

#step-focus-target .step-aside {
  gap: 0.85rem;
}

.aside-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.hint-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.form-section {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.form-section.one-time-wrapper {
  border-color: rgba(108, 124, 255, 0.25);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.form-section.weekly-availability-wrapper {
  border-color: rgba(108, 124, 255, 0.25);
  box-shadow: 0 0 0 1px rgba(108, 124, 255, 0.18), var(--shadow-glow), var(--shadow-lg);
  position: relative;
}

.form-section.weekly-availability-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(108, 124, 255, 0.25), transparent 55%, rgba(108, 124, 255, 0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.form-section.weekly-availability-wrapper .day {
  border-color: rgba(108, 124, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(108, 124, 255, 0.1), 0 6px 18px rgba(6, 10, 22, 0.45);
}

.form-section.weekly-availability-wrapper .day:hover {
  border-color: rgba(108, 124, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(108, 124, 255, 0.2), 0 8px 22px rgba(6, 10, 22, 0.5);
}

.resource-access-panel {
  margin-top: 1.25rem;
  padding: 1.35rem 1.5rem;
}

.resource-access-panel h3 {
  margin: 0 0 0.35rem;
}

.resource-access-panel .help-text {
  margin: 0 0 0.9rem;
}

.resource-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1.25rem;
  align-items: start;
}

.resource-access-groups {
  display: grid;
  gap: 1rem;
}

.resource-group {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-elevated);
  box-shadow: var(--shadow-sm);
}

.resource-group h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
}

.resource-access-grid .resource-item {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--card-surface);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
}

.resource-access-grid .resource-item:hover {
  border-color: rgba(108, 124, 255, 0.4);
  box-shadow: var(--shadow-sm);
}

.resource-access-grid .disabled {
  background: rgba(28, 32, 40, 0.5);
  opacity: 0.6;
}

.resource-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.resource-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.resource-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 36px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.resource-toggle .toggle-track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.35);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.resource-toggle .toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.resource-toggle input[type="checkbox"]:checked+.toggle-track {
  background: rgba(34, 197, 94, 0.55);
  border-color: rgba(34, 197, 94, 0.85);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 0 10px -2px rgba(34, 197, 94, 0.6);
}

.resource-toggle input[type="checkbox"]:checked+.toggle-track::after {
  transform: translateX(16px);
  background: #dcfce7;
}

.resource-toggle input[type="checkbox"]:disabled+.toggle-track {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.25);
  cursor: not-allowed;
}

.resource-item:has(input:not(:checked)) .resource-title {
  color: var(--muted);
}

.resource-item:has(input:not(:checked)) .resource-chips {
  opacity: 0.45;
}

.resource-item .resource-title,
.resource-item .resource-chips,
.resource-item .resource-chip {
  cursor: default;
}

.resource-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.resource-chip {
  font-size: 0.74rem;
  font-weight: 600;
  color: #cbd5f5;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.summary-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(108, 124, 255, 0.25);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.wizard-step summary {
  list-style: none;
  cursor: pointer;
}

.wizard-step summary::-webkit-details-marker {
  display: none;
}

.wizard-step summary h2 {
  margin: 0;
}

.wizard-step summary:focus-visible {
  outline: 2px solid rgba(123, 109, 255, 0.35);
  outline-offset: 4px;
  border-radius: 12px;
}

.wizard-step:not(#step-availability-target):not(.dev-only) {
  border: 1px solid rgba(108, 124, 255, 0.25);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(260px, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.wizard-layout.is-sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.wizard-panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.wizard-layout.is-notes .wizard-header,
.wizard-layout.is-notes .wizard-footer {
  display: none;
}

.wizard-layout.is-complete {
  grid-template-columns: 220px minmax(0, 1fr);
}

.wizard-layout.is-complete .wizard-header,
.wizard-layout.is-complete .wizard-footer {
  display: none;
}

.wizard-layout.is-complete .wizard-sidebar {
  gap: 0.75rem;
}

/* ====================
   Modern Sidebar Styles
   ==================== */

.wizard-sidebar {
  position: sticky;
  top: var(--space-4);
  align-self: start;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wizard-layout.is-sidebar-collapsed .wizard-sidebar {
  padding: 0.75rem 0.5rem;
  gap: 0.75rem;
}

.sidebar-collapse-row {
  display: flex;
  justify-content: flex-end;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--sidebar-border);
}

.wizard-layout.is-sidebar-collapsed .sidebar-collapse-row {
  justify-content: center;
}

/* Brand Header */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--sidebar-border);
}

.wizard-layout.is-sidebar-collapsed .sidebar-brand {
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 0.75rem;
}

.sidebar-brand-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.wizard-layout.is-sidebar-collapsed .sidebar-brand-left {
  justify-content: center;
}

.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-icon .brand-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-brand-text {
  font-family: 'MCAT Genie Brand', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  color: #FFFFFF;
  margin-left: 0.75rem;
}

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

.sidebar-collapse {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(12, 18, 28, 0.95);
  border: 1px solid rgba(48, 60, 78, 0.8);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
  min-height: unset;
}

.sidebar-collapse:hover {
  background: rgba(20, 28, 40, 0.95);
  color: #eef2f7;
}

.wizard-layout.is-sidebar-collapsed .sidebar-collapse {
  width: 30px;
  height: 30px;
}

/* Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sidebar-section-label {
  font-size: var(--section-label-size);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 var(--space-3);
}

.wizard-layout.is-sidebar-collapsed .sidebar-section-label {
  display: none;
}

.sidebar-nav-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--label-size);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: unset;
  position: relative;
}

.wizard-layout.is-sidebar-collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 10px 0;
}

.wizard-layout.is-sidebar-collapsed .sidebar-nav-label {
  display: none;
}

.wizard-layout.is-sidebar-collapsed .sidebar-nav-items {
  gap: 0.5rem;
}

.wizard-layout.is-sidebar-collapsed .sidebar-divider {
  margin: 0.5rem 0;
}

.wizard-layout.is-sidebar-collapsed .mini-calendar,
.wizard-layout.is-sidebar-collapsed .mini-upnext {
  display: none;
}

.wizard-layout.is-sidebar-collapsed .sidebar-mini-rail {
  display: none;
}

.wizard-layout.is-sidebar-collapsed .sidebar-dropdown-items {
  display: none;
}

.wizard-layout.is-sidebar-collapsed .sidebar-dropdown-caret {
  display: none;
}

.sidebar-nav-item:hover {
  background: var(--sidebar-surface);
  color: var(--text);
  transform: none;
}

.sidebar-dropdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sidebar-dropdown-toggle {
  list-style: none;
  cursor: pointer;
}

.sidebar-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.sidebar-dropdown-toggle .sidebar-nav-icon {
  opacity: 0.8;
}

.sidebar-dropdown-caret {
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.sidebar-dropdown[open] .sidebar-dropdown-caret {
  transform: rotate(180deg);
}

.sidebar-dropdown-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: 0.75rem;
}

.sidebar-mini-rail {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 20, 28, 0.96), rgba(12, 16, 24, 0.96));
  border: 1px solid rgba(42, 52, 68, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 6px 18px rgba(6, 9, 16, 0.35);
}

.sidebar-nav-item.is-active {
  background: var(--sidebar-active);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sidebar-nav-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.sidebar-nav-item:hover .sidebar-nav-icon,
.sidebar-nav-item.is-active .sidebar-nav-icon {
  opacity: 1;
}

.sidebar-nav-item.is-active .sidebar-nav-icon {
  color: var(--accent);
}

.sidebar-nav-label {
  flex: 1;
  line-height: 1.4;
}

/* Divider */
.sidebar-divider {
  height: 1px;
  background: var(--sidebar-border);
  margin: var(--space-2) 0;
}

/* Badge for notification count */
.sidebar-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--badge);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Legacy compatibility - keep old classes working */
.wizard-sidebar-title {
  font-size: var(--section-label-size);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-3);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--label-size);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: unset;
  width: 100%;
}

.sidebar-link:hover {
  background: var(--sidebar-surface);
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.sidebar-link.is-active {
  background: var(--sidebar-active);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wizard-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wizard-steps {
  flex-direction: column;
  gap: 0.25rem;
}

.wizard-step-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  color: var(--sidebar-muted);
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.wizard-step-button:hover {
  background: var(--wizard-row-hover);
  color: var(--sidebar-text);
}

.wizard-step-index {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(231, 234, 240, 0.85);
  background: #141a22;
  border: 1px solid #242c36;
  flex: 0 0 auto;
}

.wizard-step-label {
  font-size: 0.86rem;
  line-height: 1.2;
}

.wizard-step-button.is-active {
  background: var(--wizard-row-active);
  border-color: transparent;
  border-left-color: var(--accent);
  color: var(--sidebar-text);
  box-shadow: none;
}

.wizard-step-button.is-active .wizard-step-index {
  color: #f8f7ff;
  background: rgba(124, 92, 255, 0.35);
  border-color: rgba(124, 92, 255, 0.55);
}

.wizard-step-button.is-complete {
  background: transparent;
  border-color: transparent;
  border-left-color: rgba(124, 92, 255, 0.25);
  color: #b6c0ce;
}

.wizard-step-button.is-complete .wizard-step-index {
  color: #e3dfff;
  background: rgba(124, 92, 255, 0.2);
  border-color: rgba(124, 92, 255, 0.4);
}

.wizard-nav {
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.wizard-nav .primary,
.wizard-nav .secondary {
  width: 100%;
}

.view-tabs {
  justify-content: flex-start;
  margin-bottom: 1.75rem;
}

.view-tab {
  background: #121822;
  border: 1px solid transparent;
  color: var(--sidebar-muted);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.view-tab:hover {
  background: var(--wizard-row-hover);
  color: var(--sidebar-text);
}

.view-tab.is-active {
  background: var(--wizard-row-active);
  border-color: transparent;
  color: var(--sidebar-text);
  box-shadow: none;
}

.intro {
  color: var(--muted);
}

.selection-card summary,
label,
.usage-row-header {
  color: var(--text);
}

.selection-subtopics label,
.checkbox-row label {
  color: var(--text);
}

.selection-subtopics label:nth-child(even) {
  background: rgba(75, 144, 240, 0.05);
}

.selection-subtopics label:hover {
  border-color: rgba(75, 144, 240, 0.35);
  background: rgba(75, 144, 240, 0.08);
}

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(75, 144, 240, 0.35);
  outline-offset: 1px;
}

button {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

button.primary {
  background: linear-gradient(135deg, #4b90f0, #7bb0ff);
  color: #f8fafc;
  border: none;
  box-shadow: 0 12px 24px -18px rgba(75, 144, 240, 0.75);
}

button.secondary {
  background: rgba(75, 144, 240, 0.18);
  color: #dbeafe;
  border: 1px solid rgba(75, 144, 240, 0.45);
}

.availability-grid .day {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}

.availability-grid .day label {
  font-weight: 700;
}

.server-url-row {
  gap: 1rem;
}

.selection-toolbar {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.estimate-row textarea.response {
  min-height: 160px;
}

.step-main .help-text {
  font-size: 0.95rem;
}

.resource-chip .resource-label {
  background: transparent;
  border: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.resource-chip input:checked+.resource-label {
  background: transparent;
  border-color: rgba(75, 144, 240, 0.35);
  color: var(--accent-strong);
}

.usage-progress {
  background: rgba(123, 109, 255, 0.12);
}

.usage-progress-fill {
  background: var(--usage-progress-color, linear-gradient(90deg, #7b6dff 0%, #9c8cff 100%));
  width: var(--usage-progress-value, 0%);
}

.status-note,
.actions #status {
  color: #a16207;
}

.status-note--empty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  font-weight: 600;
}

.status-note--empty .status-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-note--empty .status-note-icon svg {
  width: 16px;
  height: 16px;
}

.selection-card {
  background: var(--surface);
}

.selection-category {
  display: flex;
  flex-direction: column;
}

.selection-subtopics {
  flex: 1 1 auto;
}

.selection-actions button {
  background: rgba(123, 109, 255, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(123, 109, 255, 0.25);
}

.selection-actions button:hover {
  background: rgba(123, 109, 255, 0.18);
}

.calendar-wrapper {
  background: transparent;
}

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow);
  padding: 0.6rem;
}

.fc .fc-toolbar-title {
  font-family: 'Space Grotesk', 'IBM Plex Sans', 'Manrope', sans-serif;
  color: var(--text);
}

#schedule-preview .calendar-history {
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

#schedule-preview .calendar-history-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid rgba(88, 101, 130, 0.6);
  background: rgba(20, 28, 40, 0.9);
  color: #e0e7f5;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
  cursor: pointer;
}

#schedule-preview .calendar-history-button:hover {
  border-color: rgba(108, 121, 150, 0.9);
  background: rgba(30, 38, 52, 0.95);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

#schedule-preview .calendar-history-button:focus-visible {
  outline: 2px solid rgba(123, 109, 255, 0.5);
  outline-offset: 2px;
}

#schedule-preview .calendar-wrapper {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

#schedule-preview .calendar {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  width: 100%;
}

#schedule-preview .calendar .fc {
  min-width: 1080px;
  background: radial-gradient(circle at 20% 0%, rgba(28, 36, 48, 0.6), transparent 45%),
    linear-gradient(180deg, #121821 0%, #0f141c 100%);
  border-radius: 18px;
  padding: 0.75rem;
}

.wizard-layout.is-sidebar-collapsed #schedule-preview .calendar .fc {
  min-width: 0;
  width: 100%;
}

.wizard-layout.is-sidebar-collapsed #schedule-preview .calendar-wrapper {
  overflow-x: hidden;
}

.wizard-layout.is-sidebar-collapsed #schedule-preview .fc .fc-scrollgrid,
.wizard-layout.is-sidebar-collapsed #schedule-preview .fc .fc-scrollgrid table,
.wizard-layout.is-sidebar-collapsed #schedule-preview .fc .fc-scrollgrid-sync-table,
.wizard-layout.is-sidebar-collapsed #schedule-preview .fc .fc-timegrid-body table,
.wizard-layout.is-sidebar-collapsed #schedule-preview .fc .fc-daygrid-body table {
  width: 100% !important;
  min-width: 0 !important;
}

#schedule-preview .fc .fc-toolbar.fc-header-toolbar {
  background: rgba(14, 18, 26, 0.65);
  border: none;
  border-radius: 14px;
  padding: 0.35rem 0.6rem;
  box-shadow: none;
}

#schedule-preview .fc .fc-scrollgrid-section-header,
#schedule-preview .fc .fc-col-header,
#schedule-preview .fc .fc-col-header-cell {
  background: rgba(16, 20, 28, 0.95);
}

#schedule-preview .fc .fc-col-header-cell.fc-timegrid-axis {
  background: rgba(16, 20, 28, 0.95);
  border-right: 1px solid rgba(46, 56, 74, 0.6);
}

#schedule-preview .fc .fc-col-header-cell.fc-timegrid-axis .fc-col-header-cell-cushion {
  color: #a7b1c4;
}

#schedule-preview .fc .fc-timegrid-axis-frame {
  background: transparent;
}

#schedule-preview .fc .fc-timegrid-col.fc-day-today,
#schedule-preview .fc .fc-day-today .fc-timegrid-col-frame,
#schedule-preview .fc .fc-timegrid-col-bg .fc-day-today {
  background: rgba(255, 255, 255, 0.04) !important;
}

#schedule-preview .fc .fc-scrollgrid-section-header .fc-timegrid-axis,
#schedule-preview .fc .fc-scrollgrid-section-header .fc-timegrid-axis-frame,
#schedule-preview .fc .fc-scrollgrid-section-header .fc-timegrid-axis-cushion {
  background: rgba(16, 20, 28, 0.95);
}

#schedule-preview .fc .fc-button-group {
  gap: 0.35rem;
}

#schedule-preview .fc .fc-button-primary {
  background: rgba(18, 24, 34, 0.9);
  border: 1px solid rgba(52, 64, 82, 0.7);
  color: #cbd5e1;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

#schedule-preview .fc .fc-button-primary:hover {
  background: rgba(22, 30, 42, 0.95);
  border-color: rgba(78, 94, 120, 0.75);
}

#schedule-preview .fc .fc-button-primary:not(:disabled).fc-button-active,
#schedule-preview .fc .fc-button-primary:not(:disabled):active {
  background: rgba(88, 104, 136, 0.35);
  border-color: rgba(120, 144, 186, 0.45);
  color: #eef2f7;
}

#schedule-preview .fc-theme-standard td,
#schedule-preview .fc-theme-standard th {
  border-color: rgba(42, 52, 68, 0.2);
}

#schedule-preview .fc .fc-col-header-cell {
  background: rgba(14, 19, 28, 0.6);
  box-shadow: inset 0 -1px rgba(42, 52, 68, 0.25);
}

#schedule-preview .fc .fc-timegrid-slot {
  background: transparent;
  border-color: rgba(40, 50, 66, 0.18);
}

#schedule-preview .fc .fc-timegrid-now-indicator-line {
  border-color: rgba(83, 209, 222, 0.65);
  box-shadow: 0 0 12px rgba(83, 209, 222, 0.45);
}

#schedule-preview .fc .fc-timegrid-now-indicator-arrow {
  border-color: rgba(83, 209, 222, 0.8);
}

#schedule-preview .fc .fc-timegrid-event,
#schedule-preview .fc .fc-daygrid-event {
  background: rgba(25, 31, 44, 0.6);
  border: 1px solid rgba(60, 72, 96, 0.35);
  border-left: 3px solid rgba(138, 156, 196, 0.5);
  color: #e1e7f0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015), 0 12px 24px -14px rgba(6, 9, 16, 0.7);
}

.fc .fc-timegrid-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-main {
  color: inherit;
}


@media (max-width: 1100px) {
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .wizard-sidebar {
    position: static;
  }

  .wizard-steps {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .wizard-step-button {
    width: auto;
  }

  .notes-shell {
    grid-template-columns: 1fr;
  }

  .notes-sidebar {
    position: static;
    min-height: auto;
  }

  .notes-topbar {
    flex-wrap: wrap;
  }

  .notes-search {
    max-width: none;
    flex: 1 1 100%;
  }
}

.estimate-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1rem;
}

/* Prominent estimate card in Focus section right rail */
#step-focus-target .estimate-card {
  background: linear-gradient(135deg, rgba(108, 124, 255, 0.08) 0%, rgba(28, 32, 40, 0.9) 100%);
  border: 1px solid rgba(108, 124, 255, 0.3);
  box-shadow: 0 4px 16px rgba(108, 124, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1rem;
}

#step-focus-target .estimate-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--accent-hover);
}

#step-focus-target .estimate-card .help-text {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.estimate-card h3 {
  margin-bottom: 0.35rem;
}

.estimate-card .help-text {
  margin-bottom: 0.65rem;
}

.estimate-compact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.estimate-visual {
  background: rgba(10, 14, 22, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
}

.estimate-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.estimate-kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
}

.estimate-kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.estimate-kpi-value {
  margin-top: 0.15rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.estimate-note {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.estimate-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.estimate-loading {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.estimate-loading.is-active {
  opacity: 1;
}

.estimate-loading-bar {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.25), rgba(248, 250, 252, 0.8));
  animation: estimate-slide 1.1s ease-in-out infinite;
}

.cars-focus-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cars-focus-section.card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 40px rgba(6, 10, 18, 0.45),
    0 0 28px rgba(248, 250, 252, 0.08);
}

.cars-focus-card--wide {
  gap: 1.25rem;
}

.cars-focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cars-focus-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cars-focus-sub {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.cars-focus-suggested h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cars-focus-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.2fr) auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #d4d9e4;
}

.cars-focus-suggested.is-empty #cars-focus-rows {
  display: none;
}

.cars-focus-suggested.is-empty .cars-focus-empty {
  display: block;
}

.cars-focus-empty {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: none;
}

#cars-focus-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cars-focus-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  overflow: hidden;
}

.cars-focus-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(83, 209, 222, 0.4), rgba(94, 230, 150, 0.9));
}

.cars-focus-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 320px;
  overflow: auto;
  padding-right: 0.25rem;
  border-radius: 14px;
  padding: 0.65rem;
  background: rgba(12, 16, 24, 0.5);
}

/* Category container */
.cars-focus-category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Category header styling */
.cars-category-header {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding-left: 0.55rem;
  border-left: 2px solid rgba(83, 209, 222, 0.35);
  transition: all 0.2s ease;
}

.cars-focus-category:hover .cars-category-header {
  color: #94a3b8;
  border-left-color: rgba(83, 209, 222, 0.7);
}

/* Chips grid within category */
.cars-category-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.cars-focus-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(460px, 1.45fr);
  gap: 1.25rem;
  align-items: start;
}

.cars-focus-card--wide .cars-focus-grid {
  max-height: 320px;
}

.cars-focus-card--wide .cars-category-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .cars-focus-body {
    grid-template-columns: 1fr;
  }

  .cars-category-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Topic card chip */
.cars-focus-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(16, 20, 28, 0.65);
  border: 1px solid rgba(35, 39, 52, 0.7);
  border-left: 3px solid transparent;
  font-size: 0.78rem;
  color: #c5ccdb;
  transition: all 0.2s ease;
}

.cars-focus-chip span {
  flex: 1;
  min-width: 0;
  white-space: normal;
  line-height: 1.2;
  word-break: break-word;
}

.cars-focus-chip:hover {
  background: rgba(20, 26, 38, 0.9);
  border-color: rgba(83, 209, 222, 0.4);
  border-left-color: rgba(83, 209, 222, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(6, 10, 18, 0.3);
}

/* Boosted card state */
.cars-focus-chip.is-boosted {
  border-left-color: rgb(83, 209, 222);
  background: linear-gradient(135deg, rgba(83, 209, 222, 0.1) 0%, rgba(18, 24, 34, 0.85) 100%);
  box-shadow:
    0 2px 12px rgba(83, 209, 222, 0.15),
    inset 0 0 0 1px rgba(83, 209, 222, 0.1);
}

.cars-focus-chip.is-boosted:hover {
  border-left-color: rgb(83, 209, 222);
  background: linear-gradient(135deg, rgba(83, 209, 222, 0.15) 0%, rgba(24, 32, 46, 0.9) 100%);
  box-shadow:
    0 4px 16px rgba(83, 209, 222, 0.2),
    inset 0 0 0 1px rgba(83, 209, 222, 0.15);
}

/* Modern pill toggle */
.cars-boost-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.06rem;
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.85);
  border: 1px solid rgba(40, 48, 64, 0.7);
  position: relative;
  min-width: 78px;
  flex-shrink: 0;
}

.cars-boost-option {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.14rem 0.42rem;
  line-height: 1;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  min-width: 40px;
  text-align: center;
}

.cars-boost-option:hover {
  color: #94a3b8;
}

/* Active state - Off */
.cars-boost-option.is-active {
  color: #e2e8f0;
  background: rgba(71, 85, 105, 0.45);
}

/* Boosted toggle state */
.cars-boost-toggle.is-boosted {
  border-color: rgba(83, 209, 222, 0.4);
  box-shadow: 0 0 12px rgba(83, 209, 222, 0.2);
}

.cars-boost-toggle.is-boosted .cars-boost-option.is-active {
  background: linear-gradient(135deg, rgba(83, 209, 222, 0.35) 0%, rgba(83, 209, 222, 0.2) 100%);
  color: rgb(180, 240, 240);
  box-shadow: 0 0 6px rgba(83, 209, 222, 0.25);
}

.cars-focus-footnote {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Step 7: Review overview */
.review-overview {
  background: rgba(14, 18, 26, 0.92);
  border: 1px solid rgba(52, 64, 82, 0.55);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 10px 24px rgba(6, 9, 16, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
  isolation: isolate;
}

.review-row--top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.review-row--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  align-items: start;
  margin-top: 1.2rem;
}

.review-panel,
.review-card {
  background: linear-gradient(135deg, rgba(18, 24, 34, 0.98) 0%, rgba(22, 28, 40, 0.95) 100%);
  border: 1px solid rgba(60, 72, 96, 0.5);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.015),
    0 2px 8px rgba(0, 0, 0, 0.22),
    0 0 12px rgba(108, 124, 255, 0.05);
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
  transition: all 0.2s ease;
  overflow: hidden;
}

.review-row--cards .review-card {
  height: auto;
  padding-bottom: 0.75rem;
}

.review-panel:hover,
.review-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(108, 124, 255, 0.12);
  transform: none;
}

.review-panel h3,
.review-card h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e8eef7;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.review-timeline-dates {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #e6edf7;
}

.review-arrow {
  color: #7c8aa3;
}

.review-timeline-meta {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #9aa5b8;
}

.review-phase-bar {
  margin-top: 0.75rem;
  height: 10px;
  background: rgba(32, 40, 56, 0.8);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  position: relative;
}

.review-phase-seg {
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  animation: phase-fill 0.8s ease forwards;
}

.review-phase-seg.phase-1 {
  background: rgba(83, 209, 222, 0.6);
  animation-delay: 0.05s;
}

.review-phase-seg.phase-2 {
  background: rgba(108, 124, 255, 0.6);
  animation-delay: 0.15s;
}

.review-phase-seg.phase-3 {
  background: rgba(255, 182, 90, 0.6);
  animation-delay: 0.25s;
}

.review-phase-labels {
  margin-top: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #8e99ad;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.review-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #9aa5b8;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.review-metric:hover {
  color: #b4bfcf;
}

.review-metric--divider {
  margin-bottom: 0.95rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.review-metric:last-of-type {
  margin-bottom: 0.75rem;
}

.review-metric strong {
  color: #e6edf7;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  color: #dbe7ff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  width: fit-content;
  margin: 0.2rem 0 0.7rem;
}

.review-badge.is-feasible {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.15);
  color: #d1fae5;
}

.review-badge.is-stretch {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #fef3c7;
}

.review-badge.is-unsustainable {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.14);
  color: #fee2e2;
}

.review-card-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #9aa5b8;
  margin-bottom: 0.45rem;
}

.review-card-line:last-child {
  margin-bottom: 0;
}

.review-card-line strong {
  color: #e6edf7;
  font-size: 0.88rem;
}

.review-risk {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.12);
  color: #cdd9ff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.review-risk:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.review-risk.is-low {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
  color: #d1fae5;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.review-risk.is-low:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.12) 100%);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.review-risk.is-moderate {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.08) 100%);
  color: #fef3c7;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.review-risk.is-moderate:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.12) 100%);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.review-risk.is-high {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  color: #fee2e2;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.15), 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.review-risk.is-high:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.12) 100%);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25), 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.review-resource-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(32, 40, 56, 0.8);
  margin: 0.25rem 0 0.75rem;
}

.review-resource-seg {
  height: 100%;
}

.review-resource-seg[data-resource="kaplan"] {
  background: rgba(84, 209, 238, 0.9);
}

.review-resource-seg[data-resource="ka"] {
  background: rgba(120, 216, 140, 0.9);
}

.review-resource-seg[data-resource="jw"] {
  background: rgba(138, 168, 255, 0.9);
}

.review-resource-seg[data-resource="uworld"] {
  background: rgba(172, 130, 255, 0.9);
}

.review-resource-seg[data-resource="aamc"] {
  background: rgba(255, 182, 90, 0.9);
}

.review-resource-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.6rem;
  font-size: 0.7rem;
  color: #9aa5b8;
  justify-content: start;
}

.review-resource-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(60, 72, 96, 0.7);
  background: rgba(20, 28, 40, 0.75);
  transition: all 0.15s ease;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.review-resource-chip:hover {
  background: rgba(30, 38, 50, 0.85);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.review-resource-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 4px currentColor;
}

.review-resource-chip[data-resource="kaplan"]::before {
  background: rgb(83, 209, 222);
}

.review-resource-chip[data-resource="ka"]::before {
  background: rgb(120, 216, 140);
}

.review-resource-chip[data-resource="jw"]::before {
  background: rgb(108, 124, 255);
}

.review-resource-chip[data-resource="uworld"]::before {
  background: rgb(172, 130, 255);
}

.review-resource-chip[data-resource="aamc"]::before {
  background: rgb(255, 100, 130);
}

.review-resource-chip strong {
  font-weight: 600;
  color: #e6edf7;
  margin-left: auto;
  text-align: right;
}

.review-note {
  margin: 0;
  font-size: 0.75rem;
  color: #7b8598;
}

.review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}

.review-status-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 240px;
  min-height: 32px;
  position: relative;
}

.status-text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cfd8e6;
  min-height: 20px;
}

.status-text.success {
  color: #4ade80;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.35);
}

.status-text.success::before {
  content: '✓';
  font-weight: 700;
}

.status-text.warn {
  color: #facc15;
}

.status-text.error {
  color: #fb7185;
}

.status-text.info {
  color: #7dd3fc;
}

.review-status-area.is-burst::after {
  content: '';
  position: absolute;
  right: 0;
  top: -8px;
  width: 42px;
  height: 42px;
  background:
    radial-gradient(circle, rgba(74, 222, 128, 0.45) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(125, 211, 252, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255, 182, 90, 0.35) 0 3px, transparent 4px);
  background-position: 6px 6px, 18px 2px, 28px 14px;
  animation: status-burst 0.9s ease-out;
  pointer-events: none;
  opacity: 0;
}

@keyframes status-burst {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.generate-loading {
  height: 4px;
  width: 100%;
}

.review-card--fit {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.review-fit-status {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d6e0ff;
}

.review-fit-status.is-ontrack {
  color: #4ade80;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.35);
}

.review-fit-status.is-tight {
  color: #facc15;
}

.review-fit-status.is-risk {
  color: #fb7185;
}

.fit-loading {
  height: 4px;
  width: 100%;
  margin: 0.35rem 0 0.1rem;
  opacity: 0;
}

.fit-loading.is-active {
  opacity: 1;
}

.review-resource-pie-wrap {
  display: flex;
  justify-content: flex-start;
  margin: 0.4rem 0 0.5rem;
}

.review-card--resource {
  position: relative;
  overflow: visible;
}

.review-resource-tooltip {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  min-width: 160px;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(15, 20, 30, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.7rem;
  color: #d8e1ef;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.review-resource-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.review-resource-tooltip .tooltip-title {
  font-weight: 600;
  font-size: 0.72rem;
  color: #f8fafc;
  margin-bottom: 0.2rem;
}

.review-resource-tooltip .tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #a6b4c7;
}

.review-resource-tooltip .tooltip-row strong {
  color: #e5edf7;
  font-weight: 600;
}

.review-resource-pie {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.4);
  position: relative;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  animation: pie-spin-in 0.9s ease forwards;
  opacity: 0;
  will-change: transform, opacity;
}

.review-resource-pie:hover {
  transform: scale(1.06);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.review-resource-pie::after {
  content: '';
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(18, 24, 34, 0.98) 0%, rgba(22, 30, 42, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 3px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 900px) {
  .review-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-status-area {
    width: 100%;
    align-items: flex-start;
  }
}

@media (max-width: 1100px) {

  .review-row--top,
  .review-row--cards {
    grid-template-columns: 1fr;
  }
}

@keyframes estimate-slide {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(320%);
  }
}

@keyframes phase-fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes pie-spin-in {
  from {
    transform: rotate(-90deg) scale(0.85);
    opacity: 0;
  }

  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {

  .review-phase-seg,
  .review-resource-pie {
    animation: none;
    transform: none;
    opacity: 1;
  }
}

/* ============================================
   NATIVE MACOS CALENDAR REDESIGN
   Phase-by-phase implementation
   ============================================ */

/* Phase 1: Layout & Container */
.calendar-wrapper.calendar-layout {
  min-height: auto;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.calendar-main {
  min-width: 0;
  min-height: 0;
  display: block;
  width: 100%;
}

#schedule-calendar {
  margin-top: 0.5rem;
}

#schedule-calendar .fc {
  height: auto !important;
  min-height: 620px;
  width: 100%;
}

.calendar-rail {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* Phase 2: Background & Atmosphere */
#schedule-preview .calendar .fc {
  background:
    repeating-linear-gradient(45deg,
      transparent,
      transparent 12px,
      rgba(255, 255, 255, 0.008) 12px,
      rgba(255, 255, 255, 0.008) 24px),
    radial-gradient(circle at 20% 0%, rgba(28, 36, 48, 0.5), transparent 50%),
    linear-gradient(180deg, #0f1419 0%, #0a0e13 100%);
  min-width: 0;
  width: 100%;
}

.fc-timegrid-body {
  background: transparent;
}

.fc-scrollgrid-sync-table {
  background: transparent !important;
}

.fc-view-harness {
  position: relative;
}

.fc-view-harness::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(20, 26, 36, 0.3), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Phase 3: Toolbar */
.fc-toolbar.fc-header-toolbar {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc-toolbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #d6dbe6;
  letter-spacing: 0.01em;
}

.fc-button-primary {
  background: rgba(18, 24, 34, 0.9) !important;
  border: 1px solid rgba(52, 64, 82, 0.7) !important;
  color: #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: all 0.15s ease;
}

.fc-button-primary:hover {
  background: rgba(28, 36, 48, 0.95) !important;
  border-color: rgba(78, 94, 120, 0.8) !important;
}

.fc-button-primary:focus {
  outline: 2px solid rgba(83, 209, 222, 0.4);
  outline-offset: 2px;
}

.fc-button-primary.fc-button-active {
  background: rgba(83, 209, 222, 0.15) !important;
  border-color: rgba(83, 209, 222, 0.4) !important;
  color: #d6f4f6 !important;
}

.fc-button-group {
  gap: 0.25rem;
}

.fc-button-group .fc-button {
  margin: 0;
}

/* Phase 4: Day/Column Headers */
.fc-col-header-cell {
  background: rgba(12, 16, 22, 0.8) !important;
  border: none !important;
  border-bottom: 1px solid rgba(42, 52, 68, 0.3) !important;
  padding: 0.75rem 0.5rem !important;
}

.fc-col-header-cell-cushion {
  color: #8b95a8;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0;
}

.fc-scrollgrid-section-header td {
  border-left: none !important;
  border-right: none !important;
}

.fc-scrollgrid-section-header .fc-scroller {
  overflow: visible !important;
}

.fc-daygrid-day-number {
  color: #9aa5b8;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
}

.fc-daygrid-day.fc-day-today {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 20px rgba(83, 209, 222, 0.05) !important;
  background: rgba(83, 209, 222, 0.03) !important;
  z-index: 1;
}

.fc-day-today .fc-daygrid-day-number {
  background: rgba(83, 209, 222, 0.12) !important;
  color: #d6f4f6 !important;
  font-weight: 600;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(83, 209, 222, 0.25),
    0 0 12px rgba(83, 209, 222, 0.08);
  /* Matching mini-calendar subtle glow */
  position: relative;
  z-index: 2;
  min-width: 28px;
  text-align: center;
}

.fc-col-header-cell-cushion::first-letter {
  text-transform: uppercase;
}

/* Phase 5: Time Grid Slots */
.fc-timegrid-slot {
  height: 3.8rem !important;
  border-color: rgba(40, 50, 66, 0.12) !important;
  background: transparent;
}

.fc-timegrid-slot-minor {
  border-color: rgba(40, 50, 66, 0.06) !important;
}

.fc-timegrid-axis {
  background: transparent;
  border: none !important;
}

.fc-timegrid-slot-label {
  border: none !important;
  background: transparent;
}

.fc-timegrid-slot-label-cushion,
.fc-timegrid-axis-cushion {
  color: #6b7585;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 0.5rem;
  text-transform: lowercase;
}

.fc-timegrid-col {
  border-left: none !important;
  border-right: 1px solid rgba(42, 52, 68, 0.15) !important;
}

.fc-timegrid-col:last-child {
  border-right: none !important;
}

.fc-timegrid-now-indicator-line {
  border-color: rgba(83, 209, 222, 0.6) !important;
  border-width: 1.5px !important;
  box-shadow: 0 0 8px rgba(83, 209, 222, 0.3);
}

.fc-timegrid-now-indicator-arrow {
  border-color: rgba(83, 209, 222, 0.8) !important;
}

/* Phase 6: Events */
.fc-timegrid-event,
.fc-daygrid-event {
  background: rgba(22, 28, 40, 0.85) !important;
  border: 1px solid rgba(60, 72, 96, 0.4) !important;
  border-left: 3px solid rgba(120, 140, 180, 0.6) !important;
  border-radius: 10px !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 2px 8px rgba(6, 9, 16, 0.4) !important;
  color: #e4e8f0 !important;
  overflow: hidden;
}

.fc-event-main {
  color: inherit;
  padding: 0.55rem 0.65rem;
}

.fc-timegrid-event:hover,
.fc-daygrid-event:hover {
  background: rgba(28, 36, 50, 0.9) !important;
  border-color: rgba(80, 96, 128, 0.5) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 4px 12px rgba(6, 9, 16, 0.5) !important;
  cursor: pointer;
}

.calendar-event-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calendar-event-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e8ecf2;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-meta {
  font-size: 0.7rem;
  color: #9aa5b8;
  line-height: 1.25;
  margin: 0;
}

.fc-event.is-scheduled,
.fc-event.has-hatching {
  background-image:
    repeating-linear-gradient(45deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.015) 8px,
      rgba(255, 255, 255, 0.015) 16px),
    linear-gradient(180deg, rgba(22, 28, 40, 0.85), rgba(18, 24, 36, 0.85)) !important;
}

.fc-event-resizer {
  background: rgba(83, 209, 222, 0.2);
  height: 4px;
}

.fc-event-resizer:hover {
  background: rgba(83, 209, 222, 0.4);
}

.fc-event.is-completed {
  opacity: 0.5;
  background: rgba(18, 24, 36, 0.7) !important;
}

.fc-event.is-completed .calendar-event-title {
  text-decoration: line-through;
}

.provider-kaplan {
  border-left-color: rgba(84, 209, 238, 0.9) !important;
  box-shadow: inset 3px 0 0 rgba(84, 209, 238, 0.28), 0 0 6px rgba(84, 209, 238, 0.14) !important;
}

.provider-khan-academy {
  border-left-color: rgba(120, 216, 140, 0.9) !important;
  box-shadow: inset 3px 0 0 rgba(120, 216, 140, 0.28), 0 0 6px rgba(120, 216, 140, 0.14) !important;
}

.provider-jack-westin {
  border-left-color: rgba(138, 168, 255, 0.9) !important;
  box-shadow: inset 3px 0 0 rgba(138, 168, 255, 0.28), 0 0 6px rgba(138, 168, 255, 0.14) !important;
}

.provider-uworld {
  border-left-color: rgba(172, 130, 255, 0.9) !important;
  box-shadow: inset 3px 0 0 rgba(172, 130, 255, 0.28), 0 0 6px rgba(172, 130, 255, 0.14) !important;
}

.provider-aamc {
  border-left-color: rgba(255, 182, 90, 0.9) !important;
  box-shadow: inset 3px 0 0 rgba(255, 182, 90, 0.28), 0 0 6px rgba(255, 182, 90, 0.14) !important;
}

.mini-review-event {
  border-left-color: rgba(120, 210, 255, 0.9) !important;
  box-shadow: inset 3px 0 0 rgba(120, 210, 255, 0.28), 0 0 6px rgba(120, 210, 255, 0.14) !important;
}

/* Phase 7: Mini Calendar */
.mini-calendar {
  background: rgba(14, 18, 26, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(38, 48, 64, 0.6);
  padding: 0.85rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 2px 8px rgba(6, 9, 16, 0.3);
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mini-calendar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d6dbe6;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.mini-calendar-nav {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #b8c2d4;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  /* Prevent squishing */
  transition: background-color 0.2s ease, color 0.2s ease;
  padding: 0;
}

.mini-calendar-nav:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  color: #ffffff;
}

.mini-calendar-nav svg {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
}

.mini-calendar-nav:hover {
  background: rgba(28, 36, 48, 0.9);
  border-color: rgba(78, 94, 120, 0.7);
  color: #d6dbe6;
}

.mini-calendar-grid {
  display: grid;
  gap: 0.4rem;
}

.mini-calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.mini-calendar-weekdays span {
  text-align: center;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #6b7585;
  font-weight: 600;
  padding: 0.25rem 0;
}

.mini-calendar-row span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #9aa5b8;
  cursor: pointer;
  transition: all 0.12s ease;
}

.mini-calendar-row span:hover:not(.is-muted) {
  background: rgba(120, 134, 162, 0.15);
  color: #d6dbe6;
}

.mini-calendar-row .is-muted {
  color: #4a5468;
  cursor: default;
}

.mini-calendar-row .is-muted:hover {
  background: transparent;
}

.mini-calendar-row .is-active {
  background: rgba(83, 209, 222, 0.18) !important;
  color: #d6f4f6 !important;
  font-weight: 600;
  box-shadow:
    inset 0 0 0 1px rgba(83, 209, 222, 0.35),
    0 0 12px rgba(83, 209, 222, 0.15);
}

.mini-calendar-row .is-active:hover {
  background: rgba(83, 209, 222, 0.25) !important;
  box-shadow:
    inset 0 0 0 1px rgba(83, 209, 222, 0.45),
    0 0 16px rgba(83, 209, 222, 0.2);
}

/* Phase 8: Up Next */
.mini-upnext {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.mini-upnext-header {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: #7e889a;
  font-weight: 600;
}

.mini-upnext-list {
  display: grid;
  gap: 0.5rem;
}

.mini-upnext-day {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: #9aa5b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-upnext-day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(74, 86, 108, 0.4);
}

.mini-upnext-empty {
  font-size: 0.8rem;
  color: #7b8598;
  padding: 0.4rem 0;
}

.mini-event {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: rgba(14, 18, 26, 0.9);
  border: 1px solid rgba(38, 48, 64, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-event:hover {
  background: rgba(18, 24, 34, 0.95);
  border-color: rgba(60, 72, 96, 0.6);
  box-shadow: 0 4px 12px rgba(6, 9, 16, 0.3);
}

.mini-event.is-active {
  border-color: rgba(83, 209, 222, 0.4);
  box-shadow: 0 0 0 1px rgba(83, 209, 222, 0.2);
}

.mini-event-bar {
  border-radius: 999px;
  background: linear-gradient(180deg,
      rgba(120, 140, 180, 0.85),
      rgba(100, 120, 160, 0.85));
}

.mini-event[data-provider="kaplan"] .mini-event-bar {
  background: linear-gradient(180deg, rgba(154, 166, 178, 0.85), rgba(134, 146, 158, 0.85));
}

.mini-event[data-provider="aamc"] .mini-event-bar {
  background: linear-gradient(180deg, rgba(139, 134, 178, 0.85), rgba(119, 114, 158, 0.85));
}

.mini-event-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e4e8f0;
  margin: 0;
  line-height: 1.3;
}

.mini-event-icon {
  opacity: 0.6;
}

.mini-event-meta {
  font-size: 0.72rem;
  color: #8b95a8;
  margin: 0.2rem 0 0;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Phase 9: Rail Container */
.calendar-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(16, 20, 28, 0.98), rgba(12, 16, 24, 0.98)),
    radial-gradient(circle at 50% 0%, rgba(28, 36, 48, 0.4), transparent 70%);
  border: 1px solid rgba(42, 52, 68, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 8px 24px rgba(6, 9, 16, 0.4);
}

.calendar-rail::-webkit-scrollbar {
  width: 6px;
}

.calendar-rail::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.calendar-rail::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Phase 10: Responsive & Polish */
@media (max-width: 1100px) {
  .calendar-wrapper.calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-rail {
    position: static;
    max-height: none;
    order: 2;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .calendar-rail {
    padding: 0.75rem;
  }

  .mini-calendar {
    padding: 0.75rem;
  }

  .fc-timegrid-slot {
    height: 2.5rem !important;
  }
}

.calendar-main {
  overflow: hidden;
}

#schedule-calendar {
  overflow: visible;
}

.fc-button-primary,
.mini-tab,
.mini-event,
.mini-calendar-nav,
.mini-calendar-row span {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.fc-button-primary:focus,
.mini-tab:focus,
.mini-calendar-nav:focus {
  outline: 2px solid rgba(83, 209, 222, 0.5);
  outline-offset: 2px;
}

.fc-event:focus {
  outline: 2px solid rgba(83, 209, 222, 0.4);
  outline-offset: 1px;
}

/* Phase 11: Dark Theme Consistency */
:root {
  --calendar-bg-primary: #0f1419;
  --calendar-bg-secondary: #0a0e13;
  --calendar-surface: rgba(16, 20, 28, 0.95);
  --calendar-border: rgba(42, 52, 68, 0.5);
  --calendar-text-primary: #e4e8f0;
  --calendar-text-secondary: #9aa5b8;
  --calendar-text-muted: #6b7585;
  --calendar-accent: rgba(83, 209, 222, 1);
  --calendar-accent-subtle: rgba(83, 209, 222, 0.18);
}

.mini-calendar,
.mini-event,
.fc-timegrid-event,
.fc-daygrid-event {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 2px 8px rgba(6, 9, 16, 0.4);
}

.mini-event:hover,
.fc-timegrid-event:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 4px 12px rgba(6, 9, 16, 0.5);
}

.mini-calendar,
.mini-event,
.calendar-rail,
.fc-timegrid-event {
  border: 1px solid rgba(42, 52, 68, 0.5);
}

.review-card--resource {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.review-card--metrics {
  justify-content: flex-start;
  min-height: 130px;
  gap: 0.55rem;
}

.review-card--metrics .review-card-line {
  margin-bottom: 0;
  padding: 0.15rem 0;
}

.review-card--resource h4 {
  margin-bottom: 0.65rem;
}

.review-card--resource .review-resource-pie-wrap {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.review-resource-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.6rem;
  font-size: 0.62rem;
  color: #9aa5b8;
  width: 100%;
}

.review-resource-chip {
  padding: 0.14rem 0.36rem;
  gap: 0.3rem;
  min-width: 0;
  white-space: nowrap;
  justify-content: flex-start;
}

/* ============================================
   AUTH GATE & GLASSMORPHISM
   ============================================ */

.auth-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: radial-gradient(circle at 50% 30%, #1a1d26 0%, #0e0f12 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  /* Fallback blur */
}

/* Premium Dark Glass Card */
.glass-panel {
  background: rgba(22, 25, 31, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 24px 48px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(108, 124, 255, 0.15);
  /* Subtle cyan/blue glow */
  border-radius: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: authFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.auth-logo-img {
  width: auto;
  max-width: 280px;
  height: auto;
  max-height: 80px;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 12px rgba(108, 124, 255, 0.4));
}

.auth-header h1 {
  display: none;
  /* Hide if still present in DOM, but we removed it */
}



.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.auth-tab:hover:not(.is-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

/* Inputs */
.auth-form-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: #fff;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(108, 124, 255, 0.15);
}

/* Validation Styles */
.input-group.error input {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.input-error-msg {
  color: #ff6b6b;
  font-size: 0.8rem;
  margin-top: 0.4rem;
  padding-left: 0.5rem;
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s ease;
}

.input-group.error .input-error-msg {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(3px);
  }
}

.shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Buttons */
.auth-submit-btn {
  background: linear-gradient(135deg, #53d1de 0%, #6C7CFF 100%);
  border: none;
  border-radius: 12px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(108, 124, 255, 0.3);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(108, 124, 255, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.2);
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  padding: 0 1rem;
}

.auth-google-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-google-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}


/* ============================================
   USER MENU (Top Right)
   ============================================ */

.user-menu-container {
  /* Positioned by flex parent (app-topbar) */
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-menu {
  position: relative;
}

.topbar-drive {
  display: flex;
  align-items: center;
}

.drive-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5f5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drive-cta:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  color: #e2e8f0;
}

.drive-cta.is-connected {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(15, 118, 110, 0.18);
  color: #99f6e4;
}

.drive-cta-logo {
  display: inline-flex;
  align-items: center;
}

.drive-cta-logo svg {
  width: 16px;
  height: 16px;
}

.drive-cta-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 212, 191, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: #99f6e4;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.25);
}

.drive-cta-check svg {
  width: 12px;
  height: 12px;
}

.drive-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.drive-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #0b0f16;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.drive-menu-dropdown.is-hidden {
  display: none;
}

.drive-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.drive-menu-item:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.drive-menu-item.danger {
  color: #fca5a5;
}

.drive-menu-item.danger:hover {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.user-avatar-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--card-surface);
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  padding: 0;
}

.user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  box-shadow: none;
}

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 220px;
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  transform-origin: top right;
  animation: menuPop 0.15s cubic-bezier(0.2, 0, 0.13, 1.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-dropdown.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

@keyframes menuPop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.user-menu-header {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.25rem;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-role {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}

.role-admin {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
}

.role-student {
  background: rgba(154, 163, 173, 0.15);
  color: #9aa3ad;
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.user-menu-item.danger:hover {
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
}

.user-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 0.25rem 0;
}

/* =========================================
   Event Side Panel (Inset Grouped Style)
   ========================================= */

.event-side-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 400px;
  border-radius: 16px;
  background: rgba(30, 30, 35, 0.85);
  /* Darker, richer background */
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  transform: translateX(120%);
  /* Move further out */
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: 0;
  color: #F5F5F7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  /* For radius */
}

.event-side-panel.is-open {
  transform: translateX(0);
}

/* Header */
.panel-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  /* No border bottom, just spacing */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.panel-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.panel-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.panel-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 0.25rem;
}

/* Removed conflicting .panel-tag block */

/* Colored Tags specific logic will be in JS or classes */
.panel-tag.blue {
  background: rgba(10, 132, 255, 0.15);
  color: #64D2FF;
  border-color: rgba(10, 132, 255, 0.2);
}

.panel-tag.green {
  background: rgba(48, 209, 88, 0.15);
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.2);
}

/* Content Scroll Area */
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.5rem;
  margin-left: 0.5rem;
  font-weight: 600;
}

/* Reference-Style Cards */
.panel-card {
  background: rgba(18, 20, 24, 0.35);
  /* Lighter than bg */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* List/Row Style Inputs */
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  min-height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.panel-row label {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
}

.panel-row-input {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  /* Muted value color */
  text-align: right;
  font-size: 0.95rem;
  width: 60%;
  outline: none;
}

.panel-row-input:focus {
  color: #fff;
}

/* Special Inputs */
.panel-notes-input {
  width: 100%;
  min-height: 120px;
  background: transparent;
  border: none;
  padding: 1rem;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  display: block;
}

.panel-notes-input:focus {
  outline: none;
}

.panel-link-group {
  margin: 0 0 12px 0;
  display: grid;
  gap: 6px;
}

.panel-link-group--compact {
  margin-top: -14px;
}

.panel-link-list {
  display: grid;
  gap: 8px;
}

.panel-notes-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel-notes-container .panel-section-title {
  margin: 0 0 0.5rem 0;
}

.panel-link-group .panel-section-title {
  margin: 0 0 4px 0;
}

.panel-notes-box {
  margin-bottom: 12px;
}

.panel-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(6, 10, 14, 0.45);
  box-shadow: none;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.panel-link-item:hover {
  border-color: rgba(45, 212, 191, 0.6);
  background: rgba(10, 16, 20, 0.55);
  color: #f8fafc;
  transform: translateY(-0.5px);
}

.panel-link-text {
  display: grid;
  gap: 4px;
}

.panel-link-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.9);
}

.panel-link-host {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}

.panel-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
  color: #2dd4bf;
  font-size: 0.85rem;
}

.panel-link-empty {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(8, 12, 16, 0.4);
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #2997ff;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
  margin-top: -0.5rem;
  margin-left: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.panel-link:hover {
  text-decoration: underline;
}

/* Footer */
.panel-footer {
  padding: 1rem 1.5rem;
  background: rgba(30, 30, 35, 0.95);
  /* Opaque background */
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* Footer Toggle */
.panel-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.panel-toggle input {
  display: none;
}

.panel-toggle-switch {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.panel-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.panel-toggle input:checked+.panel-toggle-switch {
  background: #30d158;
}

.panel-toggle input:checked+.panel-toggle-switch::after {
  transform: translateX(20px);
}

.panel-toggle span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
}

/* Footer Buttons */
.panel-btn-primary {
  background: #0071e3;
  /* Classic Apple Blue */
  color: white;
  border: none;
  padding: 0 1.25rem;
  height: 36px;
  border-radius: 18px;
  /* Pill shape */
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-btn-primary:hover {
  background: #0077ED;
}

.panel-btn-ghost {
  background: transparent;
  color: #2997ff;
  border: none;
  padding: 0 0.75rem;
  height: 36px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.panel-btn-ghost:hover {
  background: rgba(41, 151, 255, 0.1);
}

.panel-footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

@media (max-width: 600px) {
  .event-side-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
    border: none;
  }
}

/* =========================================
   Event Side Panel (Stitch Design - Navy/Cyan)
   ========================================= */

/* Global Background for Aesthetic */
body {
  background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuDoOaRFyjejhTcTFeorpaw6pXCcuh7I51VuieB9sxyYBLtqQ-eQoQB3wRA_b1hGQ46JER8TglE618m2c0DQ43iLmlShygF1h3j1JV2DdWCbjdS5Ax-foaKWfwY29SFa8b6rZBo5kxaaNRoHDuq5S5UkkTG_BUbXoqD6JJZ2bGP9mPvKPvR8eE0dtkH6qd53ZH00fbUx5TWsVHSrCJZKgsneZIZ8rQY2LK-ybegdSTJRMFznyF1W-cIUukjjd6EqBBcmR_9qr2wfhTtz');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* 1. Structural Docking & Glass Card */
.event-side-panel {
  /* Refined Positioning */
  position: fixed !important;
  top: 68px !important;
  /* 52px Header + 16px Gap */
  right: 16px !important;
  /* Match sidebar margin */
  bottom: 16px !important;
  /* Equal gap to bottom */
  width: 350px !important;

  /* Roundness & Clipping */
  border-radius: 12px !important;
  /* Round all corners */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  /* Prevent content scroll bleed */

  /* Stitch Glass Card Style */
  background: rgba(12, 14, 20, 0.05) !important;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)) !important;
  backdrop-filter: blur(26px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(165%) !important;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.45) !important;
  /* border-left removed in favor of full border defined above */

  transform: translateX(110%);
  /* Move slightly more to clear margin/shadow */
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  z-index: 999;
  --panel-notes-gap: 0.75rem;
  --panel-notes-icon-color: #64748b;
  --panel-notes-icon-offset: 0.75rem;
  --panel-empty-note-color: rgba(255, 255, 255, 0.4);
  --panel-empty-note-size: 0.85rem;
  --panel-empty-note-padding: 0 0.25rem;
  --panel-toggle-label-color: #fff;
}

.event-side-panel.is-open {
  transform: translateX(0);
}

/* Header Gradient Glow */
.event-side-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 128px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

/* 2. Header & Title */
.panel-header {
  padding: 1.5rem !important;
  padding-bottom: 0.5rem !important;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.panel-title {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.75rem !important;
}

/* Close Button (Circle Style from Stitch) */
.panel-close {
  position: absolute !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 1002;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* 3. Tags (Stitch Style) */
.panel-tags {
  display: flex;
  flex-wrap: wrap !important;
  gap: 0 !important;
}

/* Removed conflicting .panel-tag and .tag-* blocks */

/* 4. Notes Section */
.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem !important;
  padding-top: 1rem !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 10;
}

.panel-section-title {
  text-transform: uppercase !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  color: rgba(156, 163, 175, 1) !important;
  /* Muted gray (text-gray-500) */
  margin-bottom: 0.5rem !important;
  display: block;
}

/* Glass Inputs (Stitch Style) */
.glass-input-container {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 0.75rem !important;
  transition: all 0.2s ease;
  position: relative;
}

.panel-notes-box {
  margin-bottom: var(--panel-notes-gap);
}

.panel-go-to-notes {
  position: absolute;
  top: auto;
  right: var(--panel-notes-icon-offset);
  bottom: var(--panel-notes-icon-offset);
  background: transparent;
  border: none;
  color: var(--panel-notes-icon-color);
  cursor: pointer;
  padding: 0;
}

.panel-empty-note {
  color: var(--panel-empty-note-color);
  font-size: var(--panel-empty-note-size);
  padding: var(--panel-empty-note-padding);
  margin: 0;
}

.toggle-label {
  color: var(--panel-toggle-label-color);
}

.glass-input-container:focus-within {
  border-color: rgba(79, 209, 197, 0.5) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.panel-notes-input {
  background: transparent !important;
  border: none !important;
  width: 100%;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.9rem !important;
  resize: none;
  min-height: 80px;
  padding: 0 2rem 1.5rem 0 !important;
}

.panel-notes-input:focus {
  outline: none !important;
}

/* Open in Notes Button (Stitch Style) */
.btn-stitch-outline {
  width: 100%;
  padding: 0.75rem !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #4FD1C5 !important;
  /* Cyan Glow */
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-stitch-outline:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(79, 209, 197, 0.5) !important;
}

/* 5. Performance Grid (Stitch Layout) */
.stitch-grid-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* New Compact Row: Date | Score | Duration */
.stitch-grid-row.performance-compact-row {
  grid-template-columns: 1.3fr 1.2fr 0.8fr;
  /* Adjusted ratios */
  gap: 0.5rem;
}

.stitch-input-box {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 0.75rem !important;
  height: 72px;
  /* Slightly shorter */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stitch-input-box.compact-box {
  padding: 0.6rem 0.75rem !important;
}

.stitch-label {
  font-size: 0.7rem !important;
  color: rgba(156, 163, 175, 1) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.stitch-grid-input {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  width: 100%;
  outline: none;
  font-family: inherit !important;
  /* Fix monospace issue */
}

/* Score Split Input Styling */
.panel-performance-grid {
  --stitch-input-pill-bg: rgba(255, 255, 255, 0.04);
  --stitch-input-pill-border: rgba(255, 255, 255, 0.08);
  --stitch-input-pill-radius: 10px;
  --stitch-input-pill-width: 40px;
  --stitch-input-pill-height: 28px;
  --stitch-input-pill-font-size: 0.85rem;
  --stitch-score-divider-size: 1.05rem;
  --stitch-score-divider-color: rgba(255, 255, 255, 0.3);
  --stitch-icon-gap: 6px;
  --stitch-icon-gap-duration: 8px;
  --stitch-duration-bg: rgba(0, 0, 0, 0.2);
  --stitch-duration-radius: 8px;
  --stitch-duration-padding: 0.5rem;
  --stitch-duration-margin-top: 0px;
  --stitch-duration-min-height: 72px;
  --stitch-duration-unit-gap: 8px;
  --stitch-status-font-size: 0.7rem;
  --stitch-status-transition: 0.3s;
  --stitch-status-height: 16px;
  --stitch-status-margin-top: 0.25rem;
  --stitch-date-transform: uppercase;
  --stitch-date-font: monospace;
  --stitch-input-row-gap: 6px;
  overflow-x: hidden;
}

.panel-performance-grid .stitch-grid-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel-performance-grid .stitch-input-box {
  min-width: 0;
  gap: var(--stitch-input-row-gap);
  justify-content: flex-start;
}

.panel-performance-grid .stitch-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-performance-grid .stitch-input-box .input-wrapper,
.panel-performance-grid .score-wrapper {
  margin-top: var(--stitch-input-row-gap);
}

.panel-performance-grid .stitch-grid-input {
  min-width: 0;
}

.stitch-icon {
  margin-right: var(--stitch-icon-gap);
}

.stitch-icon--duration {
  --stitch-icon-gap: var(--stitch-icon-gap-duration);
}

.stitch-date-input {
  text-transform: var(--stitch-date-transform);
  font-family: var(--stitch-date-font);
}

.stitch-duration-box {
  height: auto;
  min-height: var(--stitch-duration-min-height);
}

.stitch-duration-wrapper {
  background: var(--stitch-duration-bg);
  border-radius: var(--stitch-duration-radius);
  padding: var(--stitch-duration-padding);
  margin-top: var(--stitch-duration-margin-top);
}

.stitch-duration-input {
  flex: 1;
  text-align: center;
}

.stitch-duration-wrapper .input-unit {
  margin-left: var(--stitch-duration-unit-gap);
}

.stitch-attempt-status-row {
  margin-top: var(--stitch-status-margin-top);
  text-align: right;
  height: var(--stitch-status-height);
}

.stitch-attempt-status {
  font-size: var(--stitch-status-font-size);
  opacity: 0;
  transition: opacity var(--stitch-status-transition);
}

.score-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center them */
  gap: 5px;
  width: 100%;
}

.score-input {
  text-align: center;
  background: var(--stitch-input-pill-bg) !important;
  border: 1px solid var(--stitch-input-pill-border);
  border-radius: var(--stitch-input-pill-radius);
  padding: 0 4px;
  width: var(--stitch-input-pill-width) !important;
  height: var(--stitch-input-pill-height) !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: var(--stitch-input-pill-font-size) !important;
}

.score-divider {
  color: var(--stitch-score-divider-color);
  font-size: var(--stitch-score-divider-size);
  font-weight: 300;
  margin-top: -2px;
  /* Visual tweak */
}

.input-unit {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  margin-left: auto;
}

.input-wrapper {
  display: flex;
  align-items: center;
}

/* 6. Footer Actions (Stitch) */
.panel-footer {
  padding: 1.5rem !important;
  background: rgba(11, 14, 30, 0.4) !important;
  /* Navy 900 / 40% */
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0;
  z-index: 20;
}

/* Stitch Toggle */
.stitch-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.stitch-toggle-label {
  position: relative;
  width: 44px;
  height: 22px;
  background: #334155;
  border-radius: 999px;
  transition: 0.3s;
}

.stitch-toggle-label::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.event-completion-checkbox:checked+.stitch-toggle-label {
  background: #22d3ee !important;
  /* Cyan */
}

.event-completion-checkbox:checked+.stitch-toggle-label::before {
  transform: translateX(22px);
}

/* Review Sheet Button (White Pill) */
.btn-stitch-primary {
  background: #fff !important;
  color: #0f9d58 !important;
  /* Cyan Darker Text */
  border: none !important;
  border-radius: 8px !important;
  /* Slight rounded rect per stitch */
  padding: 0.6rem 1.25rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 10px rgba(34, 211, 238, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.event-notes-sheet-btn {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.78rem !important;
  gap: 0.4rem;
  white-space: nowrap;
}

.event-notes-sheet-btn .sheet-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.event-notes-sheet-btn svg {
  width: 14px;
  height: 14px;
}

.btn-stitch-primary:hover {
  background: #f1f5f9 !important;
}

@media (max-width: 900px) {
  .panel-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .panel-footer-actions {
    width: 100%;
    align-items: flex-end;
  }

  .event-notes-sheet-btn {
    padding: 0.4rem 0.7rem !important;
    font-size: 0.74rem !important;
    gap: 0.35rem;
  }

  .event-notes-sheet-btn svg {
    width: 12px;
    height: 12px;
  }

  .event-notes-sheet-btn .sheet-label {
    max-width: 100px;
  }
}

@media (max-width: 1200px) {
  .panel-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .panel-footer-actions {
    width: 100%;
    align-items: flex-end;
  }
}

/* Layout Squeeze (Maintained) */
body.has-event-panel .app-shell-content {
  margin-right: 366px !important;
  /* Move scrollbar into view */
  padding-right: 0 !important;
}

body.has-event-panel::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(226, 232, 240, 0.75), transparent 60%),
    radial-gradient(1px 1px at 78% 24%, rgba(226, 232, 240, 0.6), transparent 60%),
    radial-gradient(1px 1px at 68% 72%, rgba(147, 197, 253, 0.7), transparent 65%),
    radial-gradient(2px 2px at 32% 64%, rgba(191, 219, 254, 0.7), transparent 70%),
    radial-gradient(1px 1px at 22% 46%, rgba(191, 219, 254, 0.65), transparent 60%),
    radial-gradient(1px 1px at 84% 58%, rgba(226, 232, 240, 0.65), transparent 60%),
    radial-gradient(1px 1px at 48% 32%, rgba(226, 232, 240, 0.55), transparent 60%),
    radial-gradient(2px 2px at 58% 84%, rgba(147, 197, 253, 0.65), transparent 70%),
    radial-gradient(280px 200px at 72% 12%, rgba(108, 124, 255, 0.32), transparent 70%),
    radial-gradient(220px 180px at 18% 78%, rgba(59, 130, 246, 0.24), transparent 72%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.9) 0%, rgba(12, 14, 22, 0.9) 100%);
  pointer-events: none;
  z-index: 0;
}

/* --- STITCH DESIGN SYSTEM EXTENSIONS --- */

/* Glass Input Container (Notes & Fields) */
.glass-input-container {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  /* rounded-xl */
  padding: 0.75rem;
  transition: all 0.2s ease;
  position: relative;
}

.glass-input-container:focus-within {
  border-color: rgba(79, 209, 197, 0.5);
  /* cyan-glow/50 */
  background: rgba(0, 0, 0, 0.3);
}

/* Textarea Reset */
.panel-notes-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #d1d5db;
  /* gray-300 */
  font-size: 0.875rem;
  /* text-sm */
  overflow: hidden;
  resize: none;
  outline: none;
}

.panel-notes-input::placeholder {
  color: #6b7280;
  /* gray-500 */
}

/* Stitch Grid Layout */
.stitch-grid-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stitch-input-box {
  background: rgba(0, 0, 0, 0.2);
  /* glass-input */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 5rem;
  /* h-20 */
}

.stitch-label {
  font-size: 0.7rem;
  /* ~11px */
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  /* gray-500 */
  letter-spacing: 0.05em;
  display: block;
}

.input-wrapper {
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}

.stitch-grid-input {
  background: transparent;
  border: none;
  color: white;
  font-size: 0.875rem;
  /* text-sm */
  width: 100%;
  outline: none;
  font-family: inherit;
  padding: 0;
}

.stitch-grid-input::placeholder {
  color: #4b5563;
}

/* Stitch Outline Button (Open in Notes) */
.btn-stitch-outline {
  width: 100%;
  padding: 0.75rem;
  background: rgba(21, 26, 48, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: #22d3ee;
  /* cyan-400 */
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-stitch-outline:hover {
  background: #151A30;
  border-color: rgba(34, 211, 238, 0.5);
}

/* Ensure Toggle Switch matches Stitch */
.stitch-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.stitch-toggle-label {
  width: 48px;
  height: 24px;
  position: relative;
  display: block;
  background: #334155;
  border-radius: 9999px;
  transition: 0.3s;
}

.stitch-toggle-label::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.event-completion-checkbox:checked+.stitch-toggle-label {
  background: #22d3ee;
}

/* Fix for the transform logic if needed, simpler to use translateX on the element */
.event-completion-checkbox:checked+.stitch-toggle-label::before {
  transform: translateX(24px);
}

/* HIDE the actual checkbox input so only the switch shows */
.event-completion-checkbox {
  display: none !important;
}

/* --- VS CODE STYLE CLOSE BUTTON OVERRIDE --- */
.panel-close {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 1001;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  aspect-ratio: 1 / 1;
  border-radius: 6px !important;
  /* Force square with rounded corners */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  /* No circle default */
  border: none !important;
  color: #94a3b8;
  /* Mutable gray */
  transition: background 0.1s ease, color 0.1s ease;
  cursor: pointer;
  box-shadow: none !important;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  /* Subtle box hover */
  color: #fff;
}

.panel-close svg {
  width: 18px;
  height: 18px;
}

/* --- CONFIRM MODAL --- */
.confirm-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.confirm-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(92vw, 420px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.6);
  padding: 1.25rem 1.35rem;
  color: #e2e8f0;
}

.confirm-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.confirm-message {
  margin: 0;
  color: #cbd5f5;
  font-size: 0.9rem;
  line-height: 1.4;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.confirm-button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-button--ghost {
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5f5;
}

.confirm-button--ghost:hover {
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
}

.confirm-button--primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.35));
  color: #e2e8f0;
  border-color: rgba(56, 189, 248, 0.45);
}

.confirm-button--primary:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(59, 130, 246, 0.5));
  color: #ffffff;
}

.google-reauth-dialog {
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: 0 20px 45px rgba(127, 29, 29, 0.4);
}

.google-reauth-context {
  margin: 0.65rem 0 0;
  color: #cbd5f5;
  font-size: 0.84rem;
}

.google-reauth-steps {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
  color: #e2e8f0;
  font-size: 0.88rem;
}

.google-reauth-troubleshoot-title {
  margin: 0.85rem 0 0.2rem;
  color: #fda4af;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.google-reauth-steps--troubleshoot {
  margin-top: 0.35rem;
  color: #fecdd3;
  font-size: 0.81rem;
}

/* --- STITCH ATTACH FILES --- */
.stitch-attachments-section {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.stitch-drive-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.stitch-drive-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5f5;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stitch-drive-cta:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.6);
  color: #e2e8f0;
}

.stitch-drive-logo svg {
  width: 16px;
  height: 16px;
}

.stitch-drive-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.5);
}

.btn-stitch-attach {
  width: 100%;
  padding: 0.75rem;
  background: rgba(108, 124, 255, 0.08);
  border: 1px dashed rgba(108, 124, 255, 0.35);
  border-radius: 12px;
  color: #c7d2fe;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-stitch-attach:hover {
  background: rgba(108, 124, 255, 0.14);
  border-color: rgba(108, 124, 255, 0.55);
  color: #eef2ff;
}

.stitch-file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stitch-file-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
  font-size: 0.75rem;
  font-weight: 600;
  flex: 0 0 auto;
  min-height: 0;
}

.stitch-file-status.is-hidden {
  display: none;
}


.stitch-file-card {
  aspect-ratio: 1 / 1;
  max-width: 220px;
  justify-self: start;
  background: rgba(20, 27, 38, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 14px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #e2e8f0;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

.stitch-file-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stitch-file-card-name {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.stitch-file-card-name:hover {
  text-decoration: underline;
}

.stitch-file-preview-lg {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.8);
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.stitch-file-preview-lg.is-generic {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
}

.stitch-file-preview-lg.has-image {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.stitch-file-doc {
  width: 64px;
  height: 80px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  position: relative;
}

.stitch-file-doc-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #e2e8f0 50%, #ffffff 50%);
  border-bottom-left-radius: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.6);
}

.stitch-file-icon {
  width: 16px;
  height: 16px;
  color: #22d3ee;
  /* Cyan tint */
}

.stitch-file-icon.is-pdf,
.stitch-file-icon.is-doc,
.stitch-file-icon.is-image,
.stitch-file-icon.is-sheet,
.stitch-file-icon.is-slides,
.stitch-file-icon.is-file {
  color: #94a3b8;
}

.stitch-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.stitch-file-remove {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: 0.25rem;
}

.stitch-file-remove:hover {
  color: #f87171;
}

.stitch-file-hint {
  margin: 0.2rem 0 0;
  color: #94a3b8;
  font-size: 0.72rem;
}

/* Fix Side Panel Notes Textarea Focus */
.panel-notes-input:focus {
  box-shadow: none !important;
  border: none !important;
}

/* Ensure Calendar has minimum width to trigger scroll on small screens */
#schedule-view {
  min-width: 800px;
}

/* =========================================
   Event Panel - Soft Layout (Performance)
   ========================================= */
.panel-performance-grid {
  /* Override locally if needed, but we focus on inner elements */
}

/* Specific Title Override for this section */
.panel-performance-grid .panel-section-title {
  text-transform: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  padding-left: 0.25rem;
  /* Align visual optical margin */
}

.panel-soft-container {
  /* High-Fidelity Glass Card Token */
  --soft-panel-padding: 1.25rem;
  --soft-panel-gap: 20px;
  --soft-input-height: 48px;
  /* Taller, chunkier inputs */
  --soft-input-radius: 12px;
  --soft-input-bg: rgba(255, 255, 255, 0.03);
  --soft-input-border: 1px solid rgba(255, 255, 255, 0.08);
  --soft-input-focus-border: rgba(79, 209, 197, 0.6);
  --soft-input-focus-bg: rgba(0, 0, 0, 0.25);
  --soft-label-color: #94a3b8;
  --soft-label-size: 0.8rem;
  --soft-label-weight: 500;
  --soft-icon-color: #64748b;

  /* Container visual styling */
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  padding: var(--soft-panel-padding);

  /* Width Design Tokens */
  --soft-date-width: 190px;
  --soft-duration-width: 150px;

  display: flex;
  flex-direction: column;
  gap: var(--soft-panel-gap);
  margin-top: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.panel-grid-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  /* Horizontal gap between Date and Score */
  align-items: start;
}

.panel-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Space between label and input */
  position: relative;
}

/* Date group needs fixed width */
.panel-input-group--date {
  width: var(--soft-date-width);
  flex: none;
  /* Disable flex-grow */
}

.panel-input-group--score {
  width: auto;
}

.panel-input-group--duration {
  margin-top: 0;
  width: var(--soft-duration-width);
}

.panel-input-label {
  font-size: var(--soft-label-size);
  font-weight: var(--soft-label-weight);
  color: var(--soft-label-color);
  margin-left: 2px;
}

.panel-label-centered {
  text-align: center;
  display: block;
  width: 100%;
}

.panel-input-wrapper {
  position: relative;
  height: var(--soft-input-height);
  background: var(--soft-input-bg);
  border: var(--soft-input-border);
  border-radius: var(--soft-input-radius);
  border-radius: var(--soft-input-radius);
  display: flex;
  align-items: center;
  padding: 0 10px;
  /* Reduced to fit constrained width */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  /* Ensure no scrollbars bleed */
}

.panel-split-score {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.panel-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-score-divider {
  width: 1px;
  height: 22px;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.panel-score-percent {
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-percent-symbol {
  color: var(--soft-icon-color);
  font-size: 0.85rem;
}

.panel-input-wrapper:focus-within {
  border-color: var(--soft-input-focus-border);
  background: var(--soft-input-focus-bg);
  box-shadow: 0 0 0 2px rgba(79, 209, 197, 0.15);
}

.panel-input-icon {
  color: var(--soft-icon-color);
  margin-right: 8px;
  /* Tighter gap */
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Actual input field */
.panel-input-field {
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.9rem;
  /* Slightly smaller for fit */
  height: 100%;
  width: 100%;
  outline: none;
  padding: 0;
  min-width: 0;
  /* Flexbox overflow fix */
}

/* Hide default calendar picker */
input[type="date"].panel-input-field::-webkit-calendar-picker-indicator {
  background: transparent;
  bottom: 0;
  color: transparent;
  cursor: pointer;
  height: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
}

/* Duration unit */
.panel-input-unit {
  color: var(--soft-icon-color);
  font-size: 0.9rem;
  margin-left: 10px;
  pointer-events: none;
}

/* Split Score Inputs */
/* =========================================
   Event Panel - Glass Tags (Header)
   ========================================= */
.panel-title-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

.panel-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 20px;
  padding-left: 0;
  width: 100%;
}

.panel-submeta {
  display: grid;
  gap: 0.4rem;
  margin: -8px 0 16px;
  width: 100%;
}

.panel-submeta:empty {
  display: none;
}

.panel-submeta-item {
  display: grid;
  grid-template-columns: minmax(64px, auto) 1fr;
  gap: 0.5rem;
  align-items: start;
  font-size: 0.74rem;
  color: #cbd5f5;
}

.panel-submeta-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.6rem;
  color: #8fa6c8;
}

.panel-submeta-value {
  color: #e2e8f0;
  line-height: 1.25;
  text-align: left;
  justify-self: start;
}

.panel-tag {
  /* Glass Tokens */
  --glass-bg: rgba(255, 255, 255, 0.04);
  /* Inner borders handled by container + pseudo elements or separators */
  --glass-border: transparent;
  --glass-radius: 0;
  /* Rectangles */
  --glass-padding: 4px 10px;
  /* Slim height, wider text */
  --glass-blur: 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--glass-padding);
  border-radius: 8px;
  min-height: 26px;
  width: 100%;
  position: relative;

  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));

  color: #94a3b8;
  /* Slate 400 - Muted text */
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  /* Clean look */
}


.panel-tag--icon {
  gap: 0.4rem;
}

.panel-tag--icon .resource-type-icon {
  width: 10px;
  height: 10px;
  opacity: 0.7;
}

.panel-tag--icon .panel-tag-text {
  display: inline-flex;
  align-items: center;
}

.panel-tag-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}


.panel-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

/* Active Tag (e.g. Khan Academy) - Cyan Glass tint */
.tag-active {
  background: rgba(34, 211, 238, 0.15);
  /* Cyan tint */
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.35);
  /* box-shadow removed for seamless edge */
  z-index: 1;
  /* Sit above separators */
}

/* Default Tag - Neutral Glass */
.tag-default {
  /* Inherits base glass */
}

@media (max-width: 720px) {
  .panel-tags {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-tag {
    justify-content: flex-start;
  }
}

.panel-split-score .panel-input-field.split-input,
.panel-score-percent .panel-input-field.split-input {
  width: 44px;
  /* Back to compact width */
  text-align: center;
  background: var(--soft-input-bg);
  border: var(--soft-input-border);
  border-radius: var(--soft-input-radius);
  height: var(--soft-input-height);
  padding: 0 4px;
  font-size: 1rem;
  font-family: monospace;
  /* Tabular nums often look better */
}

.panel-percent-input {
  width: 56px;
}

.panel-split-score .panel-input-field.split-input:focus,
.panel-score-percent .panel-input-field.split-input:focus {
  border-color: var(--soft-input-focus-border);
  background: var(--soft-input-focus-bg);
}

/* =========================================
   NANO BANANA DESIGN TOKENS (Implementation)
   ========================================= */
:root {
  /* --- Surfaces (Deep Space Glass) --- */
  --nano-glass-bg: rgba(255, 255, 255, 0.03);
  /* Ultra subtle fill */
  --nano-glass-border: rgba(255, 255, 255, 0.08);
  /* Hairline definition */
  --nano-glass-hover: rgba(255, 255, 255, 0.06);
  /* Interactive state */

  /* --- Save Button (Crystal Pill) --- */
  --nano-btn-start: #5a6dff;
  /* Accent */
  --nano-btn-end: #4a5ad6;
  /* Deep accent */
  --nano-btn-shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.2);

  /* --- Geometry & Typography --- */
  --nano-font: 'Outfit', sans-serif;
  --nano-radius-pill: 9999px;
  --nano-radius-card: 10px;
}

/* --- Save Attempt Button (Crystal Focus V2) --- */
/* --- Save Attempt Button (Crystal Focus V2 - Refined) --- */
.panel-attempt-save {
  /* Layout & Size */
  height: 44px;
  /* Taller for presence */
  padding: 0 2rem;
  /* Wider for elegance */
  min-width: 160px;
  /* Enforce presence */
  white-space: nowrap;
  /* Prevent wrapping */
  border-radius: var(--nano-radius-pill);

  /* Visuals: Deep Crystal Gradient */
  background: linear-gradient(180deg,
      rgba(90, 109, 255, 1) 0%,
      rgba(74, 90, 214, 1) 100%);

  /* Advanced Lighting: Inner Bevel + Crisp Shadow */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  /* Subtle depth */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    /* Top shine */
    inset 0 -2px 5px rgba(0, 0, 0, 0.1),
    /* Bottom curve shade */
    0 2px 4px rgba(0, 0, 0, 0.2);
  /* Drop shadow */

  /* Typography */
  color: #fff;
  font-family: var(--nano-font);
  font-weight: 600;
  /* Bolder */
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  /* Interaction */
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* Hover: Simple Lift & Brightness (No Glow/Shine) */
.panel-attempt-save:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(108, 124, 255, 0.35);
  /* Subtle colored lift, not a glow */
}

.panel-attempt-save:disabled {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
  cursor: not-allowed;
  text-shadow: none;
}

/* --- Status Pill (Phantom Glass) --- */
.attempt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  height: 28px;
  border-radius: var(--nano-radius-pill);

  /* Nano Style: Barely there */
  background: var(--nano-glass-bg);
  border: 1px solid var(--nano-glass-border);

  font-family: var(--nano-font);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);

  /* FLUID HIDDEN STATE */
  transition: opacity 0.2s;
  opacity: 1;
}

/* CRITICAL: Hide container entirely if empty */
.attempt-status:empty {
  display: none;
  opacity: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.attempt-status.is-saved {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
  /* Emerald */
}

/* --- Attempt History (Glass Card) --- */
.event-attempts {
  --attempt-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  --attempt-border: rgba(255, 255, 255, 0.15);
  --attempt-border-strong: rgba(255, 255, 255, 0.18);
  --attempt-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --attempt-divider: rgba(255, 255, 255, 0.18);
  --attempt-text: #cbd5e1;
  --attempt-title: #ffffff;
  --attempt-muted: rgba(148, 163, 184, 0.9);
  --attempt-btn-bg: rgba(255, 255, 255, 0.06);
  --attempt-btn-border: rgba(255, 255, 255, 0.18);
  --attempt-btn-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  --attempt-edit-bg: rgba(8, 12, 20, 0.5);
  --attempt-edit-border: rgba(255, 255, 255, 0.1);
  --attempt-input-bg: rgba(10, 16, 28, 0.6);
  --attempt-input-border: rgba(255, 255, 255, 0.14);
  --attempt-accent: #67e8f9;
  --attempt-accent-bg: rgba(34, 211, 238, 0.16);
}

.event-attempts .attempt-history {
  display: grid;
  gap: 12px;
}

.event-attempts .attempt-card {
  background: var(--attempt-card-bg);
  border: 1px solid var(--attempt-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--attempt-shadow);
  display: grid;
  gap: 10px;
}

.event-attempts .attempt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-attempts .attempt-title {
  color: var(--attempt-title);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.event-attempts .attempt-actions {
  display: flex;
  gap: 10px;
}

.event-attempts .action-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--attempt-btn-border);
  background: var(--attempt-btn-bg);
  box-shadow: var(--attempt-btn-shadow);
  color: var(--attempt-title);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.event-attempts .action-btn svg {
  width: 20px;
  height: 20px;
}

.event-attempts .attempt-divider {
  height: 1px;
  background: var(--attempt-divider);
}

.event-attempts .attempt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--attempt-text);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}

.event-attempts .attempt-edit {
  background: var(--attempt-edit-bg);
  border: 1px solid var(--attempt-edit-border);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.event-attempts .attempt-edit.is-hidden {
  display: none;
}

.event-attempts .attempt-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 12px;
}

.event-attempts .attempt-field {
  display: grid;
  gap: 6px;
  color: var(--attempt-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-attempts .attempt-field input {
  background: var(--attempt-input-bg);
  border: 1px solid var(--attempt-input-border);
  border-radius: 10px;
  color: var(--attempt-title);
  padding: 8px 10px;
  font-size: 14px;
}

.event-attempts .attempt-score-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-attempts .attempt-score-inputs input {
  width: 64px;
  text-align: center;
}

.event-attempts .attempt-score-divider {
  width: 1px;
  height: 18px;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.event-attempts .attempt-score-percent {
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-attempts .attempt-score-percent input {
  width: 60px;
  text-align: center;
}

.event-attempts .score-percent-symbol {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.event-attempts .score-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 16px;
}

.event-attempts .attempt-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.event-attempts .btn-ghost {
  background: transparent;
  border: 1px solid var(--attempt-btn-border);
  color: var(--attempt-text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.event-attempts .btn-primary {
  background: var(--attempt-accent-bg);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--attempt-accent);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.analytics-filter-block--custom-range {
  min-width: 250px;
}

.analytics-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 118px;
}

.analytics-date-field span {
  font-size: 0.58rem;
  color: #8a94a1;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.analytics-date-field input[type="date"] {
  height: var(--analytics-control-height);
  border-radius: var(--analytics-control-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 18, 24, 0.72);
  color: #dfe6ee;
  padding: 0 10px;
  font-size: 0.7rem;
  font-weight: 600;
  box-sizing: border-box;
}

.analytics-date-field input[type="date"]:focus {
  outline: none;
  border-color: rgba(88, 166, 255, 0.65);
}

.app-version-footer {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  z-index: 9999;
  user-select: none;
}
