:root {
  --bg: #08111f;
  --bg-2: #0f172a;
  --bg-soft: #111827;
  --card: rgba(255,255,255,0.9);
  --card-strong: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --border: rgba(148,163,184,0.22);
  --primary: #14b8a6;
  --primary-dark: #0f766e;
  --secondary: #e2e8f0;
  --danger: #dc2626;
  --warning: #f59e0b;
  --blue: #2563eb;
  --violet: #7c3aed;
  --green: #16a34a;
  --shadow: 0 24px 60px rgba(2, 8, 23, 0.16);
  --radius: 28px;
  --radius-sm: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20,184,166,0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(37,99,235,0.18), transparent 22%),
    linear-gradient(180deg, #eff6ff, #f8fafc 24%, #eef2ff 100%);
}
a { color: inherit; text-decoration: none; }
strong { font-weight: 800; }
small { font-size: 12px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #1e293b; }
input, select, textarea {
  width: 100%;
  font: inherit;
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  background: #fff;
  padding: 13px 14px;
  color: var(--text);
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(20,184,166,0.7);
  box-shadow: 0 0 0 4px rgba(20,184,166,0.14);
}
textarea { min-height: 100px; resize: vertical; }
.dark-input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.dark-input::placeholder { color: rgba(255,255,255,0.62); }
.dark-card label, .dark-card .section-title, .dark-card .eyebrow { color: #fff; }
.dark-card .muted, .dark-card .hero-text, .text-soft { color: rgba(226,232,240,0.82); }
.app-shell { min-height: 100vh; }
.container { max-width: 1340px; margin: 0 auto; padding: 26px 18px 48px; }
.space-y-xl > * + * { margin-top: 26px; }
.stack-xs, .stack-sm, .stack-md, .stack-lg, .stack { display: flex; flex-direction: column; }
.stack-xs { gap: 4px; }
.stack-sm { gap: 8px; }
.stack-md { gap: 14px; }
.stack-lg, .stack { gap: 18px; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-xs { gap: 6px; }
.gap-sm { gap: 10px; }
.split-header { justify-content: space-between; gap: 18px; align-items: flex-start; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.small-grid { gap: 10px; }
.split { display: grid; gap: 24px; }
.split-balanced { grid-template-columns: 1fr 1fr; }
.split-wide { grid-template-columns: 1.2fr .8fr; }
.hero-pro { display: grid; grid-template-columns: 1.02fr .98fr; gap: 24px; align-items: stretch; }
.topbar {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  background: rgba(8,17,31,0.78); color: #fff;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1340px; margin: 0 auto; padding: 14px 18px; }
.brand { display: inline-flex; gap: 12px; align-items: center; }
.brand strong { display: block; font-size: 20px; line-height: 1; }
.brand small { display: block; color: rgba(255,255,255,0.75); margin-top: 4px; }
.brand-badge {
  width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, #14b8a6, #2563eb); box-shadow: 0 18px 35px rgba(20,184,166,0.32);
  font-size: 24px;
}
.pills a, .btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 700; border-radius: 16px;
  padding: 11px 16px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.pills a:hover, .btn:hover { transform: translateY(-1px); }
.pills a { color: rgba(255,255,255,0.88); }
.pills .primary, .btn-primary {
  color: #fff; background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 16px 30px rgba(20,184,166,0.24);
}
.btn-secondary { background: #e2e8f0; color: #0f172a; }
.btn-tertiary { background: #dbeafe; color: #1d4ed8; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; }
.btn-lg { padding: 14px 18px; border-radius: 18px; }
.btn-small { padding: 9px 12px; border-radius: 12px; font-size: 12px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; position: relative; overflow: hidden;
}
.soft-card { background: linear-gradient(180deg, #f8fafc, #eef6ff); box-shadow: none; border-style: dashed; }
.dark-card {
  background:
    radial-gradient(circle at top left, rgba(20,184,166,0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(59,130,246,0.16), transparent 26%),
    linear-gradient(160deg, #08111f, #0f172a 60%, #111827);
  color: #fff; border-color: rgba(255,255,255,0.08);
}
.glass-lite { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; }
.hero-title { margin: 0; font-size: clamp(2rem, 4.5vw, 4.1rem); line-height: .98; letter-spacing: -0.03em; }
.hero-text { margin: 0; color: rgba(255,255,255,0.82); font-size: 16px; line-height: 1.7; }
.section-title { margin: 0; font-size: 1.6rem; line-height: 1.15; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .16em;
  font-size: 11px; font-weight: 800; color: #0f766e;
}
.muted { color: var(--text-soft); }
.footer-note { text-align: center; color: #64748b; padding: 10px 0 0; font-size: 12px; }
.flash, .notice-card {
  padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(34,197,94,0.18); background: #f0fdf4; color: #166534;
}
.notice-card { display: flex; flex-direction: column; gap: 4px; }
.auth-wrap { max-width: 520px; margin: 3rem auto; }
.auth-card { padding: 28px; }
.stats-grid { display: grid; gap: 16px; }
.compact-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.compact-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat-card, .mini-stat {
  background: rgba(255,255,255,0.82); border: 1px solid rgba(148,163,184,0.18); border-radius: 22px;
  padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 100px; justify-content: center;
}
.dark-card .mini-stat { color: #fff; }
.stat-card strong, .mini-stat strong { font-size: 28px; line-height: 1; }
.stat-card span, .mini-stat span { color: #64748b; }
.dark-card .mini-stat span { color: rgba(226,232,240,0.82); }
.transport-list-grid, .courier-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.transport-card, .courier-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08);
}
.transport-emoji, .courier-avatar { font-size: 28px; width: 50px; height: 50px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,0.08); }
.rating-pill {
  display: inline-flex; width: fit-content; padding: 5px 10px; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700;
}
.chip, .status-pill {
  display: inline-flex; width: fit-content; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
}
.chip-blue, .chip-blue { background: #dbeafe; color: #1d4ed8; }
.chip-emerald, .chip-green { background: #dcfce7; color: #166534; }
.chip-violet, .chip-violet { background: #ede9fe; color: #6d28d9; }
.chip-gray { background: #e2e8f0; color: #334155; }
.chip-red { background: #fee2e2; color: #991b1b; }
.chip-orange { background: #ffedd5; color: #9a3412; }
.status-pill.is-ok { background: rgba(34,197,94,0.14); color: #22c55e; }
.status-pill.is-warn { background: rgba(245,158,11,0.16); color: #f59e0b; }
.status-pill.is-danger { background: rgba(239,68,68,0.14); color: #ef4444; }
.status-pill.is-info { background: rgba(37,99,235,0.14); color: #2563eb; }
.info-grid, .request-overview-grid, .legend-grid { display: grid; gap: 14px; }
.info-grid, .request-overview-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.legend-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.info-tile {
  border: 1px solid rgba(148,163,184,0.18); background: rgba(248,250,252,0.82); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
}
.map-box {
  width: 100%; min-height: 360px; border-radius: 24px; overflow: hidden; border: 1px solid rgba(148,163,184,0.18);
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
}
.map-large { min-height: 430px; }
.map-tall { min-height: 540px; }
.map-xl { min-height: 620px; }
.leaflet-container { font-family: inherit; }
.progress-bar {
  height: 10px; width: 100%; border-radius: 999px; background: #e2e8f0; overflow: hidden;
}
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(135deg, #14b8a6, #2563eb); }
.service-card {
  padding: 18px; border-radius: 22px; border: 1px solid rgba(148,163,184,0.18); background: rgba(255,255,255,0.82);
  display: flex; flex-direction: column; gap: 14px;
}
.active-highlight { background: linear-gradient(180deg, #f0fdfa, #eff6ff); border-color: rgba(20,184,166,0.28); }
.service-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.service-card-top p { margin: 6px 0 0; }
.service-meta-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 16px; color: #475569; font-size: 14px;
}
.timeline-stack, .timeline-item { display: flex; flex-direction: column; }
.timeline-item {
  gap: 4px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(148,163,184,0.18); background: rgba(255,255,255,0.84);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 10px; border-bottom: 1px solid #e2e8f0; vertical-align: top; text-align: left; font-size: 14px; }
th { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .08em; }
.inline-form { display: inline-flex; }
.request-overview-grid span, .info-tile span { color: #334155; }
.legend-dot { width: 12px; height: 12px; display: inline-block; border-radius: 50%; margin-right: 8px; }
.dot-courier { background: #2563eb; }
.dot-pending { background: #f59e0b; }
.dot-delivery { background: #16a34a; }
.coordinates-grid .input { font-variant-numeric: tabular-nums; }
.dashboard-hero { padding: 26px; }
.affiliate-card { min-height: 100%; }
@media (max-width: 1180px) {
  .hero-pro, .split-wide, .split-balanced { grid-template-columns: 1fr; }
  .compact-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .topbar-inner { flex-direction: column; align-items: stretch; }
  .pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
  .grid-2, .compact-3, .compact-4, .transport-list-grid, .courier-grid, .service-meta-grid, .info-grid, .request-overview-grid, .legend-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 22px; }
  .hero-title { font-size: clamp(1.8rem, 9vw, 3.2rem); }
  .map-large, .map-tall, .map-xl { min-height: 320px; }
  .service-card-top, .split-header { flex-direction: column; }
}

.advanced-coords {
  border: 1px dashed rgba(148,163,184,0.35);
  border-radius: 18px;
  padding: 10px 14px;
  background: rgba(248,250,252,0.65);
}
.advanced-coords summary {
  cursor: pointer;
  color: #334155;
  font-weight: 600;
}
.waiting-room { gap: 14px; }
.compact-quote-card { gap: 12px; }
.quote-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #334155;
  font-size: 14px;
}
.quote-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.quote-custom-form input[type="number"] {
  width: 130px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 12px;
  background: white;
}
.inline-form { gap: 8px; align-items: center; }
.inline-form select, .inline-form input, td .input {
  min-height: 40px;
}
