:root {
  --bg: #060a1a;
  --bg2: #0a0f2e;
  --bg3: #0e1545;
  --surface: rgba(255,255,255,0.025);
  --surface2: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.1);
  --text: #eef2ff;
  --text2: rgba(238,242,255,0.65);
  --text3: rgba(238,242,255,0.3);
  --cyan: #00e5ff;
  --purple: #a855f7;
  --pink: #f472b6;
  --green: #22d3ee;
  --lime: #a3e635;
  --orange: #fb923c;
  --red: #f87171;
  --yellow: #fbbf24;
  --grad: linear-gradient(135deg, #00e5ff, #a855f7);
  --grad2: linear-gradient(135deg, #a855f7, #f472b6);
  --grad3: linear-gradient(135deg, #22d3ee, #a3e635);
  --grad4: linear-gradient(135deg, #00e5ff, #a855f7, #f472b6);
  --r: 12px;
  --r2: 16px;
  --r3: 24px;
  --nav: 68px;
  --header: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
 html { scroll-behavior: smooth; overflow-y: auto; height: auto; }

body {
  font: 15px/1.65 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport height for mobile */
  padding-bottom: calc(var(--nav) + 20px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
}

/* Ensure app-view grows with content and allows scrolling */
#app-view {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--header) + 20px) 1.25rem calc(var(--nav) + 28px);
}

/* Pensum section container must grow with content */
#section-pensum {
  display: block;
  width: 100%;
  min-height: auto;
  overflow: visible;
}

#pensum-content {
  overflow: visible;
  min-height: 0;
}

/* Main content area must allow full height for Pensum */
.main-content {
  min-height: calc(100vh - 60px - 68px);
  height: auto;
  overflow: visible;
}

#starfield { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
#starfield::before {
  content: ''; position: absolute; inset: -40px;
  background-image:
    radial-gradient(1px 1px at 10% 5%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 23% 12%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1.5px 1.5px at 35% 28%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 42% 45%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1.5px 1.5px at 55% 8%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 68% 55%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 75% 80%, rgba(255,255,255,0.08), transparent),
    radial-gradient(1.5px 1.5px at 82% 15%, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,0.08), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(0,229,255,0.08), transparent),
    radial-gradient(1.5px 1.5px at 30% 50%, rgba(168,85,247,0.06), transparent),
    radial-gradient(1px 1px at 85% 65%, rgba(0,229,255,0.06), transparent);
  background-size: 200% 200%;
  animation: drift 120s linear infinite;
}
#starfield::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 500px 350px at 15% 25%, rgba(0,229,255,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 80% 70%, rgba(168,85,247,0.03) 0%, transparent 70%);
}

@keyframes drift {
  0% { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(-80px,-40px) rotate(3deg); }
}

::selection { background: var(--cyan); color: var(--bg); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.hidden { display: none !important; }

@keyframes fadeIn { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes glow { 0%,100% { box-shadow: 0 0 8px rgba(0,229,255,0.06); } 50% { box-shadow: 0 0 24px rgba(0,229,255,0.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -300% 50%; } 100% { background-position: 300% 50%; } }
@keyframes streakPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes quoteFade { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }

/* Loading */
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); z-index: 9999; gap: 1.5rem; }
#loading .logo-icon { font-size: 3.5rem; animation: pulse 1.5s infinite; }
#loading h1 { font-size: 1.6rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.6s linear infinite; }
.spinner-sm { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }

/* Auth */
#auth-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 380px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r3); padding: 2.5rem 2rem; box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 40px rgba(0,229,255,0.04); animation: slideUp 0.5s cubic-bezier(0.16,1,0.3,1); }
.logo { text-align: center; margin-bottom: 2rem; }
.logo-icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.logo h1 { font-size: 1.8rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.5px; }
.logo .tagline { color: var(--text3); font-size: 0.8rem; margin-top: 0.25rem; letter-spacing: 1px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 1.5rem; background: var(--surface); border-radius: var(--r); padding: 3px; }
.auth-tabs .tab-btn { flex: 1; padding: 0.65rem; background: transparent; border: none; border-radius: calc(var(--r) - 2px); color: var(--text3); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.auth-tabs .tab-btn.active { background: var(--grad); color: #fff; box-shadow: 0 4px 16px rgba(0,229,255,0.2); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.7rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.35rem; }
.form-group input { width: 100%; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); font: inherit; font-size: 0.9rem; transition: all 0.3s; }
.form-group input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.08); }
.form-group input::placeholder { color: var(--text3); }
.error-msg { color: var(--red); font-size: 0.75rem; text-align: center; margin-top: 0.75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0.75rem 1.5rem; border-radius: var(--r); border: none; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.3s; letter-spacing: 0.3px; white-space: nowrap; }
.btn-primary { width: 100%; background: var(--grad); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,229,255,0.25); }
.btn-sm { padding: 0.4rem 0.85rem; background: var(--grad); border: none; border-radius: 50px; color: #fff; font: inherit; font-size: 0.65rem; font-weight: 700; cursor: pointer; transition: all 0.3s; white-space: nowrap; }
.btn-sm:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,229,255,0.2); }
.btn-ghost { padding: 0.35rem 0.65rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text2); font: inherit; font-size: 0.6rem; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-ghost:hover { background: var(--surface2); border-color: var(--border2); }

/* Header */
.top-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header); display: flex; align-items: center; padding: 0 1.25rem; background: rgba(6,10,26,0.92); backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); z-index: 100; }
.header-content { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.greeting { font-size: 0.95rem; font-weight: 700; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 0.3px; }
.btn-logout { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--text3); cursor: pointer; transition: all 0.3s; }
.btn-logout:hover { background: rgba(248,113,113,0.1); border-color: var(--red); color: var(--red); }
.btn-logout svg { width: 18px; height: 18px; }
.top-bar { position: fixed; top: 0; left: 0; right: 0; height: var(--header); display: flex; align-items: center; justify-content: space-between; padding: 0 max(1.25rem, calc((100vw - 1120px) / 2 + 1.25rem)); background: rgba(6,10,26,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); z-index: 1000; }
.top-left, .top-right { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.top-logo { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, rgba(0,229,255,0.14), rgba(168,85,247,0.14)); border: 1px solid rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.top-title { font-size: 0.78rem; font-weight: 900; letter-spacing: 1.5px; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }
.top-greeting { font-size: 0.82rem; font-weight: 700; color: var(--text2); max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-badge { display: flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.65rem; background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.25); border-radius: 50px; font-size: 0.65rem; font-weight: 600; color: var(--purple); white-space: nowrap; }
.plan-badge-text { max-width: 20vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-change-plan { background: none; border: none; color: var(--purple); cursor: pointer; padding: 0; font-size: 0.7rem; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.btn-change-plan:hover { opacity: 1; }
.top-logout { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text2); cursor: pointer; transition: all 0.25s; }
.top-logout:hover { background: rgba(248,113,113,0.1); border-color: var(--red); color: var(--red); transform: translateY(-1px); }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav); display: flex; justify-content: space-around; align-items: center; background: rgba(6,10,26,0.96); backdrop-filter: blur(24px); border-top: 1px solid var(--border); z-index: 1000; padding: 0 0.25rem; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 14px; min-width: 56px; background: transparent; border: none; border-radius: var(--r); color: var(--text3); font: inherit; font-size: 0.55rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.nav-item svg { width: 24px; height: 24px; transition: all 0.3s; }
.nav-item:hover { color: var(--text2); }
.nav-item.active { color: var(--cyan); background: rgba(0,229,255,0.06); }
.nav-item.active svg { filter: drop-shadow(0 0 8px var(--cyan)); }

/* Main */
.main-content { max-width: 1100px; margin: 0 auto; padding: calc(var(--header) + 20px) 1.25rem calc(var(--nav) + 24px); }
.section { display: block; animation: fadeIn 0.4s ease; }
.section.hidden { display: none; }
.section-title { font-size: 1.35rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.15rem; letter-spacing: -0.3px; }
.section-desc { font-size: 0.72rem; color: var(--text3); margin-bottom: 1.25rem; }

/* ── STREAK ── */
.streak-bar { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 0.7rem 1rem; margin-bottom: 0.75rem; }
.streak-bar .streak-icon { font-size: 1.8rem; animation: streakPulse 2s infinite; }
.streak-bar .streak-info { flex: 1; }
.streak-bar .streak-info .streak-count { font-size: 1.2rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.streak-bar .streak-info .streak-label { font-size: 0.6rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.streak-bar .streak-dots { display: flex; gap: 4px; }
.streak-bar .streak-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--surface2); transition: all 0.3s; }
.streak-bar .streak-dots span.done { background: var(--cyan); box-shadow: 0 0 6px rgba(0,229,255,0.3); }

/* ── QUOTE ── */
.quote-bar { background: rgba(0,229,255,0.03); border: 1px solid rgba(0,229,255,0.06); border-radius: var(--r2); padding: 0.85rem 1rem; margin-bottom: 0.75rem; cursor: pointer; transition: all 0.3s; }
.quote-bar:hover { border-color: rgba(0,229,255,0.1); }
.quote-bar .quote-text { font-size: 0.78rem; color: var(--text2); font-style: italic; line-height: 1.5; }
.quote-bar .quote-text::before { content: '"'; color: var(--cyan); }
.quote-bar .quote-text::after { content: '"'; color: var(--cyan); }
.quote-bar .quote-author { font-size: 0.62rem; color: var(--text3); margin-top: 0.3rem; }

/* ── FACT OF DAY ── */
.fact-bar { display: flex; align-items: flex-start; gap: 0.75rem; background: rgba(168,85,247,0.04); border: 1px solid rgba(168,85,247,0.08); border-radius: var(--r2); padding: 0.85rem 1rem; margin-bottom: 0.75rem; transition: all 0.3s; }
.fact-bar:hover { border-color: rgba(168,85,247,0.15); }
.fact-bar .fact-icon { font-size: 1.6rem; line-height: 1.4; flex-shrink: 0; }
.fact-bar .fact-body { flex: 1; min-width: 0; }
.fact-bar .fact-body .fact-label { font-size: 0.58rem; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 0.2rem; }
.fact-bar .fact-body .fact-text { font-size: 0.78rem; color: var(--text2); line-height: 1.55; }
.fact-bar .fact-body .fact-source { font-size: 0.6rem; color: var(--text3); margin-top: 0.3rem; font-style: italic; }

/* ── DASHBOARD ── */
.dash-hero { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 1.5rem; background: linear-gradient(135deg, rgba(0,229,255,0.035), rgba(168,85,247,0.035)); border: 1px solid var(--border); border-radius: var(--r3); padding: 1.5rem; margin-bottom: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.04); }
.dash-index { text-align: center; }
.dash-index .num { font-size: 3rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.dash-index .lbl { font-size: 0.6rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.25rem; }
.dash-index .stars { font-size: 0.85rem; margin-top: 0.35rem; }
.dash-index .stars .on { color: var(--yellow); }
.dash-index .stars .off { color: var(--text3); }
.dash-track { display: flex; flex-direction: column; justify-content: center; }
.dash-track .tl { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text2); margin-bottom: 0.35rem; }
.dash-track .tl strong { color: var(--cyan); }
.dash-track .bar { height: 14px; background: var(--surface2); border-radius: 7px; overflow: hidden; margin-bottom: 0.4rem; }
.dash-track .fill { height: 100%; background: var(--grad); border-radius: 7px; transition: width 1.2s ease; }
.dash-track .meta { display: flex; gap: 1rem; font-size: 0.7rem; color: var(--text3); flex-wrap: wrap; }
.dash-track .meta span { display: flex; align-items: center; gap: 0.25rem; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 0.85rem; margin-bottom: 1rem; align-items: stretch; }
.dash-card { background: rgba(255,255,255,0.028); border: 1px solid var(--border); border-radius: var(--r2); padding: 1rem; min-height: 132px; box-shadow: 0 12px 34px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.035); }
.dash-card h4 { font-size: 0.55rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.75rem; }
.dash-stat { display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.76rem; border-bottom: 1px solid rgba(255,255,255,0.02); }
.dash-stat:last-child { border: none; }
.dash-stat .v { font-weight: 800; }
.dash-stat.s1 .v { color: var(--cyan); }
.dash-stat.s2 .v { color: var(--purple); }
.dash-stat.s3 .v { color: var(--pink); }
.dash-stat.s4 .v { color: var(--green); }
.alert-item { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 0.68rem; margin-bottom: 0.25rem; }
.alert-item:last-child { margin: 0; }
.achiev-grid { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.achiev-item { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.12); border-radius: 50%; font-size: 1rem; transition: all 0.3s; }
.achiev-item:hover { transform: scale(1.2); box-shadow: 0 0 16px rgba(0,229,255,0.15); }

.dash-suggest { background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(168,85,247,0.055)); border: 1px solid rgba(0,229,255,0.1); border-radius: var(--r3); padding: 1.25rem; margin-bottom: 1rem; animation: glow 4s infinite; box-shadow: 0 16px 44px rgba(0,0,0,0.2); }
.dash-suggest .sb { display: inline-block; padding: 0.12rem 0.55rem; background: var(--grad); border-radius: 50px; font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.dash-suggest h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.dash-suggest p { font-size: 0.75rem; color: var(--text2); margin-bottom: 0.75rem; line-height: 1.6; }

/* ── PENSUM ── */
.pensum-head { text-align: center; margin-bottom: 0.75rem; }
.pensum-head h1 { font-size: 1.4rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.5px; }
.pensum-head .sub { font-size: 0.72rem; color: var(--text3); margin-top: 0.2rem; }

.pensum-dock { background: rgba(12,16,30,0.78); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid rgba(255,255,255,0.075); border-radius: 20px; padding: 1rem 1.25rem 0.75rem; margin-bottom: 1.25rem; box-shadow: 0 14px 44px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.045); }

.search-box { position: relative; max-width: 560px; margin: 0 auto 0.75rem; }
.search-box input { width: 100%; padding: 0.65rem 1rem 0.65rem 2.5rem; background: rgba(6,10,26,0.8); border: 1px solid var(--border); border-radius: 50px; color: var(--text); font: inherit; font-size: 0.85rem; transition: all 0.3s; }
.search-box input:focus { outline: none; border-color: rgba(0,229,255,0.4); box-shadow: 0 0 0 3px rgba(0,229,255,0.1), 0 0 20px rgba(0,229,255,0.05); }
.search-box input::placeholder { color: var(--text3); }
.search-box svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text3); pointer-events: none; }

.filter-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.65rem; }
.filter-pill { padding: 0.35rem 0.85rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; color: var(--text2); font: inherit; font-size: 0.68rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.filter-pill:hover { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.2); color: var(--cyan); }
.filter-pill.active { background: linear-gradient(135deg, rgba(0,229,255,0.2), rgba(168,85,247,0.2)); border-color: rgba(0,229,255,0.4); color: var(--cyan); box-shadow: 0 0 16px rgba(0,229,255,0.15), inset 0 1px 0 rgba(255,255,255,0.1); }
.filter-pill .cnt { opacity: 0.5; margin-left: 2px; }

.semester-sticky-bar { position: sticky; top: calc(var(--header) + 10px); z-index: 900; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 0.75rem; background: rgba(10,14,39,0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,0.07); border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,229,255,0.035) inset; margin: -0.35rem 0 1rem; transition: all 0.3s ease; }
.semester-sticky-bar.is-fixed { position: fixed; top: calc(var(--header) + 10px); left: 50%; transform: translateX(-50%); width: calc(100% - 2.5rem); max-width: 1120px; z-index: 1200; background: rgba(10,14,39,0.94); }
.semester-sticky-bar .semester-nav-btn { padding: 0.4rem 0.85rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; color: var(--text2); font: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all 0.25s cubic-bezier(0.16,1,0.3,1); white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.semester-sticky-bar .semester-nav-btn:hover { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.35); color: var(--cyan); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,229,255,0.12); }
.semester-sticky-bar .semester-nav-btn.active { background: linear-gradient(135deg, rgba(0,229,255,0.2), rgba(168,85,247,0.2)); border-color: rgba(0,229,255,0.5); color: var(--cyan); box-shadow: 0 0 20px rgba(0,229,255,0.2), inset 0 1px 0 rgba(255,255,255,0.1); transform: translateY(-1px); }

.search-highlight { background: rgba(0,229,255,0.15); color: var(--cyan); border-radius: 2px; padding: 0 2px; }

/* ── Semester Timeline ── */
.sem-timeline { position: relative; padding-left: 40px; }
.sem-timeline::before { content: ''; position: absolute; left: 14px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(to bottom, var(--cyan), var(--purple), var(--pink), var(--green)); opacity: 0.3; }

.sem-block { position: relative; margin-bottom: 1.75rem; animation: fadeIn 0.5s ease both; scroll-margin-top: calc(var(--header) + 118px); }
.sem-block:last-child { margin-bottom: 0; }
.sem-block .sem-dot { position: absolute; left: -31px; top: 8px; width: 13px; height: 13px; border-radius: 50%; z-index: 2; }
.sem-block .sem-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: inherit; opacity: 0.3; animation: pulse 2s infinite; }

.sem-block .sem-top { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 0.75rem 1rem; margin-bottom: 0.75rem; cursor: pointer; transition: all 0.3s; }
.sem-block .sem-top:hover { border-color: rgba(0,229,255,0.1); }
.sem-block .sem-top .si { display: flex; align-items: center; gap: 0.75rem; }
.sem-block .sem-top .si .sem-icon { font-size: 1.3rem; }
.sem-block .sem-top .si h2 { font-size: 1rem; font-weight: 700; }
.sem-block .sem-top .si h2 .sn { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sem-block .sem-top .si .ss { font-size: 0.68rem; color: var(--text3); margin-top: 0.1rem; }
.sem-block .sem-top .sg { display: flex; gap: 0.5rem; align-items: center; }
.sem-block .sem-top .sg .badge { padding: 0.15rem 0.5rem; border-radius: 50px; font-size: 0.6rem; font-weight: 700; }
.sem-block .sem-top .sg .badge.b-app { background: rgba(0,229,255,0.08); color: var(--cyan); }
.sem-block .sem-top .sg .badge.b-cur { background: rgba(168,85,247,0.08); color: var(--purple); }
.sem-block .sem-top .sg .badge.b-pen { background: rgba(244,114,182,0.08); color: var(--pink); }
.sem-block .sem-top .sg .badge.b-tesis { background: rgba(250,204,21,0.1); color: var(--yellow); }

.sem-block .sem-progress { height: 4px; background: var(--surface2); border-radius: 2px; margin-top: 0.5rem; overflow: hidden; }
.sem-block .sem-progress .sp-fill { height: 100%; border-radius: 2px; transition: width 0.8s ease; }

/* Cards */
.sem-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; }

.mc { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 0; cursor: pointer; transition: all 0.4s cubic-bezier(0.16,1,0.3,1); overflow: hidden; }
.mc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); transition: all 0.4s; opacity: 0.4; }
.mc:hover::before { opacity: 1; height: 4px; }
.mc:hover { transform: translateY(-6px); border-color: rgba(0,229,255,0.12); box-shadow: 0 16px 48px rgba(0,229,255,0.08), 0 0 30px rgba(0,229,255,0.03); }

.mc-inner { padding: 0.85rem 1rem; }
.mc-row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.mc-row1 .mc-code { padding: 0.1rem 0.45rem; background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.12); border-radius: 50px; font-size: 0.58rem; font-weight: 700; color: var(--cyan); }
.mc-row1 .mc-status { padding: 0.08rem 0.45rem; border-radius: 50px; font-size: 0.55rem; font-weight: 700; }
.mc-row1 .mc-status.approved { background: rgba(0,229,255,0.08); color: var(--cyan); }
.mc-row1 .mc-status.inprogress { background: rgba(168,85,247,0.08); color: var(--purple); }
.mc-row1 .mc-status.pending { background: rgba(244,114,182,0.08); color: var(--pink); }
.mc-row1 .mc-status.locked { background: rgba(251,146,60,0.08); color: var(--orange); }

.mc-name { font-size: 0.85rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.mc-desc { font-size: 0.68rem; color: var(--text3); line-height: 1.5; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.mc-row2 { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.5rem; }
.mc-tag { display: inline-flex; align-items: center; gap: 3px; padding: 0.1rem 0.4rem; background: var(--surface2); border-radius: 50px; font-size: 0.58rem; color: var(--text2); }
.mc-tag .ico { font-size: 0.65rem; }

.mc-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.mc-action { padding: 0.25rem 0.5rem; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text3); font: inherit; font-size: 0.55rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.mc-action:hover { border-color: var(--border2); color: var(--text2); background: var(--surface2); }
.mc-action.approved { border-color: rgba(0,229,255,0.15); color: var(--cyan); }
.mc-action.approved:hover { background: rgba(0,229,255,0.06); }
.mc-action.inprogress { border-color: rgba(168,85,247,0.15); color: var(--purple); }
.mc-action.inprogress:hover { background: rgba(168,85,247,0.06); }
.mc-action.pending { border-color: rgba(244,114,182,0.15); color: var(--pink); }
.mc-action.pending:hover { background: rgba(244,114,182,0.06); }

.mc-reqs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.mc-req { font-size: 0.55rem; padding: 0.08rem 0.3rem; border-radius: 4px; font-weight: 600; }
.mc-req.met { background: rgba(0,229,255,0.06); color: var(--cyan); }
.mc-req.unmet { background: rgba(251,146,60,0.06); color: var(--orange); }

/* ── MODAL ── */
#modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; opacity: 0; visibility: hidden; transition: all 0.35s; }
#modal.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); }
.modal-content { position: relative; width: 100%; max-width: 600px; max-height: 88vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r3); box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 60px rgba(0,229,255,0.04); transform: scale(0.92); transition: all 0.4s cubic-bezier(0.16,1,0.3,1); }
#modal.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 0.85rem; right: 0.85rem; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; color: var(--text2); font-size: 1.3rem; cursor: pointer; transition: all 0.3s; z-index: 10; }
.modal-close:hover { background: rgba(248,113,113,0.1); border-color: var(--red); color: var(--red); }
.modal-head { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); }
.modal-head .mcode { display: inline-block; padding: 0.12rem 0.5rem; background: var(--grad); border-radius: 50px; font-size: 0.65rem; font-weight: 700; margin-bottom: 0.4rem; }
.modal-head h2 { font-size: 1.2rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; letter-spacing: -0.3px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.68rem; color: var(--text3); }
.modal-body { padding: 1.25rem 1.5rem; }
.modal-body .is { margin-bottom: 1.25rem; }
.modal-body .is:last-child { margin: 0; }
.modal-body .is h4 { font-size: 0.68rem; font-weight: 800; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 6px; }
.modal-body .is p { font-size: 0.82rem; color: var(--text2); line-height: 1.7; white-space: pre-wrap; }
.modal-body .tl { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.modal-body .tl .t { padding: 0.2rem 0.55rem; background: rgba(168,85,247,0.08); border-radius: 50px; font-size: 0.7rem; color: var(--purple); font-weight: 500; }
.modal-body .tl .pt { padding: 0.2rem 0.55rem; background: rgba(244,114,182,0.06); border: 1px solid rgba(244,114,182,0.12); border-radius: 50px; font-size: 0.7rem; color: var(--pink); font-weight: 500; }
.modal-loading { padding: 3rem; text-align: center; }
.modal-foot { display: flex; gap: 0.5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .sb { flex: 1; min-width: 90px; padding: 0.5rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--text2); font: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.modal-foot .sb:hover { background: var(--surface2); }
.modal-foot .sb.active.approved { background: rgba(0,229,255,0.08); border-color: var(--cyan); color: var(--cyan); }
.modal-foot .sb.active.inprogress { background: rgba(168,85,247,0.08); border-color: var(--purple); color: var(--purple); }
.modal-foot .sb.active.pending { background: rgba(244,114,182,0.08); border-color: var(--pink); color: var(--pink); }

/* Modal AI info cards */
.modal-body .ia-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; margin-top: 0.4rem; }
.modal-body .ia-card { background: rgba(6,10,26,0.4); border: 1px solid rgba(0,229,255,0.08); border-radius: 10px; padding: 0.6rem 0.75rem; }
.modal-body .ia-card-area { font-size: 0.72rem; font-weight: 700; color: var(--cyan); margin-bottom: 0.2rem; }
.modal-body .ia-card-app { font-size: 0.65rem; color: var(--text3); line-height: 1.4; }
.modal-body .ia-list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.4rem; }
.modal-body .ia-list-item { font-size: 0.75rem; color: var(--text2); padding: 0.3rem 0.5rem; background: rgba(6,10,26,0.3); border-radius: 6px; line-height: 1.4; }
.modal-body .ia-list-item.ia-warn { background: rgba(251,146,60,0.06); border-left: 2px solid var(--orange); color: var(--orange); }
.modal-body .ia-example { background: rgba(168,85,247,0.06); border-left: 3px solid var(--purple); padding: 0.6rem 0.75rem; border-radius: 0 8px 8px 0; font-size: 0.78rem !important; }
.modal-body .ia-final { background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(168,85,247,0.06)); border: 1px solid rgba(0,229,255,0.12); border-radius: 12px; padding: 0.75rem; margin-top: 0.5rem; }
.modal-body .ia-final h4 { color: var(--cyan) !important; }

/* ── SELECTOR MODAL ── */
#selector-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 1rem; opacity: 0; visibility: hidden; transition: all 0.3s; }
#selector-modal.active { opacity: 1; visibility: visible; }
.sel-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.sel-content { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r3); box-shadow: 0 40px 120px rgba(0,0,0,0.6); transform: scale(0.92) translateY(10px); transition: all 0.4s cubic-bezier(0.16,1,0.3,1); }
#selector-modal.active .sel-content { transform: scale(1) translateY(0); }
.sel-head { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); position: relative; }
.sel-head h2 { font-size: 1.15rem; font-weight: 800; background: var(--grad4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.25rem; }
.sel-subtitle { font-size: 0.78rem; color: var(--text3); margin-bottom: 0; }
.sel-close { position: absolute; top: 0.85rem; right: 0.85rem; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; color: var(--text2); font-size: 1.3rem; cursor: pointer; transition: all 0.3s; }
.sel-close:hover { background: rgba(248,113,113,0.1); border-color: var(--red); color: var(--red); }
.sel-body { padding: 1.25rem 1.5rem; min-height: 200px; }
.sel-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; justify-content: flex-end; }

/* Selector steps */
.sel-step-label { font-size: 0.68rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.sel-step-label span { color: var(--text3); font-weight: 400; }

/* Universidad cards */
.sel-uni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.sel-uni-card { padding: 0.85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: all 0.25s; text-align: center; }
.sel-uni-card:hover { border-color: var(--cyan); background: rgba(0,229,255,0.05); transform: translateY(-1px); }
.sel-uni-card .sel-uni-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.sel-uni-card .sel-uni-name { font-size: 0.78rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.sel-uni-card .sel-uni-siglas { font-size: 0.65rem; color: var(--text3); }

/* Search input */
.sel-search-wrap { position: relative; margin-bottom: 1rem; }
.sel-search-input { width: 100%; padding: 0.7rem 1rem 0.7rem 2.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); font-size: 0.9rem; outline: none; transition: all 0.25s; box-sizing: border-box; }
.sel-search-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,229,255,0.08); }
.sel-search-wrap::before { content: "🔍"; position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); font-size: 0.9rem; pointer-events: none; }
.sel-search-examples { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sel-search-examples span { font-size: 0.65rem; color: var(--text3); }
.sel-example-chip { display: inline-block; padding: 0.15rem 0.5rem; background: rgba(168,85,247,0.08); border: 1px solid rgba(168,85,247,0.15); border-radius: 50px; font-size: 0.68rem; color: var(--purple); cursor: pointer; margin-left: 0.25rem; }
.sel-example-chip:hover { background: rgba(168,85,247,0.15); }

/* Plan cards */
.sel-plan-list { display: flex; flex-direction: column; gap: 0.6rem; }
.sel-plan-card { padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: all 0.25s; display: flex; align-items: center; gap: 0.75rem; }
.sel-plan-card:hover { border-color: var(--cyan); background: rgba(0,229,255,0.04); transform: translateX(2px); }
.sel-plan-card .sel-plan-icon { font-size: 1.6rem; flex-shrink: 0; }
.sel-plan-info { flex: 1; min-width: 0; }
.sel-plan-name { font-size: 0.85rem; font-weight: 700; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-plan-meta { font-size: 0.68rem; color: var(--text3); margin-top: 0.15rem; }
.sel-plan-code { padding: 0.2rem 0.55rem; background: var(--grad); border-radius: 50px; font-size: 0.65rem; font-weight: 700; color: white; flex-shrink: 0; }
.sel-plan-badge { padding: 0.2rem 0.5rem; background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.15); border-radius: 50px; font-size: 0.62rem; color: var(--cyan); }
.sel-plan-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; align-items: center; }
.sel-plan-code-badge { padding: 0.15rem 0.45rem; background: var(--grad); border-radius: 50px; font-size: 0.6rem; font-weight: 700; color: white; }
.sel-plan-estado { padding: 0.15rem 0.45rem; border-radius: 50px; font-size: 0.6rem; font-weight: 600; }
.sel-status-ok { background: rgba(63,185,80,0.12); color: #3fb950; border: 1px solid rgba(63,185,80,0.2); }
.sel-status-pending { background: rgba(210,153,34,0.12); color: #d29922; border: 1px solid rgba(210,153,34,0.2); }
.sel-plan-count { padding: 0.15rem 0.45rem; background: rgba(88,166,255,0.08); border-radius: 50px; font-size: 0.6rem; color: #58a6ff; }
.sel-plan-lock { font-size: 1rem; flex-shrink: 0; opacity: 0.5; }
.sel-plan-arrow { font-size: 1rem; flex-shrink: 0; color: var(--text3); }
.sel-confirm-meta { display: flex; gap: 0.5rem; justify-content: center; margin: 0.5rem 0; }
.sel-confirm-meta span { padding: 0.2rem 0.5rem; background: rgba(255,255,255,0.04); border-radius: 50px; font-size: 0.65rem; color: var(--text2); }
.sel-warning { margin-top: 0.75rem; padding: 0.6rem 0.8rem; background: rgba(210,153,34,0.08); border: 1px solid rgba(210,153,34,0.15); border-radius: var(--r); font-size: 0.72rem; color: #d29922; text-align: left; }
.sel-plan-facultad { font-size: 0.65rem; color: var(--text3); margin-top: 0.15rem; }

/* Loading */
.sel-loading { display: flex; align-items: center; justify-content: center; padding: 3rem; gap: 0.75rem; color: var(--text3); font-size: 0.85rem; }

/* Empty */
.sel-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text3); }
.sel-empty .ei { font-size: 2.5rem; margin-bottom: 0.5rem; }
.sel-empty h3 { font-size: 0.9rem; color: var(--text2); margin-bottom: 0.25rem; }
.sel-empty p { font-size: 0.78rem; }

/* Confirmation step */
.sel-confirm { text-align: center; padding: 1rem 0; }
.sel-confirm-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.sel-confirm h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.4rem; }
.sel-confirm p { font-size: 0.82rem; color: var(--text2); margin-bottom: 0.25rem; }
.sel-confirm .sel-confirm-plan { padding: 0.6rem 1rem; background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.12); border-radius: var(--r); margin: 0.75rem 0; font-size: 0.85rem; font-weight: 600; }

/* Selector buttons */
.sel-btn { padding: 0.55rem 1.1rem; border-radius: var(--r); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.25s; border: none; }
.sel-btn-primary { background: var(--cyan); color: var(--bg); }
.sel-btn-primary:hover { background: #00d4ff; }
.sel-btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text2); }
.sel-btn-secondary:hover { border-color: var(--text3); color: var(--text); }
.sel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Back button */
.sel-back { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 0.78rem; display: flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0; margin-bottom: 0.75rem; }
.sel-back:hover { color: var(--text); }

/* Responsive */
@media (max-width: 768px) {
  #selector-modal { padding: 0; align-items: flex-end; }
  #selector-modal.active .sel-content { border-radius: var(--r3) var(--r3) 0 0; max-height: 92vh; }
  .sel-uni-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .sel-head { padding: 1.25rem 1rem 0.85rem; }
  .sel-body { padding: 1rem; }
  .sel-foot { padding: 0.85rem 1rem; }
}

/* ── CONFIRM DIALOG ── */
#confirm-dialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2500; padding: 1rem; opacity: 0; visibility: hidden; transition: all 0.3s; }
#confirm-dialog.active { opacity: 1; visibility: visible; }
.confirm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.confirm-box { position: relative; width: 100%; max-width: 340px; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r2); padding: 1.5rem; box-shadow: 0 32px 80px rgba(0,0,0,0.5); text-align: center; transform: scale(0.9); transition: all 0.3s cubic-bezier(0.16,1,0.3,1); }
#confirm-dialog.active .confirm-box { transform: scale(1); }
.confirm-box .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.confirm-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.375rem; }
.confirm-box p { font-size: 0.78rem; color: var(--text2); margin-bottom: 1.25rem; }
.confirm-btns { display: flex; gap: 0.5rem; }
.confirm-btns button { flex: 1; padding: 0.6rem; border-radius: var(--r); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.3s; border: none; }
.confirm-btns .btn-cancel { background: var(--surface); border: 1px solid var(--border); color: var(--text2); }
.confirm-btns .btn-cancel:hover { background: var(--surface2); }
.confirm-btns .btn-ok { background: var(--grad); color: #fff; }
.confirm-btns .btn-ok:hover { box-shadow: 0 4px 16px rgba(0,229,255,0.2); }
.confirm-btns .btn-danger { background: var(--red); color: #fff; }
.confirm-btns .btn-danger:hover { box-shadow: 0 4px 16px rgba(248,113,113,0.2); }

/* ── Profesores ── */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.75rem; }
.prof-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 1rem; transition: all 0.3s; }
.prof-card:hover { transform: translateY(-4px); border-color: rgba(168,85,247,0.12); box-shadow: 0 8px 32px rgba(168,85,247,0.06); }
.prof-card .pfh { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.375rem; }
.prof-card .pfn { font-size: 0.85rem; font-weight: 700; }
.prof-card .pfs { font-size: 0.75rem; }
.prof-card .pfs .on { color: var(--yellow); }
.prof-card .pfs .off { color: var(--text3); }
.prof-card .pfm { font-size: 0.68rem; color: var(--cyan); font-weight: 500; margin-top: 0.25rem; }

/* ── Apuntes ── */
.ap-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ap-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 1rem 1.15rem; transition: all 0.3s; }
.ap-item:hover { border-color: rgba(0,229,255,0.08); }
.ap-item .ap-tit { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.ap-item .ap-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ap-item .ap-tag { padding: 0.1rem 0.4rem; background: rgba(168,85,247,0.06); border-radius: 50px; font-size: 0.6rem; color: var(--purple); font-weight: 500; }

/* ── Calendario ── */
.ev-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ev-item { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); padding: 0.85rem; transition: all 0.3s; }
.ev-item:hover { border-color: rgba(0,229,255,0.1); }
.ev-item .ev-ico { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: var(--r); font-size: 1rem; flex-shrink: 0; }
.ev-item .ev-ico.examen { background: rgba(248,113,113,0.08); }
.ev-item .ev-ico.entrega { background: rgba(0,229,255,0.08); }
.ev-item .ev-ico.tarea { background: rgba(168,85,247,0.08); }
.ev-item .ev-ico.otro { background: rgba(251,146,60,0.08); }
.ev-item .ev-info { flex: 1; min-width: 0; }
.ev-item .ev-info h4 { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.1rem; }
.ev-item .ev-info .ev-d { font-size: 0.68rem; color: var(--text3); }
.ev-item .ev-ty { padding: 0.1rem 0.4rem; border-radius: 50px; font-size: 0.55rem; text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px; flex-shrink: 0; }
.ev-item .ev-ty.examen { background: rgba(248,113,113,0.08); color: var(--red); }
.ev-item .ev-ty.entrega { background: rgba(0,229,255,0.08); color: var(--cyan); }
.ev-item .ev-ty.tarea { background: rgba(168,85,247,0.08); color: var(--purple); }
.ev-item .ev-ty.otro { background: rgba(251,146,60,0.08); color: var(--orange); }

/* ── Calendario Académico ── */
.calendario-wrap { max-width: 800px; margin: 0 auto; }
.calendario-head { text-align: center; margin-bottom: 1.25rem; padding: 1.5rem 1rem; background: rgba(12,16,30,0.5); border: 1px solid rgba(255,255,255,0.04); border-radius: 20px; backdrop-filter: blur(20px); }
.calendario-head h1 { font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, #00e5ff, #a855f7, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.5px; margin-bottom: 0.3rem; }
.calendario-subtitle { font-size: 0.78rem; color: var(--text3); margin-bottom: 0.75rem; }
.calendario-meta { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.cal-badge { padding: 0.25rem 0.75rem; background: linear-gradient(135deg, rgba(0,229,255,0.15), rgba(168,85,247,0.15)); border: 1px solid rgba(0,229,255,0.25); border-radius: 50px; color: var(--cyan); font-weight: 600; font-size: 0.72rem; box-shadow: 0 0 16px rgba(0,229,255,0.08); }
.cal-events-count { padding: 0.25rem 0.75rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.06); border-radius: 50px; color: var(--text2); font-size: 0.72rem; font-weight: 500; }

.calendario-controls { margin-bottom: 1.25rem; }
.period-selector { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; }
.period-btn { padding: 0.45rem 1rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; color: var(--text2); font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.16,1,0.3,1); backdrop-filter: blur(8px); }
.period-btn:hover { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.3); color: var(--cyan); transform: translateY(-1px); }
.period-btn.active { background: linear-gradient(135deg, rgba(0,229,255,0.2), rgba(168,85,247,0.2)); border-color: rgba(0,229,255,0.5); color: var(--cyan); box-shadow: 0 0 20px rgba(0,229,255,0.2), inset 0 1px 0 rgba(255,255,255,0.1); transform: translateY(-1px); }

.cal-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.cal-card { display: flex; gap: 1rem; background: rgba(12,16,30,0.6); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 1rem; backdrop-filter: blur(16px); transition: all 0.3s; }
.cal-card-active { border-color: rgba(0,229,255,0.3); box-shadow: 0 0 32px rgba(0,229,255,0.1), inset 0 1px 0 rgba(255,255,255,0.06); }
.cal-card-proximo { border-color: rgba(168,85,247,0.3); box-shadow: 0 0 32px rgba(168,85,247,0.1), inset 0 1px 0 rgba(255,255,255,0.06); }
.cal-card-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 1.5rem; flex-shrink: 0; }
.cal-card-body { flex: 1; min-width: 0; }
.cal-card-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3); margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.3rem; }
.cal-card-body h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.25rem; line-height: 1.3; }
.cal-card-body p { font-size: 0.72rem; color: var(--text2); margin-bottom: 0.4rem; line-height: 1.5; }
.cal-card-dates { font-size: 0.68rem; color: var(--cyan); font-weight: 600; display: flex; align-items: center; gap: 0.3rem; }

.cal-alert { background: rgba(251,146,60,0.06); border: 1px solid rgba(251,146,60,0.2); border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.cal-alert-icon { font-size: 1.2rem; }
.cal-alert-text { flex: 1; }
.cal-alert-text strong { display: block; font-size: 0.78rem; color: var(--text); margin-bottom: 0.1rem; }
.cal-alert-text span { font-size: 0.65rem; color: var(--text3); }

.cal-timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.cal-month { background: rgba(12,16,30,0.4); border: 1px solid rgba(255,255,255,0.04); border-radius: 16px; padding: 1rem; backdrop-filter: blur(12px); }
.cal-month-title { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text3); margin-bottom: 0.85rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.04); display: flex; align-items: center; gap: 0.5rem; }
.cal-month-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--purple)); }
.cal-event { display: flex; gap: 0.85rem; background: rgba(6,10,26,0.4); border: 1px solid rgba(255,255,255,0.04); border-radius: 12px; padding: 0.85rem; margin-bottom: 0.5rem; transition: all 0.3s cubic-bezier(0.16,1,0.3,1); }
.cal-event:hover { border-color: rgba(0,229,255,0.12); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.cal-event.est-finalizado { opacity: 0.45; }
.cal-event.est-activo { border-color: rgba(0,229,255,0.2); background: rgba(0,229,255,0.03); }
.cal-event-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.15rem; flex-shrink: 0; }
.cal-event-info { flex: 1; min-width: 0; }
.cal-event-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.cal-event-info h4 { font-size: 0.82rem; font-weight: 600; line-height: 1.3; }
.cal-event-prio { font-size: 0.52rem; font-weight: 700; text-transform: uppercase; padding: 0.15rem 0.4rem; border-radius: 50px; flex-shrink: 0; }
.prio-baja { background: rgba(34,211,238,0.1); color: #22d3ee; }
.prio-media { background: rgba(168,85,247,0.1); color: #a855f7; }
.prio-alta { background: rgba(251,146,60,0.1); color: #fb923c; }
.prio-critica { background: rgba(248,113,113,0.12); color: #f87171; }
.cal-event-desc { font-size: 0.68rem; color: var(--text2); margin-bottom: 0.4rem; line-height: 1.5; }
.cal-event-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.6rem; color: var(--text3); align-items: center; }
.cal-event-cat { padding: 0.1rem 0.45rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 50px; text-transform: capitalize; font-weight: 500; }
.cal-event-estado { padding: 0.1rem 0.45rem; border-radius: 50px; font-weight: 600; }
.est-activo .cal-event-estado { background: rgba(0,229,255,0.12); color: var(--cyan); }
.est-proximo .cal-event-estado { background: rgba(168,85,247,0.12); color: var(--purple); }
.est-finalizado .cal-event-estado { background: rgba(34,211,238,0.08); color: #22d3ee; }
.cal-dias { padding: 0.1rem 0.45rem; background: rgba(168,85,247,0.12); color: var(--purple); border-radius: 50px; font-weight: 700; }
.cal-next-widget { background: rgba(6,10,26,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 0.6rem 0.75rem; margin-bottom: 0.35rem; }
.cnw-badge { display: inline-block; font-size: 0.52rem; font-weight: 700; text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 50px; margin-bottom: 0.2rem; background: rgba(168,85,247,0.12); color: var(--purple); }
.cnw-badge.cnw-active { background: rgba(0,229,255,0.12); color: var(--cyan); }
.cnw-title { font-size: 0.72rem; font-weight: 600; margin-bottom: 0.1rem; }
.cnw-dates { font-size: 0.6rem; color: var(--text3); }

/* Tab switcher */
.cal-tabs { display: flex; justify-content: center; gap: 0.3rem; margin-bottom: 1rem; }
.cal-tab { padding: 0.5rem 1.25rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; color: var(--text2); font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.16,1,0.3,1); }
.cal-tab:hover { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.25); color: var(--cyan); }
.cal-tab.active { background: linear-gradient(135deg, rgba(0,229,255,0.2), rgba(168,85,247,0.15)); border-color: rgba(0,229,255,0.4); color: var(--cyan); box-shadow: 0 0 20px rgba(0,229,255,0.15); }

/* Reminder buttons */
.cal-reminders { display: flex; gap: 0.35rem; margin-top: 0.5rem; flex-wrap: wrap; }
.rem-btn { padding: 0.25rem 0.6rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; color: var(--text3); font-size: 0.6rem; font-weight: 600; cursor: pointer; transition: all 0.25s; }
.rem-btn:hover { border-color: rgba(0,229,255,0.3); color: var(--cyan); background: rgba(0,229,255,0.06); }
.rem-btn.active { background: rgba(0,229,255,0.15); border-color: rgba(0,229,255,0.4); color: var(--cyan); }
.rem-btn.active::before { content: '✓ '; }

/* Checklist */
.cal-check-toggle { cursor: pointer; padding: 0.1rem 0.4rem; background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.2); border-radius: 50px; font-size: 0.6rem; transition: all 0.2s; }
.cal-check-toggle:hover { background: rgba(168,85,247,0.2); }
.cal-checklist { margin-top: 0.75rem; background: rgba(6,10,26,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 0.75rem; }
.cal-checklist-items { display: flex; flex-direction: column; gap: 0.4rem; }
.check-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; background: rgba(255,255,255,0.03); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.check-item:hover { background: rgba(0,229,255,0.05); }
.check-item.checked { opacity: 0.5; text-decoration: line-through; }
.check-item input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--cyan); cursor: pointer; }
.check-item span { font-size: 0.72rem; color: var(--text2); }

/* Critical event styling */
.cal-event-critico { border-color: rgba(248,113,113,0.3) !important; background: rgba(248,113,113,0.04) !important; }
.cal-event-critico:hover { border-color: rgba(248,113,113,0.5) !important; box-shadow: 0 0 20px rgba(248,113,113,0.1) !important; }

/* Enhanced critical alerts */
.cal-alert-critica { background: rgba(248,113,113,0.06); border-color: rgba(248,113,113,0.3); border-left: 3px solid #f87171; }
.cal-alert-critica .cal-alert-icon { color: #f87171; }
.cal-alert-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.cal-alert-header strong { font-size: 0.78rem; color: var(--text); flex: 1; }
.cal-alert-body { font-size: 0.65rem; color: var(--text3); line-height: 1.5; margin-top: 0.25rem; }

/* Esta semana view */
.cal-student-msg { background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(168,85,247,0.08)); border: 1px solid rgba(0,229,255,0.15); border-radius: 12px; padding: 0.85rem 1rem; margin-bottom: 1.25rem; font-size: 0.78rem; color: var(--text2); line-height: 1.5; text-align: center; }
.cal-semana-section { margin-bottom: 1.25rem; }
.cal-semana-title { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem; }
.semana-event-card { display: flex; gap: 0.75rem; background: rgba(6,10,26,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 0.75rem; margin-bottom: 0.4rem; transition: all 0.3s; align-items: center; }
.semana-event-card:hover { border-color: rgba(0,229,255,0.12); transform: translateY(-1px); }
.semana-event-card.semana-critico { border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.04); }
.sec-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.1rem; flex-shrink: 0; }
.sec-info { flex: 1; min-width: 0; }
.sec-title { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.2rem; }
.sec-dates { font-size: 0.62rem; color: var(--text3); }
.sec-desc { font-size: 0.65rem; color: var(--text2); margin-top: 0.2rem; line-height: 1.4; }
.sec-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.btn-icon { background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 0.4rem; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.btn-icon:hover { background: rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.25); }

/* Pensum suggestions */
.cal-sugerencias { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
.cal-sugerencia-item { display: flex; align-items: center; gap: 0.5rem; background: rgba(6,10,26,0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 0.5rem 0.65rem; font-size: 0.7rem; }
.sug-codigo { font-weight: 700; color: var(--cyan); min-width: 70px; font-size: 0.65rem; }
.sug-nombre { flex: 1; color: var(--text2); }
.sug-creditos { color: var(--text3); font-size: 0.6rem; }
.sug-estado { font-size: 0.8rem; }
.sug-aprobada { opacity: 0.5; }
.sug-cursando { border-color: rgba(0,229,255,0.15); background: rgba(0,229,255,0.04); }

/* IA v2 - enhanced */
.ia-nivel { display: inline-block; font-size: 0.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 1px 6px; border-radius: 4px; margin-left: 4px; vertical-align: middle; }
.ia-nivel-directa { background: rgba(0,229,255,0.12); color: #00e5ff; }
.ia-nivel-media { background: rgba(251,146,60,0.12); color: #fb923c; }
.ia-nivel-transversal { background: rgba(168,85,247,0.12); color: #a855f7; }
.ia-sub { font-size: 0.7rem; color: var(--text3); line-height: 1.4; display: block; margin-top: 2px; }
.ia-tipo { display: inline-block; font-size: 0.55rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; padding: 1px 5px; border-radius: 4px; background: rgba(0,229,255,0.08); color: var(--cyan); margin-right: 4px; }
.ia-datos-clave { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ia-dato { flex: 1; min-width: 120px; background: rgba(6,10,26,0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 0.6rem 0.75rem; }
.ia-dato-full { flex: 1 1 100%; }
.ia-dato-label { display: block; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 4px; }
.ia-dato-val { font-size: 0.85rem; font-weight: 600; }
.ia-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ia-tag { display: inline-block; padding: 2px 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; font-size: 0.65rem; color: var(--text2); }

/* Export button */
.cal-export-btn { cursor: pointer; padding: 0.2rem 0.5rem; background: rgba(6,10,26,0.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 50px; font-size: 0.6rem; color: var(--text3); transition: all 0.2s; margin-left: auto; }
.cal-export-btn:hover { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.25); color: var(--cyan); }

@media (max-width: 600px) {
  .cal-summary { grid-template-columns: 1fr; }
  .calendario-head { padding: 1rem 0.75rem; }
  .calendario-head h1 { font-size: 1.3rem; }
  .cal-card { padding: 0.85rem; }
  .cal-card-icon { width: 44px; height: 44px; font-size: 1.2rem; }
}

/* Toast */
#toast { position: fixed; bottom: calc(var(--nav) + 16px); left: 50%; transform: translateX(-50%) translateY(100px); padding: 0.7rem 1.5rem; background: var(--bg2); border: 1px solid var(--border2); border-radius: 50px; box-shadow: 0 16px 48px rgba(0,0,0,0.5); z-index: 3000; opacity: 0; visibility: hidden; transition: all 0.35s cubic-bezier(0.16,1,0.3,1); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
#toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
#toast .msg { font-size: 0.82rem; color: var(--text); font-weight: 500; }
#toast.success { border-color: rgba(0,229,255,0.2); }
#toast.error { border-color: rgba(248,113,113,0.2); }
#toast.info { border-color: rgba(168,85,247,0.2); }
#toast.warning { border-color: rgba(251,146,60,0.2); }

/* Empty / Loading states */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .ei { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.78rem; color: var(--text3); }
.loading-state { text-align: center; padding: 3rem; color: var(--text3); }

.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r); }
.skeleton-h { height: 16px; margin-bottom: 10px; }
.skeleton-card { height: 120px; margin-bottom: 12px; }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(0.9); padding: 4px 8px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 6px; font-size: 0.6rem; color: var(--text2); white-space: nowrap; opacity: 0; pointer-events: none; transition: all 0.2s; }
[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* Responsive */
@media (min-width: 900px) { .dash-grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 768px) {
  .dash-hero { grid-template-columns: 1fr; gap: 1rem; text-align: center; }
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .sem-cards { grid-template-columns: 1fr; }
  .main-content { padding-left: 1rem; padding-right: 1rem; }
  .bottom-nav { height: 60px; }
  .nav-item { font-size: 0.5rem; padding: 6px 10px; min-width: 44px; }
  .nav-item svg { width: 22px; height: 22px; }
  .modal-content { max-width: 100%; border-radius: var(--r2); margin: 0.5rem; }
  .modal-head { padding: 1.25rem 1rem 0.85rem; }
  .modal-body { padding: 1rem; }
  .modal-foot { padding: 0.85rem 1rem; }
  .auth-card { padding: 2rem 1.25rem; }
  .dash-index .num { font-size: 2.5rem; }
  .sem-timeline { padding-left: 32px; }
  .sem-block .sem-dot { left: -23px; width: 11px; height: 11px; }
  .sem-block .sem-top .si .sem-icon { font-size: 1.1rem; }
  .semester-sticky-bar { top: calc(var(--header) + 8px); padding: 0.5rem 0.75rem; gap: 0.3rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; justify-content: flex-start; }
  .semester-sticky-bar::-webkit-scrollbar { display: none; }
  .semester-sticky-bar .semester-nav-btn { padding: 0.35rem 0.7rem; font-size: 0.68rem; flex-shrink: 0; }
}
@media (max-width: 400px) {
  .dash-grid { grid-template-columns: 1fr; }
  .mc-row2 { flex-direction: column; align-items: flex-start; }
}
