/* ═════════════════════════════════════════════════════════════════
   Dars jadvali (/schedule) — sayt dizayniga mos (asosiy rang #012340, oltin #c9a860)
   Mobile-first: 320px asos; 640 / 1024 / 1440 breakpointlar.
   Katta monitorlar: butun sayt site.css'dagi `zoom` bilan kattalashadi.
   ═════════════════════════════════════════════════════════════════ */
.sch {
  --s-navy: #012340;
  --s-navy-2: #0b2f55;
  --s-navy-3: #1a3a6e;
  --s-navy-50: #eef2f8;
  --s-gold: #c9a860;
  --s-gold-d: #9a7a32;
  --s-gold-50: #faf4e6;
  --s-text: #14213d;
  --s-muted: #5b6b82;
  --s-line: #e3e8ef;
  --s-bg: #f6f8fb;
  --s-card: #ffffff;
  --s-now: #0e7a4d;
  --s-now-50: #e7f6ef;
  --s-next: #b7791f;
  --s-next-50: #fdf3e1;
  --t-lecture: #2563eb;  --t-lecture-50: #e8efff;
  --t-practical: #16a34a; --t-practical-50: #e6f6ec;
  --t-lab: #7c3aed;      --t-lab-50: #f1eafe;
  --t-seminar: #d97706;  --t-seminar-50: #fdf1dc;
  --t-other: #64748b;    --t-other-50: #eef1f5;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --sh-1: 0 1px 2px rgba(1, 35, 64, .05), 0 6px 18px rgba(1, 35, 64, .06);
  --sh-2: 0 14px 34px rgba(1, 35, 64, .14);
  --tap: 44px;
  background: var(--s-bg);
  color: var(--s-text);
  font-size: 16px;
  padding: 16px 0 48px;
}
.sch *, .sch *::before, .sch *::after { box-sizing: border-box; }
.sch-wrap { max-width: 1320px; margin: 0 auto; padding: 0 12px; display: flex; flex-direction: column; gap: 14px; }
.sch .num { font-variant-numeric: tabular-nums; }
.sch svg { flex: none; }
.sch button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sch [hidden] { display: none !important; }
.sch button:focus-visible, .sch select:focus-visible, .sch input:focus-visible, .sch a:focus-visible { outline: 3px solid rgba(201, 168, 96, .7); outline-offset: 2px; }

/* Mashg'ulot turi ranglari */
.sch [data-type="11"] { --tc: var(--t-lecture); --tc-50: var(--t-lecture-50); }
.sch [data-type="13"] { --tc: var(--t-practical); --tc-50: var(--t-practical-50); }
.sch [data-type="12"] { --tc: var(--t-lab); --tc-50: var(--t-lab-50); }
.sch [data-type="14"] { --tc: var(--t-seminar); --tc-50: var(--t-seminar-50); }

/* ── 1. Sarlavha (navy) ─────────────────────────────────────────── */
.sch-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 100% 0, rgba(201, 168, 96, .22), transparent 45%), linear-gradient(135deg, #0a2b55 0%, var(--s-navy-3) 55%, #102f5c 100%);
  border-radius: 20px; padding: 18px 16px 16px; box-shadow: var(--sh-2);
  display: flex; flex-direction: column; gap: 14px;
}
.sch-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 28px 28px;
}
.sch-hero > * { position: relative; }
.sch-hero-top { display: flex; flex-direction: column; gap: 12px; }
.sch-crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #b9c8de; margin-bottom: 6px; }
.sch-crumbs a { color: var(--s-gold); text-decoration: none; }
.sch-crumbs a:hover { text-decoration: underline; }
.sch-title { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.sch-sub { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: #c9d6ec; max-width: 62ch; }
.sch-info { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sch-chip-info {
  display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #dbe5f4; font-size: 12.5px; font-weight: 600;
}
.sch-chip-info.is-warn { background: rgba(214, 69, 69, .2); border-color: rgba(255, 140, 140, .45); color: #ffe1e1; }
.sch-clock {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
}
.sch-clock-time { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: .01em; }
.sch-clock-sec { font-size: .5em; color: var(--s-gold); margin-left: 2px; }
.sch-clock-date { font-size: 14px; font-weight: 700; color: #e6edf8; }
.sch-clock-tz { font-size: 12px; color: #9fb4d0; width: 100%; }

.sch-now {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
}
.sch-now:empty { display: none; }
.sch-now-ico { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; }
.sch-now-ico svg { width: 22px; height: 22px; }
.sch-now.is-now .sch-now-ico { background: #12a06a; box-shadow: 0 0 0 6px rgba(18, 160, 106, .2); }
.sch-now.is-now .sch-now-ico svg { animation: sch-pulse 1.8s ease-in-out infinite; }
.sch-now.is-break .sch-now-ico { background: rgba(201, 168, 96, .9); color: var(--s-navy); }
.sch-now-label { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--s-gold); }
.sch-now.is-now .sch-now-label { color: #6ee7b7; }
.sch-now-title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.sch-now-sub { font-size: 13px; color: #c9d6ec; margin-top: 2px; }
.sch-now-left { grid-column: 2; font-size: 13.5px; color: #dbe5f4; }
.sch-now-left strong { color: #fff; font-size: 15px; }
.sch-now .sch-bar { grid-column: 1 / -1; margin-top: 8px; background: rgba(255, 255, 255, .14); }
.sch-now .sch-bar i { background: linear-gradient(90deg, var(--s-gold), #f1d48c); }
.sch-now.is-now .sch-bar i { background: linear-gradient(90deg, #12a06a, #6ee7b7); }
@keyframes sch-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.sch-pairs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
.sch-pair-name em { font-style: normal; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 5px; background: rgba(201, 168, 96, .25); color: #f1d48c; text-transform: uppercase; letter-spacing: .04em; }
.sch-pair.is-evening .sch-pair-bar { background: rgba(201, 168, 96, .18); }
.sch-pairs-note { margin: -4px 0 0; font-size: 12px; color: #9fb4d0; }
.sch-pairs-note:empty { display: none; }
.sch-pairs:empty { display: none; }
.sch-pair { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sch-pair-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.sch-pair-bar i { display: block; height: 100%; background: var(--s-gold); border-radius: inherit; }
.sch-pair.is-now .sch-pair-bar i { background: #34d399; }
.sch-pair-name { font-size: 12px; font-weight: 800; color: #fff; }
.sch-pair-time { font-size: 11.5px; color: #9fb4d0; }
.sch-pair.is-empty { opacity: .45; }
.sch-pair.is-now .sch-pair-name { color: #6ee7b7; }

/* ── Umumiy panel ───────────────────────────────────────────────── */
.sch-panel { background: var(--s-card); border: 1px solid var(--s-line); border-radius: var(--r-lg); padding: 16px 14px; box-shadow: var(--sh-1); }
.sch-panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sch-panel-head--split { flex-direction: column; align-items: stretch; }
.sch-panel-head-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sch-panel-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--s-navy-50); color: var(--s-navy-3); flex: none; }
.sch-panel-ico svg { width: 22px; height: 22px; }
.sch-panel-ico--gold { background: var(--s-gold-50); color: var(--s-gold-d); }
.sch-panel-title { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 800; color: var(--s-navy); }
.sch-panel-sub { margin: 3px 0 0; font-size: 13.5px; color: var(--s-muted); line-height: 1.4; }

/* Segmentli tugmalar */
.sch-seg { display: flex; padding: 4px; gap: 4px; background: var(--s-navy-50); border-radius: 14px; }
.sch-seg > button {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  font-size: 14px; font-weight: 700; color: var(--s-muted); white-space: nowrap;
}
.sch-seg > button svg { width: 18px; height: 18px; }
.sch-seg > button b { min-width: 24px; padding: 1px 7px; border-radius: 99px; background: rgba(1, 35, 64, .08); font-size: 12px; font-variant-numeric: tabular-nums; }
.sch-seg > button[aria-selected="true"], .sch-seg > button[aria-pressed="true"] { background: #fff; color: var(--s-navy); box-shadow: 0 1px 2px rgba(1, 35, 64, .1), 0 4px 10px rgba(1, 35, 64, .08); }
.sch-seg > button[aria-selected="true"] b { background: var(--s-navy); color: #fff; }
.sch-seg--sm > button { min-height: 34px; font-size: 13px; padding: 0 12px; }

/* Qidiruv va select */
.sch-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sch-search { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.sch-search svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--s-muted); pointer-events: none; }
.sch-search input {
  width: 100%; height: var(--tap); padding: 0 12px 0 40px; border: 1px solid var(--s-line); border-radius: 12px;
  background: #fff; color: var(--s-text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none;
}
.sch-search input:focus { border-color: var(--s-navy-3); outline: none; box-shadow: 0 0 0 3px rgba(26, 58, 110, .12); }
.sch-select {
  height: var(--tap); padding: 0 36px 0 12px; border: 1px solid var(--s-line); border-radius: 12px; max-width: 100%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23012340' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--s-text); font: inherit; font-size: 15px; font-weight: 600; -webkit-appearance: none; appearance: none; cursor: pointer;
}

/* ── 2. Jadvalingizni toping ────────────────────────────────────── */
.sch-find { border-top: 3px solid var(--s-gold); }
.sch-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sch-role {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 64px; padding: 8px 4px; border: 1.5px solid var(--s-line); border-radius: 14px; background: #fff;
  font-size: 13.5px; font-weight: 700; color: var(--s-muted); text-align: center; line-height: 1.2;
  transition: border-color .15s, background .15s, color .15s;
}
.sch-role svg { width: 22px; height: 22px; }
.sch-role:hover { border-color: #c9d3e0; color: var(--s-navy); }
.sch .sch-role[aria-selected="true"] { border-color: var(--s-navy); background: var(--s-navy); color: #fff; box-shadow: 0 6px 16px rgba(1, 35, 64, .2); }

.sch-saved { margin-bottom: 12px; }
.sch-saved-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; max-width: 100%;
  border: 1px solid #ecd9a6; border-radius: 12px; background: var(--s-gold-50); color: var(--s-navy); font-size: 14.5px;
}
.sch-saved-btn svg { width: 18px; height: 18px; color: var(--s-gold-d); fill: var(--s-gold); }
.sch-saved-btn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sch-pick-list { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px 2px; }
.sch-pgroup + .sch-pgroup { margin-top: 14px; }
.sch-pgroup-title, .sch-rgroup-title {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; background: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--s-muted);
}
.sch-pgroup-title b, .sch-rgroup-title b { color: var(--s-gold-d); letter-spacing: 0; }
.sch-pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.sch-pchip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--s-line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 700; color: var(--s-navy);
  transition: border-color .15s, background .15s, transform .15s;
}
.sch-pchip small { font-weight: 600; color: var(--s-muted); font-size: 12px; }
.sch-pchip:hover { border-color: var(--s-navy-3); background: var(--s-navy-50); }
.sch-pchip:active { transform: scale(.97); }
.sch-pchip.is-busy::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #12a06a; box-shadow: 0 0 0 3px rgba(18, 160, 106, .18); }

/* Xona tab: bo'sh (yashil) / band (kulrang) */
.sch-hint { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--s-navy-50); font-size: 13.5px; line-height: 1.45; color: var(--s-muted); }
.sch-pgroup-title.is-free { color: #0e7a4d; }
.sch-pchip.is-free { border-color: #bfe5cf; background: #f1faf5; color: #063d26; }
.sch-pchip.is-free::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.sch-pchip.is-free:hover { border-color: #16a34a; background: #e6f6ec; }
.sch-pchip.is-taken { border-color: #f5c2c2; background: #fdf0f0; color: #9b1c1c; }
.sch-pchip.is-taken::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
.sch-pchip.is-taken small { color: #b45454; }
.sch-pchip.is-taken:hover { border-color: #dc2626; background: #fde4e4; }
.sch-pgroup-title.is-busy { color: #b91c1c; }
.sch-pchip.is-taken small { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-gofree { margin-top: 14px; width: 100%; min-height: var(--tap); border-color: #bfe5cf; background: #f1faf5; color: #0b5a39; white-space: normal; text-align: left; }
.sch-gofree:hover:not(:disabled) { border-color: #16a34a; background: #e6f6ec; }
button.sch-stat { width: 100%; font: inherit; text-align: left; cursor: pointer; }
button.sch-stat:hover { border-color: #16a34a; box-shadow: 0 6px 18px rgba(22, 163, 74, .14); }
/* Xona ochilganda: juftliklar bo'yicha bo'sh / band */
.sch-rstate { margin-bottom: 14px; }
.sch-rstate-title { font-size: 13px; font-weight: 800; color: var(--s-navy); margin-bottom: 8px; }
.sch-rstate-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sch-rslot { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 12px; border: 1px solid; min-width: 0; line-height: 1.25; }
.sch-rslot b { font-size: 13px; }
.sch-rslot span { font-size: 11.5px; opacity: .8; }
.sch-rslot em { font-style: normal; font-size: 12.5px; font-weight: 800; margin-top: 3px; }
.sch-rslot small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-rslot.is-free { border-color: #bfe5cf; background: #f1faf5; color: #0b5a39; }
.sch-rslot.is-busy { border-color: #f5c2c2; background: #fdf0f0; color: #9b1c1c; }
@media (min-width: 640px) { .sch-rstate-row { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); } }

/* Tanlangan guruh / o'qituvchi / xona */
.sch-ent-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sch-ent-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--s-navy); color: #fff; flex: none; }
.sch-ent-ico svg { width: 26px; height: 26px; }
.sch-ent-id { flex: 1 1 160px; min-width: 0; }
.sch-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--s-gold-d); }
.sch-ent-name { margin: 2px 0 0; font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--s-navy); overflow-wrap: anywhere; }
.sch-ent-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; font-size: 13px; color: var(--s-muted); }
.sch-ent-meta i { font-style: normal; color: #b6c1d1; }
.sch-ent-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--s-line); border-radius: 11px; background: #fff; font-size: 13.5px; font-weight: 700; color: var(--s-navy); white-space: nowrap;
}
.sch-btn svg { width: 17px; height: 17px; }
.sch-btn:hover:not(:disabled) { border-color: #c2cddc; background: var(--s-navy-50); }
.sch-btn:disabled { opacity: .35; cursor: default; }
.sch-btn--icon { width: 40px; padding: 0; }
.sch-btn.is-on { border-color: #ecd9a6; background: var(--s-gold-50); }
.sch-btn.is-on svg { fill: var(--s-gold); color: var(--s-gold-d); }

.sch-ent-next {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 12px;
  background: var(--s-next-50); border: 1px solid #f3dcb0; color: #6b4a12; font-size: 14px; line-height: 1.45;
}
.sch-ent-next svg { width: 18px; height: 18px; margin-top: 2px; color: var(--s-next); }
.sch-ent-next b { color: #4a330b; }
.sch-ent-next.is-now { background: var(--s-now-50); border-color: #b9e6d0; color: #0b5a39; }
.sch-ent-next.is-now svg { color: var(--s-now); animation: sch-pulse 1.8s ease-in-out infinite; }
.sch-ent-next.is-now b { color: #063d26; }

.sch-ent-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 12px; padding: 10px 0; border-top: 1px solid var(--s-line); border-bottom: 1px solid var(--s-line); }
.sch-weeknav { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.sch-weeknav-title { display: flex; flex-direction: column; align-items: center; min-width: 120px; flex: 1 1 auto; text-align: center; line-height: 1.3; }
.sch-weeknav-title b { font-size: 15px; color: var(--s-navy); }
.sch-weeknav-title span { font-size: 12.5px; color: var(--s-muted); }
.sch-ent-sum { font-size: 13px; font-weight: 700; color: var(--s-muted); }
.sch-ent-bar .sch-seg { margin-left: auto; }

.sch-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(42px, 1fr)); gap: 6px; margin-bottom: 14px; }
.sch-dpill {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 8px; min-height: 62px;
  border: 1px solid var(--s-line); border-radius: 12px; background: #fff; color: var(--s-navy);
}
.sch-dpill small { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--s-muted); }
.sch-dpill b { font-size: 19px; line-height: 1.15; }
.sch-dots { display: flex; gap: 3px; height: 5px; }
.sch-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--s-gold); }
.sch-dpill.is-empty { color: #9aa8bb; }
.sch-dpill.is-today { border-color: var(--s-gold); }
.sch .sch-dpill[aria-selected="true"] { background: var(--s-navy); border-color: var(--s-navy); color: #fff; box-shadow: 0 6px 14px rgba(1, 35, 64, .22); }
.sch .sch-dpill[aria-selected="true"] small { color: #c9d6ec; }

.sch-dlist-title { font-size: 14px; font-weight: 800; color: var(--s-navy); margin: 0 0 10px; }
.sch-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; }
.sch-row + .sch-row { margin-top: 10px; }
.sch-row-time { display: flex; flex-direction: column; align-items: flex-end; padding-top: 10px; line-height: 1.2; }
.sch-row-time b { font-size: 16px; color: var(--s-navy); }
.sch-row-time span { font-size: 12.5px; color: var(--s-muted); }
.sch-row-time small { margin-top: 5px; padding: 2px 6px; border-radius: 6px; background: var(--s-navy-50); font-size: 10.5px; font-weight: 700; color: var(--s-muted); white-space: nowrap; }
.sch-row-card {
  min-width: 0; padding: 11px 13px; border: 1px solid var(--s-line); border-left: 4px solid var(--tc, var(--t-other)); border-radius: 12px; background: #fff;
}
.sch-row.is-past { opacity: .55; }
.sch-row.is-now .sch-row-card { border-color: #9fdcc0; border-left-color: var(--s-now); background: linear-gradient(180deg, #f3fbf7, #fff); box-shadow: 0 6px 18px rgba(14, 122, 77, .12); }
.sch-row.is-next .sch-row-card { border-color: #f0d6a4; border-left-color: var(--s-next); }
.sch-row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.sch-row .sch-subject { margin: 0 0 6px; }
.sch-row .sch-bar { margin-top: 8px; }
.sch-row-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sch-dep { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--s-muted); min-height: 28px; }
.sch-dep svg { width: 14px; height: 14px; }
.sch-with { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--s-line); font-size: 12.5px; color: var(--s-muted); }
.sch-with svg { width: 15px; height: 15px; }
.sch-state { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.sch-state.is-now { background: var(--s-now); color: #fff; }
.sch-state.is-now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: sch-pulse 1.4s infinite; }
.sch-state.is-next { background: var(--s-next-50); color: #8a5a0f; }

.sch-wday + .sch-wday { margin-top: 16px; }
.sch-wday-head { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--s-navy-50); font-size: 14px; font-weight: 800; color: var(--s-navy); }
.sch-wday-head span:last-child { font-weight: 700; color: var(--s-muted); font-size: 13px; }
.sch-wday.is-today .sch-wday-head { background: var(--s-navy); color: #fff; }
.sch-wday.is-today .sch-wday-head span:last-child { color: #c9d6ec; }
.sch-wday-empty { margin: 0 0 0 12px; font-size: 13.5px; color: var(--s-muted); }

/* ── 3. Raqamlar ────────────────────────────────────────────────── */
.sch-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sch-stats:empty { display: none; }
.sch-stat { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--s-line); border-radius: 16px; background: #fff; box-shadow: var(--sh-1); min-width: 0; }
.sch-stat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.sch-stat-ico svg { width: 21px; height: 21px; }
.sch-stat--blue .sch-stat-ico { background: #e8efff; color: #2563eb; }
.sch-stat--violet .sch-stat-ico { background: #f1eafe; color: #7c3aed; }
.sch-stat--green .sch-stat-ico { background: #e6f6ec; color: #16a34a; }
.sch-stat--gold .sch-stat-ico { background: var(--s-gold-50); color: var(--s-gold-d); }
.sch-stat-num { font-size: 22px; line-height: 1.1; font-weight: 800; color: var(--s-navy); }
.sch-stat-num small { font-size: 14px; color: var(--s-muted); font-weight: 700; }
.sch-stat-label { font-size: 12.5px; line-height: 1.3; color: var(--s-muted); font-weight: 600; }

/* ── 4. Juftlik paneli ──────────────────────────────────────────── */
.sch-slotpick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sch-pairpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sch-pp.is-evening:not(.is-on) { background: #fbf7ee; border-color: #ecd9a6; }
.sch-pp {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 46px; padding: 4px 2px;
  border: 1px solid var(--s-line); border-radius: 11px; background: #fff; color: var(--s-navy);
}
.sch-pp b { font-size: 15px; line-height: 1.1; }
.sch-pp span { font-size: 11px; color: var(--s-muted); }
.sch-pp.is-empty { color: #9aa8bb; background: #fafbfd; }
.sch-pp.is-live::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #12a06a; box-shadow: 0 0 0 3px rgba(18, 160, 106, .2); }
.sch-pp.is-on { background: var(--s-navy); border-color: var(--s-navy); color: #fff; }
.sch-pp.is-on span { color: #c9d6ec; }
.sch-facs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.sch-facs::-webkit-scrollbar { display: none; }
.sch-facs:empty { display: none; }
.sch-fchip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--s-line); border-radius: 99px; background: #fff; font-size: 13px; font-weight: 700; color: var(--s-muted); white-space: nowrap;
}
.sch-fchip b { font-size: 11.5px; padding: 1px 6px; border-radius: 99px; background: var(--s-navy-50); color: var(--s-navy); }
.sch-fchip.is-on { background: var(--s-navy); border-color: var(--s-navy); color: #fff; }
.sch-fchip.is-on b { background: rgba(255, 255, 255, .18); color: #fff; }

.sch-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sch-card {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 13px;
  border: 1px solid var(--s-line); border-left: 4px solid var(--tc, var(--t-other)); border-radius: 14px; background: #fff;
  transition: box-shadow .15s;
}
.sch-card:hover { box-shadow: var(--sh-1); }
.sch-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sch-gchips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.sch-gchip {
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 9px; border: 0; border-radius: 8px;
  background: var(--s-navy-50); color: var(--s-navy); font-size: 12.5px; font-weight: 800; text-align: left;
}
.sch-gchip:hover { background: var(--s-navy); color: #fff; }
.sch-roomb {
  display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 28px; padding: 2px 9px; border: 1px solid #ecd9a6; border-radius: 8px;
  background: var(--s-gold-50); color: #6b4a12; font-size: 12.5px; font-weight: 800; white-space: nowrap;
}
.sch-roomb svg { width: 14px; height: 14px; }
.sch-roomb:hover { background: var(--s-gold); color: var(--s-navy); }
.sch-subject { font-size: 15.5px; line-height: 1.35; font-weight: 800; color: var(--s-text); overflow-wrap: anywhere; }
.sch-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; }
.sch-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 1px 8px; border-radius: 6px; background: var(--tc-50, var(--t-other-50)); color: var(--tc, var(--t-other)); font-size: 12px; font-weight: 800; }
.sch-person {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0; border: 0; background: none;
  font-size: 13px; font-weight: 600; color: var(--s-muted); text-align: left;
}
.sch-person svg { width: 15px; height: 15px; }
.sch-person:hover { color: var(--s-navy); text-decoration: underline; }
.sch-bar { height: 5px; border-radius: 99px; background: var(--s-navy-50); overflow: hidden; }
.sch-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--s-now), #34d399); }

.sch-rgroup + .sch-rgroup { margin-top: 14px; }
.sch-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.sch-room {
  display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 8px 10px; text-align: left;
  border: 1px solid #bfe5cf; border-radius: 12px; background: #f1faf5; color: #0b5a39;
}
.sch-room svg { width: 18px; height: 18px; color: #16a34a; }
.sch-room b { display: block; font-size: 14.5px; color: #063d26; }
.sch-room small { display: block; font-size: 12px; color: #3f7a5c; }
button.sch-room:hover { border-color: #16a34a; box-shadow: 0 4px 12px rgba(22, 163, 74, .12); }

.sch-empty { padding: 26px 16px; border: 1px dashed #cfd8e4; border-radius: 14px; background: #fafbfd; color: var(--s-muted); text-align: center; font-size: 14.5px; }
.sch-empty--sm { padding: 18px 12px; }

.sch-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sch-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--s-muted); }
.sch-legend-title { font-weight: 700; }
.sch-link, .sch-tv-exit { font-size: 13.5px; font-weight: 700; color: var(--s-navy-3); text-decoration: none; }
.sch-link:hover { text-decoration: underline; }
.sch-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 11px 16px; border-radius: 12px; background: var(--s-navy); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sh-2);
}

/* ── Planshet ───────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .sch { padding-top: 24px; }
  .sch-wrap { padding: 0 20px; gap: 18px; }
  .sch-hero { padding: 24px; }
  .sch-hero-top { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 20px; }
  .sch-clock { flex-direction: column; align-items: flex-end; gap: 4px; padding: 14px 18px; flex: none; text-align: right; }
  .sch-clock-time { font-size: 44px; }
  .sch-clock-tz { width: auto; }
  .sch-title { font-size: 30px; }
  .sch-now { grid-template-columns: auto 1fr auto; padding: 14px 18px; }
  .sch-now-ico { grid-row: auto; }
  .sch-now-left { grid-column: auto; text-align: right; }
  .sch-pairs { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
  .sch-panel { padding: 20px; }
  .sch-panel-title { font-size: 21px; }
  .sch-panel-head--split { flex-direction: row; align-items: center; justify-content: space-between; }
  .sch-panel-head--split .sch-seg { flex: none; }
  .sch-roles { display: flex; }
  .sch-role { flex-direction: row; flex: 1 1 0; min-height: 50px; gap: 8px; font-size: 15px; }
  .sch-tools { flex-direction: row; align-items: center; }
  .sch-tools .sch-select { flex: 0 1 280px; }
  .sch-facs { margin: 0; padding: 0; flex: 0 1 auto; }
  .sch-slotpick { flex-direction: row; align-items: center; }
  .sch-slotpick .sch-select { flex: 0 0 240px; }
  .sch-pairpick { flex: 1 1 auto; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
  .sch-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sch-ent-name { font-size: 26px; }
  .sch-weeknav { flex: 0 1 auto; }
  .sch-row { grid-template-columns: 70px minmax(0, 1fr); gap: 14px; }
  .sch-row-time b { font-size: 18px; }
  .sch-days { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
}
@media (max-width: 639px) {
  .sch-hide-sm { display: none !important; }
  .sch-clock { padding: 0; background: none; border: 0; gap: 2px 10px; }
  .sch-clock-tz { display: none; }
  .sch-info { margin-top: 8px; }
  .sch-pick-list { max-height: 55vh; }
  .sch-sub { display: none; }
  .sch-ent-actions .sch-btn span { display: none; }
  .sch-ent-actions .sch-btn { width: 40px; padding: 0; }
  .sch-ent-id { flex-basis: calc(100% - 64px); }
  .sch-ent-actions { width: 100%; justify-content: flex-end; margin-top: -4px; }
}
@media (max-width: 379px) {
  .sch-seg > button span { display: none; }
  .sch-pp span { display: none; }
  .sch-pp { min-height: 40px; }
}

/* ── Desktop ────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .sch-wrap { padding: 0 24px; }
  .sch-hero { padding: 28px 30px 24px; }
  .sch-title { font-size: 34px; }
  .sch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sch-pick-list { max-height: 360px; }
}
@media (min-width: 1440px) {
  .sch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sch *, .sch *::before, .sch *::after { animation: none !important; transition: none !important; }
}

/* ── Chop etish: faqat tanlangan haftalik jadval ────────────────── */
@media print {
  .sh, .site-footer, .footer-accent, .aioa-widget-wrapper, #global-loader,
  .sch-hero, .sch-stats, .sch-live, .sch-foot, .sch-ent-actions, .sch-ent-next, .sch-days, .sch-seg, .sch-weeknav .sch-btn { display: none !important; }
  .sch { background: #fff; padding: 0; }
  .sch-panel { border: 0; box-shadow: none; padding: 0; }
  .sch-row { break-inside: avoid; }
  .sch-row.is-past { opacity: 1; }
}

/* ── TV rejimi (/schedule?mode=tv): to'q fon, katta shrift, header/footer yashirin ── */
html.sch-tv-mode .sh, html.sch-tv-mode .site-footer, html.sch-tv-mode .footer-accent,
html.sch-tv-mode .aioa-widget-wrapper, html.sch-tv-mode #global-loader { display: none !important; }
html.sch-tv-mode body { background: #011a30 !important; }
.sch--tv {
  --s-card: #0b2f55; --s-text: #eaf1fb; --s-muted: #9fb4d0; --s-line: rgba(255, 255, 255, .12); --s-navy: #fff; --s-navy-50: rgba(255, 255, 255, .08);
  background: #011a30; min-height: 100vh; padding: 2vh 0 3vh; font-size: clamp(18px, 1.15vw, 40px);
}
.sch--tv .sch-wrap { max-width: none; padding: 0 2.5vw; gap: 1.6vh; }
.sch--tv .sch-hero { border-radius: 1em; padding: 1.2em 1.5em; }
.sch--tv .sch-title { font-size: 2em; }
.sch--tv .sch-sub { display: none; }
.sch--tv .sch-clock-time { font-size: 3.2em; color: var(--s-gold); }
.sch--tv .sch-clock-sec { color: #fff; }
.sch--tv .sch-clock-date, .sch--tv .sch-now-title { font-size: 1.1em; }
.sch--tv .sch-chip-info, .sch--tv .sch-now-sub, .sch--tv .sch-now-left, .sch--tv .sch-pair-name, .sch--tv .sch-pair-time, .sch--tv .sch-clock-tz { font-size: .75em; }
.sch--tv .sch-stat, .sch--tv .sch-panel { background: #0b2f55; border-color: rgba(255, 255, 255, .1); box-shadow: none; }
.sch--tv .sch-stat-num { font-size: 1.5em; color: #fff; }
.sch--tv .sch-stat-label { font-size: .7em; }
.sch--tv .sch-panel-title { font-size: 1.3em; color: #fff; }
.sch--tv .sch-panel-sub { font-size: .8em; }
.sch--tv .sch-grid { grid-template-columns: repeat(auto-fill, minmax(20em, 1fr)); gap: .7em; }
.sch--tv .sch-card { background: #0e3866; border-color: rgba(255, 255, 255, .1); border-left-color: var(--tc, var(--t-other)); padding: .7em .8em; }
.sch--tv .sch-subject { font-size: 1em; color: #fff; }
.sch--tv .sch-gchip, .sch--tv .sch-roomb { font-size: .8em; background: rgba(255, 255, 255, .1); color: #fff; border-color: transparent; pointer-events: none; }
.sch--tv .sch-person { font-size: .75em; color: #b9c8de; pointer-events: none; }
.sch--tv .sch-tag { font-size: .7em; }
.sch--tv .sch-tv-exit { color: #9fb4d0; font-size: .7em; }
.sch-tv-pages { display: flex; justify-content: center; gap: .4em; margin-top: .8em; }
.sch-tv-pages i { width: .5em; height: .5em; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.sch-tv-pages i.on { background: var(--s-gold); }
