/* Evidență Șoferi — stiluri (mobil întâi, fără dependențe) */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e2e7ef;
  --border-strong: #cfd7e3;
  --text: #162033;
  --muted: #5f6c84;
  --brand: #16325c;
  --brand-2: #1e4380;
  --primary: #1f5bd1;
  --primary-hover: #1a4fb8;
  --primary-soft: #e8effd;
  --success: #15803d;
  --success-soft: #e5f5ea;
  --warning: #a35a06;
  --warning-soft: #fdf2df;
  --danger: #c0312f;
  --danger-soft: #fcebea;
  --neutral-soft: #eef1f5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --topbar-h: 58px;
  --sidebar-w: 248px;
  --focus: 0 0 0 3px rgba(31, 91, 209, .25);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522;
    --surface: #161e2e;
    --surface-2: #1b2436;
    --border: #283348;
    --border-strong: #35425c;
    --text: #e6ebf3;
    --muted: #9aa7bd;
    --brand: #0f2240;
    --brand-2: #183563;
    --primary: #5b8cf0;
    --primary-hover: #739ef4;
    --primary-soft: #1d2b4a;
    --success: #4cc27a;
    --success-soft: #16301f;
    --warning: #f0a84a;
    --warning-soft: #33260f;
    --danger: #f07571;
    --danger-soft: #3a1b1b;
    --neutral-soft: #222c3f;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; margin-top: 1rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--neutral-soft); padding: .1em .35em; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 650; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }
.negative { color: var(--danger) !important; }
.danger-text { color: var(--danger) !important; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- Bara de sus ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; padding-left: max(14px, env(safe-area-inset-left));
  background: var(--brand); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: .98rem; white-space: nowrap; }
.brand-company { font-size: .75rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.icon-btn .icon { width: 22px; height: 22px; }
.topbar .icon-btn, .topbar a { color: #fff; }
.badge-dot {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; }
.user-chip:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; }
.user-name { display: none; font-size: .9rem; }
.inline-form { display: inline; margin: 0; }
.nav-toggle { margin-left: -6px; }

/* ---------- Structură ---------- */
.shell { display: block; }
.main { padding: 18px 14px 28px; max-width: 1240px; margin: 0 auto; min-width: 0; }
.sidebar {
  position: fixed; z-index: 40; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w);
  padding: 14px 10px; background: var(--surface); border-right: 1px solid var(--border);
  overflow-y: auto; transform: translateX(-102%); transition: transform .2s ease;
}
.nav-open .sidebar { transform: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.nav-backdrop { display: none; }
.nav-open .nav-backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 35; background: rgba(10, 16, 30, .4); }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text); font-weight: 550; margin-bottom: 2px;
}
.nav-link .icon { width: 20px; height: 20px; color: var(--muted); }
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary); }
.nav-link.active .icon { color: var(--primary); }
.nav-badge { margin-left: auto; background: var(--warning); color: #fff; border-radius: 10px; font-size: .75rem; font-weight: 700; padding: 1px 8px; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.nav-section { font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 4px; }

/* Șofer pe mobil: bară de navigare jos */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.tab .icon { width: 23px; height: 23px; }
.tab.active { color: var(--primary); }
.tab:hover { text-decoration: none; }
.role-driver .main { padding-bottom: 96px; }
.role-driver .sidebar { display: none; }

@media (min-width: 960px) {
  .user-name { display: inline; }
  .nav-toggle { display: none; }
  .shell {
    display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h));
    background: linear-gradient(90deg, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px), var(--border) var(--sidebar-w), transparent var(--sidebar-w));
  }
  .sidebar, .role-driver .sidebar {
    display: block; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    transform: none; box-shadow: none;
  }
  .nav-backdrop, .nav-open .nav-backdrop { display: none; }
  .main { padding: 26px 30px 40px; width: 100%; }
  .tabbar { display: none; }
  .role-driver .main { padding-bottom: 40px; }
}

/* ---------- Titlu pagină ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head p { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; margin-bottom: 4px; }

/* ---------- Carduri ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-highlight { border-color: var(--success); background: linear-gradient(0deg, var(--surface), var(--success-soft)); }
.card.narrow { max-width: 520px; }
.card.center { margin: 40px auto; text-align: center; }
.columns { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
.columns > .card, .columns > .stack { margin-bottom: 16px; }
.columns > .stack > .card:last-child { margin-bottom: 0; }
@media (min-width: 960px) { .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card { padding: 20px; } }
.empty { color: var(--muted); padding: 14px 0; margin: 0; }

/* ---------- Statistici ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 14px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.45rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-sub { font-size: .78rem; color: var(--muted); }
.stat-accent { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.stat-accent .stat-label, .stat-accent .stat-sub { color: rgba(255, 255, 255, .8); }
.stat-accent .negative { color: #ffb4b0 !important; }
.stats-sm .stat-value { font-size: 1.15rem; }
.stats-driver { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 560px) {
  .stats-driver { grid-template-columns: 1fr 1fr; }
  .stats-driver .stat-accent { grid-column: 1 / -1; order: -1; }
  .stats-driver .stat-accent .stat-value { font-size: 1.9rem; }
  .stats-driver .stat:not(.stat-accent) .stat-value { font-size: 1.12rem; }
}

/* ---------- Pastile / chip-uri ---------- */
.chips, .presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .85rem;
}
.chip:hover { text-decoration: none; border-color: var(--border-strong); }
.chip .icon { color: var(--muted); }
.chip-warn { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.chip-warn .icon { color: var(--warning); }
.chip-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.chip-danger .icon { color: var(--danger); }
.chip-info { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.chip-info .icon { color: var(--primary); }
.chip-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .84rem; font-weight: 600; color: var(--text); }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=search],
input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); min-height: 44px;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, summary:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input-money { font-variant-numeric: tabular-nums; font-weight: 650; }
.input-lg { font-size: 1.4rem; }
.field-error { color: var(--danger); font-size: .82rem; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inline-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex-direction: row; }
.inline-grid .field { flex: 1 1 160px; }
.inline-grid .field.grow { flex: 3 1 220px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters input, .filters select { width: auto; flex: 1 1 160px; min-height: 40px; padding: 8px 10px; font-size: 15px; }
.filters .btn { flex: none; }
.inline-field { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); flex: 1 1 190px; }
.inline-field input { flex: 1; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border-radius: 9px; font-weight: 650; font-size: .9rem; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); outline: 1px solid var(--border); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 650; font-size: .92rem;
  cursor: pointer; text-decoration: none !important; white-space: nowrap; line-height: 1.2;
  background: var(--neutral-soft); color: var(--text);
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.07); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.inline-details { display: inline-block; position: relative; }
.inline-details.block { display: block; margin-top: 10px; }
.inline-details[open] > summary { background: var(--danger-soft); }
.inline-details.block[open] > summary { background: var(--primary-soft); margin-bottom: 12px; }
.popover-form {
  margin-top: 8px; padding: 12px; min-width: 250px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
}
@media (min-width: 720px) { .popover-form { position: absolute; right: 0; z-index: 10; width: 300px; } }
.help summary { color: var(--primary); font-size: .88rem; margin: 10px 0 6px; }

/* ---------- Mesaje ---------- */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 550; }
.flash .icon { margin-top: 2px; }
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-warning { background: var(--warning-soft); color: var(--warning); }
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translate(-50%, 20px); z-index: 60;
  padding: 9px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 24px; } }

/* ---------- Etichete status ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--neutral-soft); color: var(--muted); }
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-approved { background: var(--primary-soft); color: var(--primary); }
.badge-paid { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-cancelled, .badge-voided, .badge-neutral { background: var(--neutral-soft); color: var(--muted); }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); padding: 10px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .details { min-width: 180px; }
.actions-col { white-space: nowrap; text-align: right; }
.row-voided td { color: var(--muted); }
.row-voided .num { text-decoration: line-through; }
.row-empty td { color: var(--muted); }
.kind { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.kind-due { color: var(--primary); }
.kind-payment { color: var(--success); }
.amount-pay { color: var(--success); }

@media (max-width: 719px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; flex: none; }
  .table-stack td.num { text-align: right; }
  .table-stack .details { min-width: 0; flex-direction: column; align-items: flex-end; }
  .table-stack .details::before { align-self: flex-start; }
  .table-stack .actions-col { justify-content: flex-end; flex-wrap: wrap; }
  .table-stack .actions-col::before { display: none; }
  .table-stack .bar-col { display: none; }
  .table-stack tfoot { display: block; }
  .table-stack tfoot tr { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .table-stack tfoot td { display: inline; width: auto; padding: 0; border: 0; }
}

.bar-col { width: 28%; min-width: 120px; }
.bar { display: block; width: 100%; height: 7px; margin: 3px 0; border: 0; border-radius: 4px; background: var(--neutral-soft); }
.bar::-webkit-meter-bar { background: var(--neutral-soft); border: 0; border-radius: 4px; height: 7px; }
.bar-due::-webkit-meter-optimum-value { background: var(--primary); border-radius: 4px; }
.bar-paid::-webkit-meter-optimum-value { background: var(--success); border-radius: 4px; }
.bar-due::-moz-meter-bar { background: var(--primary); border-radius: 4px; }
.bar-paid::-moz-meter-bar { background: var(--success); border-radius: 4px; }
.legend-inline { font-weight: 500; font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot-due { background: var(--primary); }
.dot-paid { background: var(--success); margin-left: 8px; }

/* ---------- Liste ---------- */
.mini-list, .todo-list, .entry-list, .confirm-list, .request-mini, .notif-list, .checklist { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list.compact li { padding: 5px 0; font-size: .85rem; }
.todo-list li a { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; color: var(--text); }
.todo-list li a:hover { background: var(--surface-2); text-decoration: none; }
.todo-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--warning-soft); color: var(--warning); flex: none; }
.todo-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .9rem; }
.checklist .ok .icon { color: var(--success); }
.checklist .bad .icon { color: var(--danger); }
.checklist { margin-bottom: 16px; }
.dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 16px; margin: 0 0 14px; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; }

.entry { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; }
.entry-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.entry-due .entry-icon { background: var(--primary-soft); color: var(--primary); }
.entry-payment .entry-icon { background: var(--success-soft); color: var(--success); }
.entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry-title { font-weight: 650; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.entry-amount { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.entry-payment .entry-amount { color: var(--success); }
.entry-voided { opacity: .6; }
.entry-voided .entry-amount { text-decoration: line-through; }

.confirm-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.confirm-list .amount { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.confirm-list form { flex: none; }
@media (max-width: 480px) { .confirm-list form, .confirm-list .btn { width: 100%; } }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.action-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 650; text-align: center; box-shadow: var(--shadow); }
.action-tile .icon { width: 30px; height: 30px; color: var(--primary); }
.action-tile:hover { text-decoration: none; border-color: var(--primary); }

.request-mini li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.request-mini li:last-child { border-bottom: 0; }
.request-mini-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.request-mini .amount { font-size: 1.15rem; font-weight: 750; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.request-list { display: flex; flex-direction: column; }
.request { border-left: 4px solid var(--border-strong); }
.request-pending { border-left-color: var(--warning); }
.request-approved { border-left-color: var(--primary); }
.request-paid { border-left-color: var(--success); }
.request-rejected { border-left-color: var(--danger); }
.request-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.request-body { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: flex-start; }
.request-amount { display: flex; flex-direction: column; }
.request-amount .amount { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.request-amount .amount-sm { font-size: 1rem; }
.request-text { flex: 1 1 240px; font-size: .9rem; }
.request-text p { margin: 0 0 4px; }
.request-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.request-actions .inline-grid { flex: 1 1 420px; }

.notif-list li a { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-list li a:hover { background: var(--surface-2); text-decoration: none; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif-list .unread .notif-dot { background: var(--primary); }
.notif-list .unread .notif-title { font-weight: 700; }
.notif-main { display: flex; flex-direction: column; min-width: 0; }
.notif-body { font-size: .9rem; color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-size: .85rem; }

/* ---------- Calendar ---------- */
.calendar-card { padding: 10px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-head { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-head .long { display: none; }
.cal-day { min-height: 74px; padding: 4px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day.weekend { background: var(--neutral-soft); }
.cal-day.holiday { background: var(--warning-soft); }
.cal-day.out { opacity: .45; }
.cal-day.today { outline: 2px solid var(--primary); outline-offset: -1px; }
.cal-num { font-size: .8rem; font-weight: 700; }
.cal-holiday { font-size: .62rem; color: var(--warning); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leave-pill { display: block; font-size: .64rem; font-weight: 650; padding: 1px 4px; border-radius: 4px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leave-pill:hover { text-decoration: none; filter: brightness(1.1); }
.leave-pill.pending { background: transparent !important; border: 1px dashed currentColor; }
.c1 { background: #2563eb; } .leave-pill.pending.c1 { color: #2563eb; }
.c2 { background: #0f9f6e; } .leave-pill.pending.c2 { color: #0f9f6e; }
.c3 { background: #c2410c; } .leave-pill.pending.c3 { color: #c2410c; }
.c4 { background: #7c3aed; } .leave-pill.pending.c4 { color: #7c3aed; }
.c5 { background: #be185d; } .leave-pill.pending.c5 { color: #be185d; }
.c6 { background: #0e7490; } .leave-pill.pending.c6 { color: #0e7490; }
.c7 { background: #a16207; } .leave-pill.pending.c7 { color: #a16207; }
.c8 { background: #475569; } .leave-pill.pending.c8 { color: #64748b; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .85rem; }
.legend .leave-pill { display: inline-block; font-size: .75rem; padding: 2px 8px; }
.legend-holiday { background: var(--warning-soft); color: var(--warning); padding: 2px 8px; border-radius: 4px; font-size: .75rem; font-weight: 650; }
@media (min-width: 720px) {
  .cal-head .long { display: inline; }
  .cal-head .short { display: none; }
  .cal-day { min-height: 104px; padding: 6px; }
  .leave-pill { font-size: .74rem; padding: 2px 6px; }
  .cal-holiday { font-size: .7rem; white-space: normal; }
}

/* ---------- Autentificare ---------- */
.minimal { background: radial-gradient(1200px 600px at 50% -200px, var(--brand-2), var(--bg) 70%); min-height: 100vh; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 48px 16px; }
.auth-wrap:has(.wide) { max-width: 660px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: #fff; }
.auth-brand img { border-radius: 10px; }
.auth-app { font-size: 1.25rem; font-weight: 750; }
.auth-company { opacity: .8; font-size: .9rem; }
.auth-card { padding: 24px; }
.auth-card h1 { margin-bottom: 14px; }

.error-trace { text-align: left; overflow: auto; font-size: .75rem; background: var(--surface-2); padding: 10px; border-radius: 8px; max-height: 50vh; }
.audit-details pre { white-space: pre-wrap; word-break: break-word; font-size: .75rem; background: var(--surface-2); padding: 8px; border-radius: 8px; margin: 6px 0 0; text-align: left; }
.leave-preview { font-weight: 600; margin: 0; }
.leave-preview.ok { color: var(--primary); }
.push-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.push-status { width: 100%; margin: 0; font-weight: 600; }
.stack { min-width: 0; }

@media print {
  .topbar, .sidebar, .tabbar, .filters, .presets, .btn, .toast, .request-actions, form { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* Sumă + monedă pe același rând */
.amount-row { display: flex; gap: 10px; align-items: flex-start; }
.amount-row > .field:first-child { flex: 1 1 auto; }
.amount-row .field-currency { flex: 0 0 116px; }
.stat-value-2 { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.stat-accent .stat-value-2 { color: #fff; }
.stats-driver .stat-accent .stat-value-2 { font-size: 1.15rem; }

/* Categorii plată */
.chips-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-select label { position: relative; cursor: pointer; }
.chips-select input { position: absolute; opacity: 0; pointer-events: none; }
.chips-select span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); font-weight: 600; font-size: .88rem; background: var(--surface); }
.chips-select input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips-select input:focus-visible + span { box-shadow: var(--focus); }
.badge-cat { margin-right: 4px; }
.cat-avans { background: var(--primary-soft); color: var(--primary); }
.cat-bonus { background: var(--success-soft); color: var(--success); }
.cat-incarcare { background: var(--warning-soft); color: var(--warning); }

/* Perioade de lucru */
.work-on { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--success); }
.work-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.work-off { color: var(--muted); font-weight: 600; }
.period-card { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; justify-content: space-between; }
.period-figures { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.period-figures div { display: flex; flex-direction: column; }
.period-figures .big { font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.row-void td { color: var(--muted); text-decoration: line-through; }
.row-void td.keep { text-decoration: none; }

/* Flotă */
.deadline { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: .85rem; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.deadline-expired { background: var(--danger-soft); color: var(--danger); }
.deadline-urgent { background: var(--danger-soft); color: var(--danger); }
.deadline-soon { background: var(--warning-soft); color: var(--warning); }
.deadline-ok { background: var(--success-soft); color: var(--success); }
.doc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.plate { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 750; letter-spacing: .03em; padding: 2px 8px; border: 2px solid var(--text); border-radius: 6px; background: var(--surface); color: var(--text); white-space: nowrap; }
a .plate:hover { border-color: var(--primary); color: var(--primary); }
.alert-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.alert-list li:last-child { border-bottom: 0; }
.alert-list { list-style: none; margin: 0; padding: 0; }
.card-highlight-soft { background: var(--success-soft); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
.card-highlight-soft .inline-grid { flex: 1 1 320px; }
.plate-lg { font-size: 1.1rem; vertical-align: middle; }

/* Import din Excel */
.steps { margin: 0 0 10px; padding-left: 22px; }
.steps li { margin: 0 0 8px; line-height: 1.5; }
.import-types { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.import-types .card { margin-bottom: 0; display: flex; flex-direction: column; align-items: flex-start; }
.import-types .card h2 { display: flex; align-items: center; gap: 8px; }
.import-types .card p { flex: 1; }
.segmented-wrap { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.issue-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.issue-list li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.issue-list li:last-child { border-bottom: 0; }
.issue-list .badge { margin-right: 6px; }
