/* Anamira ERP v2 — "Lagoon": airy white surfaces, vibrant turquoise, sky blue and sunny coral accents.
   Light is the default; dark is available from the moon button. */
:root {
  --bg: #f3f8fb; --surface: #ffffff; --surface-2: #edf4f8; --line: #e1eaf1; --line-2: #cbd8e3;
  --ink: #13202d; --ink-2: #3c4b5c; --muted: #677789;
  --brand: #0a857b; --brand-2: #08736a; --brand-ink: #ffffff; --brand-soft: #dcf6f1;
  --accent: #0284c7; --coral: #ff6b4a; --coral-soft: #ffe9e3;
  --gold: #f59e0b; --gold-soft: #fff4d6;
  --green: #12924f; --green-soft: #dcf7e7; --blue: #1f6fe0; --blue-soft: #e2edfe; --amber: #b86e00; --amber-soft: #fff1d4;
  --orange: #d9560b; --orange-soft: #ffe8d6; --red: #d6283a; --red-soft: #ffe3e6; --violet: #7048e8; --violet-soft: #eee8ff; --gray-soft: #edf1f5;
  --side: #ffffff; --side-ink: #2c3b4b; --side-muted: #7d8c9c; --side-hover: #eaf7f5; --side-strong: #0a857b; --side-line: #e1eaf1;
  --grad: linear-gradient(135deg, #0aa596 0%, #0284c7 100%);
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(19,32,45,.05), 0 8px 26px -14px rgba(10,80,110,.25);
  --font: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1520; --surface: #151e2b; --surface-2: #1b2636; --line: #253246; --line-2: #314158;
  --ink: #eef3f9; --ink-2: #bdc9d8; --muted: #8796aa; --brand: #2dd4bf; --brand-2: #5eead4; --brand-ink: #04211d; --brand-soft: #123a3a;
  --accent: #38bdf8; --coral: #ff8a6b; --coral-soft: #3b2220;
  --gold: #fbbf24; --gold-soft: #3a2f12; --green: #4ade80; --green-soft: #12301f; --blue: #7cb4ff; --blue-soft: #18294a; --amber: #fbbf24; --amber-soft: #352a10;
  --orange: #fb923c; --orange-soft: #3a2414; --red: #fb7185; --red-soft: #3c1a22; --violet: #c4a5ff; --violet-soft: #2a2248; --gray-soft: #1f2a3a;
  --side: #111a26; --side-ink: #c9d5e3; --side-muted: #7d8da2; --side-hover: #1b2738; --side-strong: #ffffff; --side-line: #ffffff14;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6); color-scheme: dark;
  --grad: linear-gradient(135deg, #14b8a6 0%, #0284c7 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .45rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; display: flex; gap: .4rem; align-items: center; margin-bottom: .4rem; }
p { margin: .2rem 0; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
h1 .ic { color: var(--brand); }
.muted { color: var(--muted); } .small { font-size: .82rem; } .block { display: block; } .center { text-align: center; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: -.02em; }
.neg { color: var(--red); } .pos { color: var(--green); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.4rem; padding: 0 1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: 600 .88rem var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; }
.btn:active { transform: translateY(1px); } .btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(2,132,199,.6); } .btn.primary:hover { filter: brightness(1.07) saturate(1.1); }
.btn.ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); } .btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: transparent; }
.btn.sm { height: 2rem; padding: 0 .7rem; font-size: .8rem; } .btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); } .icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: .35rem .8rem; border-radius: 8px; font: 600 .8rem var(--font); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ── Shell ── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); border-inline-end: 1px solid var(--side-line); color: var(--side-ink); display: flex; flex-direction: column; padding: 1.1rem .8rem; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); padding: .2rem .5rem 1.2rem; text-decoration: none !important; }
.logo { width: 2.9rem; height: 2.9rem; border-radius: 50%; flex: none; background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-soft), 0 6px 14px -6px rgba(10,80,110,.45); }
.brand span { font-weight: 800; font-size: 1.02rem; line-height: 1.15; } .brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--side-muted); letter-spacing: .06em; text-transform: uppercase; }
.nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--side-muted); margin: 1rem .7rem .35rem; font-weight: 700; }
#nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 10px; color: var(--side-ink); font-weight: 500; text-decoration: none; position: relative; }
#nav a:hover { background: var(--side-hover); }
#nav a.on { background: var(--side-hover); color: var(--side-strong); font-weight: 700; }
#nav a.on::before { content: ''; position: absolute; inset-inline-start: -.8rem; top: .5rem; bottom: .5rem; width: 3px; border-radius: 3px; background: var(--grad); }
#nav a.on .ic { color: var(--side-strong); }
.side-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--side-line); }
.me { display: flex; gap: .6rem; align-items: center; padding: .3rem .4rem .6rem; } .me b { display: block; color: var(--ink); font-size: .88rem; }
.avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.side-tools { display: flex; gap: .2rem; } .side-tools .icon-btn { color: var(--side-muted); } .side-tools .icon-btn:hover { background: var(--side-hover); color: var(--side-strong); }
.body { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
#main { padding: 1.6rem 2rem 4rem; max-width: 1400px; width: 100%; outline: none; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .55rem 2rem; background: var(--gold-soft); border-bottom: 1px solid var(--line); font-size: .85rem; }
.demo-bar .ic { color: var(--amber); } .demo-bar label { margin-inline-start: auto; display: flex; gap: .4rem; align-items: center; font-weight: 600; }
.demo-bar select { padding: .25rem .5rem; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; }

/* ── Page furniture ── */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-bottom: 1rem; }
.search { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 .8rem; min-width: min(320px, 100%); flex: 0 1 320px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; height: 2.4rem; flex: 1; font: inherit; color: var(--ink); min-width: 0; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: .3rem .75rem; font: 600 .8rem var(--font); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.chip i { font-style: normal; color: var(--muted); font-weight: 500; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); } .chip.on i { color: inherit; opacity: .7; }
.chip.alert:not(.on) { border-color: var(--red); color: var(--red); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; min-width: 0; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.callout { display: flex; gap: .8rem; background: var(--brand-soft); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; } .callout > .ic { color: var(--brand); margin-top: .15rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); } .empty .ic { width: 2rem; height: 2rem; color: var(--line-2); }

/* ── Badges & plates ── */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); } .badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.amber { background: var(--amber-soft); color: var(--amber); } .badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.red { background: var(--red-soft); color: var(--red); } .badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.gray { background: var(--gray-soft); color: var(--muted); }
.plate { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); border-radius: 5px; overflow: hidden; font: 700 .78rem var(--mono); background: #fff; color: #111; line-height: 1.5; white-space: nowrap; direction: ltr; }
.plate i { font-style: normal; background: #111; color: #fff; padding: 0 .35rem; min-width: 1.4rem; text-align: center; } .plate { padding-inline-end: .4rem; gap: .35rem; }
.exp.amber { color: var(--amber); font-weight: 700; } .exp.red { color: var(--red); font-weight: 700; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tbl .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .act { text-align: end; white-space: nowrap; width: 1%; } .tbl .act .btn { margin-inline-start: .3rem; }

/* ── Forms ── */
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem 1rem; }
.fld { display: flex; flex-direction: column; gap: .3rem; min-width: 0; } .fld.span { grid-column: 1 / -1; }
.fld label { font-size: .78rem; font-weight: 700; color: var(--ink-2); } .req { color: var(--red); margin-inline-start: .15rem; }
.fld input, .fld select, .fld textarea { width: 100%; height: 2.5rem; padding: 0 .75rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; }
.fld textarea { height: auto; padding: .6rem .75rem; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fld.check label { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ink); cursor: pointer; } .fld.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.2rem; } .form-actions.wrap { flex-wrap: wrap; } .form-actions.center { justify-content: center; }
.form-error, .form-msg { margin-top: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red); font-weight: 600; }
.form-msg.ok { background: var(--green-soft); color: var(--green); }
fieldset { border: 0; padding: 0; margin: 0; }
.quote { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: 1.1rem; padding: .9rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.quote div { display: flex; flex-direction: column; } .quote span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.quote b { font-size: 1rem; font-variant-numeric: tabular-nums; } .quote .big b { font-size: 1.25rem; color: var(--brand); }
.avail { margin-top: .6rem; font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }

/* ── Modal & toasts ── */
.modal-wrap { position: fixed; inset: 0; background: rgba(12,16,16,.5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 1rem; z-index: 50; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); animation: pop .18s ease-out; }
.modal.wide { width: min(860px, 100%); }
.modal > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal > header h2 { font-size: 1.1rem; } .modal-body { padding: 1.2rem; overflow-y: auto; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } } @keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; bottom: 1.2rem; inset-inline-end: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 60; }
.toast { display: flex; gap: .6rem; align-items: center; padding: .75rem 1rem; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-weight: 600; max-width: 420px; animation: pop .2s; transition: opacity .3s, transform .3s; }
.toast-err { background: var(--red); color: #fff; } .toast.out { opacity: 0; transform: translateY(8px); }

/* ── Dashboard ── */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--brand-soft), transparent 70%); opacity: .9; }
.kpi span { font-size: .78rem; font-weight: 700; color: var(--muted); display: flex; gap: .4rem; align-items: center; z-index: 1; }
.kpi b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; z-index: 1; } .kpi b small { font-size: .9rem; color: var(--muted); font-weight: 600; margin-inline-start: .3rem; }
.kpi em { font-style: normal; font-size: .8rem; color: var(--muted); z-index: 1; }
.meter { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 6px; }
.meter.sm { width: 90px; display: inline-block; vertical-align: middle; margin-inline-end: .4rem; }
.fleet-strip { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pill { padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; text-decoration: none !important; }
.pill b { font-weight: 800; } .pill.available { background: var(--green-soft); color: var(--green); } .pill.rented { background: var(--blue-soft); color: var(--blue); } .pill.maintenance { background: var(--orange-soft); color: var(--orange); }
.dash-grid { display: grid; grid-template-columns: minmax(300px, 1fr) 2fr; gap: 1rem; align-items: start; }
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.alerts a { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .84rem; border-inline-start: 3px solid var(--line-2); }
.alerts a:hover { filter: brightness(.97); } .alerts span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerts em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.alerts .lvl3 a { border-color: var(--red); } .alerts .lvl3 .ic, .alerts .lvl3 em { color: var(--red); }
.alerts .lvl2 a { border-color: var(--amber); } .alerts .lvl2 .ic, .alerts .lvl2 em { color: var(--amber); }
.legend { display: flex; gap: .4rem .8rem; align-items: center; font-size: .76rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-inline-end: -.4rem; }
.legend .booked, .bar.booked { background: var(--amber-soft); color: var(--amber); border: 1px dashed var(--amber); }
.legend .active, .bar.active { background: var(--grad); color: #fff; }
.legend .overdue, .bar.overdue { background: var(--red); color: #fff; }
.legend .maint, .bar.maint { background: repeating-linear-gradient(45deg, var(--orange-soft) 0 6px, transparent 6px 12px); color: var(--orange); border: 1px solid var(--orange); }
.timeline { overflow-x: auto; } .tl-row { display: grid; grid-template-columns: 170px minmax(560px, 1fr); align-items: center; border-bottom: 1px solid var(--line); min-height: 2.6rem; }
.tl-row:last-child { border-bottom: 0; }
.tl-car { display: flex; flex-direction: column; gap: .1rem; padding: .3rem 0; } .tl-car small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 100%; min-height: 2.2rem; display: grid; grid-template-columns: repeat(14, 1fr); }
.tl-head .tl-track span { font-size: .72rem; font-weight: 700; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; line-height: 1.1; padding: .3rem 0; }
.tl-head .tl-track span small { color: var(--muted); font-weight: 500; } .tl-head .tl-track span.we { color: var(--gold); }
.tl-track .bar { position: absolute; top: .45rem; bottom: .45rem; border-radius: 7px; font-size: .72rem; font-weight: 700; padding: 0 .45rem; display: flex; align-items: center; gap: .3rem; overflow: hidden; white-space: nowrap; text-decoration: none !important; min-width: 6px; }
[dir="rtl"] .tl-track, [dir="rtl"] .tl-head .tl-track { direction: ltr; }
.tl-track .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); opacity: .8; }

/* ── Fleet board ── */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.car-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .3rem; border-top: 4px solid var(--green); }
.car-card.rented { border-top-color: var(--blue); } .car-card.maintenance { border-top-color: var(--orange); } .car-card.retired { border-top-color: var(--line-2); opacity: .7; }
.car-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; } .car-card h3 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 1.02rem; margin: 0; }
.car-card .price { font-size: 1.25rem; font-weight: 800; } .car-card .price small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.car-card footer { margin-top: auto; padding-top: .6rem; display: flex; justify-content: space-between; align-items: center; }

/* ── Rental detail ── */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.detail section { background: var(--surface-2); border-radius: var(--radius-sm); padding: .9rem 1rem; }
.money-box { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; } .money-box div { display: flex; justify-content: space-between; } .money-box span { color: var(--muted); }
.money-box .big { grid-column: 1 / -1; border-top: 1px solid var(--line-2); padding-top: .5rem; font-size: 1.1rem; }
h3.sub { margin: 1.3rem 0 .6rem; } .note { background: var(--gold-soft); padding: .7rem .9rem; border-radius: var(--radius-sm); margin-top: 1rem; }

/* ── Reports ── */
.bars { display: flex; gap: 1rem; align-items: flex-end; height: 200px; padding: .5rem 0 0; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: .3rem; }
.bar-pair { flex: 1; width: 100%; display: flex; gap: 4px; align-items: flex-end; justify-content: center; }
.bar-pair i { width: min(28px, 40%); border-radius: 6px 6px 0 0; min-height: 2px; } .bar-pair .rev { background: var(--grad); } .bar-pair .cost { background: var(--coral); opacity: .85; }
.bar-col span { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ── Team & settings ── */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.roles div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .8rem; display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; } .checks li { display: flex; gap: .5rem; } .checks .ic { color: var(--green); margin-top: .15rem; }

/* ── Auth ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(90% 70% at 0% 0%, #c9f3ec 0%, transparent 60%), radial-gradient(80% 60% at 100% 100%, #ffe1d6 0%, transparent 60%), linear-gradient(160deg, #f2fbfa, #eaf4fd); color: var(--ink-2); padding: 3rem; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; position: relative; overflow: hidden; }
:root[data-theme="dark"] .auth-art { background: radial-gradient(90% 70% at 0% 0%, #0f3b3a 0%, transparent 60%), radial-gradient(80% 60% at 100% 100%, #3a2220 0%, transparent 60%), var(--side); }
.auth-art::after { content: ''; position: absolute; inset-inline-end: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(2,132,199,.18), transparent 65%); pointer-events: none; }
.auth-art h1 { color: var(--ink); font-size: 2.2rem; line-height: 1.15; max-width: 460px; display: block; }
.auth-art h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; } .auth-art li { display: flex; gap: .6rem; align-items: center; } .auth-art li .ic { color: var(--brand); flex: none; width: 2rem; height: 2rem; padding: .45rem; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.brand.big { padding: 0; } .brand.big .logo { width: 6.5rem; height: 6.5rem; } .brand.big span { font-size: 1.4rem; } .brand.big small { color: var(--muted); }
.auth-box { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; max-width: 440px; width: 100%; margin: 0 auto; gap: .9rem; }
.auth-box h2 { font-size: 1.6rem; } .auth-box .form { display: grid; gap: .9rem; } .auth-top { display: flex; justify-content: flex-end; }
.auth-links { display: flex; justify-content: space-between; } .divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.wide-center { grid-column: 1 / -1; text-align: center; max-width: 520px; } .pending-ic .ic { width: 3rem; height: 3rem; color: var(--gold); }
.boot, .fatal { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: .5rem; text-align: center; padding: 2rem; } .fatal .ic { width: 2.5rem; height: 2.5rem; color: var(--red); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brand); animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* ── Print: only the contract ── */
#print { display: none; }
@media print {
  body > *:not(#print) { display: none !important; } #print { display: block; } body { background: #fff; color: #000; }
  .contract { font-size: 11pt; color: #000; } .contract header { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8pt; margin-bottom: 12pt; }
  .contract .c-logo { width: 60pt; height: 60pt; margin-inline-end: 10pt; } .contract .c-co { flex: 1; } .contract h1 { font-size: 18pt; } .contract h2 { font-size: 13pt; } .contract .r { text-align: right; } .contract h3 { color: #000; }
  .contract .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16pt; margin-bottom: 12pt; }
  .contract table { width: 100%; border-collapse: collapse; margin-bottom: 12pt; } .contract th, .contract td { border: 1px solid #999; padding: 5pt 7pt; text-align: left; }
  .contract th { background: #f2f2f2; width: 18%; } .contract .terms { font-size: 9pt; color: #333; }
  .contract .sign { display: flex; justify-content: space-between; margin-top: 50pt; } .contract .sign div { border-top: 1px solid #000; width: 40%; padding-top: 4pt; font-size: 9pt; }
}

/* ── Language & casing ── */
.chip, .badge, .car-card p, .pill { text-transform: capitalize; }
[dir="rtl"] .tbl td, [dir="rtl"] .tbl td small, [dir="rtl"] .alerts span, [dir="rtl"] .detail p { unicode-bidi: plaintext; }
.tl-car .plate, .tbl .plate { align-self: flex-start; }

/* ── Responsive ── */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  [dir="rtl"] .side { transform: translateX(100%); }
  .nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .topbar { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; font-weight: 800; }
  #main { padding: 1rem 1rem 4rem; } .demo-bar { padding: .5rem 1rem; } .demo-bar label { margin-inline-start: 0; }
  .auth { grid-template-columns: 1fr; } .auth-art { padding: 2rem 1.2rem; } .auth-art h1 { font-size: 1.5rem; } .auth-art ul { display: none; } .auth-box { padding: 1.5rem 1rem; }
  .detail { grid-template-columns: 1fr; } .quote { grid-template-columns: repeat(2, 1fr); }
  .search { flex: 1 1 100%; }
  /* tables become cards */
  .tbl thead { display: none; } .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: .5rem 0; } .tbl td { border: 0; padding: .25rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: end; }
  .tbl td::before { content: attr(data-label); font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: start; }
  .tbl td.act { width: 100%; justify-content: flex-end; } .tbl td.act::before { content: none; } .tbl .num { text-align: end; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } h1 { font-size: 1.3rem; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Lagoon accents ── */
.kpi { border-top: 3px solid var(--k, var(--brand)); }
.kpi:nth-child(4n+2) { --k: var(--accent); } .kpi:nth-child(4n+3) { --k: var(--coral); } .kpi:nth-child(4n+4) { --k: var(--gold); }
.kpi span .ic { color: var(--k, var(--brand)); }
.brand-sm { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; } .brand-sm .logo { width: 2rem; height: 2rem; box-shadow: 0 0 0 2px var(--brand-soft); }
