/* BootPatrol — mobile-first custom styles (layered on Bootstrap 5) */

:root {
    --bp-primary: #1d4ed8;
    --bp-primary-dark: #1e3a8a;
    --bp-dark: #0f172a;
}

body {
    background-color: #f1f5f9;
    -webkit-text-size-adjust: 100%;
}

/* Top brand bar */
.bp-navbar {
    background-color: var(--bp-dark);
    /* The viewport is viewport-fit=cover, so keep the sticky bar clear of the
       status bar / notch instead of letting it slide underneath. 0 on every
       device that doesn't have an inset. */
    padding-top: calc(.5rem + env(safe-area-inset-top, 0px));
}
.bp-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
}
.bp-brand-badge {
    background: var(--bp-primary);
    color: #fff;
    border-radius: .4rem;
    padding: .15rem .5rem;
    font-weight: 700;
}

/* Large touch-friendly controls for parking-lot use */
.bp-touch .form-control,
.bp-touch .form-select {
    font-size: 1.1rem;
    padding: .7rem .9rem;
    min-height: 3rem;
}
.bp-touch .form-label {
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: .25rem;
}
.btn-bp-lg {
    font-size: 1.25rem;
    padding: 1rem 1.25rem;
    font-weight: 700;
}

/* The big primary action */
.btn-document-boot {
    background: var(--bp-primary);
    color: #fff;
    border: none;
    width: 100%;
    border-radius: .75rem;
    box-shadow: 0 4px 14px rgba(29, 78, 216, .35);
}
.btn-document-boot:hover,
.btn-document-boot:focus {
    background: var(--bp-primary-dark);
    color: #fff;
}

/* Required-field marker */
.required-mark { color: #dc2626; font-weight: 700; }

/* Record cards */
.bp-record-card { border: 1px solid #e2e8f0; border-radius: .75rem; }
.bp-record-card .bp-thumb {
    width: 84px; height: 84px; object-fit: cover; border-radius: .5rem; background:#e2e8f0;
}
.bp-thumb-placeholder {
    width: 84px; height: 84px; border-radius:.5rem; background:#e2e8f0;
    display:flex; align-items:center; justify-content:center; color:#94a3b8; font-size:.75rem;
}

/* Stat tiles */
.bp-stat {
    border-radius: .75rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
}
.bp-stat .bp-stat-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--bp-dark); }
.bp-stat .bp-stat-label { color: #64748b; font-size: .9rem; }

/* Colored stat tiles (white text) */
.bp-stat[class*="bp-stat--"] { border: none; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.bp-stat[class*="bp-stat--"] .bp-stat-num { color: #fff; }
.bp-stat[class*="bp-stat--"] .bp-stat-label { color: rgba(255,255,255,.88); }
.bp-stat--navy  { background: #1e3a5f; }
.bp-stat--blue  { background: #2563eb; }
.bp-stat--teal  { background: #0d9488; }
.bp-stat--green { background: #16a34a; }
.bp-stat--amber { background: #d97706; }
.bp-stat--slate { background: #475569; }
.bp-stat--purple{ background: #7c3aed; }

/* Plate display */
.bp-plate {
    display:inline-block; font-weight:700; letter-spacing:1px;
    background:#fff; border:2px solid #334155; border-radius:.35rem;
    padding:.1rem .5rem; font-family: "Courier New", monospace;
}

/* Status badges */
.bp-status-active { background:#dcfce7; color:#166534; }
.bp-status-released { background:#dbeafe; color:#1e40af; }
.bp-status-documented { background:#cfe2ff; color:#084298; }
.bp-status-cancelled { background:#fee2e2; color:#991b1b; }

/* Outcome badges — what actually happened to a boot, not the raw status.
   One colour family per outcome so a records list reads at a glance. */
.bp-outcome-awaiting   { background:#fef3c7; color:#92400e; }  /* amber  — money still owed   */
.bp-outcome-paid       { background:#dcfce7; color:#166534; }  /* green  — money collected    */
.bp-outcome-courtesy   { background:#dbeafe; color:#1e40af; }  /* blue   — let go, no charge  */
.bp-outcome-warning    { background:#ede9fe; color:#5b21b6; }  /* violet — warned, no charge  */
.bp-outcome-error      { background:#fee2e2; color:#991b1b; }  /* red    — our mistake        */
.bp-outcome-documented { background:#e2e8f0; color:#334155; }  /* grey   — observation only   */
.bp-outcome-towed      { background:#334155; color:#f8fafc; }  /* slate  — vehicle gone       */
.bp-outcome-cancelled  { background:#e2e8f0; color:#64748b; }  /* grey   — cancelled          */

/* Audit history timeline */
.bp-history-item { border-left: 3px solid var(--bp-primary); padding: .35rem 0 .35rem .9rem; margin-bottom: .75rem; }
.bp-history-item .bp-history-when { color:#64748b; font-size:.85rem; }
.bp-diff-old { color:#991b1b; text-decoration: line-through; }
.bp-diff-new { color:#166534; font-weight:600; }

/* Gallery */
.bp-gallery-img { width:100%; height:150px; object-fit:cover; border-radius:.5rem; cursor:pointer; }
/* Videos play in their true orientation/aspect (no cropping) */
.bp-gallery-video { display:block; width:100%; height:auto; max-height:78vh; object-fit:contain; background:#000; border-radius:.5rem; }

/* Make tap targets comfy on small screens */
@media (max-width: 576px) {
    .bp-stat .bp-stat-num { font-size: 1.7rem; }
    .btn { min-height: 2.9rem; }
}

/* Video media indicator */
.bp-media-video { position: relative; display: inline-block; line-height: 0; }
.bp-media-video .bp-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    color: #fff; background: rgba(0,0,0,.55); border-radius: 50%;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    font-size: .8rem; pointer-events: none;
}
video.bp-gallery-img { background:#000; }

/* Input/form panel — subtle tint so a form stands out from white data cards */
.card.bp-form-panel { background: #83e8ba; border-color: #4fcf96; }
.card.bp-form-panel .form-control,
.card.bp-form-panel .form-select { background:#fff; }

/* Store/business section header — solid navy title bar per group */
.bp-store-head {
    background: #1e3a5f;
    color: #fff;
    padding: .6rem .9rem;
}
.bp-store-head--muted { background: #64748b; } /* Unassigned group */
.bp-store-head__link { color: #bcd4ef; text-decoration: none; }
.bp-store-head__link:hover { color: #fff; text-decoration: underline; }

/* Column-header row — lighter steel-blue tint that pairs with the navy bar;
   the data rows below stay white so each group reads cleanly. */
.bp-vehicles-table thead th {
    background: #dce6f3;
    color: #1e3a5f;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid #b9cbe4;
}
.bp-vehicles-table tbody td { background: #fff; }

/* Fullscreen photo viewer (lightbox) */
.bp-gallery-img.bp-zoomable { cursor: zoom-in; }
.bp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1080;
}
.bp-lightbox[hidden] { display: none; }
.bp-lightbox__img {
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, .6);
    cursor: zoom-out;
}
.bp-lightbox__close {
    position: absolute;
    top: .75rem;
    right: 1.25rem;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2.75rem;
    line-height: 1;
    cursor: pointer;
}

/* Daily earnings bar chart */
.bp-chart {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    height: 180px;
    padding-top: .5rem;
}
.bp-chart-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    height: 100%;
}
.bp-chart-val { font-size: .7rem; font-weight: 700; color: #16a34a; min-height: 1rem; white-space: nowrap; }
.bp-chart-track {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bp-chart-bar {
    width: 70%;
    max-width: 46px;
    min-height: 2px;
    background: var(--bp-primary);
    border-radius: .3rem .3rem 0 0;
    transition: height .3s ease;
}
.bp-chart-col--today .bp-chart-bar { background: #16a34a; }
.bp-chart-day { font-size: .8rem; font-weight: 600; margin-top: .35rem; color: var(--bp-dark); }
.bp-chart-col--today .bp-chart-day { color: #16a34a; }
.bp-chart-sub { font-size: .72rem; line-height: 1; min-height: .8rem; }
