/* ============================================================
   NIS MAKTAB — MOBIL QOBIQ (shell.css)
   Tokenlar, yuqori panel, pastki tab bar, "Yana" varag'i, toast.
   Ham mobil sahifalar (app.css bilan), ham xodim sahifalari (staff.css bilan) yuklaydi.
   ============================================================ */
/* ---------- 1. TOKENLAR ---------- */
:root{
  --m-bg:#F3F5F9; --m-surface:#FFFFFF; --m-surface2:#F6F8FB; --m-border:#E6EAF1; --m-border2:#EEF1F6;
  --m-text:#0F172A; --m-text2:#334155; --m-muted:#7C8699; --m-faint:#A9B2C1;
  --m-navy:#0B2A5B; --m-navy2:#143D82; --m-gold:#F5B301; --m-gold2:#FFD560;
  --m-accent:#2F6BFF; --m-accent2:#1D53E6; --m-accent-soft:#E9EFFF; --m-accent-ink:#1A47C7;
  --m-success:#16A34A; --m-success-soft:#E6F6EC; --m-warn:#D97706; --m-warn-soft:#FDF1DC;
  --m-danger:#DC2626; --m-danger-soft:#FDE8E8; --m-info:#0284C7; --m-info-soft:#E3F3FC; --m-purple:#7C3AED; --m-purple-soft:#F0E9FF;
  --m-r-sm:10px; --m-r:14px; --m-r-lg:18px; --m-r-xl:24px;
  --m-sh-1:0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --m-sh-2:0 8px 24px rgba(15,23,42,.08);
  --m-sh-accent:0 10px 24px rgba(47,107,255,.28);
  --m-tab-h:64px; --m-top-h:56px;
  --sat:env(safe-area-inset-top,0px); --sab:env(safe-area-inset-bottom,0px);
  --m-font:'Plus Jakarta Sans',-apple-system,'Segoe UI',Roboto,system-ui,sans-serif;
}
.role-teacher{ --m-accent:#0E9F6E; --m-accent2:#0B7F58; --m-accent-soft:#E2F6EE; --m-accent-ink:#0A6B4A; --m-sh-accent:0 10px 24px rgba(14,159,110,.28); }
.role-staff, .role-admin, .role-accountant, .role-academic_deputy, .role-cultural_deputy, .role-smm_manager{
  --m-accent:#143D82; --m-accent2:#0B2A5B; --m-accent-soft:#E6EDF8; --m-accent-ink:#0B2A5B; --m-sh-accent:0 10px 24px rgba(11,42,91,.26);
}


.m-ico{ display:inline-block; vertical-align:middle; flex-shrink:0; }
.m-sheet .section-title{ font-size:11.5px; font-weight:800; text-transform:uppercase; letter-spacing:.9px; color:var(--m-muted); margin:16px 4px 8px; }
.m-sheet .card{ background:var(--m-surface); border:1px solid var(--m-border); border-radius:var(--m-r-lg); overflow:hidden; box-shadow:var(--m-sh-1); margin:0 0 14px; padding:0; }
.m-sheet .row-item{ display:flex; align-items:center; gap:12px; padding:13px 14px; border-bottom:1px solid var(--m-border2); color:var(--m-text); text-decoration:none; min-height:56px; }
.m-sheet .row-item:last-child{ border-bottom:none; }
.m-sheet .row-item:active{ background:var(--m-surface2); }
.m-sheet .row-icon{ width:40px; height:40px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; background:var(--m-surface2); color:var(--m-text2); }
.m-sheet .row-icon.b{ background:var(--m-accent-soft); color:var(--m-accent-ink); }
.m-sheet .row-icon.r{ background:var(--m-danger-soft); color:var(--m-danger); }
.m-sheet .row-main{ flex:1; min-width:0; }
.m-sheet .row-title{ font-size:14.5px; font-weight:700; line-height:1.25; }
.m-sheet .row-sub{ font-size:12px; color:var(--m-muted); margin-top:2px; }
.m-sheet .row-arrow{ color:var(--m-faint); display:flex; align-items:center; }
.m-sheet .m-group{ margin:0 0 12px; }

/* ---------- 3. YUQORI PANEL ---------- */
.m-topbar{ position:sticky; top:0; z-index:40; background:rgba(255,255,255,.92); -webkit-backdrop-filter:saturate(180%) blur(14px); backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--m-border2); padding-top:var(--sat); }
.m-topbar-in{ max-width:600px; margin:0 auto; height:var(--m-top-h); display:flex; align-items:center; gap:10px; padding:0 12px 0 10px; }
.m-back{ width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:var(--m-text); background:transparent; flex-shrink:0; }
.m-back:active, .m-iconbtn:active{ background:var(--m-surface2); }
.m-titles{ flex:1; min-width:0; padding-left:2px; }
.m-title{ margin:0; font-size:17px; font-weight:800; letter-spacing:-.2px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-sub{ margin:1px 0 0; font-size:12px; color:var(--m-muted); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-topbar .m-titles:first-child{ padding-left:8px; }
.m-brand{ flex:1; display:flex; align-items:center; gap:10px; color:var(--m-text); padding-left:6px; min-width:0; }
.m-brand img{ width:36px; height:36px; border-radius:50%; object-fit:cover; background:#fff; box-shadow:0 0 0 2px #fff, 0 0 0 3px var(--m-border); }
.m-brand span{ display:flex; flex-direction:column; line-height:1.15; min-width:0; }
.m-brand b{ font-size:15px; font-weight:800; letter-spacing:-.2px; }
.m-brand small{ font-size:11.5px; color:var(--m-muted); font-weight:600; }
.m-actions{ display:flex; align-items:center; gap:4px; }
.m-iconbtn{ width:40px; height:40px; border-radius:12px; border:none; background:transparent; color:var(--m-text2); display:flex; align-items:center; justify-content:center; cursor:pointer; position:relative; }
.m-iconbtn .dot{ position:absolute; top:9px; right:9px; width:8px; height:8px; border-radius:50%; background:var(--m-danger); box-shadow:0 0 0 2px #fff; }


/* ---------- 4. PASTKI TAB BAR ---------- */
.m-tabbar{ position:fixed; left:0; right:0; bottom:0; z-index:40; height:calc(var(--m-tab-h) + var(--sab)); padding:6px 6px calc(6px + var(--sab));
  background:rgba(255,255,255,.96); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); border-top:1px solid var(--m-border2);
  display:flex; justify-content:space-around; align-items:stretch; max-width:100%; }
.m-tab{ flex:1; max-width:120px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--m-muted); border:none; background:transparent; padding:0; cursor:pointer; -webkit-user-select:none; user-select:none; }
.m-tab-ico{ width:50px; height:30px; border-radius:15px; display:flex; align-items:center; justify-content:center; transition:background .18s, color .18s, transform .18s; }
.m-tab-lbl{ font-size:11px; font-weight:600; letter-spacing:.1px; line-height:1; }
.m-tab.active{ color:var(--m-accent-ink); }
.m-tab.active .m-tab-ico{ background:var(--m-accent-soft); color:var(--m-accent-ink); }
.m-tab.active .m-tab-lbl{ font-weight:800; }
.m-tab:active .m-tab-ico{ transform:scale(.92); }


/* ---------- 5. "YANA" VARAG'I (bottom sheet) ---------- */
.m-sheet{ position:fixed; inset:0; z-index:60; pointer-events:none; }
.m-sheet-bg{ position:absolute; inset:0; background:rgba(11,20,40,.45); opacity:0; transition:opacity .22s; }
.m-sheet-panel{ position:absolute; left:0; right:0; bottom:0; max-height:86vh; background:var(--m-bg); border-radius:24px 24px 0 0; transform:translateY(105%);
  transition:transform .28s cubic-bezier(.32,.72,0,1); display:flex; flex-direction:column; padding-bottom:var(--sab); box-shadow:0 -12px 40px rgba(15,23,42,.18); max-width:640px; margin:0 auto; }
.m-sheet.open{ pointer-events:auto; }
.m-sheet.open .m-sheet-bg{ opacity:1; }
.m-sheet.open .m-sheet-panel{ transform:translateY(0); }
.m-sheet-handle{ width:40px; height:4px; border-radius:2px; background:#CBD2DE; margin:10px auto 4px; flex-shrink:0; }
.m-sheet-user{ display:flex; align-items:center; gap:12px; padding:10px 20px 12px; flex-shrink:0; }
.m-sheet-user-in{ display:flex; flex-direction:column; min-width:0; line-height:1.2; }
.m-sheet-user-in b{ font-size:15.5px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-sheet-user-in small{ font-size:12px; color:var(--m-muted); font-weight:500; margin-top:2px; }
.m-sheet-scroll{ overflow-y:auto; padding:0 16px 16px; -webkit-overflow-scrolling:touch; }
.m-avatar{ width:46px; height:46px; border-radius:14px; background:linear-gradient(135deg,var(--m-navy),var(--m-navy2)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; flex-shrink:0; overflow:hidden; }
.m-avatar img{ width:100%; height:100%; object-fit:cover; }
.m-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.m-tile{ background:var(--m-surface); border:1px solid var(--m-border); border-radius:var(--m-r-lg); padding:14px 8px 12px; display:flex; flex-direction:column; align-items:center; gap:8px; color:var(--m-text); box-shadow:var(--m-sh-1); }
.m-tile:active{ background:var(--m-surface2); }
.m-tile-ico{ width:42px; height:42px; border-radius:13px; background:var(--m-accent-soft); color:var(--m-accent-ink); display:flex; align-items:center; justify-content:center; }
.m-tile-lbl{ font-size:12px; font-weight:700; text-align:center; line-height:1.2; }
.m-foot{ text-align:center; font-size:11px; color:var(--m-faint); margin:16px 0 4px; }


/* ---------- 20. TEZKOR AMALLAR (bosh sahifa) ---------- */
.m-quick{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
.m-quick a{ display:flex; flex-direction:column; align-items:center; gap:7px; padding:12px 4px 10px; border-radius:var(--m-r-lg); background:var(--m-surface); border:1px solid var(--m-border); color:var(--m-text); box-shadow:var(--m-sh-1); }
.m-quick a:active{ background:var(--m-surface2); }
.m-quick .qi{ width:42px; height:42px; border-radius:14px; display:flex; align-items:center; justify-content:center; }
.m-quick .qi.b{ background:var(--m-accent-soft); color:var(--m-accent-ink); }
.m-quick .qi.g{ background:var(--m-success-soft); color:var(--m-success); }
.m-quick .qi.o{ background:var(--m-warn-soft); color:var(--m-warn); }
.m-quick .qi.r{ background:var(--m-danger-soft); color:var(--m-danger); }
.m-quick .qi.p{ background:var(--m-purple-soft); color:var(--m-purple); }
.m-quick .ql{ font-size:11.5px; font-weight:700; text-align:center; line-height:1.15; }


/* ---------- 21. KUN KARTASI (tadbir sanasi) ---------- */
.m-date{ width:48px; height:48px; border-radius:14px; flex-shrink:0; text-align:center; background:var(--m-warn-soft); padding:6px 0; }
.m-date .mo{ font-size:9.5px; font-weight:800; color:var(--m-warn); line-height:1; text-transform:uppercase; letter-spacing:.5px; }
.m-date .d{ font-size:19px; font-weight:800; color:var(--m-text); line-height:1; margin-top:3px; }


/* ---------- TOAST / SKELET ---------- */
.m-toast{ position:fixed; left:50%; bottom:calc(var(--m-tab-h) + var(--sab) + 14px); transform:translate(-50%,16px); z-index:80; background:#0F172A; color:#fff; padding:11px 16px; border-radius:12px; font-size:13.5px; font-weight:600; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; max-width:calc(100% - 32px); text-align:center; box-shadow:0 10px 30px rgba(0,0,0,.25); }
.m-toast.show{ opacity:1; transform:translate(-50%,0); }
.m-skel{ background:linear-gradient(90deg,#EEF1F6 25%,#F6F8FB 50%,#EEF1F6 75%); background-size:200% 100%; animation:m-skel 1.2s infinite; border-radius:8px; }
@keyframes m-skel{ 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ---------- BOOTSTRAP SAHIFALARI BILAN MUVOFIQLIK ---------- */
.m-tab, .m-tab:hover, .m-tile, .m-tile:hover, .m-sheet a, .m-sheet a:hover, .m-brand, .m-brand:hover, .m-back, .m-back:hover, .m-quick a, .m-quick a:hover{ text-decoration:none !important; }
.m-tab{ color:var(--m-muted) !important; } .m-tab.active{ color:var(--m-accent-ink) !important; }
.m-tile, .m-quick a, .m-sheet .row-item{ color:var(--m-text) !important; }
.m-sheet .row-title{ color:var(--m-text); }

/* ---------- BILDIRISHNOMALAR VARAG'I ---------- */
.m-sheet-head{ display:flex; align-items:center; justify-content:space-between; padding:6px 10px 8px 20px; }
.m-sheet-head b{ font-size:16px; font-weight:800; }
.m-notif a, .m-notif .m-notif-item{ display:flex; gap:12px; align-items:flex-start; padding:13px 14px; border-bottom:1px solid var(--m-border2); color:var(--m-text); text-decoration:none !important; }
.m-notif a:last-child, .m-notif .m-notif-item:last-child{ border-bottom:none; }
.m-notif .bg-light{ background:var(--m-accent-soft) !important; }
.m-notif i.fas{ display:none; }
.m-notif .small{ font-size:14px !important; font-weight:600; line-height:1.3 !important; color:var(--m-text) !important; }
.m-notif .text-muted{ font-size:11.5px !important; color:var(--m-muted) !important; margin-top:3px; }
.m-notif .d-flex{ display:flex; } .m-notif .flex-grow-1{ flex:1; min-width:0; }
.m-notif .empty{ padding:30px 16px; text-align:center; color:var(--m-muted); font-size:13.5px; }
.m-notif .text-center{ text-align:center; padding:24px 14px; color:var(--m-muted); font-size:13.5px; }
.empty-emoji .m-ico{ color:var(--m-faint); }
