/* ===== Trend Logistika — dizayn tizimi =====
   Mavzular data-theme bilan almashadi; ranglar @property orqali silliq o'tadi. */
@property --a1 { syntax: "<color>"; inherits: true; initial-value: #f59e0b; }
@property --a2 { syntax: "<color>"; inherits: true; initial-value: #ea580c; }
@property --a3 { syntax: "<color>"; inherits: true; initial-value: #e11d48; }
@property --bg { syntax: "<color>"; inherits: true; initial-value: #fff7ee; }
@property --bg2 { syntax: "<color>"; inherits: true; initial-value: #ffe9d2; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #2b1a10; }

:root {
  --a1: #f59e0b; --a2: #ea580c; --a3: #e11d48;
  --bg: #fff7ee; --bg2: #ffe9d2; --ink: #2b1a10; --muted: #8b7262;
  --card: rgba(255, 255, 255, .72); --card-solid: #fff; --line: rgba(120, 70, 30, .12);
  --glass: rgba(255, 255, 255, .55); --shadow: 0 18px 40px -22px rgba(120, 50, 0, .45);
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
  --grad: linear-gradient(135deg, var(--a1), var(--a2) 55%, var(--a3));
  --r: 18px; --map-filter: none;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif; font-size: 14.5px; color: var(--ink);
  transition: --a1 1.2s, --a2 1.2s, --a3 1.2s, --bg 1.2s, --bg2 1.2s, --ink 1.2s;
}
:root[data-theme="yalpiz"] { --a1: #34d399; --a2: #0d9488; --a3: #0ea5e9; --bg: #effcf7; --bg2: #d5f5ea; --ink: #0f2a24; --muted: #5d7d74; --line: rgba(13, 90, 80, .12); --shadow: 0 18px 40px -22px rgba(0, 90, 70, .45); }
:root[data-theme="okean"] { --a1: #38bdf8; --a2: #2563eb; --a3: #7c3aed; --bg: #eff6ff; --bg2: #dbeafe; --ink: #0f1d3a; --muted: #5c6b8a; --line: rgba(30, 60, 140, .12); --shadow: 0 18px 40px -22px rgba(20, 50, 160, .45); }
:root[data-theme="lavanda"] { --a1: #c084fc; --a2: #7c3aed; --a3: #ec4899; --bg: #faf5ff; --bg2: #f1e4ff; --ink: #24123d; --muted: #77669a; --line: rgba(90, 40, 160, .12); --shadow: 0 18px 40px -22px rgba(90, 30, 170, .45); }
:root[data-theme="tun"] {
  --a1: #22d3ee; --a2: #6366f1; --a3: #d946ef; --bg: #090d1c; --bg2: #131a36; --ink: #e8edff; --muted: #8e98bd;
  --card: rgba(20, 27, 54, .72); --card-solid: #141b36; --line: rgba(150, 170, 255, .13); --glass: rgba(20, 27, 54, .6);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8); --map-filter: invert(1) hue-rotate(195deg) brightness(.92) contrast(.9) saturate(.7);
}
:root[data-theme="olov"] {
  --a1: #fbbf24; --a2: #f43f5e; --a3: #a21caf; --bg: #170a10; --bg2: #2a1020; --ink: #ffe9ef; --muted: #c29aa8;
  --card: rgba(40, 16, 28, .72); --card-solid: #28101c; --line: rgba(255, 150, 180, .13); --glass: rgba(40, 16, 28, .6);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .85); --map-filter: invert(1) hue-rotate(160deg) brightness(.9) contrast(.9) saturate(.6);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); overflow-x: hidden; }
::selection { background: var(--a2); color: #fff; }
h1, h2, h3, .display { font-family: "Unbounded", "Manrope", sans-serif; letter-spacing: -.01em; }
a { color: var(--a2); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }

/* ===== jonli fon: suzuvchi rangli dog'lar ===== */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: linear-gradient(160deg, var(--bg), var(--bg2)); }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .38; mix-blend-mode: normal; }
.aurora i:nth-child(1) { background: var(--a1); top: -12vmax; left: -10vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: var(--a2); bottom: -16vmax; right: -12vmax; animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: var(--a3); top: 30%; left: 40%; width: 30vmax; height: 30vmax; opacity: .22; animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-22vw, -18vh) scale(.9); } }
@keyframes drift3 { 0% { transform: translate(-10vw, 10vh) rotate(0); } 100% { transform: translate(14vw, -16vh) rotate(160deg) scale(1.3); } }

/* ===== kirish animatsiyalari ===== */
.rise { animation: rise .7s cubic-bezier(.2, .9, .25, 1.15) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(4px); } }
.pop { animation: pop .45s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
.fade { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; } }

/* ===== tugmalar ===== */
button, input, select, textarea { font: inherit; color: inherit; }
.btn, button { position: relative; overflow: hidden; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; padding: 9px 16px;
  background: var(--glass); backdrop-filter: blur(8px); font-weight: 600; transition: transform .18s, box-shadow .25s, background .3s; }
button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px var(--a2); }
button:active { transform: translateY(1px) scale(.98); }
button:disabled { opacity: .55; pointer-events: none; }
button.pri { background: var(--grad); background-size: 160% 160%; color: #fff; border: 0; box-shadow: 0 10px 24px -12px var(--a2); animation: gradmove 6s ease infinite; }
button.pri::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
button.pri:hover::after { transform: translateX(120%); }
@keyframes gradmove { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
a.btn { display: inline-grid; place-items: center; color: var(--ink); text-decoration: none; }
button.ok { background: linear-gradient(135deg, #22c55e, #059669); color: #fff; border: 0; }
button.bad { background: linear-gradient(135deg, #fb7185, #dc2626); color: #fff; border: 0; }
button.ghost { background: transparent; border-color: transparent; }
button.sm { padding: 5px 11px; font-size: 13px; border-radius: 10px; }
button.icon { padding: 8px; width: 38px; height: 38px; display: inline-grid; place-items: center; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .5); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

input, select, textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card-solid);
  transition: border-color .2s, box-shadow .2s; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--a2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 18%, transparent); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; margin-bottom: 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 5px; color: var(--ink); font-weight: 500; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink); font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 20px; background: var(--line); position: relative; padding: 0; margin: 0; border: 0; flex: none; transition: background .3s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.switch input:checked { background: var(--grad); }
.switch input:checked::after { transform: translateX(18px); }

/* ===== kartalar ===== */
.card { background: var(--card); backdrop-filter: blur(16px) saturate(1.3); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { position: relative; overflow: hidden; background: var(--card); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.stat:hover { transform: translateY(-4px) rotate(-.4deg); }
.stat .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 10px;
  box-shadow: 0 8px 18px -8px var(--a2); }
.stat .ico svg { width: 22px; height: 22px; }
.stat b { display: block; font-family: "Unbounded", sans-serif; font-size: 26px; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat::after { content: ""; position: absolute; width: 120px; height: 120px; right: -40px; top: -40px; border-radius: 50%; background: var(--grad); opacity: .12; transition: transform .6s; }
.stat:hover::after { transform: scale(1.6); }

/* ===== jadval ===== */
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr, table tr { transition: background .2s; }
tr.click { cursor: pointer; }
tr.click:hover td { background: color-mix(in srgb, var(--a1) 9%, transparent); }
tr.off td { opacity: .45; }
.bad-t { color: var(--bad); font-weight: 700; }
.warn-t { color: var(--warn); font-weight: 700; }
.ok-t { color: var(--ok); font-weight: 700; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 30px; font-size: 12px; font-weight: 700; background: var(--line); white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.reja { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.tag.yolda { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tag.yolda::before { animation: blink 1.2s infinite; box-shadow: 0 0 0 0 currentColor; }
.tag.tugadi { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tag.bekor { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
@keyframes blink { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.bar { height: 7px; background: var(--line); border-radius: 6px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { padding: 10px 14px 10px 40px; border-radius: 12px; position: relative; font-weight: 500; transition: transform .2s; }
.alerts li:hover { transform: translateX(4px); }
.alerts li::before { content: "!"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.alerts li.red { background: color-mix(in srgb, var(--bad) 11%, transparent); }
.alerts li.red::before { background: var(--bad); animation: blink 1.6s infinite; color: #fff; }
.alerts li.yellow { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.alerts li.yellow::before { background: var(--warn); }

/* ===== modal va toast ===== */
.modal { position: fixed; inset: 0; background: rgba(10, 5, 20, .42); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center;
  padding: 36px 14px; overflow-y: auto; z-index: 1000; animation: fade .25s ease both; }
.modal > div { background: var(--card-solid); border: 1px solid var(--line); border-radius: 22px; padding: 22px; width: 100%; max-width: 580px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); animation: modalIn .45s cubic-bezier(.25, 1.4, .5, 1) both; }
.modal.wide > div { max-width: 1100px; }
.modal.closing { animation: fade .2s ease reverse both; }
.modal.closing > div { animation: modalIn .2s ease reverse both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.modal h3 { margin: 0 0 16px; font-size: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.err { color: var(--bad); min-height: 18px; margin: 6px 0; font-weight: 600; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 2000; }
.toast { background: var(--card-solid); border: 1px solid var(--line); border-left: 4px solid var(--a2); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow);
  font-weight: 600; animation: toastIn .5s cubic-bezier(.25, 1.5, .5, 1) both; max-width: 340px; }
.toast.bad { border-left-color: var(--bad); }
.toast.out { animation: toastOut .35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(60px); } }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos a img { width: 150px; height: 110px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); transition: transform .3s; }
.photos a img:hover { transform: scale(1.05) rotate(-1deg); }
.skel { height: 120px; border-radius: var(--r); background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--a1) 14%, transparent) 50%, var(--line) 75%);
  background-size: 300% 100%; animation: shimmer 1.3s infinite; margin-bottom: 14px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ===== admin karkasi ===== */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4); border-right: 1px solid var(--line); overflow-y: auto; z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand .logo { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 10px 22px -10px var(--a2); }
.brand .logo svg { width: 30px; animation: bob 1.4s ease-in-out infinite; }
.brand b { font-family: "Unbounded", sans-serif; font-size: 15px; line-height: 1.1; }
/* logotip (public/logo.svg): menyuda kichik, kirish sahifasida katta va suzib turadi */
.logo-img { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 8px 14px rgba(234, 88, 12, .35)); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .logo-img { transform: rotate(-8deg) scale(1.08); }
.logo-img.big { width: 76px; height: 76px; animation: float 3s ease-in-out infinite; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600;
  position: relative; transition: background .25s, transform .25s, color .25s; }
.side a svg { width: 20px; height: 20px; flex: none; opacity: .8; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.side a:hover { background: color-mix(in srgb, var(--a1) 12%, transparent); transform: translateX(3px); }
.side a:hover svg { transform: scale(1.18) rotate(-6deg); }
.side a.on { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -12px var(--a2); }
.side a.on svg { opacity: 1; }
.side .sp { flex: 1; }
.content { padding: 22px 26px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.topbar h1 { margin: 0; font-size: 24px; flex: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .burger { display: none; }

/* joriy foydalanuvchi va rollar */
.side .me { padding: 10px 12px; margin: 6px 0; border-radius: 12px; background: color-mix(in srgb, var(--a1) 10%, transparent); display: grid; gap: 4px; }
.side .me b { font-size: 13.5px; }
.side .me .chip { justify-self: start; }
.chip.role-admin { background: color-mix(in srgb, var(--a2) 18%, transparent); color: var(--a2); }
.chip.role-dispetcher { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.chip.role-kuzatuvchi { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.avatar { width: 48px; height: 48px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: Unbounded, sans-serif; flex: none; }
/* kuzatuvchi — faqat ko'radi: o'zgartirish tugmalari yashiriladi (server ham ruxsat bermaydi) */
body.role-kuzatuvchi :is(#quick, #add, #bulk, [data-del], .qc, #ed, #rp, #st, #fn, #rs, #cp, #cn, #gk, .modal form button.pri, .modal #sv) { display: none !important; }

/* ===== AI yordamchi ===== */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 58px; height: 58px; border-radius: 20px; border: 0; padding: 0;
  background: var(--grad); background-size: 160% 160%; color: #fff; font-size: 26px; box-shadow: 0 14px 30px -10px var(--a2);
  animation: gradmove 6s ease infinite, float 3.5s ease-in-out infinite; }
.ai-fab:hover { transform: scale(1.08) rotate(-6deg); }
.ai-fab span { position: absolute; right: 66px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--card-solid); color: var(--ink);
  font-size: 13px; padding: 6px 10px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none; }
.ai-fab:hover span { opacity: 1; }
.ai-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 950; background: var(--card-solid); border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px -30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .4s cubic-bezier(.3, 1.1, .4, 1); }
.ai-panel.open { transform: none; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ai-head b { font-family: Unbounded, sans-serif; flex: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; line-height: 1.5; font-size: 14px; animation: rise .35s both; overflow-wrap: anywhere; }
.ai-msg.u { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.ai-msg.a { align-self: flex-start; background: color-mix(in srgb, var(--a1) 10%, var(--card-solid)); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.ai-msg.err { background: color-mix(in srgb, var(--bad) 10%, var(--card-solid)); color: var(--bad); }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0; padding-left: 20px; }
.ai-msg table { font-size: 12.5px; margin: 6px 0; } .ai-msg td, .ai-msg th { padding: 4px 6px; }
.ai-msg code { background: var(--line); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.ai-prop { align-self: stretch; border: 2px dashed var(--a2); border-radius: 14px; padding: 12px; background: color-mix(in srgb, var(--a2) 6%, var(--card-solid)); animation: pop .4s both; }
.ai-prop.done { border-style: solid; border-color: var(--ok); } .ai-prop.no { opacity: .6; border-color: var(--muted); }
.ai-prop .row { margin-top: 8px; }
.ai-typing { align-self: flex-start; display: flex; gap: 5px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--a1) 10%, var(--card-solid)); }
.ai-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--a2); animation: blink2 1.2s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .2s; } .ai-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink2 { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.ai-chips { display: grid; gap: 8px; margin-top: 6px; }
.ai-chips button { text-align: left; font-weight: 600; font-size: 13px; }
.ai-foot { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 6px; }
.ai-foot .row { flex-wrap: nowrap; align-items: flex-end; }
.ai-foot textarea { min-height: 44px; max-height: 140px; resize: none; }
.ai-foot small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 640px) { .ai-fab { right: 14px; bottom: 14px; } }

/* mavzu tanlagich */
.themes { display: flex; gap: 6px; padding: 6px; border-radius: 30px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.themes button { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid transparent; box-shadow: none; }
.themes button.on { border-color: var(--ink); transform: scale(1.15); }
.themes button:hover { transform: scale(1.2); box-shadow: none; }
.themes button.auto { background: conic-gradient(#f59e0b, #e11d48, #7c3aed, #2563eb, #0d9488, #f59e0b); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ===== mashina modellari ===== */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.vcard { cursor: pointer; padding: 0; overflow: hidden; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .35s; margin: 0; }
.vcard:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -28px var(--a2); }
.vcard .scene { position: relative; height: 130px; background: linear-gradient(180deg, color-mix(in srgb, var(--a1) 18%, transparent), transparent);
  overflow: hidden; display: grid; place-items: end center; }
.vcard .scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 18px, transparent 18px 36px); opacity: .35; }
.vcard.moving .scene::after, .vcard:hover .scene::after { animation: road .5s linear infinite; }
@keyframes road { to { background-position: -36px 0; } }
.vcard .scene svg { width: 200px; margin-bottom: 8px; position: relative; z-index: 1; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .18)); transition: transform .4s; }
.vcard:hover .scene svg { transform: translateX(8px); }
.vcard .body { padding: 14px 16px 16px; }
.vsvg .wheel { transform-box: fill-box; transform-origin: center; }
.vcard:hover .wheel, .vcard.moving .wheel, .vsvg.moving .wheel, .login-scene .wheel { animation: spin .6s linear infinite; }
.vcard.moving .vsvg, .login-scene .vsvg { animation: bob .5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }
.plate { display: inline-flex; align-items: stretch; border: 2px solid #1f2937; border-radius: 6px; background: #fff; color: #111; font-weight: 800;
  font-family: "Unbounded", sans-serif; font-size: 13px; overflow: hidden; letter-spacing: .04em; white-space: nowrap; flex: none; }
.plate i { font-style: normal; background: #0ea5e9; color: #fff; font-size: 8px; padding: 0 4px; display: grid; place-items: center; line-height: 1;
  background: linear-gradient(#0ea5e9 33%, #fff 33% 66%, #16a34a 66%); color: transparent; width: 10px; }
.plate span { padding: 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--line); }
.chip.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chip.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
/* Oylik hisob-varag'i */
.slip { width: 100%; margin: 10px 0; }
.slip th { text-align: left; background: color-mix(in srgb, var(--a1) 8%, transparent); }
.slip td small { font-size: 12px; }
.chip.cold { background: color-mix(in srgb, #0ea5e9 16%, transparent); color: #0284c7; }
/* Telegram xabarlari va avto-reja */
.tgm { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tgm:last-child { border-bottom: 0; }
.tgm-t { white-space: pre-wrap; font-size: 13.5px; margin-top: 3px; max-height: 120px; overflow: auto; }
code.code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; font-weight: 700; background: var(--line); padding: 3px 9px; border-radius: 8px; user-select: all; }
.autoban { border: 2px solid var(--a2); gap: 10px; flex-wrap: wrap; }
/* guruh filtrlari (Maxway, Hoty Dog...) */
.chip.click { cursor: pointer; font-size: 12.5px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; transition: transform .2s, background .2s; user-select: none; }
.chip.click:hover { transform: translateY(-1px); }
.chip.click.on { background: var(--grad); color: #fff; }
.gdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.chip:not(.click) .gdot { margin-right: 5px; vertical-align: 0; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 3px solid var(--card-solid); box-shadow: 0 0 0 1px var(--line); }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); transform: scale(1.12); }
.preview-model { display: grid; place-items: center; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--a1) 16%, transparent), transparent); margin-bottom: 12px; }
.preview-model svg { width: 220px; }

/* ===== xarita ===== */
.map { height: 560px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.map.sm { height: 320px; }
.leaflet-tile-pane { filter: var(--map-filter); transition: filter .8s; }
.leaflet-container { background: var(--bg2); font-family: inherit; }
.mapwrap { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.mk-depot { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 22px; color: #fff;
  box-shadow: 0 0 0 0 var(--a2); animation: pulse 2s infinite; border: 3px solid #fff; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--a2) 60%, transparent); } 70% { box-shadow: 0 0 0 18px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.mk-client { width: 16px; height: 16px; border-radius: 50%; background: var(--card-solid); border: 4px solid var(--a2); box-shadow: 0 3px 8px rgba(0, 0, 0, .3); transition: transform .2s; }
.mk-client.sel { background: var(--a2); border-color: #fff; transform: scale(1.35); }
.mk-num { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; border: 3px solid #fff;
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .45); font-size: 13px; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.mk-num.done { background: linear-gradient(135deg, #22c55e, #059669); }
.mk-truck { position: relative; }
.mk-truck .bub { width: 46px; height: 46px; border-radius: 50%; background: var(--card-solid); border: 3px solid var(--c, var(--a2)); display: grid; place-items: center;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .5); }
.mk-truck .bub svg { width: 34px; }
.mk-truck.live .bub { animation: pulse 1.8s infinite; }
.mk-truck .lbl { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--card-solid); border-radius: 8px;
  padding: 1px 6px; font-size: 11px; font-weight: 800; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); color: var(--ink); }
.mk-truck.old { opacity: .55; filter: grayscale(.6); }
.route-anim { stroke-dasharray: 12 10; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.vlist { max-height: 560px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.vitem { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: transform .25s; }
.vitem:hover { transform: translateX(-4px); border-color: var(--a2); }
.vitem svg { width: 64px; flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.live { background: var(--ok); animation: blink 1.4s infinite; color: var(--ok); }
.dot.old { background: var(--muted); }

/* Xarita ochiq turganda og'ir effektlar to'xtaydi — xarita silliq suriladi va kattalashtiriladi */
body:has(.leaflet-container, .map ymaps) .aurora i { animation-play-state: paused; }
.card:has(.map), .modal .card { backdrop-filter: none; background: var(--card-solid); }
.leaflet-container { will-change: transform; }

.clients-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.clients-wrap .map { height: 600px; position: sticky; top: 16px; }
@media (max-width: 1200px) { .clients-wrap { grid-template-columns: 1fr; } .clients-wrap .map { height: 380px; position: static; } .clients-wrap > :last-child { order: -1; } }

/* rejalashtiruvchi */
.planner { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
.picklist { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.pick:hover { background: color-mix(in srgb, var(--a1) 10%, transparent); }
.pick input { width: 18px; height: 18px; accent-color: var(--a2); flex: none; margin: 0; }
.pick small { display: block; color: var(--muted); }
.pick.nogps small .warn-t { font-weight: 600; }
.plan-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.plan-sum div { background: color-mix(in srgb, var(--a1) 12%, transparent); border-radius: 12px; padding: 8px 10px; }
.plan-sum b { display: block; font-family: "Unbounded", sans-serif; font-size: 17px; }
.plan-sum span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.order { list-style: none; padding: 0; margin: 0; counter-reset: o; }
.order li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); animation: rise .5s both; animation-delay: calc(var(--i) * 60ms); }
.order li::before { counter-increment: o; content: counter(o); width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 12px;
  font-weight: 800; display: grid; place-items: center; flex: none; }
.order li .eta { margin-left: auto; font-weight: 700; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.order li .mv { display: flex; gap: 2px; flex: none; }
.order li .mv button { padding: 2px 7px; font-size: 11px; box-shadow: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--a2); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }

/* ===== kirish sahnasi ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.login-scene { position: absolute; left: 0; right: 0; bottom: 0; height: 230px; pointer-events: none; }
.login-scene .city { position: absolute; bottom: 60px; left: 0; width: 200%; height: 120px; opacity: .25; animation: slide 40s linear infinite; }
.login-scene .road { position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: color-mix(in srgb, var(--ink) 85%, transparent); }
.login-scene .road::after { content: ""; position: absolute; top: 28px; left: 0; width: 200%; height: 4px;
  background: repeating-linear-gradient(90deg, #fff 0 40px, transparent 40px 80px); opacity: .7; animation: slide 1.2s linear infinite; }
@keyframes slide { to { transform: translateX(-50%); } }
.login-scene .truck { position: absolute; bottom: 38px; left: 50%; width: 260px; transform: translateX(-50%); }
.login-scene .cloud { position: absolute; top: -120px; width: 120px; height: 40px; border-radius: 40px; background: var(--card-solid); opacity: .6; animation: cloud 30s linear infinite; }
.login-scene .cloud::before { content: ""; position: absolute; width: 60px; height: 50px; border-radius: 50%; background: inherit; top: -24px; left: 20px; }
@keyframes cloud { from { left: 110%; } to { left: -20%; } }
.login { width: 100%; max-width: 380px; position: relative; z-index: 2; margin-bottom: 160px; }
.login h2 { font-size: 26px; margin: 4px 0 4px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .logo-big { width: 64px; height: 64px; border-radius: 20px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 16px 30px -14px var(--a2);
  animation: float 3s ease-in-out infinite; }
.login .logo-big svg { width: 42px; }
@keyframes float { 50% { transform: translateY(-8px) rotate(4deg); } }
.login-wrap > .themes { position: absolute; top: 16px; right: 16px; display: flex; z-index: 3; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty svg { width: 160px; display: block; margin: 0 auto 10px; }

/* ===== haydovchi (telefon) ===== */
.drv { max-width: 560px; margin: 0 auto; padding: 14px 14px 96px; font-size: 15.5px; }
.drv .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.drv .head .who { display: flex; align-items: center; gap: 10px; }
.drv .head .av { width: 42px; height: 42px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: "Unbounded", sans-serif; }
.drv button { padding: 13px 16px; font-size: 15.5px; border-radius: 14px; }
.drv button.big { width: 100%; margin-top: 10px; }
.drv input { padding: 13px; font-size: 16px; }
.stop { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stop .nm { flex: 1; min-width: 0; }
.stop .nm small { display: block; color: var(--muted); font-size: 12.5px; }
.stop.done .nm b { color: var(--muted); text-decoration: line-through; }
.stop .pos { width: 30px; height: 30px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.stop.next .pos { background: var(--grad); color: #fff; animation: pulse 1.8s infinite; }
.stop.done .pos { background: linear-gradient(135deg, #22c55e, #059669); color: #fff; }
.shot { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; margin-top: 8px; background: var(--line); }
.stop .nm small.bad-t { color: var(--bad); }
.stop .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 55%; }
/* haydovchi telefonida tugmalar nom ostida alohida qatorda — nom siqilmasin */
.drv .stop { flex-wrap: wrap; }
.drv .stop .acts { flex-basis: 100%; max-width: none; padding-left: 40px; }
.stop .thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; flex: none; border: 1px solid var(--line); }
label.btn { display: inline-grid; place-items: center; margin: 0; font-size: 16px; color: var(--ink); }
.ophoto img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); margin-top: 4px; transition: transform .3s; }
.ophoto img:hover { transform: scale(1.08); }
.camera { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 14px; border: 2px dashed var(--a2); color: var(--a2);
  font-weight: 700; cursor: pointer; margin-bottom: 12px; transition: background .2s; }
.camera:hover { background: color-mix(in srgb, var(--a2) 8%, transparent); }
.tabs { position: fixed; bottom: 10px; left: 10px; right: 10px; max-width: 540px; margin: 0 auto; display: flex; background: var(--glass); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 6px; z-index: 500; }
.tabs a { flex: 1; text-align: center; padding: 8px 4px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 700; border-radius: 16px;
  display: grid; justify-items: center; gap: 2px; transition: color .25s, background .25s; }
.tabs a svg { width: 22px; height: 22px; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.tabs a.on { color: #fff; background: var(--grad); }
.tabs a.on svg { transform: translateY(-2px) scale(1.1); }
/* navigator: yo'lga chiqish tugmasi va tanlash oynasi */
.navgo { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 10px 0; }
.drv .navgo button.big { margin-top: 0; }
.navgo .navpick { padding: 12px; font-size: 13px; }
.modal.sheet { align-items: flex-end; padding: 0; }
.modal.sheet > div { max-width: 560px; border-radius: 24px 24px 0 0; padding-bottom: 30px; animation: sheetIn .38s cubic-bezier(.25, 1.2, .5, 1) both; }
@keyframes sheetIn { from { transform: translateY(100%); } }
.navlist { display: grid; gap: 8px; }
.navlist button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--card-solid); width: 100%; }
.navlist button.on { box-shadow: 0 0 0 2px var(--a2); }
.navlist i { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; font-size: 17px; }
.navlist span { display: grid; flex: 1; }
.navlist small { color: var(--muted); font-weight: 600; font-size: 12px; }
.navlist em { font-style: normal; color: var(--a2); font-weight: 800; font-size: 18px; }
.gps-badge { font-size: 12px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- analitika: grafiklar (karopka — s1 ko'k, yashik — s2 to'q sariq; qorong'i mavzularda o'z qadamlari) ---------- */
:root { --s1: #2a78d6; --s2: #eb6834; --up: #15803d; --down: #dc2626; }
:root[data-theme="tun"], :root[data-theme="olov"] { --s1: #3987e5; --s2: #d95926; --up: #22c55e; --down: #f87171; }
.an-flt .row { gap: 8px; align-items: center; }
.an-flt label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.an-flt input[type=date] { width: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.kpi > span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.kpi > b { font-size: 26px; line-height: 1.1; font-weight: 800; }
.kpis.small { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.kpis.small .kpi { padding: 10px 12px; box-shadow: none; }
.kpis.small .kpi > b { font-size: 18px; }
.dl { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.kpi .dl { white-space: normal; }
.dl.up { color: var(--up); }
.dl.down { color: var(--down); }
.viz { position: relative; margin: 6px 0 4px; min-height: 120px; }
.viz svg { display: block; overflow: visible; }
.viz .grid { stroke: var(--line); stroke-width: 1; }
.viz .axis { stroke: var(--muted); stroke-opacity: .45; stroke-width: 1; }
.viz .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz .s1, .sw.s1 { fill: var(--s1); background: var(--s1); }
.viz .s2, .sw.s2 { fill: var(--s2); background: var(--s2); }
.viz .hit { fill: transparent; cursor: pointer; }
.viz .hit.on { fill: var(--ink); fill-opacity: .06; }
.vtip { display: none; position: absolute; top: 0; z-index: 5; pointer-events: none; min-width: 150px; padding: 8px 10px; border-radius: 10px;
  background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12.5px; }
.vtip .tr { display: grid; grid-template-columns: 10px 1fr auto; gap: 6px; align-items: center; margin-top: 3px; }
.vtip .tr b { font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.vlegend { display: flex; gap: 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.vlegend span { display: inline-flex; align-items: center; gap: 6px; }
.hb { margin: 10px 0 12px; }
.hb-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.hb-h span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.hb-h b { font-variant-numeric: tabular-nums; font-size: 13px; }
.hb-bar { height: 8px; border-radius: 6px; background: var(--line); margin: 5px 0 3px; overflow: hidden; }
.hb-bar i { display: block; height: 100%; border-radius: 6px; }
/* Haydovchilar ish grafigi: oy jadvali (birinchi ustun telefonda ham joyida qoladi) */
.sch table { border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.sch th, .sch td { padding: 4px 2px; border: 0; text-align: center; }
.sch th { font-weight: 700; min-width: 26px; line-height: 1.1; }
.sch th small { display: block; font-weight: 600; color: var(--muted); font-size: 10.5px; }
.sch th.we small { color: var(--bad); }
.sch .nm { position: sticky; left: 0; z-index: 1; background: var(--card-solid); text-align: left; min-width: 170px; padding: 4px 8px; }
.sch .nm small { display: block; font-size: 11.5px; }
.sch tr > th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card-solid); text-align: left; }
.sc { cursor: pointer; border-radius: 6px; height: 28px; position: relative; }
.sc:hover { outline: 2px solid var(--a1); }
.sc.k-ish { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 800; }
.sc.k-dam { background: var(--line); color: var(--muted); }
.sc.k-tatil { background: color-mix(in srgb, var(--info) 16%, transparent); }
.sc.k-kasal { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.sc.cu::after, .sc-sw.cu::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.sch .td { box-shadow: inset 0 0 0 2px var(--a2); }
.sch th.td { border-radius: 6px; }
/* Kunlik KPI: manzil qatori — holat, rasm, tasdiqlash tugmalari */
.kst { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kst:last-child { border-bottom: 0; }
.kst .pos { width: 24px; height: 24px; border-radius: 8px; background: var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.kst small { display: block; }
.kst .ophoto img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.sch-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sch-strip .sc { height: auto; padding: 4px 0; display: grid; justify-items: center; cursor: default; line-height: 1.2; }
.sch-strip .sc:hover { outline: 0; }
.sch-strip small { font-size: 10.5px; opacity: .8; }
.sc-sw { display: inline-grid; place-items: center; width: 20px; height: 18px; border-radius: 5px; background: var(--line); font-style: normal; position: relative; font-size: 11px; }
.share { width: 90px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.share i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
#anTbl td.n, #anTbl th.n { white-space: nowrap; }
#anTbl td:nth-child(2) { min-width: 260px; }

/* ---------- CRM: vazifalar, mijoz kartasi ---------- */
body.role-kuzatuvchi .w { display: none !important; }
.nbadge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff;
  font-style: normal; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.chip.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.task:first-of-type { border-top: 0; }
.task.closed b { text-decoration: line-through; opacity: .6; }
.tchk { width: 26px; height: 26px; min-width: 26px; padding: 0; border-radius: 8px; border: 2px solid var(--a2); background: transparent; color: var(--a2);
  font-weight: 900; display: grid; place-items: center; margin-top: 1px; }
.tchk:hover { background: color-mix(in srgb, var(--a2) 14%, transparent); }
.task.closed .tchk { background: var(--a2); color: #fff; }
.tmeta { display: grid; gap: 4px; justify-items: end; text-align: right; white-space: nowrap; }
.tnote { font-size: 12.5px; margin-top: 3px; white-space: pre-line; }
.contact { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.6; }
.contact:first-of-type { border-top: 0; }
.cc-cols { margin-top: 14px; gap: 0 24px; }
.noteform { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--glass); }
.noteform textarea { min-height: 56px; }
.noteform .chip { margin: 0; }
.tlist { max-height: 460px; overflow: auto; padding-right: 4px; }
.tl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.tl:first-child { border-top: 0; }
.tl.note { background: color-mix(in srgb, var(--a1) 7%, transparent); border-radius: 10px; padding: 8px; border-top: 0; margin: 4px 0; }
.tli { width: 22px; text-align: center; }
.tlph img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
/* til tanlagich */
.langs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); vertical-align: middle; }
.langs .lang { padding: 4px 8px; min-width: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; box-shadow: none; }
.langs .lang.on { background: var(--grad); color: #fff; }
.login-wrap > .langs { position: absolute; top: 16px; left: 16px; z-index: 3; }

/* CRM 2: zakas mahsulot qatorlari, jami qatori */
.oitems { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 12px; background: var(--glass); }
.oir { display: grid; grid-template-columns: 1fr 90px auto minmax(90px, auto) auto; gap: 6px; align-items: center; margin: 6px 0; }
.oir input, .oir select { margin: 0; }
.oip { white-space: nowrap; font-size: 12px; }
@media (max-width: 640px) { .oir { grid-template-columns: 1fr 70px auto auto; } .oir .oip { grid-column: 1 / -1; order: 9; } }
tr.total td { border-top: 2px solid var(--line); background: color-mix(in srgb, var(--a1) 6%, transparent); }
.warnbox { background: color-mix(in srgb, var(--warn) 12%, var(--card)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); padding: 10px 14px; font-weight: 700; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform .4s cubic-bezier(.3, 1.2, .5, 1); box-shadow: var(--shadow); background: var(--card-solid); }
  .side.open { transform: none; }
  .topbar .burger { display: inline-grid; }
  .content { padding: 14px 14px 40px; }
  .mapwrap, .planner { grid-template-columns: 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 19px; }
  .themes { display: none; }
  .themes.show { display: flex; }
  .map { height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
