:root {
  --black: #0b0b0b; --black-2: #151515; --black-3: #222; --ink: #111114; --red: #e11d2a; --red-dark: #b3121d; --red-soft: #fde8ea;
  --bg: #f5f5f6; --card: #fff; --muted: #6b6f76; --border: #e6e6e9; --green: #15803d; --green-soft: #dcfce7; --amber: #b45309; --amber-soft: #fef3c7;
  --blue: #1d4ed8; --blue-soft: #dbeafe; --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --sidebar: 264px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; } .bold { font-weight: 700; } .red { color: var(--red); }
.center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.nowrap-row { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 12px; } .grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt0 { margin-top: 0; } .hidden { display: none !important; }
.svg-icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--black); color: #fff; transition: transform .05s, background .15s, opacity .15s; text-decoration: none !important; white-space: nowrap; min-height: 42px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.red, .btn.primary { background: var(--red); } .btn.red:hover, .btn.primary:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); } .btn.ghost:hover { background: #f0f0f2; }
.btn.light { background: #fff; color: var(--ink); border-color: var(--border); }
.btn.green { background: var(--green); } .btn.link { background: none; color: var(--red); padding: 4px 6px; min-height: 0; }
.btn.sm { padding: 6px 11px; font-size: .85rem; min-height: 34px; border-radius: 8px; } .btn.lg { padding: 14px 22px; font-size: 1.05rem; min-height: 52px; } .btn.block { width: 100%; }
.btn.icon { padding: 8px; min-height: 38px; width: 38px; }
.btn .spin, .spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.dark { border-color: rgba(0,0,0,.12); border-top-color: var(--red); width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .88rem; }
.field .req { color: var(--red); margin-left: 2px; }
.field .help { font-size: .78rem; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; outline: none; transition: border .15s, box-shadow .15s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,29,42,.12); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--red); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field .err { color: var(--red); font-size: .8rem; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: #cfcfd4; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--red); } .switch input:checked + .track::after { transform: translateX(18px); }

/* ---------- cards / badges ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; } .card.dark { background: var(--black); color: #fff; border-color: var(--black); }
.card.pad-lg { padding: 24px; } .card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: #eee; color: #444; text-transform: capitalize; white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red-dark); } .badge.green { background: var(--green-soft); color: var(--green); } .badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); } .badge.black { background: var(--black); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: .88rem; font-weight: 500; user-select: none; transition: all .12s; }
.chip.on { background: var(--black); color: #fff; border-color: var(--black); }
.chip.on.redc { background: var(--red); border-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.notice.warn { background: var(--amber-soft); color: #7c3d06; } .notice.info { background: #f1f1f3; color: #333; } .notice.red { background: var(--red-soft); color: var(--red-dark); } .notice.green { background: var(--green-soft); color: #14532d; }
.notice.dark { background: var(--black); color: #eee; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.kpi.red-kpi { background: var(--red); color: #fff; border-color: var(--red); } .kpi.red-kpi .label { color: #ffd5d8; }
.kpi.black-kpi { background: var(--black); color: #fff; border-color: var(--black); } .kpi.black-kpi .label { color: #aaa; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .svg-icon { width: 40px; height: 40px; color: #c9c9ce; margin-bottom: 8px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.stars { color: #f59e0b; letter-spacing: 1px; }

.grid > .card, .auto-grid > .card, .dash-grid > .card, .col > .card, .chips > .card { margin-top: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafafa; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #f0f0f2; vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #fafafa; }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: var(--black); color: #fff; }
.l-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 1100px; width: 100%; margin: 0 auto; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--red); display: grid; place-items: center; box-shadow: 0 0 0 3px rgba(225,29,42,.25); }
.brand .logo .svg-icon { width: 20px; height: 20px; color: #fff; }
.brand small { display: block; font-size: .68rem; font-weight: 500; color: #9a9a9f; letter-spacing: .02em; }
.l-hero { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 20px 40px; max-width: 760px; width: 100%; margin: 0 auto; text-align: center; }
.l-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 850; margin: 8px 0 8px; letter-spacing: -.03em; }
.l-hero h1 em { color: var(--red); font-style: normal; }
.l-hero p.sub { color: #bdbdc2; font-size: 1.05rem; max-width: 560px; margin: 0 auto 22px; }
.big-cta { width: 100%; min-height: 30vh; border-radius: 26px; border: none; cursor: pointer; background: radial-gradient(120% 140% at 0% 0%, #ff3b47 0%, var(--red) 45%, #9e0f19 100%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px; box-shadow: 0 20px 50px rgba(225,29,42,.35), inset 0 1px 0 rgba(255,255,255,.25); font: inherit; transition: transform .12s, box-shadow .12s; position: relative; overflow: hidden; }
.big-cta:hover { transform: translateY(-2px); box-shadow: 0 26px 60px rgba(225,29,42,.45); }
.big-cta .svg-icon { width: 64px; height: 64px; }
.big-cta .t { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 850; letter-spacing: -.02em; }
.big-cta .s { opacity: .9; font-size: .95rem; }
.big-cta .ring { position: relative; display: grid; place-items: center; }
.big-cta .pulse { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.sec-cta { width: 100%; min-height: 15vh; margin-top: 16px; border-radius: 20px; background: #fff; color: var(--black); border: 2px solid #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; font: inherit; transition: transform .12s; }
.sec-cta:hover { transform: translateY(-2px); }
.sec-cta .svg-icon { width: 36px; height: 36px; color: var(--red); }
.sec-cta .t { font-size: 1.35rem; font-weight: 800; } .sec-cta .s { font-size: .85rem; color: var(--muted); }
.l-stats { display: flex; gap: 20px; justify-content: center; margin-top: 22px; color: #9a9aa0; font-size: .85rem; flex-wrap: wrap; }
.l-stats b { color: #fff; font-size: 1.05rem; }
.l-section { background: #fff; color: var(--ink); padding: 44px 20px; }
.l-section .inner { max-width: 1100px; margin: 0 auto; }
.l-section.alt { background: var(--bg); }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .n { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.svc-tile { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.svc-tile .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--black); color: #fff; display: grid; place-items: center; flex: none; }
.l-foot { background: var(--black); color: #aaa; padding: 30px 20px; font-size: .88rem; }
.l-foot .inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.l-foot a { color: #ddd; } .l-foot h4 { color: #fff; }
.portal-links { display: flex; flex-direction: column; gap: 6px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--black); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.auth-card .brand { color: var(--black); margin-bottom: 18px; }
.otp-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 700; }
.dev-code { background: var(--amber-soft); color: #7c3d06; padding: 10px 12px; border-radius: 10px; font-size: .88rem; margin-bottom: 12px; }

/* ---------- portal layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--black); color: #ddd; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease; }
.sidebar .brand { padding: 18px 18px 14px; }
.side-portal { margin: 0 14px 10px; padding: 6px 10px; border-radius: 8px; background: var(--black-3); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #aaa; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.side-portal .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #c9c9ce; font-weight: 550; font-size: .92rem; cursor: pointer; user-select: none; position: relative; text-decoration: none !important; }
.nav-item:hover { background: var(--black-2); color: #fff; }
.nav-item.active { background: var(--red); color: #fff; }
.nav-item .grip { margin-left: auto; opacity: 0; color: #777; cursor: grab; touch-action: none; padding: 2px; display: flex; }
.nav-item:hover .grip, .nav.reorder .grip { opacity: 1; }
.nav.reorder .nav-item { border: 1px dashed #333; }
.nav-item .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 99px; font-size: .7rem; padding: 1px 7px; font-weight: 700; }
.nav-item.active .count { background: #fff; color: var(--red); }
.side-foot { padding: 12px; border-top: 1px solid var(--black-3); display: flex; flex-direction: column; gap: 6px; }
.sidebar .btn.ghost { color: #ddd; border-color: #333; }
.sidebar .btn.ghost:hover { background: var(--black-2); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 22px; position: sticky; top: 0; z-index: 30; }
.topbar h2 { margin: 0; font-size: 1.1rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.content { padding: 22px; max-width: 1240px; width: 100%; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--red); color: #fff; font-size: .65rem; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.dropdown { position: absolute; right: 0; top: 46px; width: min(360px, 92vw); background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.15); max-height: 70vh; overflow: auto; z-index: 60; }
.dropdown .it { padding: 12px 14px; border-bottom: 1px solid #f1f1f3; font-size: .86rem; cursor: pointer; }
.dropdown .it.unread { background: #fff7f7; }
.backdrop { display: none; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h1 { margin: 0; font-size: 1.5rem; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.tabs-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs-inline button { border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 7px 14px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.tabs-inline button.on { background: var(--black); color: #fff; border-color: var(--black); }

/* sortable */
.sortable-item.dragging { opacity: .55; outline: 2px dashed var(--red); outline-offset: 2px; }
.drag-handle { cursor: grab; touch-action: none; color: #a0a0a6; display: inline-flex; padding: 4px; border-radius: 6px; }
.drag-handle:hover { background: #f0f0f2; color: var(--ink); }
.dash-grid { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dash-grid > .sortable-item { position: relative; }
.dash-grid > .sortable-item > .drag-handle { position: absolute; top: 8px; right: 8px; }
.card-head .drag-handle { margin-right: -4px; }
.dash-grid .wide { grid-column: span 2; }
.dash-grid .full { grid-column: 1 / -1; }

/* ---------- driver request ---------- */
.svc-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
.svc-card { border: 2px solid var(--border); border-radius: 14px; padding: 14px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: all .12s; position: relative; user-select: none; }
.svc-card:hover { border-color: #c9c9ce; }
.svc-card .ic { width: 40px; height: 40px; border-radius: 11px; background: #f1f1f3; display: grid; place-items: center; color: var(--black); }
.svc-card.on { border-color: var(--red); background: #fff8f8; }
.svc-card.on .ic { background: var(--red); color: #fff; }
.svc-card .tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; color: #fff; }
.svc-card.on .tick { background: var(--red); border-color: var(--red); }
.svc-card .fee { font-size: .78rem; color: var(--muted); }
.loc-box { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: #fff; }
.loc-current { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: #f6f6f7; }
.loc-current .pin { width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; }
.loc-current.ok .pin { background: var(--green); }
.suggest { border: 1px solid var(--border); border-radius: 12px; margin-top: 6px; overflow: hidden; background: #fff; }
.suggest div { padding: 10px 12px; cursor: pointer; font-size: .88rem; border-bottom: 1px solid #f1f1f3; }
.suggest div:hover { background: #fafafa; }
.cart-bar { position: sticky; bottom: 0; background: var(--black); color: #fff; border-radius: 16px 16px 0 0; padding: 14px 18px; display: flex; align-items: center; gap: 14px; margin: 20px -4px 0; box-shadow: 0 -10px 30px rgba(0,0,0,.15); z-index: 5; }
.cart-bar .total { font-size: 1.3rem; font-weight: 800; }
.prov-row { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.prov-row + .prov-row { margin-top: 8px; }
.prov-row.revealed { border-color: var(--black); }
.prov-row.dim { opacity: .55; }
.prov-num { width: 30px; height: 30px; border-radius: 50%; background: #f1f1f3; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.lock-call { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.lock-call .msg { font-size: .7rem; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.phone-big { font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; }
.ask-box { border: 2px solid var(--red); background: #fff8f8; border-radius: 14px; padding: 14px; margin-top: 10px; }
.confirmed-box { border-radius: 14px; padding: 16px; background: var(--black); color: #fff; }
.confirmed-box a.btn { color: #fff; }
.item-card { border-left: 4px solid var(--red); }
.item-card.done { border-left-color: var(--green); }
.item-card.off { border-left-color: #bbb; }

/* chat */
.chat { display: flex; flex-direction: column; height: min(62vh, 560px); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #fafafa; border-radius: 12px; border: 1px solid var(--border); }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: .92rem; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble .t { display: block; font-size: .68rem; opacity: .7; margin-top: 3px; }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(10,10,12,.55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 14px; overflow-y: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: pop .15s; }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(440px, 92vw); }
.toast { background: var(--black); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: .9rem; animation: pop .15s; display: flex; gap: 10px; align-items: center; }
.toast.error { background: var(--red); } .toast.success { border-left: 4px solid #22c55e; }
.pay-wait { text-align: center; padding: 20px 10px; }
.pay-wait .phone-anim { width: 70px; height: 70px; border-radius: 20px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; animation: bob 1.2s ease-in-out infinite; }
.pay-wait .phone-anim .svg-icon { width: 36px; height: 36px; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.mpesa-tag { display: inline-flex; align-items: center; gap: 6px; background: #e8f7ec; color: #0f7a35; font-weight: 800; padding: 4px 10px; border-radius: 8px; font-size: .8rem; }
.install-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 20px 50px rgba(0,0,0,.35); max-width: 520px; margin: 0 auto; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.bars .b { flex: 1; background: var(--red); border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.bars .b:hover { background: var(--black); }
.bars-labels { display: flex; gap: 4px; font-size: .62rem; color: var(--muted); } .bars-labels span { flex: 1; text-align: center; overflow: hidden; }
.hbar { display: flex; align-items: center; gap: 10px; font-size: .85rem; margin-bottom: 8px; }
.hbar .bar { height: 10px; background: var(--red); border-radius: 99px; }
.field-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.field-row + .field-row { margin-top: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- responsive ---------- */
.msg-grid { grid-template-columns: minmax(220px, 320px) 1fr; }
@media (max-width: 900px) { .msg-grid { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .shell.open .sidebar { transform: none; }
  .shell.open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .dash-grid > .sortable-item { position: relative; }
.dash-grid > .sortable-item > .drag-handle { position: absolute; top: 8px; right: 8px; }
.card-head .drag-handle { margin-right: -4px; }
.dash-grid .wide { grid-column: auto; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; }
  .section-head h1 { font-size: 1.25rem; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .l-head .hide-sm { display: none; }
  .bubble { max-width: 90%; }
  .cart-bar { flex-wrap: wrap; }
}
@media print {
  .sidebar, .topbar, .no-print, .toasts, .install-bar { display: none !important; }
  .main { margin: 0; } .content { padding: 0; max-width: none; } body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}
