
:root{
    --background:#07111f;
    --header:#0b1626;
    --panel:#122035;
    --panel-light:#182a43;
    --text:#f8fafc;
    --muted:#94a3b8;
    --border:rgba(255,255,255,.10);
    --blue:#3b82f6;
    --green:#22c55e;
    --orange:#f59e0b;
    --purple:#8b5cf6;
    --yellow:#facc15;
    --red:#ef4444;
    --pink:#ec4899;
    --shadow:0 18px 50px rgba(0,0,0,.34);
}

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

html,
body{
    width:100%;
    min-height:100%;
}

body{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    overflow-x:hidden;
    background:
        radial-gradient(
            circle at top,
            #10233d 0,
            var(--background) 48%
        );
    color:var(--text);
    font-family:Inter,Segoe UI,Arial,sans-serif;
}

button{
    font:inherit;
}

.board-header{
    display:grid;
    grid-template-columns:minmax(300px,1fr) auto minmax(300px,1fr);
    align-items:center;
    gap:24px;
    padding:18px 26px;
    background:rgba(8,18,32,.97);
    border-bottom:1px solid var(--border);
    box-shadow:0 10px 30px rgba(0,0,0,.24);
    position:sticky;
    top:0;
    z-index:20;
}

.brand-name{
    font-size:36px;
    line-height:1;
    font-weight:950;
    letter-spacing:.06em;
}

.board-name{
    margin-top:7px;
    color:#60a5fa;
    font-size:14px;
    font-weight:900;
    letter-spacing:.16em;
}

.board-summary{
    display:flex;
    justify-content:center;
    gap:10px;
}

.summary-item{
    min-width:92px;
    padding:10px 14px;
    border:1px solid var(--border);
    border-radius:13px;
    background:#132239;
    text-align:center;
}

.summary-item span{
    display:block;
    font-size:28px;
    line-height:1;
    font-weight:950;
}

.summary-item label{
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.09em;
}

.summary-spot{
    border-color:rgba(239,68,68,.55);
}

.summary-ready{
    border-color:rgba(34,197,94,.55);
}

.summary-prep{
    border-color:rgba(245,158,11,.55);
}

.board-tools{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
}

.board-clock{
    margin-right:5px;
    font-size:16px;
    font-weight:800;
    white-space:nowrap;
}

.tool-button{
    border:1px solid var(--border);
    border-radius:10px;
    background:#1b2e49;
    color:#fff;
    padding:10px 14px;
    cursor:pointer;
    font-size:13px;
    font-weight:900;
    white-space:nowrap;
}

.tool-button:hover{
    background:#25405f;
}

.tool-button.off{
    background:#475569;
}

.board-main{
    flex:1;
    width:100%;
    padding:18px 24px 22px;
}

.connection-status{
    width:max-content;
    max-width:100%;
    margin:0 auto 18px;
    padding:9px 14px;
    border-radius:999px;
    background:#17243a;
    color:#cbd5e1;
    font-size:12px;
    font-weight:850;
}

.connection-status.connected{
    color:#86efac;
    background:rgba(34,197,94,.13);
    border:1px solid rgba(34,197,94,.35);
}

.connection-status.error{
    color:#fca5a5;
    background:rgba(239,68,68,.13);
    border:1px solid rgba(239,68,68,.35);
}

.spot-alert{
    margin-bottom:20px;
    padding:20px;
    border:2px solid #4ade80;
    border-radius:18px;
    background:linear-gradient(135deg,#14532d,#15803d);
    text-align:center;
    box-shadow:0 0 42px rgba(34,197,94,.25);
    animation:spotPulse 1.2s infinite alternate;
}

.spot-alert-label{
    font-size:15px;
    font-weight:950;
    letter-spacing:.20em;
}

.spot-alert-customer{
    margin-top:7px;
    font-size:40px;
    line-height:1.05;
    font-weight:950;
}

.spot-alert-details{
    margin-top:7px;
    font-size:18px;
    font-weight:800;
}

.delivery-board{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
    gap:18px;
    align-items:stretch;
}

.board-card{
    position:relative;
    min-width:0;
    min-height:310px;
    padding:22px;
    border:1px solid var(--border);
    border-left:9px solid #64748b;
    border-radius:18px;
    background:
        linear-gradient(
            180deg,
            var(--panel-light),
            var(--panel)
        );
    box-shadow:var(--shadow);
    overflow:hidden;
}

.board-card.spot{
    border-left-color:var(--red);
    box-shadow:0 0 30px rgba(239,68,68,.20);
}

.board-card.ready{
    border-left-color:var(--green);
    box-shadow:0 0 30px rgba(34,197,94,.14);
}

.board-card.in-prep,
.board-card.detail{
    border-left-color:var(--orange);
}

.board-card.recon{
    border-left-color:var(--purple);
}

.board-card.service{
    border-left-color:var(--yellow);
}

.board-card.locate{
    border-left-color:var(--blue);
}

.board-card.customer-here,
.board-card.customer-arrived{
    border-left-color:var(--red);
    box-shadow:0 0 30px rgba(239,68,68,.22);
}

.board-card.delivering{
    border-left-color:var(--pink);
}

.board-card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.board-status,
.board-priority{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    padding:7px 12px;
    font-size:11px;
    line-height:1;
    font-weight:950;
    text-transform:uppercase;
    letter-spacing:.06em;
    white-space:nowrap;
}

.board-status{
    background:#020617;
    color:#fff;
}

.board-priority{
    background:#e2e8f0;
    color:#172554;
}

.board-priority.vip{
    background:#fef3c7;
    color:#92400e;
}

.board-priority.emergency{
    background:#fee2e2;
    color:#991b1b;
}

.board-priority.employee{
    background:#dbeafe;
    color:#1e40af;
}

.board-priority.fleet{
    background:#ede9fe;
    color:#5b21b6;
}

.board-priority.dealer-trade{
    background:#cffafe;
    color:#155e75;
}

.board-customer{
    margin-top:20px;
    overflow-wrap:anywhere;
    font-size:34px;
    line-height:1.04;
    font-weight:950;
}

.board-vehicle{
    margin-top:10px;
    overflow-wrap:anywhere;
    color:#93c5fd;
    font-size:19px;
    line-height:1.2;
    font-weight:900;
}

.board-stock{
    margin-top:5px;
    color:#fff;
    font-size:17px;
    font-weight:900;
}

.board-details{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:17px 20px;
    margin-top:23px;
}

.board-detail{
    min-width:0;
}

.board-detail label{
    display:block;
    margin-bottom:5px;
    color:var(--muted);
    font-size:10px;
    font-weight:950;
    text-transform:uppercase;
    letter-spacing:.09em;
}

.board-detail div{
    overflow-wrap:anywhere;
    font-size:17px;
    line-height:1.2;
    font-weight:850;
}

.board-timer{
    margin-top:20px;
    padding-top:15px;
    border-top:1px solid var(--border);
    color:#cbd5e1;
    font-size:16px;
    font-weight:900;
}

.empty-board{
    min-height:55vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:var(--muted);
    text-align:center;
}

.empty-icon{
    font-size:62px;
}

.empty-board h2{
    margin-top:14px;
    color:#fff;
    font-size:30px;
}

.empty-board p{
    margin-top:7px;
    font-size:16px;
}

.board-footer{
    display:flex;
    justify-content:space-between;
    gap:20px;
    padding:11px 24px;
    background:#091321;
    border-top:1px solid var(--border);
    color:var(--muted);
    font-size:12px;
    font-weight:750;
}

.hidden{
    display:none !important;
}

@keyframes spotPulse{
    from{
        transform:scale(1);
        box-shadow:0 0 24px rgba(34,197,94,.16);
    }

    to{
        transform:scale(1.006);
        box-shadow:0 0 46px rgba(34,197,94,.40);
    }
}

@media(min-width:1700px){
    .delivery-board{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }

    .board-card{
        min-height:340px;
    }

    .board-customer{
        font-size:38px;
    }
}

@media(max-width:1200px){
    .board-header{
        grid-template-columns:1fr;
        align-items:start;
    }

    .board-summary{
        justify-content:flex-start;
    }

    .board-tools{
        justify-content:flex-start;
    }
}

@media(max-width:760px){
    .board-header{
        padding:16px;
    }

    .board-summary{
        width:100%;
        display:grid;
        grid-template-columns:repeat(2,1fr);
    }

    .summary-item{
        min-width:0;
    }

    .board-tools{
        align-items:flex-start;
        flex-wrap:wrap;
    }

    .board-main{
        padding:16px;
    }

    .delivery-board{
        grid-template-columns:1fr;
    }

    .board-details{
        grid-template-columns:1fr;
    }

    .board-footer{
        flex-direction:column;
    }
}