:root {
  --ice: #f5f8fc;
  --ice-2: #e9f0f8;
  --ice-3: #d1ddeb;
  --prussia: #10366b;
  --deep: #092348;
  --blue: #1769d2;
  --cyan: #16a6cf;
  --green: #24875a;
  --amber: #a96d14;
  --red: #c64245;
  --ink: #17243a;
  --muted: #66758a;
  --line: #dce5f0;
  --surface: #fff;
  --surface-soft: #f7f9fc;
  --shadow: 0 16px 40px rgba(18, 43, 81, .055);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
}

:root[data-theme="dark"] {
  --ice: #000;
  --ice-2: #18191d;
  --ice-3: #303137;
  --prussia: #f3f7ff;
  --deep: #000;
  --blue: #8ab4ff;
  --cyan: #54d3e8;
  --green: #65c992;
  --amber: #efbd69;
  --red: #ff8b8e;
  --ink: #f2f3f5;
  --muted: #a0a3ad;
  --line: #2a2b30;
  --surface: #111214;
  --surface-soft: #191a1e;
  --shadow: 0 16px 40px rgba(0, 0, 0, .22);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }
body { background: var(--ice); color: var(--ink); font-size: 15px; letter-spacing: -.012em; }
button, input, select, textarea { font: inherit; }
button, a { transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .2s ease, transform .2s var(--ease-out); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 38%, transparent); outline-offset: 3px; }

.sidebar {
  position: fixed;
  inset: auto auto calc(14px + env(safe-area-inset-bottom)) 50%;
  z-index: 40;
  display: flex;
  width: min(1120px, calc(100vw - 32px));
  height: 78px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 10px 14px;
  transform: translateX(-50%);
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  background: rgba(249,252,255,.73);
  box-shadow: 0 16px 54px rgba(15,52,101,.19), inset 0 1px 0 rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  transition: box-shadow .4s var(--ease-out), background .4s ease;
}
.sidebar::before { position: absolute; inset: -70%; z-index: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(ellipse at 18% 52%, rgba(80,157,255,.20), transparent 31%), radial-gradient(ellipse at 75% 48%, rgba(71,221,239,.22), transparent 33%), radial-gradient(ellipse at 49% 0%, rgba(255,255,255,.72), transparent 38%); content: ""; filter: blur(19px); animation: water-drift 15s ease-in-out infinite alternate; }
.sidebar::after { position: absolute; inset: 0; z-index: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.34); border-radius: inherit; content: ""; }
.sidebar > * { position: relative; z-index: 1; }
.main-area { margin-left: 0; }
.brand { flex: 0 0 auto; padding: 0 10px 0 2px; border: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--prussia); }
.brand-copy strong { letter-spacing: -.035em; font-size: 16px; }
.brand-copy small, .nav-caption { display: none; }
.sidebar .main-nav { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.sidebar .main-nav { scrollbar-width: thin; scrollbar-color: rgba(16,54,107,.25) transparent; }
.sidebar .main-nav::-webkit-scrollbar { height: 3px; }
.sidebar .main-nav::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(16,54,107,.24); }
.sidebar .nav-group { display: contents; }
.sidebar .nav-group h2 { display: none; }
.sidebar #learningNav { flex: 0 0 auto; max-width: 28%; padding-left: 10px; border-left: 1px solid color-mix(in srgb, var(--prussia) 15%, transparent); }
.nav-link { flex: 0 0 auto; min-height: 46px; height: 46px; border: 1px solid transparent; border-radius: 16px; padding: 0 12px; color: #4c5d74; font-size: 12px; }
.nav-link:hover { background: var(--surface-soft); color: var(--ink); }
.nav-link.active, :root[data-theme="dark"] .nav-link.active { position: relative; overflow: hidden; border-color: rgba(23,105,210,.12); background: linear-gradient(125deg, rgba(23,105,210,.13), rgba(22,166,207,.12)); color: var(--prussia); font-weight: 650; box-shadow: inset 0 1px 0 rgba(255,255,255,.58), 0 4px 16px rgba(32,94,168,.09); }
.nav-link.active:before { position: absolute; inset: -60%; display: block; width: auto; height: auto; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.45), transparent 65%); content: ""; animation: active-water 6s ease-in-out infinite alternate; }
.nav-link > span { position: relative; z-index: 1; }
.nav-link > span:nth-child(2) { flex: 0 0 auto; }
.nav-link:active { transform: scale(.94); }
.help-card { border-radius: 15px; background: var(--surface-soft); }
.help-card strong { color: var(--ink); font-size: 12px; }
.help-card p { font-size: 11px; }
.sidebar-footer { font-size: 11px; }
.sidebar-bottom { display: none; }
.second-caption { display: none !important; }
.sidebar.open { transform: translateX(-50%); }
.topbar { position: sticky; top: 0; z-index: 30; height: 66px; padding-inline: clamp(20px, 4vw, 54px); border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent); background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(170%) blur(22px); }
.breadcrumb { gap: 12px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-actions { gap: 12px; }
.icon-button, .avatar { width: 38px; height: 38px; border-radius: 12px; border-color: var(--line); background: var(--surface); color: var(--ink); }
.global-search-trigger { min-height: 38px; border-radius: 12px; border-color: var(--line); background: var(--surface); color: var(--muted); }
.content-wrap { max-width: 1580px; padding: clamp(28px, 4vw, 54px) clamp(20px, 4vw, 56px) calc(150px + env(safe-area-inset-bottom)); }
.page-head { margin-bottom: 30px; }
.page-head h1 { color: var(--ink); font-size: clamp(30px, 3.3vw, 44px); font-weight: 680; letter-spacing: -.055em; line-height: 1.08; }
.page-head .lead, .page-head p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.eyebrow, .mini-label { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .075em; }
.panel, .stat-card, .workspace-card, .section-block, .table-wrap, .price-card, .field, .community-card, .community-post, .community-compose {
  border-color: var(--line);
  border-radius: 17px;
  box-shadow: 0 5px 20px rgba(25, 25, 35, .025);
}
.section-block { padding: 22px; }
.panel-title h2, .section-heading h2 { color: var(--ink); font-size: 20px; font-weight: 650; letter-spacing: -.035em; }
.panel-title p, .section-note { color: var(--muted); }
.stat-card { min-height: 116px; padding: 20px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { color: var(--ink); font-size: 28px; letter-spacing: -.055em; }
.progress-track, .bar-row-track { display: none !important; }
.bar-list { gap: 0; }
.bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.bar-row-label { color: var(--ink); font-size: 13px; }
.bar-row-value { color: var(--ink); font-size: 14px; }
.bar-row:last-child { border-bottom: 0; }
.btn { min-height: 42px; border-radius: 12px; padding-inline: 17px; background: var(--prussia); box-shadow: none; color: #fff; font-size: 13px; font-weight: 600; }
.btn:hover { background: var(--blue); box-shadow: 0 7px 18px rgba(20,50,100,.13); transform: translateY(-1px); }
.btn.secondary, .btn.tertiary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn.secondary:hover, .btn.tertiary:hover { background: var(--surface-soft); }
.field { min-height: 43px; border-radius: 11px; background: var(--surface); color: var(--ink); }
.list-stack { gap: 9px; }
.list-row { min-height: 70px; padding: 13px 15px; border-color: var(--line); border-radius: 14px; }
.list-row:hover { background: var(--surface-soft); }
.list-row-main h3 { color: var(--ink); font-size: 14px; font-weight: 620; }
.list-row-main p { color: var(--muted); }
.workspace-card { min-height: 190px; padding: 22px; }
.workspace-card:hover, .public-explore-card:hover { border-color: color-mix(in srgb, var(--blue) 34%, var(--line)); box-shadow: 0 14px 32px rgba(30, 40, 90, .08); transform: translateY(-3px); }
.card-arrow, .global-search-arrow { display: none !important; }
.card-title { font-size: 16px; }
.card-desc, .card-status { color: var(--muted); }
.hero-dashboard { grid-template-columns: minmax(0, 1.45fr) minmax(220px, .8fr); gap: 16px; margin-bottom: 17px; }
.hero-dashboard { overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.hero-dash-main { min-height: 260px; padding: clamp(25px, 3vw, 38px); border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(135deg, #fff 0%, #edf4fc 100%); box-shadow: var(--shadow); color: var(--ink); }
.hero-dash-main:before, .hero-dash-main:after { display: none; }
.hero-dash-main h2 { max-width: 700px; color: var(--ink); font-size: clamp(28px, 3.2vw, 42px); font-weight: 660; letter-spacing: -.06em; line-height: 1.12; }
.hero-dash-main p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.hero-dash-main .eyebrow { color: var(--muted); }
.hero-dash-side { gap: 10px; padding: 0; background: transparent; grid-template-columns: 1fr; }
.welcome-mini { padding: 17px; border-radius: 16px; }
.welcome-mini strong { color: var(--ink); font-size: 18px; letter-spacing: -.035em; }
.welcome-mini p { color: var(--muted); }
.mini-label { margin-bottom: 8px; }
:root[data-theme="dark"] .hero-dash-main { border-color: var(--line); background: linear-gradient(135deg, #202127, #252a3b); color: var(--ink); }
:root[data-theme="dark"] .hero-dash-main h2 { color: var(--ink); }
.section-heading { margin: 31px 0 15px; }
.section-heading h2 { margin: 0; }
.card-grid, .workspace-grid { gap: 14px; }
.card-icon { width: 40px; height: 40px; border-radius: 13px; }
.tag, .status-pill, .status-tag { border-radius: 999px; }
.form-grid { gap: 17px; }
.field-label { color: var(--ink); font-size: 12px; font-weight: 600; }
.form-hint { color: var(--muted); line-height: 1.55; }
.form-actions { gap: 10px; }
.tabs, .tab-list { gap: 5px; }
.tab-button, .tabs button { border-radius: 10px; }
.message-bubble { border-radius: 16px; }
.chat-composer, .message-compose { border-radius: 15px; }
.quiz-progress { border-radius: 12px; }
.quiz-question, .question-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.settings-grid { gap: 18px; }
.settings-grid > .panel { padding: 20px; }
.callout { border-radius: 13px; }
.empty-card { border-radius: 18px; }
.empty-card h2 { color: var(--ink); font-size: 19px; }
.empty-card p { color: var(--muted); font-size: 13px; }
.brand { border-bottom: 1px solid var(--line); }
.brand-mark { transform: none; box-shadow: none; }
.nav-link:hover { transform: none; }
.nav-link.active { box-shadow: none; }
.nav-link.active .nav-glyph { color: var(--blue); }
.eyebrow-mark { border-radius: 50%; transform: none; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(18, 43, 81, .08); }
.list-row:hover { transform: none; }
.auth-brand:after { display: none; }
.auth-card { box-shadow: 0 30px 100px rgba(0, 20, 36, .22); }
:root[data-theme="dark"] .hero-dashboard { background: transparent; box-shadow: none; }
.table-wrap { overflow: auto; }
th { color: var(--muted); font-size: 11px; font-weight: 600; }
td { color: var(--ink); }
.modal-card, .auth-card { border-color: var(--line); border-radius: 20px; box-shadow: 0 25px 80px rgba(10, 10, 15, .2); }
.toast { border-radius: 12px; }
.loading-skeleton-card, .loading-skeleton-wide { border-color: var(--line); border-radius: 16px; background: var(--surface); }
.content-wrap.is-entering > * { animation: premium-enter .36s var(--ease-out) both; }
.content-wrap.is-entering > *:nth-child(2) { animation-delay: 35ms; }
.content-wrap.is-entering > *:nth-child(3) { animation-delay: 70ms; }
@keyframes premium-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

/* Public home */
.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  align-items: center;
  min-height: 420px;
  overflow: hidden;
  margin: 0 0 26px;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, #fff 0%, #edf3fc 100%);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.public-hero:after { position: absolute; right: 15%; bottom: -190px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, rgba(114,141,230,.18), transparent 68%); content: ""; }
.public-hero-copy { position: relative; z-index: 1; max-width: 590px; }
.public-eyebrow { margin: 0 0 18px; color: #737681; font-size: 11px; font-weight: 650; letter-spacing: .09em; }
.public-hero h1 { margin: 0; color: var(--prussia); font-size: clamp(46px, 6vw, 76px); font-weight: 680; letter-spacing: -.075em; line-height: .99; }
.public-hero h1 em { color: var(--blue); font-style: normal; }
.public-hero-copy > p:not(.public-eyebrow) { max-width: 480px; margin: 23px 0 27px; color: #666872; font-size: 16px; line-height: 1.7; }
.public-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 17px; }
.public-hero .btn { background: var(--prussia); }
.public-privacy { color: #6f7079; font-size: 12px; }
.public-hero-art { position: relative; z-index: 1; width: min(100%, 360px); height: 300px; justify-self: center; }
.art-sheet { position: absolute; left: 50%; top: 50%; width: 190px; height: 238px; border: 1px solid rgba(50, 60, 100, .11); border-radius: 19px; box-shadow: 0 24px 50px rgba(37, 46, 82, .13); }
.sheet-back { background: #dce3f7; transform: translate(-38%, -47%) rotate(13deg); }
.sheet-mid { background: #f4ddbd; transform: translate(-58%, -49%) rotate(-11deg); }
.sheet-front { display: flex; flex-direction: column; gap: 15px; padding: 30px 25px; background: rgba(255,255,255,.94); transform: translate(-50%, -50%) rotate(2deg); animation: paper-float 6s ease-in-out infinite; }
.sheet-front span { width: 42px; height: 42px; margin-bottom: 12px; border-radius: 14px; background: linear-gradient(135deg, #5d77ce, #8a9ce0); }
.sheet-front i { width: 100%; height: 6px; border-radius: 9px; background: #e7e8ef; }
.sheet-front i:nth-of-type(2) { width: 80%; }
.sheet-front i:nth-of-type(3) { width: 62%; }
.sheet-front b { width: 72px; height: 25px; margin-top: 7px; border-radius: 9px; background: #eef0f9; }
.art-orb { position: absolute; right: 2%; top: 8%; width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(145deg, #fff, #cbd4f3); box-shadow: 0 12px 30px rgba(72, 91, 155, .2); animation: orb-float 5s ease-in-out infinite; }
@keyframes paper-float { 50% { transform: translate(-50%, calc(-50% - 6px)) rotate(2deg); } }
@keyframes orb-float { 50% { transform: translateY(-9px); } }
.public-explore { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 44px; }
.public-explore-card { display: flex; min-height: 154px; flex-direction: column; gap: 9px; padding: 23px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 4px 16px rgba(25,25,35,.025); }
.public-explore-card > span { color: var(--blue); font-size: 11px; font-weight: 650; }
.public-explore-card strong { color: var(--ink); font-size: 17px; font-weight: 640; letter-spacing: -.03em; }
.public-explore-card small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.public-results { padding-top: 5px; }
.public-section-head { margin-bottom: 18px; }
.public-section-head h2 { margin: 0 0 6px; color: var(--ink); font-size: clamp(25px, 3vw, 34px); font-weight: 660; letter-spacing: -.05em; }
.public-section-head > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.public-subject-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.public-subject-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 16px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.public-subject-row h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 620; }
.public-subject-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.public-subject-row > strong { min-width: 48px; color: var(--ink); font-size: 21px; font-weight: 650; letter-spacing: -.04em; text-align: right; }
.public-attention { color: var(--muted); font-size: 11px; white-space: nowrap; }
.public-attention.high { color: #b87420; }
.public-attention.low { color: #338765; }
.public-empty { grid-column: 1 / -1; padding: 26px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.public-empty h3 { margin: 0 0 7px; color: var(--ink); font-size: 16px; }
.public-empty p, .public-foot { color: var(--muted); font-size: 12px; line-height: 1.65; }
.public-foot { margin: 18px 0 0; }
:root[data-theme="dark"] .public-hero { border-color: var(--line); background: linear-gradient(135deg, #101114, #17191e); color: var(--ink); }
:root[data-theme="dark"] .public-hero h1 { color: var(--ink); }
:root[data-theme="dark"] .public-hero-copy > p:not(.public-eyebrow), :root[data-theme="dark"] .public-privacy { color: #b2b4c0; }
:root[data-theme="dark"] .art-sheet { border-color: #ffffff18; }
:root[data-theme="dark"] .sheet-front { background: #202127; }
:root[data-theme="dark"] .public-explore-card, :root[data-theme="dark"] .public-subject-row, :root[data-theme="dark"] .public-empty { background: var(--surface); color: var(--ink); }

/* Selected translucent surfaces, with opaque fallbacks for older browsers. */
.topbar, .sidebar, .modal-head, .global-search-trigger, .notification-popover, .command-palette {
  -webkit-backdrop-filter: saturate(170%) blur(22px);
  backdrop-filter: saturate(170%) blur(22px);
}
.notification-popover, .command-palette { border: 1px solid color-mix(in srgb, var(--line) 76%, transparent); background: color-mix(in srgb, var(--surface) 87%, transparent); box-shadow: 0 20px 64px rgba(20, 34, 58, .18); }
.price-card { border-radius: 20px; padding: clamp(22px, 2.5vw, 30px); }
.public-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin: 24px 0 16px; }
.public-plan-grid .price-card { min-height: 390px; border-color: var(--line); box-shadow: 0 5px 20px rgba(18, 43, 81, .035); }
.public-plan-grid .price-card.featured { border-color: color-mix(in srgb, var(--blue) 48%, var(--line)); box-shadow: 0 12px 30px rgba(23, 105, 224, .09); }
.plan-photo { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 8; margin: -10px -10px 20px; border: 1px solid var(--line); border-radius: 15px; background: #e9f0f8; }
.plan-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transition: transform .8s var(--ease-out), filter .5s ease; }
.plan-card:hover .plan-photo img { transform: scale(1.055); filter: saturate(1.06); }
.plan-photo:after { position: absolute; inset: 35% 0 0; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(7,24,51,.28)); content: ""; opacity: .7; transition: opacity .35s ease; }
.plan-card:hover .plan-photo:after { opacity: .48; }
.price-card h2, .price-card h3 { color: var(--ink); font-size: 21px; font-weight: 660; letter-spacing: -.04em; }
.price-value, .public-plan-price { color: var(--prussia); font-size: clamp(27px, 3vw, 36px); font-weight: 680; letter-spacing: -.06em; }
.price-period, .public-plan-price small { color: var(--muted); font-size: 12px; font-weight: 450; letter-spacing: 0; }
.price-features { gap: 12px; margin: 22px 0 26px; }
.price-features li { color: var(--ink); font-size: 13px; line-height: 1.5; }
.price-features li:before { color: var(--blue); }
.price-card > .btn { width: 100%; margin-top: auto; }
.price-card.featured > .btn { background: var(--blue); color: #fff; }
.plan-comparison { margin-top: 30px; }
.plan-period-note { max-width: 800px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.global-search-overlay, .modal-backdrop { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.modal-card { overflow: hidden; }
.modal-card { display: flex; flex-direction: column; height: min(88vh, 900px); }
.modal-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.modal-head { background: color-mix(in srgb, var(--surface) 88%, transparent); }

/* Dark mode uses true black, graphite surfaces and explicit high contrast. */
:root[data-theme="dark"] body { background: #000 !important; color: #f2f3f5; }
:root[data-theme="dark"] .sidebar { border-color: rgba(255,255,255,.11); background: rgba(13, 15, 19, .72) !important; box-shadow: 0 18px 64px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.14); }
:root[data-theme="dark"] .sidebar::before { background: radial-gradient(ellipse at 18% 52%, rgba(44,106,213,.22), transparent 31%), radial-gradient(ellipse at 75% 48%, rgba(25,177,200,.16), transparent 33%), radial-gradient(ellipse at 49% 0%, rgba(255,255,255,.10), transparent 38%); }
:root[data-theme="dark"] .sidebar::after { border-color: rgba(255,255,255,.1); }
:root[data-theme="dark"] .topbar { border-color: #25262a; background: rgba(0, 0, 0, .78) !important; }
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .workspace-card,
:root[data-theme="dark"] .section-block,
:root[data-theme="dark"] .table-wrap,
:root[data-theme="dark"] .price-card,
:root[data-theme="dark"] .community-card,
:root[data-theme="dark"] .community-post,
:root[data-theme="dark"] .community-compose,
:root[data-theme="dark"] .ai-sidebar,
:root[data-theme="dark"] .ai-chat,
:root[data-theme="dark"] .flashcard,
:root[data-theme="dark"] .list-row,
:root[data-theme="dark"] .welcome-mini,
:root[data-theme="dark"] .public-subject-row,
:root[data-theme="dark"] .public-explore-card,
:root[data-theme="dark"] .public-empty {
  border-color: #292a2f !important;
  background-color: #111214 !important;
  background-image: none !important;
  color: #f2f3f5;
}
:root[data-theme="dark"] .surface-soft,
:root[data-theme="dark"] .help-card,
:root[data-theme="dark"] .dropzone,
:root[data-theme="dark"] .notification-card,
:root[data-theme="dark"] .ai-message,
:root[data-theme="dark"] .teacher-feedback,
:root[data-theme="dark"] .global-search-trigger,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .avatar,
:root[data-theme="dark"] .field,
:root[data-theme="dark"] .btn.secondary,
:root[data-theme="dark"] .btn.tertiary {
  border-color: #303137 !important;
  background-color: #191a1e !important;
  background-image: none !important;
  color: #f2f3f5;
}
:root[data-theme="dark"] .btn:not(.secondary):not(.tertiary):not(.danger) { background: #3478e5; color: #fff; }
:root[data-theme="dark"] .btn:not(.secondary):not(.tertiary):not(.danger):hover { background: #5590f0; }
:root[data-theme="dark"] .brand-mark { background: #12376f; }
:root[data-theme="dark"] .nav-link { color: #a9abb5; }
:root[data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,.075); color: #f5f7fc; }
:root[data-theme="dark"] .nav-link.active { border-color: rgba(107,159,238,.18) !important; background: linear-gradient(125deg, rgba(52,120,229,.24), rgba(51,191,214,.14)) !important; color: #d6e5ff !important; }
:root[data-theme="dark"] .hero-dash-main { border-color: #292a2f; background: linear-gradient(135deg, #101216, #111b2b); color: #f2f3f5; }
:root[data-theme="dark"] .hero-dash-main h2, :root[data-theme="dark"] .page-head h1, :root[data-theme="dark"] .panel-title h2, :root[data-theme="dark"] .section-heading h2, :root[data-theme="dark"] .stat-value, :root[data-theme="dark"] .price-value, :root[data-theme="dark"] .price-card h2, :root[data-theme="dark"] .price-card h3 { color: #f2f3f5 !important; }
:root[data-theme="dark"] .public-plan-grid .price-card.featured { border-color: #3d6fab !important; box-shadow: 0 12px 32px rgba(34, 94, 184, .13); }
:root[data-theme="dark"] .public-hero { border-color: #292a2f; background: linear-gradient(135deg, #101216, #111b2b); }
:root[data-theme="dark"] .auth-brand, :root[data-theme="dark"] .focus-panel { background: #0d1a2c; }
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .auth-form-side,
:root[data-theme="dark"] .auth-tabs,
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .modal-content { border-color: #292a2f; background: #111214; color: #f2f3f5; }
:root[data-theme="dark"] .auth-tabs button.active { background: #202127; color: #f2f3f5; }
:root[data-theme="dark"] .ai-message.user { border-color: #28518c; background: #142847; color: #e9f1ff; }
:root[data-theme="dark"] .quiz-timer { background: #1a2637; color: #a8c8ff; }
:root[data-theme="dark"] .option-row, :root[data-theme="dark"] .question-row h3, :root[data-theme="dark"] .notification-card strong { color: #f2f3f5; }
:root[data-theme="dark"] .status-pill, :root[data-theme="dark"] .tag { border-color: #303137; background-color: #1b1c20; color: #d1d5de; }
:root[data-theme="dark"] .public-hero .btn, :root[data-theme="dark"] .price-card.featured > .btn { background: #3478e5; color: #fff; }
:root[data-theme="dark"] .topbar-actions kbd { border-color: #303137; background: #16171b; color: #b6bac4; }
:root[data-theme="dark"] .loading-skeleton-card, :root[data-theme="dark"] .loading-skeleton-wide { border-color: #292a2f; background: #111214; }
:root[data-theme="dark"] .loading-skeleton-card i, :root[data-theme="dark"] .loading-skeleton-card b, :root[data-theme="dark"] .loading-skeleton-card span, :root[data-theme="dark"] .loading-skeleton-wide span { background: linear-gradient(100deg,#191a1e 25%,#25272e 42%,#191a1e 60%); }

@media (max-width: 800px) { .public-plan-grid { grid-template-columns: 1fr; } .public-plan-grid .price-card { min-height: 0; } }

@keyframes water-drift { 0% { transform: translate3d(-4%, -2%, 0) rotate(-4deg) scale(1); } 50% { transform: translate3d(3%, 2%, 0) rotate(3deg) scale(1.04); } 100% { transform: translate3d(5%, -3%, 0) rotate(-2deg) scale(1.02); } }
@keyframes active-water { from { transform: translate3d(-12%, 5%, 0) scale(.85); opacity: .55; } to { transform: translate3d(12%, -5%, 0) scale(1.1); opacity: .9; } }

@media (max-width: 760px) {
  .sidebar { inset: auto auto calc(7px + env(safe-area-inset-bottom)) 50%; width: calc(100vw - 16px); height: 70px; gap: 4px; padding: 7px 8px; border-radius: 23px; }
  .sidebar .brand { display: none; }
  .sidebar #primaryNav { flex: 1 1 auto; }
  .sidebar #learningNav { max-width: 34%; padding-left: 6px; }
  .sidebar .nav-link { height: 50px; min-height: 50px; padding: 0 11px; border-radius: 16px; font-size: 11px; }
  .mobile-menu { display: none !important; }
  .topbar { height: 58px; padding-inline: 13px; }
  .topbar-actions { gap: 5px; }
  .global-search-trigger { width: 38px; justify-content: center; padding: 0; }
  .global-search-trigger span, .global-search-trigger kbd, .build-label { display: none; }
  .content-wrap { padding: 25px 15px calc(112px + env(safe-area-inset-bottom)); }
  .sidebar .main-nav { scrollbar-width: none; }
  .sidebar .main-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 420px) {
  .sidebar .nav-glyph { display: none; }
  .sidebar .nav-link { padding-inline: 10px; }
  .sidebar #learningNav { max-width: 37%; }
  .breadcrumb span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar::before, .nav-link.active:before { animation: none; }
}

@media (max-width: 1050px) {
  .sidebar { width: min(1120px, calc(100vw - 24px)); }
  .main-area { margin-left: 0; }
  .content-wrap { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .sidebar { inset: auto auto calc(7px + env(safe-area-inset-bottom)) 50%; width: calc(100vw - 16px); height: 70px; padding: 7px 8px; }
  .sidebar .brand { display: none; }
  .sidebar #primaryNav { flex: 1 1 auto; }
  .sidebar #learningNav { max-width: 34%; padding-left: 6px; }
  .main-area { margin-left: 0; }
  .mobile-menu { display: none !important; }
  .topbar { height: 58px; padding-inline: 13px; }
  .topbar-actions { gap: 5px; }
  .global-search-trigger { width: 38px; justify-content: center; padding: 0; }
  .global-search-trigger span, .global-search-trigger kbd, .build-label { display: none; }
  .content-wrap { padding: 25px 15px calc(112px + env(safe-area-inset-bottom)); }
}

/* Spread the icon controls across the full floating bar when they fit. */
.sidebar #primaryNav, .sidebar #learningNav { justify-content: space-evenly; }
.sidebar #primaryNav { flex: 1 1 auto; }
.sidebar #learningNav { flex: 0 1 25%; max-width: 25%; }
@media (max-width: 760px) {
  .sidebar #learningNav { flex: 0 0 auto; max-width: none; }
}

/* Student home inspired by the mobile SINDIKA reference. */
.student-home { display: grid; gap: clamp(22px, 3vw, 38px); max-width: 1240px; margin: 0 auto; }
.student-home-welcome { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: clamp(8px, 2vw, 20px) 2px 0; }
.student-home-welcome h1 { margin: 12px 0 5px; color: var(--ink); font-size: clamp(34px, 5vw, 52px); font-weight: 720; letter-spacing: -.055em; line-height: 1.05; }
.student-home-welcome p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); }
.student-home-plan { display: grid; gap: 4px; min-width: 170px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: 0 8px 28px rgba(18,43,81,.045); }
.student-home-plan > span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.student-home-plan > strong { color: var(--ink); font-size: 18px; }
.student-home-plan .btn { justify-self: start; margin: 2px 0 0 -9px; }
.student-home-search { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 0 20px; border: 1px solid color-mix(in srgb, var(--blue) 15%, var(--line)); border-radius: 20px; background: color-mix(in srgb, var(--surface) 84%, var(--ice)); color: var(--muted); text-align: left; box-shadow: 0 8px 28px rgba(18,43,81,.04); transition: border-color .25s, transform .25s var(--ease-out), box-shadow .25s; }
.student-home-search:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--blue) 42%, var(--line)); box-shadow: 0 14px 34px rgba(18,43,81,.09); }
.student-home-search-icon { color: var(--blue); font-size: 32px; line-height: 1; }
.student-home-search kbd { margin-left: auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 11px; }
.student-home-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.student-home-shortcut { display: grid; justify-items: center; gap: 10px; min-height: 104px; padding: 16px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 7px 22px rgba(18,43,81,.035); transition: transform .3s var(--ease-out), border-color .25s, box-shadow .25s; }
.student-home-shortcut:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--blue) 38%, var(--line)); box-shadow: 0 16px 30px rgba(18,43,81,.09); }
.student-home-shortcut > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: color-mix(in srgb, var(--blue) 10%, var(--surface)); color: var(--blue); font-size: 25px; font-weight: 700; }
.student-home-shortcut > strong { font-size: 13px; font-weight: 650; }
.student-home-feature { position: relative; display: flex; min-height: 286px; overflow: hidden; align-items: center; padding: clamp(25px, 5vw, 54px); border: 1px solid rgba(83,142,240,.22); border-radius: 28px; background: radial-gradient(ellipse at 82% 35%, rgba(46,125,232,.26), transparent 38%), linear-gradient(120deg,#101b32 0%,#0c1930 52%,#102548 100%); color: #fff; isolation: isolate; box-shadow: 0 22px 54px rgba(11,36,77,.16); }
.student-home-feature-copy { position: relative; z-index: 2; max-width: 570px; }
.student-home-feature .eyebrow { color: #a8c9ff; }
.student-home-feature h2 { max-width: 520px; margin: 15px 0 9px; color: #fff; font-size: clamp(28px, 4vw, 43px); line-height: 1.08; letter-spacing: -.045em; }
.student-home-feature p { max-width: 450px; margin: 0 0 22px; color: #c3ccdc; font-size: 16px; line-height: 1.55; }
.student-home-feature-button { min-height: 44px; border: 0; background: #f4f7fc; color: #10203a; }
.student-home-feature-button:hover { background: #fff; color: #10203a; }
.student-home-feature-button span { margin-left: 12px; font-size: 18px; }
.student-home-feature-orbit { position: absolute; z-index: -1; width: 270px; height: 270px; border: 1px solid rgba(143,185,255,.23); border-radius: 42% 58% 63% 37% / 44% 42% 58% 56%; animation: water-drift 12s ease-in-out infinite alternate; }
.student-home-feature-orbit-a { top: -68px; right: 11%; box-shadow: inset 0 0 55px rgba(35,125,244,.15), 0 0 70px rgba(35,125,244,.08); }
.student-home-feature-orbit-b { right: -15px; bottom: -160px; width: 330px; height: 330px; animation-delay: -5s; border-color: rgba(95,185,255,.2); }
.student-home-feature-mark { position: absolute; top: 50%; right: 12%; display: grid; width: 150px; height: 150px; place-items: center; transform: translateY(-50%); color: rgba(206,228,255,.86); }
.student-home-feature-mark > span { display: grid; width: 102px; height: 102px; place-items: center; border: 1px solid rgba(180,211,255,.24); border-radius: 32px; background: linear-gradient(145deg,rgba(109,171,255,.2),rgba(31,101,205,.08)); box-shadow: inset 0 1px rgba(255,255,255,.13),0 18px 60px rgba(0,0,0,.2); font-size: 62px; font-weight: 700; letter-spacing: -.08em; }
.student-home-feature-mark > i { position: absolute; inset: 2px; border: 1px solid rgba(180,211,255,.18); border-radius: 50%; animation: student-orbit 9s linear infinite; }
.student-home-feature-mark > i:nth-child(3) { inset: 15px -8px; transform: rotate(58deg); animation-duration: 13s; }
.student-home-feature-mark > i:nth-child(4) { inset: -8px 15px; transform: rotate(-48deg); animation-duration: 16s; }
.student-home-feature-foot { position: absolute; right: 24px; bottom: 20px; display: flex; align-items: center; gap: 10px; color: #b4c0d4; font-size: 11px; }
.student-home-feature-dot { width: 7px; height: 7px; border-radius: 50%; background: #58a3ff; box-shadow: 0 0 12px #58a3ff; }
.student-home-section { display: grid; gap: 17px; }
.student-home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.student-home-section-head h2 { margin: 5px 0 0; color: var(--ink); font-size: clamp(23px, 3vw, 30px); letter-spacing: -.04em; }
.student-home-section-head .eyebrow { color: var(--muted); font-size: 10px; }
.student-home-section-head .text-link { display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; color: var(--blue); font-weight: 650; cursor: pointer; }
.student-home-section-head .text-link span { font-size: 17px; transition: transform .2s; }
.student-home-section-head .text-link:hover span { transform: translate(3px,-2px); }
.student-home-books { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; }
.student-home-book { display: grid; min-width: 0; gap: 8px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.student-home-book-cover { position: relative; display: flex; min-height: 184px; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 17px 15px; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; background: linear-gradient(148deg,#122244,#111827 64%,#17427b); color: white; box-shadow: 0 9px 22px rgba(18,43,81,.14); transition: transform .32s var(--ease-out),box-shadow .32s; }
.student-home-book:nth-child(4n+2) .student-home-book-cover { background: linear-gradient(148deg,#112c3b,#12212b 64%,#087c94); }
.student-home-book:nth-child(4n+3) .student-home-book-cover { background: linear-gradient(148deg,#322344,#1c1a30 64%,#753b9b); }
.student-home-book:nth-child(4n+4) .student-home-book-cover { background: linear-gradient(148deg,#3b2a19,#211e1c 64%,#9a6428); }
.student-home-book-cover::after { position: absolute; right: -22px; bottom: -47px; width: 130px; height: 130px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 14px rgba(255,255,255,.035),0 0 0 31px rgba(255,255,255,.025); content: ""; }
.student-home-book-cover > i { color: rgba(220,234,255,.68); font-size: 9px; font-style: normal; letter-spacing: .09em; text-transform: uppercase; }
.student-home-book-cover > strong { z-index: 1; font-size: clamp(15px,1.6vw,19px); line-height: 1.15; overflow-wrap: anywhere; }
.student-home-book-cover > small { z-index: 1; color: rgba(230,237,249,.7); font-size: 10px; }
.student-home-book-title { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.student-home-book-author { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.student-home-book:hover .student-home-book-cover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 17px 30px rgba(18,43,81,.22); }
.student-home-empty { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--muted); }
.student-home-community-list { display: grid; gap: 10px; }
.student-home-community-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: 0 7px 22px rgba(18,43,81,.035); transition: transform .25s var(--ease-out),border-color .25s; }
.student-home-community-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--blue) 30%,var(--line)); }
.student-home-community-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; background: linear-gradient(145deg,#173a79,#672ee7); color: #fff; font-size: 19px; font-weight: 700; }
.student-home-community-card h3 { margin: 0 0 3px; color: var(--ink); font-size: 15px; }
.student-home-community-card p { overflow: hidden; margin: 0 0 4px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.student-home-community-card small { color: var(--muted); font-size: 10px; }
.student-home-progress { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(110deg,color-mix(in srgb,var(--blue) 7%,var(--surface)),var(--surface)); }
.student-home-progress h2 { margin: 5px 0; color: var(--ink); font-size: clamp(18px,2.5vw,24px); letter-spacing: -.035em; }
.student-home-progress p { margin: 0; color: var(--muted); font-size: 12px; }
.student-home-progress-ring { position: relative; display: grid; flex: 0 0 64px; width: 64px; height: 64px; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) var(--progress),color-mix(in srgb,var(--blue) 12%,var(--surface)) 0); }
.student-home-progress-ring::before { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); content: ""; }
.student-home-progress-ring strong { z-index: 1; color: var(--ink); font-size: 12px; }
:root[data-theme="dark"] .student-home-plan,:root[data-theme="dark"] .student-home-search,:root[data-theme="dark"] .student-home-shortcut,:root[data-theme="dark"] .student-home-community-card,:root[data-theme="dark"] .student-home-empty { border-color: #292a2f; background-color: #111214; color: var(--ink); }
:root[data-theme="dark"] .student-home-search kbd { border-color: #303137; background: #191a1e; }
@keyframes student-orbit { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .student-home { gap: 24px; }
  .student-home-welcome { align-items: start; }
  .student-home-welcome h1 { font-size: 35px; }
  .student-home-welcome p { max-width: 38ch; font-size: 14px; line-height: 1.5; }
  .student-home-plan { min-width: 118px; padding: 11px 12px; }
  .student-home-plan > span { font-size: 8px; }
  .student-home-plan > strong { font-size: 15px; }
  .student-home-search { min-height: 56px; padding-inline: 15px; border-radius: 17px; font-size: 13px; }
  .student-home-search kbd { display: none; }
  .student-home-shortcuts { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
  .student-home-shortcut { min-height: 90px; gap: 7px; padding: 12px 4px; border-radius: 16px; }
  .student-home-shortcut > span { width: 36px; height: 36px; border-radius: 12px; font-size: 21px; }
  .student-home-shortcut > strong { font-size: 10px; }
  .student-home-feature { min-height: 300px; align-items: start; padding: 28px 22px 58px; border-radius: 23px; }
  .student-home-feature-copy { max-width: 78%; }
  .student-home-feature h2 { font-size: 29px; }
  .student-home-feature p { font-size: 13px; }
  .student-home-feature-mark { top: auto; right: -4px; bottom: 12px; transform: scale(.66); transform-origin: bottom right; opacity: .7; }
  .student-home-feature-foot { right: auto; bottom: 17px; left: 20px; font-size: 9px; }
  .student-home-books { grid-template-columns: repeat(4,minmax(118px,1fr)); gap: 12px; overflow-x: auto; margin-inline: -1px; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
  .student-home-book { scroll-snap-align: start; }
  .student-home-book-cover { min-height: 164px; padding: 14px 12px; border-radius: 14px; }
  .student-home-book-cover > strong { font-size: 15px; }
  .student-home-community-card { grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; padding: 12px; }
  .student-home-community-mark { width: 40px; height: 40px; }
  .student-home-community-card .btn { padding-inline: 10px; }
}
@media (max-width: 420px) {
  .student-home-welcome { gap: 10px; }
  .student-home-welcome h1 { font-size: 30px; }
  .student-home-plan { min-width: 104px; }
  .student-home-shortcut > strong { font-size: 9px; }
  .student-home-section-head .text-link { gap: 4px; font-size: 11px; }
  .student-home-empty { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .student-home-feature-orbit,.student-home-feature-mark > i { animation: none !important; } }

/* Icon-only dock: labels remain available to assistive technology and tooltips. */
.sidebar .brand { display: none !important; }
.sidebar .nav-link { width: 48px; min-width: 48px; height: 48px; min-height: 48px; justify-content: center; gap: 0; padding: 0; }
.sidebar .nav-link > span:nth-child(2) { display: none; }
.sidebar .nav-glyph { display: grid !important; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; color: var(--prussia); font-size: 19px; line-height: 1; }
.sidebar #learningNav { max-width: 25%; }
.sidebar .nav-link.active .nav-glyph { color: var(--blue); }
.auth-card { position: relative; }
.auth-close { position: absolute; top: 14px; right: 14px; z-index: 5; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px rgba(16, 40, 76, .1); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.auth-close:hover { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); background: var(--surface); color: var(--blue); transform: scale(1.06); }
.auth-close svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .auth-close { border-color: #36383e; background: rgba(24,25,29,.84); color: #f2f3f5; }

@media (max-width: 760px) {
  .sidebar .nav-link { width: 46px; min-width: 46px; height: 50px; min-height: 50px; }
  .sidebar .nav-glyph { display: grid !important; }
  .sidebar #learningNav { max-width: 28%; }
  .auth-close { top: 10px; right: 10px; width: 36px; height: 36px; }
}
@media (max-width: 420px) {
  .sidebar .nav-link { width: 42px; min-width: 42px; padding: 0; }
  .sidebar .nav-glyph { display: grid !important; }
  .sidebar #learningNav { max-width: 24%; }
}

/* Keep navigation labels visible beneath their icons on every screen. */
.sidebar { height: 88px; gap: 7px; padding: 8px 11px; }
.sidebar .main-nav { align-items: stretch; gap: 2px; }
.sidebar #primaryNav { flex: 1 1 0%; }
.sidebar #learningNav { flex: 0 1 23%; max-width: 23%; padding-left: 7px; }
.sidebar .nav-link { display: flex; flex: 1 0 42px; width: auto; min-width: 42px; height: auto; min-height: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; border-radius: 14px; }
.sidebar .nav-link > span:nth-child(2) { display: -webkit-box !important; max-width: 100%; overflow: hidden; flex: 0 1 auto; color: inherit; font-size: 8px; font-weight: 590; line-height: 1.05; text-align: center; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sidebar .nav-glyph { display: grid !important; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; color: var(--prussia); font-size: 18px; line-height: 1; }
.sidebar .nav-link.active .nav-glyph { color: var(--blue); }
@media (max-width: 760px) {
  .sidebar { height: 84px; width: calc(100vw - 12px); padding: 7px 6px; gap: 3px; border-radius: 22px; }
  .sidebar #primaryNav { flex: 1 1 0%; }
  .sidebar #learningNav { flex: 0 0 auto; max-width: 28%; padding-left: 4px; }
  .sidebar .nav-link { flex: 1 0 39px; min-width: 39px; padding-inline: 1px; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 7px; }
  .sidebar .nav-glyph { width: 20px; height: 20px; flex-basis: 20px; font-size: 17px; }
  .content-wrap { padding-bottom: calc(126px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .sidebar { height: 80px; }
  .sidebar .nav-link { flex-basis: 36px; min-width: 36px; height: auto; min-height: 0; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 6.5px; }
}

/* Compact the floating dock while preserving icon labels. */
.sidebar { height: 72px; padding: 5px 9px; gap: 5px; border-radius: 22px; }
.sidebar .nav-link { gap: 2px; padding: 3px 2px; border-radius: 12px; }
.sidebar .nav-glyph { width: 20px; height: 20px; flex-basis: 20px; font-size: 17px; }
.sidebar .nav-link > span:nth-child(2) { font-size: 7px; line-height: 1; }
@media (max-width: 1050px) { .content-wrap { padding-bottom: calc(108px + env(safe-area-inset-bottom)); } }
@media (max-width: 760px) {
  .sidebar { height: 70px; padding: 4px 6px; gap: 3px; border-radius: 20px; }
  .sidebar .nav-link { padding: 2px 1px; }
  .sidebar .nav-glyph { width: 19px; height: 19px; flex-basis: 19px; font-size: 16px; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 6.6px; }
  .content-wrap { padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .sidebar { height: 66px; }
  .sidebar .nav-link { flex-basis: 36px; min-width: 36px; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 6px; }
  .content-wrap { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 1050px) {
  .sidebar { width: 240px; }
  .main-area { margin-left: 240px; }
  .public-hero { grid-template-columns: 1fr .72fr; padding: 42px; }
}
@media (max-width: 760px) {
  .sidebar { width: 280px; }
  .main-area { margin-left: 0; }
  .topbar { height: 62px; padding-inline: 16px; }
  .content-wrap { padding: 24px 16px 45px; }
  .page-head h1 { font-size: 32px; }
  .public-hero { grid-template-columns: 1fr; min-height: 0; padding: 34px 25px 24px; border-radius: 21px; }
  .public-hero h1 { font-size: clamp(42px, 12vw, 62px); }
  .public-hero-art { height: 230px; margin-top: 14px; transform: scale(.83); }
  .public-explore { grid-template-columns: 1fr; gap: 10px; margin-bottom: 34px; }
  .public-explore-card { min-height: 0; padding: 18px; }
  .public-subject-list { grid-template-columns: 1fr; }
  .public-subject-row { gap: 8px; padding: 15px; }
  .public-subject-row > strong { font-size: 19px; }
  .public-attention { display: none; }
  .section-block { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Final navigation sizing after the legacy responsive rules. */
@media (max-width: 1050px) {
  .sidebar { width: min(1120px, calc(100vw - 24px)); }
  .main-area { margin-left: 0; }
  .content-wrap { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .sidebar { inset: auto auto calc(7px + env(safe-area-inset-bottom)) 50%; width: calc(100vw - 16px); height: 70px; padding: 7px 8px; }
  .sidebar .brand { display: none; }
  .sidebar #primaryNav { flex: 1 1 auto; }
  .sidebar #learningNav { max-width: 34%; padding-left: 6px; }
  .main-area { margin-left: 0; }
  .mobile-menu { display: none !important; }
  .topbar { height: 58px; padding-inline: 13px; }
  .topbar-actions { gap: 5px; }
  .global-search-trigger { width: 38px; justify-content: center; padding: 0; }
  .global-search-trigger span, .global-search-trigger kbd, .build-label { display: none; }
  .content-wrap { padding: 25px 15px calc(112px + env(safe-area-inset-bottom)); }
}

/* Final icon spacing after all legacy responsive rules. */
.sidebar #primaryNav, .sidebar #learningNav { justify-content: space-evenly; }
.sidebar #primaryNav { flex: 1 1 auto; }
.sidebar #learningNav { flex: 0 1 25%; max-width: 25%; }
@media (max-width: 760px) {
  .sidebar #learningNav { flex: 0 0 auto; max-width: none; }
}

/* Final theme-aware controls: these rules intentionally follow legacy styles. */
.sidebar { inset: auto auto calc(14px + env(safe-area-inset-bottom)) 50%; width: min(540px,calc(100vw - 28px)); height: 82px; gap: 0; padding: 6px; border: 1px solid rgba(255,255,255,.58); border-radius: 999px; background: rgba(249,252,255,.58); box-shadow: 0 14px 42px rgba(15,35,65,.14),inset 0 1px 0 rgba(255,255,255,.56); -webkit-backdrop-filter: saturate(170%) blur(24px); backdrop-filter: saturate(170%) blur(24px); }
.sidebar::before { inset: -45%; background: radial-gradient(ellipse at 10% 55%,rgba(255,255,255,.18),transparent 45%),radial-gradient(ellipse at 94% 50%,rgba(255,255,255,.2),transparent 42%); }
.sidebar::after { border-color: rgba(255,255,255,.26); }
.sidebar #primaryNav { display: flex; width: 100%; min-width: 0; flex: 1 1 auto; justify-content: flex-start; gap: 0; overflow-x: auto; overflow-y: hidden; border: 0; padding: 0; scrollbar-width: none; scroll-snap-type: x mandatory; }
.sidebar #primaryNav::-webkit-scrollbar { display: none; }
.sidebar #learningNav,.sidebar #learningNav[hidden] { display: none !important; }
.sidebar .nav-link { display: flex; flex: 0 0 14.2857%; width: 14.2857%; min-width: 14.2857%; height: 100%; min-height: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 2px; border: 1px solid transparent; border-radius: 999px; color: #f8fbff; scroll-snap-align: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar .nav-link.active,:root:not([data-theme="dark"]) .sidebar .nav-link.active,:root[data-theme="dark"] .sidebar .nav-link.active { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.17); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 5px 18px rgba(3,25,80,.14); }
.sidebar .nav-link.active:before { display: none; }
.sidebar .nav-glyph,:root[data-theme="dark"] .sidebar .nav-glyph { display: grid !important; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; color: #fff; font-size: 20px; line-height: 1; }
.sidebar .nav-link.active .nav-glyph,:root[data-theme="dark"] .sidebar .nav-link.active .nav-glyph { color: #fff; }
.sidebar .nav-glyph svg { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sidebar .nav-link > span:nth-child(2) { display: -webkit-box !important; max-width: 100%; overflow: hidden; flex: 0 1 auto; color: inherit; font-size: 8px; font-weight: 620; line-height: 1.08; text-align: center; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
:root:not([data-theme="dark"]) .sidebar { border-color: rgba(255,255,255,.56); background: rgba(249,252,255,.3); }
:root[data-theme="dark"] .sidebar { border-color: rgba(255,255,255,.2); background: rgba(17,18,20,.4) !important; box-shadow: 0 18px 54px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.12); }
:root:not([data-theme="dark"]) .sidebar .nav-link { color: #34445d; }
:root:not([data-theme="dark"]) .sidebar .nav-link:hover { background: rgba(255,255,255,.44); color: #174fc2; }
:root:not([data-theme="dark"]) .sidebar .nav-link.active { border-color: rgba(23,79,194,.16); background: rgba(23,79,194,.12); color: #174fc2; }
:root:not([data-theme="dark"]) .sidebar .nav-glyph,:root:not([data-theme="dark"]) .sidebar .nav-link.active .nav-glyph { color: #174fc2; }
:root[data-theme="dark"] .sidebar .nav-link { color: #e5e8ef; }
:root[data-theme="dark"] .sidebar .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
:root[data-theme="dark"] .sidebar .nav-link.active { border-color: rgba(255,255,255,.18) !important; background: rgba(255,255,255,.15) !important; color: #fff !important; }
:root[data-theme="dark"] .sidebar .nav-glyph,:root[data-theme="dark"] .sidebar .nav-link.active .nav-glyph { color: #fff; }
.class-join-code { display: grid; gap: 3px; margin: 16px 0 8px; padding: 11px 13px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-soft); }
.class-join-code span { color: var(--muted); font-size: 10px; }
.class-join-code strong { color: var(--prussia); font: 700 16px var(--display); letter-spacing: .12em; }
.task-review-controls { display: grid; grid-template-columns: minmax(140px,1fr) 120px auto; align-items: center; gap: 7px; }
.task-status-excellent { color: #14744a; background: #e8f7ef; }
.task-status-wrong { color: #a32932; background: #fff0f0; }
.task-status-seen,.task-status-done { color: #2459a5; background: #edf4ff; }
.grade-sheet-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 12px; }
.grade-sheet-card { display: grid; gap: 9px; width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer; }
.grade-sheet-card:hover { border-color: color-mix(in srgb,var(--blue) 35%,var(--line)); transform: translateY(-2px); }
.grade-sheet-card strong { color: var(--ink); font-size: 16px; }
.grade-sheet-card small { color: var(--muted); }
.grade-score { width: 90px; min-width: 72px; padding: 7px; }
.print-grade { overflow: auto; }
.print-grade h1 { margin: 0 0 8px; font-size: 24px; }
.print-grade table { width: 100%; margin-top: 20px; border-collapse: collapse; }
.print-grade th,.print-grade td { min-width: 90px; padding: 8px; border: 1px solid #aeb6c2; text-align: left; }
.print-grade th small { display: block; color: #526071; font-weight: 400; }
.print-signature { margin-top: 36px; }
.old-price { display: block; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: line-through; }
.promotion-badge { display: inline-block; margin-left: 7px; padding: 3px 6px; border-radius: 6px; background: #e8f7ef; color: #14744a; font-size: 10px; vertical-align: middle; }
.study-task-picker { margin-bottom: 16px; }
.study-task-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 8px; }
.study-task-list label { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.study-task-list label span { display: grid; gap: 3px; }
.study-task-list small { color: var(--muted); }
@media (max-width: 680px) { .task-review-controls { grid-template-columns: 1fr 1fr; } .task-review-controls [data-task-feedback] { grid-column: 1/-1; } }
@media print {
  body * { visibility: hidden !important; }
  .print-grade,.print-grade * { visibility: visible !important; }
  .print-grade { position: absolute; inset: 0; width: 100%; color: #111; font: 12px Arial,sans-serif; }
  .print-grade table { page-break-inside: auto; }
  .print-grade tr { page-break-inside: avoid; page-break-after: auto; }
  .print-grade th,.print-grade td { color: #111; }
}
.avatar svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu .menu-close-icon { display: none; }
.sidebar.open ~ .main-area .mobile-menu .menu-open-icon { display: none; }
.sidebar.open ~ .main-area .mobile-menu .menu-close-icon { display: block; }
:root:not([data-theme="dark"]) .btn:not(.secondary):not(.tertiary):not(.danger):not(.student-home-feature-button) { border-color: #174fc2; background: #1757cf; color: #fff; box-shadow: 0 4px 12px rgba(23,87,207,.18); }
:root:not([data-theme="dark"]) .btn:not(.secondary):not(.tertiary):not(.danger):not(.student-home-feature-button):hover { border-color: #1045b0; background: #104bbd; color: #fff; box-shadow: 0 8px 18px rgba(23,87,207,.22); }
:root:not([data-theme="dark"]) .btn.secondary { border-color: #d0dceb; background: #fff; color: #20334e; box-shadow: 0 2px 7px rgba(24,55,95,.06); }
:root:not([data-theme="dark"]) .btn.secondary:hover { border-color: #a9c2e6; background: #f3f7fd; color: #123f99; }
:root:not([data-theme="dark"]) .btn.tertiary { border-color: transparent; background: transparent; color: #174fc2; box-shadow: none; }
:root:not([data-theme="dark"]) .btn.tertiary:hover { border-color: #d7e4f6; background: #edf4ff; color: #103f9d; }
:root:not([data-theme="dark"]) .btn.danger { border-color: #a92e38; background: #b8323d; color: #fff; }
:root:not([data-theme="dark"]) .btn:disabled,:root:not([data-theme="dark"]) .btn[aria-disabled="true"] { border-color: #d9e0e9; background: #e8edf4; color: #78869a; box-shadow: none; cursor: not-allowed; opacity: 1; }
:root:not([data-theme="dark"]) .btn:focus-visible { outline: 3px solid rgba(23,87,207,.28); outline-offset: 3px; }
@media (max-width: 760px) {
  .sidebar { inset: auto auto calc(8px + env(safe-area-inset-bottom)) 50%; width: min(540px,calc(100vw - 20px)); height: 76px; padding: 5px; }
  .sidebar .nav-link { padding: 4px 1px; gap: 2px; }
  .sidebar .nav-glyph { width: 22px; height: 22px; flex-basis: 22px; font-size: 19px; }
  .sidebar .nav-glyph svg { width: 21px; height: 21px; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 7px; }
  .content-wrap { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .sidebar { width: calc(100vw - 16px); height: 72px; }
  .sidebar .nav-glyph { width: 20px; height: 20px; flex-basis: 20px; }
  .sidebar .nav-glyph svg { width: 20px; height: 20px; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 6.5px; }
  .content-wrap { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* Liquid glass navigation for the light theme. */
:root:not([data-theme="dark"]) .sidebar {
  border-color: rgba(255, 255, 255, .78) !important;
  background: linear-gradient(132deg, rgba(255,255,255,.68), rgba(246,250,255,.43) 42%, rgba(232,245,250,.38) 72%, rgba(255,255,255,.57)) !important;
  box-shadow: 0 18px 50px rgba(34, 62, 92, .16), 0 3px 12px rgba(37, 73, 104, .07), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(255,255,255,.24) !important;
  -webkit-backdrop-filter: saturate(190%) blur(30px) !important;
  backdrop-filter: saturate(190%) blur(30px) !important;
}
:root:not([data-theme="dark"]) .sidebar::before {
  inset: -35% -12% !important;
  background: radial-gradient(ellipse at 12% 20%, rgba(255,255,255,.84), transparent 39%), radial-gradient(ellipse at 88% 76%, rgba(167,226,244,.22), transparent 34%), radial-gradient(ellipse at 52% 0%, rgba(255,255,255,.58), transparent 48%), linear-gradient(115deg, rgba(255,255,255,.18), transparent 44%, rgba(255,255,255,.16)) !important;
  filter: blur(13px) !important;
  opacity: .88;
}
:root:not([data-theme="dark"]) .sidebar::after {
  border-color: rgba(255,255,255,.78) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), inset 0 -1px 0 rgba(255,255,255,.26);
}
:root:not([data-theme="dark"]) .sidebar .nav-link { color: #43536a; }
:root:not([data-theme="dark"]) .sidebar .nav-link.active {
  border-color: rgba(255,255,255,.92) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.43)) !important;
  color: #193d62 !important;
  box-shadow: 0 4px 15px rgba(43,78,105,.09), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.35) !important;
}
:root:not([data-theme="dark"]) .sidebar .nav-link:hover { background: rgba(255,255,255,.46) !important; color: #193d62 !important; }
:root:not([data-theme="dark"]) .sidebar .nav-glyph { color: #526a80; }
:root:not([data-theme="dark"]) .sidebar .nav-link.active .nav-glyph { color: #2a6a91; }
.subscription-admin-form { display: grid; min-width: 220px; grid-template-columns: minmax(120px,1fr) auto; gap: 6px; }
.subscription-admin-form input { grid-column: 1 / -1; min-width: 150px; }
.subscription-admin-form .btn { min-height: 34px; padding: 6px 9px; white-space: nowrap; }
.subscription-admin-form .btn.tertiary { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 760px) {
  .subscription-admin-form { min-width: 190px; }
}
.grade-ring-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:18px;padding:8px 2px 4px}
.grade-ring-card{display:flex;align-items:center;flex-direction:column;gap:8px;text-align:center;padding:12px 8px}
.grade-ring{--ring-progress:0%;--ring-color:var(--cyan);position:relative;display:grid;width:112px;height:112px;place-items:center;border-radius:50%;background:conic-gradient(var(--ring-color) var(--ring-progress),var(--line) 0)}
.grade-ring:before{position:absolute;inset:9px;border-radius:50%;background:var(--surface);box-shadow:inset 0 1px 5px rgba(25,50,70,.08);content:""}
.grade-ring span{position:relative;z-index:1;color:var(--ink);font-size:20px;font-weight:750;letter-spacing:-.04em}
.grade-ring-card>strong{color:var(--ink);font-size:12px}
.grade-ring-card>small{max-width:155px;color:var(--muted);font-size:10px;line-height:1.45}
.sidebar-logout{width:100%;margin:12px 0 4px;border-color:var(--line);background:transparent;color:var(--muted)}
.sidebar-logout:hover{background:var(--surface-soft);color:var(--ink)}
.sidebar-logout .nav-glyph{font-size:18px}
#sidebarLogout[hidden]{display:none}
.ai-quiz-generator{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}
.ai-quiz-generator h3{margin:0 0 4px;color:var(--ink);font-size:14px}
.ai-quiz-generator .form-grid{margin:10px 0}

/* Mobile layout refinements */
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .main-area { min-width: 0; margin-left: 0 !important; }
  .topbar { height: 58px; min-height: 58px; gap: 8px; padding-inline: 12px; }
  .topbar-actions { flex: 0 0 auto; gap: 4px; }
  .content-wrap { width: 100%; min-width: 0; padding: 18px 14px calc(120px + env(safe-area-inset-bottom)); }
  .page-head { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; margin-bottom: 20px; }
  .page-head h1 { font-size: clamp(26px, 8vw, 34px); overflow-wrap: anywhere; }
  .page-head .lead, .page-head p { font-size: 14px; }
  .page-actions { display: flex; width: 100%; min-width: 0; flex-wrap: wrap; gap: 8px; }
  .page-actions .btn { min-height: 42px; flex: 1 1 auto; }
  .card-grid, .workspace-grid { grid-template-columns: minmax(0,1fr) !important; }
  .form-grid { grid-template-columns: minmax(0,1fr) !important; gap: 13px; }
  .form-grid > *, .form-grid .full, .form-field.full { grid-column: 1 / -1; min-width: 0; }
  .field, input, select, textarea { min-width: 0; max-width: 100%; font-size: 16px; }
  .table-wrap { max-width: 100%; border-radius: 12px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 620px; }
  .filter-bar { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .modal-backdrop { align-items: flex-end; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .modal-card { width: 100%; max-width: 640px; height: min(90dvh, 900px); max-height: min(90dvh, 900px); margin: 0 auto; border-radius: 22px; }
  .modal-content { min-width: 0; overflow: auto; overscroll-behavior: contain; }
  .sidebar { height: 76px; width: calc(100vw - 16px); padding: 5px; }
  .sidebar #primaryNav { gap: 0; justify-content: flex-start; overscroll-behavior-x: contain; }
  .sidebar .nav-link { flex: 0 0 62px; width: 62px; min-width: 62px; padding: 4px 2px; gap: 3px; }
  .sidebar .nav-glyph { width: 22px; height: 22px; flex-basis: 22px; }
  .sidebar .nav-link > span:nth-child(2) { max-width: 100%; font-size: 8px; line-height: 1.1; white-space: normal; }
  .sidebar .nav-more-button { flex: 0 0 50px; width: 50px; height: 50px; min-height: 50px; margin: 0; padding: 0; justify-content: center; font-size: 22px; }
  .sidebar .nav-more-button span { display: none; }
  .roster-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .roster-table, .roster-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .roster-table thead { display: none; }
  .roster-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 8px; margin: 0 0 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 18px rgba(12,32,52,.06); }
  .roster-table td { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 7px 6px; border: 0; overflow-wrap: anywhere; }
  .roster-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .roster-table td[data-label="Nome"], .roster-table td[data-label="Acções"] { grid-column: 1 / -1; }
  .roster-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .roster-row-actions .btn { min-height: 40px; }
}
@media (max-width: 380px) {
  .content-wrap { padding-inline: 11px; }
  .sidebar .nav-link { flex-basis: 58px; width: 58px; min-width: 58px; }
  .sidebar .nav-link > span:nth-child(2) { font-size: 7.5px; }
}
.brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 94px; padding: 0 8px 16px; text-align: center; }
.brand-symbol { display: block; width: 46px; height: 46px; flex: 0 0 46px; object-fit: contain; border-radius: 11px; }
.brand-copy { display: block; color: #f2f8fb; }
.brand-copy strong { display: block; font-size: 13px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; }
.boot-splash-mark { width: 48px; height: 48px; padding: 0; }
.boot-splash-mark img { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 11px; }
