/* style.css - works for both RTL and LTR: use logical properties (inline-start/end), never left/right. */

:root {
  --ink: #12202f;
  --muted: #4a5b6c;
  --line: #dde3e9;
  --ground: #f4f6f8;
  --surface: #ffffff;
  --accent: #0b7a75;
  --accent-dark: #0a5f5b;
  --accent-soft: #e3f2f1;
  --amber: #f2a900;
  --amber-soft: #fff4d6;
  --amber-dark: #7a5200;
  --danger-soft: #fdecea;
  --danger: #9b1c12;
  --sidebar: #12202f;
  --sidebar-active: #24405c;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn-dark    { background: var(--ink); color: #fff; }
.btn-lg { min-height: 50px; padding: 0 30px; font-size: 17px; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 26px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.logo-light { color: #fff; }

/* ---------- Public layout ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; }
.site-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lang-link { font-weight: 700; padding: 8px 4px; }
.site-footer { color: var(--muted); font-size: 15px; }
.site-footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 32px; }
.site-footer strong { color: var(--ink); font-size: 18px; }

/* ---------- App layout (sidebar + content) ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar {
  flex: 1 1 240px; max-width: 260px;
  background: var(--sidebar); color: #fff;
  padding: 24px 16px; display: flex; flex-direction: column; gap: 24px;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  display: flex; align-items: center; min-height: 44px; padding-inline: 14px;
  border-radius: 10px; color: #c5d0dc; font-weight: 600;
}
.side-link:hover { background: rgba(255, 255, 255, 0.06); }
.side-link.is-active { background: var(--sidebar-active); color: #fff; font-weight: 700; }
.side-foot { margin-top: auto; border-top: 1px solid #2f4864; padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.app-main { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- Cards, chips, forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.chip-ok   { background: var(--accent-soft); color: var(--accent-dark); }
.chip-warn { background: var(--amber-soft); color: var(--amber-dark); }
.chip-off  { background: #e8ecf0; color: #33424f; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; min-height: 44px; padding: 8px 12px;
  border: 1.5px solid #b8c3ce; border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }

.flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; margin-block: 12px; }
.flash-success { background: var(--accent-soft); color: var(--accent-dark); }
.flash-error   { background: var(--danger-soft); color: var(--danger); }

/* ---------- Simple table ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th { text-align: start; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px; border-bottom: 1px solid #eef1f4; }

/* ---------- Setup check page ---------- */
.setup { max-width: 640px; margin: 48px auto; }
.setup h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.setup ul { padding-inline-start: 20px; line-height: 2; }
.setup .muted { color: var(--muted); }
.auth-card { max-width: 520px; margin: 48px auto; }
.auth-card h1 { margin-bottom: 8px; }
.auth-card p { margin-bottom: 20px; color: var(--muted); }

/* Phase 3: driver and region administration */
.page-heading {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.page-heading p {margin:5px 0 0;color:var(--muted)}
.form-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));align-items:end;gap:12px 18px;margin-top:16px}
.form-grid .field {margin-bottom:0}
.action-field {display:flex;flex-direction:row;align-items:flex-end;gap:10px;flex-wrap:wrap}
.action-row {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.action-row form {margin:0}
.btn-small {min-height:34px;padding:2px 12px;font-size:13px}
.btn-danger {background:var(--danger-soft);color:var(--danger);border-color:#f8c5bf}
.stat-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
.stat-number {font-size:28px;font-weight:800;margin:6px 0}
@media(max-width:700px){.app-main{padding:16px}.sidebar{max-width:none}.card{padding:16px}}

/* Phase 10: responsive, accessible dispatch board */
.dispatch-toolbar { display: grid; gap: 16px; }
.dispatch-board { display: flex; align-items: stretch; gap: 16px; overflow-x: auto; padding: 8px 0 24px; }
.dispatch-lane { flex: 0 0 300px; min-width: 280px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.dispatch-lane-header { display: grid; gap: 8px; padding: 5px 5px 12px; }
.dispatch-lane-header h2 { font-size: 17px; margin: 0; }
.dispatch-lane-header p { margin: 0; }
.dispatch-meter { background: #e0e7ed; height: 9px; overflow: hidden; border-radius: 20px; }
.dispatch-meter > span { display: block; height: 100%; border-radius: inherit; background: #118985; }
.dispatch-load-warning { color: #b3471e; }
.dispatch-load-warning strong { color: inherit; }
.dispatch-dropzone { min-height: 200px; padding: 6px; border: 2px dashed transparent; border-radius: 10px; }
.dispatch-dropzone.is-drop-target { border-color: #118985; background: #e5f6f4; }
.dispatch-invoice { background: #fff; border: 1px solid #dce5ea; border-radius: 10px; padding: 12px; margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, .04); }
.dispatch-invoice[draggable="true"] { cursor: grab; }
.dispatch-invoice.is-dragging { opacity: .45; }
.dispatch-invoice-head { display: flex; justify-content: space-between; gap: 6px; }
.dispatch-invoice p { margin: 8px 0 3px; }
.dispatch-invoice small { display: block; color: #57677a; overflow-wrap: anywhere; }
.dispatch-manual-form { display: flex; gap: 5px; margin-top: 12px; }
.dispatch-manual-form label { flex: 1; min-width: 0; }
.dispatch-manual-form select { width: 100%; min-width: 0; padding: 6px; }
.dispatch-locked { display: block; margin-top: 8px; color: #6a7480; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 650px) { .dispatch-board { flex-direction: column; overflow-x: visible; } .dispatch-lane { flex: 0 0 auto; width: 100%; } }

/* Phase 13: accessible mobile navigation and cleaner UI rhythm */
.app-main { min-width: 0; }
.card { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #0e9793; outline-offset: 3px; }
.side-link { transition: background-color .15s ease; }
.data { min-width: 550px; }
.table-wrap { overflow-x: auto; }
@media (max-width: 850px) {
    .app { display: block; }
    .sidebar { width: 100%; max-width: 100%; position: static; height: auto; padding: 12px; }
    .side-nav { display: flex; overflow-x: auto; gap: 5px; padding: 8px 0; }
    .side-link { flex: 0 0 auto; white-space: nowrap; }
    .side-foot { display: flex; gap: 8px; align-items: center; }
    .app-main { width: 100%; padding: 18px; }
    .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
}
@media (max-width: 500px) {
    .app-main { padding: 12px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-number { font-size: 22px; }
    .card { padding: 14px; }
}


/* ========================================================================
   Phase 16 · Unified product design
   Shared app shell, tables, forms, assignment board, responsive navigation.
   ======================================================================== */
:root {
    --ink: #152536;
    --muted: #627386;
    --line: #e2e9f0;
    --ground: #f5f8fb;
    --accent: #087f80;
    --accent-dark: #076b6c;
    --accent-soft: #e7f7f5;
    --sidebar: #102135;
    --sidebar-active: #203b56;
    --radius: 16px;
    --shadow-soft: 0 3px 16px rgba(23, 43, 63, .035);
}
body { font-size: 14px; }
.layout-app .app { min-height: 100vh; }
.layout-app .sidebar {
    width: 244px; min-width: 244px; max-width: 244px;
    padding: 26px 15px 17px; gap: 22px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.logo-light { font-size: 22px; letter-spacing: -.5px; padding-inline: 9px; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; }
.sidebar-caption { padding-inline: 17px; color: #7f9ab2; font-size: 10px; letter-spacing: 1.6px; font-weight: 800; }
.side-nav { gap: 4px; }
.side-link { gap: 12px; font-size: 13px; min-height: 43px; border-radius: 10px; padding-inline: 15px; }
.nav-symbol { width: 20px; flex: 0 0 20px; text-align: center; font-size: 18px; line-height: 1; opacity: .8; }
.side-link.is-active { background: #284761; box-shadow: inset 3px 0 0 #32c5bb; }
html[dir="rtl"] .side-link.is-active { box-shadow: inset -3px 0 0 #32c5bb; }
.side-foot { gap: 2px; }
.layout-app .app-main { padding: 0 32px 44px; gap: 22px; flex: 1; }
.app-topbar { min-height: 68px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.topbar-context { color: var(--muted); font-size: 12px; font-weight: 700; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.topbar-dot { display: inline-block; width: 8px; height: 8px; background: #16a889; border-radius: 50%; }
.mobile-bar, .sidebar-backdrop { display: none; }
.page-heading { padding-top: 4px; }
.page-heading h1 { font-size: clamp(23px, 2vw, 30px); line-height: 1.4; letter-spacing: -.55px; }
.page-heading p { font-size: 13px; }
.eyebrow { font-size: 11px!important; font-weight: 800; color: var(--accent)!important; letter-spacing: 1.1px; margin: 0 0 4px!important; }
.card { box-shadow: var(--shadow-soft); border-color: var(--line); }
.card h2 { font-size: 17px; }
.btn { font-size: 13px; min-height: 40px; transition: background-color .15s, transform .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: #d3dee8; }
input:not([type=checkbox]):not([type=radio]), select, textarea { max-width: 100%; }
input[type=date], input[type=text], input[type=number], input[type=email], input[type=password], select, textarea {
    border: 1px solid #ced9e3; border-radius: 9px; background: #fff; color: var(--ink); padding: 9px 11px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #b8ebe5; outline-offset: 0; border-color: var(--accent); }
.data th { background: #f8fafc; padding: 12px 14px; font-size: 12px; white-space: nowrap; }
.data td { padding: 13px 14px; font-size: 13px; vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: #fbfcfd; }
.stat-grid { gap: 14px; }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { min-height: 135px; position: relative; padding: 20px; }
.metric-icon { width: 34px; height: 34px; border-radius: 10px; background: #e9f5f5; color: #087c7b; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 8px; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-card .stat-number { font-size: 27px; margin: 4px 0 0; letter-spacing: -.6px; }
.metric-primary { background: linear-gradient(125deg,#0b7778,#0b9792); color: #fff; border-color: transparent; }
.metric-primary .metric-icon { background: #ffffff26; color: #fff; }
.metric-primary .metric-label { color: #dff6f3; }
.dashboard-filter { padding: 16px 20px; }
.dashboard-filter label { font-weight: 700; color: var(--muted); }
.dashboard-panels { display: grid; grid-template-columns: 1fr; gap: 18px; }
.dashboard-panel { padding: 0; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 22px 16px; }
.text-link { color: var(--accent-dark); font-weight: 800; font-size: 12px; }
.text-link:hover { text-decoration: underline; }
.empty-cell { color: var(--muted); text-align: center; padding: 26px!important; }
.status-pill { background: #edf5f6; border-radius: 8px; padding: 5px 9px; color: #17696c; font-weight: 700; font-size: 11px; }
.capacity-text { white-space: nowrap; }
.dispatch-lane { background: #f6f9fc; border-color: #e1e8ef; border-radius: 16px; }
.dispatch-lane-header h2 { font-weight: 800; }
.dispatch-invoice { box-shadow: 0 2px 8px #1a324012; border-color: #e0e9ef; }
.dispatch-invoice:hover { border-color: #82c3bd; }
.dispatch-dropzone.is-drop-target { outline: 2px solid #078581; outline-offset: -2px; }
@media (max-width: 1150px) { .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 850px) {
    .layout-app .app { display: block; }
    .layout-app .sidebar { width: 270px; min-width: 0; max-width: 85vw; height: 100dvh; position: fixed; top: 0; inset-inline-start: 0; z-index: 40; transform: translateX(-105%); transition: transform .22s ease; }
    html[dir="rtl"] .layout-app .sidebar { transform: translateX(105%); }
    .menu-open .sidebar, html[dir="rtl"] .menu-open .sidebar { transform: translateX(0); }
    .layout-app .side-nav { flex-direction: column; overflow: visible; }
    .layout-app .side-link { white-space: normal; }
    .layout-app .side-foot { display: flex; flex-direction: column; align-items: stretch; }
    .mobile-bar { display: flex; align-items: center; gap: 14px; background: var(--surface); padding: 12px 18px; border-bottom: 1px solid var(--line); }
    .menu-toggle { border: 1px solid var(--line); background: #fff; border-radius: 10px; height: 38px; width: 40px; color: var(--ink); cursor: pointer; }
    .mobile-brand { font-weight: 900; font-size: 19px; }
    .mobile-section { font-size: 12px; color: var(--muted); margin-inline-start: auto; }
    .menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: #0717279e; border: 0; z-index: 35; width: 100%; }
    .layout-app .app-main { padding: 0 18px 30px; }
    .app-topbar { min-height: 50px; }
    .dispatch-board { flex-direction: row; overflow-x: auto; }
    .dispatch-lane { flex: 0 0 290px; }
}
@media (max-width: 550px) {
    .layout-app .app-main { padding-inline: 12px; }
    .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .metric-card { min-height: 116px; padding: 13px; }
    .metric-card .stat-number { font-size: 23px; }
    .metric-icon { margin-bottom: 5px; width: 29px; height: 29px; }
    .dashboard-filter .action-row { align-items: stretch; }
    .dashboard-filter input[type=date] { flex: 1; }
    .panel-heading { padding: 17px 15px; }
    .dispatch-board { flex-direction: column; overflow-x: visible; }
    .dispatch-lane { flex: 0 0 auto; width: 100%; }
    .site-header-row { padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms!important; animation-duration: .01ms!important; } }

/* Phase 19–20: public site and Super Admin */
.marketing-hero { padding: 90px 0 80px; background: linear-gradient(135deg,#e9f8f5,#f6f9fc); color:#163449; }
.marketing-hero-grid { display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:center;gap:50px; }
.marketing-hero h1 { font-size:clamp(2rem,4.7vw,3.8rem);line-height:1.3;max-width:760px;margin:15px 0; }
.marketing-hero p { max-width:630px;font-size:1.05rem;line-height:1.9; }
.marketing-eyebrow { font-weight:800;color:#087e7e;letter-spacing:.08em; }
.marketing-actions { display:flex;gap:12px;flex-wrap:wrap;margin:27px 0; }
.marketing-note { font-size:.88rem!important;color:#506b7a; }
.marketing-preview { background:white;padding:26px;border-radius:24px;box-shadow:0 25px 65px #1334491d;min-height:280px; }
.marketing-preview-head { display:flex;justify-content:space-between;align-items:center; border-bottom:1px solid #e8edef;padding-bottom:18px; }
.marketing-preview-head span { color:#0c9b93; }
.marketing-preview-cards { display:grid;gap:12px;margin:25px 0; }
.marketing-preview-cards span { background:#eaf8f6;padding:12px 15px;border-radius:10px;color:#126c69;font-weight:700; }
.marketing-preview-line { height:9px;width:90%;border-radius:20px;background:#e3ecf0;margin-top:14px; }
.marketing-preview-line.short { width:58%; }
.marketing-section { padding:72px 0; }
.marketing-section h2 { font-size:clamp(1.5rem,3vw,2.3rem);margin-bottom:28px; }
.marketing-alt { background:#f4f8fa; }
.marketing-cards { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px; }
.marketing-feature { padding:25px;background:#fff;border:1px solid #e3e9ed;border-radius:17px;box-shadow:0 8px 28px #102c4110; }
.marketing-feature h3 { margin:0 0 14px;color:#163449; }
.marketing-feature p { line-height:1.8;color:#536a7b; }
.admin-dashboard { padding-block:35px 70px; }
.admin-heading { display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap; }
.admin-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:24px 0; }
.admin-metrics .card { padding:21px;display:flex;flex-direction:column;gap:10px; }
.admin-metrics strong { font-size:2rem;color:#0d7b77; }
.admin-section { padding:22px;margin:25px 0; }
.admin-inline-form { display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:270px; }
.admin-inline-form input,.admin-inline-form select { max-width:180px; }
.admin-plan-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:15px; }
.admin-plan-form { border:1px solid #dce6eb;padding:16px;border-radius:14px;display:flex;flex-direction:column;gap:10px; }
.admin-plan-form label { display:flex;flex-direction:column;gap:5px;font-size:.9rem; }
.admin-plan-form label:has(input[type=checkbox]) { flex-direction:row;align-items:center; }
.admin-plan-form input:not([type=checkbox]) { width:100%; }
@media (max-width:850px) { .marketing-hero-grid { grid-template-columns:1fr; } .marketing-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .marketing-hero { padding:50px 0; } .marketing-cards { grid-template-columns:1fr; } .admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }


/* Visual polish update: homepage + dashboard charts */
:root {
  --shadow-soft: 0 20px 45px rgba(16, 37, 56, 0.08);
  --shadow-strong: 0 30px 60px rgba(10, 26, 43, 0.14);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,.82);
  border-bottom-color: rgba(221,227,233,.7);
}

.site-nav a,
.site-actions a,
.side-link,
.btn {
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.site-nav a:hover {
  color: var(--accent-dark);
}

.home-hero {
  position: relative;
  overflow: clip;
  padding: 92px 0 84px;
  background:
    radial-gradient(circle at 12% 22%, rgba(50, 197, 187, 0.18), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(115, 103, 240, 0.10), transparent 28%),
    linear-gradient(180deg, #f7fbfd 0%, #eef6fb 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  opacity: .5;
  pointer-events: none;
}

.orb-one {
  width: 250px;
  height: 250px;
  inset-inline-start: -60px;
  top: 70px;
  background: rgba(50, 197, 187, 0.18);
}

.orb-two {
  width: 320px;
  height: 320px;
  inset-inline-end: -90px;
  bottom: -40px;
  background: rgba(115, 103, 240, 0.12);
}

.home-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  align-items: center;
  gap: 42px;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 4.8vw, 4.6rem);
  line-height: 1.14;
  margin: 12px 0 18px;
  letter-spacing: -1px;
  max-width: 13ch;
}

.hero-copy p {
  font-size: 1.06rem;
  max-width: 60ch;
  color: #466074;
}

.hero-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hero-badge {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.hero-badge strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
}

.hero-badge span {
  color: var(--muted);
  font-size: .92rem;
}

.hero-showcase {
  position: relative;
}

.hero-window {
  position: relative;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.hero-window::after {
  content: '';
  position: absolute;
  inset: auto 0 0 auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(50,197,187,.22), transparent 68%);
  transform: translate(26%, 26%);
}

.hero-window-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #e8eef4;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(255,255,255,.8), rgba(238,246,251,.95));
}

.hero-window-top small {
  color: var(--accent-dark);
}

.hero-window-body {
  padding: 20px 22px 24px;
  display: grid;
  gap: 16px;
}

.showcase-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f7d79, #31b4ab);
  color: #fff;
}

.showcase-metric span {
  display: block;
  font-size: .9rem;
  color: rgba(255,255,255,.78);
}

.showcase-metric strong {
  font-size: 2rem;
  line-height: 1;
}

.showcase-metric em {
  font-style: normal;
  background: rgba(255,255,255,.16);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.showcase-chart-bars {
  height: 120px;
  border-radius: 20px;
  background: #f4f9fc;
  padding: 18px 18px 14px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.showcase-chart-bars span {
  flex: 1;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #40ccc2 0%, #0b7a75 100%);
  box-shadow: inset 0 -10px 14px rgba(255,255,255,.12);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.showcase-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e7edf3;
  box-shadow: 0 8px 18px rgba(16, 37, 56, 0.04);
}

.showcase-card strong {
  display: block;
  font-size: .92rem;
  color: var(--muted);
}

.showcase-card span {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
  font-weight: 800;
}

.showcase-log {
  display: grid;
  gap: 10px;
}

.showcase-log > div {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fbfd;
  border: 1px solid #e4edf2;
}

.showcase-log b,
.showcase-log span {
  display: block;
}

.showcase-log span {
  font-size: .92rem;
  color: var(--muted);
}

.section-stack {
  display: grid;
  gap: 28px;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2 {
  margin-bottom: 10px;
}

.section-heading p {
  color: var(--muted);
  font-size: 1rem;
}

.trust-strip {
  padding-top: 28px;
}

.trust-grid,
.workflow-grid,
.pricing-grid {
  display: grid;
  gap: 18px;
}

.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-card,
.workflow-card,
.pricing-card,
.feature-tile {
  background: #fff;
  border: 1px solid #e3e9ef;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.trust-card {
  padding: 24px;
}

.trust-card h3,
.workflow-card h3,
.pricing-card h3 {
  margin-bottom: 8px;
}

.trust-card p,
.workflow-card p,
.pricing-card p,
.feature-tile p {
  color: var(--muted);
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-tile {
  position: relative;
  overflow: hidden;
}

.feature-tile::before {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  inset-inline-end: -30px;
  top: -30px;
  background: radial-gradient(circle, rgba(50,197,187,.18), transparent 70%);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #e8f8f5;
  color: var(--accent-dark);
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-card {
  position: relative;
  padding: 24px;
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, #10364d 0%, #0b7a75 100%);
  color: #fff;
  font-weight: 800;
  margin-bottom: 16px;
}

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pricing-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.pricing-top strong {
  font-size: 2rem;
}

.pricing-list {
  margin: 6px 0 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pricing-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7fafc;
  color: var(--ink);
}

.cta-band {
  padding-top: 28px;
  padding-bottom: 88px;
}

.cta-band-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  background: linear-gradient(135deg, #12202f 0%, #0f7d79 100%);
  border-radius: 28px;
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.cta-band-grid h2 {
  max-width: 17ch;
  margin-top: 8px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-band-grid .btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.45);
  color: #fff;
}

.dashboard-heading.v2,
.dashboard-heading-actions,
.filter-grid,
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.dashboard-heading.v2 {
  justify-content: space-between;
}

.date-chip-wrap {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
  border: 1px solid #dfe8ef;
  box-shadow: var(--shadow-soft);
}

.date-chip-label {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 2px;
}

.date-chip-value {
  font-size: .98rem;
}

.dashboard-filter-modern {
  border: 1px solid #e4ebf1;
  box-shadow: var(--shadow-soft);
}

.filter-grid {
  justify-content: space-between;
}

.field-group {
  display: grid;
  gap: 8px;
}

.filter-actions {
  margin-inline-start: auto;
}

.dashboard-visual-grid {
  display: grid;
  grid-template-columns: 1.4fr .95fr;
  gap: 18px;
}

.chart-card {
  padding: 0;
  overflow: hidden;
}

.chart-card.wide {
  grid-column: 1 / -1;
}

.panel-heading.compact {
  padding-bottom: 10px;
}

.chart-holder {
  padding: 0 22px 22px;
}

.chart-holder.tall {
  min-height: 320px;
}

.chart-holder.medium {
  min-height: 250px;
}

.chart-holder canvas {
  display: block;
  width: 100%;
  height: auto;
}

.donut-wrap {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 320px;
}

.legend-list {
  display: grid;
  gap: 10px;
}

.legend-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: .94rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.dashboard-panels.two-col {
  grid-template-columns: 1fr 1fr;
}

input[type=date] {
  min-height: 46px;
  padding-inline: 14px;
  border-radius: 14px;
  border-color: #d8e3ea;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .home-hero-grid,
  .dashboard-visual-grid,
  .dashboard-panels.two-col,
  .trust-grid,
  .feature-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .hero-badges {
    grid-template-columns: 1fr;
  }

  .dashboard-panels.two-col {
    gap: 18px;
  }
}

@media (max-width: 860px) {
  .home-hero {
    padding-top: 60px;
  }

  .site-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .showcase-grid,
  .marketing-cards,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .cta-band-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-window-body,
  .chart-holder,
  .panel-heading,
  .pricing-card,
  .workflow-card,
  .trust-card,
  .feature-tile {
    padding-inline: 16px;
  }

  .showcase-metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .filter-actions {
    margin-inline-start: 0;
    width: 100%;
  }

  .filter-actions .btn {
    flex: 1;
  }
}


/* Dashboard density refinement for smaller business screens */
.dashboard-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-height: 112px;
  padding: 16px;
}

.metric-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  font-size: 18px;
}

.metric-card .stat-number {
  font-size: 23px;
}

.dashboard-visual-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: start;
}

.chart-card {
  border-radius: 18px;
}

.chart-holder {
  padding: 0 16px 16px;
}

.chart-holder.tall,
.chart-holder.medium,
.donut-wrap {
  min-height: auto;
}

#trendChart {
  height: 220px !important;
}

#statusChart {
  height: 240px !important;
  max-width: 240px;
  margin-inline: auto;
}

#driverChart {
  height: 180px !important;
}

.donut-wrap {
  padding-top: 2px;
}

.legend-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 8px;
}

.legend-item {
  font-size: .86rem;
}

.legend-item strong {
  font-size: .85rem;
}

.panel-heading {
  padding: 16px 16px 10px;
}

.dashboard-panels.two-col {
  gap: 16px;
}

@media (max-width: 1380px) {
  .dashboard-visual-grid {
    grid-template-columns: 1fr;
  }

  #statusChart {
    max-width: 220px;
    height: 220px !important;
  }

  #driverChart {
    height: 170px !important;
  }
}

@media (max-width: 1180px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #trendChart {
    height: 200px !important;
  }

  #driverChart {
    height: 160px !important;
  }

  .dashboard-panels.two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .dashboard-heading.v2,
  .dashboard-heading-actions,
  .filter-grid,
  .filter-actions {
    align-items: stretch;
  }

  .date-chip-wrap,
  .dashboard-heading-actions .btn,
  .filter-actions .btn {
    width: 100%;
  }

  .legend-list {
    grid-template-columns: 1fr;
  }

  #trendChart {
    height: 180px !important;
  }

  #statusChart {
    height: 200px !important;
    max-width: 200px;
  }

  #driverChart {
    height: 150px !important;
  }
}

/* Waslolo brand integration */
.logo-mark { background: transparent; padding: 0; border-radius: 11px; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.logo { gap: 12px; }
.hero-brand-image { max-width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 22px 58px rgba(16, 37, 56, .15); }
.hero-brand-strip { margin-top: 16px; font-weight: 700; color: #0a6866; }
