/* Expres Dispatch — stil inspirat de Salesforce Lightning, meniu în dreapta */
:root {
    --brand: #0176d3;
    --brand-dark: #014486;
    --brand-soft: #eef4ff;
    --bg: #f3f3f3;
    --band: #dbe7f6;
    --surface: #ffffff;
    --border: #dddbda;
    --border-strong: #c9c9c9;
    --text: #181818;
    --text-weak: #5c5c5c;
    --success: #2e844a;
    --error: #ba0517;
    --warning: #a96404;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow: 0 2px 2px rgba(0, 0, 0, .08);
    --header-h: 52px;
    --nav-w: 248px;
    --font: "Salesforce Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
    margin: 0;
    font: 14px/1.45 var(--font);
    color: var(--text);
    background: linear-gradient(var(--band) 0, var(--band) 150px, var(--bg) 150px);
    background-attachment: scroll;
    padding-top: env(safe-area-inset-top, 0px);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--brand-dark); }
h1, h2, h3 { margin: 0; font-weight: 700; }
code { background: #f3f3f3; padding: 1px 5px; border-radius: 3px; font-size: 13px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { flex: none; vertical-align: middle; }
abbr[title] { text-decoration: none; color: var(--error); }

/* ---------- Header global ---------- */
.gh {
    position: sticky; top: 0; z-index: 40;
    height: var(--header-h);
    display: flex; align-items: center; gap: 16px;
    padding: 0 12px 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.gh-brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; font-size: 16px; white-space: nowrap; }
.gh-brand:hover { text-decoration: none; color: var(--text); }
.gh-waffle { color: var(--text-weak); display: inline-flex; padding: 6px; border-radius: var(--radius); }
.gh-brand:hover .gh-waffle { background: var(--bg); }
.gh-search {
    flex: 1; max-width: 560px; margin: 0 auto;
    display: flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    color: var(--text-weak); background: var(--surface);
}
.gh-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.gh-search input { flex: 1; border: 0; outline: 0; font: inherit; background: transparent; min-width: 0; color: var(--text); }
.gh-user { display: flex; align-items: center; gap: 8px; }
.gh-account { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: 20px; color: inherit; }
.gh-account:hover { background: var(--bg); text-decoration: none; color: inherit; }
.gh-name { display: flex; flex-direction: column; line-height: 1.2; max-width: 200px; }
.gh-name-main, .gh-name-org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-name-main { color: var(--text); font-size: 13px; font-weight: 600; }
.gh-name-org { color: var(--text-weak); font-size: 12px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-dark); color: #fff; font-size: 12px; font-weight: 700;
}
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius);
    border: 1px solid transparent; background: transparent; color: var(--text-weak); cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.gh-menu { display: none; }

/* ---------- Structura: conținut + meniu în dreapta ---------- */
.shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--nav-w);
    min-height: calc(100vh - var(--header-h));
}
.main { padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

.sidenav {
    position: sticky; top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 12px;
}
.sidenav-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: var(--text-weak); font-size: 13px; }
.sidenav-close { display: none; }
.sidenav-cta { margin: 0 16px; justify-content: center; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-item {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 9px 16px;
    color: var(--text);
}
.nav-item:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav-item.is-active { background: var(--brand-soft); font-weight: 700; }
.nav-item.is-active::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand);
}
.nav-label { flex: 1; }
.nav-count {
    min-width: 22px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--brand); color: #fff;
    font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.nav-overlay { display: none; }
.gh-search-spacer { flex: 1; }
.chat-badge { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 10px; background: #06a59a; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab { padding: 8px 14px; color: var(--text-weak); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.run-list { display: flex; flex-direction: column; gap: 12px; }
.run { display: block; padding: 12px 16px; color: var(--text); }
.run:hover { text-decoration: none; color: var(--text); border-color: var(--brand); }
.run-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.run-when { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; }
.sidenav-foot { margin-top: auto; padding: 12px 16px 0; border-top: 1px solid var(--border); }
.sidenav-foot { display: flex; flex-direction: column; gap: 10px; }
.sidenav-foot a { display: flex; align-items: center; gap: 8px; color: var(--text-weak); }
.mt-8 { margin-top: 8px; }
.login-alt { text-align: center; margin: 14px 0 0; font-size: 13px; }
.perm-list { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; gap: 8px; font-size: 13px; }
.perm-list .ic { color: var(--success); margin-right: 4px; }
.reveal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--radius); background: #cdefc4; color: #22683e; }
.reveal code { font-size: 15px; font-weight: 700; background: #fff; padding: 3px 8px; letter-spacing: .04em; user-select: all; }

/* ---------- Carduri ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.card-title { font-size: 15px; flex: 1; }
.card-link { font-size: 13px; }
.card-b { padding: 0 16px 16px; }
.empty { padding: 8px 16px 20px; margin: 0; color: var(--text-weak); }
.prose p { margin: 0 0 8px; color: var(--text-weak); }
.prose p:last-child { margin: 0; }

.obj-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); color: #fff; flex: none; }

/* ---------- Antet pagină ---------- */
.page-header { padding: 14px 16px; }
.ph-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-text { flex: 1; min-width: 180px; }
.ph-label { font-size: 13px; color: var(--text-weak); }
.ph-title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-meta { margin-top: 10px; color: var(--text-weak); font-size: 13px; }
.ph-fields { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.ph-fields dt { font-size: 12px; color: var(--text-weak); }
.ph-fields dd { margin: 2px 0 0; color: var(--text); font-size: 14px; }

.view-select select {
    font: inherit; font-size: 20px; font-weight: 700; color: var(--text);
    border: 0; background: transparent; padding: 0 22px 0 0; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 2px center;
}

/* ---------- Butoane ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 14px;
    border-radius: var(--radius); border: 1px solid var(--border-strong);
    font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
    cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-neutral { background: var(--surface); color: var(--brand); }
.btn-neutral:hover { background: #f3f3f3; color: var(--brand-dark); }
.btn-danger-text { color: var(--error); }
.btn-danger-text:hover { color: #8e030f; }
.btn-link { border-color: transparent; background: transparent; color: var(--brand); }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; height: 38px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Toasts ---------- */
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-lg);
    color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.toast span { flex: 1; }
.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.toast-x { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 4px; display: inline-flex; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; padding: 14px 16px; color: var(--text); border-top: 3px solid var(--border); }
.kpi:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); border-top-color: var(--brand); }
.kpi-attn { border-top-color: var(--brand); }
.kpi-label { font-size: 13px; color: var(--text-weak); }
.kpi-value { font-size: 30px; font-weight: 300; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--text-weak); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* ---------- Tabele ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
    text-align: left; font-weight: 600; color: var(--text-weak); white-space: nowrap;
    background: #f3f3f3; padding: 8px 12px;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid #ecebea; vertical-align: top; }
.tbl tbody tr:hover td { background: #f8fbff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-actions { text-align: right; white-space: nowrap; }
.tbl .center { text-align: center; }
.tbl-matrix th.center { min-width: 130px; white-space: normal; vertical-align: bottom; }
.tbl-matrix .yes { color: var(--success); display: inline-flex; }
.tbl-matrix .no { color: #b0adab; }
.row-muted td { color: var(--text-weak); }
.rec-link { font-weight: 600; }
.sub { font-size: 12px; color: var(--text-weak); }
.txt-warn { color: var(--warning); font-weight: 600; }
.more-pill { display: inline-block; padding: 0 6px; border-radius: 10px; background: #ecebea; color: var(--text-weak); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .02em; }

/* ---------- Badges de status ---------- */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 12px;
    font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle;
}
.badge-noua { background: #d8e6fe; color: #0b5cab; }
.badge-acceptata { background: #ece1f9; color: #6b3fa0; }
.badge-in_curs { background: #fef1d9; color: #8c4b02; }
.badge-livrata { background: #cdefc4; color: #22683e; }
.badge-anulata { background: #e5e5e5; color: #5c5c5c; }

/* ---------- Filtre ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; }
.filters .field { margin: 0; }
.field-grow { flex: 1 1 240px; }
.filters-actions { display: flex; gap: 4px; }
.filters-actions .btn { height: 34px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px; color: var(--text-weak); border-top: 1px solid var(--border); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field-label { font-size: 12px; color: var(--text-weak); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password],
.field input[type=search], .field input[type=date], .field input[type=datetime-local], .field select, .field textarea {
    width: 100%; min-height: 32px; padding: 6px 10px;
    font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.field input:not([type=checkbox]):not([type=radio]), .field select { height: 34px; padding-top: 0; padding-bottom: 0; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field-error { font-size: 12px; color: var(--error); }
.field-help { font-size: 12px; color: var(--text-weak); }
.pw-row { display: flex; gap: 6px; }
.pw-row input { flex: 1; min-width: 0; }
.pw-row .btn { height: 34px; }
.field-static { min-height: 34px; display: flex; align-items: center; font-weight: 600; }
.field-check { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 32px; }
.field-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-error {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius);
    background: #fddde3; color: var(--error); font-size: 13px;
}
.form-card .form-error { margin: 16px 16px 0; }

.section { border: 0; margin: 0; padding: 12px 16px 4px; }
.section + .section { border-top: 1px solid #ecebea; }
.section legend {
    float: left; width: 100%; padding: 6px 10px; margin-bottom: 12px;
    background: #f3f3f3; border-radius: var(--radius); font-size: 14px; font-weight: 700;
}
.section legend + * { clear: both; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.field-full { grid-column: 1 / -1; }
.form-footer {
    display: flex; justify-content: center; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--border); background: #f8f8f8;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    position: sticky; bottom: 0;
}

/* Mașinile din comandă */
.vehicles { display: flex; flex-direction: column; gap: 12px; }
.vehicle { border: 1px solid var(--border); border-left: 3px solid #06a59a; border-radius: var(--radius); padding: 10px 12px 0; background: #fbfbfb; }
.vehicle-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.vehicle-no { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.vehicle-no .ic { color: #06a59a; }
.vehicle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 12px; }
.field-span2 { grid-column: span 4; }
.add-vehicle { margin: 12px 0 14px; }
.car-list { list-style: none; margin: 0; padding: 0; }
.car-list li + li { margin-top: 2px; }

/* Destinația: cele două puncte fixe */
.dest-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
.dest-card { position: relative; cursor: pointer; }
.dest-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dest-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.dest-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--brand); }
.dest-addr { font-size: 12px; color: var(--text-weak); }
.dest-card:hover .dest-body { border-color: var(--brand); }
.dest-card input:checked + .dest-body { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.dest-card input:focus-visible + .dest-body { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.has-error .dest-body { border-color: var(--error); }

/* Selector segmentat */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; align-self: flex-start; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 6px 18px; font-weight: 600; color: var(--brand); background: var(--surface); }
.seg-opt + .seg-opt span { border-left: 1px solid var(--border-strong); }
.seg-opt input:checked + span { background: var(--brand); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand-dark); outline-offset: -3px; }
.has-error .seg { border-color: var(--error); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }

.kv { margin: 0; padding: 0 16px 14px; display: grid; grid-template-columns: 88px 1fr; gap: 10px 12px; }
.kv dt { font-size: 12px; color: var(--text-weak); padding-top: 2px; }
.kv dd { margin: 0; }
.kv-wide { grid-template-columns: 110px 1fr; }
.detail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Chat pe comandă */
.chat-title { flex: 1; min-width: 0; }
.chat-title .card-title { flex: none; }
.chat-list { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px;
    max-height: 380px; overflow-y: auto; background: #f7f8fa; border-top: 1px solid #ecebea; border-bottom: 1px solid #ecebea; }
.msg { max-width: 85%; align-self: flex-start; }
.msg-mine { align-self: flex-end; text-align: right; }
.msg-meta { font-size: 11px; color: var(--text-weak); margin: 0 4px 2px; }
.msg-body { display: inline-block; text-align: left; padding: 8px 11px; border-radius: 12px 12px 12px 3px; background: #fff; border: 1px solid #e5e5e5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.msg-mine .msg-body { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 12px 12px 3px 12px; }
.chat-empty { color: var(--text-weak); font-size: 13px; text-align: center; padding: 16px 0; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; }
.chat-form textarea { flex: 1; min-height: 38px; max-height: 140px; resize: vertical; padding: 8px 10px; font: inherit; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.chat-form textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.chat-form .btn { height: 38px; padding: 0 12px; }
.chat-error { margin: 0 12px 12px; font-size: 12px; color: var(--error); }
.chat-closed { margin: 0; padding: 10px 16px 14px; font-size: 13px; color: var(--text-weak); }
.notice-info { background: var(--brand-soft); color: var(--brand-dark); }
.notice { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-lg); background: #fef1d9; color: #8c4b02; font-size: 13px; }
.path-static { cursor: default; }
.path-step.path-static.is-incomplete:hover { background: #ecebea; }
.path-step.path-static.is-complete:hover { background: var(--success); }
.wizard { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wizard li { flex: 1; }
.wizard .path-step { cursor: default; }

/* ---------- Path (bara de status Salesforce) ---------- */
.path-card { padding: 12px 16px; }
.path { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.path li { flex: 1; min-width: 0; }
.path form { margin: 0; }
.path-step {
    width: 100%; height: 34px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 0 22px;
    border: 0; font: inherit; font-size: 13px; font-weight: 600;
    background: #ecebea; color: var(--text); cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background-color .15s;
}
.path li:first-child .path-step { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 17px 0 0 17px; }
.path li:last-child .path-step { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); border-radius: 0 17px 17px 0; }
.path-step.is-incomplete:hover { background: #dddbda; }
.path-step.is-complete { background: var(--success); color: #fff; }
.path-step.is-complete:hover { background: #22683e; }
.path-step.is-current { background: var(--brand-dark); color: #fff; cursor: default; }
.path-step:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px #ffffff80; }
.path-hint { margin: 8px 0 0; font-size: 12px; color: var(--text-weak); text-align: center; }
.path-cancelled { display: flex; align-items: center; gap: 8px; color: var(--text-weak); }

/* ---------- Program (timeline) ---------- */
.timeline { list-style: none; margin: 0; padding: 0 16px 8px; }
.tl-item { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #ecebea; }
.tl-time { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route { display: flex; align-items: center; gap: 6px; margin: 3px 0; font-size: 13px; color: var(--text); flex-wrap: wrap; }
.route .ic { color: var(--text-weak); }
.alloc { display: flex; align-items: center; gap: 6px; margin-top: 2px; }

/* Istoric status */
.history { list-style: none; margin: 0; padding: 0 16px 8px; }
.history li { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 14px; }
.history li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: #e5e5e5; }
.history-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brand); }
.side-foot { padding: 10px 16px 14px; margin: 0; border-top: 1px solid #ecebea; }

.related { list-style: none; margin: 0; padding: 0 16px 10px; }
.related li { padding: 8px 0; border-top: 1px solid #ecebea; }
.related-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Bare pe destinații */
.bars { padding: 0 16px 16px; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 12px; }
.bar-label { font-weight: 600; }
.bar-track { height: 12px; background: #ecebea; border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 6px; min-width: 2px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- Autentificare ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; background: linear-gradient(var(--band) 0, var(--band) 45vh, var(--bg) 45vh); }
.login-box { width: 100%; max-width: 380px; }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand img { border-radius: 12px; }
.login-brand h1 { font-size: 22px; margin-top: 10px; }
.login-brand p { margin: 4px 0 0; color: var(--text-weak); }
.login-card { padding: 20px; }
.login-card p { margin: 0 0 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field-span2 { grid-column: span 2; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .gh-menu { display: inline-flex; }
    .sidenav {
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
        height: 100%; width: min(300px, 86vw);
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .2s ease, visibility 0s linear .2s;
        box-shadow: -4px 0 16px rgba(0, 0, 0, .16);
    }
    .sidenav-close { display: inline-flex; }
    body.nav-open .sidenav { transform: none; visibility: visible; transition: transform .2s ease; }
    body.nav-open .nav-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .35); }
}
@media (max-width: 640px) {
    .gh { gap: 8px; padding: 0 8px; }
    .gh-app, .gh-name, .gh-logout { display: none; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .kpi-value { font-size: 26px; }
    .main { padding: 12px; gap: 12px; }
    .form-grid, .vehicle-grid { grid-template-columns: minmax(0, 1fr); }
    .field-span2 { grid-column: auto; }
    .path { flex-direction: column; gap: 4px; }
    .path-step, .path li:first-child .path-step, .path li:last-child .path-step { clip-path: none; border-radius: var(--radius); }
    .tl-item { grid-template-columns: 1fr; gap: 2px; }
    .ph-title, .view-select select { font-size: 18px; }
    .tbl-orders th:nth-child(2), .tbl-orders td:nth-child(2),
    .tbl-orders th:nth-child(6), .tbl-orders td:nth-child(6),
    .tbl-orders th:nth-child(7), .tbl-orders td:nth-child(7) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ---------- Selector de limbă ---------- */
.lang-switch { position: relative; }
.lang-switch summary {
    list-style: none; cursor: pointer; user-select: none;
    display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 8px;
    border-radius: var(--radius); color: var(--text-weak); font-size: 12px; font-weight: 700;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { background: var(--bg); color: var(--text); }
.lang-menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 70; min-width: 150px;
    display: flex; flex-direction: column; padding: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.lang-menu a { padding: 7px 10px; border-radius: 3px; color: var(--text); white-space: nowrap; }
.lang-menu a:hover { background: var(--brand-soft); text-decoration: none; color: var(--text); }
.lang-menu a.is-active { font-weight: 700; color: var(--brand); }
.login-lang { display: flex; justify-content: flex-end; margin-bottom: 8px; }
@media (max-width: 640px) { .lang-switch .lang-code { display: none; } }
