/* ═══════════════════════════════════════════════
   Studuet Dashboard Redesign — base / shell
   Shared tokens + the A/B direction switcher chrome
═══════════════════════════════════════════════ */
:root {
  --p: #5B21B6;
  --pl: #7C3AED;
  --pxl: #A78BFA;
  --pxxl: #EDE9FE;
  --ink: #0D0A1E;
  --ink2: #1A1630;
  --slate: #4B4567;
  --muted: #8B87A0;
  --bg: #F7F5FF;
  --white: #fff;
  --border: #E8E3F5;
  --border-light: #F0EBF8;
  --teal: #0D9488;
  --teall: #2DD4BF;
  --amber: #B45309;
  --amberl: #F59E0B;
  --green: #047857;
  --greenl: #10B981;
  --red: #DC2626;
  --redl: #F87171;
  --blue: #3B82F6;
  --pink: #F472B6;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #0B0814;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 { font-family: 'Sora', sans-serif; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
::selection { background: rgba(124,58,237,.25); }

/* ── App shell: switcher rail + stage ── */
#root { min-height: 100vh; }

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top switcher bar */
.switcher {
  position: sticky;
  top: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 22px;
  background: rgba(11, 8, 20, .82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  flex-shrink: 0;
}
.switcher-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-mark { height: 26px; width: 26px; border-radius: 7px; display: block; flex-shrink: 0; }
.brand-word { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: #fff; line-height: 1; }
.brand-word em {
  font-style: normal;
  background: linear-gradient(120deg, #A78BFA, #7C3AED);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.switcher-tag {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .4);
  letter-spacing: .04em;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .12);
}
.seg {
  margin: 0 auto;
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  padding: 4px;
}
.seg-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .55);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.seg-btn .seg-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; opacity: .9;
}
.seg-btn .seg-name { font-family: 'Sora', sans-serif; font-weight: 800; }
.seg-btn .seg-sub { font-weight: 500; opacity: .7; font-size: 11.5px; }
.seg-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.seg-btn.active.a { box-shadow: inset 0 0 0 1px rgba(167,139,250,.5), 0 4px 16px rgba(124,58,237,.3); }
.seg-btn.active.b { box-shadow: inset 0 0 0 1px rgba(45,212,191,.4), 0 4px 16px rgba(13,148,136,.28); }

.switcher-info {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: background .2s, color .2s;
}
.switcher-info:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* The stage that holds whichever direction is active */
.stage {
  flex: 1;
  position: relative;
  min-height: 0;
}

/* Rationale overlay */
.rationale-ov {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(8, 6, 16, .72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: ovfade .2s ease;
}
@keyframes ovfade { from { opacity: 0; } to { opacity: 1; } }
.rationale {
  background: #fff;
  border-radius: 22px;
  max-width: 720px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 38px 40px;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,.5);
  animation: rin .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes rin { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.rationale h2 { font-size: 26px; font-weight: 900; color: var(--ink); letter-spacing: -.02em; margin-bottom: 6px; }
.rationale .r-lead { font-size: 14.5px; color: var(--slate); margin-bottom: 26px; line-height: 1.6; }
.rationale h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--p); margin: 26px 0 12px; }
.rationale p { font-size: 14px; color: var(--slate); margin-bottom: 12px; line-height: 1.65; }
.rationale ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.rationale li { font-size: 13.5px; color: var(--slate); display: flex; gap: 10px; line-height: 1.5; }
.rationale li b { color: var(--ink); font-weight: 700; }
.r-dirs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.r-dir { border: 1.5px solid var(--border); border-radius: 16px; padding: 18px; }
.r-dir-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 9px; }
.r-dir-tag .d { width: 8px; height: 8px; border-radius: 50%; }
.r-dir h4 { font-size: 17px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
.r-dir p { font-size: 13px; margin: 0; }
.r-close {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.r-close:hover { background: var(--border); color: var(--ink); }

.dir-pane { animation: panefade .35s ease; }
@keyframes panefade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 720px) {
  .switcher { padding: 9px 12px; gap: 10px; flex-wrap: wrap; }
  .switcher-tag { display: none; }
  .seg-btn { padding: 7px 12px; }
  .seg-btn .seg-sub { display: none; }
  .switcher-info span { display: none; }
  .rationale { padding: 26px 20px; }
  .r-dirs { grid-template-columns: 1fr; }
}
