/* ============ Portal: yuqori menyu, bosh sahifa, bo'lim sahifalari ============ */
:root { --head-h: 70px; --p-blue: #1d4ed8; --p-violet: #7c3aed; }
html { scroll-behavior: smooth; }
.pc { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- Yuqori menyu ---------- */
.p-head { position: fixed; inset: 0 0 auto 0; height: var(--head-h); z-index: 60; display: flex; align-items: center; transition: background .25s, box-shadow .25s, color .25s; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line), 0 10px 30px -22px rgba(14, 26, 61, .5); color: var(--ink); }
.p-head.clear { background: transparent; box-shadow: none; backdrop-filter: none; color: #fff; }
.p-head .pc { display: flex; align-items: center; gap: 28px; }
.p-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: inherit; white-space: nowrap; }
.p-brand svg { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 8px 14px rgba(79, 70, 229, .45)); }
.p-brand small { display: block; font-size: 11px; font-weight: 600; opacity: .7; letter-spacing: .03em; margin-top: 1px; }
.p-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.p-nav a { padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: inherit; opacity: .86; transition: background .15s, opacity .15s; white-space: nowrap; }
.p-nav a:hover { opacity: 1; background: rgba(79, 70, 229, .08); }
.p-head.clear .p-nav a:hover { background: rgba(255, 255, 255, .15); }
.p-nav a.on { opacity: 1; background: linear-gradient(90deg, #4f46e5, #7c3aed); color: #fff; box-shadow: 0 10px 22px -12px rgba(79, 70, 229, .9); }
.p-head.clear .p-nav a.on { background: #fff; color: var(--p-blue); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.p-adm { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; border: 1.5px solid var(--line); color: inherit; white-space: nowrap; }
.p-adm svg { width: 16px; height: 16px; }
.p-head.clear .p-adm { border-color: rgba(255, 255, 255, .5); }
.p-adm:hover { background: rgba(79, 70, 229, .08); }
.p-burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: inherit; cursor: pointer; place-items: center; margin-left: auto; }
.p-head.clear .p-burger { border-color: rgba(255, 255, 255, .5); }
.p-burger svg { width: 22px; height: 22px; }
@media (max-width: 1080px) {
  .p-burger { display: grid; }
  .p-adm { display: none; }
  .p-nav { position: fixed; top: var(--head-h); left: 12px; right: 12px; flex-direction: column; align-items: stretch; background: #fff; color: var(--ink); border-radius: 18px; padding: 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); margin: 0; display: none; }
  .p-nav.open { display: flex; }
  .p-nav a { padding: 13px 16px; border-radius: 12px; opacity: 1; }
  .p-head.clear .p-nav a.on { background: linear-gradient(90deg, #4f46e5, #7c3aed); color: #fff; }
  .p-head.clear .p-nav a:hover { background: rgba(79, 70, 229, .08); }
  .p-nav .p-adm-m { display: block; }
}
.p-nav .p-adm-m { display: none; }

/* ---------- Olimpiada tahlili sahifasi (yon panel + yuqori menyu) ---------- */
body.has-top { padding-top: var(--head-h); }
body.has-top .side { top: var(--head-h); height: calc(100vh - var(--head-h)); }
body.has-top .topbar { top: var(--head-h); }
@media (max-width: 960px) { body.has-top .side { top: var(--head-h); bottom: 0; height: auto; } }

/* ---------- Bosh sahifa: hero ---------- */
.p-hero { position: relative; overflow: hidden; color: #fff; padding: calc(var(--head-h) + 46px) 0 150px; background:
  radial-gradient(60% 80% at 85% 20%, rgba(168, 85, 247, .55), transparent 62%),
  radial-gradient(50% 70% at 10% 90%, rgba(34, 211, 238, .35), transparent 60%),
  linear-gradient(135deg, #1e3a8a 0%, #2547c9 45%, #6d28d9 100%); }
.p-hero::before { content: ''; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(255, 255, 255, .22) 1.2px, transparent 1.4px); background-size: 28px 28px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.p-hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.p-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); font-size: 13px; font-weight: 700; backdrop-filter: blur(6px); }
.p-pill i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .3); }
.p-hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; margin: 18px 0 16px; }
.p-hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5f3fc, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-hero p { font-size: 17px; line-height: 1.6; max-width: 560px; color: rgba(255, 255, 255, .88); }
.p-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.p-btn { display: inline-flex; align-items: center; gap: 9px; padding: 14px 24px; border-radius: 14px; font-weight: 800; font-size: 15px; transition: transform .15s, box-shadow .15s; }
.p-btn:hover { transform: translateY(-2px); }
.p-btn svg { width: 18px; height: 18px; }
.p-btn.white { background: #fff; color: var(--p-blue); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .55); }
.p-btn.glass { background: rgba(255, 255, 255, .14); color: #fff; border: 1.5px solid rgba(255, 255, 255, .42); }
.p-btn.glass:hover { background: rgba(255, 255, 255, .24); }
.p-hero-stats { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.p-hero-stats b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.p-hero-stats span { font-size: 13px; opacity: .8; font-weight: 600; }
.p-art { position: relative; }
.p-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 40px 40px rgba(10, 8, 60, .35)); }
.p-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 120px; display: block; }
.fl { animation: fl 6s ease-in-out infinite; }
.fl.d2 { animation-delay: -2s; } .fl.d3 { animation-delay: -4s; }
@keyframes fl { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .fl { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 900px) { .p-hero-in { grid-template-columns: minmax(0, 1fr); } .p-art { max-width: 520px; margin: 0 auto; } .p-hero { padding-bottom: 110px; } }

/* ---------- Bosh sahifa: bo'limlar ---------- */
.p-sec { padding: 8px 0 56px; margin-top: -92px; position: relative; z-index: 2; }
.p-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.p-card { --c: #4f46e5; background: #fff; border-radius: 22px; padding: 24px 22px 22px; box-shadow: 0 22px 44px -26px rgba(30, 27, 75, .55); border: 1px solid rgba(229, 233, 244, .8); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.p-card:hover { transform: translateY(-6px); box-shadow: 0 30px 54px -26px rgba(30, 27, 75, .6); }
.p-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
.p-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #a78bfa)); box-shadow: 0 14px 24px -12px var(--c); position: relative; z-index: 1; }
.p-ic svg { width: 26px; height: 26px; }
.p-card h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; position: relative; z-index: 1; }
.p-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1; position: relative; z-index: 1; }
.p-card .go { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 13.5px; color: var(--c); position: relative; z-index: 1; }
.p-card .go b { background: color-mix(in srgb, var(--c) 12%, #fff); padding: 4px 11px; border-radius: 999px; }
@media (max-width: 1180px) { .p-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .p-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .p-sec { margin-top: -70px; } }
@media (max-width: 520px) { .p-cards { grid-template-columns: minmax(0, 1fr); } .pc { width: calc(100% - 32px); } }

.p-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; padding-bottom: 56px; }
@media (max-width: 960px) { .p-two { grid-template-columns: minmax(0, 1fr); } }
.p-h { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.p-h h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.p-h a { font-weight: 700; font-size: 13.5px; color: var(--brand); display: inline-flex; gap: 6px; align-items: center; }
.ev { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ev:last-child { border-bottom: 0; }
.ev-d { text-align: center; background: var(--brand-soft); color: var(--brand); border-radius: 14px; padding: 8px 0; line-height: 1.1; }
.ev-d b { display: block; font-size: 22px; font-weight: 800; }
.ev-d span { font-size: 11.5px; font-weight: 800; text-transform: uppercase; }
.ev h4 { font-size: 14.5px; font-weight: 700; }
.ev .muted { font-size: 12.5px; }
.kind { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.kind.KRK { background: #dbeafe; color: #1d4ed8; } .kind.KRS { background: #dcfce7; color: #15803d; } .kind.Olimpiada { background: #fef3c7; color: #a16207; }
.top5 { display: grid; gap: 10px; }
.t5 { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.t5 .n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: var(--line-2); }
.t5:nth-child(1) .n { background: #fef3c7; color: #a16207; } .t5:nth-child(2) .n { background: #e2e8f0; color: #475569; } .t5:nth-child(3) .n { background: #fde5d0; color: #9a4a0f; }
.t5 .bar { height: 8px; border-radius: 99px; background: var(--line-2); margin-top: 5px; overflow: hidden; }
.t5 .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4f46e5, #22d3ee); }
.t5 b.num { font-size: 15px; }

.p-band { background: linear-gradient(120deg, #1e3a8a, #6d28d9); color: #fff; border-radius: 26px; padding: 34px 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 56px; position: relative; overflow: hidden; }
.p-band::after { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); }
.p-band b { display: block; font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
.p-band span { font-size: 13.5px; opacity: .82; font-weight: 600; }
@media (max-width: 760px) { .p-band { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 26px 24px; } }

.p-foot { background: #0b1233; color: #a9b4de; padding: 34px 0; font-size: 13.5px; }
.p-foot .pc { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.p-foot a { color: #d3dafc; font-weight: 600; margin-left: 18px; }
.p-foot b { color: #fff; }

/* ---------- Bo'lim sahifalari ---------- */
.p-banner { --c: #4f46e5; color: #fff; padding: calc(var(--head-h) + 34px) 0 92px; position: relative; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #0b1233), color-mix(in srgb, var(--c) 100%, #7c3aed) 130%); }
.p-banner::before { content: ''; position: absolute; inset: 0; opacity: .45; background-image: radial-gradient(rgba(255, 255, 255, .22) 1.2px, transparent 1.4px); background-size: 26px 26px; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.p-banner .pc { position: relative; }
.crumb { font-size: 13px; opacity: .85; font-weight: 600; margin-bottom: 10px; }
.crumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.p-banner h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.025em; display: flex; gap: 14px; align-items: center; }
.p-banner h1 .p-ic { width: 54px; height: 54px; background: rgba(255, 255, 255, .18); box-shadow: none; border: 1px solid rgba(255, 255, 255, .3); }
.p-banner p { max-width: 680px; margin-top: 12px; font-size: 16px; line-height: 1.6; opacity: .9; }
.p-body { margin-top: -58px; position: relative; z-index: 2; padding-bottom: 60px; display: grid; gap: 20px; }
.p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.p-filters .input { max-width: 260px; }
.p-filters .select { max-width: 220px; }
.bdg { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.bdg.ok { background: #dcfce7; color: #166534; } .bdg.warn { background: #fff4d6; color: #7a5200; } .bdg.bad { background: #fee2e2; color: #991b1b; } .bdg.info { background: #e0e7ff; color: #3730a3; }
.k-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .k-grid { grid-template-columns: minmax(0, 1fr); } }
.kc { --c: #2563eb; display: grid; grid-template-columns: 78px minmax(0, 1fr); background: #fff; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid rgba(229, 233, 244, .8); overflow: hidden; }
.kc.past { opacity: .8; }
.kc.KRS { --c: #16a34a; }
.kc-d { background: color-mix(in srgb, var(--c) 11%, #fff); border-right: 4px solid var(--c); display: grid; align-content: center; justify-items: center; padding: 14px 6px; text-align: center; }
.kc-d b { font-size: 30px; font-weight: 800; line-height: 1; }
.kc-d span { font-size: 12.5px; font-weight: 800; text-transform: uppercase; color: var(--c); margin-top: 3px; }
.kc-d em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.kc-b { padding: 16px 18px; min-width: 0; display: grid; gap: 8px; }
.kc-b h4 { font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.kc-m { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.kc-m span { display: inline-flex; gap: 6px; align-items: center; }
.kc-m svg { width: 14px; height: 14px; color: var(--muted); }
.kc-t { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.kc-t.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more-row { text-align: center; margin-top: 16px; }
.sub-s { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.sub-s.warn { color: #b45309; }

.alif-slot .alif-toggle { display: inline-block; width: auto; margin: 0; }

/* ============ KRK / KRS: kunlik statistika sahifasi ============ */
.k-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; }
.k-now { display: flex; align-items: center; gap: 14px; }
.k-now small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.k-now b { font-size: 17px; font-weight: 800; }
.k-pulse { width: 12px; height: 12px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, .6); animation: kp 2s infinite; flex: none; }
@keyframes kp { 70% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
.k-bar-f { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.k-bar-f .select { min-width: 260px; max-width: 100%; }
.kpi .val small { font-size: 16px; }

.k-r { display: grid; gap: 20px; }
.k-r1 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.k-r2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1020px) { .k-r1, .k-r2 { grid-template-columns: minmax(0, 1fr); } }
.k-ch { position: relative; height: 260px; }
.k-ch.tall { height: 310px; }

/* hafta lentasi */
.k-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.k-wd { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 9px 4px 8px; display: grid; justify-items: center; gap: 2px; cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.k-wd:hover { transform: translateY(-2px); border-color: #c7d2fe; }
.k-wd span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.k-wd b { font-size: 19px; font-weight: 800; line-height: 1.1; }
.k-wd i { display: flex; gap: 3px; align-items: center; font-style: normal; min-height: 14px; }
.k-wd i small { font-size: 11px; font-weight: 800; color: var(--muted); margin-left: 2px; }
.k-wd em, .cal-d em { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
em.KRK { background: #2563eb; } em.KRS { background: #16a34a; }
.k-wd.past { background: #f8fafc; }
.k-wd.past b { color: var(--muted); }
.k-wd.is-today { border-color: #f59e0b; background: #fffbeb; }
.k-wd.on { border-color: var(--brand); box-shadow: 0 10px 20px -14px rgba(79, 70, 229, .9); background: var(--brand-soft); }
.k-wd.on.is-today { background: #fff4d6; border-color: #f59e0b; }

/* tadbir qatorlari */
.k-evs { display: grid; gap: 10px; }
.k-ev { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; position: relative; }
.k-ev::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, #2563eb); }
.k-ev.KRK { --c: #2563eb; } .k-ev.KRS { --c: #16a34a; }
.k-ev.today { background: linear-gradient(90deg, #fffbeb, #fff); border-color: #fde68a; }
.k-ev.done { opacity: .78; }
.k-ev-t { width: 52px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.k-ev-b { min-width: 0; }
.k-ev-b b { display: block; font-size: 15px; font-weight: 800; line-height: 1.3; }
.k-ev-b .muted { font-size: 12.5px; margin-top: 2px; }
.k-ev-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.k-ev-r span { display: inline-flex; align-items: center; gap: 5px; }
.k-ev-r svg { width: 14px; height: 14px; color: var(--muted); }
.k-h { background: var(--line-2); padding: 4px 10px; border-radius: 999px; }
.k-evs.compact .k-ev { grid-template-columns: 44px minmax(0, 1fr); padding: 10px 12px; gap: 11px; }
.k-evs.compact .k-ev-t { width: 44px; height: 40px; font-size: 13px; }
.k-evs.compact .k-ev-r { grid-column: 2; justify-content: flex-start; }
.k-evs.compact .k-ev-b b { font-size: 14px; }
@media (max-width: 640px) { .k-ev { grid-template-columns: 44px minmax(0, 1fr); } .k-ev-t { width: 44px; height: 40px; } .k-ev-r { grid-column: 2; justify-content: flex-start; } }
.k-none { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; margin-bottom: 12px; }
.k-none b { display: block; font-size: 15px; font-weight: 800; }
.k-none span { font-size: 13px; }

/* bajarilish */
.k-ring { position: relative; height: 200px; margin: 4px 0 10px; }
.k-ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.k-ring-c b { font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.k-ring-c span { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.k-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 14px; }
.k-legend.sm { justify-content: flex-end; margin: 0; }
.k-legend span { display: inline-flex; align-items: center; gap: 6px; }
.k-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.k-legend i.ring { border: 2px solid #f59e0b; background: #fff; border-radius: 4px; }
.k-pr { margin-top: 12px; font-size: 13.5px; }
.k-bar-t { height: 9px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 7px; }
.k-bar-t i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #34d399); transition: width .5s; }

/* kalendar */
.k-cal { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
@media (max-width: 1020px) { .k-cal { grid-template-columns: minmax(0, 1fr); } }
.cal-ms { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px 20px; }
.cal-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-h { font-size: 10.5px; font-weight: 800; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal-d { position: relative; aspect-ratio: 1; border: 0; border-radius: 8px; font: 700 12px/1 var(--font); color: var(--ink-2); background: transparent; cursor: default; display: grid; place-items: center; padding: 0; }
.cal-d i { position: absolute; bottom: 3px; left: 0; right: 0; display: flex; gap: 2px; justify-content: center; }
.cal-d em { width: 5px; height: 5px; }
.cal-d[title] { cursor: pointer; }
.cal-d.lv1 { background: #e0e7ff; } .cal-d.lv2 { background: #c7d2fe; } .cal-d.lv3 { background: #a5b4fc; color: #1e1b4b; } .cal-d.lv4 { background: #818cf8; color: #fff; }
.cal-d.lv4 em.KRK { background: #fff; } .cal-d.lv4 em.KRS { background: #bbf7d0; }
.cal-d.past.lv1, .cal-d.past.lv2, .cal-d.past.lv3, .cal-d.past.lv4 { filter: saturate(.35); }
.cal-d.past:not([title]) { color: #b6bfd3; }
.cal-d.today { box-shadow: inset 0 0 0 2px #f59e0b; }
.cal-d.sel { outline: 2.5px solid var(--brand); outline-offset: 1px; z-index: 1; }
.cal-d[title]:hover { transform: scale(1.08); }
.cal-p { background: #f8fafc; border: 1px solid var(--line); border-radius: 18px; padding: 16px; position: sticky; top: calc(var(--head-h) + 16px); }
.cal-p-h { display: grid; gap: 4px; justify-items: start; margin-bottom: 12px; }
.cal-p-h small { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cal-p-h b { font-size: 19px; font-weight: 800; }

/* yo'nalishlar matritsasi */
.k-mx { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 980px; }
.k-mx th, .k-mx td { padding: 8px 5px; border-bottom: 1px solid var(--line-2); text-align: center; vertical-align: middle; }
.k-mx thead th { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; position: sticky; top: 0; }
.k-mx tbody th { text-align: left; min-width: 210px; max-width: 250px; padding-left: 4px; position: sticky; left: 0; background: #fff; z-index: 1; }
.k-mx tbody th b { display: block; font-size: 13px; font-weight: 800; line-height: 1.3; }
.k-mx tbody th span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.35; margin-top: 2px; }
.k-mx tbody tr:hover td, .k-mx tbody tr:hover th { background: #fafbff; }
.mx { display: block; margin: 2px auto; width: 46px; padding: 3px 0; border-radius: 7px; font-weight: 800; font-size: 11px; font-variant-numeric: tabular-nums; border: 1.5px solid transparent; }
.mx.KRK { color: #1d4ed8; border-color: #bfdbfe; background: #fff; }
.mx.KRS { color: #15803d; border-color: #bbf7d0; background: #fff; }
.mx.done.KRK { background: #2563eb; border-color: #2563eb; color: #fff; }
.mx.done.KRS { background: #16a34a; border-color: #16a34a; color: #fff; }
.mx.today { background: #f59e0b !important; border-color: #f59e0b !important; color: #fff !important; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.mx-p { min-width: 110px; }
.mx-p .k-bar-t { height: 7px; margin-top: 5px; }

/* ============ Kadrlar salohiyati ============ */
.km-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #ede9fe; color: #7c3aed; flex: none; }
.km-ic svg { width: 22px; height: 22px; }
.km-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .km-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .km-kpis { grid-template-columns: minmax(0, 1fr); } }
button.kpi { border: 0; text-align: left; font-family: inherit; cursor: pointer; display: grid; align-content: space-between; transition: transform .15s, box-shadow .15s; }
button.kpi:hover { transform: translateY(-3px); }
button.kpi:focus-visible { outline: 3px solid rgba(79, 70, 229, .5); outline-offset: 2px; }
.km-k .ft { justify-content: space-between; }
.km-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12px; background: rgba(255, 255, 255, .2); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.km-go svg { width: 12px; height: 12px; }
.kpi.k6 { background: linear-gradient(135deg, #1d4ed8, #60a5fa); --kpi-shadow: rgba(29, 78, 216, .7); }
.kpi.k7 { background: linear-gradient(135deg, #475569, #94a3b8); --kpi-shadow: rgba(71, 85, 105, .6); }
.kpi.k8 { background: linear-gradient(135deg, #b45309, #f59e0b); --kpi-shadow: rgba(180, 83, 9, .6); }
.kpi.k5 { background: linear-gradient(135deg, #6d28d9, #a78bfa); --kpi-shadow: rgba(109, 40, 217, .7); }
.km-r3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1080px) { .km-r3 { grid-template-columns: minmax(0, 1fr); } }
.km-ch-subj, .km-ch-qt { position: relative; }
.km-tbl td, .km-tbl th { padding: 9px 10px; }
.km-tbl td.c, .km-tbl th.c { text-align: center; }
.km-dim td { background: #f8fafc; color: var(--muted); }
.km-n { min-width: 40px; padding: 4px 9px; border-radius: 9px; border: 1px solid transparent; background: var(--line-2); font: 800 13px/1.2 var(--font); color: var(--ink); cursor: pointer; transition: background .12s, border-color .12s, transform .12s; font-variant-numeric: tabular-nums; }
.km-n:hover { transform: translateY(-1px); border-color: #c7d2fe; background: var(--brand-soft); color: var(--brand); }
.km-n.b { background: #ede9fe; color: #5b21b6; }
.km-n.w { background: #fff4d6; color: #92400e; }
.km-n.g { background: #dcfce7; color: #166534; }
.km-share { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.km-share .k-bar-t { flex: 1; margin: 0; }
.km-share b { font-size: 12.5px; min-width: 42px; text-align: right; }
.km-t { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); white-space: nowrap; }
.km-qt { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .km-qt { grid-template-columns: minmax(0, 1fr); } }
.km-qt-s { display: grid; gap: 10px; }
.km-mini { display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid #bbf7d0; background: linear-gradient(135deg, #ecfdf5, #fff); font-family: inherit; cursor: pointer; color: var(--ink); transition: transform .15s; }
button.km-mini:hover { transform: translateY(-2px); }
.km-mini b { font-size: 26px; font-weight: 800; color: #047857; line-height: 1.1; }
.km-mini span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.km-mini.g { border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff, #fff); } .km-mini.g b { color: #1d4ed8; }
.km-mini.w { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff); } .km-mini.w b { color: #b45309; }
.km-mini.s { border-color: var(--line); background: #f8fafc; cursor: default; } .km-mini.s b { color: var(--ink); }
/* ro'yxat oynasi */
.km-bg { position: fixed; inset: 0; background: rgba(11, 18, 51, .55); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: kmf .15s ease-out; }
@keyframes kmf { from { opacity: 0; } }
.km { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); width: min(1100px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 22px 24px; }
.km-h { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 14px; }
.km-h h3 { font-size: 19px; font-weight: 800; }
.km-x { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; flex: none; }
.km-x:hover { background: var(--line-2); }
.km-b { overflow: auto; flex: 1; min-height: 0; border: 1px solid var(--line-2); border-radius: 14px; }
.km-b thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
.km-b td.c { text-align: center; }

/* ============ Malaka oshirish ============ */
.ml-bar { display: grid; gap: 14px; padding: 16px 20px; }
.ml-years { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ml-lbl { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ml-months { display: grid; grid-template-columns: 1.6fr repeat(12, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 900px) { .ml-months { grid-template-columns: repeat(7, minmax(0, 1fr)); } .ml-m.all { grid-column: span 7; } }
.ml-m { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 4px; display: grid; justify-items: center; gap: 1px; font-family: inherit; cursor: pointer; color: var(--ink); transition: transform .15s, border-color .15s; }
.ml-m b { font-size: 13px; font-weight: 800; }
.ml-m span { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ml-m.ok { background: #ecfdf5; border-color: #a7f3d0; }
.ml-m.ok span { color: #047857; }
.ml-m.empty { background: #f8fafc; border-style: dashed; cursor: not-allowed; opacity: .75; }
.ml-m:not(:disabled):hover { transform: translateY(-2px); }
.ml-m.on { border-color: #059669; background: #059669; box-shadow: 0 10px 20px -12px rgba(5, 150, 105, .9); }
.ml-m.on b, .ml-m.on span { color: #fff; }
.ml-m.all { grid-auto-flow: column; gap: 8px; align-items: center; justify-content: center; }
.ml-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 20px; align-items: center; padding: 16px 20px; }
@media (max-width: 760px) { .ml-cover { grid-template-columns: minmax(0, 1fr); } }
.ml-cover > div:first-child { display: grid; gap: 3px; }
.ml-cover-b { display: flex; align-items: center; gap: 12px; }
.ml-cover-b .k-bar-t { flex: 1; margin: 0; height: 12px; }
.ml-cover-b .k-bar-t i { background: linear-gradient(90deg, #059669, #34d399); }
.ml-cover-b b { white-space: nowrap; font-size: 14px; }
.ml-top { display: grid; gap: 6px; margin-top: 12px; }
.ml-top > b { font-size: 13px; margin-bottom: 2px; }
.ml-top-r { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.ml-top-r:hover { border-color: #a7f3d0; background: #f0fdf4; }
.ml-rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #ecfdf5; color: #047857; font-size: 12px; font-weight: 800; }
.ml-hm td.hm { background: rgba(5, 150, 105, var(--h, 0)); }
.ml-hm td.hm .km-n { background: rgba(255, 255, 255, .85); }
.ml-hm th, .ml-hm td { padding: 7px 6px; }
.ml-hm tfoot th { background: #f8fafc; border-top: 2px solid var(--line); }
.ml-stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; min-width: 120px; background: var(--line-2); }
.ml-stack i { display: block; height: 100%; }
