/* =========================================================================
   Job Search Agent — design system
   One source of truth for the app UI, the login screen, and (via the same
   tokens) the Django admin theme. Change the :root tokens to retheme.
   ========================================================================= */

:root {
  /* Palette */
  --bg: #f4f6fa;
  --bg-deep: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f8;
  --text: #101623;
  --text-secondary: #344054;
  --muted: #647082;
  --border: #dde3ec;
  --border-strong: #c8d2df;

  --accent: #2b5ce6;
  --accent-strong: #1e46c0;
  --accent-deep: #17368f;
  --accent-soft: #e9efff;
  --accent-border: #c5d5fb;
  --accent-text: #1745b8;

  --success: #087443;
  --success-soft: #ecfdf3;
  --success-border: #abefc6;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-border: #fecdca;
  --warn: #9a5b00;
  --warn-soft: #fff7ed;
  --gold: #f5a400;

  --sidebar: #0b1120;
  --sidebar-2: #131d36;
  --sidebar-text: #cbd5e1;
  --sidebar-heading: #8595ad;

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lift:
    0 2px 4px rgba(16, 24, 40, 0.06),
    0 16px 36px rgba(23, 37, 84, 0.12);
  --ring: 0 0 0 3px rgba(43, 92, 230, 0.18);

  /* Type */
  --font-sans: "Inter", "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 320px at 18% -60px, rgba(43, 92, 230, 0.07), transparent 70%),
    radial-gradient(900px 280px at 85% -80px, rgba(15, 118, 110, 0.05), transparent 70%),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 300px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(43, 92, 230, 0.18);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Slim, quiet scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #b9c3d2 transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  background: #b9c3d2;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================================================
   Shell & sidebar
   ========================================================================= */

.app-shell {
  display: grid;
  grid-template-columns: 254px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.app-shell.auth-shell {
  display: block;
}

.auth-page {
  background:
    radial-gradient(900px 460px at 15% -10%, rgba(43, 92, 230, 0.16), transparent 62%),
    radial-gradient(760px 420px at 88% 8%, rgba(15, 118, 110, 0.10), transparent 60%),
    radial-gradient(600px 380px at 55% 108%, rgba(245, 164, 0, 0.07), transparent 60%),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 420px),
    var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  width: 254px;
  height: 100vh;
  background:
    radial-gradient(420px 220px at -20% -10%, rgba(43, 92, 230, 0.28), transparent 65%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #f9fafb;
  padding: 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 0;
  overflow: hidden;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 8px 20px;
  white-space: nowrap;
}

.brand::before {
  content: "◆";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 12px rgba(43, 92, 230, 0.45);
  color: #ffffff;
  font-size: 12px;
}

.brand:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding-bottom: 16px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  color: var(--sidebar-text);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group-links {
  display: grid;
  gap: 4px;
}

.nav-group-links a {
  padding-left: 18px;
}

.nav-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 12px 4px;
  color: var(--sidebar-heading);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  user-select: none;
}

.nav-section::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.nav-group[open] .nav-section::after {
  transform: rotate(225deg) translateY(-2px);
}

.nav-section:hover {
  color: #e2e8f0;
}

.main {
  min-width: 0;
  padding: clamp(18px, 2.2vw, 30px) clamp(18px, 2.6vw, 36px) 48px;
}

/* =========================================================================
   Typography & page scaffolding
   ========================================================================= */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(24px, 1.9vw, 30px);
  line-height: 1.12;
  margin-bottom: 7px;
  font-weight: 800;
  letter-spacing: -0.022em;
}

h2 {
  font-size: 17px;
  margin-bottom: 14px;
  font-weight: 750;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.008em;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 6px 0 0;
}

/* =========================================================================
   Metrics & panels
   ========================================================================= */

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.metric {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 14px 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(43, 92, 230, 0));
  opacity: 0;
  transition: opacity 140ms ease;
}

.metric:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  text-decoration: none;
}

.metric:hover::after {
  opacity: 1;
}

.metric .label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.metric .value {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.panel {
  padding: clamp(16px, 1.6vw, 22px);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

/* =========================================================================
   Dashboard activity chart
   ========================================================================= */

.activity-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(18px, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 236px;
  padding: 14px 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
  overflow-x: auto;
}

.chart-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chart-peak {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.activity-day {
  display: grid;
  grid-template-rows: 22px 160px 28px;
  min-width: 0;
  gap: 6px;
  text-align: center;
}

.activity-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.activity-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: 160px;
  border-radius: 7px;
  background: var(--surface-3);
  overflow: hidden;
}

.activity-bar {
  width: 100%;
  min-height: 0;
  border-radius: 7px 7px 0 0;
  background: #d5dce7;
  transition: background 140ms ease;
}

.activity-bar.active {
  background: linear-gradient(180deg, #5b8bf7 0%, var(--accent) 60%, var(--accent-strong) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.activity-label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  transform: rotate(-35deg);
  transform-origin: top center;
}

/* =========================================================================
   Prompt engineering wizard
   ========================================================================= */

.wizard-panel {
  max-width: 980px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.wizard-steps span {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.wizard-steps span.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(43, 92, 230, 0.12);
}

.wizard-steps span.done {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.wizard-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 14px;
  margin-bottom: 18px;
}

.wizard-summary p {
  margin: 6px 0 0;
}

.wizard-summary-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.6fr) minmax(260px, 2fr);
  gap: 12px;
  margin-bottom: 18px;
}

.prompt-metadata {
  margin-bottom: 22px;
}

.description-examples {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.description-examples > strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.description-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 10px;
}

.description-example span {
  color: var(--text-secondary);
}

.wizard-summary-grid div {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 12px;
}

.wizard-summary-grid strong,
.wizard-summary-grid span {
  display: block;
}

.wizard-summary-grid strong {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.wizard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.wizard-actions.split {
  justify-content: space-between;
}

/* =========================================================================
   Companies
   ========================================================================= */

.company-verdict {
  font-size: 18px;
  line-height: 1.2;
}

.evidence-list {
  margin: 0 0 18px;
  padding-left: 20px;
}

.evidence-list li {
  margin-bottom: 8px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.company-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
}

/* =========================================================================
   Settings
   ========================================================================= */

.settings-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.settings-group {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}

.settings-group legend {
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.narrow-panel {
  max-width: 620px;
}

/* =========================================================================
   My Files ("drive")
   ========================================================================= */

.drive-shell {
  display: grid;
  gap: 14px;
}

.drive-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.drive-upload-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.drive-new-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 0 18px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.drive-new-button:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}

.drive-new-button span {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  font-weight: 450;
}

.drive-new-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drive-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
}

.drive-summary strong {
  color: var(--text);
  font-size: 18px;
}

.drive-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 140ms ease, background 140ms ease;
}

.drive-dropzone:hover {
  border-color: var(--accent-border);
  background: rgba(233, 239, 255, 0.4);
}

.drive-dropzone label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
  cursor: pointer;
}

.drive-dropzone strong,
.drive-dropzone small {
  display: block;
}

.drive-dropzone small {
  color: var(--muted);
  margin-top: 3px;
}

.drive-dropzone input {
  max-width: 240px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.upload-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px rgba(43, 92, 230, 0.35);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  font-weight: 450;
}

.drive-list {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.drive-list-head,
.drive-file-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 96px 110px 190px 48px;
  gap: 14px;
  align-items: center;
}

.drive-list-head {
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drive-file-row {
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 120ms ease;
}

.drive-file-row:last-child {
  border-bottom: 0;
}

.drive-file-row:hover {
  background: var(--surface-2);
}

.file-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.file-name:hover {
  color: var(--accent);
  text-decoration: none;
}

.file-name strong,
.file-name small {
  display: block;
}

.file-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name small {
  color: var(--muted);
  margin-top: 2px;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 38px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, transparent 0 72%, var(--accent-border) 72% 100%),
    var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
}

.version-badge.has-history {
  background: var(--success-soft);
  color: var(--success);
}

.file-actions {
  position: relative;
  justify-self: end;
}

.file-actions summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  transition: background 120ms ease, color 120ms ease;
}

.file-actions summary span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.file-actions summary::-webkit-details-marker {
  display: none;
}

.file-actions summary:hover {
  background: var(--surface-3);
  color: var(--text);
}

.file-actions div {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 210px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-lift);
}

.file-actions a,
.file-actions button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.file-actions a:hover,
.file-actions button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.file-actions button {
  color: var(--danger);
}

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

.table-actions[open] {
  z-index: 30;
}

/* =========================================================================
   Resume, spellcheck & reports
   ========================================================================= */

.resume-panel {
  max-width: 980px;
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.resume-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resume-markdown {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.spellcheck-panel {
  max-width: 980px;
}

.spellcheck-panel textarea {
  min-height: 360px;
}

.spellcheck-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 1180px;
}

.spellcheck-output {
  margin-bottom: 0;
}

.spellcheck-output summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 750;
}

.redline-output,
.corrected-output {
  margin: 0;
  white-space: pre-wrap;
  overflow-x: auto;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}

.redline-output del {
  border-radius: 4px;
  background: #fdecec;
  color: #9f1f17;
  text-decoration-color: #d92d20;
  text-decoration-thickness: 2px;
}

.redline-output ins {
  border-radius: 4px;
  background: var(--success-soft);
  color: #067647;
  text-decoration: none;
}

/* =========================================================================
   Tables
   ========================================================================= */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #f7faff;
}

th {
  background: var(--surface-3);
  color: #3b4656;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.th-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3b4656;
  font-weight: 800;
}

.th-link span {
  color: var(--accent);
  font-size: 10px;
}

.status-filter {
  position: relative;
  display: inline-block;
}

.status-filter summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.status-filter summary::-webkit-details-marker {
  display: none;
}

.status-filter div {
  position: absolute;
  z-index: 20;
  min-width: 150px;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.status-filter a {
  display: block;
  padding: 9px 11px;
  color: var(--text);
  text-transform: none;
  font-size: 13px;
  letter-spacing: 0;
}

.status-filter a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

/* =========================================================================
   Buttons & forms
   ========================================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  padding: 7px 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease, box-shadow 120ms ease;
}

.button:hover {
  border-color: #a9b6c8;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.button.primary {
  background: linear-gradient(180deg, #3d6cf0 0%, var(--accent) 45%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 12px rgba(43, 92, 230, 0.32);
}

.button.primary:hover {
  background: linear-gradient(180deg, #3563e3 0%, var(--accent-strong) 60%, var(--accent-deep) 100%);
  border-color: var(--accent-deep);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(43, 92, 230, 0.4);
}

.button.secondary {
  background: linear-gradient(180deg, #14867d 0%, #0f766e 100%);
  border-color: #0d655e;
  color: #ffffff;
}

.button.danger {
  background: #ffffff;
  border-color: #f4b4ae;
  color: var(--danger);
}

.button.danger:hover {
  background: var(--danger-soft);
  border-color: #eda69f;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
  padding: 8px 11px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

input::placeholder,
textarea::placeholder {
  color: #98a4b5;
}

textarea {
  resize: vertical;
  font-family: var(--font-mono);
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.field {
  margin-bottom: 15px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-field input {
  width: auto;
  accent-color: var(--accent);
}

.errorlist {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 13px;
}

.actions,
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filters input {
  max-width: 440px;
}

/* =========================================================================
   Jobs list & filters
   ========================================================================= */

.job-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.jobs-head {
  align-items: center;
}

.jobs-head h1 {
  margin-bottom: 6px;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: #e7edf6;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.view-tabs a {
  color: #475467;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 750;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.view-tabs a:hover {
  text-decoration: none;
  color: var(--text);
}

.view-tabs a.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.jobs-control-panel,
.jobs-table-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.jobs-control-panel {
  padding: 20px;
}

.jobs-table-panel {
  padding: 0;
  overflow: hidden;
}

.jobs-command-bar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
}

.search-field label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
}

.job-search {
  min-height: 46px;
  font-size: 15px;
}

.jobs-primary-actions,
.export-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-actions {
  justify-content: flex-end;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.export-actions .button.secondary {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.export-actions .button.secondary:hover {
  background: var(--surface-2);
  border-color: #a9b6c8;
  color: var(--text);
}

.quick-filters,
.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters {
  margin-top: 16px;
}

.quick-filter-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-filters a,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.quick-filters a:hover,
.filter-chip:hover {
  border-color: var(--accent-border);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.active-filters {
  margin-top: 12px;
}

.filter-chip {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

.filter-chip span {
  color: #52627a;
  margin-left: 8px;
}

.advanced-filters {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  padding: 12px 14px 14px;
}

.advanced-filters summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 750;
  list-style: none;
}

.advanced-filters summary::-webkit-details-marker {
  display: none;
}

.advanced-filters summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.filter-grid .field {
  margin-bottom: 0;
}

.field.compact label {
  font-size: 12px;
}

.field.compact input,
.field.compact select {
  min-height: 38px;
  padding: 8px 10px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0, #fbfcfe 100%);
}

.jobs-table-wrap {
  border: 0;
  border-radius: 0;
}

.jobs-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8fb;
  border-bottom-color: #ccd6e3;
}

.jobs-table td {
  padding-top: 15px;
  padding-bottom: 15px;
}

.jobs-table tbody tr:hover {
  background: #f5f9ff;
}

.jobs-table .role-cell {
  min-width: 300px;
  max-width: 520px;
}

.match-reason {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  margin-top: 5px;
}

.job-title {
  color: var(--accent-strong);
  font-weight: 750;
  line-height: 1.3;
}

.job-title:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.favorite-star {
  display: inline-block;
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
  margin-right: 6px;
  vertical-align: -1px;
  text-shadow: 0 1px 2px rgba(245, 164, 0, 0.35);
}

.company-cell {
  color: var(--text);
  font-weight: 750;
  white-space: nowrap;
}

.location-cell {
  min-width: 160px;
}

.salary-cell {
  min-width: 190px;
  max-width: 320px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.nowrap {
  white-space: nowrap;
}

.empty-state {
  color: var(--muted);
  padding: 40px 20px;
  text-align: center;
}

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

/* =========================================================================
   Badges, pills & statuses
   ========================================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 4px 10px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
  font-weight: 700;
}

.pill.subtle {
  background: var(--surface-3);
  color: #475467;
  margin-left: 8px;
}

.score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-badge.excellent {
  background: var(--success-soft);
  color: var(--success);
  box-shadow: inset 0 0 0 1px var(--success-border);
}

.score-badge.strong {
  background: #eff8ff;
  color: #175cd3;
  box-shadow: inset 0 0 0 1px #cbe2ff;
}

.score-badge.standard {
  background: var(--surface-2);
  color: #475467;
  box-shadow: inset 0 0 0 1px var(--border);
}

.row-index {
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.score.good,
.status-completed {
  color: var(--success);
  font-weight: 800;
}

.score.warn {
  color: var(--warn);
}

.status-running {
  color: #175cd3;
  font-weight: 800;
}

.status-failed {
  color: var(--danger);
  font-weight: 800;
}

.status-aborted {
  color: #7a2e0e;
  font-weight: 800;
}

.run-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #f2f4f7;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.run-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.run-status.status-running {
  background: #eff8ff;
}

.run-status.status-completed {
  background: var(--success-soft);
}

.run-status.status-failed {
  background: var(--danger-soft);
}

.run-status.status-aborted {
  background: var(--warn-soft);
}

.run-status.status-open {
  background: var(--success-soft);
  color: var(--success);
}

.run-status.status-closed {
  background: #f2f4f7;
  color: var(--muted);
}

.run-status.status-unknown {
  background: var(--surface-2);
  color: var(--muted);
}

.work-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.work-badge {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.work-remote {
  background: var(--success-soft);
  color: var(--success);
}

.work-hybrid {
  background: var(--warn-soft);
  color: var(--warn);
}

.work-on-site,
.work-onsite {
  background: #f2f4f7;
  color: #475467;
}

.status-badge {
  background: var(--surface-2);
  color: var(--muted);
}

.status-badge.status-open {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.status-closed {
  background: #f2f4f7;
  color: #475467;
}

/* =========================================================================
   Flash messages, detail lists & logs
   ========================================================================= */

.messages {
  margin-bottom: 18px;
}

.message {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-soft);
}

.message.error {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  border-left-color: var(--danger);
}

.message.info {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  border-left-color: var(--accent);
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list div {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.detail-list strong {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.log-viewer,
.code-block {
  background: #0e1424;
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13px;
}

.log-viewer {
  max-height: 380px;
  line-height: 1.5;
}

.log-line {
  display: grid;
  grid-template-columns: 76px 72px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.log-time {
  color: #98a2b3;
}

.log-level {
  color: #bfdbfe;
  font-weight: 800;
}

.log-error .log-level {
  color: #fda29b;
}

.log-warning .log-level {
  color: #fedf89;
}

/* =========================================================================
   Sidebar account
   ========================================================================= */

.sidebar-account {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.account-email {
  margin-bottom: 10px;
  color: var(--sidebar-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.button-subtle {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
}

.button-subtle:hover {
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(30, 41, 59, 0.75);
  color: #ffffff;
}

.full-width {
  width: 100%;
}

/* =========================================================================
   Auth (login) screen
   ========================================================================= */

.auth-panel {
  width: min(100% - 32px, 448px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

.auth-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(199, 208, 221, 0.8);
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 80px rgba(23, 37, 84, 0.16),
    0 1px 2px rgba(16, 24, 40, 0.06);
  padding: 34px 32px 32px;
  backdrop-filter: blur(8px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #6d8ff5 45%, #12a594 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.auth-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(150deg, #16223f 0%, var(--sidebar) 55%, var(--accent-deep) 130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(13, 21, 42, 0.4);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: #111827;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.auth-brand small {
  color: var(--muted);
  margin-top: 2px;
}

.auth-heading {
  margin-bottom: 22px;
}

.auth-heading h1 {
  margin-bottom: 8px;
}

.auth-heading p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.auth-fields {
  display: grid;
  gap: 14px;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
}

.auth-submit {
  margin-top: 20px;
  min-height: 42px;
  font-size: 14.5px;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
}

.auth-footnote {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  text-align: center;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-height: 780px) and (min-width: 921px) {
  body {
    font-size: 13px;
  }

  .main {
    padding-top: 16px;
    padding-bottom: 26px;
  }

  .page-head {
    margin-bottom: 14px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    margin-bottom: 10px;
  }

  .panel {
    padding: 14px;
    margin-bottom: 14px;
  }

  .metric {
    padding: 11px 12px;
  }

  .metric .value {
    font-size: 24px;
  }

  th,
  td {
    padding-top: 7px;
    padding-bottom: 7px;
  }
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .drive-list-head,
  .drive-file-row {
    grid-template-columns: minmax(240px, 1fr) 88px 100px 160px 44px;
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .jobs-command-bar {
    grid-template-columns: 1fr;
  }

  .jobs-primary-actions,
  .export-actions {
    justify-content: flex-start;
  }

  .export-actions {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .metrics,
  .grid-2,
  .form-grid,
  .settings-groups,
  .wizard-steps,
  .wizard-summary-grid {
    grid-template-columns: 1fr;
  }

  .drive-command,
  .drive-dropzone {
    align-items: stretch;
    flex-direction: column;
  }

  .drive-list-head,
  .drive-file-row {
    grid-template-columns: minmax(0, 1fr) 72px 42px;
  }

  .drive-list-head > span:nth-child(3),
  .drive-list-head > span:nth-child(4),
  .drive-file-row > span:nth-child(3),
  .drive-file-row > span:nth-child(4) {
    display: none;
  }

  .main {
    padding: 18px 14px 32px;
  }

  .page-head {
    display: block;
  }

  .view-tabs {
    margin-top: 14px;
  }

  .jobs-command-bar {
    grid-template-columns: 1fr;
  }

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

  .table-meta {
    display: block;
  }

  .wizard-actions,
  .wizard-actions.split {
    align-items: stretch;
    flex-direction: column;
  }

  .description-example {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Rendered Markdown reports (resume, skill gap reports)
   ========================================================================= */

.markdown-body {
  max-width: 920px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 28px 0 10px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.markdown-body h1 {
  font-size: 23px;
}

.markdown-body h2 {
  position: relative;
  padding-bottom: 8px;
  font-size: 18px;
}

.markdown-body h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(43, 92, 230, 0));
}

.markdown-body h3 {
  font-size: 15.5px;
}

.markdown-body h4 {
  font-size: 14px;
}

.markdown-body p {
  margin: 0 0 12px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 14px;
  padding-left: 24px;
}

.markdown-body li {
  margin: 4px 0;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin-bottom: 4px;
}

.markdown-body a {
  color: var(--accent);
  font-weight: 600;
}

.markdown-body hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.markdown-body blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 3px solid var(--accent-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--text-secondary);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.markdown-body pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow-x: auto;
}

.markdown-body pre code {
  padding: 0;
  background: none;
}

.markdown-body table {
  margin: 4px 0 18px;
  border: 1px solid var(--border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.markdown-body th {
  white-space: nowrap;
}

/* Severity badges & demand bars (added by report-visuals.js) */

.md-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.md-badge-high {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.md-badge-medium {
  background: var(--warn-soft);
  border-color: #fed7aa;
  color: var(--warn);
}

.md-badge-low {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.md-meter-cell {
  min-width: 130px;
}

.md-meter {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-3);
  overflow: hidden;
}

.md-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 7px;
  background: linear-gradient(90deg, #5b8bf7 0%, var(--accent) 100%);
  opacity: 0.28;
}

.md-meter-label {
  position: relative;
  padding-left: 10px;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Listing analysis panel: colored highlights for label lead-ins and side notes */

.listing-analysis .markdown-body h3 {
  color: var(--accent-deep);
}

.listing-analysis .markdown-body li > strong:first-child,
.listing-analysis .markdown-body p > strong:first-child {
  color: var(--accent-text);
}

.listing-analysis .markdown-body blockquote {
  background: var(--warn-soft);
  border-left-color: var(--gold);
  color: var(--text);
}

.listing-analysis .markdown-body blockquote strong {
  color: var(--warn);
}

/* While a row menu or status filter is open, let it escape the table frame
   instead of being clipped by the scroll container. */

.table-wrap:has(.file-actions[open]),
.table-wrap:has(.status-filter[open]) {
  overflow: visible;
}
