/* ---------- Design tokens (from the design canvas) ---------- */
:root {
  --ink: #1B2430;
  --ink-2: #2C3A4F;
  --brand: #1F3A5F;
  --accent: #E8772E;
  --accent-soft: #FFF4EC;
  --paper: #EEF0EA;
  --surface: #FFFFFF;
  --surface-2: #F7F8F5;
  --border: #DDE1D9;
  --muted: #6B7280;
  --text-2: #4B5563;
  --success: #2E7D4F;
  --success-soft: #E1F2E7;
  --warning: #B4700A;
  --warning-soft: #FBEBD2;
  --danger: #C8322B;
  --danger-soft: #FBE9E7;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Commissioner', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; }
h1:focus { outline: none; }
button { font-family: inherit; }
a { color: var(--brand); }
a:hover { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.grow { flex-grow: 1; }
.row { display: flex; align-items: center; gap: 10px; }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100vh; overflow: hidden; }
.shell-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.rail {
  width: 76px; flex-shrink: 0; background: var(--ink);
  display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 6px;
}
.rail-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.rail-item {
  width: 56px; height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: #AEB8C6; font-size: 10px; font-weight: 600;
}
.rail-item:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); }
.rail-item.active { background: var(--ink-2); color: #FFFFFF; }
.rail-spacer, .topbar-spacer { flex-grow: 1; }
.rail-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #FFF; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-top: 10px; }

/* ---------- Top bar ---------- */
.topbar {
  height: 68px; flex-shrink: 0; padding: 0 24px; display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar-title { display: flex; flex-direction: column; gap: 2px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.date-nav { display: flex; align-items: center; gap: 6px; }
.date-nav h1 { font-size: 20px; text-transform: capitalize; }
.icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--surface-2); }
.depot-chip { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-weight: 500; }

.btn {
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFF; font-weight: 700; }
.btn-primary:hover:not(:disabled) { background: #D3681F; }
.link-btn { background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; font-size: 12px; padding: 0; }
.link-btn:hover { color: var(--accent); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #FFF; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { margin: 12px 24px 0; padding: 10px 14px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 8px; }
.alert-error { background: var(--danger-soft); border: 1px solid #F1C4C0; color: #7A1F1A; }
.alert-close { margin-left: auto; background: none; border: 0; font-size: 18px; cursor: pointer; color: inherit; }
.loading { padding: 40px; color: var(--muted); text-align: center; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding: 16px 24px 0; flex-shrink: 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1; }
.kpi-note { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi-note.success { color: var(--success); font-weight: 600; }
.kpi-note.warning { color: var(--warning); font-weight: 600; }
.kpi-note.danger { color: var(--danger); font-weight: 600; }

/* ---------- Plan grid ---------- */
.plan-grid { flex: 1; display: grid; grid-template-columns: 330px minmax(0, 1fr) 380px; gap: 14px; padding: 14px 24px 20px; min-height: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-head { padding: 14px 16px 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--paper); flex-shrink: 0; }
.panel-head.column { flex-direction: column; align-items: stretch; gap: 8px; }
.panel-title { font-size: 15px; font-weight: 700; }
.panel-body { flex: 1; overflow-y: auto; min-height: 0; }
.panel-body.list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.empty-state { padding: 28px 16px; text-align: center; color: var(--text-2); }
.empty-state p { margin: 0 0 6px; }

.swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--route-color, #999); flex-shrink: 0; }
.plate { font-size: 15px; font-weight: 700; }
.plate.large { font-size: 16px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warning { color: var(--warning); background: var(--warning-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }

.truck-card {
  text-align: left; width: 100%; border-radius: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--paper);
  display: flex; flex-direction: column; gap: 8px; cursor: pointer; color: inherit;
}
.truck-card:hover { border-color: var(--border); background: var(--surface-2); }
.truck-card.selected { background: var(--accent-soft); border: 1.5px solid var(--route-color); }
.truck-head { display: flex; align-items: center; gap: 10px; }
.truck-stats { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.truck-stats strong { color: var(--ink); }
.load-row { display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; height: 8px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar-fill { height: 100%; background: var(--route-color, var(--brand)); border-radius: 999px; }

.idle-card { border-radius: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px dashed #C9D0C3; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.idle-card strong { color: var(--text-2); }
.unassigned-card { border-radius: 12px; padding: 10px 12px; background: var(--danger-soft); border: 1px solid #F1C4C0; display: flex; flex-direction: column; gap: 6px; }
.unassigned-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--danger); flex-shrink: 0; }

/* ---------- Map ---------- */
.map-panel { position: relative; }
.map { position: absolute; inset: 0; }
.map-overlay { position: absolute; z-index: 2; display: flex; gap: 8px; }
.map-overlay.top-left { top: 14px; left: 14px; }
.map-overlay.bottom-left { bottom: 14px; left: 14px; }
.chip { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chip-dark { background: var(--ink); border-color: var(--ink); color: #FFF; }
.chip-dark:hover { background: var(--ink-2); }
.legend { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; gap: 14px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.lg-depot { background: var(--ink); border-radius: 3px !important; width: 13px !important; height: 13px !important; }
.lg-stop { background: #FFF; border: 2.5px solid var(--brand); }
.lg-tight { background: var(--warning); }
.lg-late { background: var(--danger); }
.lg-unassigned { width: 0 !important; height: 0 !important; border-radius: 0 !important; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--danger); }
.map-pop { font-family: var(--font); font-size: 12px; line-height: 1.4; }
.maplibregl-popup-content { padding: 8px 10px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.maplibregl-ctrl-top-right { top: 14px; right: 14px; }

/* ---------- Stops ---------- */
.chips { flex-wrap: wrap; gap: 6px; }
.chip-stat { font-size: 12px; font-weight: 600; background: var(--paper); padding: 4px 10px; border-radius: 999px; }
.stops-header, .stop-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 88px 52px; gap: 0 8px; align-items: center; }
.stops-header { padding: 8px 16px 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.panel-body.stops { gap: 2px; }
.stop-row { width: 100%; text-align: left; padding: 8px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: inherit; }
.stop-row:hover { background: var(--surface-2); }
.stop-row.kind-depotstart, .stop-row.kind-depotend { background: var(--surface-2); }
.stop-row.flag-late { background: var(--danger-soft); border-color: #F1C4C0; }
.stop-row.flag-tight { background: var(--warning-soft); }
.seq { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #FFF; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.kind-depotstart .seq, .kind-depotend .seq { background: var(--ink); }
.flag-late .seq { background: var(--danger); }
.flag-tight .seq { background: var(--warning); }
.stop-main { display: flex; flex-direction: column; min-width: 0; }
.stop-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flag-text { font-size: 11px; font-weight: 600; color: #A32820; }
.window { font-size: 12px; color: var(--text-2); }
.arrival { font-size: 13px; font-weight: 700; }
.flag-late .arrival { color: var(--danger); }
.flag-tight .arrival { color: var(--warning); }
.flag-ok.kind-delivery .arrival { color: var(--success); }

/* ---------- Placeholder pages ---------- */
.placeholder { padding: 40px; }
.placeholder h1 { font-size: 24px; margin-bottom: 8px; }

/* ---------- Blazor defaults ---------- */
#blazor-error-ui { color-scheme: light only; background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,0.2); display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Παρουσιάστηκε σφάλμα."; }

/* ---------- Tables and simple pages ---------- */
.page-body { flex: 1; padding: 16px 24px 20px; min-height: 0; overflow: auto; }
.page-body.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--paper); vertical-align: middle; }
.table tr:hover td { background: var(--surface-2); }
.table th.right, .table td.right { text-align: right; }
.table-foot { padding: 10px 12px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.badge-info { color: var(--brand); background: #E3EBF5; }
.badge-neutral { color: var(--text-2); background: var(--paper); }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); width: 320px; }
.search input { border: 0; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); flex: 1; outline: none; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
a.btn { text-decoration: none; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(27,36,48,0.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--surface); border-radius: 16px; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.modal-head { padding: 18px 20px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--paper); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input[type=date], .field select { height: 38px; border-radius: 8px; border: 1px solid var(--border); padding: 0 10px; font-family: inherit; font-size: 14px; color: var(--ink); background: var(--surface); }
.dropzone { border: 1.5px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; background: var(--surface-2); }
.dropzone input { font-family: inherit; }
.result-box { border-radius: 12px; padding: 12px 14px; background: var(--success-soft); font-size: 13px; }
.result-box.warn { background: var(--warning-soft); }
.result-box ul { margin: 6px 0 0; padding-left: 18px; }
.result-box li { margin: 2px 0; }

/* ---------- Stop actions ---------- */
.stop-actions { display: flex; align-items: center; gap: 4px; }
.mini-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 12px; line-height: 1; color: var(--ink); padding: 0; }
.mini-btn:hover:not(:disabled) { background: var(--paper); }
.mini-btn:disabled { opacity: 0.35; cursor: default; }
.mini-select { height: 24px; border-radius: 6px; border: 1px solid var(--border); font-family: inherit; font-size: 11px; color: var(--ink); background: var(--surface); max-width: 110px; }
.stop-row.editable { grid-template-columns: 30px minmax(0, 1fr) 88px 52px auto; }
.stop-row.editable .stop-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
.route-tools { display: flex; gap: 6px; margin-left: auto; }
.locked-tag { font-size: 11px; font-weight: 700; color: var(--brand); background: #E3EBF5; padding: 3px 8px; border-radius: 999px; }
.busy-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; z-index: 3; font-weight: 600; color: var(--text-2); }

/* ---------- Live page ---------- */
.live-stats { display: flex; gap: 22px; }
.live-stats > div { display: flex; flex-direction: column; align-items: flex-end; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 700; }
.event-row { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--paper); font-size: 13px; line-height: 1.4; align-items: flex-start; }
.event-time { font-size: 12px; font-weight: 700; color: var(--muted); width: 40px; flex-shrink: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dot-success { background: var(--success); } .dot-warning { background: var(--warning); } .dot-danger { background: var(--danger); }
.truck-card.state-completed { opacity: 0.6; }
.stop-row.status-completed .seq { background: #B5BBB0; } .stop-row.status-failed .seq { background: var(--danger); } .stop-row.status-arrived .seq { background: var(--warning); } .stop-row.status-enroute .seq { background: var(--accent); } .stop-row.status-pending .seq { background: var(--paper); color: var(--ink); }


/* ---------- Forms ---------- */
.modal-wide { width: 860px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.modal-wide .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.modal:not(.modal-wide) .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }
.input { height: 38px; border-radius: 8px; border: 1px solid var(--border); padding: 0 10px; font-family: inherit; font-size: 14px; color: var(--ink); background: var(--surface); width: 100%; }
.input:focus { outline: 2px solid #C9D8EA; border-color: var(--brand); }
input.input[type=color] { padding: 2px 4px; }
.form-error { color: var(--danger); font-weight: 600; margin: 4px 0 0; }
.window-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.window-row .input { width: 130px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .mini-btn { margin-left: 4px; width: 28px; height: 28px; font-size: 13px; }
.row-inactive td { color: var(--muted); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #FFF; }
.alert-info { background: #E3EBF5; border: 1px solid #C9D8EA; color: var(--brand); }
.page-body .panel { overflow: visible; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.login-card { width: 400px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px 28px; box-shadow: 0 10px 30px rgba(27,36,48,0.08); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.validation-message { color: var(--danger); font-size: 12px; }

/* ---------- Branch picker, rail user ---------- */
.branch-picker { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--brand); font-weight: 600; font-size: 13px; }
.branch-picker select { border: 0; background: transparent; font: inherit; color: inherit; font-weight: 600; outline: none; cursor: pointer; max-width: 260px; }
.branch-picker.static { color: var(--ink); }
.rail-user { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 6px; }
.rail-avatar-link { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: #9AA6B5; padding: 4px 6px; border-radius: 10px; }
.rail-avatar-link:hover, .rail-avatar-link.active { color: #FFF; background: rgba(255,255,255,0.08); }
.rail-avatar-link .rail-avatar { margin-top: 0; }
.rail-avatar-link.active .rail-avatar { box-shadow: 0 0 0 2px #FFF; }
.rail-avatar-name { font-size: 10px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-page { max-width: 1040px; }
.account-card { display: flex; align-items: center; gap: 20px; padding: 20px 24px; margin-bottom: 16px; flex-wrap: wrap; }
.account-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #FFF; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }
.account-id { flex: 1; min-width: 220px; }
.account-id h2 { margin: 0 0 2px; font-size: 20px; }
.account-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.account-facts { display: flex; gap: 24px; margin: 0; }
.account-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.account-facts dd { margin: 2px 0 0; font-weight: 600; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.account-security { margin: 0; padding-left: 18px; color: #3D4652; font-size: 13px; line-height: 1.5; }
.account-security li + li { margin-top: 6px; }
.rail-logout { background: transparent; border: 0; color: #9AA6B5; font: inherit; font-size: 10px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.rail-logout:hover { color: #FFF; background: rgba(255,255,255,0.08); }
.rail-version { font-size: 9px; color: #5F6B7A; margin-top: 2px; letter-spacing: 0.02em; }
.geo-stats { display: flex; flex-wrap: wrap; gap: 18px 28px; padding: 14px 16px; align-items: flex-start; border-bottom: 1px solid var(--paper); }
.geo-stats > div { display: flex; flex-direction: column; gap: 2px; }
.geo-num { font-size: 22px; font-weight: 700; line-height: 1.1; }
.geo-meta { flex-basis: 100%; }
.geo-log { padding: 8px 16px 10px; }
.geo-log summary { cursor: pointer; }
.geo-log .table { margin-top: 8px; }
.result-box-error { border-color: var(--danger); background: #fdecec; }
.jobs-stats { display: flex; flex-wrap: wrap; gap: 18px 28px; padding: 14px 16px; border-bottom: 1px solid var(--paper); }
.jobs-stats > div { display: flex; flex-direction: column; gap: 2px; }
.check-list { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.check-list .check { white-space: nowrap; }
.branch-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #E3EBF5; color: var(--brand); font-size: 11px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.tag.shared { background: #FBEBDD; color: var(--warning); }

/* ---------- Docs ---------- */
.docs h2 { font-size: 16px; margin: 22px 0 8px; color: var(--brand); }
.docs h2:first-child { margin-top: 0; }
.docs p, .docs li { font-size: 14px; line-height: 1.5; }
.docs pre { background: #1B2430; color: #E6EDF3; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
.docs code { font-family: ui-monospace, Consolas, monospace; }
.docs p code, .docs li code { background: #EEF0EA; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

/* ---------- Public landing page ---------- */
.landing { background: var(--paper); color: var(--ink); min-height: 100vh; font-size: 15px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.landing-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.landing-nav nav { display: flex; align-items: center; gap: 22px; }
.landing-nav nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.landing-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding: 64px 40px 40px; max-width: 1180px; margin: 0 auto; }
.landing-hero h1 { font-size: 40px; line-height: 1.12; margin: 10px 0 16px; color: var(--brand); }
.landing-hero p { font-size: 17px; line-height: 1.55; color: #3D4652; margin: 0 0 22px; }
.landing-cta { display: flex; gap: 12px; margin-bottom: 26px; }
.landing-stats { display: flex; gap: 28px; }
.landing-stats div { display: flex; flex-direction: column; } .landing-stats strong { font-size: 22px; color: var(--accent); } .landing-stats span { font-size: 12px; color: var(--muted); }
.landing-art svg { display: block; filter: drop-shadow(0 12px 30px rgba(27,36,48,0.10)); }
.landing-section { max-width: 1180px; margin: 0 auto; padding: 48px 40px; }
.landing-section.alt { max-width: none; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing-section.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.landing-section h2 { font-size: 26px; color: var(--brand); margin: 0 0 18px; }
.landing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.landing-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.landing-card h3 { margin: 0 0 8px; font-size: 16px; } .landing-card p { margin: 0; color: #3D4652; line-height: 1.5; font-size: 14px; }
.landing-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.landing-steps li { display: flex; gap: 16px; align-items: baseline; padding: 12px 16px; background: var(--paper); border-radius: 10px; }
.landing-steps strong { min-width: 110px; color: var(--accent); }
.landing-two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.landing-two p { line-height: 1.55; color: #3D4652; }
.landing-list { padding-left: 18px; color: #3D4652; line-height: 1.6; }
.landing-contact { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 10px; }
.landing-contact div { display: flex; flex-direction: column; gap: 2px; } .landing-contact a { color: var(--brand); }
.landing-footer { text-align: center; padding: 26px; color: var(--muted); font-size: 13px; } .landing-footer a { color: var(--brand); }
@media (max-width: 900px) { .landing-hero, .landing-two { grid-template-columns: 1fr; } .landing-grid { grid-template-columns: 1fr; } .landing-nav { padding: 12px 16px; } .landing-nav nav a:not(.btn) { display: none; } .landing-hero { padding: 32px 16px; } .landing-section { padding: 32px 16px; } .landing-hero h1 { font-size: 30px; } }
.rail-admin { color: var(--accent); }
.row-current td { background: #FBEBDD; }

.pick-map { width: 100%; height: 420px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }

.area-map { height: 480px; }

.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field .btn { white-space: nowrap; height: 38px; }
.btn svg { flex-shrink: 0; }

.area-panel { padding: 12px 14px; border-bottom: 1px solid var(--border); background: #FBEBDD; }
.area-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; margin-bottom: 4px; }
.check-list.column { flex-direction: column; gap: 6px; }
.btn-on { background: var(--accent); border-color: var(--accent); color: #FFF; }

.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi .kpi-value { font-size: 24px; }
