/* T-Shop & T-Food — Design system mobile-only */
:root {
  --bg: #070708;
  --bg2: #0B0B0D;
  --surface: #111214;
  --surface2: #17181B;
  --orange: #FF5A00;
  --orange2: #FF7A1A;
  --gold: #F5C14A;
  --gold2: #FFD66B;
  --text: #FFFFFF;
  --muted: #B9B9B9;
  --success: #29C85A;
  --danger: #FF3B30;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 8px 32px rgba(0,0,0,.45);
  --border-gold: rgba(245,193,74,.22);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
.tshop-body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

.desktop-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.desktop-gate-inner { text-align: center; max-width: 420px; padding: 2rem; }
.gate-logo { width: 80px; border-radius: 16px; margin-bottom: 1rem; }

.mobile-shell {
  max-width: 430px; min-height: 100dvh; margin: 0 auto;
  background: var(--bg2);
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,.5);
}

@media (min-width: 768px) {
  .desktop-gate.d-none { display: flex !important; }
  .mobile-shell { opacity: .3; pointer-events: none; filter: blur(2px); }
}
@media (max-width: 767px) {
  .desktop-gate { display: none !important; }
}

/* Splash client */
.splash-screen--client {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 1.5rem calc(2rem + var(--safe-b));
}

.splash-screen__coin-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.auth-brand-coin--splash {
  width: 160px;
  height: 160px;
}

.splash-screen--client .auth-brand-coin {
  display: inline-block;
  perspective: 900px;
}

.splash-screen--client .auth-brand-coin__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: auth-brand-flip-splash 5s ease-in-out forwards;
}

.splash-screen--client .auth-brand-coin__face {
  border: none;
  padding: 0;
  box-shadow: none;
}

.auth-brand__logo--splash {
  width: 120px;
  border-radius: 22px;
  box-shadow: none;
}

@keyframes auth-brand-flip-splash {
  0%, 48% { transform: rotateY(0deg); }
  50%, 100% { transform: rotateY(180deg); }
}

body.tshop-body[data-app="splash"] {
  background: #000;
}

body.tshop-body[data-app="splash"] .mobile-shell {
  background: #000;
}

.splash-screen--client .splash-screen__progress {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 72%;
  max-width: 300px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
  flex-shrink: 0;
}

.splash-screen--client .splash-screen__progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8862a 0%, #ff7a1a 50%, #ffd66b 100%);
  box-shadow: 0 0 12px rgba(255, 122, 26, 0.6);
  animation: splashClientLoad 5s linear forwards;
}

@keyframes splashClientLoad {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Ancien splash générique (autres portails) */
.splash-screen:not(.splash-screen--client) {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(135deg, var(--bg) 55%, var(--orange) 55%);
  position: relative; overflow: hidden;
}
.splash-screen:not(.splash-screen--client)::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(245,193,74,.08) 60%, transparent 80%);
}
.splash-top { padding: 2.5rem 1.5rem 0; position: relative; z-index: 1; }
.splash-top img { width: 72px; border-radius: 12px; }
.splash-bottom {
  margin-top: auto; padding: 2rem 1.5rem 3rem;
  display: flex; flex-direction: column; align-items: flex-end;
  position: relative; z-index: 1;
}
.splash-bottom img { width: 88px; border-radius: 14px; margin-bottom: 1rem; }
.splash-tagline {
  width: 100%; text-align: center;
  font-weight: 700; letter-spacing: .12em; font-size: .85rem;
  margin: 2rem 0 1rem; color: var(--gold);
}
.splash-bar {
  width: 100%; height: 4px; background: rgba(255,255,255,.1);
  border-radius: 4px; overflow: hidden;
}
.splash-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: 4px;
  animation: loadBar 2.2s ease forwards;
}
@keyframes loadBar { to { width: 100%; } }

/* Auth */
.auth-screen {
  height: 100lvh;
  min-height: 100lvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 1.25rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  scroll-padding-bottom: 2rem;
}
.auth-screen__center {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.auth-welcome {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: -15vh;
}
.auth-hero {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-brand {
  text-align: center;
  margin-bottom: 1.25rem;
}
.auth-brand-coin {
  display: inline-block;
  perspective: 900px;
}
.auth-brand-coin--welcome {
  width: 140px;
  height: 140px;
}
.auth-brand-coin__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: auth-brand-flip 18s infinite ease-in-out;
}
.auth-brand-coin__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow);
  border: 6px solid #fc7312;
  padding: 13px;
}
.auth-brand-coin__face--back {
  transform: rotateY(180deg);
}
@keyframes auth-brand-flip {
  0%, 40% { transform: rotateY(0deg); }
  50%, 90% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-brand-coin__inner { animation: none; }
  .auth-brand-coin__face--back { display: none; }
}
.auth-brand__logo {
  width: 88px;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.auth-brand__logo--welcome {
  width: 112px;
  border-radius: 20px;
  box-shadow: none;
}
.auth-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
}
@supports not (height: 100lvh) {
  .auth-screen { height: 100vh; min-height: 100vh; }
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.form-control, .form-select {
  background: var(--surface2) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  min-height: 48px;
  padding: .75rem 1rem;
}
.form-control:focus { border-color: var(--orange) !important; box-shadow: 0 0 0 3px rgba(255,90,0,.2) !important; }
.form-label { color: var(--muted); font-size: .85rem; margin-bottom: .35rem; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  border: none; color: #111; font-weight: 700;
  min-height: 48px; border-radius: var(--radius-sm);
  width: 100%; padding: .75rem 1rem;
}
.btn-gold:hover { filter: brightness(1.08); color: #111; }
.btn-outline-gold {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  min-height: 48px; border-radius: var(--radius-sm);
  width: 100%;
}
.btn-orange {
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  border: none; color: #fff; font-weight: 600;
  min-height: 44px; border-radius: 12px;
}

/* App shell */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 -1rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem .85rem;
  background: rgba(14, 15, 17, 0.52);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0 0 22px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  isolation: isolate;
}
.app-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 28%,
    rgba(255, 255, 255, 0) 52%
  );
  pointer-events: none;
  z-index: -1;
}
.app-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 193, 74, 0.45),
    rgba(255, 90, 0, 0.35),
    transparent
  );
  pointer-events: none;
}
.app-header h1 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.app-header .sub { color: var(--muted); font-size: .8rem; }
.app-header .search-bar {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.search-bar {
  background: var(--surface2);
  border-radius: 14px;
  padding: .6rem 1rem;
  display: flex; align-items: center; gap: .5rem;
  margin: .75rem 0;
  border: 1px solid rgba(255,255,255,.06);
}
.search-bar input {
  background: transparent; border: none; color: var(--text);
  flex: 1; outline: none; font-size: .9rem;
}

.toggle-shop {
  display: flex; background: var(--surface);
  border-radius: 14px; padding: 4px; margin-bottom: 1rem;
  border: 1px solid var(--border-gold);
}
.toggle-shop button {
  flex: 1; border: none; background: transparent;
  color: var(--muted); padding: .6rem; border-radius: 11px;
  font-weight: 600; font-size: .85rem;
}
.toggle-shop button.active {
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  color: #fff;
}

.banner-promo {
  background: linear-gradient(135deg, rgba(255,90,0,.25), rgba(245,193,74,.15));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  position: relative; overflow: hidden;
}
.banner-promo::after {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,.06), transparent);
  transform: rotate(25deg);
}

.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.25rem; }
.shortcut {
  position: relative;
  background: var(--surface); border-radius: 14px;
  padding: .75rem .25rem; text-align: center;
  border: 1px solid rgba(255,255,255,.05);
  font-size: .7rem; color: var(--muted);
  cursor: pointer;
}
.shortcut i { display: block; font-size: 1.25rem; color: var(--gold); margin-bottom: .25rem; }
.shortcut-badge {
  position: absolute;
  top: .35rem;
  right: .35rem;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .55rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(17,18,20,.95);
}

.section-title { font-weight: 700; font-size: .95rem; margin: 1rem 0 .75rem; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding-bottom: 6rem; }
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
}
.product-card .img {
  position: relative;
  height: 110px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--orange);
  overflow: hidden;
}
.product-card__rating {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  pointer-events: none;
}
.product-card__rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--gold);
  font-size: 0.62rem;
  line-height: 1;
}
.product-card__rating-stars .bi {
  font-size: 0.62rem;
}
.product-card__rating-val {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.product-card .img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: .75rem; }
.product-card .name { font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.product-card .desc { display: none; }
.product-card .row-price { display: flex; align-items: center; justify-content: space-between; }
.product-card .price { color: var(--gold); font-weight: 700; font-size: .9rem; }
.small.text-gold.mt-1 {
  margin-top: -5px !important;
  font-size: 11px;
  line-height: 1.35;
}
.small.text-gold.mt-1 .product-remise-label {
  display: block;
  color: grey;
}
.small.text-gold.mt-1 .product-remise-value {
  display: block;
  color: #fff;
}
.btn-add {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  border: none; color: #111; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: rgba(17,18,20,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-gold);
  display: flex; padding: .5rem .25rem calc(.5rem + var(--safe-b));
  z-index: 200;
}
.bottom-nav a, .bottom-nav button {
  flex: 1; background: none; border: none;
  color: var(--muted); text-align: center;
  font-size: .65rem; padding: .35rem;
  text-decoration: none;
}
.bottom-nav a.active, .bottom-nav button.active { color: var(--gold); }
.bottom-nav .nav-item-icon {
  position: relative;
  display: block;
  line-height: 1;
}
.bottom-nav .nav-item-icon i,
.bottom-nav > a > i,
.bottom-nav > button > i {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 2px;
}
.nav-badge {
  position: absolute;
  top: -5px;
  right: 15px;
  margin-left: -17px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .55rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(17,18,20,.95);
}

/* Cart & checkout */
.cart-item {
  display: flex; gap: .75rem; align-items: center;
  background: var(--surface); border-radius: 14px;
  padding: .75rem; margin-bottom: .5rem;
}
.cart-summary {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border-gold);
  margin-top: 1rem;
}
.checkout-steps { display: flex; gap: .5rem; margin-bottom: 1rem; }
.checkout-steps span {
  flex: 1; text-align: center; padding: .5rem;
  background: var(--surface); border-radius: 10px;
  font-size: .75rem; color: var(--muted);
}
.checkout-steps span.active { background: var(--orange); color: #fff; font-weight: 600; }

.status-badge {
  display: inline-block; padding: .25rem .6rem;
  border-radius: 20px; font-size: .7rem; font-weight: 600;
}
.status-received { background: rgba(45,156,219,.2); color: #2D9CDB; }
.status-preparing { background: rgba(245,193,74,.2); color: var(--gold); }
.status-delivering { background: rgba(255,90,0,.2); color: var(--orange); }
.status-delivered { background: rgba(41,200,90,.2); color: var(--success); }
.status-cancelled { background: rgba(255,59,48,.2); color: var(--danger); }

#map, .map-box { height: 200px; border-radius: var(--radius); overflow: hidden; margin: 1rem 0; }
.map-box--tracking { height: 260px; }
.map-box--drawer { height: min(58vh, 420px); margin: 0; flex: 1; min-height: 240px; }
.map-track-drawer { width: min(100%, 380px); }
.map-track-drawer__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: .75rem 1rem 1rem;
}
.map-box .mapboxgl-map,
.map-box .mapboxgl-canvas-container,
.map-box canvas.mapboxgl-canvas { width: 100% !important; height: 100% !important; }
.mapboxgl-ctrl-attrib { font-size: 10px; opacity: 0.75; }
.mapboxgl-ctrl-group { background: rgba(17, 18, 20, .92) !important; border: 1px solid rgba(255,255,255,.12) !important; }
.mapboxgl-ctrl-group button { filter: invert(1); }

.header-bell-wrap { position: relative; }
.header-badge {
  position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700;
  line-height: 18px; text-align: center;
}

.track-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .75rem 0;
}
.track-stats__item {
  display: flex; align-items: center; gap: .65rem; background: var(--surface2);
  border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: .75rem;
}
.track-stats__item i { font-size: 1.25rem; }
.track-stats__item strong { display: block; font-size: 1rem; color: #fff; }
.track-stats__item small { display: block; color: var(--muted); font-size: .72rem; }

.notif-row { cursor: pointer; transition: background .15s ease; }
.notif-row--unread { border-color: rgba(255, 90, 0, .28); background: rgba(255, 90, 0, .06); }
.notif-row__icon {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(245, 193, 74, .12);
  display: flex; align-items: center; justify-content: center; color: var(--gold); flex-shrink: 0;
}
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex-shrink: 0; margin-top: 6px;
}

.driver-info-card { border-color: rgba(245, 193, 74, .22) !important; }
.driver-contact-link { color: var(--gold); text-decoration: none; font-size: .9rem; }
.driver-contact-link:hover { color: var(--orange); }

/* Manager */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.05);
}
.kpi-card[data-go] {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.kpi-card[data-go]:active {
  transform: scale(.98);
  border-color: rgba(255, 90, 0, .35);
  background: var(--surface2);
}
.kpi-card .val { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.revenue-totals .kpi-card .val { font-size: 1rem; line-height: 1.2; }
.revenue-totals.revenue-totals--local { grid-template-columns: 1fr; }
.kpi-card--full {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: .75rem;
  text-align: center;
}
.kpi-card--full .val { font-size: 1rem; font-weight: 700; color: var(--gold); }
.kpi-card--full .lbl { font-size: .7rem; color: var(--muted); margin-top: .15rem; }
.driver-kpi-grid--local { margin-bottom: .5rem !important; }

.pending-revenue-banner__inner {
  display: block;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  background: rgba(245, 193, 74, 0.08);
  border: 1px solid rgba(245, 193, 74, 0.28);
}
.pending-revenue-banner__icon {
  float: left;
  margin-right: 11px;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 193, 74, 0.14);
  color: var(--gold);
  font-size: 1rem;
}
.pending-revenue-banner__body { min-width: 0; }
.pending-revenue-banner__title {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.pending-revenue-banner__sub {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .15rem;
}
button.btn.btn-sm.btn-outline-gold.pending-revenue-banner__go {
  margin-top: 7px;
  white-space: nowrap;
}
.kpi-card .lbl { font-size: .75rem; color: var(--muted); }

.order-row {
  background: var(--surface);
  border-radius: 14px;
  padding: .875rem;
  margin-bottom: .5rem;
  border-left: 3px solid var(--orange);
}
.order-row.has-row-badge,
.order-row.order-row--badged {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}
.order-row .row-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  flex-shrink: 0;
}
.order-row.admin-order-row { cursor: pointer; }
.order-row[data-tab] { cursor: pointer; }
.order-row.admin-order-row:active { opacity: .92; }
.driver-contact-link {
  color: var(--gold);
  text-decoration: none;
}
.driver-route-actions.btn-group {
  display: flex;
  width: 100%;
}
#btn-complete.btn-complete-unlocked:not(:disabled) {
  animation: drv-btn-unlock .9s ease-out;
  box-shadow: 0 0 0 2px rgba(255, 122, 26, 0.45), var(--shadow);
}
@keyframes drv-btn-unlock {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.02); }
}
.driver-route-actions.btn-group .btn,
.driver-contact-actions.btn-group .btn {
  flex: 1 1 50%;
  border-radius: 0;
  margin: 0;
  white-space: nowrap;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.driver-contact-actions.btn-group {
  display: flex;
  width: 100%;
}
a.btn.btn-outline-gold.flex-fill.text-decoration-none,
a.btn.btn-orange.flex-fill.text-decoration-none {
  width: 50%;
}
.driver-contact-actions.btn-group .btn:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.driver-contact-actions.btn-group .btn:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.driver-route-actions.btn-group .btn:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.driver-route-actions.btn-group .btn:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.driver-btn-arrived {
  background: rgba(41, 200, 90, 0.12) !important;
  border-color: var(--success) !important;
  color: var(--success) !important;
}
.driver-btn-arrived:hover,
.driver-btn-arrived:focus {
  background: rgba(41, 200, 90, 0.22) !important;
  color: #fff !important;
}
.map-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.map-pin--client { background: var(--gold); }
.map-pin--driver { background: var(--orange); }
.map-pin--default { background: var(--orange); }
.mapboxgl-popup-content {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.35;
}
.mapboxgl-popup-content strong { color: var(--gold); }
.mapboxgl-popup-tip { border-top-color: var(--surface2) !important; }
.delivery-code-card,
.auth-card .delivery-code-display {
  text-align: center;
}
.delivery-code-display {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: .35em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.checkout-delivery-fee {
  padding: .55rem .75rem;
  border-radius: var(--radius);
  background: rgba(245, 193, 74, .08);
  border: 1px solid rgba(245, 193, 74, .22);
}
.delivery-code-card {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  background: rgba(245, 193, 74, .08);
  border: 1px solid rgba(245, 193, 74, .25);
}
.tmoney-reward-banner {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  padding: .75rem .85rem;
  border-radius: var(--radius);
  background: rgba(245, 193, 74, .1);
  border: 1px solid rgba(245, 193, 74, .28);
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}
.tmoney-reward-banner--compact {
  padding: .55rem .75rem;
  font-size: .82rem;
}
.phone-call-link {
  color: var(--gold);
  text-decoration: none;
}
.phone-call-link:hover { color: var(--orange); }
.driver-info-card { border-left-color: var(--gold); }
.admin-product-row__img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}
.admin-product-row__placeholder {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.1rem;
}
.admin-product-form__preview {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 12px;
}
.admin-product-form__preview.admin-product-row__placeholder {
  max-height: 80px;
  width: 100%;
}

.swal-product-actions.btn-group {
  display: flex;
  gap: 0;
}
.swal-product-actions.btn-group .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem .5rem;
  font-size: 1.15rem;
  border-radius: 0;
}
.swal-product-actions.btn-group .btn:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.swal-product-actions.btn-group .btn:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.swal-product-actions.btn-group .btn-outline-warning {
  color: #ffc107;
  border-color: rgba(255, 193, 7, .45);
}
.swal-product-actions.btn-group .btn-outline-danger {
  color: #dc3545;
  border-color: rgba(220, 53, 69, .45);
}
.swal-product-actions.btn-group .btn-outline-secondary {
  color: var(--muted);
  border-color: rgba(255, 255, 255, .15);
}

.admin-order-actions.btn-group {
  display: flex;
  gap: 0;
}
.admin-order-actions.btn-group .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: .35rem .25rem;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}
.admin-order-actions.btn-group .btn i {
  font-size: 12px;
  line-height: 1;
}
.admin-order-actions.btn-group .btn:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.admin-order-actions.btn-group .btn:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.admin-order-actions.btn-group .btn-outline-warning {
  color: #ffc107;
  border-color: rgba(255, 193, 7, .45);
}
.admin-order-actions.btn-group .btn-outline-danger {
  color: #dc3545;
  border-color: rgba(220, 53, 69, .45);
}

.admin-payment-actions.btn-group {
  display: flex;
  gap: 0;
}
.admin-payment-actions.btn-group .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: .35rem .5rem;
  font-size: 12px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  white-space: nowrap;
}
.admin-payment-actions.btn-group .btn i {
  font-size: 12px;
}
.admin-payment-actions.btn-group .btn:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.admin-payment-actions.btn-group .btn:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.swal2-popup.swal-product-modal {
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 1rem;
}
.swal2-popup.swal-product-modal .swal2-title {
  flex-shrink: 0;
  font-size: 1.1rem;
  padding: 1rem 1rem .5rem;
}
.swal2-popup.swal-product-modal .swal2-html-container.swal-product-html {
  flex: 1 1 auto;
  max-height: calc(90vh - 4.5rem);
  max-height: calc(90dvh - 4.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0 1rem .25rem;
  -webkit-overflow-scrolling: touch;
}
.swal2-popup.swal-product-modal .swal-product-actions {
  flex-shrink: 0;
  margin-top: .75rem !important;
}

.driver-pick-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.driver-pick-row {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: .75rem .85rem;
  color: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.driver-pick-row:active,
.driver-pick-row:hover {
  border-color: rgba(255, 90, 0, .45);
  background: var(--surface2);
}
.driver-pick-status {
  flex-shrink: 0;
  font-size: .7rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
}
.driver-pick-status.is-online {
  background: rgba(41, 200, 90, .15);
  color: #29C85A;
}
.driver-pick-status.is-blocked {
  background: rgba(255, 59, 48, .15);
  color: #ff3b30;
}

.swal-product-actions.btn-group .btn-outline-success {
  color: #29C85A;
  border-color: rgba(41, 200, 90, .45);
}

.order-row.admin-driver-row { cursor: pointer; }
.order-row.admin-client-row { cursor: pointer; }
.driver-kpi-grid { margin-bottom: .75rem !important; }
.driver-kpi-grid .kpi-card { padding: .65rem; }
.driver-kpi-grid .kpi-card .val { font-size: 1rem; }
.driver-history-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.driver-history-row {
  background: var(--surface);
  border-radius: 12px;
  padding: .65rem .75rem;
  border-left: 3px solid var(--orange);
}

/* Driver */
.driver-stat { text-align: center; padding: 1rem; }
.online-toggle {
  width: 56px; height: 32px; border-radius: 16px;
  background: var(--surface2); border: none;
  position: relative; cursor: pointer;
}
.online-toggle.on { background: var(--success); }
.online-toggle::after {
  content: ''; position: absolute; top: 4px; left: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .2s;
}
.online-toggle.on::after { transform: translateX(24px); }

.app-content { padding: 30px 1rem 6rem; min-height: 60vh; }
.hidden { display: none !important; }
.star-rating-input {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.star-rate-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.15rem;
}
.star-rate-btn.is-on,
.star-rate-btn:hover,
.star-rate-btn:focus {
  color: var(--gold);
}
.star-rating-display {
  letter-spacing: 0.12em;
}
.star-rating-display .bi-star-fill {
  color: var(--gold);
}

.text-muted-custom { color: var(--muted); }
.small.text-muted-custom.mb-1 {
  font-size: 10px;
  margin-top: -5px;
}
p.text-muted-custom.mb-0 { font-size: 11px; }
.text-gold { color: var(--gold); }
.payment-proof-img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  background: #0d0d0f;
}
.text-orange { color: var(--orange); }
.price-update { font-size: .7rem; color: var(--muted); margin-top: .5rem; }

.chat-bubble {
  max-width: 80%; padding: .6rem .85rem;
  border-radius: 14px; margin-bottom: .5rem;
  font-size: .85rem;
}
.chat-bubble.me { background: var(--orange); margin-left: auto; }
.chat-bubble.them { background: var(--surface2); }

.offline-badge {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--danger); color: #fff;
  padding: .25rem 1rem; font-size: .75rem;
  border-radius: 0 0 8px 8px; z-index: 300;
  max-width: 430px; width: 100%; text-align: center;
}

.pwa-install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 398px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .85rem;
  background: rgba(23, 24, 27, .96);
  border: 1px solid rgba(255, 90, 0, .35);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .45);
  z-index: 400;
  backdrop-filter: blur(8px);
}
.pwa-install-banner__icon {
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
}
.pwa-install-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.3;
}
.pwa-install-banner__text strong {
  color: #fff;
  font-size: .85rem;
}
.pwa-install-banner .btn-orange {
  flex-shrink: 0;
  padding: .4rem .75rem;
  font-size: .8rem;
  white-space: nowrap;
}
.pwa-install-dismiss {
  position: absolute;
  top: .35rem;
  right: .5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: .15rem .25rem;
  cursor: pointer;
}
.btn-gold:disabled, .btn-gold[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.filter-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 340px);
  max-width: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border-gold);
  z-index: 1201;
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, .35);
}
.filter-drawer.is-open { transform: translateX(0); }
.filter-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.filter-drawer__header strong { font-size: 1rem; }
.filter-drawer__close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  padding: .25rem;
  cursor: pointer;
  line-height: 1;
}
.filter-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
}
body.filter-drawer-open { overflow: hidden; }
#btn-tm-open-filters.filter-trigger--active,
#btn-orders-open-filters.filter-trigger--active,
#btn-products-open-filters.filter-trigger--active {
  border-color: var(--orange);
  color: var(--orange);
}
.filter-summary {
  line-height: 1.35;
  color: var(--muted);
}
.filter-checklist {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-height: 9rem;
  overflow-y: auto;
  padding: .35rem 0;
}
.filter-checklist__item {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .85rem;
  color: #fff;
  margin: 0;
  cursor: pointer;
}
.filter-checklist__item input { flex: 0 0 auto; }
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .45rem .2rem .55rem;
  border-radius: 999px;
  background: rgba(245, 193, 74, 0.12);
  border: 1px solid rgba(245, 193, 74, 0.28);
  font-size: .75rem;
  color: #fff;
}
.filter-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  line-height: 1;
  font-size: .85rem;
}
.filter-suggestions {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: var(--surface);
  max-height: 10rem;
  overflow-y: auto;
  margin-bottom: .5rem;
}
.filter-suggestions__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  padding: .55rem .65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.filter-suggestions__item:last-child { border-bottom: 0; }
.filter-suggestions__title {
  display: block;
  font-size: .82rem;
  font-weight: 600;
}
.filter-suggestions__sub {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  margin-top: .1rem;
}
.filter-suggestions__empty {
  padding: .55rem .65rem;
  font-size: .78rem;
  color: var(--muted);
}
.history-toolbar {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
}
.history-toolbar .section-title {
  width: 100%;
}
.history-toolbar .btn-sm,
.history-toolbar #btn-tm-open-filters {
  min-height: 36px;
  padding: .35rem .75rem;
  font-size: .85rem;
}
