/* =========================================================
   PET-EDU — kabinet qobig'i
   ========================================================= */
body.app { background: var(--bg); }
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

/* ---------- Yon menyu ---------- */
.side { width: 272px; flex-shrink: 0; background: radial-gradient(500px 300px at 0% 0%, #241b63 0%, transparent 70%), var(--ink); color: #fff; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  /* Bootstrap .offcanvas-lg katta ekranda fonni transparent !important qiladi — qaytaramiz */
  .side.offcanvas-lg { position: sticky; top: 0; height: 100vh; height: 100dvh; visibility: visible !important; transform: none !important;
    background-color: var(--ink) !important; background-image: radial-gradient(500px 300px at 0% 0%, #241b63 0%, transparent 70%) !important; }
}
@media (max-width: 991.98px) {
  .side.offcanvas-lg { --bs-offcanvas-width: 280px; background: var(--ink); }
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 1.4rem 1rem; }
.side-nav { flex: 1; overflow-y: auto; padding: .5rem .9rem; }
.side-label { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .38); padding: .8rem .7rem .5rem; }
.side-nav a { display: flex; align-items: center; gap: .8rem; padding: .72rem .85rem; margin-bottom: 2px; border-radius: 12px; color: rgba(255, 255, 255, .68); font-weight: 600; font-size: .93rem; transition: all .18s ease; position: relative; }
.side-nav a i { font-size: 1.1rem; width: 22px; text-align: center; }
.side-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(139, 92, 246, .35), rgba(99, 102, 241, .12)); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .25); }
.side-nav a.active::before { content: ''; position: absolute; left: -.9rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.side-nav a.active i { color: #c4b5fd; }
.side-foot { padding: 1rem; }
.side-card { padding: 1rem; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .85); }

/* ---------- Asosiy qism ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 1rem; padding: 1rem 2rem; background: rgba(245, 246, 251, .82); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top-title { min-width: 0; flex: 1; }
.top-title h1 { font-size: 1.35rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: .7rem; }
.points-chip { font-size: .9rem; padding: .45rem .8rem; }
.points-chip.bump { animation: bump .6s ease; }
@keyframes bump { 30% { transform: scale(1.25); } 100% { transform: scale(1); } }
.user-btn { display: flex; align-items: center; gap: .65rem; border: 0; background: #fff; padding: .3rem .8rem .3rem .3rem; border-radius: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.u-name { display: block; font-weight: 800; font-size: .85rem; color: var(--ink); line-height: 1.2; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-role { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
.content { padding: .5rem 2rem 3rem; flex: 1; }

/* ---------- Mobil pastki menyu (o'quvchi) ---------- */
.bottom-nav { position: fixed; left: .6rem; right: .6rem; bottom: calc(.6rem + env(safe-area-inset-bottom)); z-index: 1030; display: flex; justify-content: space-around; padding: .45rem; border-radius: 20px; background: rgba(11, 16, 38, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -10px rgba(11, 16, 38, .5); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem 0; border-radius: 14px; color: rgba(255, 255, 255, .55); font-size: .66rem; font-weight: 700; }
.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active { color: #fff; background: rgba(139, 92, 246, .35); }

/* ---------- Kabinet komponentlari ---------- */
.page-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 1.8rem 2rem; color: #fff; background: radial-gradient(600px 300px at 100% 0%, rgba(236, 72, 153, .45), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(14, 165, 233, .35), transparent 60%), var(--ink-2); }
.page-hero h2 { color: #fff; }
.page-hero .ph-sub { color: rgba(255, 255, 255, .72); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem 1.2rem; height: 100%; display: flex; gap: .9rem; align-items: center; }
.stat-val { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.03em; }
.stat-lbl { font-size: .8rem; font-weight: 600; color: var(--muted); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.sec-h h2 { font-size: 1.15rem; margin: 0; }
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-x th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: #fafbff; white-space: nowrap; }
.table-x td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table-x tr:last-child td { border-bottom: 0; }
.table-x tbody tr { transition: background .15s; }
.table-x tbody tr:hover { background: #fafaff; }
.soon { text-align: center; padding: 4rem 1rem; }
.soon .icon-tile { margin: 0 auto 1.2rem; }

/* ---------- Xato sahifasi ---------- */
.err-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(800px 400px at 50% 0%, #ebe8ff, transparent 70%), var(--bg); }
.err-code { font-size: 6rem; font-weight: 800; line-height: 1; letter-spacing: -.06em; }

/* ---------- Moslashuvchanlik ---------- */
@media (max-width: 991.98px) {
  .top { padding: .8rem 1rem; }
  .content { padding: .5rem 1rem 6.5rem; }
  .top-title h1 { font-size: 1.1rem; }
  .page-hero { padding: 1.4rem; }
}
@media print {
  .side, .top, .bottom-nav, .no-print { display: none !important; }
  .content { padding: 0; }
  body.app { background: #fff; }
}
