:root {
  /* Colors */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  --color-secondary: #6b7280;
  --color-secondary-hover: #4b5563;
  --color-accent: #2563eb;

  /* Status colors */
  --color-success: #10b981;
  --color-success-bg: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef3c7;
  --color-error: #ef4444;
  --color-error-bg: #fee2e2;
  --color-info: #3b82f6;
  --color-info-bg: #dbeafe;

  /* Status - granular variants */
  --status-success-bg: #dcfce7;
  --status-success-bg-subtle: #f0fdf4;
  --status-success-text: #166534;
  --status-success-border: #86efac;

  --status-warning-bg: #fef3c7;
  --status-warning-bg-subtle: #fffbeb;
  --status-warning-text: #92400e;
  --status-warning-border: #fcd34d;

  --status-error-bg: #fee2e2;
  --status-error-bg-subtle: #fef2f2;
  --status-error-text: #991b1b;
  --status-error-border: #fecaca;

  --status-info-bg: #dbeafe;
  --status-info-bg-subtle: #eff6ff;
  --status-info-text: #1e40af;
  --status-info-border: #bfdbfe;

  --status-indigo-bg: #e0e7ff;
  --status-indigo-text: #3730a3;

  --status-purple-bg: #f3e8ff;
  --status-purple-text: #7c3aed;

  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-hover: #e5e7eb;

  /* Text colors */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;

  /* Border colors */
  --border-color: #e5e7eb;
  --border-color-dark: #d1d5db;

  /* Subject colors */
  --subject-math: #8b5cf6;
  --subject-maths: #8b5cf6;
  --subject-physics: #3b82f6;
  --subject-chemistry: #10b981;
  --subject-biology: #f59e0b;

  /* Difficulty colors */
  --difficulty-easy: #10b981;
  --difficulty-medium: #f59e0b;
  --difficulty-hard: #ef4444;

  /* Proficiency colors */
  --proficiency-low: #ef4444;
  --proficiency-medium: #f59e0b;
  --proficiency-high: #10b981;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Font sizes */
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 2rem;

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-modal: 200;
  --z-toast: 300;

  /* Layout */
  --nav-height: 64px;
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 56px;
  --max-content-width: 1200px;

  /* Code blocks */
  --code-bg: #f3f4f6;
  --code-text: #374151;

  /* Selection/highlight */
  --selected-bg: #f0f7ff;
  --selected-bg-subtle: #f8faff;
}
/* Dark theme - explicit user selection */
[data-theme="dark"] {
  --color-primary: #818cf8;
  --color-primary-hover: #6366f1;
  --color-primary-light: #1e1b4b;
  --color-secondary: #9ca3af;
  --color-secondary-hover: #d1d5db;
  --color-accent: #60a5fa;

  /* Status colors */
  --color-success: #34d399;
  --color-success-bg: #064e3b;
  --color-warning: #fbbf24;
  --color-warning-bg: #78350f;
  --color-error: #f87171;
  --color-error-bg: #7f1d1d;
  --color-info: #60a5fa;
  --color-info-bg: #1e3a5f;

  /* Status - granular variants */
  --status-success-bg: rgba(34, 197, 94, 0.15);
  --status-success-bg-subtle: rgba(34, 197, 94, 0.08);
  --status-success-text: #86efac;
  --status-success-border: rgba(34, 197, 94, 0.3);

  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-warning-bg-subtle: rgba(245, 158, 11, 0.08);
  --status-warning-text: #fcd34d;
  --status-warning-border: rgba(245, 158, 11, 0.3);

  --status-error-bg: rgba(239, 68, 68, 0.15);
  --status-error-bg-subtle: rgba(239, 68, 68, 0.08);
  --status-error-text: #fca5a5;
  --status-error-border: rgba(239, 68, 68, 0.3);

  --status-info-bg: rgba(59, 130, 246, 0.15);
  --status-info-bg-subtle: rgba(59, 130, 246, 0.08);
  --status-info-text: #93c5fd;
  --status-info-border: rgba(59, 130, 246, 0.3);

  --status-indigo-bg: rgba(99, 102, 241, 0.15);
  --status-indigo-text: #a5b4fc;

  --status-purple-bg: rgba(139, 92, 246, 0.15);
  --status-purple-text: #c4b5fd;

  /* Background colors */
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --bg-hover: #4b5563;

  /* Text colors */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --text-inverse: #111827;

  /* Border colors */
  --border-color: #374151;
  --border-color-dark: #4b5563;

  /* Shadows (darker) */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);

  /* Code blocks */
  --code-bg: #1f2937;
  --code-text: #d1d5db;

  /* Selection/highlight */
  --selected-bg: rgba(129, 140, 248, 0.12);
  --selected-bg-subtle: rgba(129, 140, 248, 0.08);
}
/* System preference dark mode */
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --color-primary: #818cf8;
    --color-primary-hover: #6366f1;
    --color-primary-light: #1e1b4b;
    --color-secondary: #9ca3af;
    --color-secondary-hover: #d1d5db;
    --color-accent: #60a5fa;

    --color-success: #34d399;
    --color-success-bg: #064e3b;
    --color-warning: #fbbf24;
    --color-warning-bg: #78350f;
    --color-error: #f87171;
    --color-error-bg: #7f1d1d;
    --color-info: #60a5fa;
    --color-info-bg: #1e3a5f;

    --status-success-bg: rgba(34, 197, 94, 0.15);
    --status-success-bg-subtle: rgba(34, 197, 94, 0.08);
    --status-success-text: #86efac;
    --status-success-border: rgba(34, 197, 94, 0.3);

    --status-warning-bg: rgba(245, 158, 11, 0.15);
    --status-warning-bg-subtle: rgba(245, 158, 11, 0.08);
    --status-warning-text: #fcd34d;
    --status-warning-border: rgba(245, 158, 11, 0.3);

    --status-error-bg: rgba(239, 68, 68, 0.15);
    --status-error-bg-subtle: rgba(239, 68, 68, 0.08);
    --status-error-text: #fca5a5;
    --status-error-border: rgba(239, 68, 68, 0.3);

    --status-info-bg: rgba(59, 130, 246, 0.15);
    --status-info-bg-subtle: rgba(59, 130, 246, 0.08);
    --status-info-text: #93c5fd;
    --status-info-border: rgba(59, 130, 246, 0.3);

    --status-indigo-bg: rgba(99, 102, 241, 0.15);
    --status-indigo-text: #a5b4fc;

    --status-purple-bg: rgba(139, 92, 246, 0.15);
    --status-purple-text: #c4b5fd;

    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-hover: #4b5563;

    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-inverse: #111827;

    --border-color: #374151;
    --border-color-dark: #4b5563;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);

    --code-bg: #1f2937;
    --code-text: #d1d5db;

    --selected-bg: rgba(129, 140, 248, 0.12);
    --selected-bg-subtle: rgba(129, 140, 248, 0.08);
  }
}
/* Global resets */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  min-height: 100vh;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}
img {
  max-width: 100%;
  height: auto;
}
/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-dark);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}
/* Utility classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* App-specific overrides (base styles come from @shared-ui/theme) */
/* Sidebar + Content layout wrapper — shared by teacher & admin apps */
.sidebar-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar-layout-content {
  flex: 1;
  padding: var(--spacing-xl);
  background: var(--bg-secondary);
  overflow-y: auto;
}
/* Sidebar - Shared component */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}
.sidebar--collapsed {
  width: var(--sidebar-width-collapsed);
  padding: var(--spacing-sm);
}
/* Top area */
.sidebar-top {
  margin-bottom: var(--spacing-lg);
}
.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-sm);
}
.sidebar--collapsed .sidebar-header {
  align-items: center;
}
.sidebar-logo h1 {
  margin: 0;
  font-size: var(--font-xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
}
.sidebar-logo span {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.sidebar-collapse {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.sidebar-collapse:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
/* Welcome */
.sidebar-welcome {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: var(--font-medium);
}
.sidebar--collapsed .sidebar-welcome {
  padding: var(--spacing-sm);
  text-align: center;
  font-size: 16px;
}
/* Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: var(--font-medium);
  font-size: var(--font-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.sidebar--collapsed .sidebar-nav-item {
  padding: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-decoration: none;
}
.sidebar-nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.sidebar-nav-icon {
  font-size: 16px;
  line-height: 1;
}
/* Nav children */
.sidebar-nav-child {
  padding-left: var(--spacing-xl);
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  font-weight: var(--font-normal);
}
.sidebar-nav-child:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.sidebar-nav-child.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
/* Bottom nav items (above footer line) */
.sidebar-bottom-nav {
  margin-top: auto;
  padding-top: var(--spacing-sm);
}
/* Footer */
.sidebar-footer {
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-sm);
}
.sidebar-logout {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sidebar-logout:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color-dark);
}
.sidebar--collapsed .sidebar-logout {
  padding: var(--spacing-sm);
  font-size: 16px;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-card {
  background: var(--bg-primary);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  margin-bottom: 12px;
  border-radius: 12px;
}

.login-header h1 {
  margin: 0;
  font-size: 28px;
  color: var(--color-primary);
}

.login-header span {
  font-size: 14px;
  color: var(--text-tertiary);
}

.error-message {
  background: var(--status-error-bg);
  color: var(--status-error-text);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.login-card button {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-card button:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.login-card button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.dashboard h1 {
  margin: 0 0 24px 0;
  color: var(--text-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 36px;
  font-weight: bold;
  color: var(--color-primary);
}

.stat-label {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 4px;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.chart-card h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-header h3 {
  margin: 0;
}

/* Provider list */
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.provider-name {
  font-weight: 500;
  text-transform: capitalize;
}

.provider-count {
  color: var(--color-primary);
  font-weight: bold;
}

/* Legend */
.trend-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Trend bar chart */
.trend-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 180px;
  padding-top: 8px;
}

.trend-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 150px;
}

.trend-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.trend-bar {
  width: 18px;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.trend-bar-value {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
}

.trend-date {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* Provider breakdown table */
.provider-table-wrapper {
  overflow-x: auto;
}

.provider-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.provider-table th,
.provider-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
}

.provider-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
}

.provider-table th.sub-header {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-tertiary);
}

.provider-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.provider-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.no-data {
  color: var(--text-tertiary);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}

/* Loading / Error */
.loading,
.error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 18px;
}

.error {
  color: var(--color-error);
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-row {
    grid-template-columns: 1fr;
  }
}
.submissions-page h1 {
  margin: 0;
  color: var(--text-primary);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.refresh-button {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-button:hover:not(:disabled) {
  background: var(--border-color);
  border-color: var(--text-tertiary);
}

.refresh-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.filters {
  display: flex;
  gap: 12px;
}

.filters select {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 14px;
  cursor: pointer;
}

.submissions-table-container {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.submissions-table {
  width: 100%;
  border-collapse: collapse;
}

.submissions-table th,
.submissions-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.submissions-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
}

.submissions-table tbody tr {
  cursor: pointer;
  transition: background 0.2s;
}

.submissions-table tbody tr:hover {
  background: var(--bg-hover);
}

.user-cell,
.question-cell {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  color: var(--text-primary);
}

.user-email {
  font-size: 12px;
  color: var(--text-tertiary);
}

.question-subject {
  font-weight: 500;
  text-transform: capitalize;
  color: var(--text-primary);
}

.question-topic {
  font-size: 12px;
  color: var(--text-tertiary);
}

.provider-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
  background: var(--status-info-bg);
  color: var(--color-accent);
}

.score {
  font-weight: 600;
  color: var(--text-primary);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge.correct {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.badge.partial {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.badge.incorrect {
  background: var(--status-error-bg);
  color: var(--status-error-text);
}

.badge.unknown {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

/* Rerun indicator */
.date-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rerun-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
  letter-spacing: 0.5px;
}

.rerun-row {
  background: var(--status-warning-bg-subtle);
}

.rerun-row:hover {
  background: var(--status-warning-bg) !important;
}

/* Hint type badges */
.badge-conceptual {
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
}

.badge-procedural {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.badge-calculation {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.badge-encouragement {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.hint-text {
  max-width: 300px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  cursor: help;
}

.input-icons {
  display: flex;
  gap: 8px;
  font-size: 16px;
  align-items: center;
}

.input-icons .option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.input-icons .no-input {
  color: var(--text-tertiary);
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-secondary);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  color: var(--text-tertiary);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tab {
  padding: 12px 24px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tab-content {
  min-height: 400px;
}

.tab-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* User cell with client */
.user-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.client-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Performance Tab */
.performance-content {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.performance-summary {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.summary-stat {
  font-size: 16px;
  color: var(--text-secondary);
}

.summary-stat strong {
  color: var(--color-accent);
}

.performance-section {
  margin-bottom: 32px;
}

.performance-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
}

.performance-table th,
.performance-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.performance-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
}

.performance-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.prompt-name {
  font-weight: 500;
  color: var(--text-primary);
}

.score-cell {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 13px;
}

.score-cell.score-good {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.score-cell.score-medium {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.score-cell.score-low {
  background: var(--status-error-bg);
  color: var(--status-error-text);
}

.performance-legend {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
}

.empty-state p {
  margin: 8px 0;
}

/* Hint Prompts Tab */
.hint-prompts-content {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.hint-prompts-content .tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-description {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0;
}

.create-btn {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.create-btn:hover {
  background: #1d4ed8;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.prompt-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.prompt-card-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.prompt-version {
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--border-color);
  padding: 2px 8px;
  border-radius: 4px;
}

.prompt-description {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.prompt-modal {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-group input:disabled {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

.template-help {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.template-help code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: var(--code-text);
}

.template-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
}

.template-textarea:disabled {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.save-status {
  margin-right: auto;
  font-size: 14px;
}

.save-status.success {
  color: var(--color-success);
}

.save-status.error {
  color: var(--color-error);
}

.cancel-btn {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.cancel-btn:hover {
  background: var(--border-color);
}

.edit-btn {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.edit-btn:hover {
  background: #1d4ed8;
}

.save-btn {
  padding: 10px 20px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.save-btn:hover {
  background: #047857;
}

.save-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Multi-select styles */
.checkbox-col {
  width: 40px;
  text-align: center;
}

.checkbox-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.selected-row {
  background: var(--selected-bg) !important;
}

.selected-row:hover {
  background: var(--status-info-bg) !important;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selection-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.action-btn {
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:hover {
  background: #1d4ed8;
}

.action-btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-dark);
}

.action-btn.secondary:hover {
  background: var(--border-color);
}

/* Import status message */
.import-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.import-status.success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1px solid var(--status-success-border);
}

.import-status.error {
  background: var(--status-error-bg);
  color: var(--status-error-text);
  border: 1px solid var(--status-error-border);
}

.close-status {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

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

/* Dataset modal */
.dataset-modal {
  max-width: 500px;
}

.modal-description {
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.dataset-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-primary);
}

.dataset-preview {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.preview-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.preview-row:last-child {
  margin-bottom: 0;
}

.preview-label {
  font-weight: 500;
  color: var(--text-tertiary);
  min-width: 100px;
}

.category-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Filters bar for submissions */
.filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.filters-bar .filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filters-bar .filters select {
  padding: 8px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.clear-filters-btn {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: var(--border-color);
  color: var(--text-secondary);
}
@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.28"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
/* Submission Detail V2 - Restructured Layout */
.submission-detail-v2 {
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Page Header */
.page-header {
  margin-bottom: 8px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.back-button:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color-dark);
}

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

.header-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-title h1 {
  margin: 0;
  font-size: 24px;
  color: var(--text-primary);
}

.submission-id {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}

.submitted-at {
  font-size: 13px;
  color: var(--text-tertiary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rerun-type-select {
  padding: 9px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.rerun-type-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rerun-button {
  padding: 10px 18px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.rerun-button:hover:not(:disabled) {
  background: #1d4ed8;
}

.rerun-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.rerun-button.running {
  background: #f59e0b;
}

.new-submission-link {
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.new-submission-link:hover {
  text-decoration: underline;
}

.rerun-error {
  color: var(--color-error);
  font-size: 13px;
  background: var(--status-error-bg-subtle);
  padding: 6px 12px;
  border-radius: 4px;
}

/* Card Base */
.card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* Card Toggle for collapsible cards */
.card-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.card-toggle h3 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.card-toggle .toggle-icon {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

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

.card-toggle:hover h3 {
  color: var(--color-accent);
}

/* Row with Two Columns */
.row-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* User Card */
.user-card .user-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-primary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-email {
  font-size: 13px;
  color: var(--text-tertiary);
}

.user-details {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.detail-item .client-info {
  font-size: 13px;
  color: var(--text-tertiary);
}

.proficiency-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.proficiency-badge.low { background: var(--status-warning-bg); color: var(--status-warning-text); }
.proficiency-badge.medium { background: var(--status-info-bg); color: var(--status-info-text); }
.proficiency-badge.high { background: var(--status-success-bg); color: var(--status-success-text); }

/* Metadata Card */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-item label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 12px;
  text-transform: capitalize;
  width: fit-content;
}

.tag.subject {
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
}

.score {
  font-size: 18px;
  font-weight: 700;
}

.score.correct { color: #16a34a; }
.score.partial { color: #d97706; }
.score.incorrect { color: #dc2626; }

.score-large {
  font-size: 24px;
  font-weight: 700;
}

.score-large.correct { color: #16a34a; }
.score-large.partial { color: #d97706; }
.score-large.incorrect { color: #dc2626; }

.assessment-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.assessment-badge.correct { background: var(--status-success-bg); color: var(--status-success-text); }
.assessment-badge.partial { background: var(--status-warning-bg); color: var(--status-warning-text); }
.assessment-badge.incorrect { background: var(--status-error-bg); color: var(--status-error-text); }

/* Question Card */
.question-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.correct-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--status-success-bg-subtle);
  border-left: 3px solid #22c55e;
  border-radius: 0 6px 6px 0;
}

.correct-answer label {
  font-size: 12px;
  color: var(--status-success-text);
  font-weight: 500;
}

.correct-answer span {
  font-weight: 600;
  color: var(--status-success-text);
}

/* Solution Card */
.solution-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mcq-answer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mcq-answer label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.selected-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
}

.canvas-section label,
.typed-section label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.canvas-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-secondary);
  max-height: 500px;
  overflow: auto;
}

.canvas-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.typed-text {
  margin: 0;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}

.no-input {
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0;
}

/* Experiments Table */
.experiments-table-wrapper {
  overflow-x: auto;
}

.experiments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.experiments-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-color);
}

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

.experiment-row {
  cursor: pointer;
  transition: background 0.15s;
}

.experiment-row:hover {
  background: var(--bg-tertiary);
}

.experiment-row.selected {
  background: var(--selected-bg);
}

.experiment-row.primary {
  background: var(--status-warning-bg-subtle);
}

.experiment-row.primary.selected {
  background: var(--status-warning-bg);
}

.experiment-row.has-error {
  background: var(--status-error-bg-subtle);
}

.prompt-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-name {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
}

.primary-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
}

.provider-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
  font-size: 11px;
  border-radius: 4px;
  text-transform: capitalize;
}

.error-badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--status-error-bg);
  color: var(--status-error-text);
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
}

.cost {
  color: #059669;
  font-weight: 500;
}

.match-score {
  font-weight: 500;
  color: var(--text-tertiary);
}

.match-score.positive {
  color: var(--color-accent);
}

/* Prompt Details Card */
.prompt-details-header {
  margin-bottom: 16px;
}

.prompt-details-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: none;
  padding-bottom: 0;
}

.error-banner {
  padding: 12px 16px;
  background: var(--status-error-bg-subtle);
  border-radius: 6px;
  color: var(--status-error-text);
  font-size: 13px;
  margin-bottom: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-item {
  background: var(--bg-tertiary);
  padding: 14px;
  border-radius: 8px;
}

.stat-item label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-item > span {
  font-weight: 500;
  color: var(--text-primary);
}

.match-factors-item {
  grid-column: span 2;
}

.match-factors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.match-factor {
  display: inline-block;
  padding: 3px 8px;
  background: var(--status-info-bg);
  color: var(--status-info-text);
  font-size: 11px;
  border-radius: 4px;
}

.approach-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.approach-badge.approach-optimal { background: var(--status-success-bg); color: var(--status-success-text); }
.approach-badge.approach-suboptimal { background: var(--status-warning-bg); color: var(--status-warning-text); }
.approach-badge.approach-lucky { background: var(--status-indigo-bg); color: var(--status-indigo-text); }
.approach-badge.approach-incomplete { background: var(--status-warning-bg); color: var(--status-warning-text); }
.approach-badge.approach-calc-error { background: var(--status-warning-bg-subtle); color: var(--status-warning-text); }
.approach-badge.approach-wrong { background: var(--status-error-bg); color: var(--status-error-text); }

/* Collapsible Sections */
.collapsible-section {
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  transition: background 0.15s;
}

.section-toggle:hover {
  background: var(--bg-tertiary);
}

.toggle-icon {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.toggle-icon.collapsed {
  transform: rotate(-90deg);
}

.code-block {
  margin: 0;
  padding: 16px;
  background: #1e293b;
  color: #e2e8f0;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* Feedback Content */
.feedback-content {
  padding: 16px;
  background: var(--bg-primary);
}

.steps-analysis {
  margin-bottom: 20px;
}

.steps-analysis h4,
.feedback-section h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-item {
  padding: 14px;
  border-radius: 8px;
  border-left: 4px solid;
}

.step-item.correct {
  background: var(--status-success-bg-subtle);
  border-left-color: #22c55e;
}

.step-item.incorrect {
  background: var(--status-error-bg-subtle);
  border-left-color: var(--color-error);
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.step-number {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.step-status {
  font-size: 12px;
  font-weight: 500;
}

.step-status.correct { color: #16a34a; }
.step-status.incorrect { color: #dc2626; }

.step-detail {
  margin-bottom: 8px;
}

.step-detail label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.step-detail p {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
}

.feedback-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feedback-section ul {
  margin: 0;
  padding-left: 18px;
}

.feedback-section li {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-primary);
}

.feedback-section p {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
}

.feedback-section p.empty {
  color: var(--text-tertiary);
  font-style: italic;
}

.llm-answer {
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-weight: 500;
}

/* Manual Evaluation */
.manual-evaluation {
  margin-top: 20px;
  padding: 20px;
  background: var(--selected-bg);
  border-radius: 10px;
  border: 1px solid var(--status-info-border);
}

.manual-evaluation h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--status-info-text);
}

.eval-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--status-success-bg);
  color: var(--status-success-text);
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.eval-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.eval-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eval-field.full-width {
  grid-column: 1 / -1;
}

.eval-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.eval-field .field-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-tertiary);
}

.rating-buttons {
  display: flex;
  gap: 6px;
}

.rating-btn {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border-color-dark);
  border-radius: 6px;
  background: var(--bg-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all 0.15s;
}

.rating-btn:hover {
  border-color: var(--color-info);
  color: var(--color-info);
}

.rating-btn.selected {
  background: var(--color-info);
  border-color: var(--color-info);
  color: white;
}

.eval-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.eval-field textarea:focus {
  outline: none;
  border-color: var(--color-info);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.eval-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.save-btn {
  padding: 10px 20px;
  background: var(--color-info);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.save-btn:hover:not(:disabled) {
  background: var(--color-accent);
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  font-size: 13px;
  font-weight: 500;
}

.status.saved { color: #16a34a; }
.status.error { color: #dc2626; }

/* User Feedback Card */
.user-feedback-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.user-feedback-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.feedback-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 2px solid;
}

.feedback-rating.positive { border-color: #22c55e; }
.feedback-rating.negative { border-color: var(--color-error); }

.rating-icon {
  font-size: 22px;
}

.rating-label {
  font-size: 15px;
  font-weight: 600;
}

.feedback-rating.positive .rating-label { color: #16a34a; }
.feedback-rating.negative .rating-label { color: #dc2626; }

.feedback-comment {
  flex: 1;
  min-width: 200px;
}

.feedback-comment label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.feedback-comment p {
  margin: 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 14px;
}

.feedback-time {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Loading and Error States */
.loading, .error {
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
}

.error {
  color: #dc2626;
}

/* Dark mode overrides for hardcoded colors */
@media (prefers-color-scheme: dark) {
  /* Score colors - brighter variants for dark backgrounds */
  .score.correct,
  .score-large.correct { color: #4ade80; }
  .score.partial,
  .score-large.partial { color: #fbbf24; }
  .score.incorrect,
  .score-large.incorrect { color: #f87171; }

  /* Step-item backgrounds - more visible on dark */
  .step-item.correct {
    background: rgba(34, 197, 94, 0.15);
  }
  .step-item.incorrect {
    background: rgba(239, 68, 68, 0.15);
  }

  /* Step status text - brighter for dark mode */
  .step-status.correct { color: #4ade80; }
  .step-status.incorrect { color: #f87171; }

  /* Cost and match colors */
  .cost { color: #34d399; }
  .match-score.positive { color: #60a5fa; }

  /* Save/error status */
  .status.saved { color: #4ade80; }
  .status.error { color: #f87171; }

  /* Feedback rating labels */
  .feedback-rating.positive .rating-label { color: #4ade80; }
  .feedback-rating.negative .rating-label { color: #f87171; }

  /* Correct answer border */
  .correct-answer {
    border-left-color: #4ade80;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .row-two-cols {
    grid-template-columns: 1fr;
  }

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

  .feedback-sections {
    grid-template-columns: 1fr;
  }

  .eval-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
  }

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

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

  .user-details {
    flex-direction: column;
    gap: 12px;
  }
}
.hint-detail-page {
  max-width: 1200px;
  margin: 0 auto;
}

.hint-detail-page .page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hint-detail-page .page-header h1 {
  margin: 0;
  color: var(--text-primary);
}

.hint-detail-page .back-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.hint-detail-page .back-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color-dark);
}

.hint-detail-page .loading,
.hint-detail-page .error {
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
}

.hint-detail-page .error {
  color: #dc2626;
}

/* Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.detail-card {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.detail-card.full-width {
  grid-column: 1 / -1;
}

.detail-card h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.info-item label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.info-item span {
  font-size: 14px;
  color: var(--text-primary);
}

.info-item .mono {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Badges */
.provider-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.subject-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--status-info-bg);
  color: var(--status-info-text);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-conceptual {
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
}

.badge-procedural {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.badge-calculation {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.badge-encouragement {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.badge-gentle {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.badge-moderate {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.badge-direct {
  background: var(--status-error-bg);
  color: var(--status-error-text);
}

.badge.unknown {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

/* Question Text */
.question-text {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.question-text label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 8px;
}

.question-text p {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Hint Result */
.hint-result .hint-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.hint-result .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint-result .meta-item label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.hint-content {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
}

.hint-content p {
  margin: 0;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Collapsible Sections */
.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.collapsible-header:hover h3 {
  color: var(--color-primary);
}

.toggle-icon {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.toggle-icon.collapsed {
  transform: rotate(-90deg);
}

/* Code Block */
.code-block {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-top: 12px;
}

.code-block pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  color: #d4d4d4;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
}

/* Student Input Card */
.student-input .input-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.canvas-image-container,
.typed-text-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.canvas-image-container label,
.typed-text-container label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.canvas-image {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.typed-text-content {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
}

.typed-text-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Error Card */
.error-card {
  border: 1px solid var(--status-error-border);
  background: var(--status-error-bg-subtle);
}

.error-card h3 {
  color: #dc2626;
}

.error-message {
  background: var(--bg-primary);
  border: 1px solid var(--status-error-border);
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  color: var(--status-error-text);
  font-family: monospace;
}
.users-page h1 {
  margin: 0;
  color: var(--text-primary);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.total-count {
  color: var(--text-tertiary);
  font-size: 14px;
}

.users-table-container {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 15%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  width: 18%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  width: 8%;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  width: 10%;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
  width: 9%;
}

.users-table th,
.users-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.users-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
}

.users-table tbody tr:hover {
  background: var(--bg-hover);
}

.user-name {
  font-weight: 500;
  color: var(--text-primary);
}

.user-email {
  color: var(--text-tertiary);
}

.grade-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #e8f4ff;
  color: var(--color-accent);
  border-radius: 20px;
  font-size: 13px;
}

.submission-count {
  font-weight: 600;
  color: #4f9cff;
}

.join-date {
  color: var(--text-tertiary);
  font-size: 13px;
}

.last-active {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Ring badges */
.ring-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ring-devtesting {
  background: #fef3c7;
  color: #92400e;
}

.ring-beta {
  background: #dbeafe;
  color: #1e40af;
}

.ring-prod {
  background: #d1fae5;
  color: #065f46;
}

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.role-student {
  background: #e8f4ff;
  color: var(--color-accent);
}

.role-teacher {
  background: #f0fdf4;
  color: #166534;
}

.role-admin {
  background: #fef3c7;
  color: #92400e;
}

/* Soft-deleted user styles */
.deleted-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #fee2e2;
  color: #dc2626;
}

.invited-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
}

.user-row-deleted {
  opacity: 0.6;
}

.show-deleted-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

/* Collapsible sections */
.user-section {
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.section-header:hover {
  background: var(--bg-hover);
}

.section-chevron {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
  display: inline-block;
}

.section-chevron.collapsed {
  transform: rotate(-90deg);
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-count {
  color: var(--text-tertiary);
  font-size: 13px;
}

.section-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}
.user-detail-page {
  max-width: 900px;
}

.back-btn {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.15s ease;
}

.back-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color-dark);
}

.user-info-card {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
}

.user-info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.user-info-card-header h1 {
  margin: 0;
  font-size: 24px;
  color: var(--text-primary);
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.role-student { background: var(--status-info-bg); color: var(--color-accent); }
.role-teacher { background: var(--status-success-bg-subtle); color: var(--status-success-text); }
.role-admin { background: var(--status-warning-bg); color: var(--status-warning-text); }

.user-attributes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.attr-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

.attr-row:nth-last-child(-n+2) {
  border-bottom: none;
}

.attr-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.attr-value {
  font-size: 14px;
  color: var(--text-primary);
}

.attr-mono {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.ring-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.ring-devtesting { background: var(--status-warning-bg); color: var(--status-warning-text); }
.ring-beta { background: var(--status-info-bg); color: var(--status-info-text); }
.ring-prod { background: var(--status-success-bg); color: var(--status-success-text); }

.bypass-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--status-warning-bg, #fef3c7);
  color: var(--status-warning-text, #b45309);
}

.bypass-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.bypass-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bypass-section-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  display: block;
}

.bypass-section-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  display: block;
  margin-top: 2px;
}

.bypass-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bypass-enable-btn {
  padding: 6px 16px;
  border: 1px solid var(--status-warning-text, #b45309);
  border-radius: 6px;
  background: transparent;
  color: var(--status-warning-text, #b45309);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bypass-enable-btn:hover:not(:disabled) {
  background: var(--status-warning-text, #b45309);
  color: white;
}

.bypass-disable-btn {
  padding: 6px 16px;
  border: 1px solid var(--status-warning-text, #b45309);
  border-radius: 6px;
  background: var(--status-warning-bg, #fef3c7);
  color: var(--status-warning-text, #b45309);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bypass-disable-btn:hover:not(:disabled) {
  background: var(--status-warning-text, #b45309);
  color: white;
}

.bypass-enable-btn:disabled,
.bypass-disable-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-info-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.delete-user-btn {
  padding: 6px 16px;
  border: 1px solid var(--color-error);
  border-radius: 6px;
  background: transparent;
  color: var(--color-error);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.delete-user-btn:hover:not(:disabled) {
  background: var(--color-error);
  color: white;
}

.delete-user-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.restore-user-btn {
  padding: 6px 16px;
  border: 1px solid #059669;
  border-radius: 6px;
  background: transparent;
  color: #059669;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.restore-user-btn:hover:not(:disabled) {
  background: #059669;
  color: white;
}

.restore-user-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.features-section {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.features-section h2 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--text-primary);
}

.no-features-message {
  color: var(--text-tertiary);
  font-style: italic;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

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

.feature-row.overridden {
  background: var(--selected-bg);
}

.feature-row-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.feature-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  white-space: nowrap;
}

.feature-id {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: monospace;
}

.feature-description {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feature-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.feature-row-right select {
  padding: 5px 8px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  min-width: 140px;
}

.override-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.default-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

.reset-btn {
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reset-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.features-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-features-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: var(--color-accent);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.save-features-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.save-features-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status-saved {
  color: #059669;
  font-size: 13px;
  font-weight: 500;
}

.status-error {
  color: var(--color-error);
  font-size: 13px;
  font-weight: 500;
}

/* Logging Config Section */
.logging-subtitle {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0 0 16px 0;
}

.logging-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logging-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.logging-field input[type="number"] {
  width: 70px;
  padding: 5px 8px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
}

.logging-providers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.logging-provider-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.logging-provider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.logging-provider-header:hover {
  background: var(--bg-secondary);
}

.logging-provider-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  text-transform: capitalize;
}

.logging-provider-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logging-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.logging-provider-summary select {
  padding: 4px 8px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 12px;
  min-width: 90px;
}

.logging-expand-icon {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.logging-component-overrides {
  border-top: 1px solid var(--border-color);
  padding: 8px 16px 12px;
  background: var(--bg-secondary);
}

.logging-component-header {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.logging-component-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.logging-component-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.logging-component-code {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 1px 5px;
  border-radius: 4px;
}

.logging-component-row select {
  padding: 3px 6px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 12px;
  min-width: 120px;
}

/* Tabs */
.user-detail-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
}

.user-detail-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
}

.user-detail-tab:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.user-detail-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Rate Limits / Usage table */
.user-detail-page .usage-table {
  width: 100%;
  border-collapse: collapse;
}

.user-detail-page .usage-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.user-detail-page .usage-table td {
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}
/* Providers Table */
.providers-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.providers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.providers-table th {
  background: var(--bg-tertiary);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

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

.providers-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.provider-row.disabled {
  opacity: 0.6;
}

.provider-row.editing td {
  background: var(--selected-bg);
}

.provider-row.new-row td {
  background: #f0fdf4;
}

.provider-key {
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

.model-name {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

.model-edit-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg-primary);
  box-sizing: border-box;
}

.model-edit-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(79, 156, 255, 0.15);
}

.model-edit-input.pricing-input {
  width: 80px;
}

.family-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.family-badge.family-anthropic {
  background: #fef3c7;
  color: #92400e;
}

.family-badge.family-openai {
  background: #d1fae5;
  color: #065f46;
}

.family-badge.family-google {
  background: #dbeafe;
  color: #1e40af;
}

.pricing-cell {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.provider-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.provider-action-btn {
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-primary);
  transition: all 0.15s;
}

.provider-action-btn:hover:not(:disabled) {
  background: var(--bg-tertiary);
}

.provider-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.provider-action-btn.save {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.provider-action-btn.save:hover:not(:disabled) {
  background: #3d8bef;
}

.provider-action-btn.cancel {
  color: var(--text-tertiary);
}

.provider-action-btn.delete {
  color: #dc2626;
  border-color: #fecaca;
}

.provider-action-btn.delete:hover:not(:disabled) {
  background: #fef2f2;
}

.add-provider-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px dashed var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.add-provider-btn:hover {
  background: var(--selected-bg);
}
/* Pipeline Operation Sections */
.pipeline-operation-section {
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.pipeline-operation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.pipeline-operation-header:hover {
  background: var(--bg-secondary);
}

.pipeline-operation-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.collapse-icon {
  font-size: 12px;
  color: var(--text-tertiary);
}

.pipeline-operation-content {
  padding: 0 16px 16px;
}

/* Pipeline Types */
.pipeline-types-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pipeline-type-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-type-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  transition: all 0.2s;
}

.pipeline-type-card.enabled {
  border-color: var(--color-primary);
}

.pipeline-type-card.primary {
  background: var(--selected-bg);
}

.pipeline-type-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.pipeline-type-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.pipeline-type-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.pipeline-type-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.pipeline-primary-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.pipeline-primary-toggle input[type="radio"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.primary-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Pipeline Steps */
.pipeline-steps {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-step {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
}

.pipeline-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.step-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--selected-bg, #e8f4ff);
  color: var(--color-primary, #1a73e8);
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
}

.step-type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Step Runs Table */
.step-runs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}

.step-runs-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.step-runs-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--bg-tertiary);
}

.step-runs-table tr.primary-run {
  background: var(--selected-bg, #e8f4ff);
}

.step-runs-table input[type="radio"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.version-tag {
  font-size: 11px;
  color: var(--text-tertiary);
}

.remove-run-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.remove-run-btn:hover:not(:disabled) {
  color: #dc3545;
}

.remove-run-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.no-runs-message {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 8px;
  margin-bottom: 8px;
}

/* Add Run Row */
.add-run-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-run-row select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  min-width: 140px;
}

.add-run-row select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.add-run-btn {
  padding: 6px 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.add-run-btn:hover:not(:disabled) {
  opacity: 0.85;
}

.add-run-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Logging Providers */
.logging-providers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.logging-provider-card {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s;
}

.logging-provider-card.enabled {
  border-color: var(--color-primary);
  background: var(--selected-bg-subtle);
}

.provider-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.provider-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.provider-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.provider-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.provider-description {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-left: 28px;
}

.provider-settings {
  margin-left: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.log-level-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.log-level-selector span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.log-level-selector select {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-secondary, var(--bg-primary));
  color: var(--text-primary);
  cursor: pointer;
  min-width: 120px;
}

.log-level-selector select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.log-level-selector select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 156, 255, 0.1);
}

/* Component Log Levels Section */
.component-levels-section {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.component-levels-section h3 {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.component-levels-section .section-description {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

.component-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.component-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  gap: 12px;
}

.component-level-row .component-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.component-level-row select {
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  background: var(--bg-secondary, var(--bg-primary));
  color: var(--text-primary);
  cursor: pointer;
  min-width: 90px;
}

.component-level-row select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Debug Options Section */
.debug-options-section {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
}

.debug-options-section h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

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

.debug-option {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}

.debug-option:hover {
  border-color: var(--border-color-dark);
}

.debug-option.selected {
  border-color: var(--color-primary);
  background: var(--selected-bg);
}

.debug-option input[type="checkbox"] {
  margin-right: 12px;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.debug-option-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.debug-option-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.debug-option-description {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.4;
}
/* Logs Section */
.logs-section {
  max-width: 100%;
}

.logs-filters {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.filter-row label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-row label span {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-row input,
.filter-row select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  height: 32px;
  box-sizing: border-box;
  background: var(--bg-primary);
  color: var(--text-primary);
}

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

.filter-row select {
  min-width: 110px;
}

.filter-row input[type="text"] {
  min-width: 180px;
}

.filter-row input:focus,
.filter-row select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fetch-logs-btn {
  padding: 6px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 32px;
  transition: background 0.2s;
}

.fetch-logs-btn:hover:not(:disabled) {
  background: #3d8bef;
}

.fetch-logs-btn:disabled {
  background: #a0c4ff;
  cursor: not-allowed;
}

.clear-logs-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 32px;
  transition: background 0.2s;
}

.clear-logs-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.clear-logs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.logs-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

.logs-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.logs-table th {
  background: var(--bg-tertiary);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.logs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--bg-tertiary);
  vertical-align: top;
}

.log-row {
  cursor: pointer;
  transition: background 0.15s;
}

.log-row:hover {
  background: var(--bg-tertiary);
}

.log-row.expanded {
  background: var(--selected-bg);
}

.log-time {
  font-family: monospace;
  font-size: 12px;
  white-space: nowrap;
  color: var(--text-tertiary);
}

.log-level {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  white-space: nowrap;
}

.log-level.level-error {
  background: #fef2f2;
  color: #dc2626;
}

.log-level.level-warning,
.log-level.level-warn {
  background: #fef3c7;
  color: #d97706;
}

.log-level.level-info {
  background: #e0f2fe;
  color: #0284c7;
}

.log-level.level-debug {
  background: #f3f4f6;
  color: #6b7280;
}

.log-source {
  font-size: 11px;
  color: var(--text-tertiary);
}

.log-component {
  color: #7c3aed;
  font-weight: 500;
  font-size: 12px;
}

.log-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-request-id {
  font-family: monospace;
  font-size: 10px;
  color: var(--text-tertiary);
}

.log-details-row td {
  background: var(--bg-secondary);
  padding: 0;
}

.log-details {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item {
  font-size: 12px;
}

.detail-item strong {
  color: var(--text-secondary);
  margin-right: 8px;
}

.detail-item pre {
  margin: 4px 0 0 0;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 11px;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
}

.detail-item.error-detail pre {
  background: #fef2f2;
  color: #dc2626;
}

.no-logs-message {
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.logs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.logs-pagination button {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.logs-pagination button:hover:not(:disabled) {
  background: var(--border-color);
}

.logs-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.logs-pagination span {
  font-size: 13px;
  color: var(--text-tertiary);
}
/* Rate Limit Tiers */
.rate-limit-tier {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.rate-limit-tier-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  text-transform: capitalize;
  color: var(--text-primary);
}

.rate-limit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.rate-limit-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary, #666);
  margin-bottom: 2px;
}

.rate-limit-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-primary);
  box-sizing: border-box;
}

.rate-limit-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Rate Limit Actions */
.rate-limit-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.rate-limit-save-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.rate-limit-save-btn:hover:not(:disabled) {
  background: #3d8bef;
}

.rate-limit-save-btn:disabled {
  background: #a0c4ff;
  cursor: not-allowed;
}

.rate-limit-reset-btn {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.rate-limit-reset-btn:hover {
  background: var(--border-color);
}
/* ─── Explorer Layout ─────────────────────────────────────────────────────── */
.explorer-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  min-height: 500px;
}

/* ─── Left Panel ─────────────────────────────────────────────────────────── */
.explorer-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.explorer-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explorer-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.explorer-select,
.explorer-input {
  padding: 8px 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #333);
}

.explorer-select:focus,
.explorer-input:focus {
  outline: none;
  border-color: var(--primary-color, #4a90d9);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

.explorer-fetch-btn {
  padding: 8px 16px;
  background: var(--primary-color, #4a90d9);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
}

.explorer-fetch-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.explorer-fetch-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Breadcrumbs ────────────────────────────────────────────────────────── */
.explorer-breadcrumbs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explorer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  background: var(--bg-primary, #fff);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-primary, #333);
  text-align: left;
  width: 100%;
}

.explorer-breadcrumb:hover {
  background: var(--bg-hover, #f5f5f5);
}

.explorer-breadcrumb.active {
  border-color: var(--primary-color, #4a90d9);
  background: rgba(74, 144, 217, 0.06);
}

.breadcrumb-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-color, #e0e0e0);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.explorer-breadcrumb.active .breadcrumb-index {
  background: var(--primary-color, #4a90d9);
  color: #fff;
}

.breadcrumb-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Right Panel ────────────────────────────────────────────────────────── */
.explorer-content {
  min-width: 0;
}

.explorer-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary, #999);
  font-size: 14px;
  line-height: 1.6;
}

.explorer-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 13px;
}

/* ─── Document Viewer ────────────────────────────────────────────────────── */
.explorer-document {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  overflow: hidden;
}

.explorer-doc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-secondary, #f8f9fa);
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.explorer-container-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-color, #4a90d9);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.explorer-doc-id {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary, #666);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── JSON Rendering ─────────────────────────────────────────────────────── */
.explorer-json {
  padding: 16px;
  margin: 0;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  background: var(--bg-primary, #fff);
  white-space: pre-wrap;
  word-break: break-all;
}

.json-indent {
  padding-left: 20px;
}

.json-key {
  color: #0550ae;
}

.json-string {
  color: #0a3069;
}

.json-number {
  color: #0550ae;
}

.json-boolean {
  color: #cf222e;
}

.json-null {
  color: #6e7781;
  font-style: italic;
}

.json-bracket {
  color: #6e7781;
}

.json-colon,
.json-comma {
  color: #6e7781;
}

/* ─── Reverse References ─────────────────────────────────────────────────── */
.explorer-references {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-group {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  overflow: hidden;
}

.ref-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border: none;
  background: var(--bg-secondary, #f8f9fa);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-primary, #333);
  text-align: left;
}

.ref-group-header:hover {
  background: var(--bg-hover, #f0f0f0);
}

.ref-group-arrow {
  font-size: 9px;
  flex-shrink: 0;
  width: 12px;
  color: var(--text-secondary, #666);
}

.ref-group-label {
  font-weight: 600;
  flex-shrink: 0;
}

.ref-group-field {
  color: var(--text-secondary, #999);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.ref-group-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--border-color, #e0e0e0);
  font-size: 11px;
  font-weight: 600;
}

.ref-group-items {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color, #e0e0e0);
  max-height: 200px;
  overflow-y: auto;
}

.ref-group-empty {
  padding: 6px 10px 6px 28px;
  font-size: 12px;
  color: var(--text-secondary, #999);
  font-style: italic;
}

.ref-item {
  display: block;
  width: 100%;
  padding: 4px 10px 4px 28px;
  border: none;
  background: none;
  text-align: left;
  font-family: monospace;
  font-size: 11px;
  color: #0969da;
  cursor: pointer;
  text-decoration: none;
}

.ref-item:hover {
  background: rgba(74, 144, 217, 0.06);
  text-decoration: underline;
}

/* ─── FK Links ───────────────────────────────────────────────────────────── */
.explorer-fk-link {
  color: #0969da;
  text-decoration: underline;
  cursor: pointer;
  text-decoration-style: dotted;
}

.explorer-fk-link:hover {
  color: #0550ae;
  text-decoration-style: solid;
}

.explorer-fk-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: #8b5cf6;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  vertical-align: middle;
}
.settings-page h1 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
}

/* Settings Tabs */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
}

.settings-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
}

.settings-tab:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.settings-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.settings-section {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.section-description {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* Settings Footer */
.settings-footer {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 16px 24px;
}

.last-updated {
  margin: 8px 0 0 0;
  color: var(--text-tertiary);
  font-size: 13px;
}

.build-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 12px;
  font-family: monospace;
}

/* Shared status classes */
.status-saving {
  color: var(--text-tertiary);
  font-size: 14px;
}

.status-saved {
  color: #22c55e;
  font-size: 14px;
}

.status-error {
  color: var(--color-error);
  font-size: 14px;
}

.loading {
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
}

.error {
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
}
.question-picker {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.qp-filters {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  align-items: stretch;
}

.qp-filters select,
.qp-search {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.qp-filters select {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

.qp-filters select:disabled,
.qp-select-disabled {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.qp-search {
  flex: 1;
  min-width: 200px;
}

.qp-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.qp-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.qp-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.qp-panel-header h4 {
  font-size: var(--font-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
}

.qp-btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--font-xs);
  cursor: pointer;
  padding: 0;
}

.qp-btn-link:hover {
  text-decoration: underline;
}

.qp-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
  padding: var(--spacing-xs);
}

.qp-item {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qp-item:hover {
  background: var(--bg-tertiary);
}

.qp-item-selected {
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-sm);
}

.qp-item-num {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  min-width: 24px;
}

.qp-item-text {
  font-size: var(--font-sm);
  color: var(--text-primary);
  flex: 1;
}

.qp-item-meta {
  display: flex;
  gap: var(--spacing-xs);
}

.qp-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: var(--font-medium);
  text-transform: capitalize;
}

.qp-badge-muted {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.qp-badge-exam {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--color-info-bg, #dbeafe);
  color: var(--color-info, #2563eb);
  font-weight: var(--font-medium);
}

.qp-remove {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: var(--font-sm);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.qp-remove:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.qp-empty {
  color: var(--text-tertiary);
  font-size: var(--font-sm);
  text-align: center;
  padding: var(--spacing-xl);
  font-style: italic;
}

.qp-total-hint {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  font-weight: normal;
}

.qp-refresh-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: white;
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  white-space: nowrap;
}

.qp-refresh-btn:hover {
  opacity: 0.9;
}

.qp-refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* ── QuestionEditForm ── */

.edit-form {
  max-width: 800px;
}

.edit-form-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.edit-form-top-actions .btn-cancel {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.edit-form-top-actions .btn-cancel:hover {
  background: var(--border-color);
}

.edit-form-top-actions .btn-save {
  padding: 8px 16px;
  background: var(--color-success);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.edit-form-top-actions .btn-save:hover {
  background: #059669;
}

.edit-form-top-actions .btn-save:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
}

.edit-form-top-actions .btn-publish {
  padding: 8px 16px;
  background: var(--color-info);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.edit-form-top-actions .btn-publish:hover {
  background: var(--color-accent);
}

.edit-form-top-actions .btn-publish:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
}

.edit-form-top-actions .btn-unpublish {
  padding: 8px 16px;
  background: var(--color-warning);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.edit-form-top-actions .btn-unpublish:hover {
  opacity: 0.9;
}

.edit-form-top-actions .btn-unpublish:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
}

/* ── Section Groups ── */
.form-section-group {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
}

.form-section-group-header {
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.form-section-group-body {
  padding: 20px;
}

.form-section {
  margin-bottom: 20px;
}

.form-section > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-section textarea,
.form-section input[type="text"],
.form-section input[type="number"],
.form-section input[type="date"],
.form-section select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-section textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-section textarea:focus,
.form-section input:focus,
.form-section select:focus {
  outline: none;
  border-color: var(--color-info);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

.btn-add-inline {
  padding: 4px 10px;
  background: var(--color-success);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.btn-add-inline:hover {
  background: #059669;
}

.btn-remove-inline {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-remove-inline:hover {
  background: #fecaca;
}

/* Checkbox Row */
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-item input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Collapsible Section */
.form-section.collapsible {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  cursor: pointer;
}

.collapsible-header label {
  flex: 1;
  margin: 0;
  cursor: pointer;
}

.collapse-icon {
  font-size: 10px;
  color: var(--text-tertiary);
}

.collapsible-body {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

/* Option Editor */
.option-editor {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 2px solid transparent;
}

.option-editor > .option-correct-btn,
.option-editor > .option-label-static,
.option-editor > .option-image-btn,
.option-editor > .btn-remove-inline {
  margin-top: 6px;
}

.option-editor.option-correct {
  border-color: var(--color-success);
  background: var(--status-success-bg-subtle);
}

.option-correct-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color-dark);
  background: var(--bg-primary);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.option-correct-btn:hover {
  border-color: var(--color-success);
}

.option-correct-btn.active {
  border-color: var(--color-success);
  background: var(--color-success);
}

.option-correct-btn.active::after {
  content: '\2713';
  color: white;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.option-label-static {
  width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.option-text-input {
  flex: 1 !important;
}

.option-image-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.option-image-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--bg-secondary);
}

.option-image-btn.has-image {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.option-image-preview {
  position: relative;
  display: inline-block;
  margin-top: 4px;
}

.option-image-preview img {
  display: block;
  max-width: 100%;
  max-height: 120px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.option-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}

.option-image-remove:hover {
  background: rgba(220, 38, 38, 0.9);
}

.option-image-upload-zone {
  margin-top: 6px;
  padding: 12px;
  border: 2px dashed var(--border-color-dark);
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.option-image-upload-zone:hover,
.option-image-upload-zone:focus {
  border-color: var(--color-info);
  background: var(--bg-secondary);
  outline: none;
}

.option-image-upload-zone.uploading {
  border-color: #f59e0b;
  background: #fffbeb;
  cursor: wait;
}

.empty-note {
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

/* Appearance Editor */
.appearance-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.appearance-editor select {
  width: auto !important;
  min-width: 100px;
  flex-shrink: 0;
}

.appearance-editor input[type="date"] {
  width: auto !important;
  flex-shrink: 0;
}

.appearance-editor .qno-input {
  width: 70px !important;
  min-width: 70px;
  flex-shrink: 0;
}

/* Solution Editor */
.solution-editor {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.solution-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.solution-editor-header select {
  width: auto !important;
  min-width: 140px;
}

.solution-editor-header .time-input {
  width: 100px !important;
}

.solution-editor textarea {
  background: var(--bg-primary);
}

/* Form Actions (Save/Cancel buttons) */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

.form-actions .btn-cancel {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.form-actions .btn-cancel:hover {
  background: var(--border-color);
}

.form-actions .btn-save {
  padding: 8px 16px;
  background: var(--color-success);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.form-actions .btn-save:hover {
  background: #059669;
}

.form-actions .btn-save:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
}

/* ── Modal Overlay (for use with the form) ── */
.question-edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.question-edit-modal {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 90%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.question-edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.question-edit-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.question-edit-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 18px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.question-edit-modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.question-edit-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* ── Image Upload Field ── */
.image-upload-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.image-upload-url-row input {
  flex: 1;
  min-width: 0;
}

.image-upload-toggle-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  background: transparent;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.image-upload-toggle-btn:hover {
  background: var(--color-primary);
  color: white;
}

.image-upload-zone {
  margin-top: 8px;
  padding: 16px;
  border: 2px dashed var(--border-color-dark);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.image-upload-zone:hover,
.image-upload-zone:focus {
  border-color: var(--color-info);
  background: #f0f7ff;
  outline: none;
}

.image-upload-zone.uploading {
  border-color: #f59e0b;
  background: #fffbeb;
  cursor: wait;
}

.image-upload-zone-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

.image-upload-error {
  display: block;
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
}

.image-upload-preview {
  position: relative;
  display: inline-block;
  margin-top: 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.image-upload-preview img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.image-upload-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}

.image-upload-remove:hover {
  background: rgba(220, 38, 38, 0.9);
}

/* ── Related Questions List ── */
.rq-list {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.rq-item {
  border-bottom: 1px solid var(--border-color);
}

.rq-item:last-child {
  border-bottom: none;
}

.rq-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  gap: 8px;
}

.rq-item-header:hover {
  background: var(--bg-secondary);
}

.rq-item-expanded > .rq-item-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.rq-item-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.rq-item-id {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.rq-item-question-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.rq-item-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-primary-light, #dbeafe);
  color: var(--color-primary, #2563eb);
  white-space: nowrap;
  flex-shrink: 0;
}

.rq-item-reason {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rq-item-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rq-expand-icon {
  font-size: 10px;
  color: var(--text-tertiary);
}

.rq-item-body {
  padding: 12px 16px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rq-field > label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.rq-field > input,
.rq-field > select {
  padding: 8px 10px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 100%;
  box-sizing: border-box;
}

.rq-field > select {
  width: auto;
  min-width: 180px;
}

.related-question-id-input {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace !important;
  font-size: 13px !important;
}

.related-question-criteria-input {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace !important;
  font-size: 13px !important;
  color: var(--text-tertiary) !important;
}

/* ── Question Picker Modal ── */
.rq-picker-modal {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 92%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.rq-picker-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.rq-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 24px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.rq-picker-footer .btn-cancel {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.rq-picker-footer .btn-cancel:hover {
  background: var(--border-color);
}

.rq-picker-footer .btn-save {
  padding: 8px 16px;
  background: var(--color-success);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.rq-picker-footer .btn-save:hover {
  background: #059669;
}

.rq-picker-footer .btn-save:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
}

/* Read-only values */
.readonly-value {
  display: block;
  padding: 6px 10px;
  font-size: 12px;
  font-family: monospace;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 4px;
  user-select: all;
  word-break: break-all;
}

/* Responsive */
@media (max-width: 900px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}
/* Split Layout */
.questions-page.split-layout {
  display: flex;
  height: calc(100vh - 48px);
  overflow: hidden;
  margin: -24px;
}

/* Left Panel - List */
.list-panel {
  width: 400px;
  min-width: 320px;
  max-width: 500px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.list-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.list-title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.count-badge {
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
}

.list-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
}

.status-bar.success {
  background: var(--status-success-bg-subtle);
  color: var(--color-success);
}

.status-bar.error {
  background: var(--status-error-bg-subtle);
  color: var(--color-error);
}

.status-bar button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.status-bar button:hover {
  opacity: 1;
}

/* Import Progress */
.import-progress-bar {
  padding: 10px 16px;
  background: var(--status-info-bg-subtle);
  border-bottom: 1px solid var(--status-info-border);
}

.import-progress-text {
  font-size: 12px;
  color: var(--status-info-text);
  margin-bottom: 6px;
}

.import-progress-track {
  height: 4px;
  background: var(--status-info-bg);
  border-radius: 2px;
  overflow: hidden;
}

.import-progress-fill {
  height: 100%;
  background: var(--color-info);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Filters */
.filters-section {
  padding: 12px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-row {
  display: flex;
  gap: 8px;
}

.filter-select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-select:disabled {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.filter-search {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.filter-search:focus {
  outline: none;
  border-color: var(--color-info);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.btn-fetch {
  padding: 8px 16px;
  background: var(--color-info);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-fetch:hover:not(:disabled) {
  background: var(--color-accent);
}

.btn-fetch:disabled {
  background: #93c5fd;
  cursor: default;
  opacity: 0.6;
}

.btn-clear-filters {
  padding: 8px 12px;
  background: var(--status-error-bg);
  color: var(--color-error);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-clear-filters:hover {
  background: var(--status-error-border);
}

/* Selection Bar */
.selection-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-right: auto;
}

.btn-publish-selected {
  padding: 4px 12px;
  background: var(--color-success);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.btn-publish-selected:hover {
  background: #059669;
}

.btn-publish-selected:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-delete-selected {
  padding: 4px 12px;
  background: var(--color-error);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.btn-delete-selected:hover {
  background: #dc2626;
}

.btn-delete-selected:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Question List */
.question-list {
  flex: 1;
  overflow-y: auto;
}

.list-item-checkbox {
  cursor: pointer;
  flex-shrink: 0;
}

.empty-list {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.question-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-tertiary);
  cursor: pointer;
  transition: background 0.15s;
}

.question-list-item:hover {
  background: var(--bg-tertiary);
}

.question-list-item.selected {
  background: var(--selected-bg);
  border-left: 3px solid var(--color-info);
}

.list-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.list-item-index {
  font-size: 11px;
  color: var(--text-tertiary);
  min-width: 24px;
}

.list-item-subject {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.list-item-difficulty {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.list-item-module {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--status-success-bg-subtle);
  color: var(--status-success-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.list-item-type {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--status-purple-bg);
  color: var(--status-purple-text);
}

.list-item-exam {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.list-item-draft {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.list-item-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Right Panel - Detail */
.detail-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
}

.no-selection {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-tertiary);
}

.no-selection p {
  margin: 0;
  font-size: 14px;
}

/* Detail Header */
.detail-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  min-height: 56px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: relative;
  box-sizing: border-box;
}

.detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.btn-nav {
  padding: 6px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-nav:hover:not(:disabled) {
  background: var(--bg-tertiary);
}

.btn-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-position {
  font-size: 13px;
  color: var(--text-tertiary);
  min-width: 80px;
  text-align: center;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.btn-edit {
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.btn-edit:hover {
  background: #1d4ed8;
}

.btn-cancel {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.btn-cancel:hover {
  background: var(--border-color);
}

.btn-save {
  padding: 8px 16px;
  background: var(--color-success);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.btn-save:hover {
  background: #059669;
}

.btn-save:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Detail Content */
.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* View Mode */
.view-content {
  max-width: 800px;
}

.view-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.view-badges > span {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-tertiary);
  border: none;
}

.badge-subject {
  text-transform: capitalize;
}

.badge-difficulty {
  text-transform: capitalize;
}

.badge-type {
}

.badge-module {
}

.badge-readiness {
  font-weight: 600;
}

.badge-import-status {
  text-transform: capitalize;
  font-weight: 600;
}

.view-id {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bg-tertiary);
}

.view-id .label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.view-id code {
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 4px;
}

.view-section {
  margin-bottom: 24px;
}

.view-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
}

.question-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
}

.answer-text {
  font-size: 16px;
  font-weight: 600;
  color: #059669;
  margin: 0;
}

.question-image,
.solution-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: 12px;
}

/* Options List */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.option-item.correct {
  background: var(--status-success-bg-subtle);
  border-color: var(--status-success-border);
}

.option-label {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-color);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.option-item.correct .option-label {
  background: var(--color-success);
  color: white;
}

.option-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

.correct-tag {
  font-size: 16px;
  color: var(--color-success);
}

/* Exam List */
.exam-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--status-info-bg-subtle);
  border: 1px solid var(--status-info-border);
  border-radius: 6px;
}

.exam-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--status-info-text);
}

.exam-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.exam-session {
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

.exam-qno {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-success);
  background: var(--status-success-bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Solution View */
.solution-view {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.solution-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.proficiency-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.proficiency-badge.low {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.proficiency-badge.medium {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.proficiency-badge.high {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.time-badge {
  font-size: 12px;
  color: var(--status-indigo-text);
  background: var(--status-indigo-bg);
  padding: 4px 8px;
  border-radius: 4px;
}

.steps-list {
  margin: 0;
  padding-left: 20px;
}

.steps-list li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.steps-list li:last-child {
  margin-bottom: 0;
}

.hints-list {
  margin: 0;
  padding-left: 20px;
}

.hints-list li {
  margin-bottom: 6px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Target Exams */
.target-exams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.target-exam-badge {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Loading/Error States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-tertiary);
  font-size: 16px;
}

.error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #dc2626;
  font-size: 16px;
}

/* Confirm Dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.confirm-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  min-width: 360px;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.confirm-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.confirm-card p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 900px) {
  .list-panel {
    width: 320px;
    min-width: 280px;
  }
}
.modules-page {
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.page-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.total-count {
  color: var(--text-tertiary);
  font-size: 14px;
}

.btn-primary {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* Filters */
.filters-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-primary);
  min-width: 150px;
}

/* Subject Sections */
.subject-section {
  margin-bottom: 32px;
}

.subject-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  padding-left: 12px;
  border-left: 4px solid;
}

.subject-count {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--bg-primary);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s;
}

.module-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.module-card.clickable {
  cursor: pointer;
}

.module-card.clickable:hover {
  border-color: var(--color-info);
}

.module-card.inactive {
  opacity: 0.6;
  background: var(--bg-secondary);
}

.module-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.module-readable-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
}

.module-question-count {
  font-size: 12px;
  font-weight: 500;
  color: #4f46e5;
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 12px;
}

.inactive-badge {
  font-size: 11px;
  font-weight: 500;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
}

.top-module-badge {
  font-size: 11px;
  font-weight: 500;
  color: #059669;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 4px;
}

.module-parent {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0 0 8px 0;
  font-style: italic;
}

.module-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.module-description {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.module-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.children-count {
  font-size: 11px;
  font-weight: 500;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.grade-badge {
  font-size: 12px;
  font-weight: 500;
  color: #4f46e5;
  background: #eef2ff;
  padding: 4px 10px;
  border-radius: 12px;
}

/* Hierarchy Section */
.hierarchy-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

.module-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.top-level-card {
  border-left: 4px solid #059669;
  border-radius: 12px 12px 0 0;
}

.top-level-card .module-name {
  font-size: 20px;
}

.top-level-card:only-child,
.module-hierarchy:not(:has(.child-modules)) .top-level-card {
  border-radius: 12px;
}

.child-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 260px));
  gap: 8px;
  margin-left: 32px;
  margin-top: 10px;
  border-left: 2px solid var(--border-color);
  padding-left: 12px;
}

.child-card {
  border-radius: 8px;
  background: var(--bg-secondary);
  padding: 10px 12px;
}

.child-card .module-name {
  font-size: 13px;
}

.child-card .module-description {
  font-size: 12px;
  margin-bottom: 6px;
}

.child-card .module-grades {
  margin-bottom: 12px;
}

.child-card .grade-badge {
  font-size: 11px;
  padding: 2px 8px;
}

.standalone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin: 24px 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.module-actions {
  display: flex;
  gap: 6px;
}

.btn-collapse {
  padding: 3px 8px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-dark);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.btn-collapse:hover {
  background: var(--border-color);
}

.btn-edit {
  flex: 1;
  padding: 6px 12px;
  background: #eff6ff;
  color: var(--color-accent);
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-edit:hover {
  background: #dbeafe;
}

.btn-delete {
  padding: 6px 12px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #fee2e2;
}

.btn-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* No Modules */
.no-modules {
  text-align: center;
  padding: 48px;
  background: var(--bg-primary);
  border-radius: 12px;
  color: var(--text-tertiary);
}

/* Status Messages */
.save-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 14px;
}

.save-status.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
}

.save-status.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.status-dismiss {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
}

.status-dismiss:hover {
  opacity: 1;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-content.module-modal {
  width: 90%;
  max-width: 600px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.footer-spacer {
  flex: 1;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group > label:not(.checkbox-label) {
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-row {
  display: flex;
  gap: 24px;
}

.form-group.half {
  flex: 1;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.form-help {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 4px 0 0 0;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.checkbox-wrapper label {
  font-size: 14px;
  font-weight: normal;
  color: var(--text-secondary);
  cursor: pointer;
  margin: 0;
}

.checkbox-label,
.form-group .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: normal;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input,
.form-group .checkbox-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Buttons */
.btn-cancel {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel:hover {
  background: var(--border-color);
}

.btn-save {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save:hover {
  background: #1d4ed8;
}

.btn-save:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-tertiary);
  font-size: 16px;
}

.error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #dc2626;
  font-size: 16px;
}
/* Prompts Page - Split Panel Layout */
.prompts-page {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Left Panel - List */
.prompts-list-panel {
  width: 380px;
  min-width: 380px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

.prompts-list-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.prompts-list-header h1 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: var(--text-primary);
}

.prompts-list-actions {
  display: flex;
  gap: 8px;
}

.prompts-list-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.prompts-list-btn.primary {
  background: var(--color-primary);
  color: white;
  border: none;
}

.prompts-list-btn.primary:hover {
  background: var(--color-primary-hover);
}

.prompts-list-btn.secondary {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.prompts-list-btn.secondary:hover {
  background: var(--bg-secondary);
}

.prompts-list-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Filters */
.prompts-filters {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompts-filter-row {
  display: flex;
  gap: 8px;
}

.prompts-filter-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-primary);
}

/* Prompt List */
.prompts-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.prompts-list-section {
  margin-bottom: 16px;
}

.prompts-list-section {
  border-bottom: 1px solid var(--border-color);
}

.prompts-list-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 8px 4px;
}

.prompts-section-add-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-color-dark);
  background: var(--bg-primary);
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.prompts-section-add-btn:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.prompts-list-empty-section {
  padding: 6px 12px 10px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

.prompts-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin-bottom: 4px;
  background: var(--bg-primary);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.prompts-list-item:hover {
  border-color: var(--border-color);
}

.prompts-list-item.selected {
  border-color: var(--color-primary);
  background: var(--selected-bg);
}

.prompts-list-item.active {
  border-left: 3px solid #22c55e;
}

.prompts-list-item.active.selected {
  border-left: 3px solid #22c55e;
  border-color: var(--color-primary);
}

.prompts-list-item.creating {
  border-color: #22c55e;
  background: var(--status-success-bg-subtle);
}

.prompts-list-item-checkbox {
  flex-shrink: 0;
  padding: 2px 0;
}

.prompts-list-item-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #22c55e;
}

.prompts-list-item-content {
  flex: 1;
  min-width: 0;
}

.prompts-list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.prompts-list-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.prompts-list-item-version {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: monospace;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

.prompts-list-item-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompts-list-item-targeting {
  font-size: 11px;
  color: var(--status-info-text);
  margin-top: 6px;
}

.prompts-list-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Right Panel - Detail */
.prompts-detail-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.prompts-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 15px;
}

/* Detail Header */
.prompts-detail-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.prompts-detail-header-left h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  color: var(--text-primary);
}

.prompts-detail-header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.prompts-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
}

.prompts-badge.version {
  background: var(--status-info-bg);
  color: var(--status-info-text);
  font-family: monospace;
}

.prompts-badge.hint {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.prompts-badge.history {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.prompts-badge.active {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.prompts-detail-header-actions {
  display: flex;
  gap: 8px;
}

.prompts-detail-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.prompts-detail-btn.primary {
  background: var(--color-primary);
  color: white;
  border: none;
}

.prompts-detail-btn.primary:hover {
  background: var(--color-primary-hover);
}

.prompts-detail-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.prompts-detail-btn.secondary:hover {
  background: var(--bg-tertiary);
}

.prompts-detail-btn.danger {
  background: var(--status-error-bg);
  color: var(--color-error);
  border: 1px solid var(--status-error-border);
}

.prompts-detail-btn.danger:hover {
  background: var(--status-error-border);
}

.prompts-detail-btn.danger-secondary {
  background: var(--status-warning-bg-subtle);
  color: var(--status-warning-text);
  border: 1px solid var(--status-warning-border);
}

.prompts-detail-btn.danger-secondary:hover {
  background: var(--status-warning-border);
}

.prompts-detail-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Detail Content */
.prompts-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Form Section */
.prompts-form-section {
  padding: 16px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.prompts-form-row {
  margin-bottom: 12px;
}

.prompts-form-row:last-child {
  margin-bottom: 0;
}

.prompts-form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.prompts-form-row input[type="text"],
.prompts-form-row input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.prompts-form-row input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 156, 255, 0.1);
}

/* Description (view mode) */
.prompts-view-description {
  margin: 0;
  padding: 16px 24px;
  color: var(--text-tertiary);
  font-size: 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

/* Targeting Section */
.prompts-targeting-section {
  padding: 12px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.prompts-targeting-section h4 {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.prompts-targeting-content {
  margin-top: 12px;
}

/* Collapsible Section Header */
.prompts-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.prompts-section-header:hover {
  opacity: 0.8;
}

.prompts-section-toggle {
  font-size: 10px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.prompts-section-toggle.expanded {
  transform: rotate(90deg);
}

.prompts-targeting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.prompts-targeting-row:last-child {
  margin-bottom: 0;
}

.prompts-targeting-row > label:first-child {
  min-width: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.prompts-targeting-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prompts-targeting-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.prompts-targeting-checkbox:hover {
  border-color: var(--color-primary);
}

.prompts-targeting-checkbox input {
  margin: 0;
  cursor: pointer;
}

.prompts-targeting-checkbox input:checked + span {
  color: var(--status-info-text);
  font-weight: 500;
}

.prompts-targeting-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
}

.prompts-targeting-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.prompts-targeting-hint {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Targeting Summary */
.prompts-targeting-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--selected-bg);
  border-bottom: 1px solid var(--border-color);
}

.prompts-targeting-summary-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.prompts-targeting-summary-value {
  font-size: 13px;
  color: var(--text-primary);
}

.prompts-targeting-priority-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
}

/* Version History */
.prompts-history-section {
  padding: 16px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.prompts-history-section h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text-primary);
}

.prompts-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompts-history-item {
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 90px;
}

.prompts-history-item:hover {
  border-color: var(--color-primary);
}

.prompts-history-item.selected {
  border-color: var(--color-primary);
  background: var(--selected-bg);
}

.prompts-history-item.current {
  border-color: #22c55e;
  background: var(--status-success-bg-subtle);
}

.prompts-history-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.prompts-history-item-version {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.prompts-history-item-current {
  padding: 1px 5px;
  background: #22c55e;
  color: white;
  font-size: 9px;
  font-weight: 500;
  border-radius: 3px;
}

.prompts-history-item-date {
  font-size: 10px;
  color: var(--text-tertiary);
}

.prompts-history-empty {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Template Section */
.prompts-template-section {
  padding: 16px 24px;
}

.prompts-template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.prompts-template-header h4 {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.prompts-template-actions {
  display: flex;
  gap: 8px;
}

.prompts-template-btn {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.prompts-template-btn.edit {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.prompts-template-btn.edit:hover {
  background: var(--border-color);
}

.prompts-template-btn.edit.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.prompts-template-btn.delete {
  background: var(--status-error-bg);
  color: var(--color-error);
  border: 1px solid var(--status-error-border);
}

.prompts-template-btn.delete:hover {
  background: var(--status-error-border);
}

.prompts-template-btn.restore {
  background: var(--status-info-bg);
  color: var(--color-accent);
  border: 1px solid var(--status-info-border);
}

.prompts-template-btn.restore:hover {
  background: var(--status-info-border);
}

.prompts-template-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prompts-template-preview {
  margin: 0;
  padding: 16px;
  background: #1a1a2e;
  color: #e0e0e0;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow: auto;
}

.prompts-template-editor {
  width: 100%;
  min-height: 525px;
  padding: 16px;
  background: #1a1a2e;
  color: #e0e0e0;
  border: none;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.prompts-template-editor:focus {
  outline: 2px solid var(--color-primary);
}

.prompts-placeholder-highlight {
  background: var(--status-warning-bg);
  color: var(--text-primary);
  padding: 1px 3px;
  border-radius: 2px;
}

/* Placeholder Legend */
.prompts-placeholders {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.prompts-placeholders h5 {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.prompts-placeholders .prompts-placeholders-list {
  margin-top: 8px;
}

.prompts-placeholders-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prompts-placeholder-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  font-size: 11px;
}

.prompts-placeholder-item code {
  background: var(--status-warning-bg);
  padding: 1px 4px;
  border-radius: 2px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 10px;
  color: var(--text-primary);
}

.prompts-placeholder-item span {
  color: var(--text-tertiary);
}

/* Footer */
.prompts-detail-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompts-detail-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prompts-detail-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompts-status {
  font-size: 13px;
}

.prompts-status.saving {
  color: var(--text-tertiary);
}

.prompts-status.saved {
  color: #22c55e;
}

.prompts-status.error {
  color: var(--color-error);
}

.prompts-edit-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Import Status */
.prompts-import-status {
  margin: 0 16px 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompts-import-status.success {
  background: var(--status-success-bg-subtle);
  color: var(--color-success);
}

.prompts-import-status.error {
  background: var(--status-error-bg-subtle);
  color: var(--color-error);
}

.prompts-import-status button {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.prompts-import-status button:hover {
  opacity: 1;
}

/* Loading */
.prompts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
}
.model-data-page {
  padding: 20px;
}

.model-data-page .page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.model-data-page h1 {
  margin: 0;
  color: var(--text-primary);
}

.refresh-btn {
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.refresh-btn:hover {
  background: var(--border-color);
  border-color: #9ca3af;
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dataset Import Banner */
.dataset-import-banner {
  padding: 12px 16px;
  background: var(--status-info-bg-subtle);
  border: 1px solid var(--status-info-border);
  border-radius: 8px;
  color: var(--status-info-text);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Prompt Type Tabs */
.prompt-type-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.prompt-type-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-type-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.prompt-type-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Provider badge in table */
.provider-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--status-info-bg-subtle);
  color: var(--status-info-text);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.prompt-name {
  font-size: 13px;
  color: var(--text-secondary);
}

.prompt-type-badge {
  padding: 2px 8px;
  background: var(--status-purple-bg);
  color: var(--status-purple-text);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--color-accent);
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Filters Bar - matching Submissions */
.filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.filters-bar .filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filters-bar .filters select {
  padding: 8px 12px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.clear-filters-btn {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: var(--border-color);
  color: var(--text-secondary);
}

/* Selection Actions */
.selection-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selection-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.action-btn {
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.action-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
  opacity: 0.6;
}

.action-btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-dark);
}

.action-btn.secondary:hover {
  background: var(--border-color);
}

/* Loading/Error/Empty States */
.loading,
.error,
.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--text-tertiary);
}

.error {
  color: #dc2626;
  background: var(--status-error-bg-subtle);
  border-radius: 8px;
}

.empty-state {
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px dashed var(--border-color-dark);
}

/* Table Container */
.table-container {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr.selected-row {
  background: var(--selected-bg) !important;
}

.data-table tbody tr.selected-row:hover {
  background: var(--status-info-bg) !important;
}

.data-table tbody tr.error-row {
  background: var(--status-error-bg-subtle);
}

.data-table tbody tr.error-row:hover {
  background: var(--status-error-bg);
}

.data-table tbody tr.error-row.selected-row {
  background: var(--status-error-border) !important;
}

.data-table tbody tr.expanded-row {
  background: var(--status-info-bg-subtle);
}

.data-table tbody tr.details-row {
  background: var(--bg-secondary);
}

.data-table tbody tr.details-row:hover {
  background: var(--bg-secondary);
}

.data-table tbody tr.details-row td {
  padding: 0;
}

/* Checkbox Column */
.checkbox-col {
  width: 40px;
  text-align: center;
}

.checkbox-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Cell Styles */
.user-cell {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  color: var(--text-primary);
}

.subject-module-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subject-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 12px;
  text-transform: capitalize;
  color: var(--text-secondary);
  font-weight: 500;
}

.module-name {
  font-size: 12px;
  color: var(--text-tertiary);
}

.question-preview {
  font-size: 13px;
  color: var(--text-secondary);
}

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--status-indigo-bg);
  color: var(--status-indigo-text);
  border-radius: 4px;
  font-size: 12px;
}

.cost-cell {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--color-success);
}

.latency-cell {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}

.outputs-count {
  text-align: center;
  color: var(--text-tertiary);
}

.expand-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-tertiary);
}

/* Input Details (expanded row) */
.input-details {
  padding: 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.detail-section {
  margin-bottom: 20px;
  background: var(--bg-primary);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  font-size: 13px;
}

.question-text-full {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.question-image,
.solution-image {
  max-width: 400px;
  max-height: 300px;
  margin-top: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.text-answer {
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  margin: 8px 0;
}

/* Outputs List */
.outputs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.output-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.output-card.primary {
  border-color: var(--color-success);
  border-width: 2px;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.output-header:hover {
  background: var(--bg-tertiary);
}

.output-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.primary-badge {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.provider {
  font-weight: 500;
  color: var(--color-accent);
}

.model {
  color: var(--text-tertiary);
}

.latency {
  color: var(--text-tertiary);
}

.cost {
  color: var(--text-tertiary);
  font-family: monospace;
}

.output-details {
  border-top: 1px solid var(--border-color);
  padding: 12px;
  background: var(--bg-primary);
}

.assessment {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.assessment h5 {
  margin: 0 0 8px 0;
  font-size: 13px;
}

.overall-assessment {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.overall-assessment.correct {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.overall-assessment.partially_correct {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.overall-assessment.incorrect {
  background: var(--status-error-bg);
  color: var(--status-error-text);
}

.overall-assessment.correct_but_inefficient {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.scores {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.scores span {
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 4px;
}

.parse-error {
  margin-top: 12px;
  padding: 12px;
  background: var(--status-error-bg-subtle);
  border: 1px solid var(--status-error-border);
  border-radius: 6px;
  color: var(--status-error-text);
  font-size: 13px;
}

.raw-output {
  margin-top: 12px;
}

.raw-output summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 8px 0;
}

.raw-output pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  overflow-x: auto;
  max-height: 300px;
  margin-top: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid var(--border-color-dark);
  background: var(--bg-primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-tertiary);
  border-color: #9ca3af;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  margin: 0 0 16px 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-primary);
}

.error-message {
  padding: 12px;
  background: var(--status-error-bg-subtle);
  border: 1px solid var(--status-error-border);
  border-radius: 8px;
  color: var(--color-error);
  font-size: 14px;
  margin-bottom: 16px;
}

.success-message {
  padding: 12px;
  background: var(--status-success-bg-subtle);
  border: 1px solid var(--status-success-border);
  border-radius: 8px;
  color: var(--status-success-text);
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.cancel-btn {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cancel-btn:hover {
  background: var(--border-color);
}

.submit-btn {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.submit-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}
/* Model Run Detail Page */
.model-run-detail {
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Output Tabs */
.output-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 4px;
}

.output-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.output-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.output-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.output-tab .primary-badge {
  font-size: 9px;
  padding: 1px 5px;
}

/* Metadata Grid for detail page */
.model-run-detail .metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.model-run-detail .meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-run-detail .meta-item label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.model-run-detail .meta-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Performance Stats */
.model-run-detail .perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.model-run-detail .perf-item {
  background: var(--bg-tertiary);
  padding: 14px;
  border-radius: 8px;
}

.model-run-detail .perf-item label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.model-run-detail .perf-item .perf-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.model-run-detail .perf-item .perf-value.cost {
  color: #059669;
}

/* Input Section */
.model-run-detail .input-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.model-run-detail .image-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-run-detail .image-block label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.model-run-detail .image-scroll-wrapper {
  max-height: 500px;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-secondary);
}

.model-run-detail .image-scroll-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.model-run-detail .image-block img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.model-run-detail .no-image {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 13px;
  border: 1px dashed var(--border-color-dark);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.model-run-detail .input-context {
  margin-top: 16px;
}

.model-run-detail .input-context .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  font-size: 13px;
}

.model-run-detail .question-text-full {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

/* Raw Output Section */
.model-run-detail .raw-output-block {
  margin: 0;
  padding: 16px;
  background: #1e293b;
  color: #e2e8f0;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 500px;
  overflow-y: auto;
  border-radius: 8px;
}

/* Parse error */
.model-run-detail .parse-error-banner {
  padding: 12px 16px;
  background: var(--status-error-bg-subtle);
  border: 1px solid var(--status-error-border);
  border-radius: 6px;
  color: var(--status-error-text);
  font-size: 13px;
  margin-bottom: 12px;
}

/* Assessment Section */
.model-run-detail .assessment-section {
  margin-top: 16px;
}

.model-run-detail .assessment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.model-run-detail .scores-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.model-run-detail .scores-row span {
  background: var(--bg-tertiary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* Steps table in detail */
.model-run-detail .steps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.model-run-detail .steps-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.model-run-detail .steps-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg-tertiary);
  vertical-align: top;
  color: var(--text-primary);
}

.model-run-detail .steps-table tr.step-correct {
  background: var(--status-success-bg-subtle);
}

.model-run-detail .steps-table tr.step-incorrect {
  background: var(--status-error-bg-subtle);
}

/* Suggestions/Hints list */
.model-run-detail .detail-list {
  margin: 0;
  padding-left: 20px;
}

.model-run-detail .detail-list li {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .model-run-detail .metadata-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .model-run-detail .perf-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .model-run-detail .input-images {
    grid-template-columns: 1fr;
  }
}
.eval-runs-page {
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.eval-runs-page h1 {
  margin: 0;
  color: var(--text-primary);
}

.start-run-btn {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.start-run-btn:hover {
  background: #1d4ed8;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.tab {
  padding: 12px 24px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Sections */
.section {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text-primary);
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: var(--bg-tertiary);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-running {
  background: #dbeafe;
  color: #1e40af;
}

.status-completed {
  background: #dcfce7;
  color: #166534;
}

.status-failed {
  background: #fee2e2;
  color: #991b1b;
}

/* Provider Badge */
.provider-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #e8f4ff;
  color: var(--color-accent);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 8px;
}

.model-name {
  font-size: 13px;
  color: var(--text-tertiary);
}

.prompt-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-tertiary);
}

.run-id {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Score Cell */
.score-cell {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}

.score-good {
  background: #dcfce7;
  color: #166534;
}

.score-medium {
  background: #fef3c7;
  color: #92400e;
}

.score-low {
  background: #fee2e2;
  color: #991b1b;
}

/* Filters */
.filters-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.filters-row select {
  padding: 8px 16px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  background: var(--bg-primary);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.refresh-btn {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
}

.refresh-btn:hover {
  background: var(--border-color);
}

.prompt-name {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Trends Chart */
.trends-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: 16px 0;
  overflow-x: auto;
}

.trend-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 24px;
  height: 100%;
  cursor: help;
}

.trend-bar {
  width: 20px;
  background: linear-gradient(to top, var(--color-info), var(--color-accent));
  border-radius: 4px 4px 0 0;
  transition: height 0.2s;
  min-height: 4px;
}

.trend-label {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 8px;
  white-space: nowrap;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-tertiary);
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: var(--text-secondary);
}

.empty-state p {
  margin: 0;
}

.no-data {
  color: var(--text-tertiary);
  font-style: italic;
}

.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-tertiary);
}

/* Performance Content */
.performance-content {
  max-width: 1200px;
}

.runs-content {
  max-width: 1400px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-description {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-primary);
}

.form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.error-message {
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.cancel-btn {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cancel-btn:hover {
  background: var(--border-color);
}

.start-btn {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.start-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.start-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}
/* Feature Cards */
.feature-card {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.feature-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.feature-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.feature-field {
  margin-bottom: 0;
}

.feature-field-full {
  margin-bottom: 8px;
}

.feature-field-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary, #666);
  margin-bottom: 2px;
}

.feature-field-input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-secondary, var(--bg-primary));
  color: var(--text-primary);
  box-sizing: border-box;
}

.feature-field-input::placeholder {
  color: var(--text-tertiary);
}

.feature-field-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.feature-remove-btn {
  padding: 4px 8px;
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  cursor: pointer;
  font-size: 18px;
  margin-left: 8px;
  line-height: 1;
}

.feature-remove-btn:hover {
  color: #dc2626;
}

/* Feature Actions */
.feature-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.feature-add-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.feature-add-btn:hover {
  background: #3d8bef;
}

.feature-save-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  height: 32px;
  transition: background 0.2s;
}

.feature-save-btn:hover:not(:disabled) {
  background: #3d8bef;
}

.feature-save-btn:disabled {
  background: #a0c4ff;
  cursor: not-allowed;
}

.feature-status {
  margin-top: 8px;
  display: inline-block;
}
.subscriptions-page {
  max-width: 900px;
}

.subscriptions-page h1 {
  margin: 0 0 20px 0;
  font-size: 24px;
  color: var(--text-primary);
}

/* Subscription Definition Cards */
.sub-def-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.sub-def-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.sub-def-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sub-def-header:hover {
  background: var(--bg-secondary);
}

.sub-def-header-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sub-def-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.sub-def-id {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: monospace;
}

.sub-def-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-def-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sub-def-eligibility-count {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.expand-icon {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* Eligibility Editor */
.sub-def-eligibilities {
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  background: var(--bg-secondary);
}

.eligibility-header {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.eligibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}

.eligibility-row:last-of-type {
  border-bottom: none;
}

.eligibility-row.set {
  background: var(--selected-bg);
  margin: 0 -16px;
  padding: 6px 16px;
}

.eligibility-row-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.eligibility-feature-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.eligibility-feature-id {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: monospace;
}

.eligibility-row-right select {
  padding: 4px 8px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 12px;
  min-width: 140px;
}

.sub-def-actions-inline {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.remove-sub-btn {
  padding: 4px 12px;
  border: 1px solid var(--color-error);
  border-radius: 6px;
  background: transparent;
  color: var(--color-error);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.remove-sub-btn:hover {
  background: var(--color-error);
  color: white;
}

/* Add Subscription Form */
.add-sub-form {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  background: var(--bg-secondary);
}

.add-sub-form h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: var(--text-primary);
}

.add-sub-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.add-sub-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.add-sub-fields input {
  padding: 6px 10px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
}

.add-sub-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-sub-btn {
  padding: 8px 16px;
  border: 1px dashed var(--border-color-dark);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
}

.add-sub-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Assignments Tab */
.user-search-section {
  position: relative;
  margin-bottom: 20px;
}

.user-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color-dark);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.user-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  max-height: 300px;
  overflow-y: auto;
}

.user-search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.user-search-result-item:hover {
  background: var(--bg-secondary);
}

.user-result-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.user-result-email {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* User Subscriptions Section */
.user-subs-section {
  margin-top: 8px;
}

.user-subs-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.user-subs-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.user-subs-email {
  font-size: 13px;
  color: var(--text-tertiary);
}

.subs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.subs-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
}

.subs-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.subs-table .inactive-row td {
  opacity: 0.6;
}

.sub-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.sub-status-badge.active {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.sub-status-badge.cancelled {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
}

.sub-status-badge.expired {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.cancel-sub-btn {
  padding: 4px 10px;
  border: 1px solid var(--color-error);
  border-radius: 6px;
  background: transparent;
  color: var(--color-error);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cancel-sub-btn:hover:not(:disabled) {
  background: var(--color-error);
  color: white;
}

.cancel-sub-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Assign Form */
.assign-form {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  background: var(--bg-secondary);
}

.assign-form h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-primary);
}

.assign-form-fields {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.assign-form-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  min-width: 150px;
}

.assign-form-fields select,
.assign-form-fields input {
  padding: 6px 10px;
  border: 1px solid var(--border-color-dark);
  border-radius: 6px;
  font-size: 13px;
}

.assign-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-users-page h2 {
  margin-top: 0;
  margin-bottom: 24px;
}

.admin-users-actions {
  margin-bottom: 20px;
}

.admin-users-actions button {
  padding: 8px 16px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.admin-users-actions button:hover {
  opacity: 0.9;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: 8px;
  overflow: hidden;
}

.admin-users-table th,
.admin-users-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.admin-users-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-users-table td {
  font-size: 14px;
}

.admin-users-table .actions-cell {
  display: flex;
  gap: 8px;
}

.admin-users-table .actions-cell button {
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
}

.admin-users-table .actions-cell button:hover {
  background: var(--bg-secondary);
}

.admin-users-table .actions-cell button.danger {
  color: #e74c3c;
  border-color: #e74c3c;
}

.admin-users-table .actions-cell button.danger:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.modal-content .form-group {
  margin-bottom: 12px;
}

.modal-content label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.modal-content input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.modal-actions .btn-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
}

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

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}
* {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-secondary);
  color: var(--text-primary);
}
