:root {
    --ink:#172733;
    --muted:#64747d;
    --border:#dde4e6;
    --canvas:#f3f6f6;
    --panel:#fff;
    --nav:#102c35;
    --accent:#137b72;
    --accent-dark:#08635d;
    --teal-light:#e9f5f1;
    --amber:#976019;
    --danger:#af3440;
    --radius:13px;
    --shadow:0 3px 18px rgba(23,39,51,.025);
}
* {
    box-sizing:border-box;
}
body {
    margin:0;
    background:var(--canvas);
    color:var(--ink);
    font:14px/1.55 "Segoe UI",Arial,sans-serif;
}
a {
    color:var(--accent);
    text-decoration:none;
}
a:hover {
    text-decoration:underline;
}
button,input,select,textarea {
    font:inherit;
}
button,a,input,select,textarea {
    touch-action:manipulation;
}
button {
    cursor:pointer;
}
button:disabled {
    cursor:not-allowed;
    opacity:.52;
}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
    outline:3px solid #49a99c;
    outline-offset:3px;
}
input,select,textarea {
    width:100%;
    padding:11px 12px;
    border:1px solid #cdd8db;
    border-radius:7px;
    background:white;
    color:var(--ink);
    min-height:43px;
}
input:focus,select:focus,textarea:focus {
    border-color:var(--accent);
}
input[type=checkbox] {
    width:17px;
    height:17px;
    min-height:17px;
    accent-color:var(--accent);
    flex-shrink:0;
}
textarea {
    resize:vertical;
}
label,.field-label {
    display:block;
    font-size:12px;
    font-weight:650;
    letter-spacing:.01em;
    margin-bottom:7px;
}
h1,h2,h3,p {
    margin-top:0;
}
h1 {
    font-size:30px;
    line-height:1.24;
    letter-spacing:-1px;
    margin-bottom:10px;
    font-weight:650;
}
h2 {
    font-size:17px;
    line-height:1.4;
    letter-spacing:-.35px;
    margin-bottom:0;
    font-weight:650;
}
h3 {
    font-size:14px;
    margin-bottom:8px;
}
p {
    margin-bottom:12px;
}
small {
    font-size:12px;
}
pre {
    font-family:Consolas,"Courier New",monospace;
    font-size:12px;
    line-height:1.65;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    margin:0;
}
fieldset {
    border:0;
    padding:0;
    margin:0;
    min-width:0;
}
[hidden] {
    display:none!important;
}
.sidebar {
    width:236px;
    position:fixed;
    inset:0 auto 0 0;
    background:var(--nav);
    color:#dce9eb;
    padding:31px 22px;
    display:flex;
    flex-direction:column;
    z-index:10;
}
.brand {
    display:flex;
    align-items:center;
    gap:12px;
    color:inherit;
    font-size:22px;
    font-weight:700;
    letter-spacing:-.6px;
    text-decoration:none!important;
}
.brand small {
    font-size:8px;
    letter-spacing:2px;
    display:block;
    font-weight:600;
    opacity:.65;
    margin-top:2px;
}
.brand-name {
    font-size:17px;
    letter-spacing:-.5px;
    white-space:nowrap;
}
.brand-mark {
    height:39px;
    min-width:39px;
    border:1px solid #4f7c7a;
    background:#21494d;
    border-radius:10px;
    text-align:center;
    position:relative;
    color:#bde8dc;
    line-height:37px;
    font-weight:700;
    font-size:25px;
}
.brand-mark span {
    font-size:15px;
    position:absolute;
    right:3px;
    top:-10px;
}
.nav-heading {
    font-size:9px;
    letter-spacing:1.7px;
    color:#819fa4;
    font-weight:650;
    margin:48px 11px 14px;
}
.sidebar nav {
    display:grid;
    gap:7px;
}
.sidebar nav a {
    color:#b2c7ca;
    padding:11px 12px;
    border-radius:7px;
    font-weight:500;
    font-size:12px;
    display:flex;
    gap:11px;
    align-items:center;
    line-height:1.5;
}
.sidebar nav a span {
    font-size:20px;
    width:20px;
    line-height:1;
}
.sidebar nav a:hover {
    background:#21414a;
    color:white;
    text-decoration:none;
}
.sidebar nav a.active {
    background:#244b51;
    color:#e2f4ed;
}
.sidebar-note {
    margin-top:auto;
    padding:28px 10px 12px;
    font-size:11px;
    color:#a7bfc3;
}
.sidebar-note strong {
    color:#cee3df;
    font-size:11px;
    font-weight:600;
}
.sidebar-note p {
    margin:7px 0 0;
    line-height:1.8;
}
.privacy-dot {
    display:inline-block;
    width:6px;
    height:6px;
    background:#78c5a9;
    border-radius:50%;
    margin-right:7px;
}
.sidebar-logout {
    background:transparent;
    border:0;
    color:#a7bfc3;
    font-size:11px;
    padding:14px 10px;
    width:100%;
    text-align:left;
    border-top:1px solid #2a4851;
    margin-top:10px;
}
.workspace {
    margin-left:236px;
    min-height:100vh;
    display:flex;
    flex-direction:column;
}
.topbar {
    height:72px;
    border-bottom:1px solid var(--border);
    background:rgba(255,255,255,.77);
    padding:0 38px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-size:11px;
    color:var(--muted);
}
.topbar strong {
    font-weight:500;
    color:var(--ink);
}
.topbar-divider {
    margin:0 14px;
    color:#b3bfc3;
}
.operator {
    display:flex;
    align-items:center;
    gap:9px;
}
.operator-avatar {
    display:grid;
    place-items:center;
    width:29px;
    height:29px;
    background:#e4eceb;
    border:1px solid #d7e3e1;
    border-radius:50%;
    font-size:9px;
    font-weight:700;
    color:#45665f;
}
main {
    padding:35px 38px;
    flex:1;
    width:100%;
    max-width:1740px;
    margin:0 auto;
}
main:focus {
    outline:none;
}
.page-heading {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:22px;
    margin-bottom:29px;
}
.page-heading p {
    color:var(--muted);
    font-size:12px;
    margin:0;
}
.eyebrow {
    display:block;
    font-size:9px;
    color:var(--accent);
    letter-spacing:1.7px;
    font-weight:750;
    margin-bottom:11px;
}
.page-footer {
    display:flex;
    justify-content:space-between;
    padding:0 38px 24px;
    color:#7d8c92;
    font-size:10px;
    gap:20px;
}
.button {
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:9px;
    padding:10px 16px;
    border:1px solid transparent;
    border-radius:7px;
    font-size:12px;
    font-weight:600;
    min-height:40px;
    line-height:1.35;
    white-space:nowrap;
    text-decoration:none!important;
    transition:background-color .12s;
}
.button.primary {
    background:var(--accent);
    color:white;
    border-color:var(--accent);
}
.button.primary:hover {
    background:var(--accent-dark);
    border-color:var(--accent-dark);
}
.button.secondary {
    background:white;
    color:var(--ink);
    border-color:#cfdadc;
}
.button.secondary:hover {
    background:#f1f7f6;
    border-color:#9bbab4;
}
.button.ghost {
    background:transparent;
    color:var(--muted);
}
.button.ghost:hover {
    background:#eaf1ef;
}
.button.light {
    background:#d6eae2;
    color:#16443a;
}
.button.small {
    min-height:32px;
    font-size:11px;
    padding:7px 12px;
}
.button.full {
    width:100%;
}
.button.danger {
    color:var(--danger);
    background:#fbf0f0;
    border-color:#f0d0d4;
}
.button-group {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.text-link {
    font-size:11px;
    font-weight:600;
}
.back-link {
    display:inline-block;
    font-size:11px;
    margin-bottom:19px;
}
.panel {
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    margin-bottom:22px;
    overflow:hidden;
}
.panel-heading {
    padding:23px 25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
}
.panel-heading .eyebrow {
    margin-bottom:6px;
}
.panel-heading.compact {
    padding-top:18px;
    padding-bottom:18px;
}
.panel-heading select {
    width:auto;
    max-width:220px;
    font-size:11px;
    min-height:34px;
    padding:6px 10px;
}
.panel-note {
    padding:16px 25px;
    color:var(--muted);
    font-size:11px;
    line-height:1.7;
    border-top:1px solid #edf0f1;
    margin:0;
    background:#fcfdfd;
}
.metrics {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    margin-bottom:23px;
}
.metric-card {
    background:white;
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:22px 23px;
    box-shadow:var(--shadow);
    min-width:0;
}
.metric-card>span {
    color:var(--muted);
    font-size:11px;
    display:block;
}
.metric-card strong {
    display:block;
    font-size:34px;
    font-weight:650;
    line-height:1.5;
    letter-spacing:-1.4px;
    margin:2px 0;
}
.metric-card small {
    display:block;
    color:#829096;
    font-size:10px;
}
.metric-card:nth-child(3) strong {
    color:var(--amber);
}
.metric-card:nth-child(4) strong {
    color:var(--danger);
}
.overview-grid {
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);
    gap:22px;
}
.performance-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    padding:16px 25px 30px;
}
.performance-grid>div+div {
    padding-left:21px;
    border-left:1px solid var(--border);
}
.performance-grid span {
    font-size:10px;
    color:var(--muted);
    display:block;
}
.performance-grid strong {
    font-size:25px;
    letter-spacing:-1px;
    font-weight:600;
    display:block;
    margin-top:8px;
}
.review-callout {
    background:#dcebe4;
    border:1px solid #cdddce;
    border-radius:var(--radius);
    padding:24px 28px;
    margin-bottom:22px;
    position:relative;
}
.review-callout h2 {
    font-size:22px;
    line-height:1.3;
    margin-bottom:11px;
}
.review-callout p {
    font-size:11px;
    color:#527063;
    max-width:290px;
    margin-bottom:20px;
}
.badge {
    display:inline-flex;
    align-items:center;
    border-radius:5px;
    padding:4px 8px;
    font-size:10px;
    line-height:1.35;
    font-weight:600;
    letter-spacing:0;
    white-space:nowrap;
    vertical-align:middle;
}
.badge.neutral {
    background:#edf2f4;
    color:#61717b;
}
.badge.success {
    background:#e8f4ed;
    color:#317851;
}
.badge.warning {
    background:#fff2d9;
    color:#98631a;
}
.badge.pending {
    background:#e8f0fa;
    color:#3d6c9d;
}
.badge.error {
    background:#fbecee;
    color:#ad4150;
}
.notice {
    background:#eff6f4;
    border:1px solid #d6e6df;
    border-radius:8px;
    padding:14px 18px;
    font-size:12px;
    margin-bottom:22px;
    color:#366556;
    overflow-wrap:anywhere;
}
.notice.error {
    background:#fdf1f2;
    border-color:#efcdd2;
    color:#923444;
}
.notice.warning {
    background:#fff8e9;
    border-color:#efdfb7;
    color:#886327;
}
.validation-summary-valid {
    display:none;
}
.muted {
    color:var(--muted);
}
.optional {
    color:#87969b;
    font-weight:400;
    font-size:10px;
    margin-left:5px;
}
.field-help {
    font-size:11px;
    color:var(--muted);
    line-height:1.65;
    margin:7px 0 0;
}
.field-error {
    font-size:11px;
    color:var(--danger);
}
.form-stack {
    display:grid;
    gap:20px;
    padding:0 25px 25px;
}
.check-label {
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    font-size:11px;
    font-weight:500;
}
.table-wrap {
    overflow-x:auto;
    width:100%;
    scrollbar-width:thin;
}
table {
    width:100%;
    border-collapse:collapse;
    text-align:left;
    white-space:nowrap;
}
th {
    background:#f7f9fa;
    border-top:1px solid #eaf0f2;
    border-bottom:1px solid #e5ebed;
    font-weight:600;
    color:#71818a;
    font-size:9px;
    letter-spacing:.45px;
    text-transform:uppercase;
    padding:12px 18px;
}
td {
    padding:15px 18px;
    border-bottom:1px solid #edf1f2;
    font-size:11px;
    color:#4d5e68;
}
tr:last-child td {
    border-bottom:0;
}
td strong {
    font-weight:600;
    color:var(--ink);
}
.job-cell {
    display:flex;
    align-items:center;
    gap:11px;
}
.job-thumb {
    width:36px;
    height:42px;
    object-fit:cover;
    border:1px solid #e0e5e6;
    border-radius:4px;
    background:#f0f3f3;
}
.job-cell a {
    font-weight:650;
    font-family:Consolas,monospace;
    font-size:11px;
    color:#255a59;
}
.cell-secondary {
    font-size:9px;
    color:#90a0a6;
    display:block;
    margin-top:2px;
}
.confidence {
    display:flex;
    align-items:center;
    gap:6px;
}
.confidence-bar {
    width:35px;
    height:4px;
    background:#edf0f0;
    border-radius:3px;
    overflow:hidden;
}
.confidence-bar span {
    display:block;
    height:100%;
    background:#63a695;
}
.confidence.low .confidence-bar span {
    background:#d4a64c;
}
.empty-state {
    text-align:center;
    padding:47px 30px;
    max-width:470px;
    margin:0 auto;
}
.empty-state h3 {
    font-size:16px;
}
.empty-state p {
    font-size:12px;
    color:var(--muted);
    line-height:1.75;
}
.empty-icon {
    display:grid;
    place-items:center;
    width:49px;
    height:49px;
    background:var(--teal-light);
    color:var(--accent);
    border-radius:13px;
    margin:0 auto 16px;
    font-size:25px;
}
.empty-note,.loading {
    padding:26px;
    color:var(--muted);
    font-size:12px;
    margin:0;
}
.loading::before {
    content:"";
    display:inline-block;
    width:11px;
    height:11px;
    border:2px solid #d7e6e1;
    border-top-color:var(--accent);
    border-radius:50%;
    margin-right:10px;
    vertical-align:-2px;
    animation:spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform:rotate(360deg);
    }
}
.upload-grid {
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);
    gap:22px;
}
.upload-panel {
    align-self:start;
}
.drop-zone {
    margin:0 25px 25px;
    min-height:350px;
    border:1.5px dashed #b6c9c9;
    border-radius:10px;
    background:#f8fbfa;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:32px;
    transition:background .15s;
}
.drop-zone.drag-over {
    background:#e4f4ed;
    border-color:var(--accent);
}
.upload-glyph {
    width:60px;
    height:60px;
    background:#e5f0eb;
    border:1px solid #d2e4db;
    border-radius:15px;
    font-size:35px;
    line-height:55px;
    color:var(--accent);
    margin-bottom:19px;
}
.drop-zone h3 {
    font-size:18px;
    font-weight:600;
    letter-spacing:-.35px;
    margin-bottom:5px;
}
.drop-zone p {
    font-size:12px;
    color:var(--muted);
    margin-bottom:18px;
}
.drop-zone small {
    font-size:10px;
    color:#86979b;
    display:block;
    margin-top:19px;
}
.file-button {
    position:relative;
    overflow:hidden;
    cursor:pointer;
}
.file-button input {
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
    min-height:0;
}
.file-button:focus-within {
    outline:3px solid #49a99c;
    outline-offset:3px;
}
.image-preview {
    padding:0 25px 25px;
}
.preview-canvas {
    height:365px;
    border-radius:8px;
    background:#edf1f0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
.preview-canvas img {
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}
.file-info {
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:space-between;
    margin-top:16px;
    min-width:0;
}
.file-info>div {
    min-width:0;
}
.file-info strong {
    font-size:12px;
    display:block;
    overflow-wrap:anywhere;
}
.file-info small {
    font-size:10px;
    color:var(--muted);
    display:block;
    margin-top:3px;
}
.tips {
    padding:6px 10px;
    font-size:11px;
    color:var(--muted);
}
.tips .eyebrow {
    font-size:9px;
}
.tips ul {
    padding-left:17px;
    margin:14px 0;
    display:grid;
    gap:8px;
}
.tips p {
    border-top:1px solid #dce5e4;
    padding-top:13px;
    line-height:1.8;
    font-size:10px;
}
.job-progress>p {
    padding:0 25px;
    color:var(--muted);
    font-size:12px;
}
.job-progress>.text-link {
    display:inline-block;
    margin:18px 25px;
}
.progress-track {
    height:5px;
    background:#e6eeeb;
    margin:22px 25px;
    border-radius:4px;
    overflow:hidden;
}
.progress-track span {
    height:100%;
    display:block;
    background:var(--accent);
    width:10%;
    transition:width .4s;
}
.filters {
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    align-items:flex-end;
    padding:23px 25px;
    border-bottom:1px solid var(--border);
    background:#fcfdfd;
}
.filters>div {
    flex:1;
    min-width:115px;
}
.filters label {
    font-size:10px;
}
.filters input,.filters select {
    min-height:36px;
    font-size:11px;
    padding:7px 8px;
}
.filters .check-label {
    padding-bottom:9px;
}
.filters .button {
    min-height:36px;
    padding:8px 12px;
    font-size:11px;
}
.pagination {
    padding:20px 25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    border-top:1px solid var(--border);
    font-size:11px;
    color:var(--muted);
}
.pagination>div {
    display:flex;
    gap:8px;
}
.job-id {
    font-family:Consolas,monospace;
    overflow-wrap:anywhere;
}
.compact-metrics .metric-card {
    padding:17px 20px;
}
.compact-metrics .metric-card strong {
    font-size:27px;
}
.compact-metrics .metric-card:nth-child(3) strong,.compact-metrics .metric-card:nth-child(4) strong {
    color:var(--ink);
}
.result-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);
    gap:22px;
    align-items:start;
}
.image-stage {
    height:390px;
    background:#edf1f1;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 24px 24px;
    border-radius:8px;
    overflow:hidden;
}
.image-stage a {
    display:flex;
    width:100%;
    height:100%;
    align-items:center;
    justify-content:center;
}
.image-stage img {
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}
.result-heading {
    font-size:14px;
    font-weight:600;
    padding:0 25px 15px;
    margin:0;
}
.confidence-breakdown {
    display:flex;
    gap:16px;
    flex-wrap:wrap;
    padding:18px 25px;
    border-top:1px solid #eaf0f1;
    font-size:10px;
}
.confidence-breakdown>div {
    min-width:65px;
    flex:1;
    color:var(--muted);
}
.confidence-breakdown strong {
    font-size:16px;
    display:block;
    color:var(--ink);
    margin-top:3px;
}
.validation-messages {
    padding:0 25px;
    font-size:11px;
    color:#916325;
}
.validation-messages ul {
    padding-left:15px;
}
.text-columns {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    padding:0 25px 25px;
}
.text-columns h3 {
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.5px;
    color:var(--muted);
}
.text-output {
    min-height:100px;
    background:#f7f9f9;
    border:1px solid #e6eced;
    padding:15px;
    border-radius:7px;
    max-height:320px;
    overflow:auto;
    font-size:12px;
}
.tabs {
    display:flex;
    overflow-x:auto;
    border-bottom:1px solid var(--border);
    padding:0 25px;
    gap:23px;
}
.tabs button {
    border:0;
    background:transparent;
    color:var(--muted);
    font-size:11px;
    padding:10px 0 13px;
    border-bottom:2px solid transparent;
    white-space:nowrap;
}
.tabs button[aria-selected=true] {
    color:var(--accent);
    border-bottom-color:var(--accent);
    font-weight:650;
}
.tab-panel {
    padding:22px 25px;
    max-height:540px;
    overflow:auto;
    background:#fcfdfd;
}
.tab-panel pre {
    font-size:11px;
    color:#355867;
}
.log-item {
    display:grid;
    grid-template-columns:140px 1fr 70px;
    gap:15px;
    padding:13px 0;
    border-bottom:1px solid var(--border);
    font-size:11px;
}
.log-item:last-child {
    border:0;
}
.log-item span:last-child {
    text-align:right;
    color:var(--muted);
}
.review-grid {
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(390px,1fr);
    gap:22px;
    align-items:start;
}
.review-image-panel {
    position:sticky;
    top:20px;
}
.zoom-controls {
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 25px 15px;
    font-size:10px;
}
.zoom-controls .text-link {
    margin-left:auto;
}
.review-image-stage {
    height:530px;
    background:#eaf0ef;
    overflow:auto;
    margin:0 20px 20px;
    border-radius:8px;
    text-align:center;
}
.review-image-stage img {
    display:block;
    width:100%;
    height:auto;
    max-width:none;
    object-fit:contain;
}
.review-table {
    table-layout:fixed;
}
.review-table th:first-child {
    width:50px;
}
.review-table th:last-child {
    width:50px;
}
.review-table td {
    padding:10px 8px;
}
.review-table th {
    padding:10px 8px;
}
.review-table td:first-child {
    text-align:center;
}
.review-table input {
    padding:9px;
    font-size:12px;
    min-height:37px;
}
.review-table .remove-row {
    border:0;
    border-radius:5px;
    color:#a9535a;
    background:transparent;
    width:30px;
    height:32px;
    font-size:19px;
}
.review-table .remove-row:hover {
    background:#fbecef;
}
.predicted-hint {
    display:block;
    color:#91a0a3;
    font-size:9px;
    margin:4px 2px;
    white-space:normal;
}
.review-totals {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    padding:22px 25px;
    background:#f9fbfa;
    border-top:1px solid var(--border);
    border-bottom:1px solid var(--border);
}
.review-totals output {
    font-size:25px;
    font-weight:600;
    display:block;
    line-height:1.6;
}
.review-notes {
    padding-top:23px;
}
.disclosure summary {
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    padding:20px 25px;
}
.json-output {
    background:#f7faf9;
    padding:20px 25px;
    max-height:500px;
    overflow:auto;
}
.debug-gallery {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
}
.debug-card {
    background:white;
    border:1px solid var(--border);
    border-radius:var(--radius);
    margin-bottom:22px;
    overflow:hidden;
}
.debug-card .debug-image {
    height:270px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#e9eeed;
}
.debug-card img {
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}
.debug-card>div:last-child {
    padding:16px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-size:11px;
}
.dataset-grid {
    display:grid;
    grid-template-columns:minmax(300px,1fr) minmax(0,1.6fr);
    gap:22px;
    align-items:start;
}
.code-input {
    font-family:Consolas,monospace;
    font-size:11px;
    line-height:1.65;
}
.evaluation-metrics {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:5px 25px 25px;
    gap:20px;
}
.evaluation-metrics>div {
    padding:16px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#f8fbfa;
}
.evaluation-metrics span {
    color:var(--muted);
    font-size:10px;
}
.evaluation-metrics strong {
    display:block;
    font-size:25px;
    font-weight:600;
    color:var(--accent);
    margin-top:8px;
}
.evaluation-metrics>div:first-child {
    background:#eaf5ef;
    border-color:#d0e7db;
}
.toast {
    position:fixed;
    bottom:25px;
    right:25px;
    background:#163e35;
    color:white;
    padding:15px 23px;
    box-shadow:0 8px 25px #183b3025;
    border:1px solid #396257;
    border-radius:9px;
    max-width:min(420px,calc(100vw - 36px));
    font-size:12px;
    z-index:100;
}
.toast.error {
    background:#7d303e;
    border-color:#a15463;
}
.login-body {
    background:#eaf0ee;
}
.login-wrap {
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
}
.login-wrap main {
    padding:32px 20px;
    max-width:490px;
    flex:initial;
}
.login-card {
    background:white;
    border:1px solid #d9e3df;
    border-radius:18px;
    padding:40px;
    box-shadow:0 16px 60px #123b3010;
}
.login-card .brand {
    margin-bottom:42px;
    color:var(--nav);
}
.login-card .eyebrow {
    font-size:8px;
}
.login-card h1 {
    font-size:35px;
    line-height:1.22;
    margin:13px 0;
}
.login-card .intro {
    font-size:12px;
    color:var(--muted);
    line-height:1.8;
    margin-bottom:28px;
}
.login-card form .button {
    margin-top:23px;
}
.login-foot {
    font-size:9px;
    text-align:center;
    color:#84958f;
    border-top:1px solid var(--border);
    padding-top:24px;
    margin:28px 0 0;
}
.sr-only {
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
}
.skip-link {
    position:fixed;
    left:16px;
    top:-60px;
    z-index:1000;
    background:white;
    color:var(--ink);
    padding:12px 18px;
    border-radius:5px;
}
.skip-link:focus {
    top:12px;
}
@media(min-width:1600px) {
    main {
        padding-top:42px;
    }
    .page-heading {
        margin-bottom:35px;
    }
}
@media(max-width:1250px) {
    .sidebar {
        width:215px;
        padding-left:17px;
        padding-right:17px;
    }
    .workspace {
        margin-left:215px;
    }
    main {
        padding:28px;
    }
    .topbar {
        padding:0 28px;
    }
    .page-footer {
        padding-left:28px;
        padding-right:28px;
    }
    .overview-grid {
        grid-template-columns:1.4fr 1fr;
    }
    .performance-grid {
        grid-template-columns:1fr 1fr;
        gap:22px;
    }
    .performance-grid>div+div {
        padding-left:0;
        border:0;
    }
    .upload-grid {
        grid-template-columns:minmax(0,1.3fr) minmax(290px,1fr);
    }
    .review-grid {
        grid-template-columns:1fr 1fr;
    }
    .debug-gallery {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .dataset-grid {
        grid-template-columns:minmax(300px,1fr) minmax(0,1.25fr);
    }
    .evaluation-metrics {
        grid-template-columns:repeat(2,1fr);
    }
}
@media(max-width:1050px) {
    .sidebar .brand-name {
        font-size:15px;
    }
    .sidebar {
        width:193px;
        padding-left:13px;
        padding-right:13px;
    }
    .sidebar .brand {
        font-size:20px;
        gap:9px;
    }
    .brand small {
        font-size:7px;
    }
    .sidebar nav a {
        font-size:11px;
        padding:11px 8px;
        gap:8px;
    }
    .workspace {
        margin-left:193px;
    }
    .page-heading {
        align-items:flex-start;
    }
    .page-heading h1 {
        font-size:27px;
    }
    .page-heading .button {
        font-size:11px;
    }
    .metrics {
        gap:10px;
    }
    .metric-card {
        padding:17px;
    }
    .metric-card strong {
        font-size:29px;
    }
    .overview-grid,.result-grid,.review-grid,.dataset-grid {
        grid-template-columns:1fr;
    }
    .review-callout h2 br {
        display:none;
    }
    .review-callout p {
        max-width:none;
    }
    .review-image-panel {
        position:static;
    }
    .review-image-stage {
        height:400px;
    }
    .upload-grid {
        grid-template-columns:1fr;
    }
    .upload-options {
        display:grid;
        grid-template-columns:1.2fr 1fr;
        gap:15px;
    }
    .tips {
        padding-top:20px;
    }
    .review-table th:first-child {
        width:65px;
    }
    .review-table th:last-child {
        width:65px;
    }
    .evaluation-metrics {
        grid-template-columns:repeat(3,1fr);
    }
}
@media(max-width:760px) {
    .sidebar {
        position:static;
        width:100%;
        padding:18px 20px 10px;
    }
    .sidebar .brand {
        font-size:21px;
    }
    .sidebar nav {
        display:flex;
        gap:3px;
        overflow-x:auto;
        margin-top:16px;
        padding-bottom:4px;
    }
    .sidebar nav a {
        font-size:10px;
        white-space:nowrap;
        padding:9px 10px;
        gap:6px;
    }
    .sidebar nav a span {
        font-size:15px;
        width:15px;
    }
    .sidebar .nav-heading,.sidebar-note,.logout-form {
        display:none;
    }
    .workspace {
        margin-left:0;
    }
    .topbar {
        height:52px;
        padding:0 20px;
        font-size:10px;
    }
    .topbar-divider {
        margin:0 9px;
    }
    main {
        padding:25px 20px;
    }
    .page-heading {
        gap:17px;
        flex-wrap:wrap;
        margin-bottom:23px;
    }
    .page-heading h1 {
        font-size:27px;
    }
    .page-heading p {
        font-size:11px;
        line-height:1.7;
    }
    .eyebrow {
        font-size:8px;
        margin-bottom:9px;
    }
    .metrics {
        grid-template-columns:repeat(2,1fr);
        gap:12px;
    }
    .metric-card {
        padding:18px;
    }
    .metric-card strong {
        font-size:30px;
    }
    .overview-grid {
        gap:0;
    }
    .performance-grid {
        grid-template-columns:repeat(4,1fr);
        gap:10px;
    }
    .performance-grid span {
        font-size:9px;
    }
    .performance-grid strong {
        font-size:23px;
    }
    .panel-heading {
        padding:19px 20px;
    }
    .panel-note {
        padding:15px 20px;
    }
    .panel-heading h2 {
        font-size:16px;
    }
    .panel-heading select {
        max-width:170px;
        font-size:10px;
    }
    .form-stack {
        padding-left:20px;
        padding-right:20px;
    }
    .upload-options {
        grid-template-columns:1fr;
        gap:0;
    }
    .drop-zone {
        margin:0 20px 20px;
        min-height:300px;
        padding:20px;
    }
    .image-preview {
        padding:0 20px 20px;
    }
    .preview-canvas {
        height:330px;
    }
    .tips {
        padding:2px 10px 20px;
    }
    .page-footer {
        padding:0 20px 22px;
        font-size:9px;
        flex-wrap:wrap;
        gap:5px;
    }
    .filters {
        padding:19px 20px;
    }
    .filters>div {
        min-width:120px;
    }
    .filters .check-label {
        min-width:120px;
    }
    .pagination {
        padding:17px 20px;
    }
    .text-columns {
        grid-template-columns:1fr;
        padding:0 20px 20px;
    }
    .tabs {
        padding:0 20px;
        gap:21px;
    }
    .tab-panel {
        padding:20px;
    }
    .image-stage {
        height:330px;
        margin:0 20px 20px;
    }
    .review-totals {
        padding:20px;
    }
    .debug-gallery {
        gap:15px;
    }
    .debug-card .debug-image {
        height:230px;
    }
    .debug-card>div:last-child {
        padding:12px;
        font-size:10px;
        gap:8px;
    }
    .debug-card .text-link {
        font-size:10px;
    }
    .evaluation-metrics {
        padding:5px 20px 20px;
        gap:12px;
    }
    .evaluation-metrics>div {
        padding:13px;
    }
    .evaluation-metrics strong {
        font-size:23px;
    }
    .log-item {
        grid-template-columns:90px 1fr 50px;
        gap:10px;
        font-size:10px;
    }
}
@media(max-width:440px) {
    main {
        padding:22px 15px;
    }
    .topbar {
        padding:0 15px;
    }
    .operator {
        font-size:0;
    }
    .operator-avatar {
        font-size:9px;
    }
    .performance-grid {
        grid-template-columns:1fr 1fr;
        gap:20px;
    }
    .metrics {
        gap:10px;
    }
    .metric-card {
        padding:16px;
    }
    .compact-metrics .metric-card {
        padding:15px;
    }
    .metric-card small {
        font-size:9px;
    }
    .page-heading h1 {
        font-size:25px;
    }
    .page-heading .button {
        min-height:37px;
    }
    .debug-gallery {
        grid-template-columns:1fr;
        gap:0;
    }
    .evaluation-metrics {
        grid-template-columns:1fr 1fr;
    }
    .pagination {
        font-size:10px;
        padding:15px;
    }
    .pagination .button {
        padding:7px 9px;
    }
    .panel-heading {
        gap:10px;
    }
    .panel-heading h2 {
        font-size:15px;
    }
    .panel-heading select {
        max-width:140px;
    }
    .review-image-stage {
        height:350px;
    }
    .review-table th:first-child {
        width:35px;
    }
    .review-table th:last-child {
        width:35px;
    }
    .review-table td {
        padding:9px 5px;
    }
    .login-card {
        padding:30px 25px;
    }
    .login-card h1 {
        font-size:32px;
    }
    .login-card .brand {
        margin-bottom:35px;
    }
}
@media(prefers-reduced-motion:reduce) {
    * {
        transition:none!important;
        animation:none!important;
    }
}
.topbar-actions {
    display:flex;
    align-items:center;
    gap:12px;
}
.mobile-logout {
    display:none;
}
@media(max-width:760px) {
    .mobile-logout {
        display:block;
    }
    .topbar-actions {
        gap:4px;
    }
}
