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

:root {
  --bg: oklch(0.15 0.018 256);
  --bg-deep: oklch(0.11 0.016 256);
  --surface: oklch(0.195 0.02 256);
  --surface-2: oklch(0.23 0.025 256);
  --surface-3: oklch(0.27 0.026 256);
  --text: oklch(0.95 0.015 92);
  --muted: oklch(0.69 0.025 250);
  --subtle: oklch(0.52 0.025 250);
  --line: oklch(0.34 0.026 255 / 0.78);
  --orange: oklch(0.77 0.16 62);
  --orange-strong: oklch(0.67 0.19 48);
  --mint: oklch(0.76 0.12 163);
  --red: oklch(0.69 0.17 24);
  --yellow: oklch(0.8 0.15 93);
  --blue: oklch(0.72 0.12 220);
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 18px 60px oklch(0.04 0.02 250 / 0.32);
  --font-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg-deep); }
body { margin: 0; background: radial-gradient(circle at 72% -5%, oklch(0.3 0.045 242 / 0.3), transparent 34rem), var(--bg); color: var(--text); font: 14px/1.55 var(--font-sans); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px; background: linear-gradient(180deg, oklch(0.18 0.02 256), oklch(0.135 0.017 256)); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 12px 44px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--bg-deep); background: var(--orange); font: 700 15px var(--font-display); transform: rotate(-8deg); }
.brand-copy strong { display: block; font: 700 16px var(--font-display); letter-spacing: -.04em; }
.brand-copy span { display: block; margin-top: 1px; color: var(--subtle); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.nav-label { margin: 0 12px 10px; color: var(--subtle); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border: 1px solid transparent; border-radius: 12px; color: var(--muted); transition: 180ms ease; }
.nav-item:hover, .nav-item.is-active { color: var(--text); background: oklch(0.27 0.03 256 / .72); border-color: var(--line); }
.nav-item.is-active { box-shadow: inset 3px 0 0 var(--orange); }
.nav-icon { width: 22px; color: var(--orange); font-size: 16px; text-align: center; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; }
.sidebar-foot strong { display: block; margin-bottom: 4px; color: var(--muted); }
.data-mode { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--yellow); font-size: 11px; }
.data-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in oklab, currentColor 12%, transparent); }
.mode-live { color: var(--mint); }

.main { min-width: 0; padding: 28px clamp(20px, 4vw, 54px) 56px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 700 clamp(26px, 3vw, 38px)/1.1 var(--font-display); letter-spacing: -.055em; }
h2 { margin-bottom: 6px; font: 600 22px/1.2 var(--font-display); letter-spacing: -.04em; }
h3 { margin-bottom: 5px; font: 600 16px/1.25 var(--font-display); letter-spacing: -.02em; }
.lede { max-width: 740px; margin-bottom: 0; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--orange); font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: linear-gradient(145deg, oklch(0.22 0.024 256 / .94), oklch(0.18 0.02 256 / .94)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px oklch(0.04 0.02 250 / .16); }
.card-pad { padding: 20px; }
.stat-card { min-height: 132px; padding: 18px 19px; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; width: 130px; height: 130px; top: -72px; right: -55px; border-radius: 50%; background: color-mix(in oklab, var(--stat-color, var(--orange)) 12%, transparent); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { margin: 8px 0 2px; font: 700 30px var(--font-display); letter-spacing: -.06em; }
.stat-note { color: var(--subtle); font-size: 11px; }
.stat-accent { color: var(--stat-color, var(--orange)); }

.hero-card { min-width: 0; padding: 24px; display: flex; justify-content: space-between; gap: 26px; align-items: flex-end; background: linear-gradient(135deg, oklch(0.27 0.035 248), oklch(0.205 0.022 256)); overflow: hidden; position: relative; }
.hero-card::before { content: ''; width: 260px; height: 260px; position: absolute; right: -50px; top: -100px; border: 1px solid oklch(0.78 0.16 62 / .18); border-radius: 50%; box-shadow: 0 0 0 32px oklch(0.78 0.16 62 / .05), 0 0 0 64px oklch(0.78 0.16 62 / .03); }
.hero-copy { min-width: 0; flex: 1 1 0; position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--mint); font-size: 12px; font-weight: 700; white-space: nowrap; }
.hero-kicker-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px oklch(0.76 0.12 163 / .12); }
.hero-value { min-width: 180px; flex: 0 0 auto; position: relative; z-index: 1; text-align: right; }
.hero-value strong { display: block; font: 700 clamp(42px, 6vw, 68px)/.9 var(--font-display); letter-spacing: -.08em; color: var(--orange); }
.hero-value span { color: var(--muted); font-size: 12px; }
.progress-track { width: 100%; height: 8px; margin-top: 17px; overflow: hidden; border-radius: 20px; background: oklch(0.1 0.01 250 / .65); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-strong), var(--orange)); transition: width 400ms ease; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 30px 0 14px; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.section-head-actions { display: flex; gap: 8px; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.input, .select, .textarea { width: 100%; color: var(--text); background: oklch(0.14 0.016 256 / .75); border: 1px solid var(--line); border-radius: 11px; outline: none; transition: 160ms ease; }
.input, .select { min-height: 42px; padding: 0 13px; }
.textarea { min-height: 118px; padding: 12px 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px oklch(0.77 0.16 62 / .12); }
.search-field { min-width: min(320px, 100%); flex: 1; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill, .tag { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill { border: 1px solid var(--line); color: var(--muted); background: transparent; }
.pill:hover, .pill.is-active { border-color: var(--orange); color: var(--orange); background: oklch(0.77 0.16 62 / .08); }
.tag { background: oklch(0.55 0.03 250 / .12); color: var(--muted); }
.tag-orange { color: var(--orange); background: oklch(0.77 0.16 62 / .11); }
.tag-mint { color: var(--mint); background: oklch(0.76 0.12 163 / .11); }
.tag-danger { color: var(--red); background: oklch(0.69 0.17 24 / .11); }
.tag-warn { color: var(--yellow); background: oklch(0.8 0.15 93 / .11); }
.tag-blue { color: var(--blue); background: oklch(0.72 0.12 220 / .11); }

.btn { min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: var(--surface-2); font-weight: 700; transition: 150ms ease; }
.btn:hover { transform: translateY(-1px); border-color: var(--line); background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn-primary { color: var(--bg-deep); background: var(--orange); }
.btn-primary:hover { background: oklch(0.82 0.15 62); }
.btn-ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.btn-danger { color: #fff5f1; background: oklch(0.48 0.15 24); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.task-list { display: grid; gap: 10px; }
.task-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 14px; background: oklch(0.195 0.02 256 / .78); transition: 180ms ease; cursor: pointer; }
.task-row:hover, .task-row.is-selected { border-color: oklch(0.77 0.16 62 / .55); background: oklch(0.24 0.027 256); transform: translateX(2px); }
.task-code { color: var(--orange); font: 700 12px var(--font-display); letter-spacing: .03em; }
.task-title { margin-bottom: 4px; color: var(--text); font-weight: 700; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 11px; }
.task-status { justify-self: end; }
.task-empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }

.detail-panel { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.detail-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-body { padding-top: 16px; }
.detail-label { margin: 16px 0 6px; color: var(--subtle); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.detail-list { margin: 0; padding-left: 18px; color: var(--muted); }
.detail-list li + li { margin-top: 6px; }
.detail-guidance { margin-top: 2px; }
.detail-callout { padding: 11px 12px; border: 1px solid oklch(0.55 0.03 250 / .3); border-radius: 10px; background: oklch(0.14 0.016 256 / .58); color: var(--muted); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-callout.detail-path { border-color: oklch(0.76 0.12 163 / .28); color: var(--text); }
.detail-callout.detail-exception { border-color: oklch(0.77 0.16 62 / .28); }
.detail-checklist { display: grid; gap: 7px; margin: 0; padding: 11px 12px 11px 30px; border: 1px solid oklch(0.55 0.03 250 / .3); border-radius: 10px; background: oklch(0.14 0.016 256 / .58); color: var(--muted); }
.detail-checklist li::marker { color: var(--mint); }
.detail-acceptance { padding: 12px 13px; border-left: 3px solid var(--mint); border-radius: 0 10px 10px 0; background: oklch(0.76 0.12 163 / .08); color: var(--text); }
.detail-actions { display: flex; gap: 8px; margin-top: 20px; }
.detail-actions .btn { flex: 1; }
.submission-history { display: grid; gap: 8px; }
.history-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: oklch(0.14 0.016 256 / .55); }
.history-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.history-item p { margin: 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--subtle); background: oklch(0.15 0.017 256 / .8); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--text); }
.table-empty { padding: 26px; color: var(--muted); text-align: center; }

.issue-toolbar { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; }
.issue-toolbar .search-field { min-width: 260px; flex: 1 1 auto; margin: 0; }
.issue-page-size-field { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.issue-page-size-field .select { width: auto; min-width: 86px; }
.issue-visible-count { flex: 0 0 auto; color: var(--subtle); font-size: 12px; white-space: nowrap; }
.issue-table-wrap { max-height: min(680px, 66vh); overflow: auto; }
.issue-table-wrap table { min-width: 1120px; }
.issue-table-wrap th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
.issue-table-wrap td { max-width: 240px; }
.issue-id-cell { min-width: 94px; }
.issue-description-cell { min-width: 250px; max-width: 330px !important; }
.issue-description-cell strong { display: -webkit-box; overflow: hidden; color: var(--text); line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.issue-description-cell .field-note { display: block; overflow: hidden; margin-top: 3px; text-overflow: ellipsis; white-space: nowrap; }
.issue-time-cell { min-width: 112px; white-space: nowrap; }
.issue-attachment-cell { min-width: 130px; max-width: 180px !important; }
.issue-attachment-count { display: inline-grid; width: 24px; height: 24px; place-items: center; margin-right: 7px; border-radius: 8px; color: var(--mint); background: oklch(0.76 0.12 163 / .11); font-weight: 700; vertical-align: middle; }
.issue-attachment-name { display: inline-block; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.issue-row-actions { display: flex; align-items: center; gap: 6px; min-width: 164px; }
.issue-row-actions .select { width: 92px; min-height: 34px; padding-inline: 7px; }
.issue-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 40px; padding-top: 12px; }
.issue-pagination .btn { min-width: 36px; min-height: 34px; padding-inline: 9px; font-size: 12px; }
.issue-pagination-note { margin-right: 4px; color: var(--subtle); font-size: 12px; }

.issue-list { display: grid; gap: 9px; }
.issue-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: oklch(0.15 0.017 256 / .55); }
.issue-id { color: var(--orange); font: 700 12px var(--font-display); }
.issue-title { margin-bottom: 3px; color: var(--text); font-weight: 600; }
.issue-sub { color: var(--muted); font-size: 11px; }
.issue-actions { display: flex; gap: 6px; }
.issue-actions select { min-height: 32px; padding: 0 7px; font-size: 11px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 0%, oklch(0.3 0.05 240 / .35), transparent 30rem), var(--bg-deep); }
.login-card { width: min(440px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, oklch(0.22 0.025 256), oklch(0.16 0.018 256)); box-shadow: var(--shadow); }
.login-brand { margin-bottom: 26px; }
.login-card h1 { font-size: 30px; }
.login-card .lede { margin-bottom: 24px; font-size: 13px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 600; }
.field-note { margin-top: -8px; color: var(--subtle); font-size: 11px; }
.login-foot { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; background: oklch(0.04 0.015 250 / .75); backdrop-filter: blur(10px); z-index: 60; }
.modal { width: min(560px, 100%); max-height: min(720px, calc(100vh - 36px)); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); animation: fadeIn 220ms ease-out; }
.modal-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; }
.close:hover { color: var(--text); border-color: var(--orange); }
.upload-box { padding: 16px; border: 1px dashed oklch(0.77 0.16 62 / .45); border-radius: 12px; background: oklch(0.77 0.16 62 / .06); }
.upload-box input { display: block; width: 100%; margin: 0; margin-bottom: 8px; color: var(--muted); }
.upload-box .field-note { margin-top: 0; }
.upload-list { display: grid; gap: 6px; margin-top: 9px; }
.upload-file { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.import-modal { width: min(680px, 100%); }
.user-progress-table { min-width: 0; }
.user-review-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review-modal { width: min(860px, 100%); }
.review-toolbar { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; }
.review-toolbar .search-field { min-width: 220px; flex: 1 1 auto; margin: 0; }
.review-toolbar .select { width: auto; min-width: 120px; }
.review-list { display: grid; gap: 8px; }
.review-item { padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: oklch(0.14 0.016 256 / .55); }
.review-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.review-item-head strong { display: block; color: var(--text); }
.review-item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.review-item-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.review-item-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.review-item-body p { margin: 0 0 8px; color: var(--muted); font-size: 12px; white-space: pre-wrap; }
.review-evidence { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.review-thumb { width: 110px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.import-guide { display: grid; gap: 7px; margin-bottom: 18px; padding: 13px 14px; border: 1px solid oklch(0.76 0.12 163 / .22); border-radius: 12px; background: oklch(0.76 0.12 163 / .06); color: var(--muted); font-size: 12px; }
.import-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.import-guide strong { color: var(--mint); font-size: 12px; }
.btn-small { padding: 7px 10px; font-size: 11px; }
.import-guide code { display: block; overflow: auto; padding: 7px 9px; border-radius: 7px; background: oklch(0.1 0.01 250 / .62); color: var(--text); font: 11px/1.4 'JetBrains Mono', 'SFMono-Regular', monospace; white-space: nowrap; }
.import-guide small { color: var(--subtle); font-size: 11px; }
.file-input { padding-top: 9px; padding-bottom: 9px; }
.import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.import-summary-card { padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: oklch(0.14 0.016 256 / .58); }
.import-summary-card strong { display: block; color: var(--text); font: 700 20px var(--font-display); }
.import-summary-card span { color: var(--subtle); font-size: 10px; }
.import-summary-card.is-good strong { color: var(--mint); }
.import-summary-card.is-warn strong { color: var(--yellow); }
.import-summary-card.is-danger strong { color: var(--red); }
.import-preview { max-height: 210px; overflow: auto; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 11px; }
.import-preview:empty { display: none; }
.import-preview table { min-width: 0; }
.import-preview th, .import-preview td { padding: 9px 10px; font-size: 11px; }
.import-preview th { position: sticky; top: 0; z-index: 1; }
.import-row-invalid td { color: var(--red); }
.import-row-duplicate td { color: var(--yellow); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { max-width: min(380px, calc(100vw - 40px)); padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: 220ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-color: oklch(0.76 0.12 163 / .55); }
.toast-error { border-color: oklch(0.69 0.17 24 / .55); }

.mobile-menu { display: none; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; }
.tab.is-active { color: var(--text); border-color: var(--orange); background: oklch(0.77 0.16 62 / .08); }
.matrix { display: grid; gap: 8px; }
.matrix-row { display: grid; grid-template-columns: 170px repeat(7, minmax(34px, 1fr)); gap: 5px; align-items: center; }
.matrix-cell { min-height: 34px; display: grid; place-items: center; border-radius: 7px; background: oklch(0.14 0.016 256 / .7); color: var(--subtle); font-size: 11px; }
.matrix-cell.head { background: transparent; color: var(--subtle); font-weight: 700; }
.matrix-cell.user { justify-content: start; padding-left: 9px; color: var(--text); font-weight: 600; }
.matrix-cell.is-pass { background: oklch(0.76 0.12 163 / .15); color: var(--mint); }
.matrix-cell.is-fail { background: oklch(0.69 0.17 24 / .15); color: var(--red); }
.matrix-cell.is-pending { background: oklch(0.55 0.03 250 / .11); color: var(--subtle); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { justify-content: center; margin-inline: 0; }
  .brand-copy, .nav-label, .nav-item span:not(.nav-icon), .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-icon { width: auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .main { padding: 20px 16px 42px; }
  .topbar { align-items: center; }
  .topbar-actions { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-card { align-items: flex-start; flex-direction: column; }
  .hero-value { width: 100%; min-width: 0; text-align: left; }
  .detail-panel { position: static; max-height: none; }
  .matrix { overflow: auto; }
}

@media (max-width: 620px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; height: auto; min-height: 62px; padding: 10px 14px; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-list { display: flex; gap: 5px; }
  .nav-item { min-height: 38px; min-width: 38px; }
  .nav-item span:not(.nav-icon) { display: none; }
  .nav-icon { font-size: 14px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { min-height: 110px; padding: 13px; }
  .stat-value { font-size: 25px; }
  .task-row { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .task-status { grid-column: 2; justify-self: start; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-head-actions { width: 100%; flex-wrap: wrap; }
  .section-head-actions .btn { flex: 1; }
  .section-head-actions .input { flex: 1 1 180px; max-width: none !important; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 0; }
  .detail-actions { flex-direction: column; }
  .issue-row { grid-template-columns: 1fr; }
  .issue-actions { justify-content: stretch; }
  .issue-actions select, .issue-actions .btn { flex: 1; }
  .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .issue-toolbar { align-items: stretch; flex-wrap: wrap; }
  .issue-toolbar .search-field { min-width: 100%; }
  .issue-page-size-field { flex: 1; justify-content: space-between; }
  .issue-visible-count { align-self: center; margin-left: auto; }
  .issue-pagination { justify-content: flex-start; overflow: auto; }
}
