/* ==========================================================================
   DORISEPISH — dizayn tizimi
   Tor ekran (360 px) dan boshlab ishlaydi. Yorug' va qorong'i rejim.
   Qurish bosqichi yo'q: oddiy CSS, keng qo'llab-quvvatlanadigan xususiyatlar.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokenlar */

:root {
  /* Rang — yorug' rejim */
  --fon: #f6f7f9;
  --fon-2: #eef0f4;
  --sath: #ffffff;
  --sath-2: #fafbfc;
  --sath-yopishqoq: rgba(255, 255, 255, 0.86);

  --chiziq: #e3e6ec;
  --chiziq-quyuq: #cfd4dd;

  --matn: #101521;
  --matn-2: #525a6b;
  --matn-3: #7b8494;
  --matn-teskari: #ffffff;

  --brend: #1d4ed8;
  --brend-quyuq: #1740b4;
  --brend-yengil: #e8edfd;
  --brend-matn: #1740b4;

  --yashil: #15803d;
  --yashil-yengil: #e4f6ea;
  --yashil-matn: #116630;

  --sariq: #b45309;
  --sariq-yengil: #fdf0dc;
  --sariq-matn: #90420a;

  --qizil: #be123c;
  --qizil-yengil: #fdeaef;
  --qizil-matn: #9c0e31;

  --kul: #5b6475;
  --kul-yengil: #eef0f4;
  --kul-matn: #4a5262;

  --halqa: rgba(29, 78, 216, 0.38);

  /* Soya */
  --soya-1: 0 1px 2px rgba(16, 21, 33, 0.06), 0 1px 1px rgba(16, 21, 33, 0.04);
  --soya-2: 0 2px 4px rgba(16, 21, 33, 0.06), 0 6px 16px rgba(16, 21, 33, 0.07);
  --soya-3: 0 8px 24px rgba(16, 21, 33, 0.1), 0 24px 56px rgba(16, 21, 33, 0.12);

  /* Burchak */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-4: 22px;
  --r-dumaloq: 999px;

  /* Oraliq (4 px asos) */
  --b-1: 4px;
  --b-2: 8px;
  --b-3: 12px;
  --b-4: 16px;
  --b-5: 20px;
  --b-6: 24px;
  --b-8: 32px;
  --b-10: 40px;
  --b-12: 48px;

  /* Shrift */
  --shrift: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shrift-raqam: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;

  --o-xs: 12px;
  --o-sm: 13px;
  --o-md: 15px;
  --o-lg: 17px;
  --o-xl: clamp(19px, 4.4vw, 22px);
  --o-2xl: clamp(23px, 5.6vw, 28px);
  --o-3xl: clamp(28px, 7vw, 36px);

  /* Harakat */
  --tez: 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --orta: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Tuzilma */
  --sarlavha-balandligi: 56px;
  --pastnav-balandligi: 64px;
  --kenglik: 1180px;

  /* Tegish nishoni: dalada qo'lqop bilan bosiladi */
  --tegish: 52px;
  --tegish-kichik: 44px;

  color-scheme: light;
}

/* Qorong'i rejim — tizim sozlamasi bo'yicha */
@media (prefers-color-scheme: dark) {
  :root:not([data-rejim='yorug']) {
    --fon: #0c0f16;
    --fon-2: #11151e;
    --sath: #161b26;
    --sath-2: #1b2130;
    --sath-yopishqoq: rgba(22, 27, 38, 0.88);

    --chiziq: #262d3d;
    --chiziq-quyuq: #343d50;

    --matn: #eef1f6;
    --matn-2: #a3acbd;
    --matn-3: #788294;
    --matn-teskari: #0c0f16;

    --brend: #5b8cff;
    --brend-quyuq: #7aa2ff;
    --brend-yengil: #16203a;
    --brend-matn: #a9c2ff;

    --yashil: #3ec96f;
    --yashil-yengil: #0f2719;
    --yashil-matn: #7fe0a1;

    --sariq: #e9a23b;
    --sariq-yengil: #2a1f0c;
    --sariq-matn: #f3c37c;

    --qizil: #f56a86;
    --qizil-yengil: #2c1019;
    --qizil-matn: #ffa3b5;

    --kul: #8b95a7;
    --kul-yengil: #1c222e;
    --kul-matn: #aab3c2;

    --halqa: rgba(91, 140, 255, 0.45);

    --soya-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --soya-2: 0 2px 6px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.4);
    --soya-3: 0 10px 30px rgba(0, 0, 0, 0.55), 0 30px 70px rgba(0, 0, 0, 0.5);

    color-scheme: dark;
  }
}

/* Qo'lda tanlangan qorong'i rejim */
:root[data-rejim='qorongi'] {
  --fon: #0c0f16;
  --fon-2: #11151e;
  --sath: #161b26;
  --sath-2: #1b2130;
  --sath-yopishqoq: rgba(22, 27, 38, 0.88);
  --chiziq: #262d3d;
  --chiziq-quyuq: #343d50;
  --matn: #eef1f6;
  --matn-2: #a3acbd;
  --matn-3: #788294;
  --matn-teskari: #0c0f16;
  --brend: #5b8cff;
  --brend-quyuq: #7aa2ff;
  --brend-yengil: #16203a;
  --brend-matn: #a9c2ff;
  --yashil: #3ec96f;
  --yashil-yengil: #0f2719;
  --yashil-matn: #7fe0a1;
  --sariq: #e9a23b;
  --sariq-yengil: #2a1f0c;
  --sariq-matn: #f3c37c;
  --qizil: #f56a86;
  --qizil-yengil: #2c1019;
  --qizil-matn: #ffa3b5;
  --kul: #8b95a7;
  --kul-yengil: #1c222e;
  --kul-matn: #aab3c2;
  --halqa: rgba(91, 140, 255, 0.45);
  --soya-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --soya-2: 0 2px 6px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.4);
  --soya-3: 0 10px 30px rgba(0, 0, 0, 0.55), 0 30px 70px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* --------------------------------------------------------------- 2. Asos */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fon);
  color: var(--matn);
  font-family: var(--shrift);
  font-size: var(--o-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 650;
}

h1 {
  font-size: var(--o-2xl);
}
h2 {
  font-size: var(--o-xl);
}
h3 {
  font-size: var(--o-lg);
}

p {
  margin: 0;
}

a {
  color: var(--brend-matn);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--halqa);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--chiziq-quyuq);
  border-radius: var(--r-dumaloq);
  border: 3px solid transparent;
  background-clip: content-box;
}

/* Yordamchilar */
.yashirin {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.yoq {
  display: none !important;
}

/* --------------------------------------------------------------- 3. Tuzilma */

.ilova {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@supports (min-height: 100dvh) {
  .ilova {
    min-height: 100dvh;
  }
}

.sarlavha {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--b-3);
  min-height: var(--sarlavha-balandligi);
  padding: var(--b-2) var(--b-4);
  padding-top: calc(var(--b-2) + env(safe-area-inset-top));
  background: var(--sath-yopishqoq);
  border-bottom: 1px solid var(--chiziq);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
}

.sarlavha__nom {
  font-size: var(--o-lg);
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sarlavha__amal {
  display: flex;
  align-items: center;
  gap: var(--b-1);
  flex: none;
}

.asosiy {
  flex: 1;
  width: 100%;
  max-width: var(--kenglik);
  margin: 0 auto;
  padding: var(--b-4);
  padding-bottom: calc(var(--b-8) + env(safe-area-inset-bottom));
}

.asosiy--nav {
  padding-bottom: calc(var(--pastnav-balandligi) + var(--b-6) + env(safe-area-inset-bottom));
}

.ustun {
  display: flex;
  flex-direction: column;
  gap: var(--b-4);
}

.ustun--tig {
  gap: var(--b-3);
}

.qator {
  display: flex;
  align-items: center;
  gap: var(--b-3);
  flex-wrap: wrap;
}

.qator--oxir {
  justify-content: flex-end;
}

.tur {
  display: grid;
  gap: var(--b-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}

.oraliq {
  flex: 1;
}

/* Pastdagi navigatsiya — telefon uchun */
.pastnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  background: var(--sath-yopishqoq);
  border-top: 1px solid var(--chiziq);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  padding-bottom: env(safe-area-inset-bottom);
}

.pastnav__tugma {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--pastnav-balandligi);
  padding: var(--b-2) var(--b-1);
  background: none;
  border: 0;
  color: var(--matn-3);
  font-size: var(--o-xs);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color var(--tez);
  -webkit-tap-highlight-color: transparent;
}

.pastnav__tugma[aria-current='page'] {
  color: var(--brend-matn);
}

.pastnav__tugma[aria-current='page']::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  border-radius: 0 0 var(--r-dumaloq) var(--r-dumaloq);
  background: var(--brend);
}

.pastnav__belgi {
  font-size: 21px;
  line-height: 1;
}

/* --------------------------------------------------------------- 4. Karta */

.karta {
  background: var(--sath);
  border: 1px solid var(--chiziq);
  border-radius: var(--r-3);
  box-shadow: var(--soya-1);
}

.karta__tana {
  padding: var(--b-4);
}

.karta__sarlavha {
  display: flex;
  align-items: center;
  gap: var(--b-3);
  padding: var(--b-4) var(--b-4) 0;
}

.karta__sarlavha h2,
.karta__sarlavha h3 {
  flex: 1;
  min-width: 0;
}

.karta--bosiladigan {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform var(--tez), box-shadow var(--tez), border-color var(--tez);
  -webkit-tap-highlight-color: transparent;
  color: inherit;
  font: inherit;
}

.karta--bosiladigan:hover {
  border-color: var(--chiziq-quyuq);
  box-shadow: var(--soya-2);
  text-decoration: none;
}

.karta--bosiladigan:active {
  transform: scale(0.988);
}

/* Diqqat tortadigan chap chiziq */
.karta--ogoh {
  border-left: 4px solid var(--sariq);
}

.karta--xato {
  border-left: 4px solid var(--qizil);
}

/* --------------------------------------------------------------- 5. Tugma */

.tugma {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--b-2);
  min-height: var(--tegish-kichik);
  padding: 0 var(--b-4);
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: var(--brend);
  color: #fff;
  font-size: var(--o-md);
  font-weight: 620;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--tez), transform var(--tez), box-shadow var(--tez),
    border-color var(--tez), opacity var(--tez);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.tugma:hover {
  background: var(--brend-quyuq);
  text-decoration: none;
}

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

.tugma[disabled],
.tugma[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Ikkilamchi */
.tugma--ikki {
  background: var(--sath);
  color: var(--matn);
  border-color: var(--chiziq-quyuq);
}

.tugma--ikki:hover {
  background: var(--fon-2);
  border-color: var(--kul);
}

/* Shaffof */
.tugma--shaffof {
  background: transparent;
  color: var(--matn-2);
}

.tugma--shaffof:hover {
  background: var(--fon-2);
  color: var(--matn);
}

/* Xatarli */
.tugma--xatar {
  background: var(--qizil);
}

.tugma--xatar:hover {
  background: var(--qizil);
  filter: brightness(1.08);
}

/* Tasdiq */
.tugma--yashil {
  background: var(--yashil);
}

.tugma--yashil:hover {
  background: var(--yashil);
  filter: brightness(1.08);
}

/* O'lcham */
.tugma--katta {
  min-height: var(--tegish);
  padding: 0 var(--b-5);
  font-size: var(--o-lg);
  border-radius: var(--r-3);
}

/* Dala uchun: butun kenglik, baland */
.tugma--dala {
  width: 100%;
  min-height: 60px;
  font-size: var(--o-lg);
  border-radius: var(--r-3);
  box-shadow: var(--soya-2);
}

.tugma--kichik {
  min-height: 34px;
  padding: 0 var(--b-3);
  font-size: var(--o-sm);
  border-radius: var(--r-1);
}

.tugma--keng {
  width: 100%;
}

.tugma--belgi {
  min-height: var(--tegish-kichik);
  width: var(--tegish-kichik);
  padding: 0;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--matn-2);
  font-size: 19px;
  position: relative;
}

.tugma--belgi:hover {
  background: var(--fon-2);
  color: var(--matn);
}

/* Tugma ichidagi aylanma */
.tugma__aylanma {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: aylan 700ms linear infinite;
  flex: none;
}

/* --------------------------------------------------------------- 6. Forma */

.maydon {
  display: flex;
  flex-direction: column;
  gap: var(--b-2);
}

.maydon__yorliq {
  font-size: var(--o-sm);
  font-weight: 620;
  color: var(--matn-2);
}

.maydon__yorliq span {
  color: var(--qizil);
}

.kiritish {
  width: 100%;
  min-height: var(--tegish-kichik);
  padding: var(--b-2) var(--b-3);
  background: var(--sath);
  border: 1px solid var(--chiziq-quyuq);
  border-radius: var(--r-2);
  font-size: var(--o-md);
  transition: border-color var(--tez), box-shadow var(--tez);
  -webkit-appearance: none;
  appearance: none;
}

.kiritish:focus {
  outline: none;
  border-color: var(--brend);
  box-shadow: 0 0 0 3px var(--halqa);
}

.kiritish::placeholder {
  color: var(--matn-3);
}

textarea.kiritish {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

select.kiritish {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237b8494' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--b-3) center;
  padding-right: var(--b-8);
}

.maydon--xato .kiritish {
  border-color: var(--qizil);
}

.maydon--xato .kiritish:focus {
  box-shadow: 0 0 0 3px var(--qizil-yengil);
}

.maydon__xato {
  font-size: var(--o-sm);
  font-weight: 600;
  color: var(--qizil-matn);
  display: flex;
  align-items: flex-start;
  gap: var(--b-1);
}

.maydon__izoh {
  font-size: var(--o-sm);
  color: var(--matn-3);
}

/* Katta kod kiritish maydoni */
.kod-kiritish {
  width: 100%;
  min-height: 68px;
  text-align: center;
  font-family: var(--shrift-raqam);
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: var(--b-3);
  background: var(--sath);
  border: 2px solid var(--chiziq-quyuq);
  border-radius: var(--r-3);
  transition: border-color var(--tez), box-shadow var(--tez);
  -webkit-appearance: none;
  appearance: none;
}

.kod-kiritish:focus {
  outline: none;
  border-color: var(--brend);
  box-shadow: 0 0 0 4px var(--halqa);
}

/* Belgilash (checkbox) ro'yxati */
.belgilash {
  display: flex;
  align-items: center;
  gap: var(--b-3);
  min-height: var(--tegish-kichik);
  padding: var(--b-2) var(--b-3);
  border: 1px solid var(--chiziq);
  border-radius: var(--r-2);
  background: var(--sath);
  cursor: pointer;
  transition: border-color var(--tez), background var(--tez);
}

.belgilash:hover {
  border-color: var(--chiziq-quyuq);
}

.belgilash input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--brend);
  cursor: pointer;
}

.belgilash--tanlangan {
  border-color: var(--brend);
  background: var(--brend-yengil);
}

.belgilash__matn {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.belgilash__izoh {
  display: block;
  font-size: var(--o-sm);
  font-weight: 400;
  color: var(--matn-3);
}

/* --------------------------------------------------------------- 7. Nishon */

.nishon {
  display: inline-flex;
  align-items: center;
  gap: var(--b-1);
  padding: 3px var(--b-2);
  border-radius: var(--r-dumaloq);
  font-size: var(--o-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--kul-yengil);
  color: var(--kul-matn);
}

.nishon::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.nishon--kok {
  background: var(--brend-yengil);
  color: var(--brend-matn);
}
.nishon--yashil {
  background: var(--yashil-yengil);
  color: var(--yashil-matn);
}
.nishon--sariq {
  background: var(--sariq-yengil);
  color: var(--sariq-matn);
}
.nishon--qizil {
  background: var(--qizil-yengil);
  color: var(--qizil-matn);
}
.nishon--tekis::before {
  display: none;
}

/* Kechikkan belgisi */
.kechikkan {
  display: inline-flex;
  align-items: center;
  gap: var(--b-1);
  padding: 3px var(--b-2);
  border-radius: var(--r-dumaloq);
  background: var(--qizil);
  color: #fff;
  font-size: var(--o-xs);
  font-weight: 700;
}

/* --------------------------------------------------------------- 8. Ogohlantirish */

.ogoh {
  display: flex;
  align-items: flex-start;
  gap: var(--b-3);
  padding: var(--b-3) var(--b-4);
  border-radius: var(--r-2);
  border: 1px solid var(--chiziq);
  background: var(--sath-2);
  font-size: var(--o-md);
}

.ogoh__belgi {
  font-size: 18px;
  line-height: 1.35;
  flex: none;
}

.ogoh__tana {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--b-1);
}

.ogoh__nom {
  font-weight: 650;
}

.ogoh--sariq {
  background: var(--sariq-yengil);
  border-color: transparent;
  color: var(--sariq-matn);
}

.ogoh--qizil {
  background: var(--qizil-yengil);
  border-color: transparent;
  color: var(--qizil-matn);
}

.ogoh--yashil {
  background: var(--yashil-yengil);
  border-color: transparent;
  color: var(--yashil-matn);
}

.ogoh--kok {
  background: var(--brend-yengil);
  border-color: transparent;
  color: var(--brend-matn);
}

/* --------------------------------------------------------------- 9. Bo'sh holat */

.bosh {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--b-3);
  padding: var(--b-12) var(--b-5);
  color: var(--matn-2);
}

.bosh__belgi {
  font-size: 44px;
  line-height: 1;
  opacity: 0.55;
}

.bosh__nom {
  font-size: var(--o-lg);
  font-weight: 650;
  color: var(--matn);
}

/* -------------------------------------------------------------- 10. Yuklanish */

@keyframes aylan {
  to {
    transform: rotate(360deg);
  }
}

.aylanma {
  width: 26px;
  height: 26px;
  border: 3px solid var(--chiziq-quyuq);
  border-top-color: var(--brend);
  border-radius: 50%;
  animation: aylan 700ms linear infinite;
}

.yuklanmoqda {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--b-3);
  padding: var(--b-12) var(--b-4);
  color: var(--matn-3);
  font-size: var(--o-sm);
}

@keyframes porla {
  100% {
    background-position-x: -180%;
  }
}

.suyak {
  border-radius: var(--r-2);
  background: var(--fon-2);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  background-size: 180% 100%;
  background-repeat: no-repeat;
  background-position-x: 180%;
  animation: porla 1.3s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-rejim='yorug']) .suyak {
    background-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.07) 50%,
      transparent 100%
    );
  }
}

.suyak--qator {
  height: 14px;
}
.suyak--karta {
  height: 92px;
}

/* Yuklash chizig'i */
.jarayon {
  height: 8px;
  border-radius: var(--r-dumaloq);
  background: var(--fon-2);
  overflow: hidden;
}

.jarayon__ichi {
  height: 100%;
  width: 0;
  border-radius: var(--r-dumaloq);
  background: var(--brend);
  transition: width 180ms linear;
}

.jarayon--aniqsiz .jarayon__ichi {
  width: 40%;
  animation: suril 1.1s ease-in-out infinite;
}

@keyframes suril {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(280%);
  }
}

/* -------------------------------------------------------------- 11. Modal */

.parda {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: paydo var(--orta) both;
}

@keyframes paydo {
  from {
    opacity: 0;
  }
}

@keyframes kotar {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--sath);
  border: 1px solid var(--chiziq);
  border-bottom: 0;
  border-radius: var(--r-4) var(--r-4) 0 0;
  box-shadow: var(--soya-3);
  padding: var(--b-5);
  padding-bottom: calc(var(--b-5) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--b-4);
  animation: kotar var(--orta) both;
}

.modal__sarlavha {
  display: flex;
  align-items: flex-start;
  gap: var(--b-3);
}

.modal__sarlavha h2 {
  flex: 1;
  min-width: 0;
}

.modal__amal {
  display: flex;
  gap: var(--b-2);
  flex-wrap: wrap;
}

.modal__amal .tugma {
  flex: 1;
  min-width: 120px;
}

@media (min-width: 560px) {
  .parda {
    align-items: center;
    padding: var(--b-4);
  }
  .modal {
    border-radius: var(--r-4);
    border-bottom: 1px solid var(--chiziq);
  }
}

/* -------------------------------------------------------------- 12. Xabarnoma */

.xabarlar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--b-2);
  padding: var(--b-4);
  padding-bottom: calc(var(--b-4) + env(safe-area-inset-bottom));
  pointer-events: none;
  align-items: center;
}

.xabar {
  pointer-events: auto;
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: flex-start;
  gap: var(--b-3);
  padding: var(--b-3) var(--b-4);
  border-radius: var(--r-2);
  background: #101521;
  color: #fff;
  box-shadow: var(--soya-3);
  font-size: var(--o-md);
  animation: kotar var(--orta) both;
}

.xabar--xato {
  background: var(--qizil);
}
.xabar--yashil {
  background: var(--yashil);
}

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

.xabar__yop {
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.8;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  flex: none;
}

/* -------------------------------------------------------------- 13. Statistika */

.raqam-karta {
  display: flex;
  flex-direction: column;
  gap: var(--b-1);
  padding: var(--b-4);
  background: var(--sath);
  border: 1px solid var(--chiziq);
  border-radius: var(--r-3);
  box-shadow: var(--soya-1);
}

.raqam-karta__nom {
  font-size: var(--o-sm);
  font-weight: 620;
  color: var(--matn-2);
  display: flex;
  align-items: center;
  gap: var(--b-2);
}

.raqam-karta__son {
  font-size: var(--o-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.raqam-karta__izoh {
  font-size: var(--o-xs);
  color: var(--matn-3);
}

.raqam-karta--qizil .raqam-karta__son {
  color: var(--qizil-matn);
}
.raqam-karta--yashil .raqam-karta__son {
  color: var(--yashil-matn);
}
.raqam-karta--sariq .raqam-karta__son {
  color: var(--sariq-matn);
}

/* Oddiy gorizontal ustun diagramma */
.chiziqli {
  display: flex;
  flex-direction: column;
  gap: var(--b-3);
}

.chiziqli__qator {
  display: grid;
  grid-template-columns: minmax(84px, 30%) 1fr auto;
  align-items: center;
  gap: var(--b-3);
  font-size: var(--o-sm);
}

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

.chiziqli__yol {
  height: 10px;
  border-radius: var(--r-dumaloq);
  background: var(--fon-2);
  overflow: hidden;
}

.chiziqli__ichi {
  height: 100%;
  border-radius: var(--r-dumaloq);
  background: var(--brend);
  transition: width var(--orta);
}

.chiziqli__son {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
  text-align: right;
}

/* -------------------------------------------------------------- 14. Ro'yxat */

.royxat {
  display: flex;
  flex-direction: column;
}

.royxat__element {
  display: flex;
  align-items: center;
  gap: var(--b-3);
  padding: var(--b-3) var(--b-4);
  border-bottom: 1px solid var(--chiziq);
  min-height: var(--tegish);
}

.royxat__element:last-child {
  border-bottom: 0;
}

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

.royxat__nom {
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
}

.royxat__izoh {
  font-size: var(--o-sm);
  color: var(--matn-3);
}

.royxat__element--bosiladigan {
  width: 100%;
  background: none;
  border-width: 0 0 1px;
  border-style: solid;
  border-color: var(--chiziq);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.royxat__element--bosiladigan:hover {
  background: var(--fon-2);
}

.royxat__element--oqilmagan {
  background: var(--brend-yengil);
}

/* Ikki qatorli ma'lumot juftligi */
.juft {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.juft__nom {
  font-size: var(--o-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--matn-3);
}

.juft__qiymat {
  font-size: var(--o-md);
  font-weight: 560;
  overflow-wrap: anywhere;
}

.juftlar {
  display: grid;
  gap: var(--b-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

/* -------------------------------------------------------------- 15. Kamera */

.kamera {
  position: relative;
  background: #05070b;
  border-radius: var(--r-3);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kamera > video,
.kamera > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kamera__holat {
  position: absolute;
  left: var(--b-3);
  right: var(--b-3);
  top: var(--b-3);
  display: flex;
  gap: var(--b-2);
  flex-wrap: wrap;
  pointer-events: none;
}

.kamera__yorliq {
  padding: var(--b-1) var(--b-2);
  border-radius: var(--r-dumaloq);
  background: rgba(5, 7, 11, 0.7);
  color: #fff;
  font-size: var(--o-xs);
  font-weight: 650;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.kamera__yorliq--yashil {
  background: rgba(21, 128, 61, 0.9);
}
.kamera__yorliq--sariq {
  background: rgba(180, 83, 9, 0.9);
}
.kamera__yorliq--qizil {
  background: rgba(190, 18, 60, 0.92);
}

.kamera__xabar {
  padding: var(--b-6);
  text-align: center;
  color: #d8dde7;
  font-size: var(--o-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--b-3);
}

/* Olingan rasm ko'rinishi */
.rasm-oyna {
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--fon-2);
  border: 1px solid var(--chiziq);
}

.rasm-oyna img {
  width: 100%;
  height: auto;
}

/* -------------------------------------------------------------- 16. Vaqt chizig'i */

.tarix {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: var(--b-2);
}

.tarix__element {
  position: relative;
  padding: 0 0 var(--b-5) var(--b-6);
  border-left: 2px solid var(--chiziq);
}

.tarix__element:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.tarix__element::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sath);
  border: 2px solid var(--chiziq-quyuq);
}

.tarix__element--yashil::before {
  border-color: var(--yashil);
  background: var(--yashil);
}
.tarix__element--qizil::before {
  border-color: var(--qizil);
  background: var(--qizil);
}
.tarix__element--sariq::before {
  border-color: var(--sariq);
  background: var(--sariq);
}

.tarix__vaqt {
  font-size: var(--o-xs);
  color: var(--matn-3);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- 17. Jadval */

.jadval-oyna {
  overflow-x: auto;
  border: 1px solid var(--chiziq);
  border-radius: var(--r-3);
  background: var(--sath);
  -webkit-overflow-scrolling: touch;
}

.jadval {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--o-sm);
  min-width: 620px;
}

.jadval th,
.jadval td {
  padding: var(--b-3) var(--b-4);
  text-align: left;
  border-bottom: 1px solid var(--chiziq);
  white-space: nowrap;
}

.jadval th {
  font-size: var(--o-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--matn-3);
  background: var(--sath-2);
  position: sticky;
  top: 0;
}

.jadval tbody tr:last-child td {
  border-bottom: 0;
}

.jadval tbody tr {
  cursor: pointer;
  transition: background var(--tez);
}

.jadval tbody tr:hover {
  background: var(--fon-2);
}

/* -------------------------------------------------------------- 18. Sahifalash */

.sahifalash {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--b-3);
  padding: var(--b-4) 0;
}

.sahifalash__matn {
  font-size: var(--o-sm);
  color: var(--matn-2);
  font-variant-numeric: tabular-nums;
}

/* Filtr tasmasi */
.filtrlar {
  display: grid;
  gap: var(--b-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

/* Qo'ng'iroq belgisidagi son */
.qongiroq {
  position: relative;
}

.qongiroq__son {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--r-dumaloq);
  background: var(--qizil);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--sath);
}

/* Kod ko'rsatish (bir martalik) */
.kod-oyna {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--b-3);
  padding: var(--b-5);
  border: 2px dashed var(--brend);
  border-radius: var(--r-3);
  background: var(--brend-yengil);
  text-align: center;
}

.kod-oyna__kod {
  font-family: var(--shrift-raqam);
  font-size: clamp(26px, 8vw, 38px);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brend-matn);
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------------- 19. Kirish ekrani */

.kirish {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--b-6) var(--b-4);
  padding-bottom: calc(var(--b-6) + env(safe-area-inset-bottom));
  gap: var(--b-6);
  background: radial-gradient(
      120% 80% at 50% -10%,
      var(--brend-yengil) 0%,
      transparent 62%
    ),
    var(--fon);
}

.kirish__oyna {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: var(--b-5);
}

.kirish__nishon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--b-3);
  text-align: center;
}

.kirish__belgi {
  width: 62px;
  height: 62px;
  border-radius: var(--r-4);
  background: var(--brend);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: var(--soya-2);
}

.kirish__izoh {
  color: var(--matn-2);
  text-align: center;
  font-size: var(--o-md);
}

/* -------------------------------------------------------------- 20. Kompyuter */

@media (min-width: 900px) {
  :root {
    --tegish: 46px;
  }

  .asosiy {
    padding: var(--b-6);
  }

  .asosiy--nav {
    padding-bottom: var(--b-10);
  }

  .pastnav {
    position: static;
    border-top: 0;
    border-bottom: 1px solid var(--chiziq);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 var(--b-4);
    max-width: var(--kenglik);
    margin: 0 auto;
    width: 100%;
    gap: var(--b-1);
  }

  .pastnav__tugma {
    flex: none;
    flex-direction: row;
    gap: var(--b-2);
    min-height: 48px;
    padding: 0 var(--b-4);
    font-size: var(--o-md);
  }

  .pastnav__tugma[aria-current='page']::before {
    top: auto;
    bottom: 0;
    width: 100%;
    border-radius: var(--r-dumaloq) var(--r-dumaloq) 0 0;
  }

  .pastnav__belgi {
    font-size: 17px;
  }

  .tur--statistika {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  }
}

/* -------------------------------------------------------------- 21. Harakatsiz */

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

  .aylanma,
  .tugma__aylanma {
    animation: aylan 900ms linear infinite !important;
  }
}

/* Chop etish */
@media print {
  .sarlavha,
  .pastnav,
  .xabarlar,
  .tugma {
    display: none !important;
  }
}
