/* webapp/styles.css — FreeBuff Control panel (Telegram Mini App + brauzer)
   Palitra: dark slate default + cyan/emerald accent; light tema — soft gray. */
:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-glow: rgba(6, 182, 212, 0.1);
  --surface: #111c2e;
  --surface-2: #16233a;
  --surface-3: #1c2b45;
  --text: #e8eef7;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --border: #1e293b;
  --border-strong: #2a3b52;
  --accent: #06b6d4;
  --accent-2: #22d3ee;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-line: rgba(6, 182, 212, 0.3);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  /* Baraban ko'rsatkich badge ranglari (qorong'i tema) */
  --badge-imba: #a78bfa;
  --badge-imba-soft: rgba(167, 139, 250, 0.12);
  --badge-yulduzli: #fbbf24;
  --badge-yulduzli-soft: rgba(251, 191, 36, 0.12);
  --badge-omad: #34d399;
  --badge-omad-soft: rgba(52, 211, 153, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 44px rgba(2, 6, 23, 0.42);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --radius: 18px;
  --radius-sm: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-glow: rgba(8, 145, 178, 0.1);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e7eef6;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #0284c7;
  --accent-2: #0d9488;
  --accent-soft: rgba(2, 132, 199, 0.1);
  --accent-line: rgba(2, 132, 199, 0.28);
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.1);
  /* Baraban ko'rsatkich badge ranglari (yorug' tema) */
  --badge-imba: #7c3aed;
  --badge-imba-soft: rgba(124, 58, 237, 0.08);
  --badge-yulduzli: #b45309;
  --badge-yulduzli-soft: rgba(180, 83, 9, 0.1);
  --badge-omad: #047857;
  --badge-omad-soft: rgba(4, 120, 87, 0.1);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 14px 34px rgba(15, 23, 42, 0.07);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 480px at 10% -10%, var(--bg-glow), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(108px + env(safe-area-inset-bottom));
}

body.modal-open {
  overflow: hidden;
}

.app {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

svg {
  display: block;
}

/* ------------------------------- topbar -------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: #e6feff;
  background: linear-gradient(145deg, #155e75, #0e7490 55%, #0d9488);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-sm);
  flex: none;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand__text {
  min-width: 0;
}

.brand__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 48vw;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.status-pill[data-state="on"] {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: rgba(52, 211, 153, 0.28);
}

.status-pill[data-state="on"]::before {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.status-pill[data-state="off"] {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.28);
}

.status-pill[data-state="off"]::before {
  background: var(--danger);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, color 0.15s ease;
  flex: none;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn--sm {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  font-size: 13px;
}

/* Theme toggle: qorong'ida quyosh, yorug'da oy ko'rinadi */
.theme-toggle__moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle__sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle__moon {
  display: block;
}

/* -------------------------------- cards -------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.1px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}

.meta-row:last-child {
  border-bottom: 0;
}

.meta-row__label {
  color: var(--muted);
  flex: none;
}

.meta-row__value {
  color: var(--text-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

/* --------------------------------- hero -------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px 200px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  border-color: var(--border);
  padding: 18px;
}

.hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.status-badge--off {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.28);
}

.status-badge--wait {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: rgba(251, 191, 36, 0.28);
}

.hero__hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.hero__actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
}

/* ------------------------------- buttons ------------------------------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 650;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.07s ease, opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.btn:hover {
  border-color: var(--border-strong);
}

.btn:active {
  transform: scale(0.975);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.game-card:focus-visible,
.tab:focus-visible,
.seg:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: linear-gradient(145deg, #0e7490, #0891b2 65%, #0d9488);
  border-color: transparent;
  color: #f0fdff;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.4);
}

:root[data-theme="light"] .btn--primary {
  background: linear-gradient(145deg, #0284c7, #0891b2 65%, #0e7490);
  box-shadow: 0 6px 18px rgba(8, 51, 68, 0.22);
}

.btn--ghost {
  background: transparent;
}

.btn--danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.32);
  background: var(--danger-soft);
}

.btn--block {
  width: 100%;
  margin-top: 10px;
}

.btn--sm {
  padding: 8px 12px;
  min-height: 44px;
  font-size: 12px;
  border-radius: 10px;
}

/* ---------------------- main utility sync buttons ---------------------- */
/* Balansni yangilash / initData yangilash: qorong'i fonda ham, yorug' fonda
   ham aniq ko'rinadigan gradient + glow. Touch target 48px. */
.btn--sync {
  position: relative;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  isolation: isolate;
}

.btn--sync svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(2, 6, 23, 0.35));
}

.btn--sync--emerald {
  color: #ecfdf5;
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(135deg, #047857 0%, #10b981 58%, #22d3ee 100%);
  box-shadow:
    0 10px 28px rgba(16, 185, 129, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn--sync--cyan {
  color: #ecfeff;
  border-color: rgba(34, 211, 238, 0.55);
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 58%, #22d3ee 100%);
  box-shadow:
    0 10px 28px rgba(6, 182, 212, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn--sync--emerald:hover {
  border-color: rgba(110, 231, 183, 0.8);
  box-shadow:
    0 12px 32px rgba(16, 185, 129, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--sync--cyan:hover {
  border-color: rgba(103, 232, 249, 0.8);
  box-shadow:
    0 12px 32px rgba(6, 182, 212, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--sync[disabled] {
  box-shadow: none;
  filter: saturate(0.65);
}

:root[data-theme="light"] .btn--sync--emerald {
  color: #f0fdf4;
  border-color: rgba(4, 120, 87, 0.45);
  background: linear-gradient(135deg, #065f46 0%, #059669 60%, #0891b2 100%);
  box-shadow:
    0 8px 20px rgba(4, 120, 87, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

:root[data-theme="light"] .btn--sync--cyan {
  color: #ecfeff;
  border-color: rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #075985 0%, #0284c7 60%, #0d9488 100%);
  box-shadow:
    0 8px 20px rgba(2, 132, 199, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

:root[data-theme="light"] .btn--sync svg {
  filter: none;
}

.btn--start {
  padding: 14px 18px;
  min-height: 52px;
  font-size: 14px;
  font-weight: 700;
  border-color: transparent;
  color: #f0fdff;
  background: linear-gradient(145deg, #0e7490, #0d9488);
  box-shadow: 0 10px 24px rgba(8, 51, 68, 0.26);
}

.btn--start[disabled] {
  box-shadow: none;
}

.btn--stop {
  padding: 14px 18px;
  min-height: 52px;
  font-size: 14px;
  font-weight: 650;
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.3);
}

/* -------------------------------- pills -------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  white-space: nowrap;
}

.pill--muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}

.pill--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.3);
}

.pill--off {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.3);
}

.pill--warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.3);
}

/* -------------------------------- stats -------------------------------- */
.stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 13px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.stat__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 650;
}

.stat__value {
  margin-top: 5px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat__hint {
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

/* ------------------------------- forms --------------------------------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.field:last-child {
  margin-bottom: 0;
}

.field span {
  letter-spacing: 0.01em;
}

.field code {
  font-family: var(--mono);
  font-size: 11px;
}

.field--grow {
  flex: 1 1 180px;
  margin-bottom: 0;
}

input {
  width: 100%;
  min-height: 46px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: var(--muted);
  opacity: 0.75;
  font-weight: 400;
}

input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  width: 100%;
  min-height: 46px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select:disabled {
  opacity: 0.6;
}


.inline {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.inline--end {
  align-items: flex-end;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row--wrap {
  flex-wrap: wrap;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.seg {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 44px;
  font-size: 12.5px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seg[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

/* ------------------------------- game ---------------------------------- */
.game-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 16px;
  min-height: 96px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(320px 140px at 100% 0%, var(--accent-soft), transparent 68%),
    var(--surface);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, border-color 0.18s ease;
  touch-action: manipulation;
}

.game-card:hover {
  border-color: var(--accent-line);
}

.game-card:active {
  transform: scale(0.985);
}

.game-card[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.game-card__icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
}

.game-card__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.game-card__sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ------------------------------- baraban -------------------------------- */
.metric-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.metric-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.metric-badge--imba {
  color: var(--badge-imba);
  background: var(--badge-imba-soft);
  border-color: color-mix(in srgb, var(--badge-imba) 34%, transparent);
}

.metric-badge--yulduzli {
  color: var(--badge-yulduzli);
  background: var(--badge-yulduzli-soft);
  border-color: color-mix(in srgb, var(--badge-yulduzli) 34%, transparent);
}

.metric-badge--omad {
  color: var(--badge-omad);
  background: var(--badge-omad-soft);
  border-color: color-mix(in srgb, var(--badge-omad) 34%, transparent);
}

/* Uchta g'ildirak kartasi — desktopda bir qatorda */
@media (min-width: 600px) {
  .wheel-card {
    min-height: 100%;
  }
}

.wheel-card__count {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 700;
}

/* Baraban jonli logi — belgilangan balandlik layout siljishini oldini oladi */
.console--tall {
  height: clamp(220px, 38vh, 340px);
  min-height: 220px;
  max-height: clamp(220px, 38vh, 340px);
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-2);
  padding: 11px 12px;
}

.result-card--ok {
  border-color: rgba(52, 211, 153, 0.28);
}

.result-card--fail {
  border-color: rgba(248, 113, 113, 0.28);
}

.result-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.result-card__name {
  font-size: 12.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card__meta {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card__rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.result-row__label {
  font-weight: 600;
}

.result-row__meta {
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console {
  width: 100%;
  max-width: 100%;
  height: 230px;
  min-height: 160px;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid #1e293b;
  background: #0b1220;
  padding: 10px 11px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd5e1;
  scrollbar-width: thin;
  scrollbar-color: #334155 #0b1220;
}

.console__line {
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 1px 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.console__time {
  color: #64748b;
  flex: none;
}

.console__text {
  min-width: 0;
}

.console__line--info .console__text {
  color: #7dd3fc;
}

.console__line--ok .console__text {
  color: #6ee7b7;
}

.console__line--fail .console__text {
  color: #fca5a5;
}

.console__line--muted .console__text {
  color: #64748b;
}

pre.summary {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  color: var(--text-soft);
}

/* ------------------------------ accounts ------------------------------- */
.accounts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.account {
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px;
  background: var(--surface-2);
}

.account__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}

.avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  background: linear-gradient(145deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account__col {
  min-width: 0;
  flex: 1;
}

.account__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
  min-width: 0;
}

.account__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account__sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account__tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 11px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
}

.metric__label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 650;
}

.metric__value {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric__sub {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.account__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.account__last {
  margin: 9px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.spacer {
  flex: 1;
}

/* ------------------------------ settings ------------------------------- */
#settingsForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-footer .btn--block {
  margin-top: 0;
}

.settings-path {
  margin: 2px 0 0;
  text-align: center;
}

.settings-path code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ------------------------------- tabs ---------------------------------- */
.tabs {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  width: min(560px, calc(100vw - 20px));
  padding: 5px;
  border-radius: 19px;
  border: 1px solid var(--border);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.game-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.game-switcher__card {
  padding: 12px;
  min-height: 64px;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.game-switcher__card:hover {
  border-color: var(--accent);
}

.game-switcher__card--active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-line);
}

.game-switcher__card .game-card__icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.game-switcher__card .game-card__title {
  font-weight: 600;
  font-size: 13px;
}

.tab {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 6px 2px 5px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, background 0.15s ease;
}

.tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab--active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ------------------------------- dialog -------------------------------- */
.modal {
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  overflow: hidden;
}

.modal[open] {
  animation: modal-in 0.16s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal--sm {
  width: min(380px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(3px);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.modal__head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
}

.modal__body {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100dvh - 110px);
}

/* Tasdiqlash oynasi: ikkita amal yonma-yon, juda tor ekranda ustun */
.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.confirm-actions .btn {
  width: 100%;
}

@media (max-width: 339px) {
  .confirm-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  counter-reset: step;
}

.steps__item {
  flex: 1;
  counter-increment: step;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  text-align: center;
  padding: 7px 4px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.steps__item::before {
  content: counter(step) ". ";
  opacity: 0.7;
}

.steps__item--active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

/* -------------------------------- login -------------------------------- */
.login {
  margin-top: 8vh;
  padding: 20px;
}

.login h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

/* -------------------------------- toast -------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(94vw, 540px);
  padding: 11px 15px;
  border-radius: 12px;
  background: #0b1220;
  color: #f1f5f9;
  border: 1px solid #1e293b;
  font-size: 12.5px;
  line-height: 1.42;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.5);
  animation: rise 0.18s ease;
}

.toast--error {
  background: #3f1217;
  border-color: #7f1d1d;
  color: #fee2e2;
}

.toast--ok {
  background: #062a24;
  border-color: #115e59;
  color: #d1fae5;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 20px 8px;
}

/* --------------------------- balance refresh --------------------------- */
.balance-refresh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.balance-refresh__copy {
  min-width: 0;
  flex: 1 1 220px;
}

.balance-refresh__copy h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.balance-refresh__copy p {
  margin: 0;
  max-width: 58ch;
}

.balance-refresh .btn {
  flex: none;
}

/* ---------------------------- tavakkal guide --------------------------- */
.guide-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-soft);
}

.guide-list strong {
  color: var(--text);
}

.guide-list code {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.guide-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

/* ------------------------- tavakkal controls --------------------------- */
.control-block + .control-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.bet-presets {
  margin-top: 8px;
}

.btn--active {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.account-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 310px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.account-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.account-pick--on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.account-pick input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.account-pick__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.account-pick__name {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-pick__meta {
  font-size: 10.5px;
  color: var(--muted);
}

/* Tavakkal terminali — 400+ qator uchun kattaroq va avtomatik scroll */
.console--terminal {
  height: clamp(280px, 52vh, 560px);
  min-height: 280px;
  max-height: clamp(280px, 52vh, 560px);
}

/* Dublikat: progress badge'lari va scrollable hisobot */
.dublikat-progress {
  margin: 10px 0 14px;
}

.dublikat-output {
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  max-height: clamp(260px, 46vh, 520px);
  margin: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  border-radius: var(--radius-sm);
  border: 1px solid #1e293b;
  background: #0b1220;
  padding: 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: #334155 #0b1220;
}

.dublikat-output:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

/* ------------------------------ scrollbars ----------------------------- */
.console::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.console::-webkit-scrollbar-track {
  background: #0b1220;
  border-radius: 10px;
}

.console::-webkit-scrollbar-thumb {
  background: #334155;
  border: 2px solid #0b1220;
  border-radius: 10px;
}

.console::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ----------------------------- responsive ------------------------------ */
/* Barcha karta/gridlar mobil ekranda siqilib ketmasin */
.card,
.panel,
.stat,
.metric,
.result-card,
.account {
  min-width: 0;
}

.card__head {
  flex-wrap: wrap;
}

.account__title {
  flex-wrap: wrap;
}

.result-row {
  flex-wrap: wrap;
}

.result-row__label,
.result-row__meta {
  min-width: 0;
}

/* Gorizontal tugma guruhlari — mobilda ustun, kattaroqda grid */
.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.action-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-grid .btn {
  width: 100%;
}

.bet-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.bet-presets .btn {
  width: 100%;
}

/* Baraban g'ildiraklari: mobil 1 ustun, planshet 2, desktop 3 */
.wheel-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 599px) {
  .hero__actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__actions .btn,
  .balance-refresh .btn,
  .settings-footer .btn {
    width: 100%;
  }

  .balance-refresh {
    align-items: stretch;
  }

  .balance-refresh .btn {
    flex: 1 1 100%;
  }

  .inline {
    flex-direction: column;
    align-items: stretch;
  }

  .inline .field--grow {
    flex: 1 1 auto;
  }

  .inline .btn {
    width: 100%;
  }

  .account__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .account__actions .spacer {
    display: none;
  }

  .account__actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .app {
    gap: 11px;
  }

  .card {
    padding: 14px;
    border-radius: 15px;
  }

  .hero {
    padding: 15px;
  }

  .tavakkal-guide .guide-list {
    padding-left: 16px;
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .modal__head {
    padding: 12px 14px;
  }

  .modal__body {
    padding: 14px;
    max-height: calc(100dvh - 100px);
  }

  .console {
    font-size: 11px;
    padding: 9px;
  }

  .console__time {
    font-size: 10px;
  }

  .dublikat-output {
    font-size: 11px;
    padding: 9px;
  }

  .tabs {
    width: calc(100vw - 16px);
    padding: 4px;
    gap: 1px;
  }

  .tab {
    min-height: 52px;
    padding: 5px 1px;
    font-size: 9.5px;
  }

  .tab svg {
    width: 19px;
    height: 19px;
  }

  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 20px);
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  /* 320–430px da topbar sig'ishi uchun holat matni hero ichida qoladi */
  .topbar .status-pill {
    display: none;
  }

  .topbar {
    gap: 8px;
  }

  .topbar__actions {
    gap: 6px;
  }

  .brand__sub {
    max-width: 42vw;
  }

  .status-badge {
    font-size: 12.5px;
    padding: 7px 11px;
  }

  .hero__head {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .metric-badge {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 40px;
  }
}

@media (max-width: 359px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand h1 {
    font-size: 15px;
  }

  .brand__sub {
    font-size: 11px;
  }

  .tab {
    font-size: 8.5px;
  }

  .card {
    padding: 12px;
  }
}

@media (min-width: 480px) {
  .hero__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wheel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 600px) {
  body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bet-presets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero {
    padding: 20px;
  }

  .hero__actions {
    grid-template-columns: 200px 160px;
    justify-content: start;
  }

  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console {
    height: 260px;
    max-height: 260px;
  }

  .console--tall {
    height: clamp(260px, 38vh, 340px);
    max-height: clamp(260px, 38vh, 340px);
  }

  .console--terminal {
    height: clamp(320px, 52vh, 560px);
    max-height: clamp(320px, 52vh, 560px);
  }
}

@media (min-width: 760px) {
  .wheel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .accounts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 980px) {
  .results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Pastki tab bar bilan yopilmaydigan qo'shimcha balandlik ---
   body allaqachon 108px + safe-area padding beradi; bu yerda faqat
   kichik qo'shimcha bo'sh joy qoldiramiz (ortiqcha scroll bo'lmasin). */
#main {
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* scrollIntoView / anchor'da karta tab bar ostida qolmasin */
.game-card,
.panel > .card,
.results-grid .card {
  scroll-margin-bottom: calc(150px + env(safe-area-inset-bottom));
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   LIQUID GLASS (glassmorphism) — dizayn qatlami
   --------------------------------------------------------------------------
   Asosiy layout yuqorida qoladi; bu qatlam faqat KO'RINISHNI qayta bezaydi:
   shisha yuzalar, neon gradientlar, jonli (pulsing) indikatorlar va
   frostlangan terminal. Light tema uchun alohida tokenlar bor.
   ========================================================================== */
:root {
  --glass: rgba(15, 23, 42, 0.55);
  --glass-soft: rgba(15, 23, 42, 0.38);
  --glass-strong: rgba(2, 6, 23, 0.72);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.4);
  --glow-violet: 0 0 24px rgba(147, 51, 234, 0.35);
  --liquid: linear-gradient(100deg, #06b6d4 0%, #6366f1 52%, #9333ea 100%);
  --liquid-soft: linear-gradient(100deg, rgba(6, 182, 212, 0.26), rgba(147, 51, 234, 0.26));
  --radius-glass: 20px;
}

:root[data-theme="light"] {
  --glass: rgba(255, 255, 255, 0.62);
  --glass-soft: rgba(255, 255, 255, 0.48);
  --glass-strong: rgba(248, 250, 252, 0.82);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-strong: rgba(15, 23, 42, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.12);
  --glow-cyan: 0 0 18px rgba(2, 132, 199, 0.28);
  --glow-violet: 0 0 20px rgba(124, 58, 237, 0.22);
}

/* --- suyuq fon (aurora bloblari) ---------------------------------------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora span {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  opacity: 0.32;
  filter: blur(72px);
  mix-blend-mode: screen;
  animation: aurora-drift 26s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) {
  background: radial-gradient(circle at 30% 30%, #22d3ee, transparent 62%);
  top: -14%;
  left: -12%;
}

.aurora span:nth-child(2) {
  background: radial-gradient(circle at 60% 40%, #6366f1, transparent 62%);
  top: 14%;
  right: -18%;
  animation-delay: -8s;
}

.aurora span:nth-child(3) {
  background: radial-gradient(circle at 50% 50%, #a855f7, transparent 62%);
  bottom: -24%;
  left: 20%;
  animation-delay: -15s;
}

:root[data-theme="light"] .aurora span {
  opacity: 0.18;
  mix-blend-mode: normal;
}

@keyframes aurora-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4%, -6%, 0) scale(1.12);
  }
}

.app {
  position: relative;
  z-index: 1;
}

/* --- shisha yuzalar ------------------------------------------------------ */
.card,
.stat,
.metric,
.result-card,
.account {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-glass);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

.card {
  position: relative;
  overflow: hidden;
}

/* Yuqori qirradagi yupqa yorug' chiziq — "liquid" hissi. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.55),
    rgba(168, 85, 247, 0.45),
    transparent
  );
  opacity: 0.75;
  pointer-events: none;
}

/* --- tugmalar ------------------------------------------------------------ */
.btn {
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.btn--primary {
  background-image: var(--liquid);
  background-color: transparent;
  border-color: transparent;
  color: #f8fafc;
  letter-spacing: 0.2px;
  box-shadow: var(--glow-cyan), 0 10px 24px rgba(79, 70, 229, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn--primary:hover {
  opacity: 0.9;
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.55), var(--glow-violet),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--glass-border-strong);
}

.btn--ghost:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: var(--glow-cyan);
}

.btn--danger {
  background-image: linear-gradient(100deg, #f43f5e, #dc2626);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.35);
}

/* --- segmented (sub-tab / rejim) ---------------------------------------- */
.segmented {
  background: rgba(2, 6, 23, 0.45);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 5px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

:root[data-theme="light"] .segmented {
  background: rgba(241, 245, 249, 0.7);
}

.seg {
  border-radius: 12px;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.seg[aria-pressed="true"] {
  background: var(--liquid-soft);
  border-color: rgba(6, 182, 212, 0.55);
  color: #e0f2fe;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

:root[data-theme="light"] .seg[aria-pressed="true"] {
  color: #0e7490;
}

/* --- pastki navigatsiya -------------------------------------------------- */
.tabs {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--glass-highlight);
}

.tab {
  border-radius: 16px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tab--active {
  background: var(--liquid-soft);
  color: #a5f3fc;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tab--active svg {
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7));
}

:root[data-theme="light"] .tab--active {
  color: #0e7490;
}

/* --- pill / status indikatorlari ---------------------------------------- */
.pill {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.22);
}

.pill--muted {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--muted);
  box-shadow: none;
}

/* Jonli indikator: yumshoq glow + pulsatsiyalanuvchi nuqta. */
.pill--live {
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.45);
}

.pill--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: liquid-pulse 1.4s ease-in-out infinite;
}

.metric-badge {
  background: var(--glass-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 14px rgba(6, 182, 212, 0.14);
}

.metric-badge--imba {
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 16px rgba(167, 139, 250, 0.3);
}

@keyframes liquid-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

/* --- terminal ("Ish jarayoni") ------------------------------------------ */
.console,
.console--tall {
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 14px;
  padding: 16px;
  color: #67e8f9;
  font-family: var(--mono);
  box-shadow: inset 0 0 30px rgba(2, 6, 23, 0.9), 0 0 0 1px rgba(6, 182, 212, 0.06);
}

#checkLog,
.console {
  height: 256px;
  max-height: 256px;
  min-height: 200px;
}

/* Baraban/uzun loglar uchun balandroq terminal. */
.console--tall {
  height: 340px;
  max-height: 340px;
}

.console__time {
  color: rgba(103, 232, 249, 0.55);
}

.console__line--info .console__text {
  color: #7dd3fc;
}

.console__line--ok .console__text {
  color: #6ee7b7;
  text-shadow: 0 0 12px rgba(110, 231, 183, 0.35);
}

.console__line--fail .console__text {
  color: #fca5a5;
  text-shadow: 0 0 12px rgba(252, 165, 165, 0.3);
}

.console__line--muted .console__text {
  color: rgba(148, 197, 214, 0.8);
}

/* --- kiritish maydonlari ------------------------------------------------- */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

:root[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.75);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15), 0 0 18px rgba(6, 182, 212, 0.25);
  outline: none;
}

.icon-btn {
  background: var(--glass-soft);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.icon-btn:hover {
  border-color: rgba(6, 182, 212, 0.45);
  color: #a5f3fc;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
}

/* --- modal / dialog ----------------------------------------------------- */
.modal,
dialog.modal {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-glass);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

.modal::backdrop {
  background: rgba(2, 6, 23, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* --- zaxira: backdrop-filter yo'q bo'lsa o'qish saqlansin ---------------- */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .card,
  .stat,
  .metric,
  .result-card,
  .account,
  .tabs,
  .modal,
  dialog.modal {
    background: var(--surface);
  }

  .console {
    background: #0b1220;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora span,
  .pill--live::before {
    animation: none;
  }
}

/* -------------------------------------------------------------------------
   Admin token darvozasi — to'liq sahifali kirish kartasi.
   `lockPanel()` main va tablarni yashiradi; karta markazda qoladi.
   ------------------------------------------------------------------------- */
.login.login--gate {
  max-width: 520px;
  margin: 14vh auto 0;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.login.login--gate h2 {
  font-size: 20px;
}

/* -------------------------------------------------------------------------
   Craft — retsept matritsasi (🛠 tab).
   ------------------------------------------------------------------------- */
.craft-recipes {
  display: grid;
  gap: 6px;
  margin: 6px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.recipe-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text);
}

.recipe-row span:nth-child(2) {
  color: var(--muted);
  white-space: nowrap;
}

.recipe-row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
}

/* =========================================================================
   PREMIUM LIGHT THEME + FLOATING GLASS NAVIGATION
   -------------------------------------------------------------------------
   Yorug' tema: slate-50 fon, slate-800 matn, white/70 glass kartalar,
   indigo/cyan accentlar. Pastki menyu — suzuvchi glass kapsula.
   Bu blok ATAYLAB fayl oxirida: oldingi "liquid glass" qatlamini xavfsiz
   ustidan yozadi (dark tema o'zgarmaydi).
   ========================================================================= */

:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-glow: rgba(79, 70, 229, 0.08);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --text: #1e293b;
  --text-soft: #334155;
  --muted: #64748b;
  --border: rgba(226, 232, 240, 0.8);
  --border-strong: rgba(203, 213, 225, 0.9);
  --accent: #4f46e5;
  --accent-2: #0891b2;
  --accent-soft: #eef2ff;
  --accent-line: #c7d2fe;
  --ok: #047857;
  --ok-soft: rgba(4, 120, 87, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.1);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 14px 34px rgba(15, 23, 42, 0.07);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --glass-border: rgba(226, 232, 240, 0.85);
  --glass-highlight: rgba(255, 255, 255, 0.9);
}

/* --- glass kartalar ------------------------------------------------------ */
:root[data-theme="light"] .card,
:root[data-theme="light"] .stat,
:root[data-theme="light"] .metric,
:root[data-theme="light"] .result-card,
:root[data-theme="light"] .account,
:root[data-theme="light"] .hero,
:root[data-theme="light"] .game-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  color: #1e293b;
}

:root[data-theme="light"] .hero,
:root[data-theme="light"] .game-card {
  background-color: rgba(255, 255, 255, 0.72);
  background-image: radial-gradient(320px 140px at 100% 0%, rgba(79, 70, 229, 0.1), transparent 70%);
}

/* --- indigo/cyan badge va aktiv holatlar --------------------------------- */
:root[data-theme="light"] .pill {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
  box-shadow: none;
}

:root[data-theme="light"] .pill--muted {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

:root[data-theme="light"] .pill--live {
  background: #ecfeff;
  color: #0e7490;
  border-color: #a5f3fc;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.08);
}

:root[data-theme="light"] .pill--ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

:root[data-theme="light"] .pill--off {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

:root[data-theme="light"] .pill--warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

:root[data-theme="light"] .segmented {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(226, 232, 240, 0.9);
}

:root[data-theme="light"] .seg[aria-pressed="true"] {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.12);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(203, 213, 225, 0.9);
  color: #1e293b;
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
  color: #94a3b8;
}

:root[data-theme="light"] .btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: #e2e8f0;
  color: #1e293b;
}

:root[data-theme="light"] .btn--primary {
  background: linear-gradient(140deg, #4f46e5, #0891b2);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.24);
}

:root[data-theme="light"] .btn--ghost {
  background: rgba(248, 250, 252, 0.9);
}

:root[data-theme="light"] .console {
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(226, 232, 240, 0.9);
  color: #334155;
}

:root[data-theme="light"] .console__time {
  color: #94a3b8;
}

:root[data-theme="light"] .console__line--ok {
  color: #047857;
}

:root[data-theme="light"] .console__line--fail {
  color: #b91c1c;
}

/* --- suzuvchi glass kapsula (bottom navigation) -------------------------- */
.tabs {
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2px, 1.5vw, 18px);
  width: auto;
  max-width: calc(100vw - 16px);
  padding: 9px clamp(8px, 2.4vw, 22px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 50;
}

:root[data-theme="light"] .tabs {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.24);
}

.tabs .tab {
  flex: 0 1 auto;
  min-width: 44px;
  min-height: 46px;
  padding: 6px 9px;
  gap: 3px;
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tabs .tab svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.tabs .tab:hover {
  color: #f8fafc;
}

.tabs .tab--active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 8px 18px rgba(2, 6, 23, 0.35);
  transform: translateY(-1px);
}

.tabs .tab--active svg {
  color: #c7d2fe;
  filter: none;
}

/* Kapsula balandroq — kontent tagiga yetib qolmasin. */
body {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

/* --- fon vazifasi banneri ----------------------------------------------- */
.task-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.task-banner[hidden] {
  display: none;
}

.task-banner__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ok);
  animation: task-banner-pulse 1.8s ease-out infinite;
}

.task-banner__text {
  flex: 1;
  min-width: 0;
}

.task-banner__text b {
  font-weight: 700;
}

.task-banner__action {
  flex: none;
  appearance: none;
  border: 1px solid var(--accent-line);
  background: rgba(255, 255, 255, 0.16);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 32px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.task-banner__action:hover {
  border-color: var(--accent);
}

:root[data-theme="light"] .task-banner {
  background: rgba(238, 242, 255, 0.85);
  border-color: #c7d2fe;
  color: #1e293b;
}

:root[data-theme="light"] .task-banner__action {
  background: #ffffff;
  color: #4f46e5;
  border-color: #c7d2fe;
}

@keyframes task-banner-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

/* --- tor ekranlar: 6 ta bo'lim kapsulaga sig'sin ----------------------- */
@media (max-width: 380px) {
  .tabs {
    padding: 8px;
    gap: 2px;
  }

  .tabs .tab {
    min-width: 40px;
    padding: 6px 5px;
    font-size: 9px;
  }
}

@media (max-width: 359px) {
  .tabs .tab span {
    display: none;
  }

  .tabs .tab {
    min-width: 44px;
    padding: 8px 10px;
  }

  .tabs .tab svg {
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-banner__dot {
    animation: none;
  }

  .tabs .tab {
    transition: none;
  }
}

/* =========================================================================
   GUESS / GRAB — toggle switch, kvota metrlari va 7 ta bo'limli navigatsiya
   ========================================================================= */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.switch-row__label {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text);
}

/* Glassmorphic toggle: 52×30 track, sirg'aluvchi knob, ON — cyan glow.
   Holat faqat knob siljishi + glow orqali ko'rsatiladi; matn ekran o'quvchi
   uchun yashiringan, shuning uchun tor kartada ustma-ust tushmaydi. */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 52px;
  height: 30px;
  padding: 3px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(51, 65, 85, 0.9); /* OFF — slate-700 */
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.switch__knob {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(2, 6, 23, 0.45);
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.22s ease;
}

.switch__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.switch:hover {
  border-color: rgba(203, 213, 225, 0.65);
}

.switch:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}

.switch--on {
  background: #06b6d4; /* ON — cyan-500 */
  border-color: rgba(34, 211, 238, 0.95);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16), 0 0 18px rgba(34, 211, 238, 0.45);
}

.switch--on .switch__knob {
  background: #ecfeff;
  transform: translateX(22px);
}

:root[data-theme="light"] .switch {
  background: #334155;
}

:root[data-theme="light"] .switch--on {
  background: #06b6d4;
}

.quota-list {
  display: grid;
  gap: 10px;
  margin: 4px 0 8px;
}

.quota-row {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.quota-row--active {
  border-color: #a5b4fc;
  background: rgba(238, 242, 255, 0.75);
}

:root[data-theme="dark"] .quota-row--active {
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.1);
}

.quota-row--done {
  opacity: 0.72;
}

.quota-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
}

.quota-row__name {
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quota-row__count {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
}

.quota-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.quota-bar__fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  transition: width 0.35s ease;
}

.quota-row--done .quota-bar__fill {
  background: linear-gradient(90deg, #059669, #10b981);
}

/* 7 ta bo'lim (Guess qo'shildi) — tor ekranda ikonkalar qoladi, yorliqlar yashirinadi. */
@media (max-width: 470px) {
  .tabs {
    gap: 2px;
    padding: 8px 10px;
  }

  .tabs .tab {
    min-width: 42px;
    padding: 9px 8px;
  }

  .tabs .tab span {
    display: none;
  }

  .tabs .tab svg {
    width: 22px;
    height: 22px;
  }
}
