body {
    background-color: #f8f9fa;
}

.form-control, .form-select {
    max-width: 480px;
}

#camera-widget {
    max-width: 480px;
}

/* Live-camera framing guide: a card-shaped cutout over the video feed
   (box-shadow "spotlight" trick — a huge shadow outside the box, none
   inside) so the guard sees exactly where to fit the document before
   snapping, instead of guessing distance/zoom. Purely visual — it does
   not crop the captured frame; id_scan.py/hebrew_ocr.py still get the
   whole photo. Root cause it targets: a document photographed too small
   in frame is a known, real cause of failed reads (2026-09-22, real
   card — see corporate-guests.md), separate from lighting/blur. */
.camera-frame {
    position: relative;
    max-width: 480px;
}

.camera-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    border: 2px solid #fff;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.camera-guide[data-shape="id"] {
    aspect-ratio: 1.586; /* ID-1 card format (תעודת זהות / רישיון) */
}

.camera-guide[data-shape="plate"] {
    aspect-ratio: 2.4; /* Israeli license plate, roughly */
}

.camera-guide-label {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.8rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    white-space: nowrap;
}

table.inside-table tr.overdue {
    background-color: #fff3cd;
}

/* The "מי בפנים" table has 9-10 columns — on a phone that's wide enough
   that table-responsive's horizontal scroll alone still feels like the
   table "runs off the screen" before you even start scrolling. Shrinking
   font/padding below the point where text wraps mid-word doesn't remove
   the need to scroll a table this wide, but it fits more of it in view
   at once so less scrolling is needed to get the full picture. */
@media (max-width: 576px) {
    table.inside-table {
        font-size: 0.8rem;
    }
    table.inside-table th,
    table.inside-table td {
        padding: 0.35rem 0.4rem;
        white-space: nowrap;
    }
}


/* Scan verification (M3): the guard compares the autofilled fields with
   the physical card before saving. Green = passed an independent check
   (ID check digit); amber = read by OCR with no check — look at the card. */
.verify-panel {
    border: 1px solid #ffc107;
    background: #fff8e1;
    border-radius: 6px;
    padding: 8px 10px;
}
input.scan-verified { border-color: #198754; box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.2); }
input.scan-review { border-color: #ffc107; box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.35); }

/* Live capture-quality hint (smart capture). */
.camera-guide.guide-ok { border-color: #2ecc71; }
.camera-guide.guide-bad { border-color: #ff6b6b; }

/* The plate is a small object in a wide scene — give its camera more room
   than the ID widget's 480px. */
#vehicle-camera-widget, #vehicle-camera-widget .camera-frame { max-width: 720px; }

input.scan-bad { border-color: #dc3545; box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3); }
