@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --navy-950: #0b1220;
  --navy-900: #111827;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --teal-600: #0f766e;
  --teal-100: #ccfbf1;
  --gold-500: #f59e0b;
  --ink-900: #111827;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; width: 100%; min-height: 100%; overflow: hidden; }

body {
  color: var(--ink-900);
  background: var(--canvas);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(520px, 1fr) 360px;
  grid-template-rows: 72px calc(100vh - 72px);
  grid-template-areas:
    "topbar topbar topbar"
    "sidebar workspace inspector";
}

.topbar {
  grid-area: topbar;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  color: var(--ink-900);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  backdrop-filter: blur(16px);
}

.brand {
  width: 248px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink-900);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), #4f46e5);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .24);
  font: 800 13px/1 Inter, "Segoe UI", sans-serif;
  letter-spacing: .06em;
}

.brand strong, .brand small { display: block; }
.brand strong { font: 750 16px/1.15 Inter, "Segoe UI", sans-serif; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: var(--ink-500); font-size: 10px; letter-spacing: .02em; }

.global-search {
  min-width: 260px;
  max-width: 650px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f1f5f9;
}

.global-search:focus-within { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.global-search input { width: 100%; color: var(--ink-900); background: none; border: 0; outline: 0; }
.global-search input::placeholder { color: var(--ink-300); }
.global-search kbd { padding: 3px 7px; border: 1px solid #cbd5e1; border-radius: 6px; color: var(--ink-500); background: #fff; font-size: 10px; }

.top-actions { display: flex; gap: 9px; }
.button { min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; }
.button.primary { color: #fff; background: var(--blue-600); box-shadow: 0 5px 12px rgba(37,99,235,.18); }
.button.primary:hover { background: #1d4ed8; box-shadow: 0 7px 16px rgba(37,99,235,.24); transform: translateY(-1px); }
.button.secondary { color: var(--ink-700); border-color: var(--line); background: #fff; }
.button.secondary:hover { border-color: #cbd5e1; background: #f8fafc; }
.topbar .button.secondary { color: var(--ink-700); border-color: var(--line); background: #fff; }
.button.ghost { min-height: 34px; padding: 0 10px; color: var(--navy-700); border-color: var(--line); background: transparent; }
.button.danger { color: #fff; background: var(--danger); }

.icon-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; color: inherit; background: transparent; font-size: 20px; }
.icon-button:hover { background: rgba(127, 145, 160, .15); }

.sidebar {
  grid-area: sidebar;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 13px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.sidebar-heading, .sidebar-section-title { display: flex; align-items: center; justify-content: space-between; }
.sidebar-heading { padding: 2px 10px 11px; color: var(--ink-500); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-section-title { padding: 22px 10px 9px; color: var(--ink-500); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.count-pill { min-width: 25px; padding: 2px 7px; border-radius: 999px; text-align: center; color: var(--navy-700); background: var(--blue-100); font-size: 10px; }

.nav-overview, .discipline-button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  color: var(--ink-700);
  background: transparent;
  text-align: left;
}

.nav-overview { display: flex; align-items: center; gap: 11px; padding: 11px 12px; font-weight: 750; }
.nav-overview.active, .nav-overview:hover { color: var(--navy-800); background: var(--blue-50); }
.nav-icon { width: 23px; color: var(--blue-600); font-size: 18px; }
.nav-count { margin-left: auto; }

.discipline-list { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.discipline-button { padding: 9px 10px; }
.discipline-button:hover, .discipline-button.active { background: var(--blue-50); }
.discipline-button.active { box-shadow: inset 3px 0 var(--blue-600); }
.discipline-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.discipline-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.discipline-percent { color: var(--ink-500); font-size: 10px; }
.mini-progress { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #e9eef2; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--teal-600)); }

.sidebar-footer { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); color: var(--ink-500); }
.save-indicator { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 10px; }
.save-indicator span { width: 7px; height: 7px; border-radius: 50%; background: #29a86b; box-shadow: 0 0 0 3px #dff6e9; }
.sidebar-footer small { font-size: 9px; }

.workspace { grid-area: workspace; min-width: 0; min-height: 0; overflow: auto; padding: 28px 30px 80px; }
.inspector { grid-area: inspector; min-height: 0; overflow: auto; border-left: 1px solid var(--line); background: #fff; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--blue-600); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.page-heading h1, .dialog h2, .inspector h2 { margin: 0; color: var(--navy-900); font-family: Inter, "Segoe UI", sans-serif; font-weight: 750; letter-spacing: -.035em; }
.page-heading h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.12; }
.page-heading p { max-width: 760px; margin: 8px 0 0; color: var(--ink-500); line-height: 1.5; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.route-focus-control { width: min(310px, 100%); flex: 0 0 auto; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.route-focus-control span, .route-focus-control small { display: block; }
.route-focus-control span { margin-bottom: 6px; color: var(--ink-700); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.route-focus-control select { width: 100%; height: 38px; padding: 0 32px 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy-800); background: #fff; font-weight: 750; }
.route-focus-control small { margin-top: 6px; color: var(--ink-500); font-size: 9px; line-height: 1.35; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 5px 18px rgba(8,27,45,.04); }
.stat-card small { color: var(--ink-500); font-size: 11px; font-weight: 750; }
.stat-value { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; color: var(--navy-900); }
.stat-value strong { font: 750 28px/1 Inter, "Segoe UI", sans-serif; letter-spacing: -.04em; }
.stat-value span { color: var(--ink-500); font-size: 10px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 6px 24px rgba(8,27,45,.04); }
.panel + .panel { margin-top: 18px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; color: var(--navy-900); font: 750 17px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: -.025em; }
.panel-header p { margin: 4px 0 0; color: var(--ink-500); font-size: 11px; }

.discipline-table { width: 100%; border-collapse: collapse; }
.discipline-table th { padding: 10px 15px; color: var(--ink-500); background: var(--blue-50); font-size: 10px; text-align: left; text-transform: uppercase; }
.discipline-table td { padding: 12px 15px; border-top: 1px solid #edf1f4; }
.discipline-table tr { cursor: pointer; }
.discipline-table tbody tr:hover { background: #f8fbfd; }
.table-progress { width: 140px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #e8edf1; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--teal-600)); }

.tree-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.filter-select { height: 34px; padding: 0 29px 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-700); background: #fff; }
.tree-count { margin-left: auto; color: var(--ink-500); font-size: 11px; }
.tree-list { padding: 7px 0 12px; }
.tree-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 92px 130px 70px;
  align-items: center;
  min-height: 46px;
  padding: 5px 13px 5px calc(13px + var(--depth) * 23px);
  border-bottom: 1px solid #edf1f4;
  cursor: pointer;
}
.tree-row:hover, .tree-row.selected { background: var(--blue-50); }
.tree-row.selected { box-shadow: inset 3px 0 var(--blue-600); }
.tree-name-cell { min-width: 0; display: flex; align-items: center; gap: 8px; }
.tree-toggle { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 6px; color: var(--ink-500); background: transparent; }
.tree-toggle:hover { background: #dcecf5; }
.tree-toggle.leaf { color: var(--ink-300); cursor: default; }
.tree-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.tree-meta { margin-top: 3px; color: var(--ink-500); font-size: 10px; }
.type-badge, .source-badge, .status-badge { display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; }
.type-badge { padding: 4px 8px; color: var(--navy-700); background: var(--blue-100); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.source-badge { padding: 3px 7px; color: #176158; background: var(--teal-100); font-size: 9px; font-weight: 800; }
.row-progress { display: flex; align-items: center; gap: 8px; }
.row-progress .progress-track { flex: 1; height: 5px; }
.row-progress > span { width: 30px; color: var(--ink-500); font-size: 10px; text-align: right; }
.tree-empty { padding: 52px 20px; color: var(--ink-500); text-align: center; }

.empty-inspector { max-width: 245px; margin: 36vh auto 0; padding: 25px; color: var(--ink-500); text-align: center; }
.empty-glyph { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: var(--blue-600); background: var(--blue-50); font-size: 22px; }
.empty-inspector h2 { font-size: 19px; }
.empty-inspector p { line-height: 1.5; }

.inspector-content { min-height: 100%; }
.inspector-header { padding: 22px; color: #fff; background: linear-gradient(145deg, var(--navy-900), var(--navy-700)); }
.inspector-header .eyebrow { color: #9ed2e7; }
.inspector-header h2 { color: #fff; font-size: 22px; line-height: 1.25; }
.breadcrumb { margin-top: 10px; color: #c0d3e0; font-size: 10px; line-height: 1.5; }
.inspector-actions { display: flex; gap: 7px; margin-top: 15px; }
.inspector-actions .button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.inspector-actions .button.ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.inspector-section { padding: 19px 22px; border-bottom: 1px solid var(--line); }
.inspector-section h3 { margin: 0 0 12px; color: var(--navy-900); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.aggregate-note { padding: 11px; border-radius: 9px; color: var(--ink-700); background: var(--blue-50); font-size: 11px; line-height: 1.5; }
.stage-list { display: flex; flex-direction: column; gap: 8px; }
.stage-row { display: grid; grid-template-columns: 1fr 132px; align-items: center; gap: 10px; }
.stage-row label { color: var(--ink-700); font-size: 12px; font-weight: 700; }
.stage-row select, .small-field input, .inspector-textarea, .field input, .field textarea, .dialog-select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-700); background: #fff; outline: 0;
}
.stage-row select { height: 34px; padding: 0 7px; font-size: 10px; }
.stage-row select:focus, .small-field input:focus, .inspector-textarea:focus, .field input:focus, .field textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(36,118,168,.1); }
.metrics-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.small-field span, .field > span { display: block; margin-bottom: 6px; color: var(--ink-700); font-size: 11px; font-weight: 750; }
.small-field input { height: 36px; padding: 0 9px; }
.inspector-textarea { min-height: 80px; padding: 9px; resize: vertical; }
.inspector-notebook-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.source-list { display: flex; flex-direction: column; gap: 8px; }
.source-item { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.source-item strong { display: block; margin-bottom: 4px; color: var(--navy-800); font-size: 11px; }
.source-item p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.45; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.source-more { color: var(--ink-500); font-size: 10px; }

.dialog { width: min(520px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 16px; box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(6, 19, 31, .62); backdrop-filter: blur(3px); }
.dialog form, .data-dialog { padding: 22px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.dialog h2 { font-size: 23px; }
.field { display: block; margin-bottom: 15px; }
.field input { height: 42px; padding: 0 11px; }
.field textarea { padding: 10px 11px; resize: vertical; }
.field small { color: var(--ink-500); font-weight: 500; }
.dialog-select { height: 42px; padding: 0 10px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notebook-dialog { width: min(620px, calc(100vw - 30px)); }
.dialog-context { padding: 10px 12px; border-radius: 9px; color: var(--ink-500); background: var(--blue-50); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.data-dialog { width: min(650px, calc(100vw - 30px)); }
.data-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.data-card { min-height: 120px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-700); background: #fff; text-align: left; }
.data-card:hover { border-color: #9bc4d9; background: var(--blue-50); }
.data-card strong, .data-card span { display: block; }
.data-card strong { margin-bottom: 7px; color: var(--navy-800); }
.data-card span { color: var(--ink-500); font-size: 11px; line-height: 1.45; }
.data-card.warning:hover { border-color: #d8b15d; background: #fff9ea; }
.data-card.danger:hover { border-color: #e1a6a8; background: #fff5f5; }
.data-footnote { margin-top: 15px; padding: 12px; border-radius: 9px; color: var(--ink-700); background: #f5f7f8; font-size: 11px; line-height: 1.5; }
.trash-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.trash-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--navy-900); }
.archived-list { max-height: 210px; overflow: auto; display: flex; flex-direction: column; gap: 7px; }
.archived-empty { padding: 12px; border-radius: 9px; color: var(--ink-500); background: #f7f9fa; font-size: 11px; text-align: center; }
.archived-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 7px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; }
.archived-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-700); font-size: 11px; font-weight: 700; }
.archived-item button { min-height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy-700); background: #fff; font-size: 9px; font-weight: 800; }
.archived-item button[data-delete] { color: var(--danger); }

.global-search-results { display: flex; flex-direction: column; }
.global-search-result { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink-700); background: #fff; text-align: left; }
.global-search-result:first-child { border-top: 1px solid var(--line); }
.global-search-result:hover, .global-search-result:focus-visible { position: relative; z-index: 1; background: var(--blue-50); outline: 2px solid var(--blue-600); outline-offset: -2px; }
.global-search-result-main { min-width: 0; }
.global-search-result-main strong, .global-search-result-main small { display: block; }
.global-search-result-main strong { overflow: hidden; color: var(--navy-900); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result-main small { overflow: hidden; margin-top: 4px; color: var(--ink-500); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-progress { color: var(--ink-500); font-size: 11px; font-weight: 800; text-align: right; }
.search-result-limit { padding: 12px 16px; color: var(--ink-500); background: #f7f9fa; font-size: 10px; text-align: center; }

.weeks-timeline { display: flex; flex-direction: column; gap: 10px; }
.routes-archive { overflow: hidden; }
.routes-archive > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; cursor: pointer; list-style: none; }
.routes-archive > summary::-webkit-details-marker { display: none; }
.routes-archive > summary strong, .routes-archive > summary span { display: block; }
.routes-archive > summary strong { color: var(--navy-900); font: 750 16px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: -.02em; }
.routes-archive > summary span { margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.routes-archive > summary b { color: var(--blue-600); font-size: 10px; }
.routes-archive > .weeks-timeline { padding: 12px; border-top: 1px solid var(--line); background: #f4f7f9; }
.week-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgba(12, 35, 52, .04); }
.week-card.current { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(36, 118, 168, .09); }
.week-summary { display: grid; grid-template-columns: 105px minmax(170px, 1fr) 75px 150px auto; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; cursor: pointer; list-style: none; }
.week-summary::-webkit-details-marker { display: none; }
.week-summary::before { content: "›"; position: absolute; margin-left: -9px; color: var(--ink-500); font-size: 18px; transition: transform .15s ease; }
.week-card[open] .week-summary::before { transform: rotate(90deg); }
.week-summary:hover { background: #fbfcfd; }
.week-number { color: var(--navy-900); font-size: 13px; font-weight: 850; }
.week-date, .week-class-count { color: var(--ink-500); font-size: 11px; font-weight: 650; }
.week-progress { display: grid; grid-template-columns: 1fr 35px; align-items: center; gap: 8px; }
.week-progress strong { color: var(--navy-800); font-size: 11px; text-align: right; }
.current-week-badge { padding: 5px 8px; border-radius: 999px; color: var(--blue-600); background: var(--blue-50); font-size: 9px; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.week-content { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.week-content-heading { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: var(--ink-500); font-size: 10px; }
.week-classes { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.week-class { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 14px; width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink-700); background: #fff; text-align: left; }
.week-class:last-child { border-bottom: 0; }
.week-class:not(:disabled):hover { background: var(--blue-50); }
.week-class:disabled { opacity: .58; cursor: not-allowed; }
.week-class strong, .week-class small { display: block; }
.week-class strong { color: var(--navy-800); font-size: 11px; }
.week-class small { overflow: hidden; margin-top: 4px; color: var(--ink-500); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.week-class-progress { color: var(--ink-500); font-size: 10px; font-weight: 800; text-align: right; }
.week-note { display: block; margin-top: 13px; }
.week-note span { display: block; margin-bottom: 6px; color: var(--ink-700); font-size: 10px; font-weight: 750; }
.week-note textarea { width: 100%; min-height: 66px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.week-note textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(36,118,168,.1); outline: 0; }

.current-week-checklist { margin-bottom: 18px; overflow: hidden; border-top: 4px solid var(--blue-600); }
.checklist-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 19px 20px 15px; }
.checklist-heading h2 { margin: 5px 0 4px; color: var(--navy-900); font: 750 22px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: -.03em; }
.checklist-heading p { margin: 0; color: var(--ink-500); font-size: 10px; }
.checklist-total { flex: none; min-width: 105px; padding: 10px 12px; border-radius: 10px; background: var(--blue-50); text-align: center; }
.checklist-total strong, .checklist-total span { display: block; }
.checklist-total strong { color: var(--blue-600); font-size: 20px; }
.checklist-total span { margin-top: 2px; color: var(--ink-500); font-size: 8px; text-transform: uppercase; }
.checklist-progress { height: 5px; margin: 0 20px 16px; overflow: hidden; border-radius: 999px; background: #e8eef2; }
.checklist-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--teal-600)); transition: width .2s ease; }
.weekly-class-picker { display: grid; grid-template-columns: auto minmax(220px, 430px); align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); background: #fbfcfd; }
.weekly-class-picker > span { color: var(--ink-700); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.weekly-class-picker select { min-width: 0; height: 38px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy-800); background: #fff; font-size: 10px; font-weight: 750; }
.weekly-class-picker select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(36,118,168,.1); outline: 0; }
.weekly-checklist-labels, .weekly-check-item { display: grid; grid-template-columns: minmax(280px, 1fr) repeat(4, 92px); align-items: stretch; }
.weekly-checklist-labels { padding: 7px 20px; border-top: 1px solid var(--line); color: var(--ink-500); background: #f5f8fa; font-size: 8px; font-weight: 850; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.weekly-checklist-labels span:first-child { text-align: left; }
.weekly-checklist { border-top: 1px solid var(--line); }
.weekly-class-group { border-bottom: 1px solid var(--line); }
.weekly-class-group:last-child { border-bottom: 0; }
.weekly-class-group.unmapped { opacity: .6; }
.weekly-class-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 12px 20px; color: var(--ink-700); background: #edf5f9; }
.weekly-class-heading strong { color: var(--navy-800); font-size: 12px; }
.weekly-class-heading p { margin: 4px 0 0; font-size: 9px; line-height: 1.45; }
.weekly-class-heading > span { flex: none; padding: 4px 7px; border-radius: 999px; color: var(--blue-600); background: #fff; font-size: 8px; font-weight: 850; }
.weekly-check-item { min-height: 92px; border-bottom: 1px solid var(--line); background: #fff; }
.weekly-class-group .weekly-check-item:last-child { border-bottom: 0; }
.weekly-topic { min-width: 0; padding: 13px 20px; border: 0; color: var(--ink-700); background: transparent; text-align: left; }
.weekly-topic:hover:not(:disabled) { background: var(--blue-50); }
.weekly-topic strong, .weekly-topic span, .weekly-topic small { display: block; }
.weekly-topic strong { color: var(--navy-800); font-size: 12px; }
.weekly-topic span { margin-top: 5px; color: var(--ink-700); font-size: 11px; line-height: 1.45; }
.weekly-topic small { overflow: hidden; margin-top: 6px; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.week-stage-check { display: grid; place-content: center; gap: 4px; border: 0; border-left: 1px solid var(--line); color: var(--ink-500); background: #fff; }
.week-stage-check:hover:not(:disabled) { background: var(--blue-50); }
.week-stage-check b { width: 25px; height: 25px; display: grid; place-items: center; margin: auto; border: 2px solid var(--ink-300); border-radius: 7px; color: transparent; font-size: 14px; line-height: 1; }
.week-stage-check span { font-size: 8px; font-weight: 750; }
.week-stage-check.andamento b { border-color: var(--gold-500); color: #8d670f; background: #fff8e7; }
.week-stage-check.concluido { color: var(--teal-600); background: #f7fcfb; }
.week-stage-check.concluido b { border-color: var(--teal-600); color: #fff; background: var(--teal-600); }
.week-stage-check.nao_aplica { opacity: .55; cursor: not-allowed; }
.week-stage-check.nao_aplica b { border-style: dashed; color: var(--ink-300); }
.checklist-footnote { display: flex; flex-wrap: wrap; gap: 7px 15px; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--ink-500); background: #fbfcfd; font-size: 8px; }
.checklist-footnote span:last-child { margin-left: auto; }

.notebook-panel { overflow: hidden; }
.notebook-section-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.notebook-section-tabs button { display: grid; gap: 4px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-700); background: #fff; text-align: left; cursor: pointer; }
.notebook-section-tabs button:hover { border-color: var(--blue-300); background: var(--blue-50); }
.notebook-section-tabs button.active { border-color: var(--blue-600); color: var(--navy-800); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue-600); }
.notebook-section-tabs strong { font-size: 13px; }
.notebook-section-tabs span { color: var(--ink-500); font-size: 9px; }
.autosave-notice { display: inline-flex; align-items: center; gap: 7px; color: var(--teal-600); font-size: 10px; font-weight: 750; }
.autosave-notice b { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 999px; color: #fff; background: var(--teal-600); }
.notebook-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; background: #f8fafb; }
.notebook-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-left: 4px solid var(--blue-600); border-radius: 12px; background: #fff; box-shadow: 0 3px 10px rgba(8,27,45,.04); }
.notebook-card.note { border-left-color: var(--teal-600); }
.notebook-card.status-dominado { border-left-color: #4ca66f; opacity: .82; }
.notebook-card.status-fonte_conferir { border-left-color: var(--gold-500); }
.notebook-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.notebook-card-head time { margin-left: auto; color: var(--ink-500); font-size: 9px; }
.notebook-kind, .notebook-status { padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.notebook-kind { color: var(--navy-700); background: var(--blue-100); }
.notebook-card.note .notebook-kind { color: #176158; background: var(--teal-100); }
.notebook-status { color: var(--ink-700); background: #eef2f4; }
.notebook-path { display: block; overflow: hidden; width: 100%; padding: 0; border: 0; color: var(--blue-600); background: transparent; font-size: 9px; font-weight: 750; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.notebook-path:hover:not(:disabled) { text-decoration: underline; }
.notebook-path:disabled { color: var(--ink-300); cursor: default; }
.notebook-text { margin: 10px 0; color: var(--ink-900); font-size: 13px; font-weight: 650; line-height: 1.5; white-space: pre-wrap; }
.notebook-free-text { width: 100%; min-height: 150px; margin-top: 10px; padding: 12px; resize: vertical; border: 1px solid transparent; border-radius: 9px; color: var(--ink-900); background: #f8fbfa; font: 500 13px/1.55 Inter, "Segoe UI", sans-serif; }
.notebook-free-text:hover { border-color: var(--line); }
.notebook-free-text:focus { border-color: var(--teal-600); outline: 3px solid rgba(31, 139, 126, .12); background: #fff; }
.note-save-indicator { display: block; margin-top: 5px; color: var(--teal-600); font-size: 8px; text-align: right; }
.vaccine-box { display: grid; gap: 4px; padding: 10px 11px; border-radius: 9px; color: #28524d; background: #ecf8f5; font-size: 11px; line-height: 1.45; }
.vaccine-box strong { color: var(--teal-600); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.notebook-details { margin-top: 9px; padding: 8px 10px; border-radius: 8px; color: var(--ink-700); background: #f5f7f8; font-size: 10px; }
.notebook-details summary { cursor: pointer; font-weight: 800; }
.notebook-details p { margin: 8px 0 0; line-height: 1.45; }
.notebook-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 10px; color: var(--ink-500); font-size: 9px; }
.notebook-meta .source-warning { color: #936b0d; font-weight: 800; }
.notebook-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1f4; }
.notebook-actions .button { min-height: 30px; font-size: 9px; }
.danger-text { color: var(--danger) !important; }
.ai-assistant-panel { margin-top: 18px; overflow: hidden; }
.ai-assistant-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; cursor: pointer; list-style: none; }
.ai-assistant-panel > summary::-webkit-details-marker { display: none; }
.ai-assistant-panel > summary strong, .ai-assistant-panel > summary small { display: block; }
.ai-assistant-panel > summary strong { color: var(--navy-900); font: 750 16px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: -.02em; }
.ai-assistant-panel > summary small { margin-top: 4px; color: var(--ink-500); font-size: 10px; }
.ai-assistant-panel > summary > span:last-child { color: var(--blue-600); font-size: 10px; font-weight: 800; }
.ai-assistant-content { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.ai-assistant-content > p { color: var(--ink-500); font-size: 11px; line-height: 1.5; }
.ai-actions { margin-bottom: 13px; }

.fsrs-inspector-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink-700); background: var(--blue-50); font-size: 10px; }
.fsrs-inspector-card .button { min-height: 30px; padding: 0 9px; font-size: 9px; }
.review-session { padding: 22px; border-top: 4px solid var(--blue-600); }
.review-session-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.review-session-top h2 { margin: 7px 0 5px; color: var(--navy-900); font: 750 25px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: -.03em; }
.review-session-top p { margin: 0; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.review-reason { color: var(--danger); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.priority-badge { flex: none; padding: 6px 9px; border-radius: 999px; color: var(--ink-700); background: #eef2f4; font-size: 9px; font-weight: 800; text-transform: capitalize; }
.priority-badge.alta { color: #923236; background: #fff0f0; }
.priority-badge.baixa { color: #35665e; background: #eaf6f3; }
.priority-badge.muito_alto { color: #991b1b; background: #fee2e2; }
.priority-badge.alto { color: #9a3412; background: #ffedd5; }
.priority-badge.medio { color: #1d4ed8; background: #dbeafe; }
.priority-badge.baixo { color: #047857; background: #d1fae5; }
.recall-prompt { margin: 20px 0 15px; padding: 16px; border: 1px dashed #9bc4d9; border-radius: 11px; background: var(--blue-50); }
.recall-prompt strong { color: var(--navy-800); font-size: 12px; }
.recall-prompt p { margin: 6px 0 0; color: var(--ink-700); font-size: 12px; line-height: 1.55; }
.reveal-review { width: 100%; min-height: 46px; }
.review-support { display: grid; gap: 9px; margin: 15px 0; }
.review-memory { padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--blue-600); border-radius: 10px; background: #fff; }
.review-memory.anotacao { border-left-color: var(--teal-600); }
.review-memory > strong { color: var(--navy-800); font-size: 10px; text-transform: uppercase; }
.review-memory > p { margin: 7px 0; color: var(--ink-700); line-height: 1.5; white-space: pre-wrap; }
.rating-guide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 15px 0 8px; color: var(--ink-500); font-size: 9px; }
.rating-guide span { padding: 8px; border-radius: 8px; background: #f4f6f7; }
.rating-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.rating-button { min-height: 62px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-700); background: #fff; }
.rating-button:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(8,27,45,.08); }
.rating-button strong, .rating-button span { display: block; }
.rating-button strong { margin-bottom: 5px; font-size: 12px; }
.rating-button span { color: var(--ink-500); font-size: 9px; }
.rating-button.again { border-color: #e4a8aa; color: var(--danger); background: #fff8f8; }
.rating-button.hard { border-color: #e7c885; color: #89620c; background: #fffbf1; }
.rating-button.good { border-color: #8bc8c0; color: var(--teal-600); background: #f5fcfa; }
.rating-button.easy { border-color: #83b8d4; color: var(--blue-600); background: var(--blue-50); }
.review-complete { padding: 35px; text-align: center; }
.review-complete h2 { margin: 8px 0 5px; color: var(--navy-900); font-family: Inter, "Segoe UI", sans-serif; font-weight: 750; letter-spacing: -.03em; }
.review-complete p { color: var(--ink-500); }
.review-queue, .next-study-list { overflow: hidden; border-top: 1px solid var(--line); }
.review-queue-row, .next-study-row { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.review-queue-row:last-child, .next-study-row:last-child { border-bottom: 0; }
.review-queue-row > span { color: var(--ink-500); font-size: 9px; text-transform: capitalize; }
.review-queue-row strong, .review-queue-row small, .next-study-row strong, .next-study-row small { display: block; }
.review-queue-row strong, .next-study-row strong { color: var(--navy-800); font-size: 11px; }
.review-queue-row small, .next-study-row small { overflow: hidden; margin-top: 4px; color: var(--ink-500); font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.next-study-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.next-study-row:hover { background: var(--blue-50); }
.next-study-row > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-600); background: var(--blue-100); font-size: 9px; font-weight: 850; }
.next-study-row b { color: var(--ink-500); font-size: 10px; }
.future-reviews { margin-top: 18px; overflow: hidden; }
.future-reviews > summary { display: flex; justify-content: space-between; padding: 15px 18px; color: var(--navy-900); cursor: pointer; }
.future-reviews > summary span { color: var(--ink-500); font-size: 10px; }

/* Operação diária, calendário e desempenho */
.operational-stats { margin-bottom: 18px; }
.active-timer-card { margin-bottom: 18px; padding: 20px; border-top: 4px solid var(--teal-600); background: linear-gradient(135deg, #fff 0%, #f1faf8 100%); }
.timer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.timer-main h2 { margin: 6px 0 4px; color: var(--navy-900); font: 750 22px/1.2 Inter, "Segoe UI", sans-serif; letter-spacing: -.03em; }
.timer-main p { margin: 0; color: var(--ink-500); font-size: 10px; }
.timer-clock { color: var(--teal-600); font: 750 34px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.04em; }
.timer-progress, .goal-track { height: 6px; margin: 17px 0; overflow: hidden; border-radius: 999px; background: #dfe9e7; }
.timer-progress span, .goal-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-600), var(--blue-600)); }
.timer-fields { display: grid; grid-template-columns: 110px 110px minmax(220px, 1fr); gap: 10px; }
.timer-fields label, .operation-form label, .goal-settings label, .dashboard-range { display: grid; gap: 5px; color: var(--ink-500); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.timer-fields input, .operation-form input, .operation-form select, .goal-settings input, .dashboard-range select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy-800); background: #fff; font-size: 11px; }
.timer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-start-panel, .calendar-create-panel { margin-bottom: 18px; overflow: hidden; }
.operation-form { display: grid; align-items: end; gap: 11px; padding: 16px 18px 19px; border-top: 1px solid var(--line); background: #fbfcfd; }
.quick-start-form { grid-template-columns: minmax(260px, 2fr) minmax(120px, 1fr) 110px auto; }
.calendar-form { grid-template-columns: 135px 105px minmax(230px, 2fr) minmax(230px, 2fr) 120px 90px auto; }
.operation-form .wide { min-width: 0; }
.today-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.today-list-panel { min-width: 0; overflow: hidden; }
.operational-list { border-top: 1px solid var(--line); }
.operational-event { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.operational-event:last-child { border-bottom: 0; }
.operational-event.atrasado { border-left: 3px solid var(--danger); background: #fffafa; }
.operational-event.hoje { border-left: 3px solid var(--blue-600); }
.event-date strong, .event-date small, .event-copy strong, .event-copy small { display: block; }
.event-date strong, .event-copy strong { color: var(--navy-800); font-size: 11px; }
.event-date small, .event-copy small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.event-copy { min-width: 0; }
.event-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-status { padding: 4px 7px; border-radius: 999px; color: var(--ink-500); background: #eef2f4; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.operational-event.atrasado .event-status { color: #923236; background: #fff0f0; }
.event-actions { display: flex; align-items: center; gap: 4px; }
.event-actions .button { min-height: 29px; padding: 0 8px; font-size: 8px; }
.event-actions .icon-button { width: 29px; height: 29px; }
.today-review-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 38px; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink-700); background: #fff; text-align: left; }
.today-review-row:hover { background: var(--blue-50); }
.today-review-row strong, .today-review-row small { display: block; }
.today-review-row strong { color: var(--navy-800); font-size: 11px; }
.today-review-row small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.today-review-row b { color: var(--blue-600); font-size: 10px; text-align: right; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-600); }
.status-dot.overdue { background: var(--danger); box-shadow: 0 0 0 4px #fff0f0; }
.calendar-week { display: grid; grid-template-columns: repeat(7, minmax(125px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 5px; }
.calendar-day { min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fa; }
.calendar-day.today { border-color: #79b7d6; box-shadow: 0 0 0 2px rgba(36,118,168,.1); }
.calendar-day > header { display: flex; align-items: center; justify-content: space-between; padding: 11px; border-bottom: 1px solid var(--line); color: var(--ink-500); background: #fff; font-size: 9px; text-transform: capitalize; }
.calendar-day > header strong { color: var(--navy-900); font-size: 17px; }
.calendar-day-events { display: grid; gap: 7px; padding: 8px; }
.calendar-empty { padding: 12px 4px; color: var(--ink-300); font-size: 9px; text-align: center; }
.calendar-event { padding: 9px; border-left: 3px solid var(--blue-600); border-radius: 8px; background: #fff; box-shadow: 0 2px 7px rgba(8,27,45,.05); }
.calendar-event.done { border-left-color: var(--teal-600); opacity: .66; }
.calendar-event time, .calendar-event strong, .calendar-event small { display: block; }
.calendar-event time { color: var(--blue-600); font-size: 8px; font-weight: 850; }
.calendar-event strong { margin: 5px 0; color: var(--navy-800); font-size: 10px; line-height: 1.35; }
.calendar-event small { color: var(--ink-500); font-size: 8px; }
.calendar-event > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.calendar-event button { padding: 0; border: 0; color: var(--blue-600); background: none; font-size: 8px; font-weight: 800; }
.calendar-event button:disabled { color: var(--ink-300); }
.dashboard-range { min-width: 120px; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; margin-bottom: 18px; }
.goal-panel, .retention-panel, .discipline-time-panel, .session-history-panel { overflow: hidden; }
.goal-row { padding: 4px 18px 10px; }
.goal-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; color: var(--ink-500); font-size: 10px; }
.goal-row strong { color: var(--navy-800); }
.goal-row .goal-track { margin: 9px 0 0; }
.goal-settings { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; padding: 13px 18px 17px; border-top: 1px solid var(--line); background: #fbfcfd; }
.retention-panel { padding-bottom: 18px; }
.retention-number { display: flex; align-items: baseline; gap: 8px; padding: 0 18px; }
.retention-number strong { color: var(--danger); font: 750 38px/1 Inter, "Segoe UI", sans-serif; letter-spacing: -.05em; }
.retention-number span { color: var(--ink-500); font-size: 10px; }
.retention-meta { display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 18px; color: var(--ink-500); font-size: 9px; }
.retention-meta span { padding: 6px 8px; border-radius: 999px; background: #f0f3f5; }
.retention-panel > .button { margin-left: 18px; }
.discipline-time-panel { margin-bottom: 18px; }
.discipline-bars { display: grid; gap: 11px; padding: 4px 18px 19px; }
.discipline-bar { display: grid; grid-template-columns: minmax(140px, 230px) minmax(120px, 1fr) 70px; align-items: center; gap: 12px; }
.discipline-bar > span { overflow: hidden; color: var(--ink-700); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.discipline-bar > div { height: 8px; overflow: hidden; border-radius: 999px; background: #edf1f3; }
.discipline-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--teal-600)); }
.discipline-bar strong { color: var(--navy-800); font-size: 9px; text-align: right; }
.session-history { border-top: 1px solid var(--line); }
.session-history article { display: grid; grid-template-columns: 110px minmax(0, 1fr) 70px; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.session-history time { color: var(--ink-500); font-size: 9px; }
.session-history strong, .session-history small { display: block; }
.session-history strong { color: var(--navy-800); font-size: 10px; }
.session-history small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.session-history b { color: var(--blue-600); font-size: 10px; text-align: right; }

.weekly-lessons-panel { margin-bottom: 18px; overflow: hidden; }
.lesson-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; border-top: 1px solid var(--line); background: #f7f9fa; }
.lesson-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-top: 4px solid var(--blue-600); border-radius: 12px; background: #fff; box-shadow: 0 3px 10px rgba(8,27,45,.04); }
.lesson-card.andamento { border-top-color: var(--gold-500); }
.lesson-card.concluida { border-top-color: var(--teal-600); }
.lesson-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.lesson-card-head span { padding: 4px 7px; border-radius: 999px; color: var(--blue-600); background: var(--blue-50); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.lesson-card.andamento .lesson-card-head span { color: #89620c; background: #fff8e7; }
.lesson-card.concluida .lesson-card-head span { color: var(--teal-600); background: var(--teal-100); }
.lesson-card-head small { color: var(--ink-500); font-size: 8px; }
.lesson-card h3 { margin: 0 0 9px; color: var(--navy-900); font: 750 17px/1.3 Inter, "Segoe UI", sans-serif; letter-spacing: -.025em; }
.lesson-card > p { min-height: 66px; margin: 0 0 12px; color: var(--ink-700); font-size: 10px; line-height: 1.5; }
.lesson-scope { display: grid; gap: 4px; margin: 0 0 13px; padding: 9px 10px; border-radius: 8px; color: var(--ink-500); background: #f3f6f7; font-size: 8px; line-height: 1.45; }
.lesson-scope strong, .lesson-scope summary { color: var(--navy-700); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.lesson-scope summary { cursor: pointer; }
.lesson-card > .button { width: 100%; }
.weekly-lesson-cards { margin-top: 0; padding: 16px 20px 20px; }
.free-study-panel { margin-bottom: 18px; overflow: hidden; }
.free-study-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; cursor: pointer; list-style: none; }
.free-study-panel > summary::-webkit-details-marker { display: none; }
.free-study-panel > summary strong, .free-study-panel > summary small { display: block; }
.free-study-panel > summary strong { color: var(--navy-900); font-size: 12px; }
.free-study-panel > summary small { margin-top: 4px; color: var(--ink-500); font-size: 9px; }
.free-study-panel > summary > span:last-child { color: var(--blue-600); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.free-study-panel > div { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.free-study-panel p { margin: 0 0 12px; color: var(--ink-700); font-size: 10px; line-height: 1.5; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: 340px; padding: 12px 16px; border-radius: 10px; color: #fff; background: var(--navy-900); box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.mobile-only { display: none; }

/* Refinamento visual: interface mais leve, moderna e previsível. */
::selection { color: #fff; background: var(--blue-600); }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: 2px; }
input, select, textarea { transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input:focus, select:focus, textarea:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 4px rgba(37,99,235,.1) !important; outline: 0; }

.sidebar { padding: 20px 14px 16px; background: rgba(255,255,255,.82); }
.nav-overview { min-height: 44px; padding: 11px 13px; border-radius: 12px; font-weight: 650; transition: background .15s ease, color .15s ease, transform .15s ease; }
.nav-overview:hover { transform: translateX(2px); }
.nav-overview.active { color: var(--blue-600); background: var(--blue-50); box-shadow: inset 0 0 0 1px #dbeafe; }
.discipline-button { border-radius: 11px; transition: background .15s ease, color .15s ease; }
.discipline-button.active { color: var(--blue-600); background: var(--blue-50); box-shadow: inset 3px 0 var(--blue-600), inset 0 0 0 1px #dbeafe; }
.count-pill { padding: 3px 8px; font-weight: 750; }

.workspace { background:
  radial-gradient(circle at 8% 2%, rgba(37,99,235,.045), transparent 27%),
  radial-gradient(circle at 96% 5%, rgba(15,118,110,.035), transparent 22%),
  var(--canvas); }
.page-heading { margin-bottom: 26px; }
.page-heading p { max-width: 720px; margin-top: 10px; font-size: 13px; line-height: 1.6; }
.eyebrow { margin-bottom: 8px; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.panel { border-color: rgba(226,232,240,.95); box-shadow: 0 1px 2px rgba(15,23,42,.025), 0 10px 30px rgba(15,23,42,.035); }
.panel-header { padding: 18px 20px; }
.panel-header p { margin-top: 5px; font-size: 11px; line-height: 1.5; }

.stats-grid { gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; overflow: hidden; padding: 20px; border-color: rgba(226,232,240,.9); box-shadow: 0 1px 2px rgba(15,23,42,.025), 0 8px 22px rgba(15,23,42,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stat-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--blue-600), #4f46e5); opacity: .85; }
.stat-card:hover { border-color: #cbd5e1; box-shadow: 0 12px 28px rgba(15,23,42,.07); transform: translateY(-2px); }
.stat-card small { font-size: 10px; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.stat-value { margin-top: 11px; }
.stat-value span { font-size: 11px; }

.route-focus-control { padding: 14px; border-color: rgba(226,232,240,.95); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.045); }
.route-focus-control select { height: 42px; border-radius: 10px; }

.lesson-cards { gap: 16px; padding: 18px; background: #f8fafc; }
.lesson-card { position: relative; padding: 20px; border-top-width: 3px; border-radius: 15px; box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 8px 20px rgba(15,23,42,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.lesson-card:hover { border-color: #cbd5e1; box-shadow: 0 14px 30px rgba(15,23,42,.08); transform: translateY(-3px); }
.lesson-card-head { margin-bottom: 14px; }
.lesson-card-head span { padding: 5px 8px; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.lesson-card-head small { font-size: 10px; }
.lesson-card > p { min-height: 78px; margin-bottom: 15px; font-size: 11px; line-height: 1.65; }
.lesson-scope { gap: 6px; margin-bottom: 16px; padding: 11px 12px; border: 1px solid #e8edf3; border-radius: 10px; background: #f8fafc; font-size: 9px; line-height: 1.55; }
.lesson-scope strong, .lesson-scope summary { font-size: 9px; letter-spacing: .04em; }
.lesson-card > .button { min-height: 42px; }

.calendar-event { border-left-width: 4px; border-radius: 10px; box-shadow: 0 4px 12px rgba(15,23,42,.055); }
.week-card { border-radius: 15px; box-shadow: 0 4px 16px rgba(15,23,42,.035); }
.week-card.current { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37,99,235,.08), 0 10px 25px rgba(15,23,42,.05); }
.current-week-checklist { border-top-color: var(--blue-600); }
.inspector-header { background: linear-gradient(145deg, #111827, #1e3a8a); }
.dialog { border: 1px solid rgba(255,255,255,.7); border-radius: 20px; }
.data-card { min-height: 126px; border-radius: 14px; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.data-card:hover { transform: translateY(-2px); }

.assessment-dialog { width: min(980px, calc(100vw - 28px)); }
.assessment-dialog form { display: flex; flex-direction: column; max-height: min(900px, 90vh); padding: 0; }
.assessment-dialog-header { flex: none; margin: 0; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.assessment-dialog-header p { max-width: 720px; margin: 8px 0 0; color: var(--ink-500); font-size: 11px; line-height: 1.55; }
#assessmentContent { min-height: 0; overflow: auto; padding: 20px 24px; background: #f8fafc; }
.assessment-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.assessment-overview > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.assessment-overview span, .assessment-overview strong { display: block; }
.assessment-overview span { color: var(--ink-500); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.assessment-overview strong { margin-top: 6px; color: var(--navy-900); font-size: 18px; letter-spacing: -.03em; }
.assessment-bulk { display: grid; grid-template-columns: minmax(210px, 1fr) 160px 150px auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid #bfdbfe; border-radius: 13px; background: var(--blue-50); }
.assessment-bulk > div strong, .assessment-bulk > div span { display: block; }
.assessment-bulk > div strong { color: var(--navy-900); font-size: 12px; }
.assessment-bulk > div span { margin-top: 4px; color: var(--ink-500); font-size: 9px; }
.assessment-bulk label > span, .assessment-field > span { display: block; margin-bottom: 5px; color: var(--ink-500); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.assessment-bulk select, .assessment-field select { width: 100%; height: 39px; padding: 0 30px 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-700); background: #fff; font-size: 10px; font-weight: 700; }
.assessment-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; padding: 20px 2px 9px; }
.assessment-list-heading strong, .assessment-list-heading span { display: block; }
.assessment-list-heading strong { color: var(--navy-900); font-size: 13px; }
.assessment-list-heading span { margin-top: 4px; color: var(--ink-500); font-size: 9px; }
.assessment-list-heading b { color: var(--blue-600); font-size: 10px; text-align: right; }
.assessment-topic-list { display: grid; gap: 8px; }
.assessment-topic { display: grid; grid-template-columns: 34px minmax(220px, 1fr) 160px 145px; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: opacity .15s ease, border-color .15s ease, background .15s ease; }
.assessment-topic:hover { border-color: #bfdbfe; }
.assessment-topic.not-covered { opacity: .55; background: #f1f5f9; }
.assessment-coverage input { position: absolute; opacity: 0; pointer-events: none; }
.assessment-coverage > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #bfdbfe; border-radius: 9px; color: var(--blue-600); background: var(--blue-50); cursor: pointer; }
.assessment-coverage b { font-size: 10px; }
.assessment-coverage i { display: none; }
.assessment-coverage input:not(:checked) + span { color: var(--ink-300); border-color: var(--line); background: #fff; text-decoration: line-through; }
.assessment-topic-copy { min-width: 0; }
.assessment-topic-copy strong, .assessment-topic-copy small { display: block; }
.assessment-topic-copy strong { color: var(--navy-900); font-size: 11px; line-height: 1.35; }
.assessment-topic-copy small { overflow: hidden; margin-top: 4px; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.assessment-method-note { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 11px; color: var(--ink-700); background: #eef6ff; font-size: 9px; line-height: 1.5; }
.assessment-method-note strong { color: var(--blue-600); white-space: nowrap; }
.assessment-actions { flex: none; margin: 0; padding: 16px 24px; border-top: 1px solid var(--line); background: #fff; }

.assessment-reminder { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 14px 16px; border-color: #f8c35f; background: linear-gradient(90deg, #fffbeb, #fff); }
.assessment-reminder > div { display: flex; align-items: center; gap: 12px; }
.assessment-reminder-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 11px; color: #92400e; background: #fef3c7; font-weight: 850; }
.assessment-reminder strong, .assessment-reminder small { display: block; }
.assessment-reminder strong { color: var(--navy-900); font-size: 12px; }
.assessment-reminder small { margin-top: 4px; color: var(--ink-500); font-size: 9px; }
.lesson-card.assessment-pending { border-top-color: var(--gold-500); }
.lesson-card.assessment-pending .lesson-card-head span { color: #92400e; background: #fef3c7; }
.today-review-row.future .status-dot { background: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-100); }

.review-context-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.review-context-badges span { padding: 5px 8px; border-radius: 999px; color: var(--ink-700); background: #eef2f7; font-size: 8px; font-weight: 800; }
.review-context-badges .mastery-nao_compreendi, .mastery-metric.mastery-nao_compreendi { color: #b91c1c; background: #fee2e2; }
.review-context-badges .mastery-fragil, .mastery-metric.mastery-fragil { color: #b45309; background: #fef3c7; }
.review-context-badges .mastery-parcial, .mastery-metric.mastery-parcial { color: #1d4ed8; background: #dbeafe; }
.review-context-badges .mastery-seguro, .mastery-metric.mastery-seguro { color: #047857; background: #d1fae5; }
.future-reviews { overflow: hidden; }
.future-row small { white-space: normal; }
.tree-empty.compact { padding: 28px 18px; }

.topic-profile-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.topic-profile-card span, .topic-profile-card strong { display: block; }
.topic-profile-card span { color: var(--ink-500); font-size: 8px; text-transform: uppercase; }
.topic-profile-card strong { margin-top: 4px; color: var(--navy-900); font-size: 11px; }
.topic-profile-card > small { grid-column: 1 / -1; color: var(--ink-500); font-size: 8px; }

.canonical-profile-card { margin-bottom: 12px; overflow: hidden; border: 1px solid #bfdbfe; border-radius: 12px; background: linear-gradient(145deg, #eff6ff, #fff 58%); }
.canonical-profile-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 10px; padding: 13px 14px 10px; border-bottom: 1px solid #dbeafe; }
.canonical-profile-head > span { color: var(--blue-600); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.canonical-profile-head > strong { grid-row: span 2; color: var(--navy-900); font-size: 25px; letter-spacing: -.04em; }
.canonical-profile-head > small { color: var(--ink-500); font-size: 8px; }
.canonical-profile-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #dbeafe; }
.canonical-profile-metrics > div { padding: 10px 12px; background: rgba(255,255,255,.92); }
.canonical-profile-metrics span, .canonical-profile-metrics strong { display: block; }
.canonical-profile-metrics span { color: var(--ink-500); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.canonical-profile-metrics strong { margin-top: 4px; color: var(--navy-900); font-size: 10px; }
.canonical-profile-foot { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; }
.canonical-profile-foot span { padding: 4px 6px; border-radius: 999px; color: var(--ink-600); background: #eef2f7; font-size: 7px; font-weight: 750; }
.learning-status { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.learning-status.inicial { color: var(--ink-600); background: #eef2f7; }
.learning-status.aprendizagem { color: #b91c1c; background: #fee2e2; }
.learning-status.consolidacao { color: #b45309; background: #fef3c7; }
.learning-status.superado { color: #047857; background: #d1fae5; }
.weight-summary { display: grid; gap: 7px; margin-top: 9px; padding: 10px; border-radius: 9px; background: var(--blue-50); }
.weight-summary strong, .weight-summary span { display: block; }
.weight-summary strong { color: var(--navy-900); font-size: 12px; }
.weight-summary span { color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.weight-settings-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.weight-settings-section > p { margin: 7px 0 12px; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.discipline-weight-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.discipline-weight-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.discipline-weight-row span { overflow: hidden; color: var(--ink-700); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.discipline-weight-row select { width: 100%; height: 34px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-700); background: #fff; font-size: 9px; }
.canonical-source-note { margin: 10px 0; padding: 10px 11px; border-left: 3px solid var(--blue-500); border-radius: 0 8px 8px 0; color: var(--ink-600); background: var(--blue-50); font-size: 8px; line-height: 1.5; }
.canonical-timeline { margin: 12px 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.canonical-timeline > strong { display: block; margin-bottom: 7px; color: var(--navy-900); font-size: 9px; }
.canonical-timeline > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #eef2f7; color: var(--ink-600); font-size: 8px; }
.canonical-timeline time { flex: none; color: var(--ink-400); }
.canonical-timeline > small { color: var(--ink-400); font-size: 8px; }

.mastery-map-panel { overflow: hidden; margin-bottom: 18px; }
.mastery-distribution { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 15px 18px; }
.mastery-metric { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; }
.mastery-metric span { font-size: 9px; font-weight: 750; }
.mastery-metric strong { font-size: 18px; }
.mastery-risk-list { border-top: 1px solid var(--line); }
.mastery-risk-list > button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 120px 90px 65px; align-items: center; gap: 10px; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink-700); background: #fff; text-align: left; }
.mastery-risk-list > button:hover { background: var(--blue-50); }
.mastery-risk-list strong, .mastery-risk-list small { display: block; }
.mastery-risk-list strong { color: var(--navy-900); font-size: 10px; }
.mastery-risk-list small { margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.mastery-risk-list > button > span:not(:first-child), .mastery-risk-list > button > b { font-size: 9px; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 1320px) {
  .app-shell { grid-template-columns: 245px minmax(480px, 1fr); grid-template-areas: "topbar topbar" "sidebar workspace"; }
  .workspace { padding: 24px 22px 70px; }
  .inspector { position: fixed; inset: 72px 0 0 auto; z-index: 30; width: min(380px, 92vw); transform: translateX(105%); box-shadow: var(--shadow); transition: transform .2s ease; }
  .inspector.open { transform: translateX(0); }
  .brand { width: auto; }
  .brand small { display: none; }
  .tree-row { grid-template-columns: minmax(250px, 1fr) 78px 100px 60px; }
  .weekly-checklist-labels, .weekly-check-item { grid-template-columns: minmax(235px, 1fr) repeat(4, 68px); }
  .week-stage-check span { font-size: 7px; }
  .calendar-form { grid-template-columns: repeat(3, 1fr); }
  .calendar-form .wide { grid-column: span 2; }
  .lesson-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 250px 1fr; grid-template-areas: "topbar topbar" "sidebar workspace"; }
  .inspector { position: fixed; inset: 72px 0 0 auto; z-index: 30; width: min(380px, 92vw); transform: translateX(105%); box-shadow: var(--shadow); transition: transform .2s ease; }
  .inspector.open { transform: translateX(0); }
  .brand { width: auto; }
  .brand small { display: none; }
}

@media (max-width: 720px) {
  .notebook-section-tabs { grid-template-columns: 1fr; }
  .app-shell { display: block; padding-top: 64px; }
  .topbar { position: fixed; inset: 0 0 auto; height: 64px; padding: 0 12px; gap: 10px; }
  .brand strong { font-size: 15px; }
  .global-search { min-width: 0; height: 38px; }
  .global-search kbd, .top-actions .secondary { display: none; }
  .top-actions .primary { min-height: 36px; padding: 0 10px; font-size: 0; }
  .top-actions .primary::after { content: "+"; font-size: 21px; }
  .sidebar { position: fixed; inset: 64px auto 0 0; z-index: 50; width: 280px; transform: translateX(-105%); box-shadow: var(--shadow); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .workspace { height: calc(100vh - 64px); min-height: 0; padding: 20px 13px 60px; }
  .inspector { inset-top: 64px; }
  .mobile-only { display: grid; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-heading { display: block; }
  .heading-actions { margin-top: 14px; }
  .route-focus-control { width: 100%; margin-top: 14px; }
  .assessment-dialog { width: calc(100vw - 16px); }
  .assessment-dialog-header { padding: 18px 16px 14px; }
  #assessmentContent { padding: 14px; }
  .assessment-overview { grid-template-columns: 1fr 1fr; }
  .assessment-bulk { grid-template-columns: 1fr 1fr; }
  .assessment-bulk > div, .assessment-bulk > .button { grid-column: 1 / -1; }
  .assessment-topic { grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
  .assessment-field { grid-column: span 1; }
  .assessment-field:nth-of-type(2) { grid-column: 1 / 2; }
  .assessment-field:nth-of-type(3) { grid-column: 2 / 3; }
  .assessment-topic-copy small { white-space: normal; }
  .assessment-method-note { grid-template-columns: 1fr; }
  .assessment-actions { display: grid; grid-template-columns: 1fr; padding: 12px 14px; }
  .assessment-actions .button { width: 100%; }
  .assessment-reminder { align-items: stretch; flex-direction: column; }
  .assessment-reminder > .button { width: 100%; }
  .mastery-distribution { grid-template-columns: 1fr 1fr; padding: 12px; }
  .mastery-risk-list > button { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; }
  .mastery-risk-list > button > span:nth-child(3), .mastery-risk-list > button > b { display: none; }
  .tree-row { grid-template-columns: minmax(190px, 1fr) 75px 60px; padding-left: calc(8px + var(--depth) * 16px); }
  .tree-row .type-badge { display: none; }
  .tree-row > :nth-child(2) { display: none; }
  .data-actions-grid { grid-template-columns: 1fr; }
  .global-search-result { grid-template-columns: minmax(0, 1fr) 44px; }
  .global-search-result .type-badge { display: none; }
  .week-summary { grid-template-columns: 90px minmax(120px, 1fr) 115px; gap: 8px; padding-left: 20px; }
  .week-class-count, .current-week-badge { display: none; }
  .week-progress { grid-column: 3; }
  .week-content-heading { display: block; }
  .week-content-heading span { display: block; margin-bottom: 4px; }
  .checklist-heading { padding: 16px; }
  .checklist-total { min-width: 92px; }
  .weekly-class-picker { grid-template-columns: 1fr; gap: 6px; padding: 10px; }
  .weekly-class-picker select { width: 100%; }
  .weekly-checklist-labels { display: none; }
  .weekly-checklist { display: grid; gap: 10px; padding: 10px; background: #f4f7f9; }
  .weekly-class-group { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
  .weekly-class-heading { padding: 11px 13px; }
  .weekly-check-item { grid-template-columns: repeat(4, 1fr); min-height: 0; overflow: hidden; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .weekly-topic { grid-column: 1 / -1; padding: 13px; border-bottom: 1px solid var(--line); }
  .weekly-topic span { font-size: 10px; }
  .week-stage-check { min-height: 62px; border-left: 0; border-right: 1px solid var(--line); }
  .week-stage-check:last-child { border-right: 0; }
  .checklist-footnote span:last-child { width: 100%; margin-left: 0; }
  .notebook-list { grid-template-columns: 1fr; }
  .discipline-weight-settings { grid-template-columns: 1fr; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .rating-guide { grid-template-columns: 1fr 1fr; }
  .rating-buttons { grid-template-columns: 1fr 1fr; }
  .review-session { padding: 16px; }
  .review-session-top { display: block; }
  .priority-badge { display: inline-block; margin-top: 10px; }
  .today-columns, .dashboard-grid { grid-template-columns: 1fr; }
  .quick-start-form, .calendar-form, .timer-fields, .goal-settings { grid-template-columns: 1fr; }
  .calendar-form .wide { grid-column: auto; }
  .timer-main { display: block; }
  .timer-clock { display: block; margin-top: 14px; font-size: 29px; }
  .operational-event { grid-template-columns: 45px minmax(0, 1fr); }
  .event-status, .event-actions { grid-column: 2; }
  .calendar-week { grid-template-columns: repeat(7, 180px); }
  .discipline-bar { grid-template-columns: minmax(105px, 1fr) 1.3fr 55px; }
  .session-history article { grid-template-columns: 78px minmax(0, 1fr) 55px; }
  .lesson-cards { grid-template-columns: 1fr; padding: 10px; }
  .lesson-card > p { min-height: 0; }
}

/* Tema único: escuro, com contraste consistente em toda a aplicação. */
:root {
  color-scheme: dark;
  --navy-950: #070b11;
  --navy-900: #f8fafc;
  --navy-800: #e2e8f0;
  --navy-700: #cbd5e1;
  --blue-600: #60a5fa;
  --blue-100: #1e3a5f;
  --blue-50: #132238;
  --teal-600: #45d1bd;
  --teal-100: #123b36;
  --gold-500: #fbbf24;
  --ink-900: #f8fafc;
  --ink-700: #d7e0eb;
  --ink-600: #c4cfdd;
  --ink-500: #b3bfce;
  --ink-400: #a1afc0;
  --ink-300: #92a0b2;
  --line: #293647;
  --surface: #111820;
  --canvas: #090e15;
  --danger: #fb7185;
  --shadow: 0 20px 50px rgba(0, 0, 0, .38);
}

html, body { background: var(--canvas); }
body { color: var(--ink-900); }

.topbar {
  color: var(--ink-900);
  border-color: var(--line);
  background: rgba(12, 18, 27, .94);
  box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 25px rgba(0,0,0,.2);
}
.brand { color: var(--ink-900); }
.global-search { border-color: #253347; background: #121b27; }
.global-search:focus-within { border-color: var(--blue-600); background: #151f2c; box-shadow: 0 0 0 4px rgba(96,165,250,.13); }
.global-search kbd { color: var(--ink-500); border-color: #344359; background: #0c131d; }
.global-search input { color: var(--ink-900); }
.global-search input::placeholder { color: #7f8ea1; }

.sidebar, .inspector { border-color: var(--line); background: #0d141d; }
.sidebar { background: rgba(13,20,29,.98); }
.sidebar-footer { border-color: var(--line); }
.save-indicator span { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.14); }
.nav-overview, .discipline-button { color: var(--ink-700); }
.nav-overview:hover, .nav-overview.active,
.discipline-button:hover, .discipline-button.active { color: #dbeafe; background: #15263d; }
.nav-overview.active, .discipline-button.active { box-shadow: inset 3px 0 var(--blue-600), inset 0 0 0 1px #294566; }
.count-pill { color: #bfdbfe; background: #1b3557; }
.mini-progress, .progress-track, .checklist-progress, .discipline-bar > div { background: #263244; }

.workspace {
  background:
    radial-gradient(circle at 8% 2%, rgba(59,130,246,.09), transparent 27%),
    radial-gradient(circle at 96% 5%, rgba(20,184,166,.06), transparent 22%),
    var(--canvas);
}
.page-heading h1, .dialog h2, .inspector h2,
.panel-header h2, .checklist-heading h2, .trash-heading,
.routes-archive > summary strong { color: var(--ink-900); }

.panel, .stat-card, .route-focus-control, .week-card, .lesson-card,
.notebook-card, .review-memory, .data-card, .assessment-overview > div,
.assessment-topic, .canonical-timeline, .topic-profile-card {
  color: var(--ink-700);
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(0,0,0,.16);
}
.panel, .stat-card { border-color: #263447; }
.stat-card:hover, .lesson-card:hover { border-color: #3b506b; box-shadow: 0 14px 32px rgba(0,0,0,.28); }
.panel-header, .tree-toolbar, .week-content, .assessment-dialog-header,
.assessment-actions, .inspector-section { border-color: var(--line); }

.button.secondary, .topbar .button.secondary, .button.ghost,
.archived-item button {
  color: var(--ink-700);
  border-color: #344359;
  background: #111923;
}
.button.secondary:hover, .topbar .button.secondary:hover, .button.ghost:hover {
  color: var(--ink-900);
  border-color: #4b607c;
  background: #182332;
}
.button.primary { color: #fff; background: #2563eb; }
.button.primary:hover { background: #3b82f6; }
.button:disabled, .button:disabled:hover {
  color: #8e9bad;
  border-color: #2b3747;
  background: #18212c;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

input, textarea, select, .filter-select, .dialog-select,
.stage-row select, .small-field input, .inspector-textarea,
.field input, .field textarea, .route-focus-control select,
.weekly-class-picker select, .assessment-bulk select,
.assessment-field select, .timer-fields input, .operation-form input,
.operation-form select, .goal-settings input, .dashboard-range select {
  color: var(--ink-900);
  border-color: #344359;
  background: #0c131c;
}
input:disabled, textarea:disabled, select:disabled { color: #8493a6; background: #111821; opacity: 1; }
input::placeholder, textarea::placeholder { color: #91a0b2; opacity: 1; }
option { color: var(--ink-900); background: #111820; }

.discipline-table th, .weekly-checklist-labels, .search-result-limit,
.checklist-footnote, .data-footnote, .notebook-details,
.rating-guide span, .retention-meta span, .priority-badge,
.event-status, .review-context-badges span {
  color: var(--ink-500);
  background: #121d2a;
}
.discipline-table td, .discipline-table th, .tree-row,
.mastery-risk-list, .mastery-risk-list > button,
.global-search-result, .week-class, .weekly-check-item,
.week-stage-check, .today-review-row, .next-study-row,
.review-queue-row, .operational-event { border-color: var(--line); }
.discipline-table tbody tr:hover, .tree-row:hover, .tree-row.selected,
.mastery-risk-list > button:hover, .global-search-result:hover,
.week-class:not(:disabled):hover, .weekly-topic:hover:not(:disabled),
.week-stage-check:hover:not(:disabled) { background: #15253a; }
.tree-toggle:hover { background: #20334a; }

.mastery-risk-list > button, .global-search-result, .week-class,
.weekly-check-item, .week-stage-check, .today-review-row,
.next-study-row, .review-queue-row, .calendar-day > header,
.calendar-event { color: var(--ink-700); background: var(--surface); }
.mastery-risk-list strong, .global-search-result-main strong,
.week-class strong, .weekly-topic strong, .weekly-class-heading strong,
.notebook-text, .event-copy strong { color: var(--ink-900); }

.lesson-cards, .notebook-list, #assessmentContent,
.routes-archive > .weeks-timeline, .weekly-checklist,
.operation-form, .goal-settings { background: #0c121a; }
.lesson-scope, .source-item, .calendar-day, .archived-empty,
.assessment-topic.not-covered { color: var(--ink-500); border-color: var(--line); background: #101821; }
.weekly-class-picker, .weekly-class-heading, .weekly-checklist-labels,
.checklist-footnote, .assessment-actions { background: #0f1721; }
.weekly-class-heading > span { color: #93c5fd; background: #182a42; }
.week-summary:hover { background: #141e2a; }

.dialog { color: var(--ink-700); border: 1px solid #344359; background: #101720; }
.dialog::backdrop { background: rgba(1,5,10,.78); }
.dialog-context, .aggregate-note, .assessment-bulk, .assessment-method-note,
.canonical-source-note { color: var(--ink-700); border-color: #29496c; background: #11243a; }
.data-card:hover { border-color: #446283; background: #142337; }
.data-card.warning:hover { border-color: #8a6c28; background: #281f0d; }
.data-card.danger:hover { border-color: #81404b; background: #28141a; }

.inspector-header { color: #fff; background: linear-gradient(145deg, #111827, #17366f); }
.inspector-header h2 { color: #fff; }
.source-item strong, .inspector-section h3 { color: var(--ink-900); }
.empty-glyph { color: #93c5fd; background: #152b49; }

.canonical-profile-card { border-color: #315782; background: linear-gradient(145deg, #10243b, #111820 62%); }
.canonical-profile-head { border-color: #29496c; }
.canonical-profile-head > span { color: #93c5fd; }
.canonical-profile-head > strong { color: var(--ink-900); }
.canonical-profile-metrics { background: #29405b; }
.canonical-profile-metrics > div { background: #111b27; }
.canonical-profile-metrics strong, .canonical-timeline > strong { color: var(--ink-900); }
.canonical-profile-foot span { color: var(--ink-700); background: #1a2635; }
.canonical-timeline > div { border-color: var(--line); }

.mastery-metric.mastery-nao_compreendi,
.review-context-badges .mastery-nao_compreendi { color: #fda4af; background: #3a1820; }
.mastery-metric.mastery-fragil,
.review-context-badges .mastery-fragil { color: #fcd34d; background: #35280f; }
.mastery-metric.mastery-parcial,
.review-context-badges .mastery-parcial { color: #93c5fd; background: #172d4d; }
.mastery-metric.mastery-seguro,
.review-context-badges .mastery-seguro { color: #6ee7b7; background: #12372e; }
.mastery-risk-list > button:nth-child(even) { background: #0f1720; }
.mastery-risk-list > button:nth-child(even):hover { background: #15253a; }

.rating-button { color: var(--ink-700); border-color: var(--line); background: #111820; }
.rating-button.again { color: #fda4af; border-color: #71313d; background: #2a151a; }
.rating-button.hard { color: #fcd34d; border-color: #705920; background: #261f0f; }
.rating-button.good { color: #6ee7b7; border-color: #28675c; background: #10251f; }
.rating-button.easy { color: #93c5fd; border-color: #315782; background: #12243a; }
.priority-badge.alta, .operational-event.atrasado .event-status { color: #fda4af; background: #351820; }
.priority-badge.baixa { color: #6ee7b7; background: #12372e; }
.priority-badge.muito_alto { color: #fecaca; background: #451a1a; }
.priority-badge.alto { color: #fed7aa; background: #431f10; }
.priority-badge.medio { color: #bfdbfe; background: #172d4d; }
.priority-badge.baixo { color: #a7f3d0; background: #12372e; }
.learning-status.inicial { color: var(--ink-500); background: #1a2635; }
.learning-status.aprendizagem { color: #fda4af; background: #3a1820; }
.learning-status.consolidacao { color: #fcd34d; background: #35280f; }
.learning-status.superado { color: #6ee7b7; background: #12372e; }
.weight-summary { background: #142235; }
.weight-summary strong { color: var(--ink-900); }
.discipline-weight-row { background: #101923; }
.discipline-weight-row select { color: var(--ink-900); background: #111b27; }
.week-stage-check.andamento b { color: #fcd34d; border-color: #d39b20; background: #2b220e; }
.week-stage-check.concluido { color: #6ee7b7; background: #10231f; }
.assessment-reminder { border-color: #705920; background: linear-gradient(90deg, #2a220e, #141a20); }
.assessment-reminder-icon, .lesson-card.assessment-pending .lesson-card-head span { color: #fcd34d; background: #3a2c0d; }
.assessment-coverage > span { color: #93c5fd; border-color: #315782; background: #152b49; }
.assessment-coverage input:not(:checked) + span { color: var(--ink-300); border-color: var(--line); background: #111820; }

.calendar-day { background: #0b1119; }
.active-timer-card { background: linear-gradient(135deg, #111820, #10241f); }
.operational-event.atrasado { background: #201218; }
.status-dot.overdue { box-shadow: 0 0 0 4px rgba(251,113,133,.13); }
.today-review-row.future .status-dot { box-shadow: 0 0 0 4px rgba(96,165,250,.15); }
.toast { color: #f8fafc; background: #172234; }

* { scrollbar-color: #3b4a5e #0b1118; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0b1118; }
::-webkit-scrollbar-thumb { border: 3px solid #0b1118; border-radius: 999px; background: #3b4a5e; }
::-webkit-scrollbar-thumb:hover { background: #52647b; }

/* Caderno de conteúdo: índice compacto + editor persistente. */
.notebook-section-tabs button {
  color: var(--ink-700);
  border-color: #344359;
  background: #111923;
}
.notebook-section-tabs button:hover { color: var(--ink-900); border-color: #4b607c; background: #182332; }
.notebook-section-tabs button.active {
  color: #dbeafe;
  border-color: #60a5fa;
  background: #15263d;
  box-shadow: inset 0 0 0 1px rgba(96,165,250,.35);
}
.notebook-section-tabs span { color: #9fb0c3; }

.notebook-library {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  min-height: 610px;
  overflow: hidden;
  background: #0d141d;
}
.notebook-library-sidebar {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #0c121a;
}
.notebook-library-tools { display: grid; gap: 11px; padding: 16px; border-bottom: 1px solid var(--line); }
.notebook-library-tools label, .notebook-editor-title, .notebook-editor-organize label, .notebook-editor-body { display: block; }
.notebook-library-tools label > span, .notebook-editor-title > span,
.notebook-editor-organize label > span, .notebook-editor-body > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.notebook-library-tools input, .notebook-library-tools select,
.notebook-editor-title input, .notebook-editor-organize select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #344359;
  border-radius: 9px;
  color: var(--ink-900);
  background: #101923;
}
.notebook-library-count { display: flex; align-items: baseline; gap: 5px; padding: 10px 16px; color: var(--ink-500); border-bottom: 1px solid var(--line); font-size: 9px; }
.notebook-library-count strong { color: var(--ink-900); font-size: 13px; }
.notebook-note-index { max-height: 520px; overflow: auto; padding: 8px; }
.notebook-note-row {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-700);
  background: transparent;
  text-align: left;
}
.notebook-note-row + .notebook-note-row { margin-top: 4px; }
.notebook-note-row:hover { border-color: #344359; background: #121d2a; }
.notebook-note-row.selected { border-color: #315782; background: #14243a; box-shadow: inset 3px 0 #60a5fa; }
.notebook-note-row-head { display: flex; align-items: flex-start; gap: 8px; }
.notebook-note-row-head strong { overflow: hidden; color: var(--ink-900); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.notebook-note-row-head time { flex: 0 0 auto; margin-left: auto; color: var(--ink-400); font-size: 8px; }
.notebook-note-row small { display: block; overflow: hidden; margin-top: 5px; color: #93c5fd; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.notebook-note-row p { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: var(--ink-500); font-size: 9px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notebook-index-empty { display: grid; gap: 5px; padding: 28px 14px; color: var(--ink-500); text-align: center; }
.notebook-index-empty strong { color: var(--ink-900); font-size: 12px; }

.notebook-editor { min-width: 0; padding: 22px 26px 18px; background: #111820; }
.notebook-editor-topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.notebook-editor-status { display: inline-flex; align-items: center; gap: 7px; color: #6ee7b7; font-size: 9px; font-weight: 750; }
.notebook-editor-status b { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 999px; color: #062d25; background: #45d1bd; }
.notebook-editor-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.notebook-editor-title input {
  height: auto;
  padding: 5px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink-900);
  background: transparent;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.025em;
}
.notebook-editor-title input::placeholder { color: #78899e; }
.notebook-editor-title input:focus { border-color: #60a5fa !important; box-shadow: none !important; }
.notebook-editor-organize { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(240px, 1.35fr); gap: 12px; margin-top: 18px; }
.notebook-editor-breadcrumb { overflow: hidden; margin: 12px 0 17px; color: #93c5fd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.notebook-editor-body textarea {
  width: 100%;
  min-height: 350px;
  padding: 17px 18px;
  resize: vertical;
  border: 1px solid #344359;
  border-radius: 12px;
  color: #f1f5f9;
  background: #0c131c;
  caret-color: #93c5fd;
  font: 500 14px/1.7 Inter, "Segoe UI", sans-serif;
}
.notebook-editor-body textarea:hover { border-color: #465a75; }
.notebook-editor-body textarea:focus { border-color: #60a5fa !important; background: #0e1722 !important; box-shadow: 0 0 0 4px rgba(96,165,250,.1) !important; }
.notebook-editor-body textarea::placeholder { color: #718096; }
.notebook-editor-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 10px; color: var(--ink-400); font-size: 8px; }
.notebook-editor-empty { display: grid; place-items: center; align-content: center; min-height: 520px; padding: 30px; color: var(--ink-500); text-align: center; }
.notebook-editor-empty > div { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 14px; border-radius: 15px; color: #93c5fd; background: #152b49; font-size: 24px; }
.notebook-editor-empty h2 { margin: 0; color: var(--ink-900); font-size: 18px; }
.notebook-editor-empty p { max-width: 380px; margin: 8px 0 18px; font-size: 11px; line-height: 1.5; }

.notebook-tree-branch { margin: 2px 0; }
.notebook-tree-branch > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--ink-700);
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 750;
}
.notebook-tree-branch > summary::-webkit-details-marker { display: none; }
.notebook-tree-branch > summary::before { content: "›"; flex: 0 0 auto; color: var(--ink-400); font-size: 15px; transition: transform .15s ease; }
.notebook-tree-branch[open] > summary::before { transform: rotate(90deg); }
.notebook-tree-branch > summary:hover { color: var(--ink-900); background: #121d2a; }
.notebook-tree-branch > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notebook-tree-branch > summary b { min-width: 21px; margin-left: auto; padding: 3px 6px; border-radius: 999px; color: #bfdbfe; background: #1b3557; font-size: 8px; text-align: center; }
.notebook-tree-branch.level-1 > summary { color: var(--ink-900); font-size: 11px; }
.notebook-tree-branch.level-2 > summary { color: #bfdbfe; }
.notebook-tree-children { margin-left: 11px; padding-left: 8px; border-left: 1px solid #293647; }
.notebook-tree-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  margin: 3px 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-700);
  background: transparent;
  text-align: left;
}
.notebook-tree-note:hover { color: var(--ink-900); border-color: #344359; background: #121d2a; }
.notebook-tree-note.selected { color: #eff6ff; border-color: #315782; background: #14243a; box-shadow: inset 3px 0 #60a5fa; }
.notebook-tree-note span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.notebook-tree-note time { color: var(--ink-400); font-size: 7px; }

.notebook-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid #344359;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #111b27;
}
.notebook-format-toolbar button, .notebook-format-toolbar select {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #344359;
  border-radius: 7px;
  color: var(--ink-700);
  background: #0c131c;
  font-size: 9px;
  font-weight: 750;
}
.notebook-format-toolbar button:hover { color: var(--ink-900); border-color: #60a5fa; background: #15263d; }
.notebook-format-toolbar select { min-width: 92px; }
.notebook-toolbar-separator { width: 1px; height: 23px; margin: 0 3px; background: #344359; }
.notebook-rich-editor {
  width: 100%;
  min-height: 350px;
  padding: 17px 18px;
  overflow-wrap: anywhere;
  border: 1px solid #344359;
  border-radius: 0 0 12px 12px;
  color: #f1f5f9;
  background: #0c131c;
  caret-color: #93c5fd;
  font: 500 14px/1.7 Inter, "Segoe UI", sans-serif;
  outline: 0;
}
.notebook-rich-editor:hover { border-color: #465a75; }
.notebook-rich-editor:focus { border-color: #60a5fa; background: #0e1722; box-shadow: 0 0 0 4px rgba(96,165,250,.1); }
.notebook-rich-editor:empty::before { content: attr(data-placeholder); color: #718096; pointer-events: none; }
.notebook-rich-editor p { margin: 0 0 .8em; }
.notebook-rich-editor ul, .notebook-rich-editor ol { margin: .55em 0 .8em 1.5em; padding: 0; }
.notebook-rich-editor font[size="2"] { font-size: 12px; }
.notebook-rich-editor font[size="3"] { font-size: 14px; }
.notebook-rich-editor font[size="4"] { font-size: 18px; }
.notebook-rich-editor font[size="5"] { font-size: 24px; line-height: 1.35; }

.discipline-notebook-panel { margin-bottom: 18px; overflow: hidden; }
.discipline-notebook-toggle {
  display: grid;
  grid-template-columns: 36px minmax(150px, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
}
.discipline-notebook-toggle::-webkit-details-marker { display: none; }
.discipline-notebook-toggle:hover { background: #121d2a; }
.discipline-notebook-main-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #bfdbfe;
  background: #173256;
  font-size: 15px;
}
.discipline-notebook-toggle-copy strong,
.discipline-notebook-toggle-copy small { display: block; }
.discipline-notebook-toggle-copy strong { color: var(--ink-900); font-size: 13px; }
.discipline-notebook-toggle-copy small { margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.discipline-notebook-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.discipline-notebook-badges > span {
  padding: 6px 9px;
  border: 1px solid #2b394b;
  border-radius: 999px;
  color: var(--ink-500);
  background: #101923;
  font-size: 8px;
  font-weight: 700;
}
.discipline-notebook-badges b { color: var(--ink-900); font-size: 10px; }
.discipline-notebook-badges .has-active { color: #fcd34d; border-color: #665626; background: #211e13; }
.discipline-notebook-chevron { color: var(--ink-400); font-size: 17px; transition: transform .18s ease; }
.discipline-notebook-panel[open] .discipline-notebook-chevron { transform: rotate(180deg); }
.discipline-notebook-body { border-top: 1px solid var(--line); }
.discipline-notebook-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
}
.discipline-notebook-actions p { margin: 0; color: var(--ink-500); font-size: 9px; }
.discipline-notebook-recent { border-top: 1px solid var(--line); }
.discipline-notebook-recent > button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
  background: transparent;
  text-align: left;
}
.discipline-notebook-recent > button:last-child { border-bottom: 0; }
.discipline-notebook-recent > button:hover { background: #121d2a; }
.discipline-notebook-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: #bfdbfe;
  background: #173256;
  font-size: 12px;
  font-weight: 850;
}
.discipline-notebook-recent strong,
.discipline-notebook-recent small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discipline-notebook-recent strong { color: var(--ink-900); font-size: 10px; }
.discipline-notebook-recent small { margin-top: 3px; color: #93c5fd; font-size: 8px; }
.discipline-notebook-recent time { color: var(--ink-400); font-size: 8px; }
.discipline-notebook-empty { padding: 22px 18px; color: var(--ink-500); font-size: 10px; text-align: center; }
.notebook-card.notebook-focused { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,.14); }

.weeks-heading-tools { display: grid; justify-items: end; gap: 10px; }
.route-dialog { width: min(920px, calc(100vw - 30px)); padding: 22px; max-height: 90vh; overflow: auto; }
.route-dialog .dialog-header, .replan-dialog .dialog-header { margin-bottom: 14px; }
.route-dialog .dialog-header p, .replan-dialog .dialog-header p { max-width: 620px; margin: 7px 0 0; color: var(--ink-500); font-size: 11px; line-height: 1.55; }
.route-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.route-steps li { position: relative; display: flex; align-items: center; gap: 8px; color: var(--ink-500); font-size: 10px; font-weight: 750; }
.route-steps li:not(:last-child)::after { content: ""; height: 1px; flex: 1; margin-right: 10px; background: #344359; }
.route-steps b { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid #40516a; border-radius: 999px; color: var(--ink-500); background: #111923; font-size: 10px; }
.route-steps li.active { color: #dbeafe; }
.route-steps li.active b { color: #fff; border-color: #3b82f6; background: #2563eb; box-shadow: 0 0 0 4px rgba(59,130,246,.13); }
.route-steps li.done { color: #a7f3d0; }
.route-steps li.done b { color: #052e2b; border-color: #45d1bd; background: #45d1bd; }
.route-help-card { display: grid; gap: 4px; margin-bottom: 12px; padding: 11px 13px; border: 1px solid #315782; border-radius: 10px; color: var(--ink-700); background: #11243a; }
.route-help-card strong { color: #bfdbfe; font-size: 11px; }
.route-help-card span { font-size: 10px; line-height: 1.5; }
.route-import-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 14px; }
.field-help { display: block; margin-top: 6px; color: var(--ink-500); font-size: 10px; line-height: 1.45; }
.route-dialog #routeJson { min-height: 175px; transition: min-height .18s ease, height .18s ease; }
.route-dialog.analyzed #routeJson { height: 105px; min-height: 105px; }
.route-dialog.analyzed .route-help-card { display: none; }
.route-preview { margin-top: 16px; }
.route-preview-heading {
  display: grid;
  grid-template-columns: 160px 190px minmax(180px, 1fr);
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #344359;
  border-radius: 12px 12px 0 0;
  background: #111b27;
}
.route-preview-heading > div { padding-bottom: 8px; }
.route-preview-heading strong, .route-preview-heading small { display: block; }
.route-preview-heading strong { color: var(--ink-900); font-size: 13px; }
.route-preview-heading small { margin-top: 3px; color: var(--ink-500); font-size: 10px; }
.route-preview-lessons { max-height: 390px; overflow: auto; border: 1px solid #344359; border-top: 0; border-radius: 0 0 12px 12px; }
.route-preview-lesson { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 16px; padding: 14px; border-bottom: 1px solid var(--line); }
.route-preview-lesson:last-child { border-bottom: 0; }
.route-preview-lesson > div > span { color: #93c5fd; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.route-preview-lesson strong { display: block; margin-top: 3px; color: var(--ink-900); font-size: 12px; }
.route-preview-lesson p { display: -webkit-box; overflow: hidden; margin: 5px 0 0; color: var(--ink-500); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.route-link-status { display: inline-flex; margin-left: 6px; padding: 3px 6px; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; }
.route-link-status.ready { color: #a7f3d0; background: #12372e; }
.route-link-status.pending { color: #fde68a; background: #3a2b0d; }
.route-error { color: #fecdd3; border: 1px solid #71313d; background: #2a1518; font-weight: 700; }
.replan-dialog { width: min(700px, calc(100vw - 30px)); }
.replan-dialog .dialog-context { margin-top: 14px; padding: 14px; }
.replan-impact { display: grid; grid-template-columns: 1fr auto 1fr 1fr; align-items: center; gap: 10px; }
.replan-impact > div { min-width: 0; padding: 10px; border: 1px solid #315172; border-radius: 9px; background: #0f1c2c; }
.replan-impact small, .replan-impact strong { display: block; }
.replan-impact small { color: #aebdd0; font-size: 9px; font-weight: 750; }
.replan-impact strong { margin-top: 4px; color: #eff6ff; font-size: 10px; line-height: 1.4; }
.replan-impact > span { color: #93c5fd; font-size: 16px; }
.replan-dialog .dialog-context > p { margin: 10px 2px 0; color: var(--ink-700); font-size: 10px; line-height: 1.5; }
.split-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; }

@media (max-width: 1050px) {
  .notebook-library { grid-template-columns: 290px minmax(0, 1fr); }
  .notebook-editor { padding: 18px; }
  .notebook-editor-organize { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .notebook-library { display: block; min-height: 0; }
  .notebook-library-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .notebook-note-index { max-height: 250px; }
  .notebook-editor { padding: 16px 13px; }
  .notebook-editor-topbar, .notebook-editor-footer { align-items: flex-start; flex-direction: column; }
  .notebook-editor-title input { font-size: 20px; }
  .notebook-editor-body textarea { min-height: 330px; }
  .notebook-rich-editor { min-height: 330px; }
  .notebook-format-toolbar select { min-width: 82px; }
  .weeks-heading-tools { justify-items: stretch; width: 100%; }
  .route-steps li span { display: none; }
  .route-preview-heading, .route-preview-lesson { grid-template-columns: 1fr; }
  .replan-impact { grid-template-columns: 1fr; }
  .replan-impact > span { transform: rotate(90deg); text-align: center; }
  .split-actions { display: flex; flex-wrap: wrap; }
  .discipline-notebook-toggle { grid-template-columns: 34px minmax(0, 1fr) 18px; padding: 11px 13px; }
  .discipline-notebook-badges { grid-column: 2 / 4; justify-content: flex-start; }
  .discipline-notebook-chevron { grid-column: 3; grid-row: 1; }
  .discipline-notebook-actions { align-items: flex-start; flex-direction: column; }
  .discipline-notebook-recent > button { grid-template-columns: 28px minmax(0, 1fr); }
  .discipline-notebook-recent time { display: none; }
}

/* Layout responsivo: uma área principal e painéis sob demanda. */
.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "sidebar workspace";
  transition: grid-template-columns .2s ease;
}
.app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.app-shell.sidebar-collapsed .sidebar { overflow: hidden; padding-inline: 0; border-right: 0; opacity: 0; pointer-events: none; }
.navigation-toggle { display: grid; flex: 0 0 auto; color: var(--ink-700); border: 1px solid #344359; background: #111923; }
.panel-backdrop {
  position: fixed;
  inset: 72px 0 0;
  z-index: 28;
  border: 0;
  background: rgba(1, 5, 10, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  backdrop-filter: blur(2px);
}
.panel-backdrop.open { opacity: 1; pointer-events: auto; }
.inspector {
  position: fixed;
  inset: 72px 0 0 auto;
  z-index: 30;
  width: min(440px, calc(100vw - 40px));
  transform: translateX(105%);
  box-shadow: -18px 0 45px rgba(0,0,0,.34);
  transition: transform .2s ease;
}
.inspector.open { transform: translateX(0); }
.inspector-header { position: sticky; top: 0; z-index: 3; padding: 20px 22px 17px; }
.inspector-header h2 { font-size: 24px; }
.breadcrumb { font-size: 11px; }
.inspector-section { padding: 0; }
.inspector-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 15px 22px;
  cursor: pointer;
  list-style: none;
}
.inspector-disclosure > summary::-webkit-details-marker { display: none; }
.inspector-disclosure > summary::before { content: "›"; color: #93c5fd; font-size: 18px; transition: transform .15s ease; }
.inspector-disclosure[open] > summary::before { transform: rotate(90deg); }
.inspector-disclosure > summary:hover { background: #142033; }
.inspector-disclosure > summary h3 { margin: 0; color: var(--ink-900); font-size: 12px; }
.inspector-disclosure > summary > span { margin-left: auto; color: #bfdbfe; font-size: 11px; font-weight: 800; }
.inspector-disclosure > summary ~ * { margin-inline: 22px; }
.inspector-disclosure > summary + * { margin-top: 0; }
.inspector-disclosure[open] { padding-bottom: 19px; }
.inspector .stage-row label { font-size: 13px; }
.inspector .stage-row select { height: 39px; font-size: 11px; }
.inspector .small-field span { font-size: 12px; }
.inspector .canonical-source-note,
.inspector .canonical-timeline > div,
.inspector .canonical-timeline > small { font-size: 10px; }

.tree-row {
  grid-template-columns: minmax(280px, 1fr) 58px 72px;
  min-height: 54px;
  padding-block: 7px;
}
.tree-row > :nth-child(2) { display: none; }
.tree-name { font-size: 14px; line-height: 1.35; }
.tree-meta { font-size: 11px; }
.row-progress .progress-track { display: none; }
.row-progress { justify-content: flex-end; }
.row-progress > span { width: auto; min-width: 34px; font-size: 11px; }
.source-badge { font-size: 10px; }

@media (max-width: 1100px) {
  .app-shell, .app-shell.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "topbar" "workspace";
  }
  .sidebar, .app-shell.sidebar-collapsed .sidebar {
    position: fixed;
    inset: 72px auto 0 0;
    z-index: 50;
    width: min(320px, 88vw);
    padding: 18px 13px 14px;
    border-right: 1px solid var(--line);
    opacity: 1;
    transform: translateX(-105%);
    pointer-events: auto;
    box-shadow: var(--shadow);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .mobile-only { display: grid; }
  .panel-backdrop { z-index: 45; }
  .inspector { z-index: 50; width: min(460px, 94vw); }
  .workspace { padding: 24px 22px 70px; }
  .tree-row { grid-template-columns: minmax(240px, 1fr) 52px 70px; }
}

@media (max-width: 720px) {
  .app-shell, .app-shell.sidebar-collapsed { display: block; padding-top: 64px; }
  .topbar { height: 64px; }
  .sidebar, .app-shell.sidebar-collapsed .sidebar { top: 64px; }
  .panel-backdrop { top: 64px; }
  .inspector {
    inset: 64px 0 0;
    width: 100vw;
    max-width: none;
    border-left: 0;
  }
  .workspace { height: calc(100vh - 64px); padding: 18px 12px 58px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { font-size: 13px; }
  .stats-grid { grid-template-columns: 1fr; }
  .tree-toolbar { gap: 8px; padding: 11px; }
  .tree-toolbar .button { min-height: 38px; }
  .tree-row {
    grid-template-columns: minmax(0, 1fr) 46px;
    min-height: 58px;
    padding: 8px 10px 8px calc(8px + var(--depth) * 14px);
  }
  .tree-row > :nth-child(4) { display: none; }
  .tree-name { overflow: visible; font-size: 14px; white-space: normal; }
  .tree-meta { font-size: 11px; }
  .inspector-header { padding: 17px 16px 15px; }
  .inspector-header h2 { font-size: 22px; }
  .inspector-actions { flex-wrap: wrap; }
  .inspector-actions .button { min-height: 38px; font-size: 12px; }
  .inspector-disclosure > summary { min-height: 58px; padding: 16px; }
  .inspector-disclosure > summary ~ * { margin-inline: 16px; }
  .stage-row { grid-template-columns: 1fr; gap: 6px; }
  .metrics-pair { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .brand span:last-child { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .global-search { padding-inline: 9px; }
  .top-actions .primary { display: none; }
  .topbar { gap: 8px; }
  .tree-toolbar .filter-select { width: 100%; height: 40px; }
  .tree-count { width: 100%; margin-left: 0; text-align: right; }
  .dialog { width: calc(100vw - 12px); max-height: 96vh; }
}

/* Catálogo modular e atualizações seletivas */
.data-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: 92vh;
  overflow: auto;
}
.catalog-manager {
  margin: 0 0 22px;
  padding: 18px;
  color: var(--ink-700);
  border: 1px solid #30435b;
  border-radius: 16px;
  background: #0c141e;
}
.catalog-manager-heading,
.catalog-section-heading,
.catalog-discipline,
.catalog-update-actions,
.catalog-bulk-actions,
.catalog-safety-note {
  display: flex;
  align-items: center;
}
.catalog-manager-heading { align-items: flex-start; justify-content: space-between; gap: 20px; }
.catalog-manager-heading h3 { margin: 3px 0 5px; color: var(--ink-900); font-size: 20px; }
.catalog-manager-heading p { max-width: 690px; margin: 0; color: #aebbc9; font-size: 12px; line-height: 1.55; }
.catalog-version {
  flex: none;
  padding: 7px 10px;
  color: #bfdbfe;
  border: 1px solid #315782;
  border-radius: 999px;
  background: #10243b;
  font-size: 10px;
  font-weight: 750;
}
.catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 16px 0;
}
.catalog-summary > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #29394d;
  border-radius: 11px;
  background: #101a26;
}
.catalog-summary strong { color: var(--ink-900); font-size: 21px; }
.catalog-summary span { color: #aebbc9; font-size: 10px; line-height: 1.35; }
.catalog-summary .attention { border-color: #72591f; background: #241d0f; }
.catalog-summary .attention strong { color: #fde68a; }
.catalog-manager-grid { display: grid; grid-template-columns: minmax(310px, .82fr) minmax(420px, 1.18fr); gap: 14px; }
.catalog-column {
  min-width: 0;
  padding: 13px;
  border: 1px solid #29394d;
  border-radius: 13px;
  background: #0f1823;
}
.catalog-section-heading { justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.catalog-section-heading > div { display: grid; gap: 3px; }
.catalog-section-heading strong { color: var(--ink-900); font-size: 13px; }
.catalog-section-heading span { color: #9fadc0; font-size: 10px; line-height: 1.4; }
.catalog-discipline-list,
.catalog-update-list { display: grid; gap: 7px; max-height: 410px; overflow: auto; padding-right: 3px; }
.catalog-discipline {
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #29394d;
  border-radius: 10px;
  background: #101923;
}
.catalog-discipline.selected { border-color: #315782; background: #112037; }
.catalog-discipline-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #bfdbfe;
  border-radius: 8px;
  background: #1b365c;
  font-size: 13px;
  font-weight: 800;
}
.catalog-discipline > div { display: grid; flex: 1; min-width: 0; gap: 3px; }
.catalog-discipline strong { overflow: hidden; color: var(--ink-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-discipline span:not(.catalog-discipline-mark) { color: #9fadc0; font-size: 10px; }
.catalog-discipline .button { min-height: 33px; padding: 0 10px; font-size: 10px; }
.catalog-update-card {
  border: 1px solid #30435b;
  border-radius: 11px;
  background: #101923;
  overflow: hidden;
}
.catalog-update-card[open] { border-color: #41658d; }
.catalog-update-card > summary {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 65px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.catalog-update-card > summary::-webkit-details-marker { display: none; }
.catalog-update-card > summary:hover { background: #142236; }
.catalog-update-card input[type="checkbox"] { width: 17px; height: 17px; accent-color: #3b82f6; }
.catalog-update-card summary > span { display: grid; min-width: 0; gap: 2px; }
.catalog-update-card summary small { color: #93c5fd; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.catalog-update-card summary strong { overflow: hidden; color: var(--ink-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-update-card summary em { color: #aebbc9; font-size: 10px; font-style: normal; }
.catalog-update-card summary > i { color: #bfdbfe; font-size: 9px; font-style: normal; font-weight: 750; }
.catalog-change-list { display: grid; gap: 6px; padding: 10px 12px; border-top: 1px solid #29394d; background: #0c141e; }
.catalog-change {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 9px;
  padding: 8px 9px;
  color: #c2ccd8;
  border-left: 3px solid #4b607c;
  border-radius: 6px;
  background: #111c29;
  font-size: 10px;
  line-height: 1.45;
}
.catalog-change.add { border-left-color: #34d399; }
.catalog-change.update { border-left-color: #60a5fa; }
.catalog-change.remove { border-left-color: #fbbf24; }
.catalog-change b { color: var(--ink-900); font-size: 10px; }
.catalog-update-actions { justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid #29394d; }
.catalog-update-actions .button,
.catalog-bulk-actions .button { min-height: 34px; font-size: 10px; }
.catalog-bulk-actions { justify-content: flex-end; gap: 8px; margin-top: 10px; }
.catalog-bulk-actions[hidden] { display: none; }
.catalog-empty-state { display: grid; place-items: center; min-height: 210px; padding: 25px; text-align: center; }
.catalog-empty-state > span { display: grid; place-items: center; width: 38px; height: 38px; color: #6ee7b7; border-radius: 50%; background: #12372e; font-size: 18px; }
.catalog-empty-state strong { margin-top: 10px; color: var(--ink-900); font-size: 14px; }
.catalog-empty-state p { max-width: 330px; margin: 5px 0 0; color: #aebbc9; font-size: 11px; line-height: 1.5; }
.catalog-safety-note {
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  color: #bfdbfe;
  border: 1px solid #29496c;
  border-radius: 10px;
  background: #10243b;
  font-size: 10px;
  line-height: 1.5;
}
.catalog-safety-note strong { flex: none; color: #dbeafe; }

@media (max-width: 860px) {
  .catalog-manager-grid { grid-template-columns: 1fr; }
  .catalog-discipline-list, .catalog-update-list { max-height: none; }
}

@media (max-width: 620px) {
  .data-dialog { width: calc(100vw - 10px); padding: 16px; }
  .catalog-manager { padding: 12px; }
  .catalog-manager-heading { display: grid; }
  .catalog-version { justify-self: start; }
  .catalog-summary { grid-template-columns: 1fr; }
  .catalog-change { grid-template-columns: 1fr; gap: 2px; }
  .catalog-update-card > summary { grid-template-columns: 20px minmax(0, 1fr); }
  .catalog-update-card summary > i { display: none; }
  .catalog-update-actions, .catalog-bulk-actions { align-items: stretch; flex-direction: column; }
  .catalog-update-actions .button, .catalog-bulk-actions .button { width: 100%; }
  .catalog-safety-note { display: grid; }
}

/* Calendário semanal manipulável */
.calendar-page-heading { margin-bottom: 17px; }
.calendar-week-toolbar {
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px;
  color: var(--ink-700);
  border: 1px solid #2d3d51;
  border-radius: 14px;
  background: #101821;
}
.calendar-week-navigation { display: flex; align-items: stretch; }
.calendar-nav-button,
.calendar-range-button {
  min-height: 46px;
  color: var(--ink-900);
  border: 1px solid #344359;
  background: #0c131c;
}
.calendar-nav-button { width: 42px; font-size: 24px; }
.calendar-nav-button:first-child { border-radius: 10px 0 0 10px; }
.calendar-nav-button:last-child { border-radius: 0 10px 10px 0; }
.calendar-range-button {
  display: grid;
  min-width: 230px;
  place-content: center;
  padding: 5px 15px;
  border-inline: 0;
  text-align: center;
}
.calendar-range-button small { color: #93c5fd; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.calendar-range-button strong { margin-top: 2px; color: var(--ink-900); font-size: 11px; }
.calendar-nav-button:hover,
.calendar-range-button:hover { background: #15253a; }
.calendar-week-summary { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }
.calendar-week-summary span {
  padding: 7px 9px;
  color: #aebbc9;
  border: 1px solid #2c3b4f;
  border-radius: 8px;
  background: #0c131c;
  font-size: 9px;
  white-space: nowrap;
}
.calendar-week-summary b { color: var(--ink-900); font-size: 11px; }
.calendar-week-summary .pending { color: #fde68a; border-color: #72591f; background: #241d0f; }
.calendar-new-button { min-height: 42px; white-space: nowrap; }
.calendar-composer { border-color: #315782; box-shadow: 0 12px 32px rgba(0,0,0,.2); }
.calendar-composer .panel-header { align-items: flex-start; padding: 17px 18px 14px; }
.calendar-composer .panel-header h2 { font-size: 18px; }
.calendar-composer .panel-header p { font-size: 10px; }
.calendar-composer .eyebrow { margin-bottom: 3px; }
.calendar-form {
  grid-template-columns: 130px 105px minmax(240px, 1.35fr) minmax(210px, 1fr) 125px 90px;
  gap: 10px;
  background: #0d151f;
}
.calendar-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  overflow: visible;
}
.calendar-day {
  min-width: 0;
  min-height: 185px;
  border-color: #2d3d51;
  border-radius: 13px;
  background: #0b1119;
}
.calendar-day.today { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,.13); }
.calendar-day.past:not(.today) { background: #0a1017; }
.calendar-day > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 26px;
  gap: 7px;
  min-height: 54px;
  padding: 9px;
  color: #aebbc9;
  border-color: #2d3d51;
  background: #101923;
  text-transform: none;
}
.calendar-day > header > div { display: grid; gap: 1px; min-width: 0; }
.calendar-day > header > div span { color: #93c5fd; font-size: 9px; font-weight: 800; text-transform: capitalize; }
.calendar-day > header > div strong { color: var(--ink-900); font-size: 13px; }
.calendar-day-total { align-self: center; color: #9fadc0; font-size: 8px; white-space: nowrap; }
.calendar-day > header > button {
  width: 26px;
  height: 26px;
  align-self: center;
  padding: 0;
  color: #dbeafe;
  border: 1px solid #315782;
  border-radius: 7px;
  background: #17335a;
  font-size: 16px;
}
.calendar-day > header > button:hover { background: #20519a; }
.calendar-day-events { align-content: start; gap: 7px; padding: 8px; }
.calendar-empty {
  display: grid;
  min-height: 94px;
  place-content: center;
  gap: 5px;
  width: 100%;
  padding: 10px;
  color: #94a3b8;
  border: 1px dashed #344359;
  border-radius: 9px;
  background: transparent;
  font-size: 9px;
}
.calendar-empty span { color: #93c5fd; font-size: 17px; }
.calendar-empty:hover { color: #dbeafe; border-color: #41658d; background: #111e30; }
.calendar-event {
  padding: 10px;
  color: var(--ink-700);
  border: 1px solid #2d3d51;
  border-left: 4px solid #60a5fa;
  border-radius: 10px;
  background: #111a25;
  box-shadow: none;
}
.calendar-event.overdue { border-left-color: #fb7185; background: #201218; }
.calendar-event.done { border-left-color: #34d399; background: #0f1d1a; opacity: .72; }
.calendar-event-meta { display: flex !important; align-items: center; justify-content: space-between; gap: 6px; margin: 0 !important; }
.calendar-event-meta time { color: #bfdbfe; font-size: 9px; }
.calendar-event-meta span { padding: 3px 5px; color: #aebbc9; border-radius: 5px; background: #1a2635; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.calendar-event strong { margin: 7px 0 5px; color: var(--ink-900); font-size: 11px; line-height: 1.38; }
.calendar-event small { color: #aebbc9; font-size: 8px; line-height: 1.4; }
.calendar-event-actions { display: flex !important; gap: 8px !important; margin-top: 9px !important; padding-top: 8px; border-top: 1px solid #29394d; }
.calendar-event-actions button { min-height: 26px; padding: 0 2px; color: #bfdbfe; font-size: 8px; }
.calendar-event-actions .primary-action { color: #6ee7b7; }
.calendar-event-actions .danger-text { margin-left: auto; color: #fda4af; }

/* Disciplinas acessíveis sem scroll duplo */
.app-shell { grid-template-columns: clamp(238px, 18vw, 278px) minmax(0, 1fr); }
.discipline-section-heading { gap: 7px; padding: 16px 7px 7px; }
.discipline-section-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 4px 3px;
  color: var(--ink-500);
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.discipline-section-toggle span:last-child { color: #93c5fd; font-size: 13px; transition: transform .16s ease; }
.sidebar.disciplines-collapsed .discipline-section-toggle span:last-child { transform: rotate(180deg); }
.discipline-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 0 5px 8px;
}
.discipline-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  color: #93c5fd;
  border: 1px solid #344359;
  border-radius: 8px;
  background: #0c131c;
}
.discipline-filter input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink-900);
  border: 0;
  background: transparent;
  font-size: 10px;
  outline: 0;
}
.discipline-filter input::placeholder { color: #8493a6; }
.discipline-filter:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.12); }
.discipline-manage-button {
  padding: 0 8px;
  color: #bfdbfe;
  border: 1px solid #315782;
  border-radius: 8px;
  background: #11243a;
  font-size: 9px;
  font-weight: 750;
}
.discipline-manage-button:hover { background: #17335a; }
.sidebar.disciplines-collapsed .discipline-tools,
.sidebar.disciplines-collapsed .discipline-list { display: none; }
.discipline-list { scrollbar-width: thin; scrollbar-color: #475569 transparent; }
.discipline-button { min-height: 43px; padding: 7px 9px; }
.discipline-filter-empty { padding: 18px 8px; color: #94a3b8; font-size: 10px; line-height: 1.45; text-align: center; }
.sidebar { overflow-y: auto; }
.sidebar .discipline-list { flex: none; overflow: visible; }
.sidebar-footer {
  position: sticky;
  bottom: -18px;
  z-index: 7;
  margin-top: 18px;
  padding: 10px 0 18px;
  border-top: 1px solid #2b3a4e;
  background: #0d141d;
  box-shadow: 0 -12px 22px rgba(9,14,21,.9);
}
.discipline-section-heading {
  position: sticky;
  top: -18px;
  z-index: 4;
  background: #0d141d;
}
.discipline-tools {
  position: sticky;
  top: 20px;
  z-index: 4;
  background: #0d141d;
}

@media (max-width: 1499px) and (min-width: 1101px) {
  .calendar-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calendar-week-toolbar { grid-template-columns: auto 1fr; }
  .calendar-new-button { grid-column: 2; justify-self: end; }
  .calendar-form { grid-template-columns: 120px 100px minmax(250px, 1fr) minmax(210px, 1fr); }
}

@media (max-width: 1100px) {
  .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .app-shell.sidebar-collapsed .sidebar { width: min(340px, 91vw); overflow-y: auto; }
  .sidebar .discipline-list { flex: none; overflow: visible; }
  .sidebar-footer { margin-top: 18px; }
  .calendar-week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-week-toolbar { grid-template-columns: 1fr auto; }
  .calendar-week-navigation { min-width: 0; }
  .calendar-range-button { min-width: 200px; }
  .calendar-week-summary { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .calendar-form { grid-template-columns: 1fr 1fr 1fr; }
  .calendar-lesson-field, .calendar-title-field { grid-column: span 2; }
}

@media (max-width: 780px) {
  .calendar-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-week-toolbar { grid-template-columns: 1fr; }
  .calendar-new-button { grid-column: auto; grid-row: auto; width: 100%; }
  .calendar-week-summary { grid-column: auto; grid-row: auto; justify-content: flex-start; }
  .calendar-form { grid-template-columns: 1fr 1fr; }
  .calendar-lesson-field, .calendar-title-field { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .calendar-page-heading .heading-actions { width: 100%; }
  .calendar-page-heading .heading-actions .button { flex: 1; }
  .calendar-week { grid-template-columns: 1fr; }
  .calendar-day { min-height: 0; }
  .calendar-week-navigation { width: 100%; }
  .calendar-range-button { min-width: 0; flex: 1; }
  .calendar-week-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-week-summary span { white-space: normal; }
  .calendar-form { grid-template-columns: 1fr; }
  .calendar-lesson-field, .calendar-title-field { grid-column: auto; }
  .calendar-form-actions { grid-column: auto; flex-direction: column-reverse; }
  .calendar-form-actions .button { width: 100%; }
  .calendar-event-actions button { min-height: 32px; font-size: 9px; }
  .discipline-button { min-height: 47px; }
}

/* Navegação por prioridade, perfil e configurações */
.sidebar-nav-group-label {
  margin: 13px 9px 5px;
  color: #93a4b8;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.profile-menu-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  color: #e6edf7;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}
.profile-menu-button:hover,
.profile-menu-button[aria-expanded="true"] { border-color: #35465d; background: #131d2a; }
.profile-menu-button > span:nth-child(2) { min-width: 0; }
.profile-menu-button strong,
.profile-menu-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-button strong { font-size: 11px; }
.profile-menu-button small { margin-top: 2px; color: #9aaabd; font-size: 9px; }
.profile-menu-button b { color: #9aaabd; font-size: 10px; letter-spacing: 1px; }
.profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #fff;
  border-radius: 9px;
  background: linear-gradient(145deg, #60a5fa, #4f46e5);
  font-size: 11px;
  font-weight: 850;
}
.profile-popover {
  position: fixed;
  bottom: 78px;
  left: 12px;
  z-index: 90;
  width: 228px;
  padding: 6px;
  border: 1px solid #3a4a61;
  border-radius: 12px;
  background: #121b27;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
}
.profile-popover[hidden] { display: none; }
.profile-popover button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: #dce6f4;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 11px;
  text-align: left;
}
.profile-popover button:hover { background: #1c2a3b; }
.profile-popover button span { width: 17px; color: #93c5fd; text-align: center; }
.profile-popover .profile-popover-logout {
  margin-top: 5px;
  padding-top: 11px;
  color: #fecaca;
  border-top: 1px solid #344255;
  border-radius: 0 0 8px 8px;
}
.profile-popover .profile-popover-logout:hover { color: #fff; background: #48202a; }
.profile-popover .profile-popover-logout span { color: #fda4af; }

.settings-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  padding: 0;
  overflow: hidden;
}
.settings-shell { display: grid; grid-template-columns: 215px minmax(0, 1fr); min-height: 560px; }
.settings-navigation {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 24px 14px;
  border-right: 1px solid #2d3c50;
  background: #0d141e;
}
.settings-navigation > div { padding: 0 8px 18px; }
.settings-navigation h2 { margin: 5px 0 0; font-size: 20px; }
.settings-nav-button {
  padding: 11px 12px;
  color: #aebcd0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
}
.settings-nav-button:hover { color: #fff; background: #182334; }
.settings-nav-button.active { color: #fff; background: #1b3454; box-shadow: inset 3px 0 #60a5fa; }
.settings-content { min-width: 0; padding: 24px 28px; background: #111923; }
.settings-mobile-header { display: none; }
.settings-section { display: none; }
.settings-section.active { display: block; }
.settings-section-heading { margin-bottom: 18px; }
.settings-section-heading h3 { margin: 0 0 5px; color: #f4f7fb; font-size: 18px; }
.settings-section-heading p { margin: 0; color: #9cacc0; font-size: 11px; line-height: 1.5; }
.settings-row,
.settings-action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 13px 0;
  border-bottom: 1px solid #29384b;
}
.settings-row strong,
.settings-row small,
.settings-action-card strong,
.settings-action-card small { display: block; }
.settings-row strong,
.settings-action-card strong { color: #e8eef7; font-size: 11px; }
.settings-row small,
.settings-action-card small { margin-top: 4px; color: #91a1b5; font-size: 9px; line-height: 1.45; }
.settings-row input,
.settings-row select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: #f4f7fb;
  border: 1px solid #3b4d65;
  border-radius: 8px;
  background: #0c131c;
}
.settings-account-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid #304159;
  border-radius: 12px;
  background: #0d1621;
}
.settings-account-card strong { color: #f1f5f9; }
.settings-account-card p { margin: 6px 0 0; color: #a0aec0; font-size: 10px; line-height: 1.55; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; }

/* Progresso: ações primeiro, análises sob demanda */
.dashboard-priority-section { margin: 20px 0 25px; }
.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}
.dashboard-section-heading h2 { margin: 3px 0 0; color: #f4f7fb; font-size: 18px; }
.dashboard-section-heading > small { color: #91a1b5; font-size: 9px; }
.dashboard-priority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dashboard-action-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  min-height: 180px;
  padding: 16px;
  border: 1px solid #33455d;
  border-radius: 13px;
  background: linear-gradient(145deg, #121c28, #0f1721);
}
.dashboard-action-card.urgent { border-color: #86502f; background: linear-gradient(145deg, #241b18, #111820); }
.dashboard-action-card.attention { border-color: #66572f; }
.dashboard-action-card.clear { border-color: #275648; }
.dashboard-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #bfdbfe;
  border-radius: 9px;
  background: #19375e;
  font-weight: 900;
}
.dashboard-action-card.urgent .dashboard-action-icon { color: #fed7aa; background: #6b371f; }
.dashboard-action-card.clear .dashboard-action-icon { color: #a7f3d0; background: #16513f; }
.dashboard-action-card small,
.dashboard-action-card strong { display: block; }
.dashboard-action-card small { color: #94a3b8; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-action-card strong { margin-top: 6px; color: #f8fafc; font-size: 16px; }
.dashboard-action-card p { margin: 7px 0 0; color: #a7b4c5; font-size: 10px; line-height: 1.5; }
.dashboard-action-card .button { grid-column: 1 / -1; align-self: end; width: 100%; }
.dashboard-evolution-heading { margin-top: 4px; }
.dashboard-goal-panel { margin-bottom: 12px; }
.goal-settings > span { color: #95a4b7; font-size: 10px; }
.dashboard-detail-stack { display: grid; gap: 10px; margin-top: 12px; }
.dashboard-detail-panel { margin: 0; padding: 0; overflow: hidden; }
.dashboard-detail-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.dashboard-detail-panel > summary::-webkit-details-marker { display: none; }
.dashboard-detail-panel > summary strong,
.dashboard-detail-panel > summary small { display: block; }
.dashboard-detail-panel > summary strong { color: #edf3fa; font-size: 13px; }
.dashboard-detail-panel > summary small { margin-top: 3px; color: #91a1b5; font-size: 9px; }
.dashboard-detail-panel > summary::after { content: "⌄"; color: #93c5fd; font-size: 15px; }
.dashboard-detail-panel:not([open]) > summary::after { transform: rotate(-90deg); }
.dashboard-detail-panel > summary .count-pill { margin-left: auto; }
.dashboard-detail-body { padding: 0 18px 18px; border-top: 1px solid #2b3a4e; }

@media (max-width: 900px) {
  .dashboard-priority-grid { grid-template-columns: 1fr; }
  .dashboard-action-card { min-height: 0; }
  .settings-shell { grid-template-columns: 1fr; min-height: 0; }
  .settings-navigation { display: grid; grid-template-columns: repeat(4, minmax(max-content, 1fr)); overflow-x: auto; padding: 12px; border-right: 0; border-bottom: 1px solid #2d3c50; }
  .settings-navigation > div { display: none; }
  .settings-nav-button { text-align: center; }
  .settings-nav-button.active { box-shadow: inset 0 -3px #60a5fa; }
  .settings-content { padding: 16px; }
  .settings-mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
}
@media (max-width: 560px) {
  .profile-popover { right: 12px; left: 12px; width: auto; }
  .settings-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
  .settings-navigation { grid-template-columns: repeat(4, max-content); }
  .settings-row,
  .settings-action-card { grid-template-columns: 1fr; gap: 9px; }
  .settings-actions { position: sticky; bottom: -16px; margin: 20px -16px -16px; padding: 12px 16px; background: #111923; border-top: 1px solid #2d3c50; }
  .settings-actions .button { flex: 1; }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* Conta online, autenticação e sincronização */
[hidden] { display: none !important; }
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  gap: 22px;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 18% 15%, rgba(37,99,235,.18), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(14,165,233,.1), transparent 28%),
    #090e15;
}
.auth-brand { display: flex; align-items: center; gap: 11px; color: #f8fafc; }
.auth-brand > div strong,
.auth-brand > div small { display: block; }
.auth-brand > div strong { font-size: 15px; }
.auth-brand > div small { margin-top: 3px; color: #9aabc0; font-size: 10px; }
.auth-card {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid #34465e;
  border-radius: 18px;
  background: rgba(17,25,35,.97);
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
}
.auth-heading { margin-bottom: 22px; }
.auth-heading h1 { margin: 7px 0 6px; color: #f8fafc; font-size: 29px; }
.auth-heading p { margin: 0; color: #a8b6c8; font-size: 11px; line-height: 1.55; }
.auth-card .field { margin-top: 13px; }
.auth-card .field span { color: #dbe6f3; }
.auth-card input {
  width: 100%;
  min-height: 44px;
  color: #f8fafc;
  border: 1px solid #3b4f69;
  background: #0b121b;
}
.auth-card input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.13); }
.auth-submit { width: 100%; min-height: 44px; margin-top: 17px; }
.auth-message { min-height: 18px; margin-top: 12px; color: #a8b6c8; font-size: 10px; line-height: 1.45; }
.auth-message.error { color: #fca5a5; }
.auth-message.success { color: #6ee7b7; }
.auth-message.pending { color: #93c5fd; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #2d3c50; }
.auth-links button { padding: 0; color: #93c5fd; border: 0; background: transparent; font-size: 10px; }
.auth-links button:hover { color: #dbeafe; text-decoration: underline; }
.auth-local-reset { margin-top: 16px; padding: 13px; border: 1px solid #3a5a79; border-radius: 10px; background: #102238; }
.auth-local-reset strong,
.auth-local-reset span,
.auth-local-reset a { display: block; }
.auth-local-reset strong { color: #bfdbfe; font-size: 10px; }
.auth-local-reset span { margin: 5px 0 9px; color: #a9b9ca; font-size: 9px; line-height: 1.5; }
.auth-local-reset a { color: #fff; font-size: 10px; font-weight: 750; }
.auth-footnote { margin: 0; color: #8494a8; font-size: 9px; text-align: center; }
.save-indicator b { font: inherit; }
.save-indicator.sync-pending span { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.12); }
.save-indicator.sync-syncing span { background: #60a5fa; animation: syncPulse 1s ease-in-out infinite; }
.save-indicator.sync-synced span { background: #34d399; }
.save-indicator.sync-failed span,
.save-indicator.sync-conflict span { background: #fb7185; }
@keyframes syncPulse { 50% { opacity: .35; transform: scale(.75); } }
.settings-account-actions { display: grid; gap: 7px; margin-top: 14px; }
.settings-account-actions .settings-action-card {
  width: 100%;
  min-height: 58px;
  padding: 11px 13px;
  color: inherit;
  border: 1px solid #304159;
  border-radius: 10px;
  background: #0d1621;
  text-align: left;
}
.settings-account-actions .settings-action-card:hover { border-color: #52729a; background: #132134; }
.settings-account-actions .settings-action-card > b { color: #93c5fd; font-size: 18px; text-align: right; }
.settings-account-actions .settings-action-card.danger strong { color: #fda4af; }
.migration-dialog,
.conflict-dialog { width: min(650px, calc(100vw - 28px)); }
.migration-dialog > p,
.conflict-dialog > p { margin: 0 0 16px; color: #a8b6c8; font-size: 11px; line-height: 1.55; }
.migration-options { display: grid; gap: 10px; }
.migration-option {
  display: grid;
  gap: 6px;
  padding: 16px;
  color: #dce7f4;
  border: 1px solid #344860;
  border-radius: 12px;
  background: #0d1621;
  text-align: left;
}
.migration-option:hover { border-color: #60a5fa; background: #12233a; }
.migration-option strong { color: #f8fafc; font-size: 13px; }
.migration-option span { color: #a7b6c8; font-size: 10px; line-height: 1.5; }
.migration-option small { color: #7dd3fc; font-size: 9px; }

@media (max-width: 560px) {
  .auth-screen { align-content: start; padding-top: 20px; }
  .auth-card { padding: 21px 17px; border-radius: 14px; }
  .auth-heading h1 { font-size: 25px; }
  .auth-links { align-items: flex-start; flex-direction: column; }
  .migration-dialog .dialog-actions,
  .conflict-dialog .dialog-actions { flex-direction: column-reverse; }
  .migration-dialog .button,
  .conflict-dialog .button { width: 100%; }
}

/* Portal neutro: nenhuma identificação do produto antes da autenticação */
.auth-screen {
  position: relative;
  grid-template: 1fr auto / minmax(0, 1.3fr) minmax(390px, .7fr);
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #070a0f;
}
.auth-screen::before {
  content: "";
  position: absolute;
  left: -14vw;
  top: -28vh;
  z-index: -2;
  width: 72vw;
  height: 120vh;
  border-radius: 42% 58% 68% 32% / 48% 35% 65% 52%;
  background:
    radial-gradient(circle at 62% 38%, rgba(103,232,249,.9), transparent 8%),
    radial-gradient(circle at 55% 45%, rgba(59,130,246,.62), transparent 27%),
    radial-gradient(circle at 44% 58%, rgba(109,40,217,.48), transparent 42%),
    #0a1020;
  filter: saturate(1.15);
  transform: rotate(-8deg);
  box-shadow: 0 0 140px rgba(37,99,235,.22);
}
.auth-screen::after {
  content: "";
  position: absolute;
  left: 24vw;
  top: 17vh;
  z-index: -1;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(191,219,254,.22);
  transform: rotate(45deg);
  box-shadow:
    42px -42px 0 -1px rgba(96,165,250,.06),
    84px -84px 0 -1px rgba(96,165,250,.035);
}
.auth-signal {
  position: absolute;
  top: 30px;
  left: 34px;
  display: flex;
  gap: 7px;
}
.auth-signal i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(219,234,254,.32);
}
.auth-signal i:first-child { width: 25px; border-radius: 10px; background: #67e8f9; box-shadow: 0 0 22px rgba(103,232,249,.65); }
.auth-card {
  grid-column: 2;
  width: min(460px, calc(100vw - 40px));
  padding: 38px;
  border-color: rgba(148,163,184,.24);
  border-radius: 26px 7px 26px 7px;
  background: rgba(15,21,31,.78);
  box-shadow: 0 32px 100px rgba(0,0,0,.55);
  backdrop-filter: blur(22px);
}
.auth-heading .eyebrow { color: #67e8f9; }
.auth-heading h1 { max-width: 320px; font-size: clamp(30px, 3vw, 43px); letter-spacing: -.035em; }
.auth-card input { border-radius: 4px 12px 4px 12px; background: rgba(5,10,17,.74); }
.auth-submit { border-radius: 4px 12px 4px 12px; background: linear-gradient(100deg, #2563eb, #4f46e5 58%, #7c3aed); }
.auth-links:empty { display: none; }
.auth-footnote { grid-column: 2; align-self: end; }

@media (max-width: 820px) {
  .auth-screen { grid-template: 1fr auto / 1fr; }
  .auth-screen::before { left: -45vw; top: -40vh; width: 135vw; opacity: .62; }
  .auth-screen::after { left: 4vw; top: 12vh; opacity: .55; }
  .auth-card, .auth-footnote { grid-column: 1; }
  .auth-card { width: min(460px, calc(100vw - 28px)); }
}
@media (max-width: 560px) {
  .auth-screen { place-content: center; padding-top: 48px; }
  .auth-signal { top: 20px; left: 20px; }
  .auth-card { padding: 27px 20px; border-radius: 20px 6px 20px 6px; }
  .auth-screen::before { left: -75vw; width: 170vw; }
}

.admin-dialog {
  width: min(1160px, calc(100vw - 32px));
  max-width: 1160px;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #30445b;
  border-radius: 20px;
  background: #0a1119;
  box-shadow: 0 34px 110px rgba(0,0,0,.68);
}
.admin-dialog::backdrop { background: rgba(3,7,13,.86); backdrop-filter: blur(6px); }
.admin-dialog-header {
  margin: 0;
  padding: 24px 26px 20px;
  border-bottom: 1px solid #26384c;
  background: linear-gradient(120deg, rgba(37,99,235,.12), transparent 42%), #0d1621;
}
.admin-title { display: flex; align-items: center; gap: 14px; }
.admin-title-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #dbeafe;
  border: 1px solid #3b6fae;
  border-radius: 13px;
  background: linear-gradient(145deg, #1d4ed8, #4338ca);
  box-shadow: 0 10px 24px rgba(37,99,235,.22);
  font-size: 18px;
}
.admin-dialog .dialog-header h2 { font-size: 25px; }
.admin-dialog .dialog-header p { margin: 5px 0 0; color: #9eafc2; font-size: 11px; }
.admin-create-panel {
  margin: 20px 24px 0;
  padding: 18px;
  border: 1px solid #30465e;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(37,99,235,.075), transparent 44%), #0d1722;
}
.admin-create-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #293c51; }
.admin-create-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; color: #bfdbfe; border-radius: 10px; background: #173664; font-size: 18px; }
.admin-create-intro > div { min-width: 0; }
.admin-security-note { margin-left: auto; padding: 6px 9px; color: #9fd8c3; border: 1px solid #285f50; border-radius: 999px; background: #0b2b24; font-size: 8px; font-weight: 800; white-space: nowrap; }
.admin-create-panel h3,
.admin-users-panel h3 { margin: 0; color: #f3f7fb; font-size: 15px; }
.admin-create-panel p { margin: 4px 0 0; color: #9aabbd; font-size: 9px; line-height: 1.5; }
.admin-create-panel form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 11px; }
.admin-create-panel .field { margin: 0; }
.admin-create-panel .field > span { margin-bottom: 7px; color: #d8e3ef; font-size: 10px; }
.admin-field-name { grid-column: span 4; }
.admin-field-email { grid-column: span 5; }
.admin-field-password { grid-column: span 3; }
.admin-field-role { grid-column: span 3; }
.admin-field-profile { grid-column: span 6; }
.admin-create-submit { grid-column: span 3; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 43px; }
.admin-create-panel input,
.admin-create-panel select { width: 100%; min-height: 43px; padding: 0 11px; color: #f5f7fb; border: 1px solid #3b5068; border-radius: 9px; background: #080f17; font-size: 11px; }
.admin-create-panel input::placeholder { color: #63768b; }
.admin-create-panel input:focus,
.admin-create-panel select:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.12); outline: none; }
.admin-feedback { min-height: 18px; margin-top: 10px; color: #93c5fd; font-size: 10px; }
.admin-users-panel { padding: 20px 24px 24px; }
.admin-users-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.admin-users-header p { margin: 5px 0 0; color: #9badc0; font-size: 10px; }
.admin-users-header p strong { color: #cfe0f3; }
.admin-users-tools { display: flex; align-items: center; gap: 8px; }
.admin-user-search { display: flex; align-items: center; gap: 7px; min-width: 230px; height: 38px; padding: 0 10px; color: #7dd3fc; border: 1px solid #354b64; border-radius: 9px; background: #080f17; }
.admin-user-search input { width: 100%; color: #e9f1fa; border: 0; outline: 0; background: transparent; font-size: 11px; }
.admin-user-search input::placeholder { color: #718398; }
.admin-users-list { display: grid; gap: 8px; max-height: min(390px, calc(100vh - 480px)); overflow-y: auto; padding-right: 3px; }
.admin-user-row {
  display: grid;
  grid-template-columns: 44px minmax(190px, 1.35fr) minmax(140px, .85fr) minmax(125px, .72fr) minmax(150px, .9fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid #2d4158;
  border-radius: 12px;
  background: #0d1722;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.admin-user-row:hover { transform: translateY(-1px); border-color: #416080; background: #101c29; }
.admin-user-row.suspended { opacity: .72; background: #111720; }
.admin-user-row > .profile-avatar { width: 42px; height: 42px; border-radius: 12px; font-size: 11px; }
.admin-user-identity,
.admin-user-meta { min-width: 0; }
.admin-user-identity strong,
.admin-user-identity small,
.admin-user-meta b,
.admin-user-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity strong { color: #f3f7fb; font-size: 12px; }
.admin-user-identity small,
.admin-user-meta small { margin-top: 4px; color: #a9b9ca; font-size: 10px; }
.admin-user-meta b { color: #d7e2ee; font-size: 10px; }
.admin-user-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.admin-user-badges i { padding: 3px 6px; border-radius: 999px; font-size: 7px; font-style: normal; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.admin-user-badges .status-active { color: #a7f3d0; background: #0b382d; }
.admin-user-badges .status-suspended { color: #fecaca; background: #451a1a; }
.admin-user-badges .role-admin { color: #bfdbfe; background: #172f55; }
.admin-user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.admin-user-actions button {
  min-height: 32px;
  padding: 7px 10px;
  color: #bfdbfe;
  border: 1px solid #365477;
  border-radius: 8px;
  background: #10223a;
  font-size: 10px;
  white-space: nowrap;
}
.admin-user-actions button:hover { border-color: #60a5fa; }
.admin-user-actions .admin-action-suspend { color: #fca5a5; border-color: #63383d; background: #2a171b; }
.admin-user-actions .admin-action-activate { color: #a7f3d0; border-color: #2d6b58; background: #0d2d25; }
.admin-current-account { padding: 6px 8px; color: #8fa1b5; font-size: 8px; white-space: nowrap; }
.admin-reset-result { position: absolute; right: 24px; bottom: 20px; left: 24px; z-index: 5; padding: 16px; border: 1px solid #47739d; border-radius: 12px; background: #102238; box-shadow: 0 18px 55px rgba(0,0,0,.55); }
.admin-reset-result strong { color: #dbeafe; font-size: 11px; }
.admin-reset-result p { color: #9eb0c5; font-size: 9px; }
.admin-reset-result input { width: calc(100% - 120px); min-height: 38px; margin-right: 8px; color: #e6f1ff; border: 1px solid #416181; border-radius: 7px; background: #08111c; }

@media (max-width: 980px) {
  .admin-field-name,
  .admin-field-email,
  .admin-field-password { grid-column: span 6; }
  .admin-field-role { grid-column: span 4; }
  .admin-field-profile { grid-column: span 8; }
  .admin-create-submit { grid-column: 9 / -1; }
  .admin-user-row { grid-template-columns: 42px minmax(0, 1.2fr) minmax(130px, .8fr) auto; }
  .admin-user-sync,
  .admin-user-row .admin-user-meta:nth-of-type(4) { display: none; }
}
@media (max-width: 620px) {
  .admin-dialog { width: calc(100vw - 8px); max-height: calc(100vh - 8px); overflow-y: auto; border-radius: 14px; }
  .admin-dialog-header { position: sticky; top: 0; z-index: 3; padding: 17px 16px; }
  .admin-title-icon { width: 38px; height: 38px; }
  .admin-create-panel { margin: 14px 12px 0; padding: 14px; }
  .admin-create-intro { align-items: flex-start; }
  .admin-security-note { display: none; }
  .admin-create-panel form { grid-template-columns: 1fr; }
  .admin-field-name,
  .admin-field-email,
  .admin-field-password,
  .admin-field-role,
  .admin-field-profile,
  .admin-create-submit { grid-column: 1; }
  .admin-users-panel { padding: 18px 12px; }
  .admin-users-header { align-items: stretch; flex-direction: column; }
  .admin-users-tools { align-items: stretch; }
  .admin-user-search { min-width: 0; flex: 1; }
  .admin-users-list { max-height: none; overflow: visible; }
  .admin-user-row { grid-template-columns: 42px minmax(0, 1fr); gap: 9px; }
  .admin-user-row .admin-user-meta { display: block; grid-column: 2; }
  .admin-user-sync { display: none !important; }
  .admin-user-actions { grid-column: 1 / -1; justify-content: stretch; }
  .admin-user-actions button { flex: 1; }
  .admin-current-account { margin-left: auto; }
  .admin-reset-result input { width: 100%; margin: 0 0 8px; }
  .admin-reset-result .button { width: 100%; }
}

/* Primeiro acesso: decisão ampla e legível em desktop */
.migration-dialog {
  width: min(1040px, calc(100vw - 64px));
  max-width: 1040px;
  max-height: min(760px, calc(100vh - 64px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #354960;
  border-radius: 24px;
  background: #0c131c;
  box-shadow: 0 36px 120px rgba(0,0,0,.62);
}
.migration-dialog::backdrop {
  background:
    radial-gradient(circle at 18% 18%, rgba(37,99,235,.16), transparent 30%),
    radial-gradient(circle at 82% 76%, rgba(124,58,237,.13), transparent 28%),
    rgba(3,7,13,.94);
  backdrop-filter: blur(5px);
}
.migration-layout { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr); min-height: 570px; }
.migration-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: 42px;
  border-right: 1px solid rgba(147,197,253,.15);
  background:
    linear-gradient(155deg, rgba(30,64,175,.28), transparent 48%),
    linear-gradient(25deg, rgba(76,29,149,.25), transparent 52%),
    #0b1421;
}
.migration-intro::after {
  content: "";
  position: absolute;
  right: -105px;
  top: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(103,232,249,.18);
  transform: rotate(32deg);
  box-shadow: 38px 38px 0 -1px rgba(96,165,250,.055), 76px 76px 0 -1px rgba(96,165,250,.035);
}
.migration-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(147,197,253,.24);
  border-radius: 50%;
}
.migration-orbit::before,
.migration-orbit::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(103,232,249,.18);
  border-radius: 50%;
}
.migration-orbit::after { inset: 23px; background: rgba(37,99,235,.2); box-shadow: 0 0 30px rgba(59,130,246,.26); }
.migration-orbit span { position: relative; z-index: 2; color: #cffafe; font-size: 22px; }
.migration-orbit i {
  position: absolute;
  left: 38px;
  top: -3px;
  z-index: 3;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 16px #22d3ee;
}
.migration-intro h2 { max-width: 350px; margin: 8px 0 14px; color: #f8fafc; font-size: clamp(25px, 2.4vw, 35px); line-height: 1.08; letter-spacing: -.035em; }
.migration-intro p { max-width: 350px; margin: 0; color: #adbbcc; font-size: 11px; line-height: 1.65; }
.migration-protection { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid rgba(52,211,153,.25); border-radius: 12px; background: rgba(6,78,59,.14); }
.migration-protection > span { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; color: #a7f3d0; border-radius: 50%; background: #0f513f; }
.migration-protection strong,
.migration-protection small { display: block; }
.migration-protection strong { color: #d1fae5; font-size: 10px; }
.migration-protection small { margin-top: 4px; color: #94b9ae; font-size: 9px; line-height: 1.45; }
.migration-decision { display: flex; flex-direction: column; padding: 42px; background: #101923; }
.migration-decision header h3 { margin: 7px 0 6px; color: #f8fafc; font-size: 23px; letter-spacing: -.02em; }
.migration-decision header p { margin: 0; color: #93a4b8; font-size: 10px; line-height: 1.55; }
.migration-options { display: grid; gap: 12px; margin-top: 24px; }
.migration-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 142px;
  padding: 18px;
  color: #dce7f4;
  border: 1px solid #344860;
  border-radius: 15px;
  background: #0b141e;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.migration-option:hover { transform: translateY(-2px); border-color: #60a5fa; background: #112139; }
.migration-option.recommended { border-color: #3779c9; box-shadow: inset 0 0 0 1px rgba(96,165,250,.18), 0 12px 30px rgba(2,6,23,.22); }
.migration-option-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #dbeafe;
  border-radius: 12px;
  background: linear-gradient(145deg, #2563eb, #4f46e5);
  font-size: 18px;
  font-weight: 850;
}
.migration-option-icon.account { color: #cffafe; background: linear-gradient(145deg, #0e7490, #155e75); }
.migration-option-copy,
.migration-option-copy > span,
.migration-option-copy strong,
.migration-option-copy small { display: block; }
.migration-option-copy strong { margin: 5px 0 6px; color: #f8fafc; font-size: 13px; }
.migration-option-copy > span:not(.migration-recommendation) { color: #a7b6c8; font-size: 10px; line-height: 1.48; }
.migration-option-copy small { margin-top: 10px; color: #7dd3fc; font-size: 9px; line-height: 1.4; }
.migration-option > b { color: #93c5fd; font-size: 24px; font-weight: 400; }
.migration-recommendation {
  width: max-content;
  padding: 3px 7px;
  color: #bfdbfe;
  border: 1px solid #315f96;
  border-radius: 999px;
  background: #102b4d;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.migration-decision footer { margin-top: auto; padding-top: 18px; color: #8191a5; font-size: 9px; line-height: 1.5; }
.migration-decision footer span { color: #c3cfdd; font-weight: 750; }

@media (max-width: 820px) {
  .migration-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; border-radius: 18px; }
  .migration-layout { grid-template-columns: 1fr; min-height: 0; }
  .migration-intro { padding: 28px; border-right: 0; border-bottom: 1px solid rgba(147,197,253,.15); }
  .migration-orbit { width: 56px; height: 56px; }
  .migration-orbit i { left: 25px; }
  .migration-protection { margin-top: 4px; }
  .migration-decision { padding: 28px; }
}
@media (max-width: 520px) {
  .migration-dialog { width: calc(100vw - 10px); max-height: calc(100vh - 10px); border-radius: 14px; }
  .migration-intro { gap: 20px; padding: 22px 18px; }
  .migration-intro h2 { font-size: 25px; }
  .migration-protection { display: none; }
  .migration-decision { padding: 22px 18px; }
  .migration-option { grid-template-columns: 36px minmax(0, 1fr); min-height: 0; padding: 15px; }
  .migration-option-icon { width: 36px; height: 36px; }
  .migration-option > b { display: none; }
}

/* Objetivo inicial: evita misturar bases de concursos diferentes */
.study-profile-dialog {
  width: min(960px, calc(100vw - 40px));
  max-width: 960px;
  max-height: calc(100vh - 40px);
  padding: 34px;
  overflow-y: auto;
  border: 1px solid #354960;
  border-radius: 22px;
  background: #0d151f;
  box-shadow: 0 34px 110px rgba(0,0,0,.65);
}
.study-profile-dialog::backdrop { background: rgba(3,7,13,.94); backdrop-filter: blur(6px); }
.study-profile-header { max-width: 680px; }
.study-profile-header h2 { margin: 8px 0 9px; color: #f8fafc; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.035em; }
.study-profile-header p { margin: 0; color: #9cadc1; font-size: 11px; line-height: 1.6; }
.study-profile-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 25px; }
.study-profile-option {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 13px;
  min-height: 132px;
  padding: 17px;
  color: #e3edf8;
  border: 1px solid #33465c;
  border-radius: 14px;
  background: #0a121b;
  text-align: left;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.study-profile-option:hover { transform: translateY(-2px); border-color: #60a5fa; background: #101f31; }
.study-profile-option.featured { border-color: #3977bd; background: linear-gradient(145deg, rgba(37,99,235,.16), transparent 56%), #0b1521; }
.study-profile-option.custom { grid-column: 1 / -1; min-height: 106px; }
.study-profile-icon { display: grid; place-items: center; width: 43px; height: 43px; color: #dbeafe; border-radius: 12px; background: linear-gradient(145deg, #2563eb, #4f46e5); font-size: 16px; font-weight: 850; }
.study-profile-option span:nth-child(2),
.study-profile-option small,
.study-profile-option strong,
.study-profile-option em { display: block; }
.study-profile-option small { color: #7dd3fc; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.study-profile-option strong { margin: 5px 0 7px; color: #f8fafc; font-size: 14px; }
.study-profile-option em { color: #9cadbf; font-size: 10px; font-style: normal; line-height: 1.5; }
.study-profile-option > b { grid-column: 2; width: max-content; margin-top: 4px; color: #93c5fd; font-size: 9px; }
.custom-study-goal { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 10px; margin-top: 18px; padding: 16px; border: 1px solid #3a526d; border-radius: 13px; background: #0a121b; }
.custom-study-goal .field { margin: 0; }
.custom-study-goal input { width: 100%; min-height: 42px; color: #f8fafc; border: 1px solid #3c526b; border-radius: 8px; background: #070d14; }
.study-profile-feedback { min-height: 18px; margin-top: 12px; color: #fca5a5; font-size: 10px; }
.previous-study-tracks { margin-top: 16px; padding: 15px; border: 1px solid #33475e; border-radius: 13px; background: #09111a; }
.previous-study-tracks > strong { display: block; margin-bottom: 9px; color: #dbeafe; font-size: 10px; }
.previous-study-track-list { display: flex; flex-wrap: wrap; gap: 7px; }
.previous-study-track-list button { padding: 8px 10px; color: #bfdbfe; border: 1px solid #365477; border-radius: 8px; background: #102038; font-size: 9px; }
.previous-study-track-list button.current { color: #a7f3d0; border-color: #2d6b5a; background: #0c2b24; }
@media (max-width: 700px) {
  .study-profile-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 14px); padding: 21px 16px; border-radius: 15px; }
  .study-profile-options { grid-template-columns: 1fr; }
  .study-profile-option.custom { grid-column: auto; }
  .custom-study-goal { grid-template-columns: 1fr 1fr; }
  .custom-study-goal .field { grid-column: 1 / -1; }
}

/* Perfil acadêmico privado */
.profile-popover .profile-popover-primary {
  margin-bottom: 5px;
  color: #dbeafe;
  border-bottom: 1px solid #26384d;
  background: linear-gradient(90deg, rgba(37,99,235,.15), transparent);
}
.academic-profile-page { display: grid; gap: 16px; max-width: 1440px; margin: 0 auto; padding-bottom: 34px; }
.academic-profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  min-height: 214px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #31465d;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 0%, rgba(59,130,246,.24), transparent 34%),
    linear-gradient(135deg, rgba(30,64,175,.18), transparent 44%),
    #0d1722;
}
.academic-profile-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(96,165,250,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(59,130,246,.025), 0 0 0 90px rgba(59,130,246,.02);
}
.academic-profile-identity { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; min-width: 0; }
.academic-profile-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  color: #fff;
  border: 1px solid rgba(191,219,254,.36);
  border-radius: 22px;
  background: linear-gradient(145deg, #2563eb, #4f46e5);
  box-shadow: 0 18px 38px rgba(37,99,235,.26);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
}
.academic-private-badge,
.academic-live-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #a7f3d0;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.academic-private-badge::before,
.academic-live-badge::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52,211,153,.7); }
.academic-profile-identity h1 { margin: 7px 0 6px; color: #f8fafc; font-size: clamp(25px, 3vw, 39px); letter-spacing: -.045em; line-height: 1.05; }
.academic-profile-identity p { margin: 0; color: #9fb0c4; font-size: 11px; }
.academic-profile-actions { position: relative; z-index: 2; display: flex; align-self: start; gap: 8px; }
.academic-profile-score { position: relative; z-index: 1; grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(148,163,184,.17); }
.academic-profile-score small { color: #94a7bd; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.academic-profile-score strong { color: #f8fafc; font-size: 25px; }
.academic-profile-score span { color: #7f93aa; font-size: 10px; }
.academic-profile-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.academic-profile-kpis article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 17px;
  border: 1px solid #2d4055;
  border-radius: 14px;
  background: #0d161f;
}
.academic-profile-kpis article > div { min-width: 0; }
.academic-profile-kpis small,
.academic-profile-kpis strong,
.academic-profile-kpis article div span { display: block; }
.academic-profile-kpis small { color: #8ea2b8; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.academic-profile-kpis strong { margin: 3px 0 2px; color: #f8fafc; font-size: 20px; }
.academic-profile-kpis article div span { overflow: hidden; color: #8295ab; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.academic-kpi-icon { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border-radius: 11px; font-size: 15px; }
.academic-kpi-icon.coverage { color: #bfdbfe; background: #15325d; }
.academic-kpi-icon.mastery { color: #ddd6fe; background: #30255b; }
.academic-kpi-icon.retention { color: #a7f3d0; background: #123d34; }
.academic-kpi-icon.practice { color: #fde68a; background: #473618; }
.academic-profile-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.academic-profile-panel { min-width: 0; padding: 20px; border: 1px solid #2d4055; border-radius: 16px; background: #0d161f; }
.academic-profile-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.academic-profile-panel h2 { margin: 4px 0 0; color: #eef5fd; font-size: 16px; letter-spacing: -.02em; }
.academic-profile-panel header p { margin: 5px 0 0; color: #8498ae; font-size: 9px; }
.academic-current-cycle { grid-column: span 7; background: linear-gradient(140deg, rgba(37,99,235,.09), transparent 47%), #0d161f; }
.academic-consistency { grid-column: span 5; }
.academic-week-goals { grid-column: span 5; }
.academic-trajectory { grid-column: span 7; }
.academic-discipline-card { grid-column: span 6; }
.academic-live-badge { padding: 6px 9px; border: 1px solid #265b50; border-radius: 999px; background: #0d2b25; font-size: 8px; }
.academic-cycle-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.academic-cycle-facts div { padding: 12px; border: 1px solid #293c51; border-radius: 11px; background: rgba(7,13,20,.42); }
.academic-cycle-facts small,
.academic-cycle-facts strong { display: block; }
.academic-cycle-facts small { color: #8297ae; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.academic-cycle-facts strong { margin-top: 5px; color: #edf5ff; font-size: 16px; }
.academic-cycle-progress { margin-top: 17px; }
.academic-cycle-progress > span { display: flex; justify-content: space-between; color: #98aabd; font-size: 9px; }
.academic-cycle-progress > span b { color: #cbd8e7; }
.academic-cycle-progress > span em { color: #93c5fd; font-style: normal; }
.academic-cycle-progress > i,
.academic-goal-row > i { display: block; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #1d2c3d; }
.academic-cycle-progress > i b,
.academic-goal-row > i em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.academic-inline-link { display: flex; justify-content: space-between; width: 100%; margin-top: 15px; padding: 11px 0 0; color: #93c5fd; border: 0; border-top: 1px solid #24374b; background: transparent; font-size: 10px; font-weight: 750; text-align: left; }
.academic-streak { color: #f8fafc; font-size: 24px; line-height: 1; text-align: right; }
.academic-streak small { display: block; margin-top: 5px; color: #8195ac; font-size: 8px; font-weight: 650; }
.academic-activity-grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.academic-activity-grid i { aspect-ratio: 1; border: 1px solid #25384d; border-radius: 4px; background: #131f2b; }
.academic-activity-grid i.level-1 { border-color: #215c58; background: #164e4b; }
.academic-activity-grid i.level-2 { border-color: #277b71; background: #16736a; }
.academic-activity-grid i.level-3 { border-color: #38a99a; background: #1b9487; }
.academic-activity-grid i.level-4 { border-color: #6ee7d7; background: #2dd4bf; box-shadow: 0 0 7px rgba(45,212,191,.3); }
.academic-consistency-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: #8498ae; font-size: 9px; }
.academic-consistency-facts b { color: #dce9f6; }
.academic-goal-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; margin-bottom: 18px; }
.academic-goal-row span strong,
.academic-goal-row span small { display: block; }
.academic-goal-row span strong { color: #dce8f4; font-size: 10px; }
.academic-goal-row span small { margin-top: 3px; color: #8295aa; font-size: 9px; }
.academic-goal-row > b { align-self: center; color: #93c5fd; font-size: 11px; }
.academic-goal-row > i { grid-column: 1 / -1; margin-top: 3px; }
.academic-attention-summary { display: flex; gap: 8px; padding-top: 4px; }
.academic-attention-summary span { flex: 1; padding: 10px; color: #8ea1b6; border: 1px solid #293b50; border-radius: 10px; background: #0a121a; font-size: 8px; }
.academic-attention-summary b { display: block; margin-bottom: 3px; color: #f8fafc; font-size: 14px; }
.academic-track-list { position: relative; display: grid; gap: 7px; }
.academic-track-list::before { content: ""; position: absolute; left: 8px; top: 13px; bottom: 13px; width: 1px; background: #2c4968; }
.academic-track-list article { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 52px; padding: 9px 11px 9px 0; border: 1px solid transparent; border-radius: 11px; }
.academic-track-list article.current { border-color: #2c4f77; background: rgba(30,64,175,.11); }
.academic-track-marker { position: relative; z-index: 1; width: 9px; height: 9px; margin-left: 4px; border: 2px solid #64748b; border-radius: 50%; background: #0d161f; }
.academic-track-list article.current .academic-track-marker { border-color: #93c5fd; background: #2563eb; box-shadow: 0 0 9px rgba(59,130,246,.5); }
.academic-track-list article div strong,
.academic-track-list article div small { display: block; }
.academic-track-list article div strong { color: #dde9f6; font-size: 10px; }
.academic-track-list article div small { margin-top: 3px; color: #7f93aa; font-size: 8px; }
.academic-track-list article > span:not(.academic-track-marker) { color: #71869e; font-size: 8px; text-align: right; }
.academic-track-list article > span b { display: block; color: #cbd9e8; font-size: 11px; }
.academic-discipline-list { display: grid; gap: 7px; }
.academic-discipline-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 33px; align-items: center; gap: 10px; width: 100%; padding: 10px; color: inherit; border: 1px solid #283a4f; border-radius: 10px; background: #0a121a; text-align: left; }
.academic-discipline-row:hover { border-color: #4775a9; background: #101e2d; }
.academic-discipline-row span:first-child { min-width: 0; }
.academic-discipline-row strong,
.academic-discipline-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.academic-discipline-row strong { color: #dce8f5; font-size: 9px; }
.academic-discipline-row small { margin-top: 3px; color: #758aa2; font-size: 8px; }
.academic-discipline-progress { height: 5px; overflow: hidden; border-radius: 999px; background: #1d2d3e; }
.academic-discipline-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #22d3ee); }
.academic-discipline-row > b { color: #a8c9ee; font-size: 9px; text-align: right; }
.academic-empty { padding: 20px; color: #7f93aa; border: 1px dashed #304459; border-radius: 10px; font-size: 9px; line-height: 1.55; text-align: center; }
.academic-profile-privacy { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 2px 0 0; color: #7f93a9; font-size: 9px; text-align: center; }
.academic-profile-privacy span { color: #60a5fa; }
.academic-profile-privacy strong { color: #a9b9ca; }

@media (max-width: 1120px) {
  .academic-profile-kpis { grid-template-columns: repeat(2, 1fr); }
  .academic-current-cycle,
  .academic-consistency,
  .academic-week-goals,
  .academic-trajectory { grid-column: span 6; }
}
@media (max-width: 760px) {
  .academic-profile-page { gap: 11px; }
  .academic-profile-hero { grid-template-columns: 1fr; min-height: 0; padding: 20px; border-radius: 16px; }
  .academic-profile-actions { grid-row: 3; width: 100%; }
  .academic-profile-actions .button { flex: 1; }
  .academic-profile-score { grid-column: 1; flex-wrap: wrap; gap: 5px 10px; }
  .academic-profile-score span { flex-basis: 100%; }
  .academic-profile-panel { grid-column: 1 / -1; padding: 17px; }
  .academic-cycle-facts { grid-template-columns: repeat(2, 1fr); }
  .academic-discipline-card { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .academic-profile-identity { align-items: flex-start; gap: 12px; }
  .academic-profile-avatar { width: 54px; height: 54px; flex-basis: 54px; border-radius: 16px; font-size: 18px; }
  .academic-profile-identity h1 { font-size: 24px; }
  .academic-profile-identity p { line-height: 1.5; }
  .academic-profile-actions { flex-direction: column; }
  .academic-profile-actions .button { width: 100%; }
  .academic-profile-kpis { grid-template-columns: 1fr 1fr; gap: 7px; }
  .academic-profile-kpis article { display: block; padding: 13px; }
  .academic-kpi-icon { margin-bottom: 9px; }
  .academic-track-list article { grid-template-columns: 18px minmax(0, 1fr); }
  .academic-track-list article > span:not(.academic-track-marker) { display: none; }
  .academic-discipline-row { grid-template-columns: minmax(0, 1fr) 45px; }
  .academic-discipline-progress { display: none; }
  .academic-profile-privacy { align-items: flex-start; line-height: 1.5; text-align: left; }
}

/* Progresso: período livre e separação entre atividade e situação atual */
.dashboard-period-bar {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 4px 0 18px;
  padding: 13px;
  border: 1px solid #2d4056;
  border-radius: 14px;
  background: #0d161f;
}
.dashboard-period-bar label,
.dashboard-period-copy { display: grid; gap: 5px; }
.dashboard-period-bar label > span,
.dashboard-period-copy > span {
  color: #8498ae;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dashboard-period-copy { min-width: 210px; margin-right: auto; }
.dashboard-period-copy strong { color: #eef6ff; font-size: 12px; }
.dashboard-period-bar select,
.dashboard-period-bar input[type="date"] {
  min-width: 145px;
  height: 38px;
  padding: 0 10px;
  color: #eef5fd;
  border: 1px solid #3b4e66;
  border-radius: 8px;
  background: #0a121a;
  font-size: 10px;
}
.dashboard-period-shift {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #bfdbfe;
  border: 1px solid #38516e;
  border-radius: 9px;
  background: #111f2e;
  font-size: 20px;
}
.dashboard-period-shift:hover:not(:disabled) { border-color: #60a5fa; background: #172d46; }
.dashboard-period-shift:disabled { opacity: .35; cursor: not-allowed; }
.dashboard-compare-toggle {
  display: flex !important;
  align-items: center;
  align-self: center;
  gap: 7px !important;
  min-width: 165px;
  color: #afbdcc;
  font-size: 9px;
}
.dashboard-compare-toggle input { width: 15px; height: 15px; accent-color: #3b82f6; }
.dashboard-compare-toggle > span { color: #afbdcc !important; font-size: 9px !important; letter-spacing: 0 !important; text-transform: none !important; }
.dashboard-current-heading { margin-top: 5px; }
.dashboard-current-kpis { margin-bottom: 12px; }
.dashboard-detail-stack { margin-bottom: 20px; }
.dashboard-detail-body .dashboard-grid { margin: 18px 0 0; }
.dashboard-detail-body .mastery-distribution { margin-top: 18px; }
.dashboard-detail-body .discipline-bars,
.dashboard-detail-body .session-history { margin-top: 18px; }

/* Cadernos: biblioteca única para conteúdo e erros */
.notebook-editor-mobile-heading { display: flex; align-items: center; gap: 10px; }
.notebook-mobile-back {
  display: none;
  padding: 7px 9px;
  color: #bfdbfe;
  border: 1px solid #365172;
  border-radius: 8px;
  background: #102039;
  font-size: 9px;
  font-weight: 800;
}
.notebook-error-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -5px 0 13px;
}
.notebook-error-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  color: #9fb0c3;
  border: 1px solid #2d4056;
  border-radius: 999px;
  background: #0d161f;
  font-size: 8px;
}
.notebook-error-summary b { color: #eef6ff; font-size: 11px; }
.notebook-error-summary .status-ativo { color: #fecdd3; border-color: #693443; background: #29151d; }
.notebook-error-summary .status-correcao { color: #bfdbfe; border-color: #315782; background: #12243a; }
.notebook-error-summary .status-dominado { color: #a7f3d0; border-color: #28675c; background: #10251f; }
.error-library { min-height: 590px; }
.error-library .notebook-library-tools { grid-template-columns: 1fr; }
.notebook-tree-note.error-note { position: relative; padding-left: 21px; }
.notebook-tree-note.error-note::before {
  content: "";
  position: absolute;
  left: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fb7185;
}
.notebook-tree-note.error-note.status-correcao::before { background: #60a5fa; }
.notebook-tree-note.error-note.status-dominado::before { background: #34d399; }
.notebook-error-detail { background: linear-gradient(145deg, rgba(37,99,235,.045), transparent 44%), #111820; }
.notebook-error-state {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid #693443;
  border-radius: 999px;
  color: #fecdd3;
  background: #29151d;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.notebook-error-state.status-correcao { color: #bfdbfe; border-color: #315782; background: #12243a; }
.notebook-error-state.status-dominado { color: #a7f3d0; border-color: #28675c; background: #10251f; }
.notebook-error-path {
  overflow: hidden;
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notebook-error-main {
  padding: 20px;
  border: 1px solid #30445b;
  border-radius: 14px;
  background: #0b131c;
}
.notebook-error-main h2 {
  margin: 7px 0 17px;
  color: #f3f7fb;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  letter-spacing: -.02em;
}
.vaccine-box {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  color: #d8f5ef;
  border: 1px solid #28675c;
  border-radius: 10px;
  background: #102b26;
  font-size: 11px;
  line-height: 1.55;
}
.vaccine-box strong { color: #6ee7d2; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.notebook-status { color: #fecdd3; border: 1px solid #693443; background: #29151d; }
.notebook-add-vaccine {
  width: 100%;
  padding: 12px;
  color: #8fdcca;
  border: 1px dashed #32695e;
  border-radius: 10px;
  background: #0d211e;
  font-size: 9px;
  font-weight: 750;
}
.notebook-error-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid #2d4056;
  border-radius: 12px;
  background: #0c141d;
}
.notebook-error-progress span,
.notebook-error-progress strong { display: block; }
.notebook-error-progress span { color: #8296ad; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.notebook-error-progress strong { margin-top: 4px; color: #e2ecf7; font-size: 11px; }
.notebook-error-progress p { grid-column: 1 / -1; margin: 2px 0 0; color: #8fa1b6; font-size: 9px; line-height: 1.5; }
.notebook-correction-steps { display: flex; gap: 6px; }
.notebook-correction-steps i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #8295aa;
  border: 1px solid #34475d;
  border-radius: 50%;
  background: #101b27;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}
.notebook-correction-steps i.complete { color: #d1fae5; border-color: #2c7a68; background: #135143; }
.notebook-error-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.notebook-error-facts span { padding: 11px; border: 1px solid #2b3d51; border-radius: 10px; background: #0b131b; }
.notebook-error-facts small,
.notebook-error-facts strong { display: block; }
.notebook-error-facts small { color: #7e92a9; font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.notebook-error-facts strong { margin-top: 4px; color: #dce7f2; font-size: 9px; text-transform: capitalize; }
.notebook-error-complement { margin-top: 12px; overflow: hidden; border: 1px solid #2d4056; border-radius: 12px; background: #0b131b; }
.notebook-error-complement summary { padding: 12px 14px; color: #dbe7f3; cursor: pointer; font-size: 10px; font-weight: 800; }
.notebook-error-complement p { display: grid; gap: 4px; margin: 0; padding: 10px 14px; border-top: 1px solid #26374a; }
.notebook-error-complement p strong { color: #93c5fd; font-size: 8px; text-transform: uppercase; }
.notebook-error-complement p span { color: #b9c6d5; font-size: 10px; line-height: 1.5; }
.notebook-error-primary-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #29394c; }

@media (max-width: 900px) {
  .dashboard-period-bar { flex-wrap: wrap; }
  .dashboard-period-copy { flex: 1 1 calc(100% - 50px); }
  .dashboard-compare-toggle { margin-left: auto; }
}
@media (max-width: 720px) {
  .dashboard-period-bar { align-items: end; }
  .dashboard-period-copy { order: -2; min-width: 0; }
  .dashboard-period-bar .dashboard-period-shift:first-of-type { order: -1; }
  .dashboard-period-preset { flex: 1 1 calc(100% - 46px); }
  .dashboard-period-bar label:not(.dashboard-period-preset):not(.dashboard-compare-toggle) { flex: 1 1 130px; }
  .dashboard-compare-toggle { flex: 1 1 100%; margin: 3px 0 0; }
  .dashboard-priority-grid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 5px; }
  .dashboard-action-card { min-width: min(285px, 82vw); scroll-snap-align: start; }
  .dashboard-kpis,
  .dashboard-current-kpis { grid-template-columns: 1fr 1fr; }
  .dashboard-kpis .stat-card,
  .dashboard-current-kpis .stat-card { min-width: 0; }
  .dashboard-kpis .stat-value,
  .dashboard-current-kpis .stat-value { display: block; }
  .dashboard-kpis .stat-value span,
  .dashboard-current-kpis .stat-value span { display: block; margin: 4px 0 0; white-space: normal; }
  .notebook-library:not(.mobile-detail) .notebook-editor { display: none; }
  .notebook-library.mobile-detail .notebook-library-sidebar { display: none; }
  .notebook-mobile-back { display: inline-flex; }
  .notebook-editor-mobile-heading { width: 100%; justify-content: space-between; }
  .notebook-error-facts { grid-template-columns: 1fr 1fr; }
  .notebook-error-primary-actions { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .dashboard-period-copy strong { font-size: 11px; }
  .dashboard-period-bar select,
  .dashboard-period-bar input[type="date"] { width: 100%; min-width: 0; }
  .dashboard-kpis,
  .dashboard-current-kpis { gap: 7px; }
  .dashboard-kpis .stat-card,
  .dashboard-current-kpis .stat-card { padding: 13px; }
  .dashboard-kpis .stat-value strong,
  .dashboard-current-kpis .stat-value strong { font-size: 21px; }
  .notebook-error-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .notebook-error-summary span { justify-content: center; border-radius: 9px; }
  .notebook-error-main { padding: 16px; }
  .notebook-error-main h2 { font-size: 18px; }
}

/* Centro de análise inspirado em painéis de mídia: rápido, legível e sem controles nativos soltos */
.dashboard-control-center {
  position: relative;
  z-index: 3;
  margin: 5px 0 20px;
  border: 1px solid #2b3e53;
  border-radius: 16px;
  background: linear-gradient(180deg, #111b27, #0c151f);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}
.dashboard-control-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 11px 13px;
}
.dashboard-control-center .dashboard-period-copy {
  min-width: 210px;
  margin-right: auto;
  padding: 0 5px;
}
.dashboard-control-center .dashboard-period-copy span { font-size: 8px; }
.dashboard-control-center .dashboard-period-copy strong { font-size: 12px; line-height: 1.35; }
.dashboard-quick-ranges,
.dashboard-chart-metrics {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #2c4056;
  border-radius: 11px;
  background: #09121b;
}
.dashboard-range-chip,
.dashboard-chart-metrics button {
  height: 34px;
  padding: 0 11px;
  color: #9eb0c4;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.dashboard-range-chip:hover,
.dashboard-chart-metrics button:hover { color: #e5effa; background: #162537; }
.dashboard-range-chip.active,
.dashboard-chart-metrics button.active { color: #eff6ff; background: #235fb8; box-shadow: 0 4px 12px rgba(37, 99, 235, .24); }
.dashboard-date-trigger,
.dashboard-compare-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 10px;
  color: #d9e4ef;
  border: 1px solid #344a63;
  border-radius: 10px;
  background: #0b141e;
  text-align: left;
}
.dashboard-date-trigger:hover,
.dashboard-compare-button:hover,
.dashboard-date-trigger.active,
.dashboard-compare-button.active { border-color: #4d83c5; background: #10233a; }
.dashboard-date-trigger > span:nth-child(2),
.dashboard-compare-button > span:nth-child(2) { display: grid; gap: 2px; }
.dashboard-date-trigger small,
.dashboard-compare-button small { color: #8195aa; font-size: 7px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.dashboard-date-trigger strong,
.dashboard-compare-button strong { color: #e5edf6; font-size: 9px; white-space: nowrap; }
.dashboard-control-icon { color: #7db8ff; font-size: 16px; }
.dashboard-date-trigger > b { margin-left: 3px; color: #7e92a9; font-size: 10px; }
.dashboard-compare-button > span:first-child { color: #7db8ff; font-size: 16px; }
.dashboard-control-nav { display: inline-flex; gap: 4px; }
.dashboard-control-nav button {
  display: grid;
  width: 34px;
  height: 44px;
  place-items: center;
  color: #c8d7e7;
  border: 1px solid #344a63;
  border-radius: 9px;
  background: #0b141e;
  font-size: 18px;
}
.dashboard-control-nav button:hover:not(:disabled) { border-color: #4d83c5; background: #15263a; }
.dashboard-control-nav button:disabled { opacity: .3; cursor: not-allowed; }
.dashboard-date-editor {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(145px, .75fr) minmax(145px, .75fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #293c51;
  background: #0a131c;
}
.dashboard-date-editor label { display: grid; gap: 6px; }
.dashboard-date-editor label > span { color: #8ea2b8; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.dashboard-date-editor select,
.dashboard-date-editor input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  color: #edf5fd;
  color-scheme: dark;
  border: 1px solid #3b5069;
  border-radius: 9px;
  background: #101b27;
  font-size: 10px;
}
.dashboard-date-editor .button { height: 40px; }

.dashboard-trend-panel {
  margin: 0 0 22px;
  padding: 18px;
  overflow: hidden;
  border-color: #2b4057;
  background: linear-gradient(145deg, rgba(37, 99, 235, .06), transparent 45%), #0d161f;
}
.dashboard-chart-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dashboard-chart-toolbar h2 { margin: 5px 0 3px; color: #eef5fc; font-size: 17px; }
.dashboard-chart-toolbar p { margin: 0; color: #879bb0; font-size: 9px; }
.dashboard-chart-scroll { margin-top: 18px; overflow-x: auto; }
.dashboard-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--chart-columns), minmax(30px, 1fr));
  gap: clamp(4px, .8vw, 10px);
  min-width: min(100%, calc(var(--chart-columns) * 38px));
  height: 235px;
  padding: 13px 6px 0;
  border-bottom: 1px solid #31455c;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 54px, rgba(69, 91, 116, .22) 55px);
}
.dashboard-chart-column {
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr) 28px;
  min-width: 0;
  text-align: center;
}
.dashboard-chart-column > strong { overflow: hidden; color: #91c2ff; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-chart-column > div { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.dashboard-chart-column i {
  display: block;
  width: min(76%, 28px);
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #63b3ff, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .22);
  transition: height .2s ease;
}
.dashboard-chart-column > span { align-self: end; overflow: hidden; padding-top: 8px; color: #879bb0; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-chart-column > span.muted { color: transparent; }
.dashboard-chart-empty {
  position: absolute;
  inset: 52px 20px 38px;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.dashboard-chart-empty strong { color: #dce8f4; font-size: 12px; }
.dashboard-chart-empty span { margin-top: 5px; color: #8498ad; font-size: 9px; }
.notebook-tree-note.error-note > span { display: grid; min-width: 0; gap: 2px; text-align: left; }
.notebook-tree-note.error-note > span > small { overflow: hidden; color: #7f95ab; font-size: 7px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1180px) {
  .dashboard-control-main { flex-wrap: wrap; }
  .dashboard-control-center .dashboard-period-copy { flex: 1 1 260px; }
  .dashboard-quick-ranges { order: 3; flex: 1 1 100%; overflow-x: auto; }
  .dashboard-range-chip { flex: 1 0 auto; }
}
@media (max-width: 720px) {
  .dashboard-control-main { gap: 8px; padding: 10px; }
  .dashboard-control-center .dashboard-period-copy { flex: 1 1 calc(100% - 80px); min-width: 0; }
  .dashboard-control-nav { margin-left: auto; }
  .dashboard-date-trigger,
  .dashboard-compare-button { flex: 1 1 calc(50% - 5px); justify-content: center; }
  .dashboard-date-editor { grid-template-columns: 1fr 1fr; }
  .dashboard-date-editor label:first-child,
  .dashboard-date-editor .button { grid-column: 1 / -1; }
  .dashboard-chart-toolbar { display: grid; }
  .dashboard-chart-metrics { width: 100%; }
  .dashboard-chart-metrics button { flex: 1; }
  .dashboard-trend-panel { padding: 14px; }
  .dashboard-chart { min-width: max(620px, calc(var(--chart-columns) * 38px)); }
}
@media (max-width: 460px) {
  .dashboard-date-trigger strong { font-size: 8px; }
  .dashboard-compare-button { flex: 0 0 122px; }
  .dashboard-date-editor { grid-template-columns: 1fr; }
  .dashboard-date-editor label,
  .dashboard-date-editor label:first-child,
  .dashboard-date-editor .button { grid-column: 1; }
}

/* Base de estudos: catálogo, atualizações e prioridades em um espaço de trabalho único */
.data-dialog {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.data-dialog > .dialog-header { position: sticky; z-index: 8; top: 0; margin: -1px -1px 0; padding: 2px 2px 15px; background: #111923; }
.data-dialog > .dialog-header p { max-width: 720px; margin: 5px 0 0; color: #91a3b8; font-size: 10px; line-height: 1.45; }
.catalog-manager { margin-bottom: 0; padding: 20px; }
.catalog-manager .catalog-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.catalog-workspace-tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 14px;
  padding: 4px;
  border: 1px solid #2c4056;
  border-radius: 12px;
  background: #09121b;
}
.catalog-workspace-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 15px;
  color: #9cafc4;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}
.catalog-workspace-tabs button:hover { color: #edf5ff; background: #142336; }
.catalog-workspace-tabs button.active { color: #f5f9ff; background: #204f8f; box-shadow: 0 5px 14px rgba(32, 83, 150, .24); }
.catalog-workspace-tabs button b {
  min-width: 19px;
  padding: 3px 5px;
  color: #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: 8px;
  text-align: center;
}
.catalog-workspace-panel { display: none; min-height: 390px; padding: 15px; border: 1px solid #2b3d52; border-radius: 13px; background: #0e1721; }
.catalog-workspace-panel.active { display: block; }
.catalog-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.catalog-search {
  display: flex;
  align-items: center;
  flex: 1 1 360px;
  gap: 8px;
  min-height: 43px;
  padding: 0 12px;
  color: #75b7ff;
  border: 1px solid #3a506a;
  border-radius: 10px;
  background: #09121b;
}
.catalog-search:focus-within { border-color: #5ba5f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.catalog-search input { width: 100%; color: #edf5fd; border: 0; outline: 0; background: transparent; font-size: 11px; }
.catalog-search input::placeholder { color: #71859b; }
.catalog-scope-filter { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid #2c4056; border-radius: 10px; background: #09121b; }
.catalog-scope-filter button {
  min-height: 33px;
  padding: 0 11px;
  color: #91a4ba;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.catalog-scope-filter button.active { color: #eff6ff; background: #1c3658; }
.catalog-result-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.catalog-result-heading > div { display: grid; gap: 3px; }
.catalog-result-heading strong { color: #eef5fd; font-size: 12px; }
.catalog-result-heading span:not(.count-pill) { color: #8ea1b7; font-size: 9px; line-height: 1.4; }
.catalog-workspace-panel .catalog-discipline-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 52vh;
  padding: 0 4px 0 0;
}
.catalog-workspace-panel .catalog-discipline {
  min-height: 68px;
  padding: 11px;
  border-color: #30445b;
  background: #111b27;
}
.catalog-discipline strong em {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 6px;
  color: #a7f3d0;
  border-radius: 999px;
  background: #17453a;
  font-size: 7px;
  font-style: normal;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.catalog-discipline.personal { border-color: #3e5570; background: linear-gradient(145deg, #142033, #101923); }
.catalog-discipline.personal .catalog-discipline-mark { color: #ddd6fe; background: #413168; }
.catalog-discipline strong em.personal { color: #ddd6fe; background: #3b2d61; }
.catalog-filter-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 30px;
  color: #8397ad;
  text-align: center;
}
.catalog-filter-empty > span { color: #60a5fa; font-size: 28px; }
.catalog-filter-empty strong { margin-top: 8px; color: #e8f0f8; font-size: 14px; }
.catalog-filter-empty p { max-width: 420px; margin: 5px 0 13px; font-size: 10px; line-height: 1.5; }
.catalog-workspace-panel .catalog-update-list { max-height: 52vh; }
.catalog-safety-note { margin-bottom: 0; }

.weight-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  margin-bottom: 15px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid #2b3d51;
}
.weight-intro h3 { margin: 5px 0; color: #f1f6fb; font-size: 17px; }
.weight-intro p { max-width: 670px; margin: 0; color: #91a4ba; font-size: 10px; line-height: 1.5; }
.weight-legend { display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 7px 14px; }
.weight-legend span { display: flex; align-items: center; gap: 6px; color: #a7b6c7; font-size: 8px; white-space: nowrap; }
.weight-legend b { width: 8px; height: 8px; border-radius: 50%; background: #60a5fa; }
.weight-legend .very-high { background: #fb7185; }
.weight-legend .high { background: #fbbf24; }
.weight-legend .medium { background: #60a5fa; }
.weight-legend .low { background: #34d399; }
.discipline-weight-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 51vh;
  overflow: auto;
  padding-right: 4px;
}
.discipline-weight-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #30445b;
  border-left: 3px solid #60a5fa;
  border-radius: 11px;
  background: #101a25;
}
.discipline-weight-card.weight-muito_alto { border-left-color: #fb7185; }
.discipline-weight-card.weight-alto { border-left-color: #fbbf24; }
.discipline-weight-card.weight-baixo { border-left-color: #34d399; }
.discipline-weight-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.discipline-weight-card > header > span { display: grid; min-width: 0; gap: 3px; }
.discipline-weight-card > header strong { overflow: hidden; color: #edf4fb; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.discipline-weight-card > header small { overflow: hidden; color: #7f93aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.discipline-weight-card > header > b { flex: none; padding: 5px 7px; color: #dbeafe; border-radius: 999px; background: #173355; font-size: 8px; }
.discipline-weight-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.discipline-weight-choices label { min-width: 0; cursor: pointer; }
.discipline-weight-choices input { position: absolute; opacity: 0; pointer-events: none; }
.discipline-weight-choices label > span {
  display: grid;
  place-items: center;
  min-height: 45px;
  padding: 5px 3px;
  color: #8296ac;
  border: 1px solid #2d4056;
  border-radius: 8px;
  background: #0b141e;
  text-align: center;
}
.discipline-weight-choices label:hover > span { color: #dbe7f3; border-color: #48627f; }
.discipline-weight-choices label.selected > span { color: #eff6ff; border-color: #4d87c9; background: #15345a; box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .15); }
.discipline-weight-choices strong { overflow: hidden; max-width: 100%; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.discipline-weight-choices small { margin-top: 2px; color: #7990a8; font-size: 7px; }

/* Operações de dados ficam isoladas em Configurações > Administração */
.settings-content { max-height: min(680px, calc(100vh - 50px)); overflow: auto; }
.settings-admin-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 13px;
  padding: 12px;
  color: #c7d4e2;
  border: 1px solid #3c526c;
  border-radius: 10px;
  background: #0d1824;
}
.settings-admin-notice > span { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; color: #bfdbfe; border-radius: 8px; background: #1a3b64; font-weight: 900; }
.settings-admin-notice strong { color: #edf4fb; font-size: 10px; }
.settings-admin-notice p { margin: 3px 0 0; color: #91a3b8; font-size: 9px; line-height: 1.45; }
.settings-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-admin-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  color: inherit;
  border: 1px solid #30445b;
  border-radius: 11px;
  background: #0e1823;
  text-align: left;
}
.settings-admin-card:hover { border-color: #52739a; background: #132135; }
.settings-admin-card.warning { border-color: #66532e; background: #1c190f; }
.settings-admin-card.danger { border-color: #693443; background: #21131a; }
.settings-admin-icon { display: grid; width: 32px; height: 32px; place-items: center; color: #bfdbfe; border-radius: 9px; background: #1a3a62; font-size: 15px; }
.settings-admin-card.warning .settings-admin-icon { color: #fde68a; background: #594619; }
.settings-admin-card.danger .settings-admin-icon { color: #fecdd3; background: #5f2635; }
.settings-admin-card > span:last-child { display: grid; gap: 4px; }
.settings-admin-card strong { color: #ecf3fa; font-size: 10px; }
.settings-admin-card small { color: #91a3b8; font-size: 8px; line-height: 1.4; }
.settings-trash-section { margin-top: 17px; padding-top: 15px; border-top: 1px solid #2b3b50; }
.settings-trash-section > p { margin: 5px 0 10px; color: #8ea1b7; font-size: 9px; }

@media (max-width: 880px) {
  .catalog-workspace-panel .catalog-discipline-list,
  .discipline-weight-settings { grid-template-columns: 1fr; }
  .weight-intro { grid-template-columns: 1fr; }
  .weight-legend { grid-template-columns: repeat(4, auto); justify-content: start; overflow-x: auto; }
}
@media (max-width: 640px) {
  .data-dialog { width: calc(100vw - 8px); max-height: calc(100vh - 8px); padding: 12px; }
  .catalog-manager { padding: 11px; }
  .catalog-workspace-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .catalog-workspace-tabs button { min-width: 0; padding: 0 5px; font-size: 8px; }
  .catalog-workspace-tabs button > span { display: none; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .catalog-search { flex-basis: auto; }
  .catalog-scope-filter { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .catalog-scope-filter button { min-width: 0; }
  .catalog-workspace-panel { min-height: 0; padding: 10px; }
  .catalog-workspace-panel .catalog-discipline-list,
  .catalog-workspace-panel .catalog-update-list,
  .discipline-weight-settings { max-height: none; }
  .catalog-result-heading { align-items: flex-start; }
  .catalog-manager .catalog-summary { grid-template-columns: 1fr 1fr; overflow: visible; }
  .catalog-summary > div { min-width: 0; }
  .weight-legend { grid-template-columns: 1fr 1fr; }
  .discipline-weight-choices { grid-template-columns: repeat(3, 1fr); }
  .settings-admin-grid { grid-template-columns: 1fr; }
}

/* 2026-07: fluxos de execução, planejamento, revisões e calendário */
.catalog-personal-actions { display: flex; align-items: center; gap: 6px; }
.catalog-personal-actions .danger-text { color: #fda4af; border-color: #653140; }
.catalog-personal-actions .danger-text:hover { color: #fff1f2; background: #431b27; border-color: #a9465f; }

.today-focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 14px;
  margin-bottom: 14px;
}
.today-primary-focus,
.today-route-queue {
  min-width: 0;
  border: 1px solid #354b65;
  border-radius: 16px;
  background: #0f1924;
}
.today-primary-focus {
  position: relative;
  display: flex;
  min-height: 285px;
  padding: 26px;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}
.today-primary-focus::after {
  position: absolute;
  width: 260px;
  height: 260px;
  right: -100px;
  top: -120px;
  content: "";
  border-radius: 50%;
  background: rgba(48, 112, 255, .17);
  filter: blur(2px);
  pointer-events: none;
}
.today-focus-kicker { display: flex; width: 100%; justify-content: space-between; gap: 10px; color: #70a9ff; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.today-focus-kicker b { color: #b8c7d9; letter-spacing: 0; text-transform: none; }
.today-primary-focus h2 { max-width: 780px; margin: 36px 0 8px; color: #f7fbff; font-size: clamp(24px, 2.5vw, 36px); line-height: 1.08; }
.today-primary-focus > p { max-width: 760px; margin: 0 0 16px; color: #b9c8d9; font-size: 13px; line-height: 1.6; }
.today-primary-focus details { width: min(100%, 760px); margin: 0 0 18px; color: #a9bdd3; font-size: 11px; }
.today-primary-focus details summary { color: #d5e3f3; cursor: pointer; font-weight: 750; }
.today-primary-focus details span { display: block; margin-top: 8px; line-height: 1.5; }
.today-primary-focus > .button { min-width: 170px; margin-top: auto; }
.today-route-queue { padding: 18px; }
.today-route-queue .panel-header { padding: 0 0 13px; border-bottom: 1px solid #2b4057; }
.today-lesson-queue { display: grid; margin-top: 5px; }
.today-lesson-queue > button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 14px;
  gap: 9px;
  align-items: center;
  min-height: 57px;
  padding: 9px 5px;
  color: #edf5ff;
  border: 0;
  border-bottom: 1px solid #27394d;
  background: transparent;
  text-align: left;
}
.today-lesson-queue > button:hover { background: #142236; }
.today-lesson-queue button > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.today-lesson-queue strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.today-lesson-queue small { color: #9fb2c7; font-size: 10px; }
.today-lesson-queue button > b { color: #77adff; font-size: 18px; }
.today-lesson-state { display: grid; width: 22px; height: 22px; place-items: center; color: #8db8ff; border-radius: 50%; background: #17345c; }
.today-lesson-state.concluida { color: #65e6c2; background: #12483f; }
.today-plan-link { width: 100%; margin-top: 12px; }

.weekly-strategy-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .7fr) minmax(150px, .7fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 14px 18px;
  border-bottom: 1px solid #30445a;
  background: #0d1722;
}
.weekly-strategy-strip > div { display: grid; align-content: center; gap: 4px; min-width: 0; }
.weekly-strategy-strip span { color: #82a2c4; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.weekly-strategy-strip strong { color: #eef6ff; font-size: 12px; }
.weekly-strategy-strip small { overflow: hidden; color: #a8bacd; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.weekly-strategy-strip i { height: 4px; margin-top: 3px; overflow: hidden; border-radius: 10px; background: #263a50; }
.weekly-strategy-strip i em { display: block; height: 100%; border-radius: inherit; background: #4f8cff; }
.weekly-strategy-strip .button { align-self: center; }
.weekly-agenda-list { display: grid; padding: 8px 18px 14px; }
.weekly-agenda-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(120px, auto);
  gap: 13px;
  align-items: center;
  min-height: 82px;
  padding: 12px 0;
  border-bottom: 1px solid #2b3e53;
}
.weekly-agenda-row:last-child { border-bottom: 0; }
.weekly-order { display: grid; width: 30px; height: 30px; place-items: center; color: #b9d3ff; border: 1px solid #34577f; border-radius: 10px; background: #142a47; font-size: 11px; font-weight: 850; }
.weekly-agenda-row.concluida .weekly-order { color: #68e4c1; border-color: #277565; background: #103d36; }
.weekly-agenda-copy { display: grid; gap: 4px; min-width: 0; }
.weekly-agenda-copy > span { color: #69a5ff; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.weekly-agenda-copy strong { color: #f1f7ff; font-size: 13px; }
.weekly-agenda-copy small { overflow: hidden; color: #a8bbcf; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.weekly-agenda-copy details { color: #a9bdd2; font-size: 10px; }
.weekly-agenda-copy summary { width: fit-content; color: #caddf2; cursor: pointer; }
.weekly-agenda-copy details p { margin: 5px 0 0; }
.weekly-agenda-meta { display: grid; gap: 7px; justify-items: end; }
.weekly-agenda-meta small { color: #92a7bd; font-size: 9px; }

.review-future-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #2e4258;
  background: #0d1722;
}
.review-future-toolbar label { display: flex; flex: 1 1 340px; max-width: 520px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #3a526d; border-radius: 10px; background: #101d2a; }
.review-future-toolbar input { width: 100%; min-height: 36px; color: #f2f7fd; border: 0; outline: 0; background: transparent; }
.review-future-toolbar input::placeholder { color: #8296ac; opacity: 1; }
.search-glyph { color: #8fb9f8; font-size: 18px; }
.review-horizon, .calendar-view-switch { display: inline-flex; padding: 3px; border: 1px solid #354b65; border-radius: 10px; background: #0a141e; }
.review-horizon button, .calendar-view-switch button { min-height: 30px; padding: 0 12px; color: #aebfd1; border: 0; border-radius: 7px; background: transparent; font-size: 9px; font-weight: 800; }
.review-horizon button.active, .calendar-view-switch button.active { color: #fff; background: #245ec7; box-shadow: 0 4px 12px rgba(18, 84, 197, .28); }
.review-future-groups { display: grid; }
.review-future-group { border-bottom: 1px solid #2d4157; }
.review-future-group:last-child { border-bottom: 0; }
.review-future-group > summary { display: flex; min-height: 58px; padding: 11px 17px; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; list-style: none; }
.review-future-group > summary::-webkit-details-marker { display: none; }
.review-future-group > summary > span { display: grid; gap: 4px; }
.review-future-group > summary strong { color: #ecf5ff; font-size: 11px; }
.review-future-group > summary small { color: #92a8bf; font-size: 8px; }
.review-future-group > summary b { display: grid; min-width: 28px; height: 24px; padding: 0 7px; place-items: center; color: #b9d5ff; border-radius: 8px; background: #18345a; font-size: 9px; }
.review-future-group[open] > summary { background: #111f2d; }
.review-group-overflow { padding: 12px 16px; color: #abc0d6; background: #101c28; font-size: 9px; text-align: center; }

.calendar-month-toolbar { grid-template-columns: minmax(250px, auto) 1fr auto; }
.calendar-month { overflow-x: auto; border: 1px solid #33485f; border-radius: 14px; background: #0b141e; }
.calendar-month-weekdays, .calendar-month-grid { display: grid; min-width: 840px; grid-template-columns: repeat(7, minmax(110px, 1fr)); }
.calendar-month-weekdays { border-bottom: 1px solid #33485f; background: #101c28; }
.calendar-month-weekdays span { padding: 10px 12px; color: #8ea5bd; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.calendar-month-day { min-height: 128px; padding: 7px; border-right: 1px solid #283c51; border-bottom: 1px solid #283c51; background: #0d1721; }
.calendar-month-day:nth-child(7n) { border-right: 0; }
.calendar-month-day.outside { opacity: .42; background: #09121a; }
.calendar-month-day.today { box-shadow: inset 0 0 0 2px #4f8cff; background: #10223a; }
.calendar-month-day > header { display: flex; height: 27px; align-items: center; justify-content: space-between; }
.calendar-month-day > header button { display: grid; width: 25px; height: 25px; place-items: center; color: #dceaff; border: 0; border-radius: 8px; background: transparent; font-size: 10px; font-weight: 850; }
.calendar-month-day > header button:hover { background: #1c3a61; }
.calendar-month-day > header span { display: grid; min-width: 20px; height: 18px; padding: 0 5px; place-items: center; color: #c5dcff; border-radius: 7px; background: #193961; font-size: 8px; font-weight: 800; }
.calendar-month-day > div { display: grid; gap: 4px; }
.calendar-month-event { display: flex; min-width: 0; min-height: 23px; padding: 4px 6px; align-items: center; gap: 5px; color: #d9e8f7; border: 1px solid #29425f; border-radius: 6px; background: #122338; text-align: left; }
.calendar-month-event:hover { border-color: #5687c7; background: #182e49; }
.calendar-month-event i { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #5d9cff; }
.calendar-month-event.done { opacity: .65; }
.calendar-month-event.done i { background: #45d7b0; }
.calendar-month-event span { min-width: 0; overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-month-event strong { color: #8fbaff; }
.calendar-month-more { padding: 3px 6px; color: #8fbaff; border: 0; background: transparent; font-size: 7px; text-align: left; }

@media (max-width: 1100px) {
  .today-focus-layout { grid-template-columns: 1fr; }
  .today-primary-focus { min-height: 240px; }
  .weekly-strategy-strip { grid-template-columns: 1fr 1fr; }
  .weekly-strategy-strip > div:first-child { grid-column: 1 / -1; }
  .calendar-month-toolbar { grid-template-columns: 1fr auto; }
  .calendar-month-toolbar .calendar-week-summary { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 700px) {
  .catalog-personal-actions { align-items: stretch; flex-direction: column; }
  .today-primary-focus { min-height: 0; padding: 20px; }
  .today-primary-focus h2 { margin-top: 26px; font-size: 24px; }
  .today-route-queue { padding: 14px; }
  .operational-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .operational-stats .stat-card { min-height: 92px; padding: 15px; }
  .operational-stats .stat-value strong { font-size: 26px; white-space: nowrap; }
  .weekly-summary-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .weekly-summary-stats .stat-card { min-height: 92px; padding: 14px; }
  .weekly-summary-stats .stat-value strong { font-size: 25px; white-space: nowrap; }
  .weekly-strategy-strip { grid-template-columns: 1fr; padding: 13px; }
  .weekly-strategy-strip > div:first-child { grid-column: auto; }
  .weekly-agenda-list { padding: 6px 12px 12px; }
  .weekly-agenda-row { grid-template-columns: 30px minmax(0, 1fr); }
  .weekly-agenda-meta { grid-column: 2; grid-row: 2; justify-items: stretch; }
  .weekly-agenda-copy small { white-space: normal; }
  .review-future-toolbar { align-items: stretch; flex-direction: column; }
  .review-future-toolbar label { flex-basis: auto; max-width: none; }
  .review-horizon { display: grid; grid-template-columns: repeat(4, 1fr); }
  .review-horizon button { padding: 0 7px; }
  .calendar-month-toolbar { grid-template-columns: 1fr; }
  .calendar-month-toolbar .calendar-week-summary { grid-column: auto; grid-row: auto; }
  .calendar-view-switch { width: 100%; }
  .calendar-view-switch button { flex: 1; }
  .calendar-month { overflow-x: hidden; }
  .calendar-month-weekdays,
  .calendar-month-grid { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .calendar-month-weekdays span { padding: 8px 2px; font-size: 7px; text-align: center; }
  .calendar-month-day { min-height: 72px; padding: 3px; }
  .calendar-month-day > header { height: 23px; }
  .calendar-month-day > header button { width: 22px; height: 22px; font-size: 8px; }
  .calendar-month-day > header span { min-width: 15px; height: 15px; padding: 0 3px; font-size: 6px; }
  .calendar-month-event { min-height: 5px; padding: 0; border: 0; background: transparent; }
  .calendar-month-event span { display: none; }
  .calendar-month-event i { width: 100%; height: 3px; flex-basis: auto; border-radius: 3px; }
  .calendar-month-more { overflow: hidden; padding: 1px; font-size: 6px; text-align: center; white-space: nowrap; }
}

/* Cadernos: biblioteca para organizar, modo de escrita para produzir */
.notebook-page { min-width: 0; }
.notebook-command-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(190px, 240px) auto auto;
  gap: 9px;
  align-items: center;
  margin: -3px 0 13px;
  padding: 10px;
  border: 1px solid #354a62;
  border-radius: 14px;
  background: #0e1823;
}
.notebook-command-search,
.notebook-command-filter {
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #3a516b;
  border-radius: 10px;
  background: #101d2a;
}
.notebook-command-search:focus-within,
.notebook-command-filter:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .1); }
.notebook-command-search > span { color: #8eb9fa; font-size: 20px; }
.notebook-command-search input,
.notebook-command-filter select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  color: #eef6ff;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}
.notebook-command-search input::placeholder { color: #8498ae; opacity: 1; }
.notebook-command-filter > span { flex: 0 0 auto; color: #8398af; font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.error-command-bar { grid-template-columns: minmax(260px, 1fr) minmax(160px, 210px) minmax(125px, 155px) auto auto; }
.notebook-library-heading {
  display: flex;
  min-height: 61px;
  padding: 12px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #2e4055;
}
.notebook-library-heading > span { display: grid; gap: 3px; min-width: 0; }
.notebook-library-heading strong { color: #edf5fe; font-size: 11px; }
.notebook-library-heading small { color: #8ea2b8; font-size: 8px; }
.notebook-library-heading > b { display: grid; min-width: 27px; height: 24px; padding: 0 7px; place-items: center; color: #c7ddff; border-radius: 8px; background: #19365c; font-size: 9px; }
.notebook-editor-organization {
  margin: 14px 0 18px;
  overflow: hidden;
  border: 1px solid #30455c;
  border-radius: 11px;
  background: #0d1721;
}
.notebook-editor-organization > summary {
  display: flex;
  min-height: 54px;
  padding: 10px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.notebook-editor-organization > summary::-webkit-details-marker { display: none; }
.notebook-editor-organization > summary > span { display: grid; gap: 4px; min-width: 0; }
.notebook-editor-organization > summary strong { color: #dce9f7; font-size: 10px; }
.notebook-editor-organization > summary small { overflow: hidden; color: #8fbafa; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.notebook-editor-organization > summary > b { color: #a9bfd5; font-size: 9px; }
.notebook-editor-organization[open] > summary { border-bottom: 1px solid #30455c; background: #111f2d; }
.notebook-editor-organization .notebook-editor-organize { margin: 0; padding: 13px 13px 8px; }
.notebook-editor-organization > p { margin: 0; padding: 0 13px 13px; color: #8fa4ba; font-size: 9px; line-height: 1.45; }
.notebook-rich-editor {
  min-height: 430px;
  padding: 24px 26px;
  color: #f3f7fb;
  background: #0b141d;
  font-size: 15px;
  line-height: 1.78;
}
.notebook-format-toolbar { position: sticky; top: -1px; z-index: 3; }
.notebook-writing-toggle { color: #bfdbfe !important; border-color: #3b5f8d !important; background: #142943 !important; }

.notebook-page.writing-mode {
  min-height: calc(100vh - 112px);
  margin: -10px -4px 0;
}
.notebook-page.writing-mode .notebook-page-heading,
.notebook-page.writing-mode .notebook-section-tabs,
.notebook-page.writing-mode .notebook-command-bar,
.notebook-page.writing-mode .notebook-library-sidebar { display: none; }
.notebook-page.writing-mode .notebook-library {
  display: block;
  min-height: calc(100vh - 112px);
  border: 0;
  border-radius: 0;
  background: #0b131c;
}
.notebook-page.writing-mode .notebook-editor {
  width: min(100%, 1080px);
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  padding: 22px clamp(18px, 6vw, 72px) 35px;
  background: #0e1721;
}
.notebook-page.writing-mode .notebook-editor-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -22px calc(clamp(18px, 6vw, 72px) * -1) 22px;
  padding: 13px clamp(18px, 6vw, 72px);
  border-color: #30445b;
  background: rgba(12, 21, 31, .96);
  backdrop-filter: blur(12px);
}
.notebook-page.writing-mode .notebook-editor-title input { padding-top: 13px; font-size: clamp(26px, 3vw, 38px); }
.notebook-page.writing-mode .notebook-editor-organization { margin: 12px 0 20px; }
.notebook-page.writing-mode .notebook-rich-editor {
  min-height: calc(100vh - 350px);
  padding: 34px clamp(22px, 5vw, 58px);
  border-color: #334b65;
  background: #0a131c;
  font-size: 16px;
  line-height: 1.85;
}

@media (max-width: 1050px) {
  .notebook-command-bar { grid-template-columns: minmax(260px, 1fr) minmax(175px, 220px) auto; }
  .notebook-command-bar .button:first-of-type { grid-column: 2; }
  .error-command-bar { grid-template-columns: 1fr 1fr 1fr; }
  .error-command-bar .notebook-command-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .notebook-page-heading { margin-bottom: 12px; }
  .notebook-command-bar,
  .error-command-bar { grid-template-columns: 1fr 1fr; }
  .notebook-command-search { grid-column: 1 / -1; }
  .notebook-command-bar .button,
  .notebook-command-bar .button:first-of-type { grid-column: auto; }
  .notebook-library { min-height: 520px; }
  .notebook-library-heading { min-height: 56px; }
  .notebook-editor { padding: 15px 13px 18px; }
  .notebook-editor-actions { width: 100%; }
  .notebook-editor-actions .button { flex: 1 1 auto; }
  .notebook-editor-organization > summary small { max-width: 240px; }
  .notebook-rich-editor { min-height: 390px; padding: 20px 17px; font-size: 15px; }
  .notebook-page.writing-mode { margin: -18px -3px 0; }
  .notebook-page.writing-mode .notebook-editor { padding: 16px 12px 25px; }
  .notebook-page.writing-mode .notebook-editor-topbar {
    margin: -16px -12px 18px;
    padding: 11px 12px;
  }
  .notebook-page.writing-mode .notebook-editor-actions .button:not(.notebook-writing-toggle) { display: none; }
  .notebook-page.writing-mode .notebook-rich-editor { min-height: calc(100vh - 315px); padding: 23px 17px; }
}
@media (max-width: 460px) {
  .notebook-command-filter { grid-column: 1 / -1; }
  .error-command-bar .notebook-command-filter { grid-column: auto; }
  .notebook-command-bar .button { padding-inline: 8px; }
  .notebook-editor-organization .notebook-editor-organize { grid-template-columns: 1fr; }
  .notebook-format-toolbar { flex-wrap: nowrap; overflow-x: auto; }
  .notebook-format-toolbar > * { flex: 0 0 auto; }
}

/* Seletores hierárquicos: busca rápida e macrotemas recolhidos. */
.hierarchy-picker { position: relative; min-width: 0; }
.hierarchy-picker-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: #eef6ff;
  border: 1px solid #3a516b;
  border-radius: 9px;
  background: #101923;
  text-align: left;
}
.hierarchy-picker-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hierarchy-picker-trigger b { color: #93c5fd; transition: transform .15s ease; }
.hierarchy-picker-trigger[aria-expanded="true"] { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.1); }
.hierarchy-picker-trigger[aria-expanded="true"] b { transform: rotate(180deg); }
.hierarchy-picker-popover {
  position: absolute;
  inset: calc(100% + 6px) 0 auto;
  z-index: 40;
  max-height: min(480px, 62vh);
  padding: 9px;
  overflow: auto;
  border: 1px solid #405775;
  border-radius: 12px;
  background: #0b131d;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.hierarchy-picker-search {
  position: sticky;
  top: -9px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 43px;
  margin: -1px -1px 8px;
  padding: 0 10px;
  border: 1px solid #3a516b;
  border-radius: 9px;
  background: #101d2a;
}
.hierarchy-picker-search span { color: #93c5fd; font-size: 18px; }
.hierarchy-picker-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #f1f5f9; background: transparent; }
.hierarchy-group { margin-top: 5px; overflow: hidden; border: 1px solid #293d53; border-radius: 9px; background: #0e1823; }
.hierarchy-group > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  color: #dbeafe;
  cursor: pointer;
  list-style: none;
}
.hierarchy-group > summary::-webkit-details-marker { display: none; }
.hierarchy-group > summary::before { content: "›"; color: #93c5fd; font-size: 17px; transition: transform .15s ease; }
.hierarchy-group[open] > summary::before { transform: rotate(90deg); }
.hierarchy-group > summary span { overflow: hidden; flex: 1; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hierarchy-group > summary b { min-width: 24px; padding: 3px 6px; color: #bfdbfe; border-radius: 999px; background: #1b3557; font-size: 8px; text-align: center; }
.hierarchy-group > div { padding: 4px; border-top: 1px solid #293d53; }
.hierarchy-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 7px 9px 7px calc(9px + var(--picker-depth, 0) * 12px);
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}
.hierarchy-option:hover, .hierarchy-option.selected { color: #eff6ff; border-color: #315782; background: #14243a; }
.hierarchy-option span { overflow: hidden; font-size: 9px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.hierarchy-option small { color: #8296ad; font-size: 7px; text-transform: uppercase; }
.hierarchy-option.root-option { margin-bottom: 5px; border-color: #293d53; }
.hierarchy-picker-empty { padding: 24px 10px; color: #91a3b8; font-size: 10px; text-align: center; }

/* Checklists de fechamento: busca e expansão por macrotema. */
.assessment-list-tools { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 9px; margin-bottom: 9px; }
.assessment-list-tools label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid #344b65; border-radius: 10px; background: #101b27; }
.assessment-list-tools label span { color: #93c5fd; font-size: 18px; }
.assessment-list-tools input { width: 100%; min-width: 0; border: 0; outline: 0; color: #f1f5f9; background: transparent; }
.assessment-topic-group { overflow: hidden; border: 1px solid #30445b; border-radius: 12px; background: #0e1721; }
.assessment-topic-group + .assessment-topic-group { margin-top: 8px; }
.assessment-topic-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 13px; cursor: pointer; list-style: none; }
.assessment-topic-group > summary::-webkit-details-marker { display: none; }
.assessment-topic-group > summary > span { display: grid; gap: 3px; min-width: 0; }
.assessment-topic-group > summary strong { overflow: hidden; color: #eef6ff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.assessment-topic-group > summary small { color: #91a4ba; font-size: 8px; }
.assessment-topic-group > summary > b { color: #93c5fd; transition: transform .15s ease; }
.assessment-topic-group[open] > summary { border-bottom: 1px solid #30445b; background: #111e2c; }
.assessment-topic-group[open] > summary > b { transform: rotate(180deg); }
.assessment-topic-group > div { display: grid; gap: 7px; padding: 8px; }
.assessment-topic-list.no-results::after { content: "Nenhum item corresponde à busca."; display: block; padding: 28px; color: #91a4ba; text-align: center; }

.notebook-toolbar-spacer { flex: 1 1 auto; }
.notebook-expand-editor { min-width: 34px; color: #bfdbfe !important; border-color: #3b5f8d !important; background: #142943 !important; font-size: 15px !important; }

/* Simulados: registro operacional e leitura de evolução. */
.simulation-dialog { width: min(850px, calc(100vw - 24px)); }
.simulation-dialog form { max-height: 92vh; overflow: auto; padding: 22px; }
.simulation-dialog .dialog-header p { margin: 6px 0 0; color: #9fb0c3; font-size: 11px; }
.simulation-form-grid { display: grid; grid-template-columns: 1.5fr repeat(2, 1fr); gap: 10px; }
.simulation-title-field { grid-column: span 2; }
.simulation-disciplines-editor { margin: 15px 0; overflow: hidden; border: 1px solid #30445b; border-radius: 12px; background: #0d1721; }
.simulation-disciplines-editor > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #30445b; }
.simulation-disciplines-editor > div:first-child > span { display: grid; gap: 3px; }
.simulation-disciplines-editor strong { color: #eef6ff; font-size: 11px; }
.simulation-disciplines-editor small { color: #91a4ba; font-size: 10px; }
#simulationDisciplineRows { display: grid; gap: 7px; padding: 9px; }
.simulation-discipline-row { display: grid; grid-template-columns: minmax(180px, 1fr) 100px 100px 34px; align-items: end; gap: 8px; }
.simulation-discipline-row label { display: grid; gap: 5px; color: #91a4ba; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.simulation-discipline-row select, .simulation-discipline-row input { width: 100%; height: 38px; padding: 0 9px; color: #f1f5f9; border: 1px solid #344b65; border-radius: 8px; background: #101923; }
.simulation-dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; margin-bottom: 12px; }
.simulation-chart { display: grid; grid-template-columns: repeat(auto-fit, minmax(45px, 1fr)); gap: 8px; min-height: 250px; padding: 20px; align-items: end; }
.simulation-chart > div { display: grid; grid-template-rows: 20px 170px 18px; gap: 5px; min-width: 0; text-align: center; }
.simulation-chart strong { color: #dbeafe; font-size: 11px; }
.simulation-chart span { display: flex; align-items: end; justify-content: center; border-radius: 7px; background: #0d1721; }
.simulation-chart i { display: block; width: min(28px, 70%); border-radius: 6px 6px 2px 2px; background: linear-gradient(#60a5fa, #2563eb); }
.simulation-chart small { color: #91a4ba; font-size: 10px; }
.simulation-disciplines > div:last-child { padding: 8px 14px 14px; }
.simulation-disciplines article { display: grid; grid-template-columns: minmax(100px, 1fr) 1fr 38px; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #293647; }
.simulation-disciplines article > span { display: grid; gap: 3px; min-width: 0; }
.simulation-disciplines article strong { overflow: hidden; color: #e8f0f8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.simulation-disciplines article small { color: #91a4ba; font-size: 10px; }
.simulation-disciplines article > div { height: 5px; overflow: hidden; border-radius: 999px; background: #263244; }
.simulation-disciplines article i { display: block; height: 100%; background: #45d1bd; }
.simulation-disciplines article b { color: #bfdbfe; font-size: 11px; text-align: right; }
.simulation-history { overflow: hidden; }
.simulation-history > div:last-child > article { display: grid; grid-template-columns: 80px minmax(180px, 1fr) 55px 70px auto; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #293647; }
.simulation-history time, .simulation-history > div > article > small { color: #91a4ba; font-size: 10px; }
.simulation-history article > span { display: grid; gap: 4px; min-width: 0; }
.simulation-history article > span strong { overflow: hidden; color: #eef6ff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.simulation-history article > span small { color: #91a4ba; font-size: 10px; }
.simulation-history article > b { color: #93c5fd; font-size: 17px; }
.simulation-history article > div { display: flex; gap: 5px; justify-content: flex-end; }
.simulation-empty { display: grid; min-height: 360px; place-items: center; align-content: center; padding: 30px; text-align: center; }
.simulation-empty > span { font-size: 34px; color: #93c5fd; }
.simulation-empty h2 { margin: 12px 0 6px; }
.simulation-empty p { max-width: 480px; margin: 0 0 16px; color: #9fb0c3; font-size: 11px; line-height: 1.5; }

/* Auditoria responsiva global: áreas de toque, quebra de texto e ausência de overflow acidental. */
.workspace, .page-heading > *, .panel, .dialog, .notebook-editor, .notebook-library-sidebar { min-width: 0; }
.page-heading h1, .panel h2, .panel p, .dialog h2, .dialog p { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .simulation-dashboard-grid { grid-template-columns: 1fr; }
  .simulation-form-grid { grid-template-columns: 1fr 1fr; }
  .simulation-title-field { grid-column: 1 / -1; }
  .notebook-library { grid-template-columns: minmax(240px, 310px) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  button, select, input[type="date"], input[type="number"] { min-height: 42px; }
  main small { font-size: 11px !important; }
  main .eyebrow, .free-study-panel > summary > span:last-child { font-size: 11px; }
  .calendar-view-switch button, .review-horizon button { min-height: 42px; font-size: 11px; }
  .calendar-day header > div > span, .calendar-day-total { font-size: 11px; }
  .notebook-expand-editor, .simulation-history button { min-height: 42px !important; min-width: 42px; }
  .next-study-row > span:first-child { min-width: 28px; min-height: 28px; font-size: 11px; }
  .hierarchy-picker-popover { position: fixed; inset: auto 8px 8px; max-height: min(70vh, 560px); border-radius: 16px; }
  .assessment-list-tools { grid-template-columns: 1fr; }
  .assessment-topic-group > summary { min-height: 56px; }
  .simulation-form-grid { grid-template-columns: 1fr; }
  .simulation-title-field { grid-column: auto; }
  .simulation-disciplines-editor > div:first-child { align-items: stretch; flex-direction: column; }
  .simulation-discipline-row { grid-template-columns: minmax(0, 1fr) 1fr 1fr 42px; }
  .simulation-discipline-row label:first-child { grid-column: 1 / -1; }
  .simulation-history > div:last-child > article { grid-template-columns: 70px minmax(0, 1fr) 48px; gap: 8px; }
  .simulation-history article > b { text-align: right; }
  .simulation-history > div > article > small { grid-column: 2; }
  .simulation-history article > div { grid-column: 2 / -1; justify-content: flex-start; }
  .simulation-chart { min-width: 480px; }
  .simulation-trend { overflow-x: auto; }
  .notebook-library { display: block; }
  .notebook-library-sidebar { border-right: 0; }
  .notebook-editor-actions .button { min-height: 40px; }
}
@media (max-width: 460px) {
  .assessment-overview { grid-template-columns: 1fr 1fr; gap: 7px; }
  .assessment-bulk { grid-template-columns: 1fr; }
  .assessment-bulk > * { grid-column: auto !important; }
  .simulation-kpis { grid-template-columns: 1fr 1fr; gap: 7px; }
  .simulation-kpis .stat-card { padding: 12px; }
  .simulation-kpis .stat-value { display: block; }
  .simulation-kpis .stat-value span { display: block; margin: 4px 0 0; white-space: normal; }
  .simulation-disciplines article { grid-template-columns: minmax(100px, 1fr) 80px 36px; }
  .notebook-editor-topbar { align-items: flex-start; flex-direction: column; }
}

/* 2026-07: cabeçalho de conta e objetivo */
.top-actions {
  position: relative;
  align-items: center;
  margin-left: auto;
}
.study-goal-badge {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  min-height: 48px;
  padding: 5px 10px 5px 6px;
  color: #e9f2fc;
  border: 1px solid #344963;
  border-radius: 13px;
  background: linear-gradient(145deg, #111d2b, #0e1722);
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.study-goal-badge:hover { border-color: #58779c; background: #142236; }
.study-goal-badge > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.study-goal-badge small { color: #8fa2b8; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.study-goal-badge strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.study-goal-badge > b { color: #8ea7c2; font-size: 11px; }
.study-goal-insignia {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, .35);
  border-radius: 11px;
  background: linear-gradient(145deg, #1d4f8f, #172d52);
  font-size: 18px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12);
}
.goal-agu .study-goal-insignia { color: #fef3c7; border-color: #8d6b28; background: linear-gradient(145deg, #74551d, #392b18); }
.goal-magistratura .study-goal-insignia { color: #ede9fe; border-color: #7159a3; background: linear-gradient(145deg, #5b3f8d, #2f2548); }
.goal-personalizado .study-goal-insignia { color: #d1fae5; border-color: #347b68; background: linear-gradient(145deg, #17634f, #173a33); }
.topbar-profile-button {
  width: auto;
  min-width: 176px;
  min-height: 48px;
  margin: 0;
  padding: 6px 9px;
  border-color: #344963;
  background: #101923;
}
.topbar-profile-popover {
  inset: 62px 0 auto auto;
  width: 250px;
}

/* Base de estudos: uma única rolagem, leitura maior e prioridades compactas. */
.data-dialog {
  width: min(1280px, calc(100vw - 28px));
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 28px);
  overflow: auto;
  overscroll-behavior: contain;
}
.data-dialog > .dialog-header { padding: 4px 4px 17px; }
.data-dialog > .dialog-header p { font-size: 12px; }
.catalog-manager { padding: 18px; }
.catalog-manager-heading p,
.weight-intro p { font-size: 12px; }
.catalog-workspace-tabs button { min-height: 44px; font-size: 12px; }
.catalog-workspace-panel { min-height: 0; }
.catalog-workspace-panel .catalog-discipline-list,
.catalog-workspace-panel .catalog-update-list,
.discipline-weight-settings {
  max-height: none;
  overflow: visible;
}
.catalog-search input,
.catalog-result-heading span:not(.count-pill) { font-size: 11px; }
.catalog-scope-filter button { min-height: 38px; font-size: 10px; }
.catalog-add-discipline { flex: 0 0 auto; white-space: nowrap; }
.weight-intro h3 { font-size: 20px; }
.weight-legend span { font-size: 10px; }
.discipline-weight-settings {
  grid-template-columns: 1fr;
  gap: 8px;
  padding-right: 0;
}
.discipline-weight-card {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(520px, 1.3fr);
  align-items: center;
  gap: 18px;
  padding: 13px 15px;
}
.discipline-weight-card > header { margin: 0; }
.discipline-weight-card > header strong { font-size: 12px; }
.discipline-weight-card > header small,
.discipline-weight-card > header > b { font-size: 10px; }
.discipline-weight-choices { gap: 7px; }
.discipline-weight-choices label > span { min-height: 52px; }
.discipline-weight-choices strong { font-size: 10px; }
.discipline-weight-choices small { font-size: 9px; }

/* Seletores e checklists hierárquicos com área útil real. */
.notebook-editor-organization .notebook-editor-organize {
  grid-template-columns: 1fr;
}
.hierarchy-picker-trigger { min-height: 44px; font-size: 12px; }
.hierarchy-picker-popover {
  right: 0;
  left: auto;
  width: min(900px, calc(100vw - 40px));
  max-width: none;
  max-height: min(560px, 68vh);
}
.hierarchy-picker-search input { font-size: 12px; }
.hierarchy-group > summary { min-height: 46px; }
.hierarchy-group > summary span {
  overflow: visible;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}
.hierarchy-group > summary b { font-size: 10px; }
.hierarchy-option { min-height: 44px; }
.hierarchy-option span {
  overflow: visible;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}
.hierarchy-option small { font-size: 9px; }
.assessment-dialog { width: min(1120px, calc(100vw - 28px)); }
.assessment-topic-group > summary { min-height: 58px; padding: 13px 16px; }
.assessment-topic-group > summary strong { overflow: visible; font-size: 13px; line-height: 1.4; text-overflow: clip; white-space: normal; }
.assessment-topic-group > summary small { font-size: 10px; }
.assessment-topic { grid-template-columns: 38px minmax(280px, 1fr) 180px 170px; padding: 14px; }
.assessment-topic-copy strong { font-size: 13px; }
.assessment-topic-copy small { font-size: 10px; line-height: 1.45; }
.assessment-bulk label > span, .assessment-field > span { font-size: 10px; }
.assessment-bulk select, .assessment-field select { min-height: 42px; font-size: 11px; }

@media (max-width: 1100px) {
  .brand { width: auto; }
  .brand > span:last-child { display: none; }
  .study-goal-badge { min-width: 175px; }
  .discipline-weight-card { grid-template-columns: 1fr; gap: 11px; }
}
@media (max-width: 720px) {
  .topbar { gap: 7px; }
  .study-goal-badge { grid-template-columns: 38px; min-width: 44px; width: 44px; padding: 3px; border-radius: 11px; }
  .study-goal-badge > span:nth-child(2), .study-goal-badge > b { display: none; }
  .topbar-profile-button { grid-template-columns: 38px; min-width: 44px; width: 44px; padding: 3px; }
  .topbar-profile-button > span:nth-child(2), .topbar-profile-button > b { display: none; }
  .topbar-profile-popover { inset: 58px 4px auto auto; width: min(280px, calc(100vw - 8px)); }
  .data-dialog { width: calc(100vw - 8px); max-height: calc(100vh - 8px); }
  .catalog-toolbar { align-items: stretch; }
  .catalog-add-discipline { width: 100%; }
  .discipline-weight-choices { grid-template-columns: 1fr 1fr; }
  .discipline-weight-choices label:first-child { grid-column: 1 / -1; }
  .hierarchy-picker-popover { inset: auto 6px 6px; width: auto; max-height: min(76vh, 620px); }
  .assessment-dialog { width: calc(100vw - 8px); }
  .assessment-topic { grid-template-columns: 34px minmax(0, 1fr); padding: 12px; }
  .assessment-topic-copy strong { font-size: 12px; }
}
