/* ============================================================
   Swiss Workshop System
   Theme aligned to the Swiss Systems design system:
   navy ink (#001433), green accent (#1f9d6b), paper surfaces.
   ============================================================ */

:root {
    /* ---- Swiss Systems brand ---- */
    --ink: #001433;
    --ink-2: #0a2748;
    --ink-3: #143a6b;
    --paper: #ffffff;
    --paper-2: #f6f8fb;
    --paper-3: #eef2f7;
    --green: #1f9d6b;
    --green-hi: #25b87d;
    --green-lo: #178556;
    --amber: #ffb100;
    --rose: #e85b6b;
    --rose-deep: #b03446;
    --text-on-navy: #e9eef6;
    --text-on-navy-2: #b8c4d6;
    --line-on-navy: rgba(255, 255, 255, .14);

    /* ---- application aliases (used inline in a few views) ---- */
    --bg: var(--paper-2);
    --bg-2: var(--paper-3);
    --panel: var(--paper);
    --panel-2: var(--paper-2);
    --line: rgba(0, 20, 51, .12);
    --line-soft: rgba(0, 20, 51, .07);
    --text: #001433;
    --text-2: #3b4a64;
    --muted: #66768b;
    --accent: var(--green);
    --accent-soft: rgba(31, 157, 107, .12);
    --ok: var(--green);
    --warn: var(--amber);
    --info: var(--ink-3);
    --violet: var(--ink-2);

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 20, 51, .10);
    --shadow-sm: 0 1px 2px rgba(0, 20, 51, .06);
}

* { box-sizing: border-box; }

html, body {
    background: var(--paper-2);
    color: var(--text);
    font-family: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-lo); text-decoration: none; }
a:hover { color: var(--green); }

.mono, .job-number, .reg-plate, .money {
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

.text-muted { color: var(--muted) !important; }

/* ---------------------------------------------------- app shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 244px;
    flex: 0 0 244px;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    color: var(--text-on-navy);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }

.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--green);
    display: grid; place-items: center;
    color: #fff; font-size: 18px;
    box-shadow: 0 6px 18px rgba(31, 157, 107, .35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; }
.brand-name { font-weight: 700; letter-spacing: -.2px; color: #fff; }
.brand-sub { font-size: 11.5px; color: var(--text-on-navy-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-list { padding: 6px 10px; flex: 1; overflow-y: auto; }

.nav-heading {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
    color: rgba(184, 196, 214, .7); padding: 16px 8px 6px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--text-on-navy-2); font-weight: 500; margin-bottom: 2px;
    transition: background .12s ease, color .12s ease;
}
.nav-item i { font-size: 16px; width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: rgba(37, 184, 125, .16); color: #fff; }
.nav-item.active i { color: var(--green-hi); }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--line-on-navy); }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(37, 184, 125, .18); color: var(--green-hi);
    display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.user-name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-on-navy-2); }

.sidebar .btn-outline-secondary {
    border-color: var(--line-on-navy); color: var(--text-on-navy-2); background: transparent;
}
.sidebar .btn-outline-secondary:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .3); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 60px; display: flex; align-items: center; gap: 12px;
    padding: 0 20px; border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 20;
}

.topsearch { position: relative; flex: 1; max-width: 520px; }
.topsearch i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.topsearch .form-control { padding-left: 34px; }

.topbar-actions { margin-left: auto; display: flex; gap: 8px; }

.content { padding: 22px; flex: 1; }

/* ---------------------------------------------------- typography */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.4px; margin: 0; color: var(--ink); }
.page-sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------- surfaces */
.card, .panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.panel { padding: 16px; }
.panel-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
    font-weight: 600; color: var(--ink);
}
.panel-head .bi { color: var(--muted); }
.panel-body { padding: 16px; }
.panel-flush { padding: 0; }

/* ---------------------------------------------------- KPI tiles */
.kpi-grid {
    display: grid; gap: 12px; margin-bottom: 18px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.kpi {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px;
    position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.kpi::after {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line);
}
.kpi.k-accent::after { background: var(--rose); }
.kpi.k-info::after { background: var(--ink-3); }
.kpi.k-warn::after { background: var(--amber); }
.kpi.k-ok::after { background: var(--green); }
.kpi.k-violet::after { background: var(--ink-2); }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 4px; color: var(--ink); }
.kpi-foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.sws { width: 100%; border-collapse: separate; border-spacing: 0; }
table.sws thead th {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); font-weight: 600; text-align: left;
    padding: 10px 14px; border-bottom: 1px solid var(--line);
    white-space: nowrap; background: var(--paper-2);
}
table.sws tbody td {
    padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
table.sws tbody tr:hover { background: rgba(0, 20, 51, .025); }
table.sws tbody tr:last-child td { border-bottom: 0; }
.text-end { text-align: right; }

.empty { padding: 44px 16px; text-align: center; color: var(--muted); }
.empty i { font-size: 30px; display: block; margin-bottom: 10px; opacity: .45; }

/* ---------------------------------------------------- badges */
.badge-status, .badge-priority {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.badge-status::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.st-booked      { color: #5c6b83; background: rgba(92, 107, 131, .10); border-color: rgba(92, 107, 131, .22); }
.st-progress    { color: var(--ink-3); background: rgba(20, 58, 107, .10); border-color: rgba(20, 58, 107, .22); }
.st-parts       { color: #9a6a00; background: rgba(255, 177, 0, .16); border-color: rgba(255, 177, 0, .38); }
.st-auth        { color: var(--rose-deep); background: rgba(232, 91, 107, .12); border-color: rgba(232, 91, 107, .3); }
.st-ready       { color: var(--green-lo); background: rgba(31, 157, 107, .12); border-color: rgba(31, 157, 107, .3); }
.st-collected   { color: #8593a8; background: rgba(133, 147, 168, .12); border-color: rgba(133, 147, 168, .24); }
.st-cancelled   { color: var(--rose-deep); background: rgba(176, 52, 70, .10); border-color: rgba(176, 52, 70, .28); }

.pr-low     { color: #8593a8; background: rgba(133, 147, 168, .12); }
.pr-normal  { color: #5c6b83; background: rgba(92, 107, 131, .12); }
.pr-high    { color: #9a6a00; background: rgba(255, 177, 0, .2); }
.pr-urgent  { color: #fff; background: var(--rose); }

.reg-plate {
    display: inline-block; padding: 2px 8px; border-radius: 5px;
    background: #fff; color: var(--ink); font-weight: 600; font-size: 12px;
    letter-spacing: .04em; border: 1px solid rgba(0, 20, 51, .25);
    box-shadow: inset 0 -1px 0 rgba(0, 20, 51, .06);
}

.job-number { font-weight: 600; font-size: 12.5px; color: var(--ink-3); }
.money { font-variant-numeric: tabular-nums; }

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; padding: 3px 8px; border-radius: 6px;
    background: var(--paper-2); border: 1px solid var(--line); color: var(--muted);
}

/* ---------------------------------------------------- forms */
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-control, .form-select {
    background: #fff; border: 1px solid rgba(0, 20, 51, .18); color: var(--text);
    border-radius: var(--radius-sm); font-size: 13.5px; padding: 8px 11px;
}
.form-control:focus, .form-select:focus {
    background: #fff; color: var(--text); border-color: var(--green);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: #9aa6b7; }
textarea.form-control { min-height: 92px; }
.form-text { color: var(--muted); font-size: 11.5px; }
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-check-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--accent-soft); }
.text-danger { color: var(--rose-deep) !important; font-size: 12px; }

.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; }
.btn-accent { background: var(--green); border-color: var(--green); color: #fff; }
.btn-accent:hover { background: var(--green-lo); border-color: var(--green-lo); color: #fff; }
.btn-outline-secondary { border-color: rgba(0, 20, 51, .18); color: var(--text-2); }
.btn-outline-secondary:hover { background: var(--paper-3); border-color: rgba(0, 20, 51, .3); color: var(--ink); }
.btn-ghost { background: #fff; border: 1px solid rgba(0, 20, 51, .16); color: var(--text-2); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: rgba(0, 20, 51, .28); }

.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------- alerts */
.alert { border-radius: var(--radius-sm); font-size: 13px; border-width: 1px; }
.alert-success { background: rgba(31, 157, 107, .10); border-color: rgba(31, 157, 107, .35); color: var(--green-lo); }
.alert-warning { background: rgba(255, 177, 0, .12); border-color: rgba(255, 177, 0, .45); color: #8a5f00; }
.alert-danger  { background: rgba(232, 91, 107, .10); border-color: rgba(232, 91, 107, .38); color: var(--rose-deep); }
.alert-info    { background: rgba(20, 58, 107, .07); border-color: rgba(20, 58, 107, .25); color: var(--ink-3); }

/* ---------------------------------------------------- job board */
.board {
    display: grid; gap: 12px; align-items: start;
    grid-template-columns: repeat(5, minmax(230px, 1fr));
    overflow-x: auto; padding-bottom: 8px;
}
.board-col {
    background: var(--paper-3); border: 1px solid var(--line);
    border-radius: var(--radius); min-height: 180px; display: flex; flex-direction: column;
}
.board-col-head {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 13px; border-bottom: 1px solid var(--line-soft);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--ink);
}
.board-col-head .count {
    margin-left: auto; background: #fff; border: 1px solid var(--line);
    border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--muted);
}
.board-col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; min-height: 90px; }
.board-col.drag-over { border-color: var(--green); background: rgba(31, 157, 107, .07); }

.job-card-mini {
    background: #fff; border: 1px solid var(--line);
    border-radius: 10px; padding: 11px 12px; cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: transform .1s ease, border-color .1s ease, box-shadow .1s ease;
}
.job-card-mini:hover { border-color: rgba(0, 20, 51, .25); box-shadow: var(--shadow); transform: translateY(-1px); }
.job-card-mini.dragging { opacity: .45; }
.job-card-mini .jc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.job-card-mini .jc-veh { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.job-card-mini .jc-meta { color: var(--muted); font-size: 11.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.job-card-mini .jc-work {
    color: var(--text-2); font-size: 12px; margin-top: 7px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.jc-overdue { color: var(--rose-deep) !important; }

/* ---------------------------------------------------- job detail */
.detail-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: start; }
.spec-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.spec-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.spec-value { font-weight: 600; font-size: 13.5px; margin-top: 2px; word-break: break-word; }

.totals { border-top: 1px solid var(--line); margin-top: 6px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 17px; font-weight: 700; color: var(--ink); }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px 4px; }
.tl-item::before {
    content: ''; position: absolute; left: -17px; top: 5px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 2px solid #fff;
}
.tl-msg { font-size: 13px; }
.tl-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

.status-flow { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------- auth */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(900px 520px at 12% -10%, rgba(31, 157, 107, .14), transparent 62%),
        radial-gradient(820px 520px at 100% 110%, rgba(0, 20, 51, .10), transparent 60%),
        var(--paper-2);
}
.auth-card {
    width: 100%; max-width: 430px; background: #fff;
    border: 1px solid var(--line); border-radius: 22px; padding: 28px;
    box-shadow: 0 18px 50px rgba(0, 20, 51, .12);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.auth-brand .brand-name, .auth-brand div { color: var(--ink); }
.auth-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.4px; color: var(--ink); }
.auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------- print */
.print-sheet { display: none; }

@media print {
    .app-shell, .sidebar, .topbar, .no-print { display: none !important; }
    .print-sheet { display: block !important; }
    body { background: #fff !important; color: #000 !important; font-size: 11.5pt; }
    a { color: #000 !important; }
}

/* ============================================================
   Vehicle inspection — diagram, pins, checklist, photos, signatures
   ============================================================ */

.diagram-grid {
    display: grid; gap: 12px;
    grid-template-columns: minmax(150px, 0.72fr) minmax(240px, 1fr);
    grid-template-areas: "top left" "top right";
    align-items: start;
}
.diagram-pane:nth-child(1) { grid-area: top; }
.diagram-pane:nth-child(2) { grid-area: left; }
.diagram-pane:nth-child(3) { grid-area: right; }

.diagram-caption {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
    color: var(--muted); margin-bottom: 5px;
}

.diagram-view {
    position: relative; background: var(--paper-2);
    border: 1px solid var(--line); border-radius: 10px; padding: 8px;
    touch-action: manipulation;
}
.diagram-editable .diagram-view { cursor: crosshair; }
.diagram-view svg { display: block; width: 100%; height: auto; }

.car-body [data-zone] {
    fill: #fff; stroke: rgba(0, 20, 51, .22); stroke-width: 1.1;
    transition: fill .1s ease;
}
.diagram-editable .car-body [data-zone]:hover { fill: rgba(31, 157, 107, .12); stroke: var(--green); }
.car-outline { fill: var(--paper-3); stroke: rgba(0, 20, 51, .3); stroke-width: 2; }
.car-glass { fill: #dfe9f3 !important; }
.car-wheel { fill: #d8dfe8 !important; stroke: rgba(0, 20, 51, .28); }
.car-detail { fill: #e7ecf2 !important; }
.car-label {
    fill: #98a4b5; font-size: 9px; font-weight: 700; letter-spacing: .16em;
    text-anchor: middle; font-family: 'Inter Tight', 'Inter', sans-serif;
}

.pin-layer { position: absolute; inset: 8px; pointer-events: none; }

.pin {
    position: absolute; transform: translate(-50%, -50%);
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-grid; place-items: center;
    font-size: 10.5px; font-weight: 700; color: #fff;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 20, 51, .28);
    background: var(--rose);
}
.pin.static { position: static; transform: none; }
.pin.sev-light    { background: var(--amber); color: #4a3400; }
.pin.sev-moderate { background: var(--rose); }
.pin.sev-severe   { background: var(--rose-deep); }
.pin.pin-existing { opacity: .5; border-style: dashed; }
.pin.pin-ghost {
    width: 14px; height: 14px; background: transparent;
    border: 2px dashed #98a4b5; box-shadow: none;
}
.badge-priority.sev-light    { color: #9a6a00; background: rgba(255, 177, 0, .2); }
.badge-priority.sev-moderate { color: var(--rose-deep); background: rgba(232, 91, 107, .16); }
.badge-priority.sev-severe   { color: #fff; background: var(--rose-deep); }

.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); font-weight: 400; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-item .pin { position: static; transform: none; width: 12px; height: 12px; border-width: 1px; }

.diagram-hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

tr.row-carried { background: rgba(0, 20, 51, .022); }

/* ---- checklist ---- */
.check-group { margin-bottom: 14px; }
.check-group-title {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
    color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px;
}
.check-row {
    display: grid; gap: 8px; align-items: center; margin-bottom: 6px;
    grid-template-columns: minmax(140px, 1.3fr) auto minmax(120px, 1fr);
}
.check-label { font-size: 13px; }
.check-options { display: flex; gap: 3px; }
.check-options .btn {
    border: 1px solid rgba(0, 20, 51, .16); background: #fff; color: var(--muted);
    padding: 3px 9px; font-size: 11.5px; font-weight: 600; border-radius: 6px;
}
.btn-check:checked + .cond-ok         { background: rgba(31, 157, 107, .14); border-color: var(--green); color: var(--green-lo); }
.btn-check:checked + .cond-attention  { background: rgba(255, 177, 0, .2); border-color: var(--amber); color: #8a5f00; }
.btn-check:checked + .cond-faulty     { background: rgba(232, 91, 107, .14); border-color: var(--rose); color: var(--rose-deep); }
.btn-check:checked + .cond-notpresent { background: rgba(20, 58, 107, .1); border-color: var(--ink-3); color: var(--ink-3); }
.btn-check:checked + .cond-notchecked { background: var(--paper-3); border-color: rgba(0, 20, 51, .3); color: var(--ink); }
.check-note { font-size: 12px !important; padding: 4px 8px !important; }

/* ---- photos ---- */
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-tile { position: relative; width: 108px; }
.photo-tile img {
    width: 108px; height: 84px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--line); display: block;
}
.photo-del {
    position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
    border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--rose-deep);
    display: grid; place-items: center; font-size: 11px; cursor: pointer; padding: 0;
    box-shadow: 0 1px 3px rgba(0, 20, 51, .2);
}
img.thumb {
    width: 40px; height: 32px; object-fit: cover;
    border-radius: 5px; border: 1px solid var(--line); display: block;
}

/* ---- signature pads ---- */
.sig-pad-wrap { position: relative; margin-bottom: 12px; }
.sig-pad {
    width: 100%; height: 150px; background: #fff;
    border: 1px dashed rgba(0, 20, 51, .3); border-radius: 10px; display: block; touch-action: none;
}
.sig-clear { position: absolute; top: 6px; right: 6px; }
.sig-image {
    background: #fff; border-radius: 8px; border: 1px solid var(--line);
    padding: 4px; max-width: 100%; height: auto;
}

/* ---- inspection status strip on the job card ---- */
.insp-tile {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); margin-bottom: 8px;
}
.insp-tile .insp-icon { font-size: 18px; width: 22px; text-align: center; }
.insp-tile.ok { border-color: rgba(31, 157, 107, .45); background: rgba(31, 157, 107, .06); }
.insp-tile.warn { border-color: rgba(255, 177, 0, .5); background: rgba(255, 177, 0, .07); }
.insp-tile.danger { border-color: rgba(232, 91, 107, .5); background: rgba(232, 91, 107, .06); }
.insp-tile .insp-body { flex: 1; min-width: 0; }
.insp-tile .insp-title { font-size: 13px; font-weight: 600; }
.insp-tile .insp-sub { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------- responsive */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed; z-index: 50; transform: translateX(-100%);
        transition: transform .18s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .detail-grid { grid-template-columns: 1fr; }
    .board { grid-template-columns: repeat(5, 260px); }
}

@media (max-width: 767.98px) {
    .diagram-grid { grid-template-columns: 1fr; grid-template-areas: "top" "left" "right"; }
    .check-row { grid-template-columns: 1fr; }
    .check-options { flex-wrap: wrap; }
}
