/* WorkControl – Vehicles list */
:root {
  --bg: #010B1E;
  --surface: #071530;
  --surface-head: #0A1A3A;
  --surface-hover: #0E1D3D;
  --border: #15264A;
  --border-row: #112141;
  --border-input: #22386A;
  --text: #FFFFFF;
  --text-soft: #DCE5F5;
  --text-muted: #A9B8D4;
  --blue: #1E8BFF;
  --blue-light: #33B6FF;
  --blue-btn: #1570EF;
  --blue-active: #0D2A5C;
  --green: #9BE82A;
  --green-bg: #17300F;
  --amber: #FFB020;
  --amber-bg: #33260A;
  --red: #FF8A8A;
  --red-bg: #3A1420;
  --font-body: Inter, system-ui, sans-serif;
  --font-head: Montserrat, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; }
a { color: var(--text-muted); text-decoration: none; }
a:hover { color: var(--text); }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Layout */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 248px; padding: 28px 20px; display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--border); }
.content { flex: 999 1 560px; min-width: 0; padding: 36px clamp(16px, 4%, 48px) 56px; }
.content-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

/* Sidebar */
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 72px; height: 48px; object-fit: contain; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: -0.3px; color: var(--text); }
.brand-name span { color: var(--blue); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 10px; font-weight: 500; border: 1px solid transparent; }
.nav a[aria-current="page"] { font-weight: 600; color: var(--text); background: var(--blue-active); border-color: var(--blue); }
.nav a[aria-current="page"] svg { stroke: var(--blue-light); }

/* Page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { margin: 0 0 6px; font-family: var(--font-head); font-weight: 700; font-size: 32px; letter-spacing: -0.5px; }
.page-head p { margin: 0; color: var(--text-muted); }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--blue-btn); color: var(--text); font-size: 15px; font-weight: 600; }
.btn-primary:hover { background: #1B7BFF; }

/* Summary cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.stat-label { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.stat-value { font-family: var(--font-head); font-weight: 700; font-size: 28px; }
.stat-value.is-blue { color: var(--blue-light); }
.stat-value.is-amber { color: var(--amber); }
.stat-value.is-red { color: #FF7A7A; }

/* Table card */
.card { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 13px; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: 10px; border: 1px solid var(--border-input); background: var(--bg); color: var(--text); font-family: inherit; font-size: 15px; }
.search input::placeholder { color: #8496B5; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-muted); background: transparent; border: 1px solid var(--border-input); }
.pill[aria-pressed="true"] { color: var(--text); background: var(--blue-active); border-color: var(--blue); }

.table-wrap { overflow-x: auto; }
.cars-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; }
.cars-table thead tr { background: var(--surface-head); }
.cars-table th { padding: 0; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; white-space: nowrap; }
.cars-table th.col-actions { padding: 0 20px; text-align: right; }
.sort-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 20px; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; }
.sort-btn:hover, th[aria-sort="ascending"] .sort-btn, th[aria-sort="descending"] .sort-btn { color: var(--text); }
.sort-arrow { color: var(--blue-light); font-size: 11px; width: 10px; }
.cars-table tbody tr { border-bottom: 1px solid var(--border-row); }
.cars-table tbody tr:hover { background: var(--surface-hover); }
.cars-table td { padding: 12px 20px; color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cars-table td.col-actions { padding: 6px 12px; text-align: right; }
.plate { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #2A4479; background: var(--bg); color: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.vignette { display: flex; align-items: center; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.is-valid { color: var(--green); background: var(--green-bg); }
.badge.is-soon { color: var(--amber); background: var(--amber-bg); }
.badge.is-expired { color: var(--red); background: var(--red-bg); }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); }
.icon-btn:hover { background: #12244A; color: var(--text); }
.empty { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
[hidden] { display: none !important; }
