/* ═══════════════════════════════════════════════════════════════
   RUNNING JACK ICT ACADEMY — NAV STYLES
   Covers: public navbar · admin/student sidebar · mobile bottom nav
═══════════════════════════════════════════════════════════════ */

/* ── PUBLIC TOP NAVBAR ──────────────────────────────────────── */
nav#navbar {
  position: fixed; inset: 0 0 auto; z-index: 800; height: 66px;
  backdrop-filter: blur(28px) saturate(160%);
  border-bottom: 1px solid var(--line);
  background: rgba(10,12,26,.78);
  transition: background .4s;
}
[data-theme="light"] nav#navbar { background: rgba(240,236,229,.88); }
.nav-inner { max-width: 1300px; margin: 0 auto; padding: 0 44px; height: 100%; display: flex; align-items: center; gap: 32px; position: relative; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-logo { height: 44px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(124,45,142,.45)); }
.nav-name { font-family: var(--fd); font-size: 1.02rem; color: var(--text); white-space: nowrap; }
.nav-name em { font-style: normal; color: var(--gold); }
.nav-links { display: flex; gap: 34px; list-style: none; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.8px; color: var(--muted); text-decoration: none; position: relative; padding-bottom: 3px; transition: color .2s; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--pink); transition: width .3s var(--ease); }
.nav-links a:hover,.nav-links a.active { color: var(--pink); }
.nav-links a:hover::after,.nav-links a.active::after { width: 100%; }
.nav-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
@media(max-width:900px){.nav-links{display:none;}.nav-inner{padding:0 20px;}}

/* ── SIDEBAR (desktop) ──────────────────────────────────────── */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 700; background: rgba(10,12,26,.95); border-right: 1px solid var(--line); backdrop-filter: blur(20px); display: flex; flex-direction: column; padding: 28px 0; transition: background .4s, transform .35s var(--ease); }
[data-theme="light"] .sidebar { background: rgba(255,255,255,.97); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 22px 28px; border-bottom: 1px solid var(--line); }
.sidebar-logo { height: 38px; width: auto; filter: drop-shadow(0 2px 6px rgba(124,45,142,.4)); }
.sidebar-name { font-family: var(--fd); font-size: .9rem; color: var(--text); }
.sidebar-name em { font-style: normal; color: var(--gold); }
.sidebar-nav { flex: 1; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.sidebar-section { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); padding: 14px 8px 8px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: .84rem; font-weight: 500; color: var(--muted); transition: all .2s; }
.nav-link svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-link.active { background: rgba(232,24,109,.1); color: var(--pink); border: 1px solid rgba(232,24,109,.18); }
[data-theme="light"] .nav-link:hover { background: rgba(0,0,0,.04); }
.sidebar-foot { padding: 16px 22px; border-top: 1px solid var(--line); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.su-av { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-size: .88rem; color: #fff; }
.su-name { font-size: .82rem; font-weight: 600; color: var(--text); }
.su-role { font-size: .65rem; color: var(--muted); margin-top: 1px; }
.su-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.su-logout { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(232,24,109,.25); background: rgba(232,24,109,.07); color: rgba(232,24,109,.7); cursor: pointer; transition: all .2s; text-decoration: none; }
.su-logout:hover { background: rgba(232,24,109,.15); border-color: rgba(232,24,109,.45); color: var(--pink); }
.su-logout svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.theme-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.theme-label { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.main-content { margin-left: 240px; min-height: 100vh; padding: 40px 40px 100px; position: relative; z-index: 2; }

/* ── MOBILE TOP BAR ─────────────────────────────────────────── */
.mob-topbar { display: none; position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 750; background: rgba(10,12,26,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); align-items: center; justify-content: space-between; padding: 0 18px; }
[data-theme="light"] .mob-topbar { background: rgba(255,255,255,.97); }
.mob-topbar-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.mob-topbar-brand img { height: 30px; width: auto; }
.mob-topbar-brand span { font-family: var(--fd); font-size: .88rem; color: var(--text); }
.mob-topbar-brand em { font-style: normal; color: var(--gold); }
.mob-topbar-actions { display: flex; align-items: center; gap: 8px; }
.mob-hamburger { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; transition: background .2s; }
[data-theme="light"] .mob-hamburger { background: rgba(0,0,0,.04); }
.mob-hamburger:hover { background: rgba(232,24,109,.1); border-color: rgba(232,24,109,.3); }
.mob-hamburger span { display: block; width: 18px; height: 2px; background: var(--muted); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s, background .2s; }
.mob-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--pink); }
.mob-hamburger.open span:nth-child(2) { opacity: 0; }
.mob-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--pink); }

/* ── DRAWER OVERLAY ─────────────────────────────────────────── */
.mob-drawer-overlay { display: none; position: fixed; inset: 0; z-index: 740; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; pointer-events: none; }
.mob-drawer-overlay.open { opacity: 1; pointer-events: all; }
.mob-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 741; background: rgba(10,12,26,.98); border-right: 1px solid var(--line); backdrop-filter: blur(24px); display: flex; flex-direction: column; padding: 0; transform: translateX(-100%); transition: transform .35s var(--ease); }
[data-theme="light"] .mob-drawer { background: rgba(255,255,255,.99); }
.mob-drawer.open { transform: translateX(0); }
.mob-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.mob-drawer-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.mob-drawer-brand img { height: 32px; width: auto; }
.mob-drawer-brand span { font-family: var(--fd); font-size: .9rem; color: var(--text); }
.mob-drawer-brand em { font-style: normal; color: var(--gold); }
.mob-drawer-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); transition: all .2s; }
.mob-drawer-close:hover { border-color: rgba(232,24,109,.35); color: var(--pink); }
.mob-drawer-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.mob-drawer-nav { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.mob-drawer-foot { padding: 16px 18px; border-top: 1px solid var(--line); flex-shrink: 0; }
.mob-drawer-user { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.mob-drawer-user .su-av { width: 38px; height: 38px; border-radius: 10px; font-size: .9rem; }
.mob-drawer-logout { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(232,24,109,.25); background: rgba(232,24,109,.07); color: rgba(232,24,109,.7); transition: all .2s; text-decoration: none; flex-shrink: 0; }
.mob-drawer-logout:hover { background: rgba(232,24,109,.15); color: var(--pink); }
.mob-drawer-logout svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── BOTTOM NAV BAR ─────────────────────────────────────────── */
.mob-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 730; background: rgba(10,12,26,.97); border-top: 1px solid var(--line); backdrop-filter: blur(20px); height: 64px; padding: 0 4px; align-items: center; justify-content: space-around; }
[data-theme="light"] .mob-bottom-nav { background: rgba(255,255,255,.97); }
.mob-bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; padding: 8px 2px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: .55rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; transition: all .2s; border: none; background: transparent; min-width: 0; }
.mob-bn-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
.mob-bn-item.active { color: var(--pink); }
.mob-bn-item.active svg { stroke: var(--pink); }
.mob-bn-item:hover { color: var(--text); }

/* More tray */
.mob-more-tray { display: none; position: fixed; bottom: 64px; left: 0; right: 0; z-index: 735; background: rgba(10,12,26,.99); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; backdrop-filter: blur(24px); padding: 20px 16px 16px; transform: translateY(100%); transition: transform .3s var(--ease); }
[data-theme="light"] .mob-more-tray { background: rgba(255,255,255,.99); }
.mob-more-tray.open { transform: translateY(0); }
.mob-more-tray-title { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 14px; padding: 0 2px; }
.mob-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mob-more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); text-decoration: none; color: var(--muted); font-size: .58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; transition: all .2s; text-align: center; }
.mob-more-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.mob-more-item:hover,.mob-more-item.active { border-color: rgba(232,24,109,.3); background: rgba(232,24,109,.07); color: var(--pink); }
.mob-more-overlay { display: none; position: fixed; inset: 0; z-index: 734; background: rgba(0,0,0,.4); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media(max-width:768px) {
  .sidebar { display: none; }
  .mob-topbar { display: flex; }
  .mob-bottom-nav { display: flex; }
  .mob-drawer-overlay { display: block; }
  .mob-more-tray { display: block; }
  .mob-more-overlay { display: block; }

  .main-content { margin-left: 0; padding: 76px 16px 80px; }

  .page-header,.page-top { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
  .page-header > div,.page-top > div { display: flex; flex-wrap: wrap; gap: 8px; }

  .score-bar { grid-template-columns: 1fr 1fr !important; }
  .two-col { grid-template-columns: 1fr !important; }

  .settings-tabs,.tab-row { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; padding-bottom: 4px; }
  .settings-tabs::-webkit-scrollbar,.tab-row::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; font-size: .72rem; padding: 8px 14px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  #dot,#ring { display: none !important; }
  body,*,a,button,input,select,textarea { cursor: auto !important; }
}

@media(max-width:400px) {
  .score-bar,.stats-row { grid-template-columns: 1fr !important; }
  .mob-more-grid { grid-template-columns: repeat(3,1fr); }
}

@media(min-width:769px) {
  .mob-topbar,.mob-bottom-nav,.mob-drawer-overlay,.mob-drawer,.mob-more-tray,.mob-more-overlay { display: none !important; }
}
