:root {
  --purple: #7E059B;
  --purple-2: #A21FC4;
  --orange: #FD6A02;
  --ink: #14101C;
  --ink-2: #1C1727;
  --ink-3: #262034;
  --line: #332B45;
  --text: #EFEAF7;
  --muted: #A79EBE;
  --white: #ffffff;
  --bg: #F7F5FB;
  --paper: #ffffff;
  --green: #17B26A;
  --red: #E5484D;
  --amber: #F5A524;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 16, 28, .08);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }

.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }

/* ---------- landing ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #E9E4F2; }
.topbar .inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; font-size: 1.2rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--purple), var(--orange)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav a { color: #4A4258; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--purple); text-decoration: none; }

.hero { padding: 72px 0 40px; background: radial-gradient(1200px 500px at 12% -10%, #F0E4FA 0%, transparent 60%), radial-gradient(900px 420px at 90% 0%, #FFF0E4 0%, transparent 55%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E9E4F2; padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--purple); }
.hero p.lead { font-size: 1.1rem; color: #4A4258; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer; transition: .15s ease; background: #F1ECF8; color: var(--ink); }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-2); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-ghost { background: #fff; border-color: #E0D8EC; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.card { background: var(--paper); border: 1px solid #EDE8F5; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }

.mock { background: var(--ink); border-radius: 18px; padding: 16px; color: var(--text); box-shadow: 0 30px 60px rgba(20,16,28,.25); }
.mock-head { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: #4B4260; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 10px; background: var(--ink-2); margin-bottom: 8px; font-size: .86rem; }
.mock-bar { height: 8px; border-radius: 99px; background: var(--ink-3); overflow: hidden; }
.mock-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--orange)); }

.section { padding: 64px 0; }
.section-head { max-width: 60ch; margin-bottom: 34px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid #EDE8F5; border-radius: var(--radius); padding: 20px; }
.feature .ico { width: 38px; height: 38px; border-radius: 10px; background: #F4EBFB; display: grid; place-items: center; margin-bottom: 12px; font-size: 1.05rem; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: #56506A; font-size: .92rem; }

.steps { counter-reset: step; display: grid; gap: 14px; grid-template-columns: repeat(5, 1fr); }
.step { background: #fff; border: 1px solid #EDE8F5; border-radius: var(--radius); padding: 18px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; font-size: .8rem; font-weight: 700; margin-bottom: 10px; }
.step b { display: block; margin-bottom: 4px; }
.step span { font-size: .85rem; color: #56506A; }

.cta-band { background: linear-gradient(120deg, var(--ink), #2A1240 60%, #4A1030); color: var(--text); border-radius: 22px; padding: 42px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band .muted { color: #C4B9DA; }

.site-foot { padding: 40px 0; border-top: 1px solid #E9E4F2; margin-top: 30px; color: #6A6379; font-size: .9rem; }

/* ---------- forms ---------- */
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: #3C3550; }
.inp, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #DDD5EA; border-radius: 9px; font: inherit; background: #fff; color: var(--ink); }
.inp:focus, select:focus, textarea:focus { outline: 2px solid rgba(126,5,155,.25); border-color: var(--purple); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: var(--ink); color: var(--text); }
.side { background: #100D18; border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.side .logo { color: #fff; margin-bottom: 14px; }
.side a.navlink { display: flex; align-items: center; gap: 10px; color: #BFB4D6; padding: 10px 12px; border-radius: 9px; font-size: .93rem; font-weight: 500; }
.side a.navlink:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.side a.navlink.active { background: var(--ink-3); color: #fff; }
.side .who { margin-top: auto; font-size: .8rem; color: var(--muted); padding: 10px 12px; border-top: 1px solid var(--line); }
.main { padding: 22px 26px 60px; overflow-x: hidden; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; margin: 0; color: #fff; }

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .n { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.kpi .l { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi.accent .n { color: var(--orange); }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #2A2440; vertical-align: middle; }
tr:hover td { background: #221C31; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.badge.new { background: #2C2545; color: #C9B8E6; }
.badge.assigned { background: #2B2A55; color: #A9B4FF; }
.badge.picked { background: #2A3B4F; color: #8FCBF5; }
.badge.received { background: #173B3B; color: #7FE0D0; }
.badge.received::before { content: '\21C4  '; opacity: .7; }
.badge.out { background: #3A2E1B; color: #F2C078; }
.badge.delivered { background: #17362A; color: #6FE0AA; }
.badge.failed { background: #3B1D24; color: #F58C93; }
.badge.cancelled, .badge.returned { background: #2A2535; color: #9C93B0; }
.badge.pending { background: #3A2E1B; color: #F2C078; }

.pill { display: inline-flex; gap: 8px; align-items: center; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { background: var(--ink-2); border: 1px solid var(--line); color: #BFB4D6; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer; }
.tabs button.active { background: var(--purple); border-color: var(--purple); color: #fff; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--ink-3); color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.3); opacity: 0; transition: .25s ease; z-index: 90; font-size: .9rem; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal { position: fixed; inset: 0; background: rgba(10,8,16,.72); display: none; place-items: center; z-index: 80; padding: 20px; }
.modal.open { display: grid; }
.modal-box { background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(560px, 100%); max-height: 86vh; overflow: auto; color: var(--text); }
.modal-box h3 { color: #fff; }
.modal-box label { color: #C4B9DA; }
.modal-box .inp, .modal-box select, .modal-box textarea { background: #171223; border-color: var(--line); color: #fff; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); font-size: .92rem; }
.help { font-size: .8rem; color: var(--muted); }
.err { color: #F58C93; font-size: .88rem; }

/* ---------- auth / track ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(900px 400px at 50% -20%, #F1E5FA, transparent 60%), var(--bg); padding: 30px 16px; }
.auth-card { width: min(430px, 100%); background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 24px 60px rgba(20,16,28,.12); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }

.track-page { background: var(--bg); min-height: 100vh; padding: 28px 16px 60px; }
.track-card { width: min(560px, 100%); margin: 0 auto; background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid #EFE9F7; margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #D9D2E6; }
.timeline li.done::before { background: var(--green); }
.timeline li.current::before { background: var(--orange); box-shadow: 0 0 0 4px rgba(253,106,2,.18); }
.timeline .t { font-size: .78rem; color: #7A7389; }

/* ---------- driver app ---------- */
.drv { min-height: 100vh; min-height: 100dvh; background: var(--ink); color: var(--text);
  padding: 0 0 calc(90px + env(safe-area-inset-bottom)); }
.drv-head { padding: calc(16px + env(safe-area-inset-top)) 16px 12px; background: #100D18;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.drv-body { padding: 14px; display: grid; gap: 12px; }
.job { background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.job h4 { color: #fff; margin: 0 0 4px; font-size: 1rem; }
.job .addr { font-size: .88rem; color: #C4B9DA; }
.job .acts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #100D18; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); z-index: 25;
  padding-bottom: env(safe-area-inset-bottom); }
.bottom-bar a { color: #BFB4D6; text-align: center; padding: 12px 4px; font-size: .75rem; }
.bottom-bar a.active { color: #fff; }
.bottom-bar a:hover { text-decoration: none; }

@media (max-width: 1000px) {
  .hero-grid, .grid-4, .grid-3, .steps, .cta-band { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .logo, .side .who { display: none; }
  .side a.navlink { white-space: nowrap; }
}
@media (max-width: 680px) {
  .hero-grid, .grid-2, .grid-3, .grid-4, .steps, .cta-band, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 20px; }
  .section { padding: 40px 0; }
  .main { padding: 16px 14px 60px; }
  .cta-band { padding: 26px; }
  .nav { gap: 10px; }
  .nav a.hide-sm { display: none; }
}

/* ---------- right-to-left (Arabic) ---------- */
[dir="rtl"] body, [dir="rtl"] .track-card, [dir="rtl"] .auth-card { text-align: right; }
[dir="rtl"] .timeline li { border-left: 0; border-right: 2px solid #EFE9F7; padding: 0 26px 18px 0; margin: 0 6px 0 0; }
[dir="rtl"] .timeline li::before { left: auto; right: -7px; }
[dir="rtl"] .timeline li:last-child { border-right-color: transparent; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .hero-grid, [dir="rtl"] .spread { direction: rtl; }
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .job .acts, [dir="rtl"] .bottom-bar { direction: rtl; }
@media (max-width: 1000px) { [dir="rtl"] .side { border-left: 0; } }

/* ---------- multi-company (platform) ---------- */
.imp-bar { position: sticky; top: 0; z-index: 60; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--orange), #B23A00); color: #fff; font-size: .88rem; padding: 9px 16px; }
.imp-bar b { font-weight: 800; }
.imp-bar .btn-ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; }
.notice { background: #3B1D24; border: 1px solid #6B2A33; color: #F7C7C9; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: .9rem; }
.notice a { color: #FFD9A8; text-decoration: underline; }
.side-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange); font-weight: 800; padding: 0 12px 6px; }
.trial-chip { display: inline-block; margin-top: 4px; font-size: .72rem; font-weight: 700; color: #F2C078; }
.trial-chip.bad { color: #F58C93; }

/* pricing on the marketing page */
.plan { position: relative; display: flex; flex-direction: column; }
.plan-pop { border-color: var(--purple); box-shadow: 0 18px 40px rgba(126,5,155,.16); }
.plan-flag { position: absolute; top: -12px; left: 22px; background: var(--purple); color: #fff; font-size: .72rem; font-weight: 800;
  letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.plan-price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; color: var(--ink); margin-top: 6px; }
.plan-price span { font-size: .9rem; font-weight: 600; color: #6A6379; letter-spacing: 0; }
.plan-list { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 8px; font-size: .9rem; color: #4A4258; }
.plan-list li { padding-left: 20px; position: relative; }
.plan-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* top bar + the right-hand menu */
.app2 { background: var(--ink); color: var(--text); min-height: 100vh; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #100D18;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.tb-brand { font-weight: 800; letter-spacing: -.02em; color: #fff; font-size: 1.05rem; }
.tb-grow { flex: 1; }
.tb-dots { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; padding: 0; }
.tb-dots span { display: block; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.tb-dots:hover { background: var(--ink-3); }
.drw { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.drw.open { visibility: visible; }
.drw-back { position: absolute; inset: 0; background: rgba(8, 5, 14, .62); opacity: 0; transition: opacity .26s ease; }
.drw.open .drw-back { opacity: 1; }
.drw-panel { position: absolute; top: 0; right: 0; height: 100%; width: 318px; max-width: 88vw;
  background: #100D18; border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.22,.61,.36,1);
  box-shadow: -24px 0 60px rgba(0,0,0,.45); }
.drw.open .drw-panel { transform: none; }
.drw-top { display: flex; align-items: center; gap: 10px; padding: 16px 14px; border-bottom: 1px solid var(--line); }
.drw-id { flex: 1; min-width: 0; }
.drw-id b { display: block; color: #fff; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drw-id small { color: #8E83A8; font-size: .74rem; }
.drw-x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-2); color: #fff; cursor: pointer; font-size: .85rem; }
.drw-x:hover { background: var(--ink-3); }
.drw-scroll { flex: 1; overflow-y: auto; padding: 8px 10px 12px; }
.drw-group { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: #7E7397; font-weight: 800; padding: 14px 12px 6px; }
.drw-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; color: #C9BFE0; text-decoration: none; font-size: .92rem; font-weight: 500; transition: background .15s ease, color .15s ease; }
.drw-item:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.drw-item.active { background: linear-gradient(90deg, rgba(126,5,155,.35), rgba(126,5,155,.06)); color: #fff; }
.drw-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--ink-2); display: grid; place-items: center; font-size: .95rem; flex: none; }
.drw-item.active .drw-ic { background: rgba(126,5,155,.55); }
.drw-key { margin-left: auto; font-size: .66rem; letter-spacing: .04em; color: #9C93B0;
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.drw-item:hover .drw-key { color: #fff; border-color: #4B3A63; }
.drw-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 6px 51px; }
.drw-pill { font-size: .76rem; padding: 5px 11px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); color: #B9AECF; text-decoration: none; }
.drw-pill:hover { color: #fff; text-decoration: none; border-color: #4B3A63; }
.drw-pill.active { background: rgba(126,5,155,.5); border-color: rgba(126,5,155,.8); color: #fff; }
.drw-foot { border-top: 1px solid var(--line); padding: 12px 14px 16px; }
.drw-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.drw-av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #7E059B, #FD6A02); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.drw-who b { display: block; color: #fff; font-size: .88rem; }
.drw-who small { color: #8E83A8; font-size: .74rem; text-transform: capitalize; }
.drw-actions { display: flex; flex-direction: column; gap: 6px; }
.drw-btn { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-2); color: #D9D2E8; font-size: .84rem; cursor: pointer; text-decoration: none; }
.drw-btn:hover { background: var(--ink-3); color: #fff; text-decoration: none; }
.drw-btn.acc { background: rgba(253,106,2,.14); border-color: rgba(253,106,2,.4); color: #FFB37A; font-weight: 700; }
.drw-btn.danger { color: #F79AA1; }

.notice.warn { background: #3A2E1B; border-color: #7A5A1E; color: #F2C078; }
.notice.warn a { color: #FFD9A8; }
.notice.ok { background: #17362A; border-color: #256B4A; color: #9BEBC4; }

/* ---------- per-table Filter / Sort / Columns (tablekit) ---------- */
.tk-bar { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.tk-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink-2); color: #C9BFE0; font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer; transition: .15s ease; }
.tk-btn:hover { color: #fff; border-color: #4B3A63; }
.tk-btn.on { border-color: rgba(253,106,2,.6); background: rgba(253,106,2,.14); color: #FFB37A; }
.tk-ic { opacity: .8; font-size: .92rem; line-height: 1; }
.tk-n { background: var(--orange); color: #14101C; border-radius: 999px; font-size: .68rem; font-weight: 800; padding: 1px 6px; min-width: 17px; text-align: center; }
.tk-n[hidden] { display: none; }
.tk-reset { border-style: dashed; color: #8E83A8; }
.tk-info { margin-left: auto; font-size: .78rem; color: var(--muted); }
.tk-pop { position: absolute; top: calc(100% + 8px); left: 0; width: min(340px, 92vw); max-height: min(68vh, 440px);
  overflow: auto; background: #100D18; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 26px 60px rgba(0,0,0,.55); padding: 8px; z-index: 60; }
.tk-pop[hidden] { display: none; }
.tk-ph { display: flex; align-items: center; gap: 8px; font-size: .66rem; text-transform: uppercase;
  letter-spacing: .12em; color: #7E7397; font-weight: 800; padding: 8px 10px 6px; }
.tk-ph b { color: #fff; font-size: .84rem; text-transform: none; letter-spacing: 0; font-weight: 700; }
.tk-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent;
  border: 0; border-radius: 10px; padding: 9px 10px; color: #C9BFE0; font: inherit; font-size: .88rem; cursor: pointer; }
.tk-row:hover { background: var(--ink-2); color: #fff; }
.tk-row.on { color: #FFB37A; }
.tk-row .tk-chev { margin-left: auto; color: #6E6388; }
.tk-row .tk-c { margin-left: auto; font-size: .72rem; color: #8E83A8; white-space: nowrap; }
.tk-row .tk-dir { margin-left: auto; font-size: .72rem; color: #FFB37A; white-space: nowrap; }
.tk-lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-box { width: 17px; height: 17px; border-radius: 5px; border: 1px solid #4B3A63; display: grid; place-items: center;
  font-size: .7rem; flex: none; color: #14101C; }
.tk-row.on .tk-box { background: var(--orange); border-color: var(--orange); font-weight: 800; }
.tk-q, .tk-fs { margin: 4px 6px 6px; width: calc(100% - 12px); background: #171223; border: 1px solid var(--line);
  color: #fff; border-radius: 9px; padding: 8px 10px; font: inherit; font-size: .85rem; }
.tk-back { background: var(--ink-2); border: 1px solid var(--line); color: #C9BFE0; border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; line-height: 1; font-size: 1rem; }
.tk-back:hover { color: #fff; }
.tk-foot { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.tk-none { padding: 10px; color: var(--muted); font-size: .84rem; }
th.tk-th { cursor: pointer; user-select: none; }
th.tk-asc::after { content: " \25B2"; color: var(--orange); }
th.tk-desc::after { content: " \25BC"; color: var(--orange); }
tr.tk-off { display: none !important; }
.tk-empty { display: none; padding: 16px 4px 4px; color: var(--muted); font-size: .88rem; }
.tk-empty.on { display: block; }
.tk-empty .tk-btn { margin-left: 8px; }
@media (max-width: 680px) {
  .tk-info { width: 100%; margin-left: 0; order: 5; }
  .tk-pop { width: min(330px, 94vw); }
  .tk-btn { padding: 7px 11px; font-size: .8rem; }
}

/* ---- company logo, header search and driver types (company console) ---- */
.logo-img { height: 32px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.logo-img[hidden] { display: none; }
.drw-logo { height: 36px; max-width: 104px; }
.tb-search { position: relative; flex: 1; max-width: 470px; margin: 0 6px; }
.gs-inp { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2);
  color: #fff; padding: 0 36px 0 14px; font: inherit; font-size: .9rem; }
.gs-inp::placeholder { color: #8E83A8; }
.gs-inp:focus { outline: none; border-color: rgba(126, 5, 155, .85); box-shadow: 0 0 0 3px rgba(126, 5, 155, .22); }
.gs-inp::-webkit-search-cancel-button, .gs-inp::-webkit-search-decoration { display: none; }
.gs-clear { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 8px; border: 0;
  background: var(--ink-3); color: #C9BFE0; cursor: pointer; font-size: .7rem; line-height: 1; }
.gs-clear:hover { color: #fff; }
.gs-clear[hidden] { display: none; }
.gs-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(70vh, 460px); overflow: auto;
  background: #100D18; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .55); padding: 6px; z-index: 70; }
.gs-panel[hidden] { display: none; }
.gs-group { font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: #7E7397; font-weight: 800; padding: 9px 10px 5px; }
.gs-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent;
  border: 0; border-radius: 10px; padding: 8px 10px; color: #C9BFE0; font: inherit; cursor: pointer; }
.gs-item:hover { background: var(--ink-2); color: #fff; }
.gs-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-main b { color: #fff; font-size: .9rem; font-weight: 700; }
.gs-main small { color: #948AAE; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-st { margin-left: auto; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: #FFB37A; white-space: nowrap; }
.gs-empty { padding: 12px 10px; color: var(--muted); font-size: .86rem; }

.logo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 180px; height: 100px; border-radius: 12px; border: 1px dashed var(--line); background: #100D18;
  display: grid; place-items: center; padding: 8px; text-align: center; }
.logo-prev img { max-width: 100%; max-height: 84px; object-fit: contain; }
.logo-side { flex: 1; min-width: 240px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.logo-side .help { flex-basis: 100%; margin: 2px 0 0; }
.logo-file { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.logo-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.kind-chip { border: 1px solid var(--line); background: var(--ink-2); color: #B9AECF; border-radius: 999px;
  padding: 6px 13px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.kind-chip b { color: #fff; margin-left: 3px; font-weight: 800; }
.kind-chip:hover { color: #fff; border-color: #4B3A63; }
.kind-chip.on { background: rgba(126, 5, 155, .55); border-color: rgba(126, 5, 155, .9); color: #fff; }

@media (max-width: 760px) {
  .tb-search { max-width: none; margin: 0; }
  .tb-brand { display: none; }
  .gs-panel { position: fixed; left: 10px; right: 10px; top: 60px; }
  .logo-prev { width: 140px; height: 84px; }
}

/* ---- orders table: tick boxes and the per-row status menu */
.selcell { width: 36px; }
.selcell input { width: 16px; height: 16px; accent-color: #7E059B; cursor: pointer; }
.menucell { width: 42px; text-align: right; }
.rowmenu-btn {
  width: 32px; height: 30px; border-radius: 8px; border: 1px solid #332B45; background: #1B1526;
  color: #BFB4D6; font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0;
}
.rowmenu-btn:hover { border-color: #7E059B; color: #fff; }
.rowmenu {
  position: fixed; z-index: 4000; width: 212px; background: #1B1526; border: 1px solid #332B45;
  border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); padding: 6px;
}
.rowmenu-head {
  font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: #8E84A6;
  padding: 6px 10px 8px; border-bottom: 1px solid #2E2540; margin-bottom: 4px;
}
.rowmenu button {
  display: block; width: 100%; text-align: start; background: none; border: 0; color: #E9E3F5;
  font: inherit; font-size: .86rem; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.rowmenu button:hover { background: #2A2138; }
.rowmenu button.on { color: #7FE0D0; }
.rowmenu button.sep { border-top: 1px solid #2E2540; margin-top: 4px; padding-top: 10px; color: #BFB4D6; }
.selbar { border: 1px solid #2E2540; border-radius: 10px; padding: 8px 10px; background: #1A1526; }

.rowmenu-note {
  font-size: .72rem; line-height: 1.35; color: #F5C88A; background: #241A0D;
  border: 1px solid #4A3312; border-radius: 8px; padding: 7px 9px; margin: 0 2px 6px;
}

/* ---- the life of an order ---- */
.tl-wrap { margin-top: 16px; border-top: 1px solid #2E2540; padding-top: 12px; }
.tl-wrap h4 { margin: 0 0 10px; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: #A79EBE; }
.tl { list-style: none; margin: 0; padding: 0 0 0 6px; }
.tl li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid #2E2540; margin-left: 5px; font-size: .86rem; }
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: #2E2540; border: 2px solid #1B1526; }
.tl .help { margin-top: 2px; }
.tl-new .tl-dot { background: #C9B8E6; }
.tl-assigned .tl-dot { background: #A9B4FF; }
.tl-picked .tl-dot { background: #8FCBF5; }
.tl-received .tl-dot { background: #7FE0D0; }
.tl-out .tl-dot { background: #F2C078; }
.tl-delivered .tl-dot { background: #6FE0AA; }
.tl-failed .tl-dot { background: #F58C93; }
.tl-returned .tl-dot, .tl-cancelled .tl-dot { background: #9C93B0; }

/* ---- extra fees ---- */
.fee-wrap { margin-top: 16px; border-top: 1px solid #2E2540; padding-top: 12px; }
.fee-wrap h4 { margin: 0 0 8px; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: #A79EBE; }
.fee-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.fee-tbl td { padding: 6px 4px; border-bottom: 1px solid #241C33; }
.fee-tbl tr:last-child td { border-bottom: 0; }
.fee-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fee-form .inp { padding: 8px 10px; font-size: .85rem; }
.tl-fee .tl-dot { background: #FDB022; }

/* Stock count: the reminder strip under the header and the counting card. */
.alert-bar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:9px 14px;background:#3A1220;border-bottom:1px solid #64203A;color:#FFD7E3;font-size:.86rem}
.alert-bar b{color:#fff}
.alert-bar a{color:#fff;text-decoration:underline}
.alert-bar .ab-dot{width:9px;height:9px;border-radius:50%;background:#FF4D7E;box-shadow:0 0 0 3px rgba(255,77,126,.22);flex:none}
.sc-scan{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 6px}
.sc-scan .inp{flex:1;min-width:220px;font-size:1rem}
.sc-msg{min-height:18px}
.sc-cam{position:fixed;inset:0;background:#000B;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px}
.sc-cam video{width:min(94vw,540px);border-radius:14px;background:#000}
.sc-tag{display:inline-block;font-size:.72rem;padding:2px 8px;border-radius:999px;background:#2A1B3D;color:#D9C6FF;margin-left:6px}
.sc-days{display:flex;gap:12px;flex-wrap:wrap}
.sc-days label{display:flex;gap:4px;align-items:center;font-size:.82rem;color:#C9BEDC}
 
/* ---------- landing header: white, readable text on the dark top bar ---------- */
.topbar-land .logo { color: #fff; }
.topbar-land .nav a { color: #fff; }
.topbar-land .nav a:hover { color: #FFB37A; text-decoration: none; }
.topbar-land .nav a.btn-primary, .topbar-land .nav a.btn-primary:hover { color: #fff; }

/* phones: one clean row, nothing overlapping or wrapping */
@media (max-width: 680px) {
  .topbar-land .inner { height: auto; min-height: 58px; padding-block: 9px; gap: 8px; flex-wrap: nowrap; }
  .topbar-land .logo { font-size: 1.05rem; min-width: 0; flex: 0 1 auto; }
  .topbar-land .logo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: .88rem; flex: none; }
  .topbar-land .nav { gap: 2px; margin-left: auto; flex: none; }
  .topbar-land .nav a { font-size: .9rem; white-space: nowrap; padding: 7px 6px; }
  .topbar-land .nav a.btn { padding: 8px 13px; font-size: .85rem; border-radius: 9px; }
}
@media (max-width: 430px) {
  .topbar-land .nav a.nav-hide-xs { display: none; }
  .topbar-land .nav a { font-size: .88rem; padding: 7px 5px; }
  .topbar-land .nav a.btn { padding: 8px 11px; font-size: .82rem; }
  .topbar-land .logo { font-size: 1rem; }
}

/* console header: the three dots on the right, a full-width slim search */
.topbar:not(.topbar-land) { direction: ltr; }
.topbar:not(.topbar-land) .logo { flex: none; white-space: nowrap; }
.topbar:not(.topbar-land) .tb-search { flex: 1 1 auto; max-width: none; margin: 0; }
.topbar:not(.topbar-land) .gs-inp { height: 34px; font-size: .86rem; border-radius: 10px; padding: 0 34px 0 12px; }
.topbar:not(.topbar-land) .gs-clear { top: 5px; right: 6px; }
.topbar:not(.topbar-land) .tb-dots { width: 36px; height: 36px; border-radius: 10px; flex: none; }
[dir="rtl"] .topbar:not(.topbar-land) .gs-inp { direction: rtl; }
[dir="rtl"] .topbar:not(.topbar-land) .gs-inp::placeholder { text-align: right; direction: ltr; }
.topbar:not(.topbar-land) .gs-panel { max-width: 720px; }
@media (max-width: 760px) {
  .topbar:not(.topbar-land) { padding: 10px 12px; gap: 8px; }
  .topbar:not(.topbar-land) .tb-search { margin: 0; }
  .topbar:not(.topbar-land) .gs-inp { height: 34px; }
  .topbar:not(.topbar-land) .gs-panel { left: 0; right: 0; max-width: none; top: 46px; }
}

/* ---------- Shipments · Deliveries / Transfers / Returns: the Transactions tab ---------- */
.tabs.tx-tabs { margin-bottom: 14px; }
.tx-tabs button { font-weight: 600; }
tr.tx-detail > td { padding: 0; border-top: 0; background: rgba(126,5,155,.06); }
tr.tx-detail.open > td { padding: 12px 14px; }
tr.tx-detail .tx-inner { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--ink-2); }
tr.tx-detail .tx-inner table { font-size: .86rem; }
@media (max-width: 640px) {
  tr.tx-detail.open > td { padding: 8px; }
  tr.tx-detail .tx-inner { padding: 10px; }
}
/* ---------- live map ---------- */
.lm-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
.lm-map { height: 62vh; min-height: 320px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: #14101C; }
.lm-side { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow: auto; }
.lm-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--ink-2); }
.lm-card b { font-size: .95rem; }
.lm-stops { margin: 6px 0 0; padding-inline-start: 18px; font-size: .86rem; }
.lm-stops li { margin-bottom: 4px; }
@media (max-width: 900px) {
  .lm-wrap { grid-template-columns: 1fr; }
  .lm-map { height: 46vh; }
  .lm-side { max-height: none; }
}
/* ---------- stale parcels ---------- */
.stale-panel { border-color: #6B4A12 !important; }
.stale-panel h3 { color: #FFB020; }

/* ---------- the quick lists: F7 warehouses, F8 drivers, F10 merchants ---------- */
.qv-back { position: fixed; inset: 0; z-index: 70; background: rgba(12,9,20,.66);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.qv { width: min(820px, 94vw); max-height: 76vh; display: flex; flex-direction: column;
  background: #171223; border: 1px solid #332B45; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.55); color: var(--text); }
.qv-body, .qv-body table, .qv-body td, .qv-body th, .qv-body b, .qv-body div { color: inherit; }
.qv-body td b, .qv-body td { color: var(--text); }
.qv-body th { color: var(--muted); }
.qv-body .help, .qv-body .help div { color: var(--muted); }
.qv-body .empty, .qv-body .err { color: var(--text); }
.qv-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid #2A2338; flex-wrap: wrap; }
.qv-head h3 { margin: 0; font-size: 1.02rem; }
.qv-tools { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.qv-x { background: transparent; border: 1px solid #332B45; color: #C9BFE0; width: 30px; height: 30px;
  border-radius: 9px; font-size: 1rem; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.qv-x:hover { color: #fff; border-color: #4B3A63; background: #241C33; }
.qv-body { padding: 12px 14px 14px; overflow: auto; }
@media (max-width: 640px) {
  .qv { width: 96vw; max-height: 84vh; }
  .qv-tools { width: 100%; margin-left: 0; }
}

/* Inventory: the order picked in the stock list, ready to print */
tr.inv-row { cursor: pointer; }
tr.inv-sel > td { background: rgba(126,5,155,.22); }
