/* Champion Agent — maket (18.10) bo'yicha: to'q fon, bitta urg'u #FF8A3D, Onest. */
:root {
  --fon: #0E0F11; --sirt: #17191D; --sirt2: #1F2227; --chiziq: #2A2E35; --chiziq2: #23262C;
  --matn: #F3F3F1; --xira: #A3A8AF; --urgu: #FF8A3D; --urgu-matn: #1A0F05; --yashil: #4CC38A; --qizil: #E5484D;
  --past: env(safe-area-inset-bottom, 0px); --tepa: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--fon); color: var(--matn);
  font-family: 'Onest', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; }
button, input, textarea { font-family: inherit; color: inherit; }
a { color: var(--urgu); }

.ekran { min-height: 100%; padding: calc(var(--tepa) + 20px) 16px calc(var(--past) + 104px); display: flex; flex-direction: column; gap: 12px; }
.ekran-ichi { display: flex; flex-direction: column; gap: 12px; }
.sarlavha { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px; }
.sarlavha h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.2px; }
.kichik { font-size: 13px; color: var(--xira); line-height: 1.45; }
.bolim { font-size: 13px; font-weight: 600; color: var(--xira); padding: 6px 6px 0; letter-spacing: 0.3px; }

.karta { background: var(--sirt); border: 1px solid var(--chiziq); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.qator { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qator .nom { font-size: 15px; font-weight: 600; }
.karta a { text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.nuqta { width: 12px; height: 12px; border-radius: 6px; background: var(--yashil); flex-shrink: 0; }
.nuqta.band { background: var(--urgu); }
.katta-son { font-size: 22px; font-weight: 700; color: #FFB27A; }
.chiziqcha { height: 8px; border-radius: 4px; background: var(--chiziq); overflow: hidden; }
.chiziqcha > div { height: 8px; border-radius: 4px; background: var(--urgu); width: 0; transition: width .4s; }

.uchlik { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.uchlik .karta { padding: 12px; gap: 2px; border-radius: 16px; }
.uchlik b { font-size: 24px; font-weight: 700; }

.royxat { background: var(--sirt); border: 1px solid var(--chiziq); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.royxat > div { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--chiziq2); font-size: 14px; line-height: 1.4; }
.royxat > div:last-child { border-bottom: 0; }
.royxat .vaqt { color: var(--xira); font-size: 13px; width: 78px; flex-shrink: 0; }
.royxat .ogoh { color: #FFB27A; }
.royxat .xato { color: #FF8C8C; }
.bosh { color: var(--xira); font-size: 14px; padding: 14px 16px; }

.tugma { height: 52px; border-radius: 16px; border: 0; background: var(--urgu); color: var(--urgu-matn); font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; }
.tugma:disabled { opacity: .55; }
.tugma.chegara { background: transparent; border: 1px solid #3A3F47; color: var(--matn); font-weight: 500; height: 44px; }
.tugma.matnli { background: transparent; color: var(--xira); font-weight: 500; height: 44px; font-size: 14px; }
.kichik-tugma { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid #3A3F47; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }

.sozlama { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--chiziq2); min-height: 56px; }
.sozlama:last-child { border-bottom: 0; }
.sozlama .nom { font-size: 15px; font-weight: 500; }
.sozlama .izoh { font-size: 12px; color: var(--xira); margin-top: 2px; }
.kalit { width: 52px; height: 32px; border-radius: 16px; border: 0; padding: 3px; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; background: #3A3F47; transition: background .2s; }
.kalit span { width: 26px; height: 26px; border-radius: 13px; background: #fff; display: block; transition: transform .2s; }
.kalit[aria-checked="true"] { background: var(--urgu); }
.kalit[aria-checked="true"] span { transform: translateX(20px); }
.soat { background: var(--sirt2); border: 1px solid var(--chiziq); border-radius: 10px; height: 38px; padding: 0 10px; font-size: 15px; color-scheme: dark; }
.soatlar { display: flex; align-items: center; gap: 6px; color: var(--xira); }

nav.menyu { position: fixed; left: 0; right: 0; bottom: 0; padding: 8px 6px calc(var(--past) + 10px); background: #131518; border-top: 1px solid #262A30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); z-index: 5; }
nav.menyu a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--xira); font-size: 11px; font-weight: 500; padding: 4px 0; min-height: 44px; justify-content: center; }
nav.menyu a[aria-current="page"] { color: var(--urgu); font-weight: 600; }
nav.menyu svg { width: 22px; height: 22px; }

/* Kirish */
.kirish { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(var(--tepa) + 110px) 28px calc(var(--past) + 32px); text-align: center; }
.belgi { width: 76px; height: 76px; border-radius: 22px; background: var(--urgu); color: var(--urgu-matn); display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; }
.kirish h1 { margin: 22px 0 0; font-size: 26px; font-weight: 700; }
.kirish p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--xira); max-width: 300px; }
.kod { position: relative; margin-top: 30px; width: 100%; max-width: 340px; }
.kod input { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
.katakchalar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; pointer-events: none; }
.katakchalar span { height: 58px; border-radius: 14px; border: 1px solid #3A3F47; background: var(--sirt); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; }
.katakchalar span.tola { border-color: var(--urgu); }
.kirish .tugma { margin-top: 24px; max-width: 340px; }
.pastki { margin-top: auto; padding-top: 24px; font-size: 12px; color: #7A7F86; }

/* Live (4-bosqichgacha) */
.shar { cursor: pointer; -webkit-tap-highlight-color: transparent; display: block; width: min(100%, 320px); aspect-ratio: 1; max-width: 100%; margin: 4px auto 0; }
.yozuvlar { display: flex; flex-direction: column; gap: 8px; max-height: 30vh; overflow-y: auto; padding: 2px; }
.yozuvlar > div { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; max-width: 85%; }
.yozuvlar .siz { align-self: flex-end; background: var(--sirt2); }
.yozuvlar .agent { align-self: flex-start; background: var(--sirt); border: 1px solid var(--chiziq); }
.tugma.qizil { background: var(--qizil); color: #fff; }
.markaz { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.markaz h2 { margin: 0; font-size: 22px; font-weight: 600; }

#xabar { position: fixed; left: 50%; bottom: calc(var(--past) + 100px); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: #2B2F36; color: var(--matn); padding: 10px 16px; border-radius: 12px; font-size: 14px; transition: all .25s; max-width: 90%; z-index: 10; }
#xabar.korin { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Chat (18.10) — Telegram bilan bitta suhbat */
.chat-lenta { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 200px;
  height: calc(100dvh - var(--tepa) - var(--past) - 250px); padding: 2px; }
.chat-lenta > .siz, .chat-lenta > .agent { padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-lenta > .siz { align-self: flex-end; background: var(--sirt2); }
.chat-lenta > .agent { align-self: flex-start; background: var(--sirt); border: 1px solid var(--chiziq); }
.chat-lenta .vaqt { display: block; font-size: 11px; color: var(--xira); margin-top: 4px; }
.chat-lenta .vaqt:empty { display: none; }
.yozmoqda { font-size: 13px; color: var(--urgu); padding: 0 6px; }
.chat-pastki { display: flex; gap: 8px; align-items: flex-end; }
.chat-pastki textarea, .chat-pastki input { flex: 1; min-height: 46px; max-height: 140px; resize: none; border-radius: 16px; border: 1px solid var(--chiziq);
  background: var(--sirt); padding: 12px 14px; font-size: 16px; line-height: 1.35; color-scheme: dark; scrollbar-width: none; }
.chat-pastki textarea:focus, .chat-pastki input:focus { outline: none; border-color: var(--urgu); }
.yubor { width: 46px; height: 46px; flex-shrink: 0; border-radius: 23px; border: 0; background: var(--urgu); color: var(--urgu-matn); font-size: 20px; font-weight: 700; cursor: pointer; }

/* Ro'yxat (18.10) */
.tablar { display: flex; gap: 6px; overflow-x: auto; padding: 0 2px 2px; scrollbar-width: none; }
.tablar::-webkit-scrollbar { display: none; }
.tab { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid #3A3F47; background: transparent; font-size: 14px; font-weight: 500;
  white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tab[aria-selected="true"] { background: var(--urgu); border-color: var(--urgu); color: var(--urgu-matn); font-weight: 600; }
.tab .son { font-size: 12px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--sirt2); color: var(--matn); display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.tab[aria-selected="true"] .son { background: rgba(0,0,0,.18); color: var(--urgu-matn); }
.royxat > .band { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--chiziq2);
  background: transparent; text-align: left; font-size: 15px; line-height: 1.4; cursor: pointer; min-height: 52px; }
.royxat > .band:last-child { border-bottom: 0; }
.katak { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #4A505A; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.band.bajarildi { color: var(--xira); cursor: default; }
.band.bajarildi > span:last-child { text-decoration: line-through; }
.band.bajarildi .katak { background: var(--yashil); border-color: var(--yashil); color: #0B2A1A; }
.royxat > .qator-ochir { justify-content: space-between; align-items: flex-start; }
.royxat > .qator-ochir > div { min-width: 0; }
.ochir { width: 36px; height: 36px; flex-shrink: 0; border-radius: 18px; border: 0; background: var(--sirt2); color: var(--xira); font-size: 15px; cursor: pointer; }
.royxat pre, pre.reja { margin: 4px 0 0; white-space: pre-wrap; font-family: inherit; overflow-wrap: anywhere; }
pre.reja { font-size: 15px; line-height: 1.55; margin: 0; }
.izoh-past { padding: 0 6px; }
