/* ─────────────────────────────────────────────────────────────────────────────
   Epigroup Audit Tool — Design System
   Dark theme · Brand palette · MD Nichrome / Sohne Buch / Geist Mono
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Custom properties ───────────────────────────────────────────────────── */
:root {
  /* Brand fonts (MD Nichrome + Sohne Buch are commercial — swap in via @font-face when licensed) */
  --font-display:    'MD Nichrome', 'Inter', system-ui, sans-serif;
  --font-subheading: 'MD Nichrome Dark', 'Inter', system-ui, sans-serif;
  --font-body:       'Sohne Buch', 'Inter', 'DM Sans', system-ui, sans-serif;
  --font-mono:       'Geist Mono', 'JetBrains Mono', 'Fira Code', monospace;

  /* Primary palette */
  --color-rich-black:   #08141f;
  --color-vivid-yellow: #e5ff00;
  --color-soft-grey:    #f2f2f2;
  --color-cool-grey:    #dde4e4;
  --color-dark-grey:    #8d9aa4;

  /* Secondary palette */
  --color-red:    #f8333c;
  --color-green:  #65e585;
  --color-indigo: #6b7cff;

  /* Extended accents */
  --color-accent-sand: #faa948;
  --color-accent-sky:  #4378b4;
  --color-accent-sea:  #7ccccd;
  --color-warm-black:  #17100e;
  --color-warm-white:  #efecea;

  /* Semantic aliases (used throughout the stylesheet) */
  --bg-base:     #08141f;        /* Rich Black */
  --bg-surface:  #0d1e2e;        /* slightly lifted Rich Black */
  --bg-elevated: #122435;
  --bg-overlay:  #162b3d;
  --bg-input:    #0a1826;

  --border:       rgba(141 154 164 / 0.2);  /* Dark Grey at 20% */
  --border-focus: var(--color-vivid-yellow);

  --accent:       #e5ff00;       /* Vivid Yellow */
  --accent-dim:   #c8e000;
  --accent-muted: rgba(229 255 0 / 0.08);
  --accent-glow:  rgba(229 255 0 / 0.2);

  --text-primary:   #f2f2f2;     /* Soft Grey */
  --text-secondary: #dde4e4;     /* Cool Grey */
  --text-muted:     #8d9aa4;     /* Dark Grey */
  --text-inverse:   #08141f;     /* Rich Black (for text on yellow) */

  --status-green:  #65e585;
  --status-yellow: #e5ff00;
  --status-red:    #f8333c;
  --status-grey:   #8d9aa4;
  --status-indigo: #6b7cff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --transition: 150ms ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

h4, h5, h6 {
  font-family: var(--font-subheading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

code, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(229 255 0 / 0.06) 0%, transparent 70%),
    var(--bg-base);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow:
    0 0 0 1px rgba(255 255 255 / 0.04) inset,
    0 24px 64px rgba(0 0 0 / 0.5);
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.login-brand__logo {
  width: 64px;
  height: 64px;
}

.login-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.login-error {
  background: rgba(248 113 113 / 0.1);
  border: 1px solid rgba(248 113 113 / 0.25);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 1.25rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-footer {
  margin-top: 2rem;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-error {
  font-size: 12px;
  color: #fca5a5;
  margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  width: 100%;
  letter-spacing: -0.1px;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(255 255 255 / 0.15);
}

/* ── App shell (sidebar + main) ──────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar__logo {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar__logo img {
  width: 30px;
  height: 30px;
}

.sidebar__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.sidebar__nav {
  padding: 12px 8px;
  flex: 1;
}

.sidebar__section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 8px 8px 4px;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
}

.sidebar__nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar__nav-item.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.sidebar__badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.sidebar__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* Main content area */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 52px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.topbar__search {
  flex: 1;
  max-width: 480px;
}

.topbar__search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 12px;
  outline: none;
  transition: border-color var(--transition);
}

.topbar__search-input::placeholder { color: var(--text-muted); }
.topbar__search-input:focus { border-color: var(--accent); }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── User menu dropdown ──────────────────────────────────────────────────── */
.user-menu {
  position: relative;
}

.user-menu__trigger {
  padding: 0;
  font-family: inherit;
  transition: border-color var(--transition), color var(--transition);
}

.user-menu__trigger:hover,
.user-menu__trigger[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--text-primary);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 224px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 200;
  overflow: hidden;
}

.user-menu__header {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-menu__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu__email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu__divider {
  height: 1px;
  background: var(--border);
}

.user-menu__item {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.user-menu__item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.user-menu__item--danger:hover {
  background: rgba(248, 51, 60, 0.08);
  color: var(--color-red);
}

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

/* ── Cards / Summary stats ───────────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-card__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

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

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.table th {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

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

.table tr:hover td { background: var(--bg-elevated); cursor: pointer; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.badge--green   { background: rgba(101 229 133 / 0.12); color: #65e585; }
.badge--yellow  { background: rgba(229 255   0 / 0.10); color: #e5ff00; }
.badge--red     { background: rgba(248  51  60 / 0.12); color: #f8333c; }
.badge--grey    { background: rgba(141 154 164 / 0.2);  color: #8d9aa4; }
.badge--accent  { background: var(--accent-muted);       color: var(--accent); }
.badge--indigo  { background: rgba(107 124 255 / 0.12); color: #6b7cff; }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--bg-overlay);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}

.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar__fill--partial { background: var(--status-yellow); }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  padding: 0 24px;
  background: var(--bg-surface);
}

.tab {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.tab:hover { color: var(--text-primary); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Audit header ────────────────────────────────────────────────────────── */
.audit-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--text-primary); }

.audit-header__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 10px;
}

.audit-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Criterion detail (two-panel) ────────────────────────────────────────── */
.criterion-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  height: 100%;
  overflow: hidden;
}

.criterion-main {
  overflow-y: auto;
  padding: 24px;
}

.criterion-sidebar {
  border-left: 1px solid var(--border);
  background: var(--bg-surface);
  overflow-y: auto;
  padding: 20px;
}

.criterion-id-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.criterion-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 20px;
}

.question-block {
  border-left: 3px solid var(--accent);
  background: var(--accent-muted);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-primary);
}

.question-block__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.reference-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.reference-block__section {
  margin-bottom: 10px;
}

.reference-block__label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

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

.field-group__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.field-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 14px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

.field-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Rating sidebar controls */
.rating-section {
  margin-bottom: 24px;
}

.rating-section__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.btn-rating {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-rating:hover { border-color: rgba(255 255 255 / 0.2); color: var(--text-primary); }
.btn-rating.selected { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }

.maturity-selector {
  display: flex;
  gap: 4px;
}

.maturity-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.maturity-btn:hover { border-color: rgba(255 255 255 / 0.2); color: var(--text-primary); }
.maturity-btn.selected { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }

/* Auto-save indicator */
.autosave {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.autosave__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-green);
}

/* ── Responsive tablet ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    width: 52px;
  }

  .sidebar__brand .login-brand__name,
  .sidebar__title,
  .sidebar__nav-item span,
  .sidebar__footer,
  .sidebar__section-label {
    display: none;
  }

  .sidebar__brand {
    justify-content: center;
    padding: 16px 0;
  }

  .sidebar__nav-item {
    justify-content: center;
    padding: 10px;
  }

  .criterion-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .criterion-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 600px) {
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
  .tabs { padding: 0 12px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}

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

.page-header__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
}

.page-header__actions {
  display: flex;
  gap: 8px;
}

/* ── Multi-segment progress bar ──────────────────────────────────────────── */
.progress-track {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-overlay);
  min-width: 80px;
}

.progress-track__segment {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-track__segment--rated   { background: var(--status-green); }
.progress-track__segment--partial { background: var(--status-yellow); }

/* ── Filter pills ────────────────────────────────────────────────────────── */
.pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.pill:hover { border-color: rgba(255 255 255 / 0.2); color: var(--text-primary); }
.pill.active { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }

/* ── Theme chips ─────────────────────────────────────────────────────────── */
.theme-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-chip {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}

.theme-chip:hover { border-color: rgba(255 255 255 / 0.2); color: var(--text-primary); }
.theme-chip.active { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }

/* ── Status dot ──────────────────────────────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-grey);
  flex-shrink: 0;
  display: inline-block;
}

.status-dot--rated   { background: var(--status-green); }
.status-dot--partial { background: var(--status-yellow); }

/* ── Icon button ─────────────────────────────────────────────────────────── */
.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font-body);
}

.btn-icon:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ── Form select ─────────────────────────────────────────────────────────── */
.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Export cards ────────────────────────────────────────────────────────── */
.export-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.export-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-card--disabled { opacity: 0.5; }

.export-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
}

.export-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.export-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.export-card__status {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Criterion prev/next navigation ─────────────────────────────────────── */
.criterion-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}

.criterion-nav__spacer { flex: 1; }

/* ── Alert warning ───────────────────────────────────────────────────────── */
.alert-warning {
  background: rgba(229 255 0 / 0.06);
  border: 1px solid rgba(229 255 0 / 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.alert-warning__text {
  font-size: 13px;
  color: var(--color-vivid-yellow);
}

/* ── Export summary card ─────────────────────────────────────────────────── */
.export-summary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.export-summary__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
}

.export-summary__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.export-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.export-stat__label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.export-stat__value {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
}

/* ── Criteria filter bar ─────────────────────────────────────────────────── */
.criteria-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.criteria-toolbar__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.criteria-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 12px;
  outline: none;
  transition: border-color var(--transition);
}

.criteria-search::placeholder { color: var(--text-muted); }
.criteria-search:focus { border-color: var(--accent); }

/* ── Overall progress row ────────────────────────────────────────────────── */
.overall-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.overall-progress__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.overall-progress__bar {
  flex: 1;
  min-width: 120px;
}

.overall-progress__count {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.overall-progress__autosave {
  margin-left: auto;
}
