@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Lalezar&display=swap');

:root {
  --orange: #FF7A00;
  --orange-2: #FF9F1C;
  --yellow: #FFB347;
  --red: #D9480F;
  --teal: #2EC4B6;
  --green: #1B8579;
  --purple: #3D4466;
  --pink: #FF9F1C;
  --brown: #8D5524;
  --ink: #2B2D42;
  --muted: #7A7F99;
  --bg: #FFF7EC;
  --card: #FFFFFF;
  --line: #F1E4D1;
  --shadow: 0 6px 0 rgba(43, 45, 66, .08), 0 10px 30px rgba(255, 122, 0, .08);
  --r: 20px;
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --display: 'Lalezar', 'Cairo', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(circle at 10% 10%, rgba(255, 201, 60, .18) 0 120px, transparent 121px),
                    radial-gradient(circle at 90% 80%, rgba(46, 196, 182, .12) 0 160px, transparent 161px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .3px; }

/* ---------- buttons ---------- */
.btn {
  border: 0; cursor: pointer; border-radius: 14px; padding: 10px 16px; font-weight: 800;
  background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18); transition: transform .08s, box-shadow .08s, filter .15s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.orange { background: var(--orange); }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.red { background: var(--red); }
.btn.teal { background: var(--teal); }
.btn.green { background: var(--green); }
.btn.purple { background: var(--purple); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--line); border: 2px solid var(--line); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 11px; }
.btn.lg { padding: 14px 22px; font-size: 18px; border-radius: 18px; }
.btn.block { width: 100%; }

/* ---------- cards / badges ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; border: 2px solid #fff; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #f3f3f7; color: var(--ink); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 800; background: #fff; border: 2px solid var(--line); cursor: pointer; white-space: nowrap; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.num { font-variant-numeric: tabular-nums; }

input.inp, select.inp, textarea.inp {
  width: 100%; padding: 11px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; outline: none; transition: border .15s;
}
input.inp:focus, select.inp:focus, textarea.inp:focus { border-color: var(--orange); }
label.lbl { font-weight: 800; font-size: 13px; color: var(--muted); display: block; margin: 10px 0 4px; }

/* ---------- toast ---------- */
#toasts { position: fixed; bottom: 18px; left: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); max-width: 360px; display: flex; gap: 10px; align-items: center; }
.toast.ok { background: var(--green); }
.toast.warn { background: var(--red); }
.toast.new { background: var(--purple); }
.toast .e { font-size: 22px; }

@keyframes pop { from { transform: scale(.6) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 72, 15, .5); } 70% { box-shadow: 0 0 0 12px rgba(217, 72, 15, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 72, 15, 0); } }
@keyframes slideIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.bounce { animation: bounce 1.6s ease-in-out infinite; display: inline-block; }
.wobble { animation: wobble 1.2s ease-in-out infinite; display: inline-block; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(43, 45, 66, .45); backdrop-filter: blur(3px); z-index: 900; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: #fff; border-radius: 26px; padding: 22px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: pop .3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes fade { from { opacity: 0; } }

/* ---------- map ---------- */
.map { background: #FFF9F0; }
.map svg { width: 100%; height: 100%; display: block; }
.map .zone-lbl { font: 800 15px var(--font); fill: #5C677D; paint-order: stroke; stroke: #fff; stroke-width: 5px; }
.map .drv-lbl { font: 800 13px var(--font); fill: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #f0d9b8; border-radius: 10px; border: 2px solid var(--bg); }
