/* Hamyonim — iOS «shisha» (glass) uslubi. Manba: AZALY web/src/styles/hamyon.css va maket hamyon_ios_glass.html (15.11.2026). */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
  --base: #f4f1ff;
  --g1: #7aa7ff; --g2: #ff9fd2; --g3: #7ff0d0;
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-solid: rgba(255, 255, 255, 0.9);
  --brd: rgba(255, 255, 255, 0.65);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow: 0 8px 30px rgba(40, 50, 90, 0.10);
  --blur: blur(24px) saturate(180%);
  --line: rgba(120, 120, 140, 0.16);
  --track: rgba(120, 120, 140, 0.18);
  --blue: #0a84ff;
  --up: #1f9d4a;
  --dn: #e5484d;
  --text: #10121c;
  --sub: rgba(16, 18, 28, 0.62);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --base: #0b0b12;
    --g1: #2a4fd6; --g2: #a1287a; --g3: #0f8f72;
    --glass: rgba(255, 255, 255, 0.10);
    --glass-strong: rgba(30, 32, 46, 0.82);
    --glass-solid: rgba(34, 37, 52, 0.94);
    --brd: rgba(255, 255, 255, 0.20);
    --inner: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --line: rgba(255, 255, 255, 0.10);
    --track: rgba(255, 255, 255, 0.14);
    --up: #4ade80;
    --dn: #ff6b6b;
    --text: #f5f6fb;
    --sub: rgba(245, 246, 251, 0.66);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--base); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 10% 0%, var(--g1) 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 30%, var(--g2) 0%, transparent 55%),
    radial-gradient(100% 70% at 30% 100%, var(--g3) 0%, transparent 60%),
    var(--base);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--blue); text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app {
  max-width: 560px; margin: 0 auto;
  padding: calc(var(--safe-t) + 14px) 14px calc(var(--nav-h) + var(--safe-b) + 110px);
  display: flex; flex-direction: column; gap: 14px;
}
.title { margin: 6px 4px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.title .lbl { font-size: 13px; font-weight: 500; color: var(--sub); }
.title h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.12; }
.title .back { color: var(--blue); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* Shisha yuzalar */
.card, .list, .tile, .btn.soft, .btn.ghost, .chip:not(.on), .seg, .nav, .banner, .tasdiq {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--brd);
  box-shadow: var(--inner), var(--shadow);
  color: var(--text);
}
.btn.soft, .btn.ghost, .chip:not(.on) { box-shadow: var(--inner); }
.card { border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-size: 15px; }
.list { border-radius: 24px; overflow: hidden; }
.sec { font-size: 13px; font-weight: 600; color: var(--sub); margin: 4px 6px -6px; display: flex; justify-content: space-between; align-items: center; }
.sec a, .sec button { color: var(--blue); font-weight: 600; font-size: 13px; }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.strong { font-weight: 650; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.dn { color: var(--dn); }

/* Bosh karta */
.hero { border-radius: 26px; padding: 18px 18px 16px; }
.big { font-size: 36px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin: 2px 0 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.big small { font-size: 17px; font-weight: 600; opacity: 0.6; letter-spacing: 0; }
.hint { font-size: 12.5px; color: var(--sub); line-height: 1.45; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; }
.tile .label { font-size: 13px; color: var(--sub); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.tile .value { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; overflow-wrap: anywhere; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile .foot { font-size: 12px; color: var(--sub); line-height: 1.35; font-variant-numeric: tabular-nums; }
.tile.wide { grid-column: 1 / -1; }
.tile:active, .row:active { transform: scale(0.99); }

/* Ro'yxat qatori */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; position: relative; min-height: 60px; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 64px; right: 14px; border-top: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .m { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum { flex: none; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.sum small { display: block; font-size: 11.5px; font-weight: 500; color: var(--sub); }
.ic {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 18px; line-height: 1;
  background: rgba(127, 127, 140, 0.16); background: color-mix(in srgb, var(--ic, #0a84ff) 22%, transparent);
}

/* Tugmalar */
.btn {
  min-height: 46px; padding: 0 18px; border-radius: 18px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #2b95ff, #0a7cf0); color: #fff;
  box-shadow: 0 8px 22px rgba(10, 132, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.soft { color: var(--blue); }
.btn.ghost { color: var(--text); }
.btn.danger { background: var(--glass); color: var(--dn); box-shadow: inset 0 0 0 1px var(--dn); }
.btn.sm { min-height: 34px; padding: 0 12px; border-radius: 14px; font-size: 13.5px; }
.btn:disabled { opacity: 0.5; box-shadow: none; }
.btn.full { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }

/* Chiplar va segment */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border-radius: 18px; min-height: 34px; padding: 0 14px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.chip.on { background: var(--blue); color: #fff; border: 1px solid transparent; box-shadow: 0 6px 18px rgba(10, 132, 255, 0.35); }
.seg { display: flex; padding: 3px; border-radius: 16px; gap: 2px; }
.seg button { flex: 1; min-height: 36px; border-radius: 12px; color: var(--sub); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px rgba(20, 30, 60, 0.12); }

/* Maydonlar */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--sub); padding-left: 4px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; font-size: 16px;
  background: var(--glass-strong); border: 1px solid var(--brd); outline: none;
}
.input:focus, .select:focus { border-color: var(--blue); }
.input.pul { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xato { color: var(--dn); font-size: 13px; font-weight: 600; }

/* Chiziq */
.bar { height: 8px; border-radius: 8px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--c, var(--blue)); transition: width 0.4s ease; }
.bar.big { height: 12px; }
.bar.big > i { background: linear-gradient(90deg, #34c759, #30d158); }
.bar.bad > i { background: linear-gradient(90deg, #ff6961, var(--dn)); }

/* Banner */
.banner { border-radius: 20px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.banner.blue { background: color-mix(in srgb, var(--blue) 14%, var(--glass)); }
.banner.amber { background: color-mix(in srgb, #ff9f0a 18%, var(--glass)); }
.banner.red { background: color-mix(in srgb, var(--dn) 16%, var(--glass)); }
.banner.green { background: color-mix(in srgb, #30d158 16%, var(--glass)); }

/* Pastki navigatsiya */
.nav {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(8px + var(--safe-b)); max-width: 536px; margin: 0 auto;
  border-radius: 28px; padding: 7px 6px; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; height: var(--nav-h);
}
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--sub); }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--blue); }
.mic {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 31;
  bottom: calc(var(--safe-b) + 30px);
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.96), rgba(0, 98, 230, 0.96));
  box-shadow: 0 10px 30px rgba(10, 132, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.mic:active { transform: translateX(-50%) scale(0.94); }
.fab-plus {
  position: fixed; z-index: 31; right: max(18px, calc(50% - 262px)); bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: var(--blue);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--brd); box-shadow: var(--inner), var(--shadow);
}

/* Pastdan chiqadigan oyna */
.parda { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.32); animation: fade 0.18s ease; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--brd); border-bottom: 0; border-radius: 28px 28px 0 0; box-shadow: var(--inner);
  padding: 8px 16px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; animation: up 0.22s ease;
}
.sheet > * { flex-shrink: 0; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--track); margin: 2px auto 0; }
.sheet h2 { margin: 0; font-size: 20px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 12px);
  padding: 10px 16px; border-radius: 18px; font-weight: 600; font-size: 14px; max-width: 90vw;
  background: var(--glass-solid); border: 1px solid var(--brd); box-shadow: var(--shadow); animation: fade 0.2s ease;
}

/* Ovoz */
.ovoz-hero { border-radius: 24px; padding: 18px; text-align: center; background: linear-gradient(135deg, rgba(42, 79, 214, 0.9), rgba(161, 40, 122, 0.85)); color: #fff; }
.ovoz-hero .q { font-size: 20px; font-weight: 700; margin-top: 6px; min-height: 28px; }
.tolqin { display: flex; justify-content: center; gap: 4px; height: 34px; align-items: center; margin-top: 8px; }
.tolqin i { width: 4px; border-radius: 3px; background: #9cc8ff; animation: tol 0.9s ease-in-out infinite; }
.tolqin i:nth-child(2) { animation-delay: 0.1s; } .tolqin i:nth-child(3) { animation-delay: 0.2s; } .tolqin i:nth-child(4) { animation-delay: 0.3s; } .tolqin i:nth-child(5) { animation-delay: 0.4s; }
@keyframes tol { 0%, 100% { height: 8px; } 50% { height: 32px; } }
.tasdiq { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; }
.tasdiq .grow { flex: 1; min-width: 0; }

/* Tahlil */
.doira-k { display: flex; gap: 16px; align-items: center; }
.doira { width: 118px; height: 118px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.doira > div { width: 84px; height: 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--glass-solid); line-height: 1.15; font-size: 12px; }
.doira b { font-size: 15px; }
.legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.legend > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.legend .nom { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hukm { padding: 12px 14px; border-radius: 18px; font-weight: 650; }
.hukm.ok { background: rgba(48, 209, 88, 0.2); color: var(--up); }
.hukm.warn { background: rgba(255, 159, 10, 0.2); color: #b25c00; }
.hukm.bad { background: rgba(229, 72, 77, 0.18); color: var(--dn); }
@media (prefers-color-scheme: dark) { .hukm.warn { color: #ffb340; } }
table.jad { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.jad td { padding: 6px 2px; border-bottom: 1px solid var(--line); }
table.jad td:last-child { text-align: right; font-weight: 650; }

/* Darslar */
video { width: 100%; border-radius: 18px; background: #000; aspect-ratio: 9 / 16; max-height: 70vh; }
.dars p { margin: 4px 0 0; line-height: 1.55; }
.variant { text-align: left; padding: 10px 14px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--brd); width: 100%; }
.variant.togri { border-color: var(--up); background: color-mix(in srgb, #30d158 18%, var(--glass-strong)); }
.variant.notogri { border-color: var(--dn); background: color-mix(in srgb, var(--dn) 14%, var(--glass-strong)); }

/* PIN */
.qulf { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; }
.qulf .nuqta { display: flex; gap: 12px; }
.qulf .nuqta i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text); }
.qulf .nuqta i.on { background: var(--text); }
.klav { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.klav button { width: 72px; height: 72px; border-radius: 50%; font-size: 26px; font-weight: 500; background: var(--glass); border: 1px solid var(--brd); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }

@media (max-width: 380px) {
  .title h1 { font-size: 27px; }
  .big { font-size: 30px; }
  .tile .value { font-size: 16.5px; }
  .doira { width: 100px; height: 100px; }
  .doira > div { width: 72px; height: 72px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: var(--glass-solid); --glass-strong: var(--glass-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--glass-solid); --glass-strong: var(--glass-solid); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* v2: iOS yo'riqnomasi (qadamlar), eslatma tugmalari, qulf tugmalari o'chiq holatda */
.qadam { margin: 6px 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.qadam li::marker { color: var(--blue); font-weight: 700; }
.ios-yoriq h3 { margin-top: 0; }
.banner .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.klav button:disabled, .qulf .btn:disabled, .btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* PIN qulfi — to'liq yopiq fon: orqadagi hech narsa ko'rinmasin */
.qulf {
  background:
    radial-gradient(120% 70% at 10% 0%, var(--g1) 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 30%, var(--g2) 0%, transparent 55%),
    radial-gradient(100% 70% at 30% 100%, var(--g3) 0%, transparent 60%),
    var(--base);
}
