/* ═══════════════════════════════════════════════════════════════
   TILLACHI — "Compound" dizayn tizimi
   Ink-on-paper tahririyot estetikasi: bitta shrift (Inter 400),
   axromat palitra, krem aksent, 20px radius kartalar, pill tugmalar.
   Kun / Tun / Tizim mavzulari.
   ═══════════════════════════════════════════════════════════════ */

/* ── Shrift ─────────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ─── Tokenlar — Kun (Compound asl nusxasi) ─────────────────── */
:root {
  --color-ink: #171717;
  --color-paper: #ffffff;
  --color-hairline: #e5e7eb;
  --color-vellum: #f3f3f3;
  --color-slate: #6f6f6f;
  --color-pewter: #5e5e5e;
  --color-ash: #a0a0a0;
  --color-carbon: #222222;
  --color-stone: #c7c7c7;
  --color-cream: #ffe9bf;
  --color-positive: #1a7f4b;   /* faqat o'sish strelkasi uchun */
  --color-ink-on-cream: #171717;

  --bg: var(--color-paper);
  --text: var(--color-ink);
  --text-2: var(--color-slate);
  --text-3: var(--color-ash);

  --shadow-xl: rgba(0, 0, 0, 0.01) 0px 128px 51px 0px,
               rgba(0, 0, 0, 0.02) 0px 72px 43px 0px,
               rgba(0, 0, 0, 0.03) 0px 32px 32px 0px,
               rgba(0, 0, 0, 0.04) 0px 8px 18px 0px;
  --shadow-lift: rgba(207, 207, 207, 0.01) 0px 132px 53px 0px,
                 rgba(207, 207, 207, 0.05) 0px 74px 44px 0px,
                 rgba(207, 207, 207, 0.09) 0px 33px 33px 0px,
                 rgba(207, 207, 207, 0.10) 0px 8px 18px 0px;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --r-xs: 8px;
  --r-sm: 14px;
  --r-card: 20px;
  --r-lg: 24px;
  --r-item: 28px;
  --r-pill: 9999px;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-10: 80px;

  --page-max: 1200px;
  --header-h: 60px;
  --nav-h: 78px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(0.32, 0.72, 0.24, 1);
}

/* ─── Tokenlar — Tun (axromat, kremp saqlanadi) ─────────────── */
[data-theme='dark'] {
  --color-ink: #f4f4f4;
  --color-paper: #131313;
  --color-hairline: #282828;
  --color-vellum: #1e1e1e;
  --color-slate: #a3a3a3;
  --color-pewter: #b5b5b5;
  --color-ash: #707070;
  --color-carbon: #e6e6e6;
  --color-stone: #3d3d3d;
  --color-positive: #34d17d;

  --shadow-xl: rgba(0, 0, 0, 0.06) 0px 128px 51px 0px,
               rgba(0, 0, 0, 0.10) 0px 72px 43px 0px,
               rgba(0, 0, 0, 0.16) 0px 32px 32px 0px,
               rgba(0, 0, 0, 0.22) 0px 8px 18px 0px;
  --shadow-lift: rgba(0, 0, 0, 0.05) 0px 132px 53px 0px,
                 rgba(0, 0, 0, 0.10) 0px 74px 44px 0px,
                 rgba(0, 0, 0, 0.15) 0px 33px 33px 0px,
                 rgba(0, 0, 0, 0.20) 0px 8px 18px 0px;
}

/* ─── Baza ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: 'kern';
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

.ico { display: inline-flex; flex: none; }
.ico svg { width: 18px; height: 18px; display: block; }

/* ─── Qobiq ─────────────────────────────────────────────────── */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ─── Sarlavha (header) ─────────────────────────────────────── */
.app__header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  padding-top: var(--safe-top);
  transition: border-color 0.2s ease;
}

.app__header.is-scrolled { border-bottom-color: var(--color-hairline); }

.header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
}

.wordmark {
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav { display: none; }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.app__back { display: inline-flex; }
.app__back.is-hidden { display: none; }

/* ─── Icon tugma ────────────────────────────────────────────── */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  border: 0;
  transition: background-color 0.15s ease;
}
.icon-btn:hover { background: var(--color-vellum); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* ─── Avatar ────────────────────────────────────────────────── */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--color-vellum);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  flex: none;
  border: 1px solid var(--color-hairline);
}
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }

/* ─── Telegram avatar rasmi (photo_url) ──────────────────────── */
.avatar, .row__avatar { position: relative; overflow: hidden; }
.avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

/* ─── Krem e'lon chizig'i ───────────────────────────────────── */
.notice {
  background: var(--color-cream);
  color: var(--color-ink-on-cream);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  font-size: 13.5px;
  line-height: 1.45;
}
.notice__ico { color: var(--color-ink-on-cream); display: inline-flex; }
.notice__ico svg { width: 16px; height: 16px; }
.notice__text { flex: 1; min-width: 0; }
.notice__x {
  background: transparent;
  border: 0;
  color: var(--color-ink-on-cream);
  opacity: 0.65;
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.notice__x:hover { opacity: 1; background: rgba(23, 23, 23, 0.08); }
.notice__x svg { width: 15px; height: 15px; }

/* ─── Asosiy kontent ────────────────────────────────────────── */
.app__main {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 26px 20px calc(var(--nav-h) + 44px + var(--safe-bottom));
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Pastki navigatsiya ────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--color-hairline);
  display: flex;
  justify-content: space-around;
  padding: 6px 12px calc(6px + var(--safe-bottom));
}

.bottom-nav__item {
  flex: 1;
  max-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px 5px;
  background: none;
  border: 0;
  color: var(--text-2);
  transition: color 0.15s ease;
}
.bottom-nav__item:active { transform: scale(0.95); }
.bottom-nav__item .nav-ico {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  display: inline-flex;
  transition: background-color 0.2s ease;
}
.bottom-nav__item .nav-ico svg { width: 21px; height: 21px; display: block; }
.bottom-nav__item span.label { font-size: 11px; letter-spacing: 0.01em; }
.bottom-nav__item.is-active { color: var(--text); }
.bottom-nav__item.is-active .nav-ico { background: var(--color-vellum); }

/* ─── Sahifa sarlavhasi ─────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0 22px;
}
.page-head__title {
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.page-head__sub { font-size: 13.5px; color: var(--text-2); margin-top: 7px; }

/* ─── Statistika ────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-card);
  padding: 18px 20px 16px;
}
.stat__label { font-size: 12px; color: var(--text-2); }
.stat__value {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat__unit { font-size: 13px; color: var(--text-2); margin-left: 4px; letter-spacing: 0; }
.stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-positive);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat__delta svg { width: 13px; height: 13px; }

/* ─── Karta ─────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-card);
  padding: var(--sp-3);
}
.card--flat { background: var(--color-vellum); border-color: transparent; }
.card--lift { box-shadow: var(--shadow-lift); }
.card__title { font-size: 16px; }
.card__sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ─── Bo'luvchi ─────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 52px 0 36px;
}
.divider::before, .divider::after {
  content: '';
  height: 1px;
  background: var(--color-hairline);
  flex: 1;
}
.divider__label { font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* ─── Tugmalar ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--color-ink);
  color: var(--bg);
  border: 0;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.12s ease, opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--color-hairline);
}
.btn--outline:hover { border-color: var(--color-stone); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  padding: 8px 2px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.btn--ghost:hover { text-decoration-thickness: 2px; }

.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--full { width: 100%; }

/* ─── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  background: var(--color-vellum);
  color: var(--text-2);
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge--owner { background: var(--color-cream); color: var(--color-ink-on-cream); }
.badge--ok { background: var(--color-cream); color: var(--color-ink-on-cream); }

/* ─── Qatorlar (ro'yxat elementlari) ────────────────────────── */
.list { display: flex; flex-direction: column; gap: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-item);
  transition: border-color 0.15s ease;
  text-align: left;
  width: 100%;
}
.row:hover { border-color: var(--color-stone); }
.row__avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  background: var(--color-vellum);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: none;
}
.row__avatar--ico { color: var(--text-2); }
.row__avatar--ico svg { width: 18px; height: 18px; }
.row__body { flex: 1; min-width: 0; }
.row__title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__end { display: flex; align-items: center; gap: 6px; flex: none; }
.row__value { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ─── Shakllar (input) ──────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 13px; color: var(--text-2); }
.field__hint { font-size: 12px; color: var(--text-3); }
.field__hint a { color: var(--text-2); }

.input, .textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
}
.input:focus, .textarea:focus { border-color: var(--text); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input--err { border-color: var(--color-positive); }
[data-theme='dark'] .input--err { border-color: #d17d5a; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input-count { font-size: 11px; color: var(--text-3); text-align: right; }

/* ─── Segment (Kun / Tun / Tizim) ───────────────────────────── */
.seg {
  display: flex;
  background: var(--color-vellum);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
}
.seg__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: var(--r-pill);
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.seg__btn svg { width: 15px; height: 15px; }
.seg__btn.is-active { background: var(--bg); color: var(--text); }
.seg--compact { display: inline-flex; flex: none; }
.seg--compact .seg__btn { padding: 8px 14px; }

/* ─── Bo'sh holat ───────────────────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 64px 24px;
}
.empty__ico {
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  background: var(--color-vellum);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  margin-bottom: 12px;
}
.empty__ico svg { width: 22px; height: 22px; }
.empty__title { font-size: 17px; }
.empty__sub { font-size: 13.5px; color: var(--text-2); max-width: 340px; line-height: 1.55; }
.empty .btn { margin-top: 18px; }

/* ─── Skeleton ──────────────────────────────────────────────── */
.skel {
  background: var(--color-vellum);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 60%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ─── Pastki varaq (sheet) ──────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.42);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease;
}
[data-theme='dark'] .sheet-backdrop { background: rgba(0, 0, 0, 0.6); }
.sheet-backdrop.is-open { opacity: 1; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 24px 24px calc(24px + var(--safe-bottom));
  transform: translateY(102%);
  transition: transform 0.32s var(--ease);
  max-height: 88dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.sheet.is-open { transform: translateY(0); }
.sheet__grab {
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--color-stone);
  margin: -8px auto 18px;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.sheet__title { font-size: 20px; letter-spacing: -0.01em; }
.sheet__sub { font-size: 13.5px; color: var(--text-2); margin-top: 5px; }
.sheet__text { font-size: 14.5px; line-height: 1.6; color: var(--text); }
.sheet__actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.sheet__actions .btn { flex: 1; }
.form { display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 768px) {
  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 480px;
    max-width: calc(100vw - 40px);
    border-radius: var(--r-lg);
    transform: translate(-50%, -44%) scale(0.96);
    opacity: 0;
    transition: transform 0.28s var(--ease), opacity 0.2s ease;
  }
  .sheet.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet__grab { display: none; }
}

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 22px + var(--safe-bottom));
  transform: translateX(-50%) translateY(10px);
  background: var(--color-ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  padding: 12px 20px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 120;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: calc(100vw - 40px);
  box-shadow: var(--shadow-xl);
}
.toast svg { width: 15px; height: 15px; flex: none; }
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Yuklanish ekrani ──────────────────────────────────────── */
.boot {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.boot__word { font-size: clamp(36px, 10vw, 48px); letter-spacing: -0.03em; }
.boot__line {
  width: 128px;
  height: 1px;
  background: var(--color-hairline);
  position: relative;
  overflow: hidden;
}
.boot__line i {
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateX(-100%);
  animation: bootline 1.15s ease-in-out infinite;
}
@keyframes bootline { 55%, 100% { transform: translateX(100%); } }
.boot__hint {
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ─── Xato ekrani ───────────────────────────────────────────── */
.err-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.err-screen__card {
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-card);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-lift);
}
.err-screen__title { font-size: 24px; letter-spacing: -0.01em; margin-top: 20px; }
.err-screen__text { font-size: 14px; color: var(--text-2); margin-top: 10px; line-height: 1.6; }
.err-screen__card .btn { margin-top: 26px; }
.err-screen__diag {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ─── Demo paneli (faqat dev rejim) ─────────────────────────── */
.demo-strip {
  background: var(--color-cream);
  color: var(--color-ink-on-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  font-size: 12.5px;
}
.demo-strip__label { letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; opacity: 0.75; }
.demo-pill {
  border: 1px solid rgba(23, 23, 23, 0.25);
  background: transparent;
  color: var(--color-ink-on-cream);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 12px;
  transition: background-color 0.15s ease;
}
.demo-pill:hover { background: rgba(23, 23, 23, 0.08); }
.demo-pill.is-active { background: var(--color-ink-on-cream); color: var(--color-cream); border-color: transparent; }

/* ─── Hero (xaridor bosh sahifasi) ──────────────────────────── */
.hero { padding: 18px 0 6px; }
.hero__hi { font-size: 14px; color: var(--text-2); }
.hero__title {
  font-size: clamp(38px, 10.5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  margin-top: 14px;
}
.hero__sub {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin-top: 16px;
  max-width: 480px;
}
.hero__cta { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Imkoniyat kartochkalari ───────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.feat {
  background: var(--color-vellum);
  border-radius: var(--r-card);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feat__ico {
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex: none;
}
.feat__ico svg { width: 19px; height: 19px; }
.feat__title { font-size: 15px; }
.feat__text { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.55; }

/* ─── Tezkor amallar (sotuvchi/ega) ─────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.quick {
  background: var(--bg);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.quick:hover { border-color: var(--color-stone); }
.quick:active { transform: scale(0.98); }
.quick__ico {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--color-vellum);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.quick__ico svg { width: 18px; height: 18px; }
.quick__title { font-size: 14.5px; }
.quick__sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ─── Profil kartasi ────────────────────────────────────────── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-card);
  padding: 24px;
  background: var(--bg);
  box-shadow: var(--shadow-lift);
}
.profile-card__name { font-size: 19px; letter-spacing: -0.01em; }
.profile-card__meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.profile-card .badge { margin-top: 10px; }

/* ─── Grid moslashuvchanlik ─────────────────────────────────── */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── Planshet / desktop (>= 1024px) ────────────────────────── */
@media (min-width: 1024px) {
  .bottom-nav { display: none; }

  .app__main {
    padding: 40px 40px 100px;
  }

  .header-nav {
    display: flex;
    gap: 26px;
    margin: 0 auto;
  }
  .header-nav a {
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
  }
  .header-nav a:hover { border-bottom-color: var(--text); }
  .header-nav a.is-active { border-bottom-color: var(--text); }

  .hero { padding-top: 56px; }
  .hero__title { font-size: 60px; }
  .hero__sub { font-size: 16px; }

  .divider { margin: 72px 0 48px; }
}

/* ─── Harakatni cheklash ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
