:root {
  --bg: #f4f5fa;
  --bg-2: #eceef6;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e6e8f0;
  --primary: #5b5bf6;
  --primary-2: #8b5cf6;
  --primary-soft: #eef0ff;
  --success: #10b981;
  --success-soft: #e7f8f1;
  --warn: #f59e0b;
  --warn-soft: #fff5e1;
  --danger: #ef4444;
  --danger-soft: #fdecec;
  --info: #0ea5e9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, .18);
  --radius: 16px;
  --side: #0f1224;
  --side-text: #a5acc7;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0d18;
  --bg-2: #111528;
  --card: #121729;
  --text: #e8eaf3;
  --muted: #8e97b5;
  --faint: #5f6889;
  --line: #20263d;
  --primary-soft: #1d1f45;
  --success-soft: #0f2a24;
  --warn-soft: #2d2412;
  --danger-soft: #2f1518;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --side: #0b0e1c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "tnum";
}
a { color: var(--primary); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[v-cloak] { display: none; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- layout ---------------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: radial-gradient(120% 60% at 0% 0%, #23266b 0%, transparent 60%), var(--side);
  color: var(--side-text); padding: 22px 14px 10px; display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 18px; color: #fff; flex: none; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 8px 24px rgba(91, 91, 246, .45);
}
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand span { font-size: 12px; color: var(--side-text); }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; flex: none;
  color: var(--side-text); cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-item.active .icon { color: #a5b4fc; }
.nav-item .badge { margin-left: auto; }
/* bo'limlar ko'p — ro'yxat o'zi aylanadi, pastki qism (rejim, chiqish) doim ko'rinadi */
.side-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; padding: 0 6px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }
.sidebar-foot { flex: none; margin-top: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; font-weight: 700; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.content { padding: 8px 32px 40px; display: flex; flex-direction: column; gap: 20px; }

/* ---------------- periods ---------------- */
.periods { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.chip {
  border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted);
  font-weight: 500; font-size: 13px; white-space: nowrap;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(91, 91, 246, .3); }
.dates { display: flex; align-items: center; gap: 6px; }
.dates input { width: 132px; }

/* ---------------- controls ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 500;
  white-space: nowrap; transition: transform .05s, background .15s, border-color .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border: 0; }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border: 0; }
.btn.success { background: var(--success); color: #fff; border: 0; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon-only { width: 38px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.input, input[type="date"], input[type="text"], input[type="search"], input[type="number"], select {
  height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  outline: none; min-width: 0;
}
.input:focus, input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); }
.segmented button { border: 0; background: none; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.segmented button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* xodim paneli bo'limlari (agent / yetkazuvchi bosh sahifasi) */
.panel-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); }
.panel-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0;
  border: 0; background: none; padding: 9px 8px; border-radius: 10px; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 14px;
}
.panel-tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-tabs button.on { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }

/* ---------------- cards ---------------- */
.grid { display: grid; gap: 20px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g-6 { grid-template-columns: repeat(6, 1fr); }
.g-2 { grid-template-columns: 2fr 1fr; }
.g-11 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card-h .muted { font-size: 12px; }
.card-b { padding: 12px 20px 20px; }
.card.click { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card.click:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: transparent; }

.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.kpi-v { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 12px; line-height: 1.1; }
.kpi-v small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-f { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.delta { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.delta.flat { color: var(--muted); background: var(--bg-2); }
.tone-primary { background: var(--primary-soft); color: var(--primary); }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-info { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); }

.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progress.ok > i { background: linear-gradient(90deg, #10b981, #34d399); }
.progress.mid > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress.low > i { background: linear-gradient(90deg, #ef4444, #f87171); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warn-soft); color: #d97706; }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.badge.mute { background: var(--bg-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 700;
  color: #fff; font-size: 14px; letter-spacing: .02em;
}
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }

/* ---------------- lists & tables ---------------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; margin: 0 -12px; padding: 11px 12px; border-radius: 10px; border-bottom-color: transparent; }
.li.click:hover { background: var(--bg-2); }
.rank { width: 26px; text-align: center; font-weight: 700; color: var(--faint); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); position: sticky; top: 0; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--bg-2); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; color: var(--faint); margin-bottom: 8px; }

.chart { position: relative; height: 300px; }
.chart.sm { height: 220px; }
.chart.xs { height: 180px; }
.map { height: 460px; border-radius: 12px; overflow: hidden; z-index: 0; }
.map.sm { height: 240px; }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

/* attendance calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .wd { font-size: 11px; color: var(--faint); text-align: center; font-weight: 600; }
.cal .d { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 600; position: relative; }
.cal .d.ok { background: var(--success-soft); color: var(--success); }
.cal .d.late { background: var(--warn-soft); color: #d97706; }
.cal .d.absent { background: var(--danger-soft); color: var(--danger); }
.cal .d.off, .cal .d.future { background: var(--bg-2); color: var(--faint); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ring */
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font-size: 26px; letter-spacing: -.03em; display: block; line-height: 1; }
.ring .c span { font-size: 11px; color: var(--muted); }

/* hero (agent) */
.hero {
  border-radius: 20px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #a78bfa 0%, transparent 50%), linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 16px 40px rgba(91, 91, 246, .35);
}
.hero .muted { color: rgba(255, 255, 255, .75); }
.hero .ring .c span { color: rgba(255, 255, 255, .8); }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 13, 24, .5); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 8px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.modal-h h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.modal-b { padding: 8px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal.wide { width: min(880px, 100%); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2000; padding: 12px 18px; border-radius: 12px; background: #111827; color: #fff; box-shadow: var(--shadow-lg); animation: pop .2s; font-weight: 500; }
.toast.err { background: var(--danger); }

.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--line), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(60% 50% at 50% 0%, var(--primary-soft), transparent), var(--bg); }
.login .card { width: min(440px, 100%); padding: 32px; text-align: center; }
.login .brand-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px; }
.login h2 { margin: 0 0 8px; letter-spacing: -.02em; }
.steps { text-align: left; margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li > b { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; font-size: 12px; }

.icon { width: 18px; height: 18px; flex: none; }
.icon.lg { width: 20px; height: 20px; }

.switch { position: relative; width: 40px; height: 24px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.tabbar { display: none; }
.mobile-only { display: none; }

.leaflet-container { font: inherit; background: var(--bg-2); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6); }
.pin-n { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); color: #fff; font: 700 12px/21px Inter, sans-serif; text-align: center; }
.pin-me { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25), 0 2px 6px rgba(0,0,0,.35); }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }

/* ---------------- responsive / Mini App ---------------- */
@media (max-width: 1640px) { .g-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) {
  .g-3 { grid-template-columns: 1fr 1fr; }
  .g-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar h1 { font-size: 19px; }
  .content { padding: 4px 16px 96px; gap: 14px; }
  .g-11, .g-3 { grid-template-columns: 1fr; }
  .g-kpi, .g-6 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid { gap: 14px; }
  .kpi { padding: 14px; }
  .kpi-v { font-size: 20px; margin-top: 10px; }
  .kpi-ic { width: 30px; height: 30px; }
  .periods { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .panel-tabs button { flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 11.5px; }
  .periods::-webkit-scrollbar { display: none; }
  .desktop-only { display: none !important; }
  .mobile-only { display: initial; }
  .chart { height: 240px; }
  .map { height: 360px; }
  .card-h { padding: 14px 16px 4px; }
  .card-b { padding: 10px 16px 16px; }
  .kv { grid-template-columns: 110px 1fr; }
  .overlay { place-items: end center; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; width: 100%; }
  td, th { padding: 10px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 11px; color: var(--muted); padding: 6px 0; border-radius: 10px; cursor: pointer; font-weight: 500;
  }
  .tabbar button.on { color: var(--primary); }
}

/* buyurtma izohlari */
.comment { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; max-width: 92%; }
.comment.mine { align-self: flex-end; background: color-mix(in srgb, var(--primary) 12%, transparent); }
/* tovar statistikasi */
.g-4 { grid-template-columns: repeat(4, 1fr); }
.mini-kpi { background: var(--bg-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mini-kpi b { display: block; font-size: 18px; margin: 2px 0; }
@media (max-width: 900px) { .g-4 { grid-template-columns: 1fr 1fr; } }

/* ---------------- supervayzer: bonus va nazorat ---------------- */
.bonus-hero { background: #1f2937; color: #fff; border-radius: 16px; padding: 18px 20px; }
.bonus-hero .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.bonus-hero .v small { font-size: 14px; font-weight: 600; opacity: .75; }
:root[data-theme="dark"] .bonus-hero { background: linear-gradient(135deg, #312e81, #1e1b4b); }
.bonus-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.kv > span { color: var(--muted); flex: none; width: 96px; }
.kv > b, .kv > .kv-bar { margin-left: auto; }
.kv-bar { display: flex; align-items: center; gap: 10px; width: 60%; }
.kv-bar > b { width: 64px; text-align: right; flex: none; }
.kv-bar > .progress { flex: 1; }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 10px; }
/* ish haqi: nomi chapda (to'liq kenglik), summa o'ngda */
.kv.sal { padding: 3px 0; }
.kv.sal > span { width: auto; flex: 1; min-width: 0; }
.kv.sal > b { flex: none; white-space: nowrap; }

/* ================= agent: sodda interfeys (simple.js) ================= */
.sh { display: flex; flex-direction: column; gap: 14px; }
.sh-hello { padding: 2px 2px 0; }
.sh-hi { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sh-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sh-st { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted); }
.sh-st span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-size: 12px; flex: none; }
.sh-st.on { border-color: var(--primary); color: var(--text); background: var(--primary-soft); }
.sh-st.on span { background: var(--primary); color: #fff; }
.sh-st.ok { color: var(--success); }
.sh-st.ok span { background: var(--success); color: #fff; }

.sh-main { border-radius: 22px; padding: 20px; color: #fff; box-shadow: var(--shadow-lg); text-align: center;
  background: linear-gradient(150deg, #5b5bf6, #3b37c9); }
.sh-main.st-start { background: linear-gradient(150deg, #16a34a, #0f7a37); }
.sh-main.st-done { background: linear-gradient(150deg, #334155, #1e293b); }
.sh-main h2 { margin: 4px 0 6px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.sh-main p { margin: 0 0 16px; opacity: .92; font-size: 15px; line-height: 1.45; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sh-emoji { font-size: 44px; line-height: 1; }
.sh-label { font-size: 14px; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.sh-chip { background: rgba(255, 255, 255, .18); padding: 4px 10px; border-radius: 999px; font-size: 14px; }
.sh-chip.bad { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.sh-btn { width: 100%; min-height: 64px; border: 0; border-radius: 16px; font-size: 20px; font-weight: 800; cursor: pointer;
  background: #fff; color: #3b37c9; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); transition: transform .1s; }
.sh-btn:active { transform: scale(.98); }
.sh-btn.green { color: #0f7a37; }
.sh-btn:disabled { opacity: .7; }
.sh-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sh-row .sh-mini { flex: 1; background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }
.sh-mini { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.sh-mini.wide { width: 100%; margin-top: 8px; }

.sh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-tile.gold { background: linear-gradient(150deg, #fff7d6, #fde68a); border-color: #fcd34d; color: #78350f; }
.sh-tile b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sh-tile small { color: var(--muted); font-size: 13px; }
.sh-tile.gold small { color: #92400e; }
.sh-t-top { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.sh-tile.gold .sh-t-top { color: #92400e; }
.sh-ico { font-size: 20px; }
.sh-bar { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-top: 6px; }
.sh-bar i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.sh-bar i.full { background: var(--success); }

.sh-alert { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--danger-soft); color: var(--text); font-size: 16px; text-align: left; }
.sh-alert small { color: var(--muted); }
.sh-arrow { font-size: 28px; color: var(--muted); }

.sh-count { font-weight: 800; font-size: 16px; }
.sh-stops { display: flex; flex-direction: column; gap: 8px; }
.sh-stop { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); font-size: 15px; }
.sh-stop.next { border: 2px solid var(--primary); background: var(--primary-soft); }
.sh-stop.done { opacity: .6; }
.sh-stop.late { border-color: var(--danger); }
.sh-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-weight: 800; flex: none; }
.sh-stop.done .sh-num { background: var(--success); color: #fff; }
.sh-stop.next .sh-num { background: var(--primary); color: #fff; }
.sh-go { min-height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; flex: none; }
.ok-t { color: var(--success); }
.bad-t { color: var(--danger); font-weight: 600; }

.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sh-gt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 6px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; }
.sh-gt:active { transform: scale(.97); }
.sh-gi { font-size: 30px; line-height: 1; }
.sh-grid.small { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sh-grid.small .sh-gt { min-height: 76px; font-size: 12px; padding: 8px 2px; }
.sh-grid.small .sh-gi { font-size: 24px; }
.sh-end { min-height: 54px; border-radius: 16px; border: 2px solid var(--danger); background: transparent; color: var(--danger); font-size: 17px; font-weight: 800; cursor: pointer; }
.sh-help { text-align: center; color: var(--muted); font-size: 13px; padding-bottom: 8px; }
.sh-me { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.sh-me-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-size: 17px; }
@media (min-width: 900px) {
  .sh { max-width: 720px; }
  .sh-tiles { grid-template-columns: repeat(4, 1fr); }
  .sh-grid { grid-template-columns: repeat(6, 1fr); }
}

/* do'kon tekshiruvi (merch.js) */
.m-shot { width: 84px; height: 84px; border-radius: 12px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; }
.m-q { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.m-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-yn button { min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--text); font-size: 17px; font-weight: 700; cursor: pointer; }
.m-yn button.yes { border-color: var(--success); background: var(--success-soft); }
.m-yn button.no { border-color: var(--danger); background: var(--danger-soft); }
