:root {
  --navy: #0c2855;
  --navy-2: #244b67;
  --blue: #367b9d;
  --blue-soft: #edf6fa;
  --orange: #e67839;
  --orange-soft: #fff2e7;
  --sage: #4f7868;
  --sage-soft: #e8f3ed;
  --red: #a94037;
  --red-soft: #fff0ee;
  --ink: #183754;
  --muted: #5d7690;
  --line: #cfdee8;
  --canvas: #f5f8fb;
  --white: #fff;
  --shadow: 0 8px 22px rgba(25, 58, 84, .055);
  --radius: 13px;
}
/* Fidelity pass v6 — structure aligned with the real instructor portal */
.app-header { grid-template-columns: 176px minmax(500px,1fr) auto; gap:12px; padding:6px 16px; }
.main-nav { justify-content:flex-start; }
.nav-item { min-height:38px; padding:0 10px; border-radius:0; font-size:12px; font-weight:650; }
.nav-item > span:first-child { color:inherit; font-size:inherit; }
.nav-item.active { background:#eaf1f7; box-shadow:inset 0 -3px #e88a3f; border-bottom-color:transparent; }
.nav-item svg,.icon-button svg,.heading-icon svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.nav-item.nav-absence { min-height:34px; margin-left:6px; padding:0 9px; border-color:#d8c3aa; border-radius:6px; background:#fffaf5; }
.header-actions { gap:5px; }
.icon-button,.guide-button { min-height:34px; border-radius:6px; }
.icon-button { width:36px; display:grid; place-items:center; }
.icon-button svg { width:18px; height:18px; }
.guide-button { padding:0 8px; font-size:12px; }
.account-chip { min-height:34px; display:inline-flex; align-items:center; gap:7px; padding:3px 9px 3px 4px; border:1px solid #cbd9e4; border-radius:999px; color:#243c58; background:#fff; cursor:pointer; font-size:11px; }
.account-chip>span { width:26px; height:26px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#395d76; font-size:10px; font-weight:800; }
.account-chip>b { max-width:92px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.exit-link { white-space:nowrap; }
.app-main { width:min(1380px,calc(100% - 28px)); padding-top:14px; }

.portal-schedule-top { position:relative; display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:10px; padding:10px 14px; overflow:hidden; border:1px solid #cbd9e4; border-radius:12px; background:radial-gradient(ellipse at 12% 0%,rgba(232,138,63,.12),transparent 72%),linear-gradient(180deg,rgba(232,138,63,.035),#fff); box-shadow:0 6px 18px rgba(31,74,96,.06); }
.schedule-heading-block { display:flex; align-items:center; gap:10px; min-width:0; }
.heading-icon { width:34px; height:34px; display:grid; place-items:center; flex:0 0 34px; border:1px solid #d8e1eb; border-radius:7px; color:#395d76; background:#fff; }
.heading-icon svg { width:20px; height:20px; }
.schedule-heading-block h1 { margin:1px 0; color:#162b4d; font-size:20px; line-height:1.3; }
.schedule-heading-block p { display:flex; align-items:center; gap:6px; margin:0; color:#627687; font-size:12px; }
.live-dot { width:7px; height:7px; border-radius:50%; background:#4f7868; box-shadow:0 0 0 3px rgba(79,120,104,.14); }
.schedule-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.schedule-actions>button { min-height:32px; padding:5px 9px; border:1px solid #b9cbd9; border-radius:6px; color:#395d76; background:#eef4f8; cursor:pointer; font-size:13px; font-weight:600; }
.schedule-actions>button+button { background:#fff; border-color:#cbd9e4; }
.schedule-actions .today { min-width:172px; padding:7px 10px; border-radius:7px; }
.schedule-actions .today span,.schedule-actions .today small { font-size:10px; }
.schedule-actions .today strong { font-size:12px; }

.message-center { margin-bottom:12px; overflow:hidden; border:1px solid #cbd9e4; border-radius:12px; background:#fff; box-shadow:0 6px 18px rgba(31,74,96,.08); }
.message-center>header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:9px 16px; border-bottom:1px solid #d8e1eb; background:#eef4f8; }
.message-center>header h2 { margin:0; color:#162b4d; font-size:18px; }
.message-center>header p { margin:1px 0 0; color:#627687; font-size:12px; }
.message-center>header>span { color:#627687; font-size:12px; }
.responsibility { margin:0; padding:7px 16px; border-bottom:1px solid #edf1f5; color:#395d76; background:#f8fafc; font-size:12px; }
.message-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:8px 16px; border-bottom:1px solid #edf1f5; }
.message-row.urgent { background:#fdf6f4; }
.row-icon { width:32px; height:32px; display:grid; place-items:center; border:1px solid #d8e1eb; border-radius:7px; color:#395d76; background:#eef4f8; font-weight:750; }
.message-row.urgent .row-icon { color:#993c36; border-color:#efd4cf; background:#f9e7e3; }
.message-row strong,.message-center summary strong { display:block; color:#30334d; font-size:14px; }
.message-row p,.message-center summary small { display:block; margin:1px 0 0; color:#627687; font-size:12px; }
.state { display:inline-flex; align-items:center; gap:3px; padding:3px 7px; border-radius:5px; color:#627687; background:#f2f5f7; font-size:11px; font-weight:650; white-space:nowrap; }
.state.overdue { color:#fff; background:#993c36; }
.state.unread { color:#fff; background:#395d76; }
.message-row>button,.change-detail button { min-height:32px; padding:5px 9px; border:1px solid #395d76; border-radius:6px; color:#fff; background:#395d76; cursor:pointer; font-size:12px; font-weight:650; }
.message-center details { background:#f5f8fa; }
.message-center summary { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:12px; padding:8px 16px; cursor:pointer; list-style:none; }
.message-center summary::-webkit-details-marker { display:none; }
.change-detail { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:8px 16px 10px 60px; border-top:1px solid #dbe4e9; color:#526478; font-size:12px; }

.schedule-layout { padding:0; overflow:hidden; }
.calendar-card { border:0; border-radius:0; box-shadow:none; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:14px; padding:8px 14px; border-top:1px solid #e0e7ec; color:#526478; font-size:11px; }
.calendar-legend>span { display:flex; align-items:center; gap:6px; }
.calendar-legend i { width:10px; height:10px; display:block; border-radius:3px; background:#5b819a; }
.calendar-legend i.changed { background:#d09a48; }
.calendar-legend i.cancelled { background:#b9c2ca; }
.class-detail { border:0; border-left:1px solid #cbd9e4; border-radius:0; }
.course-detail-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:-14px -14px 10px; padding:8px 14px; border-bottom:1px solid #d6e0e9; background:#eef3f7; color:#39516c; font-size:12px; }
.course-detail-bar>span { font-weight:700; }
.class-detail dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
.detail-actions { display:grid; grid-template-columns:1fr 1fr; }
.detail-actions button { width:100%; }

.group-summary { padding:0; overflow:hidden; }
.group-list-head { display:flex; align-items:center; justify-content:space-between; padding:12px 13px; border-bottom:1px solid #d8e1eb; background:#eef3f7; }
.group-list-head>b { min-width:24px; padding:2px 6px; border-radius:5px; text-align:center; color:#395d76; background:#dfe9f1; }
.group-option { width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border:0; border-bottom:1px solid #e2e8ed; background:#fff; text-align:left; cursor:pointer; }
.group-option:hover { background:#f8fafc; }
.group-option.active { background:#eaf1f7; box-shadow:inset 3px 0 #4b6684; }
.group-option>span { display:grid; gap:2px; }
.group-option strong { color:#203953; font-size:13px; }
.group-option small { color:#627687; font-size:11px; }
.group-option>b { padding:3px 6px; border-radius:5px; color:#fff; background:#85443e; font-size:10px; white-space:nowrap; }
.group-option>b.complete { color:#3d7055; background:#e8f3ed; }
.group-help { display:flex; flex-wrap:wrap; gap:8px 12px; padding:12px; color:#627687; font-size:11px; }
.group-help>strong { flex-basis:100%; color:#395d76; }
.group-help>span { display:flex; align-items:center; gap:5px; }
.group-help i { width:9px; height:9px; border-radius:50%; background:#4f7868; }
.group-help i.absent { background:#a94037; }
.group-help i.locked { background:#aab4bd; }

.report-workarea { padding:14px; border:1px solid #d7e1ec; border-radius:12px; background:#eef3f8; }
.report-workarea .report-tabs { gap:4px; margin:-3px 0 0; padding:0; border-bottom:1px solid #d7e1eb; }
.report-workarea .report-tabs button { min-height:44px; padding:8px 11px; border:0; border-radius:7px 7px 0 0; color:#52657e; background:transparent; font-size:12px; }
.report-workarea .report-tabs button.active { color:#203953; background:#eaf0f6; box-shadow:inset 0 -3px #4b6684; }
.report-tabs button>b { min-width:21px; display:inline-grid; place-items:center; margin-left:6px; padding:2px 5px; border-radius:999px; color:#fff; background:#85443e; font-size:10px; }
.report-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 2px; border-bottom:1px solid #d7e1ec; }
.report-toolbar>div { display:flex; align-items:center; gap:6px; }
.report-toolbar span { color:#52657e; font-size:11px; font-weight:650; }
.report-toolbar button { min-height:32px; padding:5px 9px; border:1px solid #cbd7e3; border-radius:6px; color:#52657e; background:#fff; cursor:pointer; font-size:11px; }
.report-toolbar button.active { border-color:#8196af; background:#eaf0f6; color:#203953; font-weight:700; }
.report-toolbar p { margin:0; color:#627687; font-size:11px; }
.report-panel { display:none; }
.report-panel.active { display:grid; }
.report-workarea .report-grid { margin-top:12px; padding:0; border:0; background:transparent; }
.report-table-card { overflow:hidden; border:1px solid #cbd7e3; border-radius:8px; background:#fff; }
.report-table-card>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid #dbe4e9; background:#f8fafc; }
.report-table-card h2 { margin:2px 0 0; color:#172b46; font-size:16px; }
.report-table-row { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(220px,1.4fr) auto; align-items:center; gap:18px; padding:14px; color:#52657e; font-size:12px; }
.report-table-row>span:first-child { display:grid; gap:3px; }
.report-table-row strong { color:#203953; font-size:14px; }
.report-table-row small { color:#627687; }
.report-table-row button { min-height:34px; padding:6px 10px; border:1px solid #b9cbd9; border-radius:6px; background:#f8fafc; color:#395d76; }
.empty-report { padding:30px 14px; color:#627687; text-align:center; font-size:13px; }

.context-return { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid #d8e1eb; color:#627687; font-size:12px; }
.context-return button { border:0; color:#395d76; background:transparent; cursor:pointer; font-weight:700; }

.record-shell { display:grid; grid-template-columns:210px minmax(0,1fr); gap:12px; padding:12px; border:1px solid #d7e1ec; border-radius:12px; background:#eef3f8; }
.record-nav { display:grid; align-content:start; gap:3px; }
.record-nav button { min-height:40px; padding:8px 10px; border:0; border-radius:6px; color:#52657e; background:transparent; cursor:pointer; text-align:left; font-size:12px; }
.record-nav button.active { color:#203953; background:#fff; box-shadow:inset 3px 0 #4b6684,0 1px 3px rgba(31,74,96,.06); font-weight:700; }
.record-shell .dossier-grid { padding:0; border:0; background:transparent; box-shadow:none; }

.absence-modal-view.active { position:fixed; z-index:120; inset:0; width:100%; max-width:none; display:grid; grid-template-rows:auto 1fr; align-content:center; padding:clamp(28px,6vh,72px) clamp(18px,7vw,130px); overflow:auto; background:rgba(22,43,77,.55); animation:view-in .2s ease both; }
.absence-modal-view>.page-heading,.absence-modal-view>.absence-layout { width:min(1080px,100%); margin-left:auto; margin-right:auto; background:#fff; }
.absence-modal-view>.page-heading { align-items:center; margin-bottom:0; padding:18px 22px; border:1px solid #cbd9e4; border-bottom:0; border-radius:12px 12px 0 0; }
.absence-modal-view>.absence-layout { padding:0; gap:0; border:1px solid #cbd9e4; border-radius:0 0 12px 12px; box-shadow:0 24px 70px rgba(14,35,61,.28); }
.absence-modal-view .absence-form,.absence-modal-view .impact-card { border:0; border-radius:0; box-shadow:none; }
.absence-modal-view .impact-card { border-left:1px solid #d8e1eb; background:#f8fafc; }
.absence-close { position:fixed; z-index:2; top:max(18px,4vh); right:max(18px,4vw); width:38px; height:38px; border:1px solid rgba(255,255,255,.55); border-radius:50%; color:#fff; background:rgba(22,43,77,.72); cursor:pointer; font-size:22px; }

@media(max-width:1420px){
  .app-header { grid-template-columns:160px minmax(0,1fr); }
  .main-nav { justify-content:center; }
  .account-chip { display:none; }
}
@media(max-width:920px){
  .portal-schedule-top { align-items:flex-start; flex-direction:column; }
  .schedule-actions { width:100%; justify-content:flex-start; flex-wrap:wrap; }
  .message-row { grid-template-columns:32px minmax(0,1fr) auto; }
  .message-row>.state { grid-column:2; justify-self:start; }
  .message-row>button { grid-column:3; grid-row:1 / span 2; }
  .record-shell { grid-template-columns:1fr; }
  .record-nav { grid-template-columns:repeat(4,minmax(150px,1fr)); overflow:auto; }
}
@media(max-width:620px){
  .portal-schedule-top { padding:10px; }
  .schedule-actions .today { width:100%; }
  .message-center>header { align-items:flex-start; flex-direction:column; }
  .message-row { grid-template-columns:28px minmax(0,1fr); }
  .message-row>button { grid-column:2; grid-row:auto; justify-self:start; }
  .message-center summary { grid-template-columns:28px minmax(0,1fr); }
  .message-center summary .state { grid-column:2; justify-self:start; }
  .change-detail { grid-template-columns:1fr; padding-left:48px; }
  .report-toolbar { align-items:flex-start; flex-direction:column; }
  .report-table-row { grid-template-columns:1fr; gap:9px; }
  .record-nav { grid-template-columns:repeat(4,180px); }
  .absence-modal-view.active { padding:12px; }
  .absence-modal-view>.page-heading { padding:14px; }
  .absence-close { top:18px; right:18px; }
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.demo-banner { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 18px; color: #60391d; background: #ffe4c7; font-size: .82rem; }
.demo-banner strong { letter-spacing: .04em; }
.demo-banner button { margin-left: 8px; padding: 4px 9px; border: 1px solid #c9864d; border-radius: 7px; color: #60391d; background: transparent; cursor: pointer; font-size: .76rem; font-weight: 800; }

.app-header { position: sticky; z-index: 50; top: 0; min-height: 64px; display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 7px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); backdrop-filter: blur(12px); }
.logo { width: max-content; max-width: 100%; display: inline-flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; }
.logo img { width: 43px; height: 43px; display: block; flex: 0 0 auto; object-fit: contain; }
.logo-wordmark { display: grid; line-height: .82; font-family: Georgia, "Times New Roman", serif; font-size: .95rem; letter-spacing: -.035em; }
.logo-wordmark strong { display: block; }
.main-nav { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-item { position: relative; min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; color: #152b4f; background: transparent; cursor: pointer; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.nav-item > span:first-child { color: var(--blue); font-size: 1.05rem; }
.nav-item:hover { color: var(--navy); background: #f5f9fb; }
.nav-item.active { color: var(--navy); border-bottom-color: var(--orange); }
.nav-item.nav-absence { margin-left: 4px; border: 1px solid #dfb38d; border-radius: 10px; color: #75401c; background: var(--orange-soft); }
.nav-count { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--red); font-size: .66rem; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.icon-button, .guide-button { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 800; }
.icon-button { position: relative; width: 42px; }
.icon-button b { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: var(--red); font-size: .66rem; }
.guide-button { display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; color: var(--navy); }
.guide-button > span:first-child { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #edf3f6; }
.language-switch button { min-width: 34px; min-height: 32px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: .76rem; font-weight: 850; }
.language-switch button[aria-pressed="true"] { color: #fff; background: var(--navy); }
.exit-link { margin-left: 2px; color: #516b7e; font-size: .75rem; font-weight: 750; text-decoration: none; }

.app-main { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 80px; }
.view { display: none; }
.view.active { display: block; animation: view-in .25s ease both; }
@keyframes view-in { from { opacity: .25; transform: translateY(5px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 20px; padding: 0 2px; }
.page-heading h1 { margin: 4px 0 6px; color: var(--navy); font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.08; letter-spacing: -.035em; }
.page-heading p { max-width: 750px; margin: 0; color: var(--muted); }
.kicker { color: var(--blue); font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.today { min-width: 220px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.today span, .today small { display: block; color: var(--muted); font-size: .72rem; }
.today strong { display: block; margin: 2px 0; color: var(--navy); }
.demo-pill { padding: 9px 13px; border-radius: 999px; color: #315d4b; background: var(--sage-soft); font-size: .78rem; font-weight: 850; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 4px 0 0; color: var(--navy); font-size: 1.35rem; }
.primary { color: #fff !important; border-color: var(--navy) !important; background: var(--navy) !important; }

.priority-panel { margin-bottom: 22px; overflow: hidden; border: 1px solid #c5d8e4; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.priority-title { display: flex; align-items: center; gap: 13px; padding: 14px 18px; border-bottom: 1px solid #c5d8e4; background: #eef6fa; }
.priority-title h2 { margin: 0 0 2px; color: var(--navy); font-size: 1.28rem; }
.priority-title p { margin: 0; color: var(--muted); font-size: .88rem; }
.panel-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c3d9e5; border-radius: 8px; color: var(--blue); background: #fff; font-weight: 900; }
.priority-list { display: grid; grid-template-columns: 1fr; }
.priority-list button { min-height: 62px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.priority-list button:last-child { border-bottom: 0; background: #f4f8fa; }
.priority-list button:hover { background: #fafcfd; }
.priority-number { min-width: 38px; height: 32px; display: grid; place-items: center; padding: 0 8px; border-radius: 7px; color: #fff; background: var(--red); font-size: .88rem; font-weight: 900; }
.priority-number.blue { background: var(--blue); }
.priority-list strong, .priority-list small { display: block; }
.priority-list strong { color: var(--navy); }
.priority-list small { margin-top: 2px; color: var(--muted); }

.schedule-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.calendar-card { overflow: hidden; }
.week-controls { display: flex; gap: 6px; }
.week-controls button { min-height: 37px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: #fff; cursor: pointer; font-weight: 800; }
.week-grid { display: grid; grid-template-columns: 52px repeat(5, 1fr); min-height: 620px; padding: 0 10px 12px; background: #fff; }
.time-rail { position: relative; height: 590px; margin-top: 44px; color: var(--muted); font-size: .7rem; }
.time-rail span { position: absolute; right: 8px; transform: translateY(-50%); }
.time-rail span:nth-child(1) { top: 0; }.time-rail span:nth-child(2) { top: 54px; }.time-rail span:nth-child(3) { top: 108px; }.time-rail span:nth-child(4) { top: 162px; }.time-rail span:nth-child(5) { top: 216px; }.time-rail span:nth-child(6) { top: 270px; }.time-rail span:nth-child(7) { top: 324px; }.time-rail span:nth-child(8) { top: 378px; }.time-rail span:nth-child(9) { top: 432px; }.time-rail span:nth-child(10) { top: 486px; }.time-rail span:nth-child(11) { top: 540px; }
.day-column { position: relative; min-width: 0; height: 590px; margin-top: 44px; border-right: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 53px, var(--line) 53px, var(--line) 54px); }
.day-column:last-child { border-right: 0; }
.day-column header { position: absolute; right: 0; bottom: 100%; left: 0; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 5px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7fafc; }
.day-column header span { color: var(--navy); font-size: 1.15rem; font-weight: 900; }
.class-event { position: absolute; z-index: 2; right: 4px; left: 4px; width: auto; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; margin: 0; padding: 7px 8px; overflow: hidden; border: 0; border-radius: 7px; outline: 0; color: #fff; background: #58a6c3; cursor: pointer; text-align: left; box-shadow: none; }
.class-event small { color: inherit; }
.class-event strong { margin: 5px 0 2px; }
.class-event span { font-size: .74rem; }
.class-event.b3, .class-event.individual { background: #58a6c3; }
.class-event.cancelled { color: #332918; background: #d7cabd; cursor: default; }
.class-event.selected { outline: 0; background: #438eab; box-shadow: 0 3px 9px rgba(12, 40, 85, .22); }
.class-event:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.class-event.time-0900 { top: 108px; }.class-event.time-1030 { top: 189px; }.class-event.time-1300 { top: 324px; }.class-event.time-1400 { top: 378px; }
.class-event.duration-60 { height: 52px; }.class-event.duration-90 { height: 79px; }

.class-detail { position: sticky; top: 92px; padding: 18px; box-shadow: none; }
.class-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.class-status span { color: var(--blue); font-size: .74rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.class-status b { padding: 6px 9px; border-radius: 999px; color: #315d4b; background: var(--sage-soft); font-size: .72rem; }
.class-detail h2 { margin: 17px 0 4px; color: var(--navy); font-size: 1.8rem; }
.detail-time { color: var(--muted); }
.class-detail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.class-detail dl div { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafb; }
.class-detail dt { color: var(--muted); font-size: .71rem; }
.class-detail dd { margin: 4px 0 0; color: var(--navy); font-size: .86rem; font-weight: 800; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.detail-actions button, .course-actions button, .info-card button, .dossier-wide button { min-height: 43px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 800; }
.participant-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.participant-list strong { width: 100%; color: var(--navy); font-size: .82rem; }
.participant-list span { padding: 5px 8px; border-radius: 8px; color: #526a7d; background: #edf3f6; font-size: .72rem; }

.month-switch { display: flex; gap: 9px; margin-bottom: 17px; padding: 10px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f4f7f9; }
.month-switch button { min-width: 175px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; text-align: left; }
.month-switch button.active { border-color: var(--blue); box-shadow: inset 0 -3px var(--orange); }
.month-switch strong, .month-switch span { display: block; }
.month-switch strong { color: var(--navy); }
.month-switch span { color: var(--muted); font-size: .76rem; }
.timesheet-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.group-summary { padding: 18px; border-color: #6aa6c3; background: #f0f8fb; box-shadow: none; }
.group-summary h2 { margin: 7px 0 20px; color: var(--navy); font-size: 1.15rem; }
.group-summary p { margin: 0 0 6px; color: var(--navy); }
.group-summary small { color: var(--muted); }
.timesheet-card { overflow: hidden; box-shadow: none; }
.due-pill { padding: 8px 11px; border-radius: 999px; color: #7c4d18; background: #fff0cf; font-size: .78rem; }
.table-wrap { overflow-x: auto; }
.attendance-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.attendance-table th, .attendance-table td { padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.attendance-table th { color: var(--navy); background: #edf4f7; font-size: .82rem; }
.attendance-table th small { display: block; color: var(--muted); }
.attendance-table th:first-child, .attendance-table td:first-child { width: 230px; text-align: left; }
.attendance-table td:first-child { color: var(--navy); font-weight: 850; }
.attendance-choice { display: inline-flex; padding: 3px; border-radius: 9px; background: #edf2f5; }
.attendance-choice button { width: 38px; height: 34px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-weight: 900; }
.attendance-choice button.present.selected { color: #176343; background: #d8efe3; }
.attendance-choice button.absent.selected { color: #9a332b; background: #ffe0dd; }
.missed-time { display: block; width: max-content; margin: 7px auto 0; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; font-size: .72rem; }
.locked-cell { color: var(--muted); font-size: .78rem; }
.locked-cell b { display: inline-block; padding: 6px 9px; border-radius: 8px; color: #7b4a2a; background: #f5e6d9; }
.save-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; }
.save-row p { margin: 0; color: var(--muted); }
.save-row button { min-height: 44px; padding: 0 17px; border: 1px solid var(--navy); border-radius: 10px; cursor: pointer; font-weight: 850; }

.report-tabs { display: flex; gap: 7px; margin-bottom: 18px; overflow-x: auto; }
.report-tabs button { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 800; white-space: nowrap; }
.report-tabs button.active { color: #fff; border-color: var(--navy); background: var(--navy); }
.report-grid { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.report-card { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(180px, .9fr) minmax(220px, 1.35fr) minmax(235px, 1fr) auto; align-items: center; gap: 16px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: none; }
.report-card.due, .report-card.draft, .report-card.published { border-color: var(--line); }
.report-card-head { display: flex; justify-content: space-between; align-items: center; }
.report-card-head span { color: var(--blue); font-size: .75rem; font-weight: 850; text-transform: uppercase; }
.report-card-head b { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--navy); }
.report-card h2 { margin: 0; color: var(--navy); font-size: 1rem; }
.report-card > p { min-height: 0; margin: 0; color: var(--muted); font-size: .83rem; }
.report-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.report-card dl div { padding: 10px; border-radius: 9px; background: #f3f7f9; }
.report-card dt { color: var(--muted); font-size: .68rem; }
.report-card dd { margin: 3px 0 0; color: var(--navy); font-size: .78rem; font-weight: 800; }
.report-card > button { width: auto; min-width: 150px; min-height: 40px; margin: 0; padding: 0 14px; border: 1px solid #176f4d; border-radius: 8px; color: #fff; background: #176f4d; cursor: pointer; font-weight: 850; }

.course-toggle { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.course-toggle button { min-width: 60px; min-height: 38px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-weight: 900; }
.course-toggle button.active { color: #fff; background: var(--navy); }
.course-workspace { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.course-sidebar { padding: 18px; box-shadow: none; }
.course-sidebar h2 { margin: 7px 0 14px; color: var(--navy); }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e2ebf0; }
.progress-track span { display: block; width: 16%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--blue)); transition: width .3s ease; }
.course-sidebar > p { color: var(--muted); font-size: .82rem; }
.course-sidebar nav { display: grid; gap: 7px; margin-top: 20px; }
.course-sidebar nav button { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.course-sidebar nav button.active { border-color: var(--blue); background: var(--blue-soft); }
.course-sidebar nav b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); }
.course-sidebar nav span { color: var(--navy); font-size: .8rem; font-weight: 800; }
.course-content { padding: 24px; box-shadow: none; }
.lesson-badge { display: inline-block; padding: 6px 9px; border-radius: 999px; color: #315d4b; background: var(--sage-soft); font-size: .72rem; font-weight: 850; }
.course-content h2 { margin: 17px 0 6px; color: var(--navy); font-size: 2rem; }
.course-content > p { color: var(--muted); }
.objective-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0; }
.objective-grid div { min-height: 130px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafb; }
.objective-grid span { display: block; margin-bottom: 9px; color: var(--blue); font-size: .72rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.objective-grid strong { color: var(--navy); }
.course-actions { display: flex; gap: 10px; }

.dossier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #f4f8f8; box-shadow: var(--shadow); }
.profile-card { grid-column: span 2; display: flex; align-items: center; gap: 20px; padding: 25px; }
.avatar { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 24px; color: #fff; background: linear-gradient(145deg, var(--orange), var(--blue)); font-size: 1.5rem; font-weight: 900; }
.profile-card h2, .info-card h2, .dossier-wide h2 { margin: 6px 0 3px; color: var(--navy); }
.profile-card p, .info-card p { margin: 0; color: var(--muted); }
.tag-row { display: flex; gap: 6px; margin-top: 12px; }
.tag-row span { padding: 5px 8px; border-radius: 999px; color: #315d4b; background: var(--sage-soft); font-size: .7rem; font-weight: 800; }
.info-card { grid-column: span 2; padding: 23px; }
.info-card button { margin-top: 18px; }
.info-card small { color: var(--muted); }
.dossier-wide { grid-column: span 4; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 24px; align-items: center; padding: 23px; }
.request-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.request-row strong, .request-row small { display: block; }
.request-row small { color: var(--muted); }
.pending { padding: 6px 9px; border-radius: 999px; color: #7c4d18; background: #fff0cf; font-size: .72rem; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric-row div { padding: 12px; border-radius: 10px; background: #f3f7f9; }
.metric-row b, .metric-row span { display: block; }
.metric-row b { color: var(--navy); font-size: 1.4rem; }
.metric-row span { color: var(--muted); font-size: .74rem; }

.absence-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .65fr); gap: 14px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.absence-form { padding: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label, .dialog-field { display: grid; gap: 7px; color: var(--navy); font-size: .82rem; font-weight: 800; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea, .dialog-field textarea, .report-form textarea { width: 100%; min-height: 45px; padding: 11px 12px; border: 1px solid #afc6d5; border-radius: 10px; color: var(--ink); background: #fff; font-weight: 500; }
.absence-form > button { min-height: 46px; margin-top: 20px; padding: 0 18px; border: 1px solid var(--navy); border-radius: 10px; cursor: pointer; font-weight: 850; }
.impact-card { min-height: 380px; padding: 25px; }
.impact-card h2 { margin: 7px 0 22px; color: var(--navy); }
.empty-impact { display: grid; place-items: center; min-height: 235px; padding: 30px; border: 2px dashed #c9d8e1; border-radius: 14px; color: var(--muted); text-align: center; }
.empty-impact > span { font-size: 2rem; }
.impact-summary { display: grid; gap: 10px; }
.impact-summary > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.impact-summary span, .impact-summary strong { display: block; }
.impact-summary span { color: var(--muted); font-size: .72rem; }
.impact-summary strong { margin-top: 4px; color: var(--navy); }
.affected-list { margin: 16px 0; padding: 0; list-style: none; }
.affected-list li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.affected-list strong, .affected-list span { display: block; }
.affected-list span { color: var(--muted); font-size: .78rem; }
.impact-card button { width: 100%; min-height: 45px; border: 1px solid var(--navy); border-radius: 10px; cursor: pointer; font-weight: 850; }

.notification-drawer { position: fixed; z-index: 80; top: 114px; right: 20px; width: min(420px, calc(100% - 40px)); padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 24px 65px rgba(16,45,73,.24); transform: translateX(calc(100% + 40px)); opacity: 0; transition: .25s ease; }
.notification-drawer.open { transform: none; opacity: 1; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.drawer-head h2 { margin: 5px 0 0; color: var(--navy); }
.drawer-head > button { width: 38px; height: 38px; border: 0; border-radius: 9px; background: #edf3f6; cursor: pointer; font-size: 1.2rem; }
.notification-drawer article { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.notification-drawer article:last-child { border-bottom: 0; }
.notification-drawer p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
.status-dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--blue); }
.status-dot.urgent { background: var(--red); }.status-dot.warning { background: var(--orange); }

dialog { width: min(850px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; overflow: auto; border: 0; border-radius: 20px; box-shadow: 0 35px 100px rgba(9,31,49,.38); }
dialog::backdrop { background: rgba(8,28,45,.72); backdrop-filter: blur(3px); }
.dialog-shell { padding: 25px; }
.dialog-shell.compact { max-width: 620px; margin: auto; }
.report-context { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 22px 0; }
.report-context div { padding: 12px; border-radius: 10px; background: #edf4f7; }
.report-context span, .report-context strong { display: block; }
.report-context span { color: var(--muted); font-size: .7rem; }
.report-context strong { margin-top: 4px; color: var(--navy); }
.report-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.report-form label { display: grid; gap: 6px; color: var(--navy); font-size: .8rem; font-weight: 800; }
.dialog-note { padding: 12px 14px; border-radius: 10px; color: #6c4b2f; background: var(--orange-soft); font-size: .84rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.dialog-actions button { min-height: 43px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 850; }
.dialog-field { margin-top: 22px; }

.welcome-dialog { width: min(650px, calc(100% - 30px)); overflow: hidden; border-top: 5px solid var(--orange); }
.welcome-shell { position: relative; padding: 32px; }
.welcome-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px; color: var(--navy); }
.welcome-brand img { width: 58px; height: 58px; object-fit: contain; }
.welcome-brand span { display: grid; line-height: .83; font: 800 1.2rem/.83 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.welcome-brand strong { display: block; }
.welcome-language { position: absolute; top: 30px; right: 30px; display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #edf3f6; }
.welcome-language button { min-width: 38px; min-height: 34px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 850; }
.welcome-language button[aria-pressed="true"] { color: #fff; background: var(--navy); }
.welcome-dialog h2 { max-width: 530px; margin: 8px 0 12px; color: var(--navy); font-size: clamp(1.75rem, 4vw, 2.35rem); line-height: 1.08; letter-spacing: -.035em; }
.welcome-dialog p { max-width: 555px; margin: 0; color: var(--muted); font-size: 1rem; }
.welcome-dialog .welcome-duration { width: fit-content; margin-top: 15px; padding: 7px 10px; border: 1px solid #cbd9e4; border-radius: 8px; color: #395d76; background: #eef4f8; font-size: .86rem; font-weight: 800; }
.welcome-question { display: block; margin-top: 23px; color: var(--navy); font-size: 1.05rem; }
.welcome-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.welcome-actions button { min-height: 46px; padding: 0 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 850; }

.completion-dialog { width: min(620px, calc(100% - 30px)); overflow: hidden; border-top: 5px solid #4f7868; }
.completion-shell { padding: 32px; text-align: center; }
.completion-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: #fff; background: #4f7868; font-size: 1.75rem; font-weight: 900; }
.completion-dialog h2 { max-width: 510px; margin: 8px auto 12px; color: var(--navy); font-size: clamp(1.65rem, 4vw, 2.2rem); line-height: 1.1; }
.completion-dialog p { max-width: 510px; margin: 0 auto; color: var(--muted); }
.completion-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 25px; }
.completion-actions button, .completion-actions a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: #fff; cursor: pointer; font-weight: 850; text-decoration: none; }

.tour-popover { position: fixed; z-index: 200; right: 104px; bottom: 24px; width: min(430px, calc(100% - 30px)); padding: 21px; border: 1px solid #e1af7d; border-radius: 18px; background: #fff; box-shadow: 0 24px 75px rgba(9,31,49,.28); }
.tour-progress { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.tour-progress button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #edf3f6; cursor: pointer; }
.tour-popover h2 { margin: 6px 0 7px; color: var(--navy); font-size: 1.35rem; }
.tour-popover p { margin: 0; color: var(--muted); }
.tour-actions { display: flex; gap: 7px; margin-top: 17px; }
.tour-actions button { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; font-size: .78rem; font-weight: 850; }
.tour-actions button:last-child { margin-left: auto; }
.tour-focus { position: relative !important; z-index: 151 !important; outline: 5px solid var(--orange) !important; outline-offset: 5px; box-shadow: 0 0 0 9999px rgba(8,28,45,.42), 0 20px 60px rgba(8,28,45,.22) !important; }
.toast { position: fixed; z-index: 210; left: 50%; bottom: 24px; max-width: min(540px, calc(100% - 30px)); padding: 13px 17px; border-radius: 12px; color: #fff; background: var(--navy); box-shadow: var(--shadow); transform: translate(-50%, 80px); opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1420px) {
  .app-header { grid-template-columns: 140px minmax(0, 1fr); }
  .logo { width: max-content; }
  .header-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
  .main-nav { justify-content: flex-start; overflow-x: auto; }
  .notification-drawer { top: 172px; }
}

@media (max-width: 1120px) {
  .report-card { grid-template-columns: 1fr 1fr; }
  .report-card > button { width: 100%; }
}

@media (max-width: 920px) {
  .app-main { width: min(100% - 24px, 1440px); padding-top: 25px; }
  .priority-list { grid-template-columns: 1fr; }
  .priority-list button { border-right: 0; border-bottom: 1px solid var(--line); }
  .schedule-layout, .course-workspace, .absence-layout, .timesheet-layout { grid-template-columns: 1fr; }
  .class-detail { position: static; }
  .dossier-grid { grid-template-columns: 1fr 1fr; }
  .info-card { grid-column: auto; }
  .profile-card, .dossier-wide { grid-column: 1 / -1; }
  .dossier-wide { grid-template-columns: 1fr; }
  .week-grid { min-width: 800px; }
  .calendar-card { overflow-x: auto; }
}

@media (max-width: 620px) {
  .demo-banner { flex-wrap: wrap; gap: 4px 9px; }
  .app-header { position: static; display: flex; flex-wrap: wrap; padding: 10px 12px; }
  .logo { width: max-content; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; padding-top: 7px; border-top: 1px solid var(--line); }
  .nav-item { min-height: 44px; padding: 0 9px; }
  .nav-item span:last-of-type { font-size: .75rem; }
  .header-actions { margin-left: auto; padding: 0; border: 0; }
  .guide-button span:last-child, .exit-link { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 2.25rem; }
  .today { width: 100%; }
  .priority-list button { min-height: 74px; }
  .card-head { align-items: flex-start; flex-direction: column; }
  .detail-actions, .objective-grid, .form-grid, .report-form, .report-context { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .save-row, .course-actions { align-items: stretch; flex-direction: column; }
  .save-row button, .course-actions button { width: 100%; }
  .dossier-grid { grid-template-columns: 1fr; }
  .profile-card, .dossier-wide { grid-column: auto; }
  .profile-card { align-items: flex-start; flex-direction: column; }
  .metric-row { grid-template-columns: 1fr; }
  .report-card { grid-template-columns: 1fr; align-items: stretch; }
  .notification-drawer { top: 18px; right: 12px; width: calc(100% - 24px); }
  .tour-popover { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .tour-actions { flex-wrap: wrap; }
  .tour-actions button:last-child { margin-left: 0; }
  .welcome-shell { padding: 24px 20px; }
  .welcome-brand { margin-bottom: 26px; }
  .welcome-brand img { width: 48px; height: 48px; }
  .welcome-language { top: 22px; right: 18px; }
  .welcome-actions { align-items: stretch; flex-direction: column-reverse; }
  .welcome-actions button { width: 100%; }
}

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

/* Visual fidelity: mirrors the compact MLMW instructor portal foundation. */
:root {
  --navy: #162b4d;
  --navy-2: #395d76;
  --blue: #377f9c;
  --blue-soft: #edf7fb;
  --orange: #e88a3f;
  --orange-soft: #fff5ed;
  --sage: #4f7868;
  --sage-soft: #e8f3ed;
  --red: #993c36;
  --red-soft: #fdf6f4;
  --ink: #30334d;
  --muted: #627687;
  --line: #cbd9e4;
  --canvas: #f8f6f8;
  --shadow: 0 6px 18px rgba(31,74,96,.07);
  --radius: 12px;
}

body { font: 14px/1.4 "Segoe UI", Arial, sans-serif; }
.demo-banner { min-height: 32px; padding: 5px 14px; color: #704522; background: #fff2e6; font-size: 12px; }
.demo-banner button { padding: 3px 8px; border-color: #d6a06e; border-radius: 6px; font-size: 12px; }
.app-header { min-height: 64px; grid-template-columns: 220px minmax(0,1fr) auto; gap: 6px; padding: 0 12px; border-bottom-color: #d9e8ee; background: #fff; backdrop-filter: none; }
.logo { gap: 10px; }
.logo img { width: 52px; height: 42px; }
.logo-wordmark { font-family: "Segoe UI", Arial, sans-serif; font-size: 18px; font-weight: 900; line-height: .95; letter-spacing: 0; }
.logo-wordmark strong:first-child { color: #c45b5d; }
.logo-wordmark strong:last-child { color: #e88a3f; }
.main-nav { gap: 4px; }
.nav-item { min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; color: #24304d; font-size: 12px; font-weight: 820; }
.nav-item:hover { color: #377f9c; background: #f2f8fb; }
.nav-item.active { color: #377f9c; border: 0; background: #edf7fb; box-shadow: inset 0 0 0 1px rgba(79,160,191,.24), inset 0 -2px 0 #e88a3f; }
.nav-item.nav-absence { margin-left: 4px; border-color: #d8e8ee; border-radius: 8px; color: #395d76; background: #fff; }
.nav-count { min-width: 20px; height: 20px; font-size: 11px; }
.header-actions { gap: 5px; }
.icon-button, .guide-button { min-height: 36px; border-radius: 8px; font-size: 12px; }
.icon-button { width: 38px; }
.guide-button { padding: 0 9px; }
.language-switch { padding: 3px; border-color: #d6e4ea; border-radius: 10px; background: #f2f7fa; }
.language-switch button { min-width: 34px; min-height: 28px; font-size: 11px; }
.language-switch button[aria-pressed="true"] { color: #276f8c; background: #fff; box-shadow: 0 2px 8px rgba(31,63,83,.12), inset 0 0 0 1px rgba(79,160,191,.32); }
.exit-link { font-size: 12px; }

.app-main { width: min(1320px, calc(100% - 36px)); padding: 14px 0 52px; }
.page-heading { align-items: center; gap: 22px; margin-bottom: 12px; }
.page-heading h1 { margin: 3px 0 4px; font-size: 22px; line-height: 1.25; letter-spacing: 0; }
.page-heading p { font-size: 13px; }
.kicker { font-size: 11px; letter-spacing: .07em; }
.today { min-width: 205px; padding: 9px 12px; border-radius: 8px; }
.today span, .today small { font-size: 11px; }
.card { border-radius: 12px; box-shadow: var(--shadow); }
.card-head { gap: 14px; padding: 12px 14px; }
.card-head h2 { margin-top: 3px; font-size: 20px; line-height: 1.3; }
.primary { background: #395d76 !important; border-color: #395d76 !important; }

.priority-panel { margin-bottom: 12px; border-color: #cbd9e4; border-radius: 12px; box-shadow: var(--shadow); }
.priority-title { gap: 11px; padding: 10px 18px; border-bottom-color: #d8e1eb; background: #eef4f8; }
.priority-title h2 { font-size: 20px; line-height: 1.3; }
.priority-title p { font-size: 13px; }
.panel-icon { width: 30px; height: 30px; border-radius: 6px; }
.priority-list button { min-height: 52px; gap: 10px; padding: 8px 18px; border-bottom-color: #edf1f5; }
.priority-list button:last-child { background: #f5f8fa; }
.priority-number { min-width: 28px; height: 28px; border-radius: 5px; font-size: 13px; }
.priority-list strong { font-size: 15px; line-height: 1.35; }
.priority-list small { font-size: 13px; line-height: 1.35; }

.schedule-layout, .course-workspace, .dossier-grid, .absence-layout { gap: 10px; padding: 14px; border-color: #cbd9e4; border-radius: 12px; box-shadow: var(--shadow); }
.schedule-layout { grid-template-columns: minmax(0,1.45fr) minmax(350px,.75fr); }
.week-grid { grid-template-columns: 58px repeat(5,1fr); min-height: 552px; padding: 0 8px 8px; }
.time-rail { height: 517px; margin-top: 34px; font-size: 12px; }
.time-rail span:nth-child(1) { top:0; }.time-rail span:nth-child(2) { top:47px; }.time-rail span:nth-child(3) { top:94px; }.time-rail span:nth-child(4) { top:141px; }.time-rail span:nth-child(5) { top:188px; }.time-rail span:nth-child(6) { top:235px; }.time-rail span:nth-child(7) { top:282px; }.time-rail span:nth-child(8) { top:329px; }.time-rail span:nth-child(9) { top:376px; }.time-rail span:nth-child(10) { top:423px; }.time-rail span:nth-child(11) { top:470px; }
.day-column { height: 517px; margin-top: 34px; border-right-color: #e0e7ec; background: repeating-linear-gradient(to bottom,transparent 0,transparent 46px,#e8edf1 46px,#e8edf1 47px); }
.day-column header { height: 34px; gap: 5px; border-bottom-color: #d9e8ee; background: #fff; font-size: 12px; }
.day-column header span { font-size: 14px; }
.class-event { right: 3px; left: 3px; min-height: 45px; gap: 1px; padding: 3px 5px; border-radius: 6px; box-shadow: 0 2px 5px rgba(31,74,96,.1); }
.class-event small { font-size: 11px; line-height: 1.1; }
.class-event strong { margin: 1px 0 0; font-size: 13px; line-height: 1.08; }
.class-event span { font-size: 11px; line-height: 1.1; }
.class-event.selected { outline: 2px solid #395d76; outline-offset: 1px; box-shadow: 0 2px 5px rgba(31,74,96,.1); }
.class-event.time-0900 { top:94px; }.class-event.time-1030 { top:165px; }.class-event.time-1300 { top:282px; }.class-event.time-1400 { top:329px; }
.class-event.duration-60 { height:45px; }.class-event.duration-90 { height:69px; }
.class-detail { top: 78px; padding: 14px; }
.class-detail h2 { margin: 12px 0 3px; font-size: 18px; line-height: 1.3; }
.detail-time { margin-top: 3px; font-size: 13px; }
.class-detail dl { gap: 8px; margin: 14px 0; }
.class-detail dl div { min-height: 58px; padding: 9px; border-radius: 7px; background: #f4f7fa; }
.class-detail dt { font-size: 11px; }.class-detail dd { font-size: 13px; }
.detail-actions button, .course-actions button, .info-card button, .dossier-wide button { min-height: 36px; border-radius: 6px; font-size: 13px; }
.participant-list { margin-top: 14px; padding-top: 12px; }

.month-switch { margin-bottom: 12px; padding: 8px 12px; }
.month-switch button { min-width: 175px; padding: 8px 12px; border-radius: 10px; }
.timesheet-layout { gap: 12px; }
.group-summary { padding: 14px; border-radius: 10px; }
.attendance-table th, .attendance-table td { padding: 10px; }
.attendance-table th { font-size: 13px; }.attendance-table td:first-child { font-size: 13px; }
.save-row { padding: 12px 14px; }
.save-row button { min-height: 36px; border-radius: 6px; font-size: 13px; }

.report-tabs { margin-bottom: 12px; }
.report-tabs button { min-height: 36px; border-radius: 8px; font-size: 13px; }
.report-grid { gap: 6px; padding: 10px; border-radius: 12px; }
.report-card { min-height: 58px; gap: 11px; padding: 8px 10px; border-radius: 8px; }
.report-card-head b { width: 32px; height: 32px; border-radius: 7px; }
.report-card > button { min-height: 36px; border-radius: 8px; font-size: 12px; }

.course-workspace { grid-template-columns: 290px minmax(0,1fr); }
.course-sidebar, .course-content, .profile-card, .info-card, .dossier-wide, .absence-form, .impact-card { padding: 18px; }
.course-content h2 { margin: 12px 0 5px; font-size: 22px; }
.objective-grid { gap: 8px; margin: 18px 0; }
.objective-grid div { min-height: 105px; padding: 13px; border-radius: 8px; background: #f4f7fa; }
.dossier-grid { background: #f5f8fa; }
.avatar { width: 68px; height: 68px; border-radius: 16px; }
.form-grid { gap: 12px; }
.form-grid input, .form-grid select, .form-grid textarea, .dialog-field textarea, .report-form textarea { min-height: 38px; padding: 8px 10px; border-radius: 7px; }
.absence-form > button, .impact-card button { min-height: 38px; border-radius: 7px; font-size: 13px; }

.welcome-dialog, .completion-dialog { border-radius: 12px; }
.welcome-shell, .completion-shell { padding: 28px; }
.welcome-dialog h2, .completion-dialog h2 { letter-spacing: 0; }
.tour-popover { right: 104px; bottom: 24px; padding: 18px; border-radius: 12px; box-shadow: 0 12px 36px rgba(31,74,96,.22); }
.tour-popover h2 { font-size: 20px; line-height: 1.3; }
.tour-actions button { min-height: 36px; border-radius: 6px; font-size: 12px; }

@media (max-width: 1420px) {
  .app-header { grid-template-columns: 180px minmax(0,1fr); padding: 6px 12px; }
  .header-actions { grid-column: 1 / -1; padding-top: 6px; }
}
@media (max-width: 920px) {
  .app-main { width: min(100% - 24px,1320px); padding-top: 12px; }
  .schedule-layout, .course-workspace, .absence-layout, .timesheet-layout { grid-template-columns: 1fr; }
  .class-detail { position: static; }
}
@media (max-width: 620px) {
  .app-header { position: static; display: flex; flex-wrap: wrap; padding: 8px 10px; }
  .logo img { width: 46px; height: 38px; }
  .logo-wordmark { font-size: 16px; }
  .main-nav { order: 3; width: 100%; padding-top: 6px; }
  .header-actions { margin-left: auto; padding: 0; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 21px; }
  .priority-list button { min-height: 56px; }
  .tour-popover { right: 12px; bottom: 88px; width: calc(100% - 24px); }
  .completion-actions { align-items: stretch; flex-direction: column; }
  .completion-actions button, .completion-actions a { width: 100%; }
}

/* v6 cascade lock: these rules intentionally follow the legacy demo theme. */
.app-header { grid-template-columns:176px minmax(500px,1fr) auto; gap:12px; padding:6px 16px; }
.main-nav { justify-content:flex-start; }
.nav-item { min-height:38px; padding:0 10px; border-radius:0; font-size:12px; font-weight:650; }
.nav-item>span:first-child { color:inherit; font-size:inherit; }
.nav-item.active { border-bottom-color:transparent; background:#eaf1f7; box-shadow:inset 0 -3px #e88a3f; }
.nav-item.nav-absence { min-height:34px; margin-left:6px; padding:0 9px; border-color:#d8c3aa; border-radius:6px; background:#fffaf5; }
.header-actions { gap:5px; }
.icon-button,.guide-button { min-height:34px; border-radius:6px; }
.app-main { width:min(1380px,calc(100% - 28px)); padding-top:14px; }
.schedule-layout { grid-template-columns:minmax(0,1.45fr) minmax(350px,.75fr); gap:0; padding:0; overflow:hidden; }
.calendar-card { border:0; border-radius:0; box-shadow:none; }
.class-detail { top:78px; padding:14px; border:0; border-left:1px solid #cbd9e4; border-radius:0; }
.group-summary { padding:0; overflow:hidden; }
.report-workarea .report-tabs { gap:4px; margin:-3px 0 0; padding:0; border-bottom:1px solid #d7e1eb; }
.report-workarea .report-tabs button { min-height:44px; padding:8px 11px; border:0; border-radius:7px 7px 0 0; color:#52657e; background:transparent; font-size:12px; }
.report-workarea .report-tabs button.active { color:#203953; border-color:transparent; background:#eaf0f6; box-shadow:inset 0 -3px #4b6684; }
.report-workarea .report-grid { margin-top:12px; padding:0; border:0; background:transparent; }
.record-shell .dossier-grid { padding:0; border:0; background:transparent; box-shadow:none; }
.absence-modal-view>.absence-layout { grid-template-columns:1.15fr .85fr; gap:0; padding:0; }
@media(max-width:1420px){.app-header{grid-template-columns:160px minmax(0,1fr)}.main-nav{justify-content:center}.account-chip{display:none}}
@media(max-width:920px){.schedule-layout,.absence-modal-view>.absence-layout{grid-template-columns:1fr}.class-detail{position:static;border-left:0;border-top:1px solid #cbd9e4}.record-shell{grid-template-columns:1fr}}
@media(max-width:620px){.app-header{position:static;display:flex;flex-wrap:wrap;padding:8px 10px}.main-nav{order:3;width:100%;padding-top:6px}.header-actions{margin-left:auto;padding:0}.absence-modal-view.active{padding:12px}}
