/* 4 ta tema: Klassik (Spark), Cold (qishki), Anor, iPhone (dark). Har birining o'z shrifti, ikonkalari, foni. */

/* ======================= 1) KLASSIK — Spark Admin dizayni ======================= */
html[data-th=klassik] {
  --f-head: "Jakarta Variable", "Plus Jakarta Sans", system-ui, "Segoe UI", sans-serif; --f-body: "Jakarta Variable", "Plus Jakarta Sans", system-ui, "Segoe UI", sans-serif;
  --bg: #F1F4F2; --surface: #FFFFFF; --surface2: #F4F7F6; --col-bg: #E9EEEC; --modal-bg: #FFFFFF; --line: #E4EBE8; --line-in: #D3DDD9; --input-bg: #FFFFFF;
  --text: #0B130F; --text2: #3E4F47; --text3: #6C7E75; --link: #0b6b40; --accent: #B4F105; --accent-ink: #051C12; --accent-soft: rgba(180,241,5,.30); --accent-strong: #3d6a00;
  --good: #16a34a; --warn: #d97706; --bad: #e0364c; --c-blue: #2563eb; --c-orange: #ea580c;
  --radius: 18px; --radius-s: 11px; --shadow: 0 10px 30px rgba(11,19,15,.05); --shadow-s: 0 2px 8px rgba(11,19,15,.05); --blur: none;
  --btn-bg: #B4F105; --btn-text: #051C12; --btn-r: 12px; --btn-shadow: 0 6px 16px -6px rgba(120,170,0,.6);
  --side-w: 268px; --side-bg: #051C12; --side-text: #C7D5CE; --side-text-hi: #fff; --side-muted: #879A91; --side-hover: rgba(255,255,255,.07); --side-on-bg: #B4F105; --side-on-text: #051C12;
  --side-line: rgba(255,255,255,.1); --side-sub-on: #B4F105; --me-bg: #B4F105; --me-text: #051C12; --toast-bg: #051C12; --h1-size: 26px; --h1-w: 800;
}
html[data-th=klassik] .bgfx { background: radial-gradient(900px 480px at 92% -8%, rgba(180,241,5,.20), transparent 62%), radial-gradient(700px 420px at 8% 108%, rgba(5,28,18,.10), transparent 60%), #F1F4F2; }
html[data-th=klassik] .bgfx i:nth-child(1) { inset: 0; background-image: radial-gradient(rgba(5,28,18,.09) 1.2px, transparent 1.4px); background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); }
html[data-th=klassik] .ni .ico { font-size: 18px; }
html[data-th=klassik] .ni.on .ico, html[data-th=klassik] .grp.open > .ni .ico { color: #051C12; }
html[data-th=klassik] .side .brand { border-bottom: 1px solid var(--side-line); margin-bottom: 8px; }
html[data-th=klassik] .tile:hover { box-shadow: 0 18px 40px rgba(11,19,15,.10); }
html[data-th=klassik] .chip.on { color: #051C12; }

/* ======================= 2) COLD — qishki oq-ko'k ======================= */
html[data-th=cold] {
  --f-head: "Sora Variable", "Sora", system-ui, sans-serif; --f-body: "Sora Variable", "Sora", system-ui, sans-serif;
  --bg: #d9e9fa; --surface: rgba(255,255,255,.74); --surface2: rgba(234,244,255,.9); --col-bg: rgba(224,238,255,.55); --modal-bg: #f3f9ff; --line: rgba(110,155,215,.32); --line-in: rgba(95,140,205,.5); --input-bg: rgba(255,255,255,.9);
  --text: #0b2347; --text2: #34507a; --text3: #6583a9; --link: #1b5fcf; --accent: #2468e0; --accent-ink: #fff; --accent-soft: rgba(36,104,224,.18); --accent-strong: #1b4fb8;
  --good: #0e9a80; --warn: #d4881a; --bad: #d8344f; --c-blue: #2468e0; --c-orange: #e0780f;
  --radius: 22px; --radius-s: 13px; --shadow: 0 18px 44px -16px rgba(33,80,150,.38); --shadow-s: 0 6px 18px -8px rgba(33,80,150,.3); --blur: blur(16px) saturate(1.2);
  --btn-bg: linear-gradient(135deg, #4a8dff, #1d55d6); --btn-text: #fff; --btn-r: 14px; --btn-shadow: 0 10px 22px -8px rgba(29,85,214,.7);
  --side-w: 250px; --side-m: 14px; --side-r: 28px; --side-bg: linear-gradient(185deg, #14459a 0%, #0b2a5b 70%, #081d42 100%); --side-text: #cfe1ff; --side-text-hi: #fff; --side-muted: #8fb0e6; --side-hover: rgba(255,255,255,.09);
  --side-on-bg: linear-gradient(135deg, #8cc4ff, #3b86f5); --side-on-text: #06224d; --side-line: rgba(255,255,255,.14); --side-shadow: 0 24px 50px -14px rgba(10,35,90,.6); --side-sub-on: #fff;
  --ico-bg: rgba(255,255,255,.12); --ico-r: 50%; --ni-r: 16px; --me-bg: linear-gradient(145deg,#fff,#cfe4ff); --me-text: #0b2a5b; --toast-bg: #0b2a5b; --h1-size: 25px; --h1-w: 700; --ls-head: -.01em;
}
html[data-th=cold] .bgfx { background: radial-gradient(900px 520px at 85% -10%, rgba(255,255,255,.95), transparent 60%), radial-gradient(700px 500px at 0% 30%, rgba(150,200,255,.55), transparent 65%), linear-gradient(180deg, #eaf4ff 0%, #cfe3f8 55%, #b9d3f0 100%); }
html[data-th=cold] .bgfx i:nth-child(1) { inset: -240px 0 0 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><g fill='white'><circle cx='20' cy='30' r='3'/><circle cx='90' cy='10' r='2'/><circle cx='150' cy='60' r='4'/><circle cx='220' cy='40' r='2.5'/><circle cx='60' cy='120' r='2'/><circle cx='130' cy='150' r='3.5'/><circle cx='200' cy='130' r='2'/><circle cx='30' cy='210' r='3'/><circle cx='110' cy='230' r='2'/><circle cx='180' cy='200' r='4'/><circle cx='240' cy='240' r='2.5'/></g><g stroke='white' stroke-width='1.6' stroke-linecap='round' fill='none' opacity='.9'><path d='M180 100v18M171 109h18M174 103l12 12M186 103l-12 12'/><path d='M50 180v14M43 187h14M45 182l10 10M55 182l-10 10'/></g></svg>"); animation: snow 38s linear infinite; opacity: .9; }
html[data-th=cold] .bgfx i:nth-child(2) { left: 0; right: 0; bottom: 0; height: 44vh; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'><path fill='%23bfd9f5' d='M0 320V190l110-70 90 60 130-110 120 100 110-80 140 120 120-90 150 110 130-100 120 80 110-60 110 70V320z'/><path fill='%2398bde9' opacity='.8' d='M0 320V240l140-90 100 70 150-120 130 110 120-70 170 130 130-80 140 90 120-100 140 120V320z'/><path fill='%23ffffff' d='M0 320V270l120-60 110 50 140-80 120 70 130-50 150 80 120-60 140 60 130-50 140 60V320z'/></svg>") bottom / 100% 100% no-repeat; opacity: .9; }
html[data-th=cold] .bgfx i:nth-child(3) { left: 8%; right: 8%; top: -8%; height: 220px; background: radial-gradient(60% 100% at 50% 0, rgba(120,190,255,.55), transparent 70%); filter: blur(30px); }
@keyframes snow { to { background-position: 40px 260px; } }
html[data-th=cold] .side::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px; pointer-events: none; background: radial-gradient(circle at 12% 0, #fff 0 15px, transparent 16px), radial-gradient(circle at 34% 0, #fff 0 11px, transparent 12px), radial-gradient(circle at 58% 0, #fff 0 17px, transparent 18px), radial-gradient(circle at 82% 0, #fff 0 12px, transparent 13px); }
html[data-th=cold] .side .brand { padding-top: 34px; }
html[data-th=cold] .ni.on .ico, html[data-th=cold] .grp.open > .ni .ico { background: rgba(255,255,255,.55); }
html[data-th=cold] .card, html[data-th=cold] .tile { border-color: rgba(255,255,255,.7); }
html[data-th=cold] .chip.on { box-shadow: 0 8px 18px -8px rgba(29,85,214,.8); }
html[data-th=cold] .tile .tic { border-radius: 50%; }
html[data-th=cold] .ai > summary { box-shadow: 0 10px 26px -8px rgba(29,85,214,.8); }

/* ======================= 3) ANOR — krem, bordo, oltin ======================= */
html[data-th=anor] {
  --f-head: "Playfair Display Variable", "Playfair Display", Georgia, serif; --f-body: "Manrope Variable", "Manrope", system-ui, sans-serif;
  --bg: #f8ece3; --surface: rgba(255,251,246,.92); --surface2: #f6e5da; --col-bg: rgba(244,224,211,.62); --modal-bg: #fff8f1; --line: rgba(150,45,65,.17); --line-in: rgba(150,45,65,.3); --input-bg: #fffdfa;
  --text: #2c0b12; --text2: #5d3a40; --text3: #8b6d6c; --link: #8f1230; --accent: #8f1230; --accent-ink: #fff; --accent-soft: rgba(143,18,48,.13); --accent-strong: #8f1230;
  --good: #1c7c54; --warn: #b9770e; --bad: #b4162f; --c-blue: #8a2a5a; --c-orange: #b9770e;
  --radius: 20px; --radius-s: 12px; --shadow: 0 16px 36px -16px rgba(110,15,36,.38); --shadow-s: 0 5px 14px -8px rgba(110,15,36,.3); --blur: none;
  --btn-bg: linear-gradient(135deg, #a8173c, #6a0d24); --btn-text: #fff7ea; --btn-r: 999px; --btn-shadow: 0 10px 22px -10px rgba(106,13,36,.85), inset 0 0 0 1px rgba(224,178,90,.55);
  --side-w: 250px; --side-m: 16px; --side-r: 72px 72px 28px 28px; --side-bg: linear-gradient(180deg, #84122b 0%, #5b0a1d 65%, #470616 100%); --side-border: 2px solid #d4a24c; --side-text: #f6e1d6; --side-text-hi: #fff; --side-muted: #e0b3a3;
  --side-hover: rgba(255,255,255,.1); --side-on-bg: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); --side-on-text: #fff; --side-on-shadow: inset 0 0 0 1px rgba(224,178,90,.7); --side-line: rgba(224,178,90,.32); --side-sub-on: #f3cf84;
  --side-shadow: 0 24px 50px -16px rgba(90,10,28,.6); --ico-bg: rgba(255,255,255,.1); --ico-r: 50%; --ni-r: 999px; --me-bg: linear-gradient(145deg,#f3cf84,#c9962e); --me-text: #4a0b18; --toast-bg: #6a0d24; --h1-size: 31px; --h1-w: 700;
}
html[data-th=anor] { font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; }
html[data-th=anor] .bgfx { background: radial-gradient(800px 460px at 100% 0, rgba(255,214,190,.9), transparent 62%), radial-gradient(700px 520px at 0% 100%, rgba(240,200,175,.7), transparent 62%), #f8ece3; }
html[data-th=anor] .bgfx i:nth-child(1) { inset: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'><g fill='none' stroke='%23b88a2e' stroke-width='1' opacity='.38'><path d='M48 6l9 21 21-9-9 21 21 9-21 9 9 21-21-9-9 21-9-21-21 9 9-21-21-9 21-9-9-21 21 9z'/><circle cx='48' cy='48' r='9'/></g></svg>"); opacity: .55; mask-image: linear-gradient(200deg, #000 5%, transparent 55%); -webkit-mask-image: linear-gradient(200deg, #000 5%, transparent 55%); }
html[data-th=anor] .bgfx i:nth-child(2) { right: -70px; top: -80px; width: 250px; height: 250px; opacity: .75; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><defs><radialGradient id='g' cx='34%' cy='28%' r='80%'><stop offset='0' stop-color='%23ff7a6e'/><stop offset='.5' stop-color='%23c3132a'/><stop offset='1' stop-color='%23650816'/></radialGradient></defs><path d='M100 44l-9-18 9 5 3-13 6 11 9-9-3 15 11-5-10 14z' fill='%23a31526'/><circle cx='100' cy='118' r='70' fill='url(%23g)'/><ellipse cx='72' cy='84' rx='22' ry='11' fill='white' opacity='.25' transform='rotate(-32 72 84)'/><path d='M150 40c18-4 34 4 40 20-18 6-34 0-40-20z' fill='%232f7a3d'/><path d='M60 36c-14-10-30-8-40 6 14 10 30 8 40-6z' fill='%23398a48'/></svg>") center / contain no-repeat; }
html[data-th=anor] .bgfx i:nth-child(3) { left: 0; right: 0; bottom: 0; height: 190px; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 190' preserveAspectRatio='none'><defs><linearGradient id='r' x1='0' x2='1'><stop offset='0' stop-color='%23fff' stop-opacity='0'/><stop offset='.45' stop-color='%23b01a38' stop-opacity='.55'/><stop offset='1' stop-color='%236a0d24' stop-opacity='.95'/></linearGradient></defs><path d='M0 190V150C240 90 460 170 720 130S1170 20 1440 70V190z' fill='url(%23r)'/><path d='M0 190V170C260 120 480 185 740 150S1190 70 1440 110' fill='none' stroke='%23d4a24c' stroke-width='3' opacity='.85'/></svg>") bottom / 100% 100% no-repeat; }
html[data-th=anor] .side::after { content: ""; position: absolute; left: 0; right: 0; bottom: 74px; height: 120px; pointer-events: none; opacity: .5; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23e8c274' stroke-width='1.3'><path d='M60 8l12 28 28-12-12 28 28 12-28 12 12 28-28-12-12 28-12-28-28 12 12-28-28-12 28-12-12-28 28 12z'/><circle cx='60' cy='60' r='13'/><circle cx='60' cy='60' r='5'/></g></svg>") center bottom / 120px no-repeat; mask-image: linear-gradient(0deg, #000, transparent); -webkit-mask-image: linear-gradient(0deg, #000, transparent); }
html[data-th=anor] .side .brand { padding-top: 40px; justify-content: center; }
html[data-th=anor] .ni { font-weight: 700; } html[data-th=anor] .ni .ico { box-shadow: inset 0 0 0 1px rgba(224,178,90,.55); }
html[data-th=anor] .top h1, html[data-th=anor] .tile b, html[data-th=anor] .nums b { letter-spacing: -.005em; font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; } html[data-th=anor] .card { border-color: rgba(190,140,60,.32); }
html[data-th=anor] .card > h2 { position: relative; padding-left: 14px; } html[data-th=anor] .card > h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 3px; background: #8f1230; }
html[data-th=anor] .tile .tic { border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 8px 18px -6px var(--h2); }
html[data-th=anor] .chip { border-color: rgba(190,140,60,.4); } html[data-th=anor] .ai > summary { box-shadow: inset 0 0 0 2px rgba(224,178,90,.7), 0 8px 22px rgba(90,10,28,.45); }

/* ======================= 4) iPHONE — qorong'i (dark mode) ======================= */
html[data-th=iphone] {
  color-scheme: dark;
  --f-head: "Inter Variable", "Inter", -apple-system, "SF Pro Display", system-ui, sans-serif; --f-body: "Inter Variable", "Inter", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --bg: #000; --surface: rgba(28,28,30,.88); --surface2: rgba(44,44,46,.92); --col-bg: rgba(28,28,30,.5); --modal-bg: #1c1c1e; --line: rgba(84,84,88,.5); --line-in: rgba(84,84,88,.85); --input-bg: rgba(118,118,128,.24);
  --text: #fff; --text2: rgba(235,235,245,.78); --text3: rgba(235,235,245,.52); --link: #4da3ff; --accent: #0a84ff; --accent-ink: #fff; --accent-soft: rgba(10,132,255,.28); --accent-strong: #6cb4ff;
  --good: #30d158; --warn: #ffd60a; --bad: #ff453a; --c-blue: #64b5ff; --c-orange: #ff9f0a;
  --radius: 18px; --radius-s: 12px; --shadow: 0 1px 0 rgba(255,255,255,.05) inset; --shadow-s: none; --blur: blur(26px) saturate(1.6);
  --btn-bg: #0a84ff; --btn-text: #fff; --btn-r: 14px; --btn-shadow: none;
  --side-w: 256px; --side-m: 12px; --side-r: 26px; --side-bg: rgba(28,28,30,.7); --side-blur: blur(34px) saturate(1.8); --side-border: 1px solid rgba(255,255,255,.1); --side-text: rgba(255,255,255,.9); --side-text-hi: #fff; --side-muted: rgba(235,235,245,.55);
  --side-hover: rgba(118,118,128,.22); --side-on-bg: rgba(118,118,128,.34); --side-on-text: #fff; --side-line: rgba(84,84,88,.55); --side-sub-bg: rgba(118,118,128,.2);
  --ico-r: 9px; --ni-r: 13px; --me-bg: linear-gradient(145deg,#5ac8fa,#0a84ff); --me-text: #fff; --toast-bg: #3a3a3c; --h1-size: 34px; --h1-w: 800; --ls-head: -.02em;
}
html[data-th=iphone] .bgfx { background: #000; }
html[data-th=iphone] .bgfx i { border-radius: 50%; filter: blur(90px); opacity: .55; }
html[data-th=iphone] .bgfx i:nth-child(1) { left: -8%; top: -12%; width: 46vw; height: 46vw; background: #0a4fd6; animation: drift 26s ease-in-out infinite alternate; }
html[data-th=iphone] .bgfx i:nth-child(2) { right: -10%; top: 6%; width: 40vw; height: 40vw; background: #6b2bd9; animation: drift 32s ease-in-out infinite alternate-reverse; }
html[data-th=iphone] .bgfx i:nth-child(3) { right: 12%; bottom: -18%; width: 44vw; height: 36vw; background: #d3358a; opacity: .38; animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(5vw, 4vh) scale(1.12); } }
html[data-th=iphone] .ni { font-weight: 600; } html[data-th=iphone] .ni .ico { font-size: 17px; width: 30px; height: 30px; }
html[data-th=iphone] .side .brand img { height: 26px; }
html[data-th=iphone] .tile .tic { border-radius: 11px; box-shadow: none; }
html[data-th=iphone] .card, html[data-th=iphone] .tile, html[data-th=iphone] .kc { border-color: rgba(255,255,255,.08); }
html[data-th=iphone] .tbtn { border-radius: 12px; } html[data-th=iphone] th { text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
html[data-th=iphone] .chip.on { background: #0a84ff; } html[data-th=iphone] .btn.sec { background: rgba(118,118,128,.3); border: 0; }
html[data-th=iphone] .modal { background: rgba(0,0,0,.6); } html[data-th=iphone] .mbox { border-color: rgba(255,255,255,.1); }
html[data-th=iphone] select option { color: #fff; background: #2c2c2e; }

/* Sotuv/Logistika bosqich ranglari (ustun nuqtasi) */
.kcol[data-b=yangi] { --dot: #6c8cff; } .kcol[data-b=telegram] { --dot: #38bdf8; } .kcol[data-b=hisob] { --dot: #f59e0b; } .kcol[data-b=kelishuv] { --dot: #a855f7; } .kcol[data-b=yakun] { --dot: #22c55e; } .kcol[data-b=sifatsiz] { --dot: #ef4444; }

/* Kirishdan oldingi sahifa fonlari */
body.guest .bgfx { position: fixed; }

html[data-th=iphone] .ni .ico { background: linear-gradient(150deg, var(--h1), var(--h2)); color: #fff; }
html[data-th=iphone] .ni.on .ico, html[data-th=iphone] .grp.open > .ni .ico { color: #fff; }

/* Audio pleyer: har temada o'zicha */
html[data-th=klassik] .ap { --ap-bg: #fff; --ap-bar: #0b6b40; --ap-r: 16px; } html[data-th=klassik] .ap-b { color: #051C12; }
html[data-th=cold] .ap { --ap-bg: linear-gradient(135deg, rgba(255,255,255,.9), rgba(214,232,255,.85)); --ap-bar: #2468e0; --ap-r: 999px; padding: 10px 18px 10px 12px; box-shadow: 0 12px 30px -14px rgba(33,80,150,.5); }
html[data-th=anor] .ap { --ap-bg: linear-gradient(135deg, #fffaf4, #f6e3d6); --ap-bar: #8f1230; --ap-r: 22px; border-color: rgba(190,140,60,.5); }
html[data-th=anor] .ap-b { box-shadow: inset 0 0 0 2px rgba(224,178,90,.8), 0 8px 18px -8px rgba(106,13,36,.8); }
html[data-th=iphone] .ap { --ap-bg: rgba(44,44,46,.9); --ap-bar: #0a84ff; --ap-r: 16px; border: 0; } html[data-th=iphone] .ap-b { box-shadow: none; } html[data-th=iphone] .ap-bars i { opacity: .55; }
