:root {
  color-scheme: light;
  --accent: #6f5bf6;
  --accent-rgb: 111, 91, 246;
  --secondary: #18a888;
  --secondary-rgb: 24, 168, 136;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f9f9fc;
  --surface-3: #f0f1f6;
  --text: #1e2030;
  --muted: #6f7281;
  --faint: #9a9dab;
  --line: #e5e6ec;
  --line-strong: #d8dae4;
  --border: var(--line);
  --panel: var(--surface);
  --surface-soft: var(--surface-2);
  --success: #148a6a;
  --warning: #cf7a19;
  --danger: #d9475c;
  --blue: #3975da;
  --shadow-sm: 0 1px 2px rgba(28, 31, 45, .05), 0 5px 18px rgba(28, 31, 45, .04);
  --shadow-md: 0 16px 45px rgba(33, 35, 52, .1);
  --shadow-lg: 0 28px 75px rgba(24, 26, 40, .18);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar-width: 256px;
  --topbar-height: 76px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101116;
  --surface: #18191f;
  --surface-2: #1d1f27;
  --surface-3: #252731;
  --text: #f4f4f7;
  --muted: #a5a7b1;
  --faint: #797c89;
  --line: #2c2e38;
  --line-strong: #3a3d49;
  --border: #2c2e38;
  --panel: #18191f;
  --surface-soft: #1d1f27;
  --success: #47c9a5;
  --warning: #f3ac58;
  --danger: #f16a7f;
  --blue: #79a8ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .14);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, .28);
  --shadow-lg: 0 32px 85px rgba(0, 0, 0, .42);
}

body[data-theme="graphite"] {
  color-scheme: dark;
  --bg:#202124; --surface:#292a2d; --surface-2:#303134; --surface-3:#3c4043;
  --text:#f1f3f4; --muted:#bdc1c6; --faint:#969ba1; --line:#3c4043; --line-strong:#5f6368;
  --border:#3c4043; --panel:#292a2d; --surface-soft:#303134;
  --success:#5cc99f; --warning:#f6b95f; --danger:#ff7787; --blue:#8ab4f8;
  --shadow-sm:0 1px 2px rgba(0,0,0,.25),0 8px 22px rgba(0,0,0,.18);
  --shadow-md:0 18px 48px rgba(0,0,0,.32); --shadow-lg:0 32px 82px rgba(0,0,0,.46);
}

body[data-theme="comet"] {
  color-scheme: dark;
  --bg:#171513; --surface:#24211e; --surface-2:#2d2925; --surface-3:#37312c;
  --text:#f5f0e8; --muted:#b4aa9d; --faint:#857c72; --line:#3c3732; --line-strong:#554d45;
  --border:#3c3732; --panel:#24211e; --surface-soft:#2d2925;
  --success:#62c99f; --warning:#e9b267; --danger:#ef7d85; --blue:#91b8ec;
  --shadow-sm:0 1px 2px rgba(0,0,0,.24),0 8px 22px rgba(0,0,0,.18);
  --shadow-md:0 18px 48px rgba(0,0,0,.34); --shadow-lg:0 32px 82px rgba(0,0,0,.48);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
body.is-modal-open, body.is-editor-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

::selection { background: rgba(var(--accent-rgb), .22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 34%, transparent); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); padding: 18px 14px 14px;
  display: flex; flex-direction: column; gap: 18px; background: var(--surface); border-right: 1px solid var(--line);
  transition: width .22s ease, transform .22s ease; overflow: hidden;
}
.sidebar-head { height: 46px; display: flex; align-items: center; gap: 8px; }
.brand-button { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; padding: 3px; background: transparent; text-align: left; cursor: pointer; }
.brand-mark { flex: 0 0 39px; width: 39px; height: 39px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--secondary)); box-shadow: 0 8px 22px rgba(var(--accent-rgb), .24); }
.brand-copy { min-width: 0; display: grid; line-height: 1.1; white-space: nowrap; }
.brand-copy strong { font-size: 16px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; color: var(--muted); background: transparent; border-radius: 11px; cursor: pointer; transition: background .18s, color .18s, transform .18s; }
.icon-button:hover { background: var(--surface-3); color: var(--text); }
.icon-button:active { transform: scale(.95); }
.sidebar-collapse { flex: 0 0 auto; }
.primary-nav, .secondary-nav { display: grid; gap: 5px; }
.nav-item { position: relative; min-height: 44px; display: flex; align-items: center; gap: 13px; padding: 0 13px; color: var(--muted); background: transparent; border-radius: 12px; font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; transition: color .18s, background .18s, transform .18s; }
.nav-item svg { flex: 0 0 auto; width: 19px; height: 19px; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.is-active { color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; width: 3px; height: 20px; border-radius: 0 6px 6px 0; background: var(--accent); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; color: #fff; background: var(--danger); border-radius: 999px; font-size: 10px; font-style: normal; }
.sidebar-spacer { flex: 1; }
.sidebar-course-card { padding: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sidebar-course-card > span { display: block; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-course-card strong { display: block; margin-top: 6px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-progress { margin-top: 10px; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.course-progress span { display: block; width: var(--progress, 0%); height: 100%; background: linear-gradient(90deg, var(--accent), var(--secondary)); border-radius: inherit; }
.sync-mini { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.sync-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--faint) 12%, transparent); }
.sync-mini.is-online .sync-dot { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent); }
.sync-mini.is-syncing .sync-dot { background: var(--warning); animation: pulse 1s infinite; }
.sync-mini.is-error .sync-dot { background: var(--danger); }

body.sidebar-collapsed { --sidebar-width: 78px; }
body.sidebar-collapsed .sidebar { padding-inline: 12px; }
body.sidebar-collapsed .brand-copy, body.sidebar-collapsed .nav-item span, body.sidebar-collapsed .nav-badge, body.sidebar-collapsed .sidebar-course-card, body.sidebar-collapsed .sync-mini span { display: none; }
body.sidebar-collapsed .sidebar-collapse svg { transform: rotate(180deg); }
body.sidebar-collapsed .nav-item { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .nav-item.is-active::before { left: -12px; }
body.sidebar-collapsed .brand-button { justify-content: center; }
body.sidebar-collapsed .brand-mark { flex-basis: 39px; }
body.sidebar-collapsed .sidebar-head{height:auto;min-height:86px;display:grid;grid-template-columns:1fr;grid-template-rows:44px 32px;align-content:start;justify-items:center;gap:8px}
body.sidebar-collapsed .sidebar-collapse{position:static;width:38px;height:30px}
body.sidebar-collapsed .brand-button{width:52px;height:44px;padding:3px 6px}
body.sidebar-collapsed .brand-mark{flex:0 0 39px;margin:0}
body.sidebar-collapsed .sync-mini { justify-content: center; padding: 0; }

.sidebar-backdrop { display: none; }
.workspace-shell { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin .22s ease; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-height); padding: 0 28px; display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 560px) minmax(310px, .9fr); align-items: center; gap: 22px; background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent); backdrop-filter: blur(18px); }
.topbar-context { min-width: 0; display: flex; align-items: center; gap: 10px; }
.topbar-context p { margin: 0 0 2px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topbar-context h1 { margin: 0; font-size: 19px; line-height: 1.1; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-menu { display: none; }
.global-search-wrap { position: relative; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.global-search-wrap > svg { flex: 0 0 auto; width: 18px; }
.global-search-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.global-search-wrap input::placeholder { color: var(--faint); }
kbd { padding: 3px 6px; color: var(--faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; font-family: inherit; }
.global-search-results { position: absolute; top: calc(100% + 9px); left: 0; right: 0; max-height: min(440px, 68vh); padding: 8px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.search-result { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 11px; padding: 9px 10px; text-align: left; background: transparent; border-radius: 10px; cursor: pointer; }
.search-result:hover { background: var(--surface-2); }
.search-result-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); background: rgba(var(--accent-rgb), .1); border-radius: 10px; }
.search-result-copy { min-width: 0; display: grid; gap: 3px; }
.search-result-copy strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-copy span { color: var(--muted); font-size: 11px; }
.search-empty { padding: 24px; color: var(--muted); text-align: center; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.mode-switch { height: 36px; display: flex; padding: 3px; background: var(--surface-3); border-radius: 10px; }
.mode-switch button { padding: 0 11px; color: var(--muted); background: transparent; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; }
.mode-switch button.is-active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgba(25, 27, 40, .1); }
.sync-button { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 650; cursor: pointer; }
.sync-button svg { width: 17px; }
.sync-button:hover { color: var(--text); border-color: var(--line-strong); }
.sync-button.is-online svg { color: var(--success); }
.sync-button.is-syncing svg { color: var(--warning); animation: pulse 1s infinite; }
.sync-button.is-error svg { color: var(--danger); }
.sync-indicator { cursor: default; user-select: none; }
.sync-indicator:hover { color: var(--muted); border-color: var(--line); }

.main-content { width: min(1540px, 100%); margin: 0 auto; padding: 26px 30px 50px; outline: 0; }
.view-stack { display: grid; gap: 22px; animation: view-in .24s ease both; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2, .section-head h3 { margin: 0; letter-spacing: -.035em; }
.section-head h2 { font-size: 22px; }
.section-head h3 { font-size: 17px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.section-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 11px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; }
.primary-button { color: #fff; background: var(--accent); box-shadow: 0 8px 20px rgba(var(--accent-rgb), .2); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 11px 26px rgba(var(--accent-rgb), .27); }
.primary-button:disabled { opacity: .5; pointer-events: none; }
.primary-button.compact { min-height: 38px; padding: 0 13px; }
.primary-button svg, .secondary-button svg, .ghost-button svg, .danger-button svg { width: 17px; height: 17px; }
.secondary-button { color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.secondary-button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.ghost-button { color: var(--muted); background: transparent; }
.ghost-button:hover { color: var(--text); background: var(--surface-3); }
.danger-button { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.danger-button:hover { background: color-mix(in srgb, var(--danger) 15%, transparent); }
.small-button { min-height: 32px; padding: 0 10px; border-radius: 9px; font-size: 11px; }
.icon-only { width: 38px; padding: 0; }

.hero-panel { position: relative; min-height: 250px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 24px; padding: 34px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-sm); }
.hero-panel::before { content: ""; position: absolute; width: 430px; height: 430px; right: -180px; top: -230px; background: radial-gradient(circle, rgba(var(--accent-rgb), .22), transparent 67%); pointer-events: none; }
.hero-panel::after { content: ""; position: absolute; width: 350px; height: 350px; left: 30%; bottom: -300px; background: radial-gradient(circle, rgba(var(--secondary-rgb), .18), transparent 70%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; align-self: center; }
.kicker { margin: 0 0 12px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero-copy h2 { max-width: 720px; margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.02; letter-spacing: -.055em; }
.hero-copy > p:not(.kicker) { max-width: 640px; margin: 17px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.hero-actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.focus-card { position: relative; z-index: 1; align-self: stretch; padding: 22px; display: grid; align-content: space-between; background: linear-gradient(145deg, rgba(var(--accent-rgb), .12), rgba(var(--secondary-rgb), .08)); border: 1px solid rgba(var(--accent-rgb), .15); border-radius: 18px; }
.focus-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.focus-card-head span { color: var(--muted); font-size: 11px; font-weight: 700; }
.focus-card-head em { padding: 5px 8px; color: var(--accent); background: rgba(var(--accent-rgb), .1); border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.focus-card strong { margin: 16px 0 6px; font-size: 20px; letter-spacing: -.035em; }
.focus-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.focus-progress { margin-top: 18px; height: 7px; overflow: hidden; background: rgba(var(--accent-rgb), .12); border-radius: 999px; }
.focus-progress span { display: block; width: var(--progress, 0%); height: 100%; background: linear-gradient(90deg, var(--accent), var(--secondary)); border-radius: inherit; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card { min-height: 112px; padding: 18px; display: grid; align-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-label svg { width: 17px; color: var(--accent); }
.metric-value { display: flex; align-items: baseline; gap: 8px; }
.metric-value strong { font-size: 26px; letter-spacing: -.045em; }
.metric-value span { color: var(--faint); font-size: 10px; }
.metric-foot { color: var(--muted); font-size: 10px; }
.metric-card.is-good .metric-label svg, .tone-good { color: var(--success); }
.metric-card.is-warn .metric-label svg, .tone-warn { color: var(--warning); }
.metric-card.is-danger .metric-label svg, .tone-danger { color: var(--danger); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.panel-pad { padding: 21px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel-head h3 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.agenda-list, .activity-list, .risk-list, .ranking-list { display: grid; gap: 8px; }
.agenda-row { position: relative; min-height: 62px; display: grid; grid-template-columns: 54px 4px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; cursor: pointer; }
.agenda-row:hover { background: var(--surface-2); }
.agenda-time { color: var(--muted); font-size: 11px; text-align: center; }
.agenda-line { align-self: stretch; border-radius: 999px; background: var(--event-color, var(--accent)); }
.agenda-copy { min-width: 0; display: grid; gap: 3px; }
.agenda-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-copy span { color: var(--muted); font-size: 10px; }
.date-chip { min-width: 42px; padding: 6px 8px; display: grid; gap: 1px; text-align: center; background: var(--surface-3); border-radius: 9px; }
.date-chip strong { font-size: 13px; }
.date-chip span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.risk-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; background: var(--surface-2); border-radius: 12px; }
.subject-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--subject-color, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--subject-color, var(--accent)) 12%, transparent); }
.risk-copy { min-width: 0; display: grid; gap: 3px; }
.risk-copy strong { font-size: 12px; }
.risk-copy span { color: var(--muted); font-size: 10px; }
.grade-pill { min-width: 42px; padding: 5px 8px; text-align: center; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 800; }
.empty-state { min-height: 150px; display: grid; place-items: center; padding: 30px; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty-state svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--faint); }
.empty-state strong { display: block; color: var(--text); font-size: 13px; }
.empty-state p { max-width: 360px; margin: 5px auto 0; font-size: 11px; line-height: 1.5; }

.view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.field-inline { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.field-inline span { font-size: 10px; font-weight: 700; white-space: nowrap; }
.field-inline select, .field-inline input { min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; font-weight: 650; }
.segmented-tabs { display: flex; padding: 4px; background: var(--surface-3); border-radius: 11px; overflow: auto; }
.segmented-tabs button { min-height: 32px; padding: 0 13px; color: var(--muted); background: transparent; border-radius: 8px; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.segmented-tabs button.is-active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgba(25,27,40,.09); }

.course-banner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px; background: linear-gradient(125deg, rgba(var(--accent-rgb), .11), rgba(var(--secondary-rgb), .06)); border: 1px solid rgba(var(--accent-rgb), .16); border-radius: 18px; }
.course-banner h2 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.course-banner p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.course-banner-meta { display: flex; gap: 22px; }
.course-banner-meta div { display: grid; gap: 3px; text-align: right; }
.course-banner-meta span { color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.course-banner-meta strong { font-size: 15px; }

.subjects-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 14px; }
.subject-card { position: relative; min-height: 205px; padding: 18px; display: grid; align-content: space-between; gap: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.subject-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--subject-color); }
.subject-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--subject-color) 45%, var(--line)); box-shadow: var(--shadow-md); }
.subject-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.subject-title { min-width: 0; }
.subject-title h3 { margin: 0; font-size: 17px; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subject-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.subject-menu-button { margin: -5px -5px 0 0; }
.subject-score-row { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.subject-score { display: grid; gap: 2px; }
.subject-score strong { font-size: 31px; line-height: 1; letter-spacing: -.055em; }
.subject-score span { color: var(--muted); font-size: 10px; }
.mini-stats { display: flex; gap: 12px; }
.mini-stats div { display: grid; gap: 2px; text-align: right; }
.mini-stats span { color: var(--faint); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.mini-stats strong { font-size: 12px; }
.subject-progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.subject-progress span { display: block; height: 100%; width: var(--progress); background: var(--subject-color); border-radius: inherit; }
.subject-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.competency-dots { display: flex; align-items: center; }
.competency-dots i { width: 18px; height: 18px; margin-left: -4px; display: grid; place-items: center; color: #fff; background: var(--dot-color, var(--accent)); border: 2px solid var(--surface); border-radius: 50%; font-size: 7px; font-style: normal; font-weight: 800; }
.competency-dots i:first-child { margin-left: 0; }

.subject-detail-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.subject-detail-icon { width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: var(--subject-color); border-radius: 15px; font-size: 20px; font-weight: 800; }
.subject-detail-copy { min-width: 0; }
.subject-detail-copy h2 { margin: 0; font-size: 24px; letter-spacing: -.045em; }
.subject-detail-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.detail-kpis { display: flex; gap: 22px; }
.detail-kpis div { display: grid; gap: 3px; text-align: right; }
.detail-kpis span { color: var(--faint); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-kpis strong { font-size: 17px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 16px; }
.assessment-list { display: grid; gap: 7px; }
.assessment-row { min-height: 61px; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 8px 9px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.assessment-row:hover { background: var(--surface-2); border-color: var(--line); }
.assessment-type-icon { width: 37px; height: 37px; display: grid; place-items: center; color: var(--subject-color); background: color-mix(in srgb, var(--subject-color) 11%, transparent); border-radius: 10px; }
.assessment-type-icon svg { width: 17px; }
.assessment-copy { min-width: 0; display: grid; gap: 3px; }
.assessment-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assessment-copy span { color: var(--muted); font-size: 10px; }
.status-pill { padding: 5px 8px; color: var(--muted); background: var(--surface-3); border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-pill.is-done { color: var(--success); background: color-mix(in srgb, var(--success) 11%, transparent); }
.status-pill.is-failed { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.status-pill.is-pending { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); }
.score-badge { min-width: 45px; height: 37px; display: grid; place-items: center; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 800; }
.score-badge.is-good { color: var(--success); }
.score-badge.is-bad { color: var(--danger); }
.competency-list { display: grid; gap: 10px; }
.competency-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.competency-code { min-width: 34px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--competency-color, var(--accent)); border-radius: 9px; font-size: 9px; font-weight: 800; }
.competency-copy { min-width: 0; display: grid; gap: 5px; }
.competency-copy strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thin-progress { height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.thin-progress span { display: block; height: 100%; width: var(--progress, 0%); background: var(--competency-color, var(--accent)); border-radius: inherit; }
.competency-row > strong { font-size: 11px; }
.objective-row { display: flex; align-items: center; gap: 9px; padding: 9px; background: var(--surface-2); border-radius: 10px; }
.objective-check { width: 21px; height: 21px; flex: 0 0 auto; display: grid; place-items: center; color: var(--faint); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.objective-row.is-done .objective-check { color: #fff; background: var(--success); border-color: var(--success); }
.objective-row span { min-width: 0; flex: 1; font-size: 11px; }
.objective-row.is-done span { color: var(--muted); text-decoration: line-through; }

.stats-panels { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.ranking-row { min-height: 49px; display: grid; grid-template-columns: 28px auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.ranking-row:hover { background: var(--surface-2); }
.ranking-position { color: var(--faint); font-size: 10px; font-weight: 800; text-align: center; }
.ranking-position.is-podium { color: var(--warning); }
.ranking-copy { min-width: 0; display: grid; gap: 2px; }
.ranking-copy strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-copy span { color: var(--muted); font-size: 9px; }
.ranking-value { font-size: 13px; }
.chart-shell { min-height: 250px; display: flex; align-items: end; gap: 9px; padding: 25px 6px 8px; border-bottom: 1px solid var(--line); }
.chart-bar-group { min-width: 34px; flex: 1; display: grid; gap: 7px; text-align: center; }
.chart-bar-track { position: relative; height: 180px; display: flex; align-items: end; justify-content: center; background: linear-gradient(to top, transparent 24%, var(--line) 25%, transparent 26%, transparent 49%, var(--line) 50%, transparent 51%, transparent 74%, var(--line) 75%, transparent 76%); }
.chart-bar { width: min(30px, 70%); height: var(--height, 0%); min-height: 2px; background: linear-gradient(180deg, var(--bar-color, var(--accent)), color-mix(in srgb, var(--bar-color, var(--accent)) 70%, #000)); border-radius: 7px 7px 3px 3px; }
.chart-bar-group strong { font-size: 9px; }
.chart-bar-group span { color: var(--faint); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.distribution { display: grid; grid-template-columns: repeat(11, minmax(0,1fr)); gap: 5px; align-items: end; min-height: 180px; }
.distribution-col { display: grid; gap: 5px; text-align: center; }
.distribution-track { height: 125px; display: flex; align-items: end; background: var(--surface-3); border-radius: 7px; overflow: hidden; }
.distribution-track span { width: 100%; height: var(--height, 0%); min-height: 2px; background: var(--accent); }
.distribution-col strong { font-size: 8px; }
.distribution-col small { color: var(--faint); font-size: 7px; }

.data-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.data-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); font-size: 11px; }
.data-table th { position: sticky; top: 0; z-index: 1; color: var(--faint); background: var(--surface-2); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.table-subject { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.table-actions { display: flex; justify-content: flex-end; gap: 5px; }

.calendar-shell { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 15px; align-items: start; }
.calendar-sidebar { display: grid; gap: 14px; }
.mini-calendar { padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.mini-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mini-calendar-head strong { font-size: 12px; }
.mini-calendar-head div { display: flex; }
.mini-calendar-head button { width: 27px; height: 27px; display: grid; place-items: center; color: var(--muted); background: transparent; border-radius: 8px; cursor: pointer; }
.mini-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-calendar-grid span { height: 26px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; font-size: 8px; }
.mini-calendar-grid .mini-weekday { height: 18px; color: var(--faint); font-size: 7px; font-weight: 800; }
.mini-calendar-grid button { height: 27px; display: grid; place-items: center; color: var(--muted); background: transparent; border-radius: 8px; font-size: 9px; cursor: pointer; }
.mini-calendar-grid button:hover { background: var(--surface-3); }
.mini-calendar-grid button.is-today { color: #fff; background: var(--accent); }
.mini-calendar-grid button.is-selected:not(.is-today) { color: var(--accent); background: rgba(var(--accent-rgb), .11); }
.mini-calendar-grid button.is-other { opacity: .4; }
.calendar-layers { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.calendar-layers-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.calendar-layers-head strong { font-size: 12px; }
.layer-list { display: grid; gap: 5px; }
.layer-row { min-height: 38px; display: flex; align-items: center; gap: 4px; padding: 0 5px; border-radius: 10px; }
.layer-row:hover { background: var(--surface-2); }
.layer-toggle { min-width: 0; min-height: 38px; flex: 1; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.layer-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.layer-checkbox { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; color: transparent; background: transparent; border: 1.5px solid color-mix(in srgb, var(--layer-color, var(--accent)) 45%, var(--line)); border-radius: 5px; transition: color .16s, background .16s, border-color .16s, transform .16s; }
.layer-checkbox svg { width: 11px; height: 11px; stroke-width: 3; }
.layer-toggle input:checked + .layer-checkbox { color: #fff; background: var(--layer-color, var(--accent)); border-color: var(--layer-color, var(--accent)); }
.layer-toggle input:active + .layer-checkbox { transform: scale(.9); }
.layer-toggle input:focus-visible + .layer-checkbox { outline: 3px solid color-mix(in srgb, var(--layer-color, var(--accent)) 24%, transparent); outline-offset: 2px; }
.layer-toggle i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--layer-color, var(--accent)); transition: opacity .16s; }
.layer-name { min-width: 0; flex: 1; overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; transition: opacity .16s; }
.layer-row.is-hidden .layer-toggle i { opacity: .28; }
.layer-row.is-hidden .layer-name { opacity: .5; }
.layer-row > button { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; color: var(--faint); background: transparent; border-radius: 7px; cursor: pointer; }
.layer-row > button:hover { color: var(--text); background: var(--surface-3); }
.calendar-main { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.calendar-toolbar { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.calendar-title-group { display: flex; align-items: center; gap: 8px; }
.calendar-title-group > div { display: flex; }
.calendar-title-group button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); background: transparent; border-radius: 9px; cursor: pointer; }
.calendar-title-group button:hover { background: var(--surface-3); color: var(--text); }
.calendar-title-group h2 { margin: 0 0 0 7px; font-size: 18px; letter-spacing: -.035em; text-transform: capitalize; }
.calendar-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.calendar-search { height: 36px; width: 190px; display: flex; align-items: center; gap: 7px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.calendar-search svg { width: 15px; color: var(--faint); }
.calendar-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 10px; }
.calendar-month { min-width: 780px; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border-bottom: 1px solid var(--line); }
.calendar-weekdays span { height: 34px; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-day { position: relative; min-height: 118px; padding: 7px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-day:hover { background: var(--surface-2); }
.calendar-day.is-other { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.calendar-day.is-other .day-number { color: var(--faint); }
.calendar-day.is-selected { box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), .3); }
.day-number { width: 25px; height: 25px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; font-size: 10px; font-weight: 700; }
.calendar-day.is-today .day-number { color: #fff; background: var(--accent); }
.day-events { display: grid; gap: 3px; margin-top: 4px; }
.month-event { min-width: 0; min-height: 22px; display: flex; align-items: center; gap: 5px; padding: 0 6px; color: var(--event-text, var(--text)); background: color-mix(in srgb, var(--event-color) 14%, transparent); border-left: 3px solid var(--event-color); border-radius: 5px; cursor: pointer; }
.month-event:hover { background: color-mix(in srgb, var(--event-color) 22%, transparent); }
.month-event time { flex: 0 0 auto; color: var(--muted); font-size: 7px; }
.month-event strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.month-event.is-derived { border-left-style: dashed; }
.more-events { padding: 2px 5px; color: var(--muted); font-size: 8px; font-weight: 700; }
.calendar-week-view { min-width: 840px; }
.week-header { display: grid; grid-template-columns: 58px repeat(7, minmax(95px,1fr)); border-bottom: 1px solid var(--line); }
.week-header > div { min-height: 52px; display: grid; place-items: center; border-left: 1px solid var(--line); }
.week-header strong { display: block; font-size: 11px; }
.week-header span { color: var(--faint); font-size: 8px; text-transform: uppercase; }
.week-header .is-today strong { width: 26px; height: 26px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; }
.week-body { position: relative; display: grid; grid-template-columns: 58px repeat(7, minmax(95px,1fr)); height: 720px; overflow: auto; }
.week-hours { display: grid; grid-template-rows: repeat(15, 48px); }
.week-hours span { padding: 3px 7px 0 0; color: var(--faint); font-size: 8px; text-align: right; border-bottom: 1px solid var(--line); }
.week-column { position: relative; height: 720px; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line) 48px); }
.week-event { position: absolute; left: 3px; right: 3px; top: var(--top); min-height: 28px; height: var(--height); padding: 5px 6px; overflow: hidden; color: var(--event-text, var(--text)); background: color-mix(in srgb, var(--event-color) 19%, var(--surface)); border-left: 3px solid var(--event-color); border-radius: 6px; cursor: pointer; }
.week-event strong { display: block; font-size: 8px; }
.week-event span { color: var(--muted); font-size: 7px; }
.agenda-view { padding: 8px 16px 20px; }
.agenda-day-group { padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda-day-group:last-child { border-bottom: 0; }
.agenda-day-title { margin: 0 0 7px; font-size: 11px; text-transform: capitalize; }
.calendar-overflow { overflow: auto; }

.documents-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.document-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-chip { min-height: 34px; padding: 0 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 10px; font-weight: 700; cursor: pointer; }
.filter-chip.is-active { color: var(--accent); background: rgba(var(--accent-rgb), .08); border-color: rgba(var(--accent-rgb), .25); }
.template-strip { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; }
.document-template { min-height: 112px; padding: 16px; display: grid; align-content: space-between; text-align: left; background: linear-gradient(145deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: 15px; cursor: pointer; transition: transform .18s, border-color .18s; }
.document-template:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), .3); }
.template-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--template-color, var(--accent)); background: color-mix(in srgb, var(--template-color, var(--accent)) 10%, transparent); border-radius: 11px; }
.document-template strong { display: block; margin-top: 13px; font-size: 12px; }
.document-template span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.documents-grid { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 14px; }
.document-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.document-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.document-preview { position: relative; height: 135px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, color-mix(in srgb, var(--doc-color, var(--accent)) 10%, var(--surface-2)), var(--surface-2)); cursor: pointer; }
.preview-paper { width: 57%; height: 78%; padding: 14px 12px; background: #fff; border-radius: 5px; box-shadow: 0 8px 22px rgba(30,32,48,.12); }
.preview-paper i { display: block; height: 5px; margin-bottom: 7px; background: color-mix(in srgb, var(--doc-color, var(--accent)) 35%, #e9e9ef); border-radius: 999px; }
.preview-paper i:nth-child(1) { width: 55%; height: 7px; }
.preview-paper i:nth-child(2) { width: 85%; }
.preview-paper i:nth-child(3) { width: 72%; }
.preview-board { width: 73%; height: 70%; position: relative; background: #fff; border-radius: 8px; box-shadow: 0 8px 22px rgba(30,32,48,.12); }
.preview-board::before, .preview-board::after { content: ""; position: absolute; border-radius: 6px; }
.preview-board::before { width: 38%; height: 28%; left: 12%; top: 19%; background: color-mix(in srgb, var(--doc-color, var(--accent)) 23%, #fff); }
.preview-board::after { width: 45%; height: 7px; right: 10%; bottom: 24%; background: var(--doc-color, var(--accent)); }
.document-card-body { padding: 14px; }
.document-card-head { display: flex; align-items: flex-start; gap: 9px; }
.document-kind-icon { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; color: var(--doc-color, var(--accent)); background: color-mix(in srgb, var(--doc-color, var(--accent)) 10%, transparent); border-radius: 8px; }
.document-kind-icon svg { width: 14px; }
.document-card-copy { min-width: 0; flex: 1; cursor: pointer; }
.document-card-copy strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.document-card-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.document-card-menu { width: 28px; height: 28px; margin-top: -4px; }
.tag-list { margin-top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.tag { padding: 4px 7px; color: var(--muted); background: var(--surface-3); border-radius: 999px; font-size: 8px; font-weight: 700; }

.settings-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 16px; align-items: start; }
.settings-list { display: grid; gap: 14px; }
.settings-section { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.settings-section h3 { margin: 0; font-size: 15px; }
.settings-section > p { margin: 5px 0 20px; color: var(--muted); font-size: 11px; }
.settings-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.settings-row-copy { min-width: 0; }
.settings-row-copy strong { display: block; font-size: 11px; }
.settings-row-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; transition: background .2s; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: var(--surface); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.color-control { display: flex; align-items: center; gap: 8px; }
.color-control input[type="color"] { width: 38px; height: 32px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.color-control input[type="text"] { width: 82px; padding: 7px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; }
.theme-presets { display: flex; gap: 7px; }
.theme-preset { width: 42px; height: 31px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--preset-bg); border: 2px solid transparent; border-radius: 9px; cursor: pointer; }
.theme-preset span { border-radius: 4px; background: var(--preset-a); }
.theme-preset span:last-child { background: var(--preset-b); }
.theme-preset.is-active { border-color: var(--accent); }
.settings-preview { position: sticky; top: calc(var(--topbar-height) + 20px); padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.settings-preview > span { color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.preview-window { margin-top: 13px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.preview-window-head { height: 32px; display: flex; align-items: center; gap: 5px; padding: 0 9px; background: var(--surface); border-bottom: 1px solid var(--line); }
.preview-window-head i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.preview-window-body { padding: 13px; display: grid; grid-template-columns: 36px 1fr; gap: 9px; }
.preview-window-nav { min-height: 120px; background: var(--surface); border-radius: 8px; }
.preview-window-main { display: grid; gap: 7px; }
.preview-window-main div { background: var(--surface); border-radius: 8px; }
.preview-window-main div:first-child { background: linear-gradient(135deg, rgba(var(--accent-rgb), .25), rgba(var(--secondary-rgb), .16)); }

.document-editor { position: fixed; inset: 0; z-index: 100; display: none; background: var(--bg); }
.document-editor.is-open { display: flex; flex-direction: column; animation: editor-in .22s ease both; }
.editor-topbar { min-height: 65px; display: flex; align-items: center; gap: 14px; padding: 9px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.editor-identity { min-width: 180px; display: flex; align-items: center; gap: 9px; }
.editor-doc-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--accent); border-radius: 10px; }
.editor-title-wrap { min-width: 0; display: grid; gap: 2px; }
.editor-title-input { min-width: 120px; width: min(320px, 30vw); padding: 2px 4px; border: 1px solid transparent; outline: 0; background: transparent; border-radius: 6px; font-size: 13px; font-weight: 700; }
.editor-title-input:focus { border-color: var(--line-strong); background: var(--surface-2); }
.editor-save-state { padding-left: 4px; color: var(--faint); font-size: 8px; }
.editor-mode-tabs { height: 38px; display: flex; padding: 3px; background: var(--surface-3); border-radius: 10px; }
.editor-mode-tabs button { padding: 0 12px; color: var(--muted); background: transparent; border-radius: 8px; font-size: 10px; font-weight: 750; cursor: pointer; }
.editor-mode-tabs button.is-active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgba(25,27,40,.1); }
.editor-toolbar { min-width: 0; flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; overflow: auto; }
.editor-tool { min-width: 34px; height: 34px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background: transparent; border-radius: 9px; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.editor-tool svg { width: 16px; }
.editor-tool:hover, .editor-tool.is-active { color: var(--text); background: var(--surface-3); }
.editor-tool.is-active { color: var(--accent); }
.editor-color-tool input { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.editor-select-tool select { max-width: 70px; color: var(--text); background: transparent; border: 0; outline: 0; font: inherit; cursor: pointer; }
.editor-toolbar-divider { width: 1px; height: 24px; flex: 0 0 auto; margin: 0 3px; background: var(--line); }
.editor-actions { display: flex; align-items: center; gap: 6px; }
.editor-workspace { min-height: 0; flex: 1; display: flex; overflow: hidden; }
.doc-page-scroller { min-width: 0; flex: 1; overflow: auto; padding: 38px 22px 80px; background: var(--surface-3); }
.doc-page { width: min(820px, calc(100vw - 48px)); min-height: 1060px; margin: 0 auto; padding: 82px 90px; color: #202124; background: #fff; outline: 0; box-shadow: 0 6px 25px rgba(28,30,45,.12); font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.7; }
.doc-page:empty::before { content: "Empieza a escribir…"; color: #9ca0aa; }
.doc-page h1 { font-size: 34px; line-height: 1.2; }
.doc-page h2 { font-size: 25px; line-height: 1.25; }
.doc-page h3 { font-size: 19px; }
.doc-page img { max-width: 100%; border-radius: 6px; }
.board-workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; background: var(--surface-3); }
.board-subtoolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.board-page-tabs { min-width: 0; display: flex; gap: 5px; overflow: auto; }
.board-page-tab { min-height: 31px; padding: 0 10px; color: var(--muted); background: transparent; border-radius: 8px; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.board-page-tab.is-active { color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.board-controls { display: flex; align-items: center; gap: 5px; }
.board-size-control { height: 33px; display: flex; align-items: center; background: var(--surface-3); border-radius: 9px; }
.board-size-control button { width: 29px; height: 29px; color: var(--muted); background: transparent; cursor: pointer; }
.board-size-control span { min-width: 86px; text-align: center; color: var(--muted); font-size: 8px; font-weight: 800; }
.board-viewport { min-width: 0; min-height: 0; flex: 1; overflow: auto; position: relative; background-color: #dfe1e7; background-image: radial-gradient(#aeb1bb 1px, transparent 1px); background-size: 18px 18px; touch-action: none; }
body[data-theme="dark"] .board-viewport { background-color: #24262d; background-image: radial-gradient(#454852 1px, transparent 1px); }
.board-sizer { position: relative; width: var(--board-width); height: var(--board-height); min-width: 100%; min-height: 100%; }
.board-surface { position: absolute; left: 70px; top: 60px; width: 2600px; height: 1700px; transform: scale(var(--board-zoom, .55)); transform-origin: 0 0; overflow: hidden; background: var(--board-bg, #fff); box-shadow: 0 14px 45px rgba(26,28,40,.18); }
.board-surface.is-hand { cursor: grab; }
.board-surface.is-drawing { cursor: crosshair; }
.board-svg { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.board-objects { position: absolute; inset: 0; z-index: 2; }
.board-object { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); color: var(--object-color, #202124); transform: rotate(var(--rotation, 0deg)); transform-origin: center; outline: 0; cursor: move; user-select: none; }
.board-object.is-selected { outline: 3px solid var(--accent); outline-offset: 3px; }
.board-object-text { padding: 8px; font-size: var(--font-size, 28px); white-space: pre-wrap; overflow-wrap: anywhere; }
.board-object-text[contenteditable="true"] { cursor: text; user-select: text; }
.board-object-sticky { padding: 18px; background: var(--object-bg, #fff3ad); border: 1px solid color-mix(in srgb, var(--object-bg, #fff3ad) 68%, #000); border-radius: 12px; box-shadow: 0 8px 18px rgba(30,31,40,.12); font-size: var(--font-size, 24px); white-space: pre-wrap; overflow-wrap: anywhere; }
.board-object-shape { height: var(--h); background: var(--object-bg, #dce8ff); border: var(--border-width, 3px) solid var(--object-color, #476eaf); border-radius: var(--shape-radius, 12px); }
.board-object-image { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 8px; pointer-events: none; }
.board-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: #7b8190; background: #eceef3; border: 1px dashed #b6bac4; border-radius: 8px; font-size: 10px; }
.board-image-placeholder svg { width: 28px; height: 28px; }
.resize-handle { position: absolute; width: 18px; height: 18px; right: -10px; bottom: -10px; background: var(--surface); border: 3px solid var(--accent); border-radius: 50%; cursor: nwse-resize; }
.rotate-handle { position: absolute; width: 18px; height: 18px; left: 50%; top: -34px; translate: -50% 0; background: var(--surface); border: 3px solid var(--accent); border-radius: 50%; cursor: grab; }
.rotate-handle::after { content: ""; position: absolute; width: 2px; height: 15px; left: 5px; top: 12px; background: var(--accent); }
.board-inspector { width: 260px; padding: 15px; overflow: auto; background: var(--surface); border-left: 1px solid var(--line); }
.board-inspector h3 { margin: 0 0 14px; font-size: 13px; }
.inspector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inspector-field { display: grid; gap: 5px; }
.inspector-field.full { grid-column: 1 / -1; }
.inspector-field span { color: var(--faint); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.inspector-field input, .inspector-field select, .inspector-field textarea { min-width: 0; width: 100%; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 9px; }
.inspector-field textarea { min-height: 80px; resize: vertical; }
.inspector-edit-hint { grid-column: 1 / -1; margin: 3px 0 0; padding: 9px 10px; color: var(--muted); background: var(--surface-3); border-radius: 8px; font-size: 8px; line-height: 1.45; }
.zoom-control { height: 33px; display: flex; align-items: center; background: var(--surface-3); border-radius: 9px; }
.zoom-control button { width: 30px; height: 30px; color: var(--muted); background: transparent; cursor: pointer; }
.zoom-control span { min-width: 39px; text-align: center; font-size: 8px; font-weight: 800; }

.modal-host { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.modal-host::before { content: ""; position: absolute; inset: 0; background: rgba(18,19,27,.55); backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(620px, 100%); max-height: min(760px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); animation: modal-in .2s ease both; }
.modal-card.is-wide { width: min(880px, 100%); }
.modal-card.is-compact { width: min(460px, 100%); }
.modal-card.is-compact .modal-head { min-height: 64px; padding: 14px 17px; }
.modal-card.is-compact .modal-head h2 { max-width: 340px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.modal-card.is-compact .modal-body { padding: 0; }
.modal-card.is-compact .modal-footer { min-height: 62px; padding: 11px 16px; }
.modal-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head p { margin: 0 0 4px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.modal-body { min-height: 0; padding: 20px; overflow: auto; }
.modal-footer { min-height: 66px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; background: var(--surface-2); border-top: 1px solid var(--line); }
.modal-footer-spacer { flex: 1; }
.event-preview { position: relative; overflow: hidden; padding: 17px; }
.event-preview::before { content: ""; position: absolute; width: 190px; height: 190px; right: -105px; top: -120px; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--event-color) 20%, transparent), transparent 68%); }
.event-preview-chips { position: relative; display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.event-preview-layer, .event-preview-mode { min-height: 25px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 8px; font-weight: 750; }
.event-preview-layer i { width: 7px; height: 7px; background: var(--event-color); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--event-color) 13%, transparent); }
.event-preview-mode { color: color-mix(in srgb, var(--event-color) 82%, var(--text)); background: color-mix(in srgb, var(--event-color) 8%, var(--surface)); border-color: color-mix(in srgb, var(--event-color) 20%, var(--line)); }
.event-preview-details { position: relative; display: grid; gap: 3px; }
.event-preview-detail { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 9px; color: var(--text); border-radius: 11px; }
.event-preview-detail:hover { background: var(--surface-2); }
.event-preview-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--event-color); background: color-mix(in srgb, var(--event-color) 9%, var(--surface)); border-radius: 9px; }
.event-preview-icon svg { width: 15px; height: 15px; }
.event-preview-detail > span:nth-child(2) { min-width: 0; }
.event-preview-detail small { display: block; margin-bottom: 3px; color: var(--faint); font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.event-preview-detail strong { display: block; overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.event-preview-detail em { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-style: normal; }
.event-preview-detail p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; white-space: pre-wrap; }
.event-preview-detail.is-notes { align-items: start; padding-top: 10px; }
.event-preview-detail.is-link { grid-template-columns: 34px minmax(0, 1fr) 18px; text-decoration: none; }
.event-preview-detail.is-link > svg { width: 14px; color: var(--faint); }
.event-preview-edit { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: #fff; background: var(--accent); border-radius: 10px; font-size: 9px; font-weight: 800; cursor: pointer; box-shadow: 0 7px 16px rgba(var(--accent-rgb), .2); }
.event-preview-edit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.event-preview-edit svg { width: 14px; height: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 40px; padding: 9px 11px; outline: 0; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 11px; transition: border-color .18s, box-shadow .18s; }
.form-field textarea { min-height: 90px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .09); }
.form-field small { color: var(--faint); font-size: 8px; line-height: 1.45; }
.form-field .inline-fields { display: flex; gap: 7px; }
.checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.checkbox-chip { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 9px; cursor: pointer; }
.checkbox-chip input { accent-color: var(--accent); }
.confirm-copy { color: var(--muted); font-size: 12px; line-height: 1.6; }
.confirm-copy strong { color: var(--text); }
.quick-create-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.quick-create-card { min-height: 115px; padding: 15px; display: grid; align-content: space-between; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.quick-create-card:hover { border-color: rgba(var(--accent-rgb), .3); }
.quick-create-card svg { color: var(--accent); }
.quick-create-card strong { display: block; font-size: 11px; }
.quick-create-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 150; width: min(350px, calc(100vw - 40px)); display: grid; gap: 8px; pointer-events: none; }
.toast { min-height: 58px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 11px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-md); animation: toast-in .25s ease both; }
.toast-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--success); background: color-mix(in srgb, var(--success) 11%, transparent); border-radius: 9px; }
.toast.is-error .toast-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.toast-copy strong { display: block; font-size: 11px; }
.toast-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

body.is-compact .main-content { padding-top: 18px; }
body.is-compact .view-stack { gap: 12px; }
body.is-compact .metric-card { min-height: 92px; padding: 13px; }
body.is-compact .panel-pad, body.is-compact .settings-section { padding: 15px; }
body.is-compact .subject-card { padding: 14px; }
body.is-compact .calendar-day { min-height: 92px; }
body.is-compact .assessment-row { min-height: 54px; }

@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes editor-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .42; } }

@media (max-width: 1260px) {
  .topbar { grid-template-columns: minmax(160px, .7fr) minmax(230px, 1fr) auto; padding-inline: 20px; gap: 14px; }
  .sync-button span { display: none; }
  .subjects-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .documents-grid { grid-template-columns: repeat(3, minmax(210px, 1fr)); }
  .template-strip { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1400px) and (min-width: 721px) {
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-toolbar-actions { width: 100%; }
  .calendar-search { flex: 1; width: auto; }
  .editor-topbar { gap: 8px; padding-inline: 10px; }
  .editor-identity { min-width: 150px; }
  .editor-title-input { width: min(220px, 19vw); }
  .editor-toolbar { justify-content: flex-start; }
  .editor-toolbar .editor-tool span { display: none; }
  .editor-tool { padding-inline: 7px; }
}

@media (max-width: 980px) {
  :root { --sidebar-width: 0px; }
  body.sidebar-collapsed { --sidebar-width: 0px; }
  .sidebar { width: 270px; transform: translateX(-102%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(15,16,23,.45); }
  body.sidebar-collapsed .brand-copy, body.sidebar-collapsed .nav-item span, body.sidebar-collapsed .nav-badge, body.sidebar-collapsed .sidebar-course-card, body.sidebar-collapsed .sync-mini span { display: initial; }
  body.sidebar-collapsed .sidebar { padding-inline: 14px; }
  body.sidebar-collapsed .nav-item { justify-content: flex-start; padding-inline: 13px; }
  body.sidebar-collapsed .nav-item.is-active::before { left: 0; }
  body.sidebar-collapsed .brand-button { justify-content: flex-start; }
  body.sidebar-collapsed .sync-mini { justify-content: flex-start; padding: 0 12px; }
  .sidebar-collapse { display: none; }
  .workspace-shell { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { grid-template-columns: minmax(150px, .6fr) minmax(240px, 1fr) auto; }
  .mode-switch { display: none; }
  .main-content { padding-inline: 20px; }
  .hero-panel { grid-template-columns: 1fr; }
  .focus-card { min-height: 170px; }
  .dashboard-grid, .detail-layout, .settings-layout { grid-template-columns: 1fr; }
  .settings-preview { position: static; }
  .calendar-shell { grid-template-columns: 1fr; }
  .calendar-sidebar { grid-template-columns: minmax(220px, .5fr) minmax(250px, 1fr); }
  .documents-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .board-inspector { display: none; }
}

@media (max-width: 720px) {
  :root { --topbar-height: 64px; }
  .topbar { height: auto; min-height: var(--topbar-height); grid-template-columns: 1fr auto; padding: 9px 12px; }
  .global-search-wrap { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .topbar-actions .sync-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    display: inline-flex;
    justify-content: center;
  }
  .topbar-context p { display: none; }
  .topbar-context h1 { font-size: 17px; }
  .primary-button.compact span { display: none; }
  .main-content { padding: 18px 12px 38px; }
  .view-stack { gap: 16px; }
  .hero-panel { padding: 24px 20px; border-radius: 18px; }
  .hero-copy h2 { font-size: 33px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .metric-card { min-height: 98px; padding: 14px; }
  .metric-value strong { font-size: 22px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .course-banner { align-items: flex-start; flex-direction: column; }
  .course-banner-meta { width: 100%; justify-content: space-between; }
  .course-banner-meta div { text-align: left; }
  .subjects-grid, .stats-panels { grid-template-columns: 1fr; }
  .subject-detail-head { grid-template-columns: auto 1fr; }
  .subject-detail-head > .detail-kpis { grid-column: 1 / -1; justify-content: space-between; }
  .detail-kpis div { text-align: left; }
  .calendar-sidebar { grid-template-columns: 1fr; }
  .mini-calendar { display: none; }
  .calendar-main { order: -1; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-toolbar-actions { width: 100%; }
  .calendar-search { flex: 1; width: auto; }
  .calendar-main { border-radius: 14px; }
  .template-strip { grid-template-columns: 1fr 1fr; }
  .documents-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .document-preview { height: 110px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .checkbox-list { grid-template-columns: 1fr; }
  .quick-create-grid { grid-template-columns: 1fr; }
  .modal-host { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); border-radius: 16px; }
  .editor-topbar { height: auto; gap: 7px; padding-inline: 8px; flex-wrap: wrap; }
  .editor-identity { min-width: 0; flex: 1 1 180px; }
  .editor-doc-icon { display: none; }
  .editor-title-input { min-width: 0; width: min(140px, 36vw); }
  .editor-actions { flex: 0 0 auto; }
  .editor-mode-tabs { order: 3; flex: 0 0 171px; }
  .editor-toolbar { order: 4; min-width: 140px; width: auto; flex: 1 1 150px; justify-content: flex-start; }
  .editor-toolbar .editor-tool span { display: none; }
  .editor-actions .secondary-button span { display: none; }
  .doc-page-scroller { padding: 18px 8px 55px; }
  .doc-page { width: 100%; min-height: calc(100vh - 150px); padding: 45px 28px; }
  .board-subtoolbar { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-foot { display: none; }
  .documents-grid { grid-template-columns: 1fr; }
  .template-strip { grid-template-columns: 1fr; }
  .document-template { min-height: 92px; }
  .agenda-row { grid-template-columns: 45px 3px minmax(0,1fr); }
  .agenda-row .date-chip { display: none; }
  .assessment-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .assessment-row .status-pill { display: none; }
  .course-banner-meta { gap: 10px; }
  .calendar-search { display: none; }
  .calendar-title-group h2 { font-size: 15px; }
  .editor-mode-tabs button { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Estudio 2026 - product identity and planning system */
:root {
  --brand-violet: var(--accent);
  --brand-teal: var(--secondary);
  --brand-coral: #ff6b78;
  --brand-blue: #3488f4;
  --brand-ink: #161b2b;
  --brand-paper: #f6f7fb;
  --brand-line: #e1e5ef;
}

.brand-mark { padding: 0; overflow: hidden; background: transparent !important; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.mode-switch { display: flex; }
.redesigned-home { max-width: 1500px; margin: 0 auto; }
.today-hero { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 28px; align-items: stretch; padding: 34px; border-radius: 26px; color: #fff; overflow: hidden; position: relative; background: radial-gradient(circle at 80% 15%, rgba(var(--secondary-rgb),.35), transparent 32%), linear-gradient(135deg,color-mix(in srgb,var(--accent) 20%,#111827) 0%,color-mix(in srgb,var(--accent) 58%,#111827) 100%); box-shadow: 0 22px 60px rgba(27,31,48,.16); }
.today-hero::after { content:""; position:absolute; width:230px; height:230px; right:-95px; bottom:-120px; border:38px solid rgba(var(--accent-rgb),.42); border-radius:50%; }
.today-heading { position:relative; z-index:1; align-self:center; }
.today-heading .kicker { color:color-mix(in srgb,var(--secondary) 65%,#fff); margin:0 0 8px; text-transform:capitalize; }
.today-heading h2 { color:#fff; font-size:clamp(30px,4vw,54px); line-height:1.04; letter-spacing:-.04em; max-width:700px; margin:0 0 12px; }
.today-heading > p:last-child { color:#d9d7ed; font-size:16px; margin:0; }
.planned-hours-card { position:relative; z-index:1; padding:24px; border:1px solid rgba(255,255,255,.22); border-radius:21px; background:rgba(255,255,255,.12); backdrop-filter:blur(16px); display:flex; flex-direction:column; justify-content:center; }
.planned-hours-card > span { color:#d9d7ed; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.planned-hours-card > strong { color:#fff; font-size:42px; letter-spacing:-.04em; margin:8px 0 0; }
.planned-hours-card p { color:#d9d7ed; margin:4px 0 18px; }
.planned-hours-card button { align-self:flex-start; border:0; color:#fff; background:transparent; font-weight:700; padding:0; display:flex; align-items:center; gap:5px; }
.planned-hours-card svg { width:16px; height:16px; }
.home-priority-grid,.home-summary-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(300px,.8fr); gap:20px; }
.home-summary-grid { grid-template-columns:minmax(0,1.35fr) minmax(360px,1fr); }
.study-launch-card { border-radius:22px; padding:26px; color:#fff; background:linear-gradient(145deg,var(--accent),color-mix(in srgb,var(--accent) 72%,#111827)); box-shadow:0 15px 40px rgba(var(--accent-rgb),.28); display:flex; flex-direction:column; justify-content:center; min-height:235px; }
.study-launch-card.is-active { background:linear-gradient(145deg,#087d6b,#20b895); }
.study-launch-card > span { font-size:12px; text-transform:uppercase; letter-spacing:.09em; font-weight:800; opacity:.78; }
.study-launch-card h3 { color:#fff; font-size:24px; line-height:1.15; margin:12px 0 8px; }
.study-launch-card p { color:rgba(255,255,255,.82); line-height:1.5; margin:0 0 22px; }
.study-launch-card button { border:1px solid rgba(255,255,255,.25); background:#fff; color:#392a85; border-radius:13px; padding:12px 16px; font-weight:800; display:flex; align-items:center; justify-content:center; gap:8px; }
.study-launch-card button.secondary { background:rgba(255,255,255,.12); color:#fff; }
.study-launch-card button svg { width:18px; height:18px; }
.home-task-list { display:flex; flex-direction:column; }
.home-task-row { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:13px; align-items:center; border:0; border-bottom:1px solid var(--border); background:transparent; text-align:left; padding:10px 4px; color:var(--text); }
.home-task-open { display:grid; grid-template-columns:14px minmax(0,1fr); gap:13px; align-items:center; border:0; background:transparent; color:inherit; text-align:left; padding:4px; }
.home-task-row:last-child { border-bottom:0; }
.home-task-open > span { display:flex; flex-direction:column; gap:3px; }
.home-task-row small { color:var(--muted); }
.home-task-row svg { width:17px; height:17px; color:var(--muted); }
.task-state { width:11px; height:11px; border-radius:50%; background:var(--brand-coral); }
.task-state.status-progress { background:#8f98aa; }.task-state.status-done { background:var(--brand-teal); }
.weekly-stat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:18px 0; }
.weekly-stat-grid div { padding:15px 12px; border-radius:15px; background:var(--surface-soft); display:flex; flex-direction:column; gap:5px; }
.weekly-stat-grid strong { font-size:22px; color:var(--text); }.weekly-stat-grid span { font-size:12px; color:var(--muted); }
.weekly-progress-track { height:9px; border-radius:999px; background:var(--surface-soft); overflow:hidden; }
.weekly-progress-track span { display:block; width:var(--progress); max-width:100%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand-violet),var(--brand-teal)); }

.task-board { display:grid; grid-template-columns:repeat(3,minmax(260px,1fr)); gap:18px; align-items:start; }
.task-study-strip { display:flex; align-items:end; gap:14px; padding:16px 18px; border:1px solid rgba(115,87,255,.18); border-radius:17px; background:rgba(115,87,255,.07); }.task-study-strip>div{margin-right:auto;display:flex;flex-direction:column;gap:4px}.task-study-strip>div span{color:var(--muted);font-size:13px}.task-study-strip label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--muted);font-weight:700}.task-study-strip select{min-height:38px;border:1px solid var(--border);border-radius:10px;background:var(--panel);color:var(--text);padding:0 10px}.study-task-queue{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.study-task-queue article{display:grid;grid-template-columns:6px minmax(0,1fr) auto;gap:11px;align-items:center;padding:13px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}.study-task-queue i{width:5px;height:100%;min-height:38px;border-radius:999px;background:var(--event-color)}.study-task-queue span{display:flex;flex-direction:column;gap:3px}.study-task-queue small{color:var(--muted)}.study-task-queue button{border:0;border-radius:9px;padding:8px 10px;background:rgba(115,87,255,.1);color:var(--brand-violet);font-weight:800}
.task-column { border:1px solid var(--border); border-radius:20px; background:var(--panel); padding:14px; min-height:520px; }
.task-column > header { padding:6px 6px 15px; border-bottom:1px solid var(--border); margin-bottom:12px; }
.task-column > header div { display:flex; justify-content:space-between; align-items:center; }
.task-column > header span { font-weight:800; font-size:17px; }.task-column > header strong { display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:var(--surface-soft); }
.task-column > header small { color:var(--muted); }
.task-column-list { min-height:420px; display:flex; flex-direction:column; gap:10px; }
.task-card { padding:16px; border:1px solid var(--border); border-left:4px solid var(--brand-coral); border-radius:16px; background:var(--panel); box-shadow:0 8px 24px rgba(27,31,48,.06); cursor:grab; }
.task-card.status-progress { border-left-color:#8f98aa; }.task-card.status-done { border-left-color:var(--brand-teal); opacity:.78; }
.task-card-top,.task-card-bottom { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.task-card-top time { color:var(--muted); font-size:12px; flex:1; }.task-card-top button { border:0; background:transparent; color:var(--muted); padding:3px; }.task-card-top svg { width:17px; height:17px; }
.task-drag { color:#a7adbb; font-weight:900; letter-spacing:-3px; }
.task-card h3 { font-size:15px; line-height:1.3; margin:12px 0 5px; }.task-card p { font-size:13px; color:var(--muted); line-height:1.4; margin:0 0 14px; }
.task-subject { font-size:12px; font-weight:700; display:flex; align-items:center; gap:6px; }.task-subject::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--subject-color); }
.task-status-controls { display:flex; gap:7px; }.status-dot { width:16px; height:16px; padding:0; border:3px solid var(--panel); border-radius:50%; box-shadow:0 0 0 1px var(--border); opacity:.45; }.status-dot.red{background:var(--brand-coral)}.status-dot.gray{background:#8f98aa}.status-dot.green{background:var(--brand-teal)}.status-dot.is-active{opacity:1;box-shadow:0 0 0 2px currentColor}
.task-column-empty { display:grid; place-items:center; min-height:120px; border:1px dashed var(--border); border-radius:15px; color:var(--muted); }

.planner-toolbar { display:grid; grid-template-columns:minmax(230px,1fr) auto auto; align-items:center; gap:18px; }
.planner-toolbar h2 { margin:3px 0 0; font-size:23px; }.planner-toolbar .kicker { margin:0; }
.calendar-scope-tabs { display:flex; border:1px solid var(--border); padding:4px; border-radius:14px; background:var(--panel); }
.calendar-scope-tabs button { border:0; background:transparent; border-radius:10px; padding:9px 13px; color:var(--muted); font-weight:700; }.calendar-scope-tabs button.is-active { color:#fff; background:var(--accent); box-shadow:0 5px 14px rgba(var(--accent-rgb),.25); }
.planner-actions { display:flex; gap:7px; align-items:center; }.planner-actions > button { min-height:40px; border:1px solid var(--border); border-radius:11px; background:var(--panel); color:var(--text); padding:9px 12px; }.planner-actions svg { width:17px;height:17px; }
.planner-note { display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:14px; background:rgba(115,87,255,.08); border:1px solid rgba(115,87,255,.15); }.planner-note strong { color:var(--brand-violet); white-space:nowrap; }.planner-note span { color:var(--muted); font-size:13px; }
.week-planner { border:1px solid var(--border); border-radius:20px; background:var(--panel); overflow:hidden; box-shadow:0 12px 40px rgba(27,31,48,.07); }
.week-planner > header { display:grid; grid-template-columns:70px repeat(7,minmax(105px,1fr)); position:sticky; top:0; z-index:4; background:var(--panel); border-bottom:1px solid var(--border); }
.time-corner,.planner-day-head { min-height:70px; display:flex; flex-direction:column; align-items:center; justify-content:center; border-right:1px solid var(--border); }.time-corner { color:var(--muted); font-size:12px; }.planner-day-head span{font-size:12px;color:var(--muted);text-transform:uppercase;font-weight:700}.planner-day-head strong{font-size:20px;margin-top:3px}.planner-day-head.is-today strong{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;color:#fff;background:var(--brand-violet)}
.planner-scroll { display:grid; grid-template-columns:70px repeat(7,minmax(105px,1fr)); height:min(68vh,760px); overflow:auto; }
.planner-hours { position:relative; height:1224px; border-right:1px solid var(--border); background:var(--surface-soft); }.planner-hours span { display:block; height:68px; padding:7px 8px 0 0; text-align:right; font-size:11px; color:var(--muted); border-bottom:1px solid var(--border); }
.planner-day-column { position:relative; height:1224px; border-right:1px solid var(--border); background:repeating-linear-gradient(to bottom,transparent 0,transparent 33px,var(--border) 34px); }
.planner-day-column > button[data-action="create-study-at"] { display:block; width:100%; height:34px; border:0; background:transparent; }.planner-day-column > button[data-action="create-study-at"]:hover { background:rgba(115,87,255,.06); }
.planner-event { position:absolute!important; z-index:2; top:var(--top); height:var(--height); left:5px; right:5px; width:calc(100% - 10px)!important; border:0!important; border-left:4px solid var(--event-color)!important; border-radius:10px!important; background:color-mix(in srgb,var(--event-color) 15%,var(--panel))!important; color:var(--text)!important; padding:8px!important; text-align:left; overflow:hidden; box-shadow:0 5px 14px rgba(27,31,48,.08); }
.planner-event strong,.planner-event span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.planner-event strong{font-size:12px}.planner-event span{font-size:10px;color:var(--muted);margin-top:3px}.planner-event.is-external{border-left-style:dashed!important}

.study-metric-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }.study-metric-grid article { padding:22px; border:1px solid var(--border); border-radius:19px; background:var(--panel); display:flex; flex-direction:column; }.study-metric-grid span,.study-metric-grid small { color:var(--muted); }.study-metric-grid strong { font-size:30px; margin:8px 0 5px; }
.analytics-layout { display:grid; grid-template-columns:1.25fr .85fr; gap:20px; }.study-bars{display:flex;flex-direction:column;gap:18px}.study-bar-row>div:first-child{display:grid;grid-template-columns:10px 1fr auto;gap:9px;align-items:center;margin-bottom:7px}.study-bar-row i{width:9px;height:9px;border-radius:50%;background:var(--subject-color)}.study-bar-row small{color:var(--muted)}.study-bar-track{height:11px;border-radius:999px;background:var(--surface-soft);overflow:hidden}.study-bar-track span{display:block;width:var(--width);height:100%;border-radius:inherit;background:var(--subject-color)}
.session-history>div{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px 0;border-bottom:1px solid var(--border)}.session-history>div>i{width:9px;height:9px;border-radius:50%;background:var(--brand-teal)}.session-history>div>i.partial{background:#f2a84b}.session-history span{display:flex;flex-direction:column;gap:3px}.session-history small{color:var(--muted)}.session-history em{font-size:11px;color:var(--muted);font-style:normal}
.live-study { display:grid; place-items:center; gap:22px; text-align:center; padding:18px 4px; }.live-study-ring { width:210px; height:210px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; background:radial-gradient(circle at center,var(--panel) 61%,transparent 62%),conic-gradient(var(--brand-teal) 0 68%,var(--surface-soft) 68%); box-shadow:0 14px 36px rgba(45,200,166,.18); }.live-study-ring span,.live-study-schedule span,.live-study-schedule small { color:var(--muted); }.live-study-ring strong { font-size:30px; margin-top:7px; }.live-study-schedule strong { display:block; font-size:32px; margin:6px 0; font-variant-numeric:tabular-nums; }.live-study-schedule p { color:var(--brand-coral); font-weight:700; max-width:360px; }

.standard-calendar-panel { overflow:hidden; border:1px solid var(--border); border-radius:20px; background:var(--panel); box-shadow:0 12px 40px rgba(27,31,48,.07); }
.standard-calendar-panel > header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; border-bottom:1px solid var(--border); }
.standard-calendar-panel > header p { margin:0; color:var(--muted); font-size:13px; }
.calendar-view-tabs button { font-size:12px; }
.calendar-weekdays span { font-size:11px; color:var(--muted); }
.calendar-day { min-height:132px; }
.day-number { font-size:13px; }
.month-event { min-height:24px; font-size:11px; }
.normal-week-grid { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); min-width:1050px; }
.normal-week-day { min-height:560px; border-right:1px solid var(--border); }
.normal-week-day:last-child { border-right:0; }
.normal-week-day > button { width:100%; min-height:70px; border:0; border-bottom:1px solid var(--border); background:var(--surface-soft); color:var(--text); display:flex; flex-direction:column; align-items:center; justify-content:center; }
.normal-week-day > button span { font-size:12px; color:var(--muted); font-weight:800; text-transform:uppercase; }
.normal-week-day > button strong { font-size:20px; }
.normal-week-day.is-today > button strong { color:#fff; background:var(--accent); border-radius:10px; padding:5px 9px; }
.normal-week-day > div { display:flex; flex-direction:column; gap:7px; padding:10px; }
.normal-week-day > div > p { color:var(--muted); font-size:12px; text-align:center; }
.normal-day-view { padding:20px; min-height:520px; }
.normal-day-view > header { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; font-size:18px; font-weight:800; text-transform:capitalize; }
.normal-day-events { display:grid; gap:10px; }
.normal-day-events article { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; align-items:center; padding:10px; border-bottom:1px solid var(--border); }
.normal-day-events article > time { color:var(--muted); font-variant-numeric:tabular-nums; }
.calendar-year-grid { display:grid; grid-template-columns:repeat(3,minmax(230px,1fr)); gap:14px; padding:18px; }
.calendar-year-grid > section { padding:13px; border:1px solid var(--border); border-radius:14px; }
.calendar-year-grid h3 { margin:0 0 10px; font-size:14px; text-transform:capitalize; }
.mini-year-weekdays,.mini-year-days { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.mini-year-weekdays span { color:var(--muted); text-align:center; font-size:10px; font-weight:800; }
.mini-year-days button { aspect-ratio:1; border:0; border-radius:7px; background:transparent; color:var(--text); font-size:10px; }
.mini-year-days button.is-other { opacity:.18; }.mini-year-days button.has-events { color:var(--accent); background:rgba(var(--accent-rgb),.12); font-weight:900; }.mini-year-days button.is-today { color:#fff; background:var(--accent); }
.study-island { position:fixed; z-index:110; right:24px; bottom:24px; width:310px; min-width:270px; min-height:168px; max-width:min(520px,calc(100vw - 16px)); max-height:360px; resize:both; overflow:auto; padding:14px; border:1px solid rgba(var(--accent-rgb),.35); border-radius:20px; background:color-mix(in srgb,var(--panel) 92%,transparent); color:var(--text); box-shadow:0 22px 60px rgba(20,24,40,.25); backdrop-filter:blur(18px); }
.study-island-handle { display:flex; align-items:center; justify-content:space-between; cursor:move; touch-action:none; color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.study-island-handle button { width:28px; height:28px; border:0; border-radius:9px; background:var(--surface-soft); color:var(--text); font-size:20px; }
.study-island > strong { display:block; margin:8px 0 12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.study-island-times { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.study-island-times span { display:flex; flex-direction:column; padding:9px; border-radius:11px; background:var(--surface-soft); }
.study-island-times small { color:var(--muted); }.study-island-times b { margin-top:3px; font-variant-numeric:tabular-nums; }
.study-island-pause { width:100%; margin-top:10px; min-height:38px; border:0; border-radius:11px; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; gap:5px; font-weight:800; }
.study-island-pause i { display:block; width:3px; height:14px; border-radius:2px; background:currentColor; }.study-island-pause.is-paused i:first-child { width:0; height:0; border-top:7px solid transparent; border-bottom:7px solid transparent; border-left:11px solid currentColor; background:transparent; }.study-island-pause.is-paused i:nth-child(2) { display:none; }
.study-island-handle > div { display:flex; align-items:center; gap:5px; }
.study-island-pip { width:28px; height:28px; padding:5px; border:0; border-radius:8px; background:transparent; color:var(--muted); }
.study-island-pip:hover { color:var(--text); background:var(--surface-soft); }
.study-island-pip svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.study-pip-body { margin:0; min-width:0; min-height:100vh; overflow:hidden; background:var(--bg); }
.study-island.is-picture-in-picture { position:relative; inset:auto!important; width:100%!important; height:100%!important; min-width:0; max-width:none; max-height:none; resize:none; border-radius:0; border:0; box-shadow:none; }
.study-island.is-picture-in-picture .study-island-pip { display:none; }
.task-study-strip { border-color:rgba(var(--accent-rgb),.18); background:rgba(var(--accent-rgb),.07); }
.study-task-queue button { background:rgba(var(--accent-rgb),.1); color:var(--accent); }
.planner-note { background:rgba(var(--accent-rgb),.08); border-color:rgba(var(--accent-rgb),.15); }
.planner-day-column > button[data-action="create-study-at"]:hover { background:rgba(var(--accent-rgb),.06); }
.week-planner { --planner-slot:clamp(14px,calc((100dvh - 315px)/36),24px); }
.planner-scroll { height:calc(36 * var(--planner-slot)); overflow:hidden; }
.planner-hours { height:calc(36 * var(--planner-slot)); }
.planner-hours span { height:calc(2 * var(--planner-slot)); padding-top:3px; font-size:10px; }
.planner-day-column { height:calc(36 * var(--planner-slot)); background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--planner-slot) - 1px),var(--border) var(--planner-slot)); }
.planner-day-column > button[data-action="create-study-at"] { height:var(--planner-slot); }
.standard-calendar-panel { height:calc(100dvh - 225px); min-height:480px; display:flex; flex-direction:column; }
.standard-calendar-panel > header { flex:0 0 auto; padding-block:10px; }
.standard-calendar-panel > .calendar-overflow { flex:1; min-height:0; overflow:hidden; }
.standard-calendar-panel .calendar-month { height:100%; display:flex; flex-direction:column; }
.standard-calendar-panel .calendar-grid { flex:1; min-height:0; grid-template-rows:repeat(6,minmax(0,1fr)); }
.standard-calendar-panel .calendar-day { min-height:0; overflow:hidden; }
.normal-week-grid { height:100%; }
.normal-week-day { min-height:0; overflow:hidden; }
.calendar-year-grid { height:100%; grid-template-columns:repeat(4,minmax(180px,1fr)); grid-template-rows:repeat(3,minmax(0,1fr)); gap:9px; padding:10px; }
.calendar-year-grid > section { min-height:0; overflow:hidden; padding:8px; border-radius:12px; }
.calendar-year-grid h3 { margin-bottom:5px; font-size:12px; }
.study-session-task { border-left-color:#efc04f!important; background:color-mix(in srgb,#efc04f 7%,var(--panel)); }
.study-task-mark { padding:4px 7px; border-radius:7px; color:#6b4c00; background:#efc04f; font-size:9px; font-weight:900; text-transform:uppercase; }
.study-start-dot { width:23px; height:23px; padding:0; border:2px solid var(--panel); border-radius:50%; color:#4c3500; background:#efc04f; box-shadow:0 0 0 1px #d7a82f; font-size:10px; }
.planner-event.is-class-schedule { color:#17120d!important; }.planner-event.is-study-session { color:#2b2105!important; }
.planner-event.is-class-schedule { background:#e77831!important; box-shadow:0 5px 16px rgba(231,120,49,.28); }
.planner-event.is-study-session { background:#efc04f!important; box-shadow:0 5px 16px rgba(239,192,79,.24); }
.status-dot.red { background:#ff6678; }.status-dot.gray { background:#8f98aa; }.status-dot.green { background:#24c487; }
.task-card.status-done,.study-session-task.status-done { border-left-color:#24c487!important; }
.task-card { border-color:color-mix(in srgb,var(--line-strong) 80%,transparent); background:color-mix(in srgb,var(--surface) 94%,var(--accent) 6%); box-shadow:0 8px 24px rgba(0,0,0,.14); }
.task-column { background:color-mix(in srgb,var(--surface-2) 88%,var(--surface)); border-color:var(--line-strong); }
.week-planner,.standard-calendar-panel { border-color:var(--line-strong); background:var(--surface); }
.week-planner > header,.planner-day-column,.planner-hours { border-color:var(--line-strong); }
.planner-day-column { background-color:var(--surface); background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--planner-slot) - 1px),color-mix(in srgb,var(--line-strong) 70%,transparent) var(--planner-slot)); }
.standard-calendar-panel > .calendar-overflow { overflow:auto; scrollbar-gutter:stable; }
.standard-calendar-panel .calendar-month { min-height:760px; }
.standard-calendar-panel .calendar-grid { grid-template-rows:repeat(6,minmax(116px,1fr)); }
.calendar-year-grid { min-height:760px; }
.calendar-day { border-color:var(--line-strong); }

@media (max-width:1150px){.planner-toolbar{grid-template-columns:1fr}.calendar-scope-tabs{width:max-content;max-width:100%;overflow:auto}.planner-actions{flex-wrap:wrap}.task-board{grid-template-columns:1fr}.task-column{min-height:0}.task-column-list{min-height:120px}.home-priority-grid,.home-summary-grid{grid-template-columns:1fr}.analytics-layout{grid-template-columns:1fr}.calendar-year-grid{grid-template-columns:repeat(2,minmax(230px,1fr))}}
@media (max-width:760px){.today-hero{grid-template-columns:1fr;padding:24px}.planned-hours-card{min-height:200px}.today-heading h2{font-size:36px}.study-metric-grid,.weekly-stat-grid{grid-template-columns:1fr}.week-planner>header,.planner-scroll{grid-template-columns:58px repeat(7,minmax(120px,1fr));min-width:900px}.week-planner{overflow:auto}.planner-scroll{overflow:visible;height:auto}.calendar-scope-tabs button{padding:8px 10px}.main-content{padding-inline:14px}.task-study-strip{align-items:stretch;flex-direction:column}}
@media (max-width:1150px){.calendar-year-grid{grid-template-columns:repeat(3,minmax(160px,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}}
@media (max-width:760px){.planner-scroll{height:calc(36 * var(--planner-slot));overflow:hidden}.standard-calendar-panel{height:calc(100dvh - 250px);min-height:430px}.calendar-year-grid{min-width:540px}}
body[data-app-channel="beta"] .topbar {
  box-shadow: inset 0 -2px 0 rgba(241, 162, 58, 0.78);
}

body[data-app-channel="beta"] .brand-copy strong::after {
  content: " BETA";
  display: inline-block;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1a23a;
  color: #231b11;
  font-size: 10px;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.settings-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(241, 162, 58, 0.16);
  color: #bd6f0d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.settings-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.settings-section-head h3 { display:flex; align-items:center; gap:8px; }
.classroom-summary { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.classroom-summary span { padding:5px 8px; border:1px solid var(--border); border-radius:999px; color:var(--muted); background:var(--surface-soft); font-size:11px; font-weight:700; }
.classroom-assignment-list { display:grid; gap:8px; margin-top:14px; max-height:360px; overflow:auto; }
.classroom-assignment { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 11px; border:1px solid var(--border); border-left:3px solid #4285f4; border-radius:12px; background:var(--surface-soft); }
.classroom-assignment > div { min-width:0; display:grid; gap:3px; }
.classroom-assignment strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.classroom-assignment span { color:var(--muted); font-size:11px; }
.calendar-import-sources { display:grid; gap:12px; margin-top:14px; }
.calendar-import-source { border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface-soft); }
.calendar-import-source > header,.calendar-import-event { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; }
.calendar-import-source > header { border-bottom:1px solid var(--border); }
.calendar-import-source header > div:first-child,.calendar-import-event > div { min-width:0; display:grid; gap:3px; }
.calendar-import-source strong,.calendar-import-event strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.calendar-import-source span,.calendar-import-event span { color:var(--muted); font-size:11px; }
.calendar-import-source header > div:last-child { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.calendar-import-events { max-height:340px; overflow:auto; }
.calendar-import-event { border-bottom:1px solid color-mix(in srgb,var(--border) 72%,transparent); }
.calendar-import-event:last-child { border-bottom:0; }.calendar-import-event.is-hidden { opacity:.5; }
