/* ATOS design system — navy/teal identity from the ADEL TRANSPORT business card, layout after the approved dashboard concept. */
:root {
  --navy: #01121a; --navy-2: #08202d; --navy-3: #0f2e3f;
  --teal: #2fb5a2; --teal-600: #23988a; --teal-50: #e6f6f3; --teal-100: #c9ece6;
  --slate: #2f4a72;
  --bg: #f2f5f8; --card: #ffffff; --card-2: #f8fafc;
  --text: #0e2230; --text-2: #3b5162; --muted: #6a7f8d; --border: #e2e8ee; --border-2: #cfd8e0;
  --red: #d64545; --red-50: #fdecec; --orange: #d98a1c; --orange-50: #fdf3e2; --green: #1f9d6b; --green-50: #e5f6ee; --blue: #2f6fd6; --blue-50: #e8f0fc;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(1,18,26,.05), 0 6px 20px rgba(1,18,26,.06);
  --shadow-lg: 0 10px 40px rgba(1,18,26,.18);
  --sidebar-w: 268px; --topbar-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a1a24; --card: #0f2432; --card-2: #12293a; --text: #e6eef3; --text-2: #b5c6d2; --muted: #86a0b1;
  --border: #1d3a4d; --border-2: #2a4a60; --teal-50: rgba(47,181,162,.14); --teal-100: rgba(47,181,162,.25);
  --red-50: rgba(214,69,69,.15); --orange-50: rgba(217,138,28,.15); --green-50: rgba(31,157,107,.16); --blue-50: rgba(47,111,214,.18);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1a24; --card: #0f2432; --card-2: #12293a; --text: #e6eef3; --text-2: #b5c6d2; --muted: #86a0b1;
    --border: #1d3a4d; --border-2: #2a4a60; --teal-50: rgba(47,181,162,.14); --teal-100: rgba(47,181,162,.25);
    --red-50: rgba(214,69,69,.15); --orange-50: rgba(217,138,28,.15); --green-50: rgba(31,157,107,.16); --blue-50: rgba(47,111,214,.18);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; } h2 { font-size: 18px; font-weight: 650; } h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 .75em; }
a { color: var(--teal-600); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex: none; vertical-align: -.2em; }
.only-dark { display: none; } :root[data-theme="dark"] .only-dark { display: inline-flex; } :root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: inline-flex; } :root:not([data-theme="light"]) .only-light { display: none; } }
.only-mobile { display: none; }
.muted { color: var(--muted); } .nowrap { white-space: nowrap; } .right { text-align: right; } .mono { font-variant-numeric: tabular-nums; }
.grow { flex: 1; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #cfe0e8; display: flex; flex-direction: column; z-index: 40; overflow-y: auto; padding: 18px 14px 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; color: #fff; text-decoration: none !important; }
.brand img { border-radius: 10px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 20px; letter-spacing: .12em; }
.brand-txt small { font-size: 10.5px; letter-spacing: .14em; color: #8fb2c1; text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-link, .nav-group-btn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: #b9cfda; font-weight: 550; font-size: 14.5px; text-decoration: none !important; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.nav-link:hover, .nav-group-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgba(47,181,162,.28), rgba(47,181,162,.10)); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.nav-group-btn .chev { margin-left: auto; transition: transform .2s; opacity: .7; }
.nav-group.open .nav-group-btn { color: #fff; } .nav-group.open .chev { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 2px; padding: 2px 0 6px 20px; margin-left: 17px; border-left: 1px solid rgba(255,255,255,.1); }
.nav-group.open .nav-sub { display: flex; }
.nav-sub .nav-link { font-size: 14px; padding: 8px 12px; font-weight: 500; }
.side-foot { padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 12px; color: #6f92a3; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.brand-foot b { color: var(--teal); letter-spacing: .1em; }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.search { flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; height: 44px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; min-width: 0; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-50); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; min-width: 42px; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); cursor: pointer; padding: 0 10px; }
.icon-btn:hover { border-color: var(--border-2); color: var(--text); }
.lang-code { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.user-btn { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 10px 4px 4px; cursor: pointer; height: 46px; }
.user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.2; } .user-meta b { font-size: 14px; } .user-meta small { color: var(--muted); font-size: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--teal), var(--slate)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
.dropdown-menu.right { left: auto; right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; border: 0; background: none; color: var(--text); font-size: 14px; cursor: pointer; text-align: left; text-decoration: none !important; justify-content: flex-start; }
.dd-item:hover { background: var(--card-2); } .dd-item.on { color: var(--teal-600); font-weight: 650; }
.dd-item .ic:last-child:not(:first-child) { margin-left: auto; }
.content { padding: 26px 28px 60px; max-width: 2000px; width: 100%; }
.scrim { display: none; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; } .crumbs a { color: var(--muted); } .crumbs .sep { display: inline-flex; opacity: .6; }
.subtitle { color: var(--muted); margin: 4px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .grid-side > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 10px; }
.card-head .ic-chip { width: 34px; height: 34px; border-radius: 10px; background: var(--teal-50); color: var(--teal-600); display: inline-flex; align-items: center; justify-content: center; }
.grid { display: grid; gap: 18px; } .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack > * + * { margin-top: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 16px; display: flex; gap: 14px; align-items: center; text-decoration: none !important; color: inherit; transition: transform .15s, border-color .15s; }
a.kpi:hover { transform: translateY(-2px); border-color: var(--teal); }
.kpi-ic { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.kpi-ic.t-teal { background: linear-gradient(135deg, #37c2ae, #23988a); } .kpi-ic.t-blue { background: linear-gradient(135deg, #4a86e8, #2f5fb3); } .kpi-ic.t-orange { background: linear-gradient(135deg, #f0a43a, #d17d0f); } .kpi-ic.t-red { background: linear-gradient(135deg, #e86464, #c23636); } .kpi-ic.t-slate { background: linear-gradient(135deg, #4a6a99, #2f4a72); } .kpi-ic.t-green { background: linear-gradient(135deg, #3fbf8a, #1f9d6b); }
.kpi > div { min-width: 0; }
.kpis-biz { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (min-width: 1300px) { .kpis-biz { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpis-biz .kpi-v { white-space: nowrap; font-size: 26px; }
.kpi-v { font-size: 28px; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; } .kpi-l { color: var(--muted); font-size: 13px; margin-top: 2px; } .kpi-s { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.hello h1 span { color: var(--teal-600); }
.hero-strip { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 60%, #16495a 100%); color: #d9e9ef; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; display: flex; align-items: center; gap: 22px; box-shadow: var(--shadow); }
.hero-strip img { border-radius: 14px; }
.hero-strip h2 { color: #fff; font-size: 20px; } .hero-strip p { margin: 4px 0 0; color: #9bbac8; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-primary { background: linear-gradient(135deg, #35bda9, #23988a); color: #fff; box-shadow: 0 2px 8px rgba(35,152,138,.35); } .btn-primary:hover { filter: brightness(1.05); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--border-2); } .btn-ghost:hover { background: var(--card-2); }
.btn-danger { background: var(--red); color: #fff; } .btn-danger-ghost { background: var(--card); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); } .btn-danger-ghost:hover { background: var(--red-50); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; } .btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.inline-form { display: inline; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid > .field, .form-grid > .full { grid-column: span 12; } .col-6 { grid-column: span 6 !important; } .col-4 { grid-column: span 4 !important; } .col-3 { grid-column: span 3 !important; } .col-8 { grid-column: span 8 !important; } .col-12 { grid-column: span 12 !important; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); } .field .req { color: var(--red); margin-left: 3px; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .plain-input { width: 100%; min-height: 44px; border: 1px solid var(--border-2); background: var(--card); border-radius: 12px; padding: 10px 14px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-50); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field .help { color: var(--muted); font-size: 12.5px; } .field .err { color: var(--red); font-size: 12.5px; font-weight: 550; }
.field input[readonly] { background: var(--card-2); color: var(--text-2); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; } .check input { width: 18px; height: 18px; accent-color: var(--teal-600); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.fieldset { border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 0; } .fieldset legend { font-weight: 650; padding: 0 8px; color: var(--text-2); font-size: 13.5px; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters .plain-input { min-height: 40px; width: auto; min-width: 150px; padding: 8px 12px; }
.filters .grow { min-width: 200px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th a.sort { color: inherit; } .tbl td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover td { background: var(--card-2); }
.tbl .cell-main { font-weight: 600; color: var(--text); } .tbl .cell-sub { color: var(--muted); font-size: 12.5px; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl tr.is-archived td { opacity: .55; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 12px; flex-wrap: wrap; } .pager-info { color: var(--muted); font-size: 13px; margin-top: 12px; } .pager .pager-info { margin: 0; }
.pager-links { display: flex; gap: 4px; } .pg { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); font-size: 13.5px; text-decoration: none !important; } .pg.active { background: var(--navy); color: #fff; border-color: var(--navy); } .pg.gap { border: 0; background: none; }

/* ---------- Badges, alerts, misc ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--card-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-green { background: var(--green-50); color: var(--green); border-color: transparent; } .badge-red { background: var(--red-50); color: var(--red); border-color: transparent; } .badge-orange { background: var(--orange-50); color: var(--orange); border-color: transparent; } .badge-blue { background: var(--blue-50); color: var(--blue); border-color: transparent; } .badge-teal { background: var(--teal-50); color: var(--teal-600); border-color: transparent; }
.flash { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 550; border: 1px solid transparent; }
.flash-ok { background: var(--green-50); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); } .flash-err { background: var(--red-50); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.flash span { flex: 1; } .flash-x { background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 2px; display: inline-flex; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--blue-50); color: var(--text-2); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent); margin-bottom: 16px; } .notice.warn { background: var(--orange-50); border-color: color-mix(in srgb, var(--orange) 30%, transparent); } .notice .ic { margin-top: 2px; color: var(--blue); } .notice.warn .ic { color: var(--orange); }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); } .empty .ic { color: var(--teal); opacity: .8; margin-bottom: 8px; } .empty h3 { color: var(--text); margin-bottom: 4px; } .empty p { max-width: 420px; margin: 0 auto 14px; }
.dl { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 10px 18px; margin: 0; } .dl dt { color: var(--muted); font-size: 13.5px; } .dl dd { margin: 0; font-weight: 550; word-break: break-word; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; } .tab { padding: 11px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; } .tab.active { color: var(--teal-600); border-color: var(--teal); }
.list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); } .list li:last-child { border-bottom: 0; } .list .li-main { flex: 1; min-width: 0; } .list .li-main b { display: block; } .list .li-main small { color: var(--muted); }
.mini-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--teal-50); color: var(--teal-600); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mini-ic.orange { background: var(--orange-50); color: var(--orange); } .mini-ic.red { background: var(--red-50); color: var(--red); } .mini-ic.blue { background: var(--blue-50); color: var(--blue); }
.plate { display: inline-block; white-space: nowrap; font-weight: 800; letter-spacing: .08em; background: #fff; color: #111; border: 2px solid #1a3a8a; border-left-width: 8px; border-radius: 6px; padding: 1px 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .plate { background: #f4f7fa; }
.due-soon { color: var(--orange); font-weight: 650; } .due-late { color: var(--red); font-weight: 650; }
pre.debug { text-align: left; background: var(--navy); color: #cfe; padding: 14px; border-radius: 10px; overflow: auto; max-width: 720px; margin: 16px auto; font-size: 12.5px; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card-2); border: 1px dashed var(--border-2); border-radius: 10px; padding: 12px 14px; word-break: break-all; letter-spacing: .06em; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .recovery .code-box { text-align: center; }
dialog.confirm { border: 0; border-radius: 16px; padding: 24px; max-width: 420px; width: calc(100% - 32px); background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); } dialog.confirm::backdrop { background: rgba(1,18,26,.55); backdrop-filter: blur(3px); } dialog.confirm h3 { margin-bottom: 8px; } dialog.confirm .btn-row { justify-content: flex-end; margin-top: 18px; }

/* ---------- Timeline (assignments) ---------- */
.tl { position: relative; }
.tl-row { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); } .tl-row:last-child { border-bottom: 0; }
.tl-label { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; height: 30px; background: var(--card-2); border-radius: 8px; overflow: hidden; }
.tl-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: linear-gradient(90deg, var(--teal), #3fc6b2); color: #fff; font-size: 11.5px; font-weight: 650; padding: 0 8px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-decoration: none !important; }
.tl-bar.alt { background: linear-gradient(90deg, #4a86e8, #5b95f0); } .tl-bar.alt2 { background: linear-gradient(90deg, #f0a43a, #f5b458); } .tl-bar.alt3 { background: linear-gradient(90deg, #7a64d6, #8f7be2); } .tl-bar.open { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-bar.override { outline: 2px dashed var(--orange); outline-offset: -2px; }
.tl-axis { display: grid; grid-template-columns: 200px 1fr; gap: 14px; color: var(--muted); font-size: 12px; margin-bottom: 6px; } .tl-axis .ticks { position: relative; height: 16px; } .tl-axis .tick { position: absolute; transform: translateX(-50%); } .tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); opacity: .7; z-index: 2; }

/* ---------- Auth & installer ---------- */
.auth-body { background: radial-gradient(1200px 600px at 70% -10%, #0f4a55 0%, transparent 60%), linear-gradient(180deg, var(--navy) 0%, #031b27 100%); min-height: 100vh; color: #d7e6ee; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; gap: 22px; }
.auth-brand { text-align: center; } .auth-brand img { width: min(240px, 60vw); height: auto; mix-blend-mode: lighten; } .auth-tag { color: #7fa4b4; letter-spacing: .2em; font-size: 11.5px; text-transform: uppercase; margin-top: 4px; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); color: var(--text); border-radius: 22px; padding: 30px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; } .auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.auth-card .form-grid { gap: 14px; } .auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 14px; }
.auth-foot { text-align: center; color: #6f92a3; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lang-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; } .lang-pill { background: rgba(255,255,255,.07); color: #b9cfda; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; } .lang-pill.on { background: var(--teal); color: #032; border-color: var(--teal); font-weight: 700; }
.auth-card.wide { max-width: 720px; }
.steps { display: flex; gap: 6px; margin-bottom: 22px; } .steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--border); } .steps i.on { background: var(--teal); }
.req-list { list-style: none; padding: 0; margin: 0 0 16px; } .req-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); } .req-list .ok { color: var(--green); } .req-list .bad { color: var(--red); } .req-list li span.grow { flex: 1; }
.error-page { text-align: center; padding: 60px 16px; } .error-code { font-size: 84px; font-weight: 800; letter-spacing: -.04em; color: var(--teal); line-height: 1; } .error-page h1 { margin: 10px 0 6px; } .error-page p { color: var(--muted); } .error-actions { margin-top: 20px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; } .qr svg, .qr canvas { display: block; width: 190px; height: 190px; }

/* ---------- Splash (installed PWA) ---------- */
.atos-splash { position: fixed; inset: 0; z-index: 9999; background: radial-gradient(900px 500px at 50% 30%, #0f4a55 0%, transparent 70%), var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; opacity: 0; transition: opacity .45s; }
.atos-splash.show { opacity: 1; } .atos-splash.hide { opacity: 0; pointer-events: none; }
.atos-splash img { width: min(280px, 64vw); transform: scale(.94); transition: transform 1.4s cubic-bezier(.2,.8,.2,1); } .atos-splash.show img { transform: scale(1); }
.atos-splash .sp-name { color: #cfe8ee; letter-spacing: .32em; font-size: 12px; text-transform: uppercase; opacity: .8; }
.atos-splash .sp-bar { width: 140px; height: 3px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; } .atos-splash .sp-bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width 1.8s ease-out; } .atos-splash.show .sp-bar i { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .grid-side { grid-template-columns: minmax(0, 1fr); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .only-mobile { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: none; padding-top: calc(18px + env(safe-area-inset-top)); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(1,18,26,.55); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 14px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); }
  .content { padding: 18px 14px 60px; }
  .user-meta { display: none; } .user-btn { padding-right: 6px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .col-6, .col-4, .col-3, .col-8 { grid-column: span 12 !important; }
  h1 { font-size: 22px; }
  .tl-row, .tl-axis { grid-template-columns: 110px 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; } .dl dt { margin-top: 10px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .kpi { padding: 14px; flex-direction: column; align-items: flex-start; gap: 10px; } .kpi-v { font-size: 24px; } .kpis-biz .kpi-v { font-size: 19px; }
  .page-head { align-items: stretch; } .page-actions .btn { flex: 1; }
  .search input::placeholder { font-size: 13px; }
  .topbar { gap: 8px; } .top-actions { gap: 6px; } .search { padding: 0 10px; gap: 8px; } .user-btn .ic { display: none; } .user-btn { padding: 4px; }
  .card { padding: 16px; border-radius: 14px; }
  .form-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .sidebar, .topbar, .page-actions, .form-actions { display: none !important; } .main { margin: 0; } body { background: #fff; } .card { box-shadow: none; } }

/* ---- Phase 2-3 additions ---- */
.fold { margin-top: 14px; }
.fold > summary { list-style: none; cursor: pointer; display: inline-flex; }
.fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { margin-bottom: 12px; }
.fold[open] > form { padding: 14px; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; }
.fold-inline { display: inline-block; margin: 0; vertical-align: middle; }
.fold-inline[open] { display: block; margin-top: 10px; }
td.actions .fold-inline[open] > form { min-width: 300px; text-align: left; }
.inline-label { color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; }
.field .static { padding: 10px 0; }

/* ---------- Phase 4: driver app (phone first) ---------- */
body.drv { background: var(--bg); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.drv-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--navy); color: #fff; }
.drv-brand { display: flex; align-items: center; gap: 10px; color: #fff; letter-spacing: .12em; } .drv-brand:hover { text-decoration: none; } .drv-brand img { border-radius: 9px; }
.drv-top-r { display: flex; gap: 6px; align-items: center; } .drv-top .icon-btn { background: transparent; border-color: rgba(255,255,255,.18); color: #cfe8ee; }
.drv-top form { margin: 0; }
.drv-offline { display: flex; align-items: center; gap: 8px; background: var(--orange); color: #fff; padding: 8px 14px; font-weight: 600; font-size: 13.5px; }
.drv-main { max-width: 640px; margin: 0 auto; padding: 16px 14px 24px; }
.drv-main .card { margin-bottom: 14px; } .drv-main .card + .card { margin-top: 14px; }
.drv-h1 { font-size: 24px; margin: 4px 0 12px; } .drv-sub { margin: -6px 0 12px; } .drv-hint { color: var(--muted); font-size: 12.5px; text-align: center; margin: 12px 0 0; }
.drv-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.drv-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(1,18,26,.08); }
.drv-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; min-height: 56px; } .drv-nav a:hover { text-decoration: none; }
.drv-nav a.on { color: var(--teal-600); }
.drv-vehicle { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.drv-vehicle .plate { font-size: 19px; padding: 4px 14px; } .drv-vehicle small { display: block; color: var(--muted); }
.drv-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.drv-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-radius: 18px; color: #fff; min-height: 128px; justify-content: flex-end; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.drv-tile:hover { text-decoration: none; filter: brightness(1.05); } .drv-tile:active { transform: scale(.98); }
.drv-tile .ic { position: absolute; top: 14px; right: 14px; opacity: .55; width: 38px; height: 38px; }
.drv-tile b { font-size: 18px; line-height: 1.15; } .drv-tile small { opacity: .85; font-size: 12.5px; line-height: 1.25; }
.drv-tile.t-teal { background: linear-gradient(135deg, #2fb5a2, #1c7f74); } .drv-tile.t-blue { background: linear-gradient(135deg, #3f7fe0, #2451a6); }
.drv-tile.t-orange { background: linear-gradient(135deg, #e39a2e, #b5690a); } .drv-tile.t-red { background: linear-gradient(135deg, #e05252, #a52b2b); }
.drv-tile.t-violet { background: linear-gradient(135deg, #7d62d9, #4f3aa0); } .drv-tile.t-navy { background: linear-gradient(135deg, #1e4a63, #08202d); }
.btn-lg { height: 54px; padding: 0 20px; font-size: 16px; border-radius: 14px; } .btn-xl { height: 60px; width: 100%; font-size: 18px; border-radius: 16px; margin-top: 8px; }
.photo-box { background: var(--card); border: 2px dashed var(--border-2); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.photo-box.has-error { border-color: var(--red); }
.photo-btns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; } .photo-btns .btn { cursor: pointer; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--card-2); border: 1px solid var(--border); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-doc { display: flex; align-items: center; justify-content: center; font-size: 11px; padding: 4px; text-align: center; word-break: break-all; }
.thumb-x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.drv-form .field input:not([type=checkbox]), .drv-form .field select, .drv-form .field textarea { min-height: 50px; font-size: 17px; }
.drv-form .big-input { font-size: 30px !important; min-height: 68px !important; text-align: center; font-weight: 700; letter-spacing: .04em; }
.drv-grid { gap: 12px; } .drv-grid > .col-6 { grid-column: span 6; } .drv-grid > .col-12, .drv-grid > .full { grid-column: span 12; }
@media (max-width: 420px) { .drv-grid > .col-6 { grid-column: span 12; } }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; } .gallery .thumb { width: 120px; height: 120px; }
.gallery .thumb em { position: absolute; left: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; background: var(--green); color: #fff; } .gallery .thumb em.bad { background: var(--red); }
.thumb-file { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 4px; color: var(--muted); padding: 6px; text-align: center; word-break: break-all; font-size: 11px; }
.notice.ok { background: var(--green-50); } .notice.flags ul { margin: 6px 0 0; padding-left: 18px; }
.flag-count { display: inline-flex; align-items: center; gap: 2px; color: var(--orange); font-size: 12px; font-weight: 700; }
.cell-ic { color: var(--muted); vertical-align: -.2em; } .small { font-size: 12.5px; }
.drv-queue .list li { align-items: center; }

/* ---------- Phase 5: notifications ---------- */
.bell { position: relative; } .bell-n { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--teal-600); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bell-hot .bell-n { background: var(--red); }
.notif-list li.unread { background: color-mix(in srgb, var(--teal) 7%, transparent); border-radius: 10px; }
.mini-ic.red { background: var(--red-50); color: var(--red); }
.approve-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; } .approve-form .plain-input { min-width: 180px; height: 34px; }
.approvals li { flex-wrap: wrap; }

/* ASLAN chat */
.aslan { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.aslan-side { display: grid; gap: 12px; } .aslan-convs li.on { background: var(--teal-50); border-radius: 10px; } .aslan-convs a { display: block; padding: 8px 10px; color: var(--text); } .aslan-convs a:hover { text-decoration: none; } .aslan-convs small { display: block; color: var(--muted); }
.aslan-main { display: grid; gap: 12px; }
.aslan-thread { min-height: 320px; max-height: 58vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); word-wrap: break-word; }
.bubble p { margin: 0 0 .5em; } .bubble p:last-child { margin-bottom: 0; } .bubble ul { margin: .3em 0; padding-left: 20px; } .bubble small { display: block; margin-top: 6px; }
.bubble.me { align-self: flex-end; background: var(--teal-50); border-color: var(--teal-100); } .bubble.err { border-color: var(--red); background: var(--red-50); } .bubble.thinking { opacity: .8; }
.aslan-empty { text-align: center; margin: auto; padding: 20px; max-width: 520px; } .aslan-empty .mini-ic { margin: 0 auto 10px; }
.aslan-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.chip { border: 1px solid var(--border-2); background: var(--card); color: var(--text-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px; } .chip:hover { border-color: var(--teal); color: var(--teal-600); }
.aslan-form { display: flex; gap: 10px; align-items: flex-end; } .aslan-form textarea { flex: 1; resize: vertical; min-height: 44px; } .aslan-form.busy { opacity: .7; }
.aslan-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#aslan-mic.rec { background: #e04a4a; color: #fff; border-color: #e04a4a; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,74,74,.5); } 50% { box-shadow: 0 0 0 8px rgba(224,74,74,0); } }
@media (prefers-reduced-motion: reduce) { #aslan-mic.rec { animation: none; } }
.peppol-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #e5e9ef); } .peppol-box h3 { font-size: 15px; margin: 0 0 8px; }
.aslan-foot { margin: 0; }
@media (max-width: 900px) { .aslan { grid-template-columns: 1fr; } .bubble { max-width: 96%; } .aslan-thread { max-height: 50vh; } }
pre.code { background: var(--bg-soft, rgba(127,127,127,.12)); padding: 12px 14px; border-radius: 10px; overflow: auto; font-size: 12.5px; }
