:root {
  color-scheme: light;
  --ink: #182333;
  --muted: #788397;
  --faint: #a4adbb;
  --line: #e8ecf2;
  --surface: #fff;
  --canvas: #f5f7fb;
  --navy: #182435;
  --navy-soft: #223149;
  --blue: #4976ed;
  --blue-dark: #315fd4;
  --blue-pale: #eff4ff;
  --green: #20a575;
  --green-pale: #eaf8f1;
  --amber: #d78a20;
  --amber-pale: #fff5e6;
  --red: #d9515f;
  --shadow: 0 10px 30px rgba(31, 46, 72, .06);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 'DM Sans', 'Segoe UI', sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 250px; background: var(--navy); color: #d5dceb; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 23px 14px 16px; overflow: hidden; }
.brand { display: flex; align-items: center; justify-content: center; margin: 0 2px 23px; padding: 8px; border-radius: 8px; background: #fff; text-decoration: none; flex: 0 0 auto; }
.brand-logo { display: block; width: 100%; max-height: 72px; object-fit: contain; }
.workspace-switcher { display: flex; align-items: center; gap: 10px; border: 1px solid #35445b; border-radius: 9px; padding: 10px 9px; margin: 1px 3px 16px; background: rgba(255,255,255,.035); flex: 0 0 auto; }
.school-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: #dce7ff; background: #354d76; font: 700 13px 'Manrope', sans-serif; }
.workspace-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.workspace-name strong { color: #f4f6fa; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-name small { color: #93a0b3; font-size: 10px; margin-top: 1px; }
.chevron { color: #96a2b5; font-size: 17px; line-height: 1; }
.nav-label { padding: 0 12px; margin-bottom: 8px; color: #718099; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.nav-label-spaced { margin-top: 23px; }
.main-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 2px 8px; display: flex; flex-direction: column; gap: 4px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group[hidden] { display: none !important; }
.nav-group-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; border: 0; margin: 0; padding: 8px 10px;
  border-radius: 7px; background: transparent; color: #718099;
  font-size: 9px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  cursor: pointer; text-align: left;
}
.nav-group-toggle:hover { color: #c5d0e0; background: rgba(255,255,255,.04); }
.nav-group-chevron { font-size: 11px; line-height: 1; color: #8495ad; transition: transform .15s ease; }
.nav-group.is-collapsed .nav-group-chevron { transform: rotate(-90deg); }
.nav-group.is-collapsed .nav-group-body { display: none; }
.nav-group-body { display: flex; flex-direction: column; gap: 1px; padding: 0 0 4px; }
.nav-item { width: 100%; border: 0; padding: 9px 11px; background: transparent; color: #aab5c6; display: flex; align-items: center; gap: 12px; text-align: left; border-radius: 7px; margin: 2px 0; font-size: 12px; transition: .15s ease; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: #2b3b55; color: #fff; box-shadow: inset 2px 0 #7797ff; }
.nav-icon { width: 17px; color: #8495ad; font-size: 17px; text-align: center; line-height: 1; }
.nav-item.active .nav-icon { color: #91aaff; }
.nav-count { margin-left: auto; padding: 1px 6px; border-radius: 8px; background: #29384d; color: #aebbd0; font-size: 10px; }
.engine-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0;
  padding: 0 10px 0 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
}
.engine-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #f0c36a; box-shadow: 0 0 0 3px rgba(240, 195, 106, .22); }
.engine-mini.connected .engine-dot { background: #5dffb0; box-shadow: 0 0 0 3px rgba(93, 255, 176, .22); }
.engine-mini > span:nth-child(2) { display: flex; flex-direction: column; flex: 0 1 auto; min-width: 0; line-height: 1.2; }
.engine-mini strong { color: #fff; font-size: 10px; font-weight: 700; }
.engine-mini small { color: rgba(255, 255, 255, .78); font-size: 9px; }
.profile-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #0878bf; background: #fff; font-weight: 700; font-size: 11px; flex: 0 0 auto; }
.topbar-account {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-width: min(220px, 28vw);
  padding: 0 6px 0 8px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
}
.topbar-account-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.topbar-account-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-account-copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, .78);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.more-dots { color: #91a0b6; font-weight: 700; letter-spacing: 1px; }
.main-area { margin-left: 250px; width: calc(100% - 250px); min-height: 100vh; }
.topbar { height: 63px; border-bottom: 1px solid #e9edf3; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); }
.server-clock {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 132px;
  margin: 0;
  padding: 4px 12px;
  line-height: 1.1;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 10px;
  background: rgba(0, 0, 0, .22);
  color: #fff;
}
.server-clock-time {
  display: block;
  font: 700 20px/1 'Manrope', sans-serif;
  letter-spacing: -.3px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.server-clock-date {
  display: block;
  margin-top: 3px;
  font: 600 10px/1.2 'Manrope', sans-serif;
  color: rgba(255, 255, 255, .88);
  letter-spacing: .02em;
  white-space: nowrap;
}
.server-clock-badge {
  margin-top: 4px; font: 700 8px/1 'Manrope', sans-serif; letter-spacing: .06em; text-transform: uppercase;
  color: #7a4a00; background: #ffd27a; border-radius: 999px; padding: 2px 7px;
}
.server-clock-badge.is-paused { color: #fff; background: #d94a57; }
.server-clock-badge.hidden { display: none !important; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #8993a2; }
.breadcrumb b { color: #c5cbd4; font-weight: 400; }
.breadcrumb strong { color: #374357; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.term-chip { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 10px; color: #768196; border: 1px solid #e7eaf0; border-radius: 7px; background: #fff; font-size: 10px; }
.term-chip strong { color: #354156; font-weight: 600; }
.term-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.icon-button { width: 27px; height: 27px; border: 1px solid #e4e8ef; border-radius: 50%; color: #6c788c; background: white; font-weight: 600; font-size: 12px; }
.top-avatar { width: 28px; height: 28px; }
.mobile-menu { display: none; border: 0; color: var(--ink); background: transparent; font-size: 18px; }
.page-content { max-width: 1420px; margin: 0 auto; padding: 31px 38px 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 25px; }
.page-heading h1 { margin: 2px 0 4px; font: 700 25px/1.25 'Manrope', sans-serif; letter-spacing: -.8px; color: #192537; }
.page-heading p { margin: 0; color: #8390a2; font-size: 12px; }
.eyebrow { color: #8793a5; text-transform: uppercase; letter-spacing: 1px; font-size: 9px; font-weight: 700; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.btn { min-height: 35px; border: 1px solid #e0e5ed; border-radius: 6px; padding: 0 12px; color: #506078; background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 600; transition: .15s ease; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c8d3e6; background: #fbfcfe; }
.btn-primary { border-color: var(--blue); color: #fff; background: var(--blue); box-shadow: 0 3px 8px rgba(73,118,237,.18); }
.btn-primary:hover { color: #fff; border-color: var(--blue-dark); background: var(--blue-dark); }
.btn-primary:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-danger { color: var(--red); }
.btn-sm { min-height: 29px; padding: 0 9px; font-size: 10px; }
.button-plus { font-size: 17px; font-weight: 400; line-height: 0; margin-top: -2px; }
.card { background: var(--surface); border: 1px solid #e9edf3; border-radius: 9px; box-shadow: 0 2px 8px rgba(34,52,78,.018); }
.overview-hero { min-height: 178px; display: flex; align-items: center; justify-content: space-between; padding: 25px 28px; border: 1px solid #e2eaff; border-radius: 10px; background: linear-gradient(112deg, #f1f5ff 0%, #f7f9ff 49%, #edf6f7 100%); position: relative; overflow: hidden; }
.overview-hero:after { content: ''; position: absolute; width: 270px; height: 270px; border-radius: 50%; border: 1px solid rgba(85,123,219,.09); right: 15%; top: -145px; box-shadow: 0 0 0 26px rgba(85,123,219,.025), 0 0 0 54px rgba(85,123,219,.02); }
.hero-copy { position: relative; z-index: 1; max-width: 560px; }
.hero-copy .eyebrow { color: #6683cf; }
.hero-copy h2 { margin: 7px 0 7px; color: #20314e; font: 700 21px/1.35 'Manrope', sans-serif; letter-spacing: -.6px; }
.hero-copy p { max-width: 480px; margin: 0 0 18px; color: #728099; font-size: 11px; }
.hero-actions { display: flex; align-items: center; gap: 8px; }
.hero-illustration { width: 180px; height: 124px; margin-right: 6%; position: relative; z-index: 1; }
.illustration-board { position: absolute; inset: 7px 10px; border: 1px solid #dbe4f7; border-radius: 9px; background: rgba(255,255,255,.75); box-shadow: 0 15px 30px rgba(70,98,163,.08); padding: 12px; transform: rotate(3deg); }
.ill-line { height: 7px; width: 42px; border-radius: 6px; background: #dce6f9; margin-bottom: 11px; }
.ill-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.ill-grid span { height: 21px; border-radius: 4px; background: #eef2fa; }
.ill-grid span:nth-child(3n+1) { background: #dce7ff; }
.ill-grid span:nth-child(4n+2) { background: #dbf2e9; }
.ill-check { position: absolute; right: 1px; bottom: 3px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #33ad80; border: 4px solid #f4f8ff; color: #fff; font-size: 15px; box-shadow: 0 5px 12px rgba(39,160,117,.22); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 18px 0; }
.stat-card { padding: 14px 16px; min-height: 84px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: #8490a2; font-size: 10px; }
.stat-icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; }
.stat-icon.blue { color: #5376d5; background: #edf2ff; }
.stat-icon.green { color: #27a478; background: #e9f7f1; }
.stat-icon.gold { color: #cf8c2e; background: #fff4e4; }
.stat-icon.purple { color: #8868c2; background: #f2edfb; }
.stat-value { margin-top: 5px; color: #233047; font: 700 22px 'Manrope', sans-serif; letter-spacing: -.7px; }
.stat-foot { color: #9ba5b4; font-size: 9px; margin-top: -1px; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .92fr); gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 17px; border-bottom: 1px solid #edf0f4; }
.card-head h3 { margin: 0; color: #273348; font: 700 12px 'Manrope', sans-serif; }
.card-head p { margin: 3px 0 0; color: #929cac; font-size: 9px; }
.card-body { padding: 15px 17px; }
.step-list { display: flex; flex-direction: column; }
.step-item { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; }
.step-number { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 50%; color: #5579d4; background: #edf2ff; font-size: 10px; font-weight: 700; }
.step-number.done { color: #1e9b6f; background: #e6f7ef; }
.step-copy { flex: 1; }
.step-copy strong { display: block; color: #384458; font-size: 10px; font-weight: 600; }
.step-copy small { display: block; margin-top: 2px; color: #98a1af; font-size: 9px; }
.step-action { align-self: center; color: #5b7bd1; border: 0; padding: 4px 0; background: none; font-size: 9px; font-weight: 700; }
.step-divider { height: 1px; margin-left: 33px; background: #f0f2f6; }
.engine-card { padding: 16px 17px; background: #fff; }
.engine-card-top { display: flex; align-items: center; gap: 11px; }
.engine-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: #edf3ff; color: #5379e5; font: 700 12px 'Manrope', sans-serif; }
.engine-card-top strong { display: block; color: #2e3b50; font-size: 11px; }
.engine-card-top small { display: block; margin-top: 2px; color: #94a0af; font-size: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 4px 8px; color: #b77c20; background: #fff4e0; font-size: 9px; font-weight: 700; }
.status-pill:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.connected { color: #218d67; background: #e9f7f0; }
.engine-note { margin: 14px 0 13px; padding-top: 12px; border-top: 1px solid #edf0f4; color: #8491a3; font-size: 10px; line-height: 1.65; }
.engine-note strong { color: #56647a; font-weight: 600; }
.engine-link { display: flex; justify-content: space-between; align-items: center; color: #5c79cf; font-size: 10px; font-weight: 600; text-decoration: none; }
.engine-link:hover { color: #355ebd; }
.setup-banner { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin-bottom: 15px; border-radius: 7px; color: #8a6122; background: #fff7e9; border: 1px solid #faedd4; font-size: 10px; }
.setup-banner strong { color: #735018; }
.banner-symbol { width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 21px; border-radius: 50%; color: #ae741c; background: #ffedc8; font-weight: 700; }
.banner-link { margin-left: auto; color: #9d6a1a; border: 0; background: none; font-size: 10px; font-weight: 700; white-space: nowrap; }
.data-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid #edf0f4; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.search-box { position: relative; width: min(260px, 100%); }
.search-box input { width: 100%; height: 31px; border: 1px solid #e6eaf1; border-radius: 6px; padding: 0 10px 0 31px; outline: none; color: #415069; background: #fff; font-size: 10px; }
.search-box input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #94aef4; box-shadow: 0 0 0 3px rgba(73,118,237,.1); }
.search-symbol { position: absolute; left: 10px; top: 7px; color: #98a3b2; font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { height: 35px; padding: 0 15px; color: #8995a6; background: #fbfcfe; text-align: left; text-transform: uppercase; letter-spacing: .6px; font-size: 8px; font-weight: 700; white-space: nowrap; }
td { padding: 10px 15px; color: #4a576b; border-top: 1px solid #f0f2f6; font-size: 10px; white-space: nowrap; }
tbody tr:hover { background: #fcfdff; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; color: #5474c4; background: #edf2ff; font-size: 9px; font-weight: 700; }
.person-cell strong { display: block; color: #344156; font-size: 10px; font-weight: 600; }
.person-cell small { display: block; color: #98a2b0; font-size: 9px; }
.subject-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.pill { display: inline-flex; align-items: center; border-radius: 5px; padding: 3px 7px; color: #627187; background: #f1f3f7; font-size: 9px; }
.pill.blue { color: #5273c8; background: #edf2ff; }
.pill.green { color: #218b65; background: #e8f6ef; }
.pill.muted { color: #8a93a3; background: #eef0f3; }
.muted-block { display: block; color: #98a2b0; font-size: 9px; margin-top: 2px; }
.constraint-shell { padding-bottom: 0; }
.constraint-domain-tabs { display: flex; gap: 0; padding: 0 15px; border-bottom: 1px solid #edf0f4; }
.constraint-domain-tab { min-width: 88px; padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #6a778b; font: 700 12px 'Manrope', sans-serif; cursor: pointer; }
.constraint-domain-tab.active { color: #3d5fbf; border-bottom-color: #527cf1; }
.fet-time-menu-wrap { position: relative; padding: 18px 15px 8px; z-index: 1; }
.fet-timetable-menu-wrap { width: 100%; margin: 0 auto; position: relative; z-index: 1; }
.fet-timetable-toolbar,
.fet-timetable-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  overflow: visible;
}
.fet-timetable-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: #d7dee8;
  flex: 0 0 auto;
  align-self: center;
}
.fet-timetable-tool,
.fet-timetable-cell { position: relative; flex: 0 0 auto; }
.fet-timetable-option {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #e1e6ee;
  border-radius: 7px;
  background: #fff;
  color: #344156;
  font: 600 12px 'Manrope', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
a.fet-timetable-option { color: #344156; }
.staff-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 4px 15px 16px;
}
.staff-view-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  min-height: 110px;
  padding: 16px;
  border: 1px solid #d9e1ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  color: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(36, 54, 84, .05);
  cursor: pointer;
  font: inherit;
}
.staff-view-card strong {
  color: #1e2b40;
  font: 800 15px/1.2 Manrope, sans-serif;
}
.staff-view-card span {
  color: #7b8798;
  font-size: 12px;
}
.staff-view-card.is-ready:hover {
  border-color: #b7c8f3;
  background: #eef3ff;
}
.staff-view-card.is-waiting {
  background: #f4f6f9;
  border-style: dashed;
  cursor: default;
  box-shadow: none;
}
.fet-timetable-option:hover,
.fet-timetable-tool.open > .fet-timetable-option,
.fet-timetable-cell.open > .fet-timetable-option { border-color: #cbd5e3; background: #f5f7fb; color: #334155; }
.fet-timetable-option.active,
.fet-timetable-tool.active > .fet-timetable-option,
.fet-timetable-cell.active > .fet-timetable-option { border-color: #c9d7ff; background: #edf2ff; color: #3d5fbf; }
.fet-timetable-popup {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% - 2px);
  z-index: 40;
  min-width: max(100%, 260px);
  max-width: min(420px, 90vw);
  max-height: min(70vh, 480px);
  overflow: auto;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 30, 48, .14);
}
.fet-timetable-toolbar > .fet-timetable-tool:last-child .fet-timetable-popup,
.fet-timetable-menu > .fet-timetable-cell:last-child .fet-timetable-popup { left: auto; right: 0; }
/* Hover / focus shows submenu without changing the active page; .open pins it for touch. */
.fet-timetable-tool:hover > .fet-timetable-popup,
.fet-timetable-tool:focus-within > .fet-timetable-popup,
.fet-timetable-tool.open > .fet-timetable-popup,
.fet-timetable-cell:hover > .fet-timetable-popup,
.fet-timetable-cell:focus-within > .fet-timetable-popup,
.fet-timetable-cell.open > .fet-timetable-popup { display: block; }
.fet-timetable-tool:hover > .fet-timetable-option,
.fet-timetable-cell:hover > .fet-timetable-option {
  border-color: #cbd5e3;
  background: #f5f7fb;
  color: #334155;
}
.fet-timetable-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  color: #3f4c60;
  font: 600 12px 'Manrope', sans-serif;
  text-align: left;
  cursor: pointer;
}
.fet-timetable-popup-item:last-child { border-bottom: 0; }
.fet-timetable-popup-item.pair-end { border-bottom-width: 2px; border-bottom-color: #dfe5ee; }
.fet-timetable-popup-item:hover,
.fet-timetable-popup-item.active { background: #eef3ff; color: #3557b8; }
.fet-timetable-popup-item small { color: #7b8798; font-size: 10px; white-space: nowrap; }
.fet-timetable-popup.locking-popup { min-width: 320px; }
.time-horizontal { overflow-x: auto; }
.time-horizontal .timetable th small { display: block; font-weight: 600; color: #7b8798; }
.timetable-panel { padding: 4px 0 12px; }
.layouts-gallery { padding: 0 15px 8px; display: grid; gap: 16px; }
.layouts-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background:
    radial-gradient(1200px 180px at 0% 0%, rgba(73, 118, 237, .16), transparent 55%),
    linear-gradient(135deg, #f7f9fd 0%, #eef3ff 48%, #f8fafc 100%);
  border: 1px solid #e4eaf5;
}
.layouts-kicker {
  margin: 0 0 4px;
  color: #6b7ea8;
  font: 700 10px/1 'Manrope', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.layouts-hero h3 {
  margin: 0;
  color: #1e2b40;
  font: 700 22px/1.15 'Manrope', sans-serif;
}
.layouts-hero p { margin: 6px 0 0; color: #73819a; font-size: 12px; }
.layouts-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.layouts-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  background: #fff;
}
.layouts-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 2px;
}
.layouts-section-head h4 {
  margin: 0;
  color: #2b394e;
  font: 700 12px 'Manrope', sans-serif;
}
.layouts-section-head span { color: #93a0b3; font-size: 11px; }
.layout-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid transparent;
}
.layout-row.is-featured {
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7fc 100%);
  border-color: #e7edf7;
}
.layout-row-copy h4 {
  margin: 0;
  color: #243247;
  font: 700 13px 'Manrope', sans-serif;
}
.layout-row-copy p {
  margin: 3px 0 0;
  color: #8a96a8;
  font-size: 11px;
}
.layout-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.layout-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid #e5ebf4;
  background: #fff;
  color: inherit;
  text-decoration: none;
  text-align: left;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button.layout-tile { width: 100%; font: inherit; }
.layout-tile.is-live:hover {
  border-color: #b7c8f3;
  background: #f5f8ff;
  box-shadow: 0 8px 18px rgba(49, 78, 130, .08);
  transform: translateY(-1px);
}
.layout-tile.is-missing {
  background: #f3f5f8;
  border-style: dashed;
  color: #9aa6b7;
  cursor: default;
}
.layout-tile-label {
  color: #2a384d;
  font: 700 11px/1.25 'Manrope', sans-serif;
}
.layout-tile.is-missing .layout-tile-label { color: #9aa6b7; }
.layout-tile-meta { color: #7f8da3; font-size: 10px; }
.layout-tile.is-live .layout-tile-meta { color: #4f6fd0; }
.layouts-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 2px 4px;
}
.layout-extra-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #e3e9f3;
  background: #fff;
  color: #465872;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
}
.layout-extra-chip:hover { border-color: #c5d3f4; background: #f5f8ff; color: #3557b8; }
.layouts-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 15px 16px;
  padding: 18px 16px;
  border-radius: 12px;
  background: #f7f9fc;
  color: #7b8798;
  font-size: 12px;
}
.layouts-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(73, 118, 237, .45);
  animation: layouts-pulse 1.2s ease-out infinite;
}
@keyframes layouts-pulse {
  0% { box-shadow: 0 0 0 0 rgba(73, 118, 237, .35); }
  70% { box-shadow: 0 0 0 10px rgba(73, 118, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(73, 118, 237, 0); }
}
.layouts-empty-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 15px 12px;
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed #d5deea;
  background: linear-gradient(180deg, #fcfdff, #f5f8fc);
}
.layouts-empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eaf0ff;
  color: #4b6fe0;
  font-size: 18px;
}
.layouts-empty-card h3 { margin: 0; color: #2b394e; font: 700 14px 'Manrope', sans-serif; }
.layouts-empty-card p { margin: 4px 0 0; max-width: 420px; color: #8592a5; font-size: 12px; }
@media (max-width: 900px) {
  .layout-row { grid-template-columns: 1fr; }
  .layout-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.print-schedule-header { display: none; }
.print-schedule-logo { display: none; }
.print-schedule-sheet { width: 100%; }
.schedule-cell { min-height: 100%; }
.schedule-cell-empty { display: none; }
@media print {
  @page { size: A4 landscape; margin: 7mm 12mm; }
  html, body {
    width: 100% !important;
    height: auto !important;
    background: #fff !important;
    color: #1a2332 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .sidebar, .topbar, .constraint-domain-tabs, .fet-time-menu-wrap, .fet-timetable-shell,
  .page-heading, .heading-actions, .settings-tip, .toast, .modal-backdrop,
  .working-banner, .setup-banner, .constraint-section-head, .no-print,
  .lesson-lock, .lesson-active-toggle, .table-footer, .generate-options,
  .statistics-tabs, .statistics-col-filter-wrap, .statistics-filter-bar { display: none !important; }
  .app-shell, .main-area, .page-content, .card, .constraint-shell, .timetable-panel,
  .print-schedule-sheet, .print-schedule-grid, .print-statistics-sheet {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .print-schedule-header {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 0 16px;
    padding: 0 0 14px;
    text-align: center;
    border-bottom: 0;
  }
  .print-schedule-logo {
    display: block !important;
    width: auto;
    max-width: 280px;
    height: auto;
    max-height: 72px;
    margin: 0 0 6px;
    object-fit: contain;
  }
  .print-schedule-brand {
    margin: 0;
    color: #5b6b82;
    font: 600 12px/1.2 'Manrope', 'Segoe UI', sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  .print-schedule-rule {
    width: 56px;
    height: 2px;
    margin: 6px 0 8px;
    border-radius: 2px;
    background: linear-gradient(90deg, #7aa0ff, #3d5fbf 55%, #7aa0ff);
  }
  .print-schedule-eyebrow {
    margin: 0;
    color: #6a778b;
    font: 700 12px/1.2 'Manrope', 'Segoe UI', sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .print-schedule-title {
    margin: 2px 0 0;
    color: #152033;
    font: 800 28px/1.12 'Manrope', 'Segoe UI', sans-serif;
    letter-spacing: -.4px;
  }
  .print-schedule-meta {
    margin: 4px 0 0;
    color: #748197;
    font: 500 11px/1.4 'Manrope', 'Segoe UI', sans-serif;
  }
  .print-schedule-grid .table-wrap {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .print-schedule-grid .timetable.schedule-equal {
    min-width: 0 !important;
    width: 100% !important;
    height: auto;
    border-collapse: separate !important;
    border-spacing: 0;
    table-layout: fixed !important;
    border: 1.5px solid #2c3a51 !important;
    border-radius: 8px;
    overflow: hidden;
  }
  .print-schedule-grid .timetable.schedule-equal thead th {
    height: 52px;
    padding: 0 8px;
    vertical-align: middle;
    text-align: center;
    background: #1f2a3d !important;
    color: #fff !important;
    border: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, .14) !important;
    border-bottom: 1px solid #1f2a3d !important;
    font: 700 15px/1.2 'Manrope', 'Segoe UI', sans-serif;
    text-transform: none;
    letter-spacing: .02em;
  }
  .print-schedule-grid .timetable.schedule-equal thead th:last-child { border-right: 0 !important; }
  .print-schedule-grid .timetable.schedule-equal thead th small,
  .print-schedule-grid .timetable.schedule-equal .day-full,
  .print-schedule-grid .timetable.schedule-equal .period-time {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .78) !important;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
  }
  .print-schedule-grid .timetable.schedule-equal .schedule-corner {
    background: #182233 !important;
    color: rgba(255, 255, 255, .9) !important;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .print-schedule-grid .timetable.schedule-equal tbody th.schedule-row-label {
    height: 78px;
    padding: 8px 10px;
    vertical-align: middle;
    text-align: left;
    background: #f4f7fc !important;
    color: #243247 !important;
    border: 0 !important;
    border-top: 1px solid #b8c2d0 !important;
    border-right: 1px solid #b8c2d0 !important;
    font: 700 14px/1.3 'Manrope', 'Segoe UI', sans-serif;
  }
  .print-schedule-grid .timetable.schedule-equal tbody th.schedule-row-label .period-time {
    color: #7b8798 !important;
    font-size: 10px !important;
  }
  .print-schedule-grid .timetable.schedule-equal tbody td {
    height: 78px;
    padding: 5px !important;
    vertical-align: middle;
    background: #fff !important;
    color: #1a2332 !important;
    border: 0 !important;
    border-top: 1px solid #b8c2d0 !important;
    border-right: 1px solid #b8c2d0 !important;
  }
  .print-schedule-grid .timetable.schedule-equal tbody tr {
    height: 78px;
  }
  .print-schedule-grid .timetable.schedule-equal tbody tr:first-child th,
  .print-schedule-grid .timetable.schedule-equal tbody tr:first-child td {
    border-top: 0 !important;
  }
  .print-schedule-grid .timetable.schedule-equal tbody td:last-child,
  .print-schedule-grid .timetable.schedule-equal thead th:last-child {
    border-right: 0 !important;
  }
  .print-schedule-grid .schedule-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    height: 100%;
    min-height: 68px;
  }
  .print-schedule-grid .lesson-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-height: 62px;
    margin: 0 !important;
    padding: 7px 8px !important;
    border: 0 !important;
    border-left: 3px solid #5b7fe8 !important;
    border-radius: 5px;
    background: #eef3ff !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-schedule-grid .lesson-card.is-locked,
  .print-schedule-grid .lesson-card.is-unlocked { box-shadow: none !important; }
  .print-schedule-grid .lesson-card.green {
    background: #ecf8f2 !important;
    border-left-color: #39ad82 !important;
  }
  .print-schedule-grid .lesson-card.gold {
    background: #fff6e8 !important;
    border-left-color: #e0a449 !important;
  }
  .print-schedule-grid .lesson-card strong {
    color: #1e2d4a !important;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
  }
  .print-schedule-grid .lesson-card > span:not(.lesson-lock),
  .print-schedule-grid .lesson-card em {
    margin-top: 3px;
    color: #51627d !important;
    font-size: 10px;
    line-height: 1.3;
  }
  .print-schedule-grid .lesson-card.continues {
    min-height: 28px;
    opacity: .9;
    background: #f7f9fd !important;
    border-left-style: dashed !important;
  }
  .print-schedule-grid .lesson-card.is-deactivated,
  .print-schedule-grid .lesson-deactivated-label,
  .deactivated-under-timetable { display: none !important; }
  .print-schedule-grid .blocked-slot,
  .print-schedule-grid .available-slot,
  .print-schedule-grid .schedule-slot-cell.is-blocked-slot .blocked-slot,
  .print-schedule-grid .schedule-slot-cell.is-available-slot .available-slot {
    display: none !important;
  }
  .print-schedule-grid .schedule-slot-cell.is-blocked-slot,
  .print-schedule-grid .schedule-slot-cell.is-available-slot {
    background: #fff !important;
    outline: 0 !important;
  }
  .print-schedule-grid .schedule-cell-empty {
    display: block;
    flex: 1;
    min-height: 62px;
    border-radius: 5px;
    background: repeating-linear-gradient(
      -45deg,
      #fafbfd,
      #fafbfd 6px,
      #f3f5f9 6px,
      #f3f5f9 12px
    );
  }
}
.fet-time-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid #d9dee7;
  border-radius: 4px;
  background: #fff;
  overflow: visible;
}
.fet-time-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid #e4e9f0;
  border-bottom: 1px solid #e4e9f0;
  background: #fff;
  color: #4a5568;
  font: 600 13px 'Manrope', sans-serif;
  cursor: pointer;
}
.fet-time-option:nth-child(2n) { border-right: 0; }
.fet-time-option:nth-last-child(-n+2) { border-bottom: 0; }
.fet-time-option small { color: #8a95a6; font-size: 11px; font-weight: 600; }
.fet-time-option:hover { background: #f5f7fb; color: #334155; }
.fet-time-option.active { background: #edf2ff; color: #3d5fbf; }
.fet-time-option.active small { color: #6b86d4; }
.fet-flyout-anchor {
  position: absolute;
  left: 50%;
  top: calc(100% - 6px);
  transform: translateX(-50%);
  z-index: 30;
  padding-top: 6px;
}
.fet-flyout {
  display: block;
  min-width: 220px;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 30, 48, .14);
}
.fet-flyout-groups { background: #fff; }
.fet-flyout-row { position: relative; }
.fet-flyout-group, .fet-flyout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  color: #3f4c60;
  font: 600 12px 'Manrope', sans-serif;
  text-align: left;
  cursor: pointer;
}
.fet-flyout-row:last-child .fet-flyout-group { border-bottom: 0; }
.fet-flyout-item:last-child { border-bottom: 0; }
.fet-flyout-group:hover, .fet-flyout-item:hover { background: #eef3ff; }
.fet-flyout-row:hover > .fet-flyout-group,
.fet-flyout-group.active { background: #e7eeff; color: #3557b8; }
.fet-flyout-item.active { background: #edf2ff; color: #3557b8; }
.fet-flyout-chevron { color: #98a2b0; font-size: 16px; line-height: 1; }
.fet-flyout-submenu {
  display: none;
  position: absolute;
  left: calc(100% - 2px);
  top: 0;
  z-index: 31;
  min-width: min(360px, 70vw);
  max-height: min(420px, 70vh);
  overflow: auto;
  border: 1px solid #d0d6e0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 30, 48, .14);
}
.fet-flyout-row:hover > .fet-flyout-submenu,
.fet-flyout-row:focus-within > .fet-flyout-submenu {
  display: block;
}
/* Single-group menus (Advanced): keep submenu open while flyout is shown */
.fet-flyout-groups:has(> .fet-flyout-row:only-child) > .fet-flyout-row > .fet-flyout-submenu,
.fet-flyout-row.is-default:only-child > .fet-flyout-submenu {
  display: block;
  position: static;
  max-height: min(420px, 70vh);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.fet-flyout-groups:has(> .fet-flyout-row:only-child) > .fet-flyout-row > .fet-flyout-group {
  display: none;
}
.fet-flyout-item small { color: #7b8798; font-size: 10px; }
.constraint-path { margin: 4px 0 0; color: #7b8798; font-size: 10px; }
.constraint-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 15px 10px; }
.constraint-section-head h3 { margin: 0; color: #2b394e; font: 700 14px 'Manrope', sans-serif; }
.constraint-subhead { margin: 8px 15px 6px; color: #627187; font: 700 11px 'Manrope', sans-serif; }
.constraint-list-panel { padding-bottom: 8px; }
.filter-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.modal.modal-wide { width: min(960px, 100%); }
.avail-note { margin: 0 0 12px; color: #68768b; font-size: 10px; line-height: 1.55; }
.avail-note strong { color: #3f4f68; }
.avail-controls { margin-bottom: 12px; }
.avail-grid-wrap { overflow: hidden; border: 1px solid #b8c2d0; border-radius: 8px; background: #fbfcfe; }
.avail-grid { width: 100%; height: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.avail-grid th, .avail-grid td { border-bottom: 1px solid #b8c2d0; border-right: 1px solid #b8c2d0; text-align: center; vertical-align: middle; }
.avail-grid th:last-child, .avail-grid td:last-child { border-right: 0; }
.avail-grid thead th { padding: 0; color: #4f5d73; background: #f3f6fb; font-size: 10px; font-weight: 700; white-space: nowrap; }
.avail-grid tbody th { width: 96px; padding: 0; text-align: left; color: #556278; background: #f8fafc; font-size: 9px; font-weight: 600; }
.avail-axis-toggle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 28px;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.avail-col-toggle {
  align-items: center;
  font-weight: 700;
  letter-spacing: .02em;
}
.avail-row-toggle { padding: 4px 6px; text-align: left; }
.avail-axis-toggle:hover { background: #e8eef8; color: #3557b8; }
.avail-axis-toggle:focus-visible { outline: 2px solid #9db4ef; outline-offset: -2px; }
.avail-grid tbody th .avail-period-name { display: block; color: #334155; font-size: 10px; }
.avail-grid tbody th small { display: block; color: #94a0af; font-size: 8px; font-weight: 500; }
.avail-corner { width: 96px; padding: 6px 4px; }
.avail-cell { width: 100%; height: 100%; min-height: 28px; border: 0; border-radius: 0; background: #edf8f1; color: #b42318; font: 700 12px 'Manrope', sans-serif; cursor: pointer; }
.avail-cell.blocked { background: #fde8ea; }
.avail-cell.allowed { background: #edf8f1; color: transparent; }
.avail-cell.preferred { background: #e7efff; color: #3557b8; }
.avail-grid-wrap:not(.colored) .avail-cell.blocked,
.avail-grid-wrap:not(.colored) .avail-cell.preferred,
.avail-grid-wrap:not(.colored) .avail-cell.allowed { background: #fff; color: #334155; }
.avail-grid-wrap:not(.colored) .avail-cell.allowed { color: transparent; }
.activity-check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 10px; max-height: 180px; overflow: auto; padding: 8px; border: 1px solid #e4e9f0; border-radius: 7px; background: #fbfcfe; }
.time-scalar-grid { margin-bottom: 12px; }
.avail-cell:hover { outline: 2px solid #9db4ef; outline-offset: -2px; }
.avail-weight { max-width: 220px; margin-top: 12px; }
.avail-weight input { background: #f5f7fb; }
.avail-actions { align-items: center; margin-top: 0; padding-top: 12px; }
.avail-actions-spacer { flex: 1; }
.modal.modal-avail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(920px, calc(100vw - 32px));
  height: min(92vh, 720px);
  max-height: min(92vh, 720px);
}
.modal.modal-avail .modal-header {
  flex: 0 0 auto;
  padding: 14px 18px 10px;
}
.modal.modal-avail .modal-header h2 { font-size: 16px; }
.modal.modal-avail .modal-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 18px 0;
}
.modal.modal-avail .modal-form-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 0;
}
.modal.modal-avail .avail-note { margin: 0; font-size: 9px; line-height: 1.4; }
.modal.modal-avail .avail-controls { margin: 0; gap: 8px; }
.modal.modal-avail .avail-controls .field { margin: 0; }
.modal.modal-avail .avail-controls label { font-size: 10px; }
.modal.modal-avail .avail-controls select,
.modal.modal-avail .avail-controls input { min-height: 32px; font-size: 11px; }
.modal.modal-avail #availGridHost {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.modal.modal-avail .avail-grid-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal.modal-avail .avail-grid {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}
.modal.modal-avail .avail-grid tbody tr { height: calc((100% - 28px) / var(--avail-rows, 6)); }
.modal.modal-avail .avail-cell { min-height: 0; min-width: 0; font-size: 11px; }
.modal.modal-avail .avail-footer {
  flex: 0 0 auto;
  padding: 10px 0 14px;
  border-top: 1px solid #edf0f4;
  background: #fff;
}
.modal.modal-avail .avail-weight { margin: 0; max-width: 200px; }
.modal.modal-avail .avail-weight label { font-size: 10px; }
.modal.modal-avail .avail-weight input { min-height: 30px; }
.modal.modal-avail .avail-actions { border-top: 0; margin-top: 8px; padding-top: 0; }
.empty-state.compact { min-height: 120px; padding: 22px 16px; }
.hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.generate-options { margin: 0 0 12px; }
.generate-skip { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid #e4e9f0; border-radius: 8px; background: #f8fafc; color: #5f6d82; font-size: 10px; line-height: 1.4; cursor: pointer; }
.generate-skip input { margin-top: 2px; }
.row-inactive { opacity: 0.62; }
.row-inactive td { color: #8a93a3; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.row-action { width: 25px; height: 25px; display: grid; place-items: center; border: 0; border-radius: 5px; color: #98a2af; background: transparent; font-size: 12px; }
.row-action.edit,
.row-action.toggle { width: auto; padding: 0 8px; font-size: 10px; font-weight: 700; }
.row-action.edit { color: #4d6fce; }
.row-action.toggle { color: #6a7588; }
.row-action:hover { color: #4d6fce; background: #f1f4fb; }
.row-action.toggle:hover { color: #3f8f6d; background: #eaf7f1; }
.row-action.delete:hover { color: var(--red); background: #fff0f1; }
.table-footer { display: flex; justify-content: space-between; padding: 11px 15px; border-top: 1px solid #edf0f4; color: #97a1b0; font-size: 9px; }
.empty-state { min-height: 220px; padding: 34px 18px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 12px; color: #6582d1; background: #edf2ff; font-size: 20px; }
.empty-state h3 { margin: 0 0 4px; color: #3a485d; font: 700 13px 'Manrope', sans-serif; }
.empty-state p { max-width: 340px; margin: 0 0 15px; color: #909aaa; font-size: 10px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.filter-select { height: 32px; max-width: 220px; border: 1px solid #e5e9f0; border-radius: 6px; padding: 0 9px; color: #56647a; background: #fff; font-size: 10px; outline: 0; }
.timetable-card { overflow: hidden; }
.schedule-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; color: #7f8a9c; font-size: 9px; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-swatch { width: 7px; height: 7px; border-radius: 2px; background: #6889e6; }
.timetable { min-width: 720px; table-layout: fixed; border-collapse: collapse; border: 1px solid #b8c2d0; }
.timetable.schedule-equal { width: 100%; }
.timetable th,
.timetable td {
  border: 1px solid #b8c2d0;
}
.timetable th { height: 40px; text-align: center; }
.timetable .th-main { display: block; }
.day-full { display: block; color: #a0a9b7; font-size: 8px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.timetable th:first-child,
.timetable .schedule-corner { text-align: left; width: 106px; }
.timetable td { height: 78px; padding: 6px; vertical-align: top; white-space: normal; }
.timetable td:first-child,
.timetable th.schedule-row-label {
  background: #fbfcfe;
  color: #657187;
  font-size: 9px;
  font-weight: 600;
  vertical-align: middle;
  text-align: left;
  padding: 8px 10px 8px 14px;
}
.timetable th.schedule-row-label .period-time { display: block; margin-top: 2px; color: #a0a9b7; font-weight: 500; }
.schedule-cell { display: flex; flex-direction: column; gap: 4px; height: 100%; }
.interactive-schedule .lesson-card.interactive {
  cursor: grab;
  user-select: none;
  transition: transform .12s ease, box-shadow .12s ease, outline-color .12s ease;
}
.interactive-schedule .lesson-card.interactive:hover {
  box-shadow: 0 4px 14px rgba(40, 60, 100, .14);
  transform: translateY(-1px);
}
.interactive-schedule .lesson-card.interactive.is-picked,
.interactive-schedule .lesson-card.interactive.is-dragging {
  outline: 2px solid #527cf1;
  outline-offset: 1px;
  cursor: grabbing;
  opacity: .92;
}
.interactive-schedule .lesson-card.interactive.pin-drop-target {
  outline: 2px solid #1f9d6a;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(31, 157, 106, .22);
  background: #f0faf5;
}
.interactive-schedule .lesson-card.is-joint .lesson-joint-badge,
.lesson-joint-badge {
  display: inline-block;
  margin: 0 0 4px;
  padding: 1px 6px;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #0d6b45;
  background: #d8f3e6;
  cursor: pointer;
}
.lesson-joint-badge:hover {
  background: #c3ebd8;
  color: #085536;
}
.interactive-schedule .schedule-slot-cell {
  position: relative;
  transition: background .12s ease, box-shadow .12s ease;
}
.interactive-schedule .schedule-slot-cell.drop-ready {
  background: #f7faff;
}
.interactive-schedule .schedule-slot-cell.drag-over,
.interactive-schedule .schedule-slot-cell.drop-ready:hover {
  background: #eaf1ff !important;
  box-shadow: inset 0 0 0 2px #7aa0ff;
}
.schedule-interactive-tip,
.schedule-pick-tip { margin: 0 15px 12px; }
.schedule-pick-tip { border-color: #c9d8ff; background: #eef3ff; }
.timetable-context-menu {
  position: fixed;
  z-index: 80;
  min-width: 220px;
  max-width: min(300px, 90vw);
  padding: 6px;
  border: 1px solid #d0d6e0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 30, 48, .18);
}
.timetable-context-title {
  padding: 6px 10px 8px;
  color: #7b8798;
  font: 700 10px/1.2 'Manrope', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.timetable-context-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #314157;
  font: 600 12px/1.3 'Manrope', sans-serif;
  text-align: left;
  cursor: pointer;
}
.timetable-context-menu button:hover { background: #eef3ff; color: #3557b8; }
.lesson-card { position: relative; min-height: 61px; border-left: 3px solid #6b88e6; border-radius: 4px; background: #f0f4ff; padding: 7px 18px 5px 7px; color: #516595; }
.lesson-card.green { border-color: #39ad82; background: #ecf8f2; color: #387e67; }
.lesson-card.gold { border-color: #e0a449; background: #fff7e9; color: #967033; }
.lesson-card strong { display: block; color: #354b7f; font-size: 9px; line-height: 1.35; }
.lesson-card.green strong { color: #31765f; }
.lesson-card.gold strong { color: #8a6427; }
.lesson-card > span:not(.lesson-lock) { display: block; margin-top: 3px; color: #7d8aa5; font-size: 8px; }
.lesson-card em { display: block; margin-top: 3px; color: #91a0bc; font-size: 8px; font-style: normal; }
.lesson-card.continues { min-height: 0; background: #f7f8fb; }
.lesson-lock {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, .82);
  font-size: 11px;
  line-height: 1;
  opacity: .95;
  cursor: pointer;
}
.lesson-lock:hover { background: #fff; opacity: 1; transform: scale(1.08); }
.lesson-lock:focus-visible { outline: 2px solid #527cf1; outline-offset: 1px; }
.lesson-card.is-locked { box-shadow: inset 0 0 0 1px rgba(180, 120, 40, .22); }
.lesson-card.is-unlocked .lesson-lock { opacity: .7; }
.lesson-card.is-unlocked .lesson-lock:hover { opacity: 1; }
.lesson-active-toggle {
  position: absolute;
  top: 2px;
  right: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, .88);
  color: #6a778b;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.lesson-active-toggle.deactivate:hover { background: #fff1f1; color: #b42318; }
.lesson-active-toggle.reactivate:hover { background: #eaf8f1; color: #1f7a4d; }
.timetable-move-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 15px 12px;
  padding: 10px 12px;
  border: 1px solid #c9d8ff;
  border-radius: 8px;
  background: #eef3ff;
}
.timetable-move-confirm-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.timetable-move-confirm-copy strong {
  color: #2b4f9b;
  font: 700 12px 'Manrope', sans-serif;
}
.timetable-move-confirm-copy span {
  color: #4a5f86;
  font-size: 11px;
}
.timetable-move-warn {
  color: #9a4d18 !important;
  font-weight: 600;
}
.timetable-move-confirm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.schedule-slot-cell.pending-move-target {
  outline: 2px solid #3d5fbf;
  outline-offset: -2px;
  background: #eef3ff;
}
.schedule-slot-cell.pending-move-source {
  outline: 2px dashed #9aa3b2;
  outline-offset: -2px;
  opacity: .72;
}
.statistics-panel { display: flex; flex-direction: column; gap: 0; }
.statistics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 15px 10px;
}
.statistics-tab {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  color: #4a5b72;
  background: #fff;
  font: 650 12px 'Manrope', sans-serif;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.statistics-tab:hover { background: #f3f7fb; border-color: #c5d0de; }
.statistics-tab.active {
  border-color: #0878bf;
  color: #fff;
  background: #0878bf;
}
.statistics-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px 10px;
  color: #6b7c90;
  font: 600 11px 'Manrope', sans-serif;
}
.statistics-table-footer {
  padding: 0 15px 16px;
  color: #6b7c90;
  font: 600 11px 'Manrope', sans-serif;
}
.statistics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 0 15px 14px;
}
.statistics-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #f8fbfe 0%, #ffffff 70%),
    radial-gradient(120% 80% at 100% 0%, rgba(8, 120, 191, .08), transparent 55%);
}
.statistics-chip-label {
  color: #6b7c90;
  font: 650 10px/1.2 'Manrope', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.statistics-chip-value {
  color: #14324a;
  font: 750 22px/1 'Manrope', sans-serif;
}
.statistics-chip-value small {
  margin-left: 2px;
  color: #6b7c90;
  font-size: 12px;
  font-weight: 700;
}
.statistics-table-wrap {
  margin: 0 15px 18px;
  padding: 0;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 50, 74, .04);
}
.statistics-table {
  width: 100%;
  border-collapse: collapse;
}
.statistics-table thead th {
  padding: 0;
  border-bottom: 1px solid #d7e0ea;
  background: linear-gradient(180deg, #f4f8fc, #eef3f8);
  text-align: left;
  vertical-align: top;
}
.statistics-th.is-filtered {
  background: linear-gradient(180deg, #e8f4fc, #e3eef8);
}
.statistics-th-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 112px;
}
.statistics-col-filter-wrap {
  display: block;
  padding: 0 10px 10px;
}
.statistics-col-filter {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #d0dae6;
  border-radius: 7px;
  padding: 0 8px;
  color: #405468;
  background: #fff;
  font: 500 11px 'Manrope', sans-serif;
  outline: 0;
}
.statistics-col-filter::placeholder { color: #9aabbc; }
.statistics-col-filter:focus {
  border-color: #0878bf;
  box-shadow: 0 0 0 3px rgba(8, 120, 191, .12);
}
.statistics-col-filter.active {
  border-color: #0878bf;
  background: #f3f9fd;
}
.statistics-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f6;
  color: #405468;
  font: 500 12px/1.35 'Manrope', sans-serif;
  white-space: normal;
  vertical-align: middle;
}
.statistics-table tbody tr:last-child td { border-bottom: 0; }
.statistics-table tbody tr:nth-child(even) td { background: #fafcfe; }
.statistics-table tbody tr:hover td { background: #f0f7fc; }
.statistics-td-name { min-width: 160px; }
.statistics-td-name .cell-strong {
  color: #14324a;
  font-weight: 700;
}
.statistics-td-text {
  max-width: 280px;
  color: #5a6d82;
}
.statistics-td-metric {
  width: 1%;
  white-space: nowrap;
}
.statistics-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #06639e;
  background: #e7f4fc;
  font: 750 12px/1 'Manrope', sans-serif;
}
.statistics-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 8px 14px 6px;
  border: 0;
  color: #6b7c90;
  background: transparent;
  font: 700 10px/1 'Manrope', sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
.statistics-th.is-numeric .statistics-sort { justify-content: flex-start; }
.statistics-sort:hover { color: #0878bf; background: rgba(8, 120, 191, .06); }
.statistics-sort.active { color: #0878bf; }
.statistics-sort-arrow {
  display: inline-grid;
  place-items: center;
  width: 14px;
  color: #9aabbc;
  font-size: 11px;
}
.statistics-sort.active .statistics-sort-arrow { color: #0878bf; }
.print-statistics-sheet { width: 100%; }
.deactivated-under-timetable {
  margin: 14px 15px 4px;
  padding: 12px 14px;
  border: 1px solid #f0b6be;
  border-radius: 8px;
  background: #fff5f6;
}
.deactivated-under-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.deactivated-under-head h3 {
  margin: 0;
  color: #b42318;
  font: 700 13px 'Manrope', sans-serif;
}
.deactivated-under-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #fde8ea;
  color: #b42318;
  font: 700 10px 'Manrope', sans-serif;
}
.deactivated-under-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.deactivated-under-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #f3c9ce;
  border-radius: 6px;
  background: #fff;
}
.deactivated-under-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.deactivated-under-copy strong {
  color: #8d3140;
  font: 700 12px 'Manrope', sans-serif;
}
.deactivated-under-copy span {
  color: #a14b57;
  font-size: 10px;
}
.btn.deactivated-reactivate {
  flex: 0 0 auto;
  border-color: #e8a0a8;
  color: #b42318;
  background: #fff7f8;
}
.btn.deactivated-reactivate:hover {
  border-color: #d97782;
  background: #fde8ea;
}
.blocked-slot { border-radius: 4px; padding: 7px; color: #8a3d4a; background: #fde8ea; font-size: 9px; font-weight: 700; }
.blocked-slot.is-break { color: #8a3d4a; background: #fde8ea; }
.available-slot { border-radius: 4px; padding: 7px; color: #1f7a4d; background: #edf8f1; font-size: 9px; font-weight: 700; }
.interactive-schedule.is-marking-unavailable .schedule-slot-cell.mark-unavailable-ready {
  cursor: cell;
  outline: 1px dashed rgba(8, 120, 191, .35);
  outline-offset: -2px;
}
.interactive-schedule.is-marking-unavailable .schedule-slot-cell.is-available-slot {
  background: #edf8f1;
}
.interactive-schedule.is-marking-unavailable .schedule-slot-cell.is-blocked-slot {
  background: #fde8ea;
}
.interactive-schedule.is-marking-unavailable .schedule-slot-cell.mark-unavailable-ready:hover {
  outline-color: #0878bf;
  filter: brightness(0.97);
}
.schedule-slot-cell.is-blocked-slot .schedule-cell,
.schedule-slot-cell.is-available-slot .schedule-cell { min-height: 42px; }
.working-banner { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin-bottom: 15px; border-radius: 7px; color: #31507d; background: #eef3ff; border: 1px solid #d9e4fb; font-size: 12px; }
.working-banner strong { color: #24395d; }
.generation-error { margin-bottom: 14px; padding: 16px 17px; border-color: #f3c9ce; background: #fff7f8; }
.generation-error h3 { margin: 0 0 6px; color: #8d3140; font: 700 13px 'Manrope', sans-serif; }
.generation-error p { margin: 0 0 10px; color: #6d4450; font-size: 12px; }
.fet-details { max-height: 220px; overflow: auto; margin: 0; padding: 10px 12px; border-radius: 6px; background: #fff; color: #4c596c; white-space: pre-wrap; font: 11px/1.55 Consolas, 'Segoe UI', sans-serif; }
.modal.modal-gen-error .generation-error-summary { margin: 0 0 12px; color: #6d4450; font-size: 13px; line-height: 1.45; }
.modal.modal-gen-error .fet-details-modal { max-height: 50vh; margin-bottom: 12px; border: 1px solid #e8d0d4; background: #fffafa; }
.modal.modal-gen-error .settings-tip { margin-bottom: 12px; }
.filter-field { display: flex; align-items: center; gap: 6px; color: #7f8a9c; font-size: 10px; font-weight: 700; }
.found-actions { margin-top: 8px; }
.student-structure-tip { margin: 0 0 14px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); align-items: start; gap: 15px; }
.settings-section { padding: 17px; }
.settings-section + .settings-section { margin-top: 13px; }
.settings-section h3 { margin: 0 0 4px; color: #334055; font: 700 12px 'Manrope', sans-serif; }
.settings-section > p { margin: 0 0 15px; color: #8d98a8; font-size: 10px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title-row h3 { margin: 3px 0 4px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { color: #5b687c; font-size: 9px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 34px; border: 1px solid #e3e8ef; border-radius: 6px; padding: 7px 9px; color: #3f4c60; outline: none; background: #fff; font-size: 10px; }
.field textarea { resize: vertical; min-height: 69px; }
.field-hint { margin-top: -1px; color: #9ba5b3; font-size: 9px; }
.field-label { color: #5b687c; font-size: 9px; font-weight: 700; }
.day-checkboxes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-check { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid #e3e8ef; border-radius: 7px; background: #fff; cursor: pointer; text-align: center; }
.day-check input { margin: 0; }
.day-check span { color: #334055; font-size: 11px; font-weight: 700; }
.day-check small { color: #93a0b1; font-size: 8px; }
.day-check:has(input:checked) { border-color: #94aef4; background: #f3f7ff; box-shadow: 0 0 0 2px rgba(73,118,237,.08); }
.period-rows { display: flex; flex-direction: column; gap: 8px; }
.period-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; padding: 8px; border: 1px solid #edf0f4; border-radius: 7px; background: #fbfcfe; }
.period-index { display: grid; place-items: center; width: 28px; height: 34px; border-radius: 6px; color: #5579d4; background: #edf2ff; font-size: 11px; font-weight: 700; }
.period-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.period-field span { color: #7a8698; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.period-field input { width: 100%; min-height: 34px; border: 1px solid #e3e8ef; border-radius: 6px; padding: 7px 9px; color: #3f4c60; outline: none; background: #fff; font-size: 10px; }
.period-time { display: block; margin-top: 3px; color: #98a2b0; font-size: 8px; font-weight: 500; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #edf0f4; }
.settings-tip { padding: 12px; border: 1px solid #e5edff; border-radius: 7px; color: #74819a; background: #f6f8ff; font-size: 9px; line-height: 1.6; }
.settings-tip strong { color: #536caa; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(18,29,45,.4); backdrop-filter: blur(3px); }
.modal-backdrop.hidden { display: none; }
.modal { width: min(500px, 100%); max-height: min(90vh, 760px); overflow: auto; border-radius: 11px; background: #fff; box-shadow: 0 25px 70px rgba(14,28,54,.2); animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(5px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 15px; border-bottom: 1px solid #edf0f4; }
.modal-header h2 { margin: 3px 0 0; color: #26344a; font: 700 17px 'Manrope', sans-serif; letter-spacing: -.3px; }
.close-button { width: 28px; height: 28px; border: 0; border-radius: 6px; color: #8a95a4; background: #f5f6f9; font-size: 19px; line-height: 1; }
.modal-form { padding: 17px 22px 21px; }
.modal-form .field-grid { gap: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; margin-top: 15px; border-top: 1px solid #edf0f4; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 100; max-width: min(420px, calc(100vw - 30px)); padding: 11px 15px; border-radius: 7px; color: #fff; background: #25354a; box-shadow: 0 10px 30px rgba(20,30,48,.2); font-size: 11px; opacity: 0; transform: translateY(9px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9e3340; }
.toast.success { background: #187954; }
.demo-label { display: inline-flex; margin-left: 7px; padding: 3px 6px; border-radius: 4px; color: #8b6b2d; background: #fff5df; font-size: 8px; font-weight: 700; letter-spacing: .2px; vertical-align: 2px; }
.overview-extra { display: flex; align-items: center; gap: 9px; padding: 14px 4px 0; font-size: 9px; }
.last-run { margin-left: auto; color: #728098; }
.field-required { color: #ce5260; }
.link-button { border: 0; color: #5376d7; background: none; padding: 0; font-size: 10px; font-weight: 600; }
.muted { color: #94a0af; }
.no-wrap { white-space: nowrap; }
.hidden { display: none !important; }

.planner-source-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.planner-source { padding: 18px; }
.planner-source-head, .planner-preview-head, .planner-last-import { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.planner-source-head h3, .planner-preview-head h3 { margin: 3px 0 5px; color: #2b394e; font: 700 15px 'Manrope', sans-serif; }
.planner-source-head p { max-width: 820px; margin: 0; color: #7f8b9d; font-size: 11px; }
.planner-source-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; color: #5877cf; background: #eef3ff; font-size: 19px; }
.planner-file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #edf0f4; }
.planner-file-label { color: #5b687c; font-size: 10px; font-weight: 700; }
.planner-file { flex: 1 1 270px; max-width: 480px; min-width: 220px; color: #68758a; font-size: 10px; }
.planner-file::file-selector-button { min-height: 30px; margin-right: 9px; padding: 0 9px; border: 1px solid #e0e5ed; border-radius: 5px; color: #506078; background: #fff; font-size: 10px; cursor: pointer; }
.planner-preview { margin-top: 17px; padding: 16px; border: 1px solid #e6ebf4; border-radius: 8px; background: #fbfcff; }
.planner-preview-head { align-items: center; padding-bottom: 12px; border-bottom: 1px solid #ebeff5; }
.planner-preview-head h3 { font-size: 12px; overflow-wrap: anywhere; }
.planner-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.planner-stat-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border: 1px solid #edf0f4; border-radius: 6px; background: #fff; }
.planner-stat-grid small { color: #8692a3; font-size: 9px; }
.planner-stat-grid strong { color: #27364d; font: 700 16px 'Manrope', sans-serif; }
.planner-precheck { margin: 12px 0 0; padding: 11px 13px; border: 1px solid #dbe6ef; border-radius: 8px; background: #f8fbfd; color: #516276; }
.planner-precheck.error { border-color: #f0cbce; background: #fff7f7; }
.planner-precheck.warning { border-color: #f1dfba; background: #fffaf0; }
.planner-precheck.ok { border-color: #d4eadf; background: #f5fbf7; }
.planner-precheck-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.planner-precheck-heading > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.planner-precheck-heading strong { color: #35465d; font-size: 11px; }
.planner-precheck-heading span { color: #7c899b; font-size: 9px; }
.planner-precheck-count { flex: 0 0 auto; padding: 3px 8px; border-radius: 12px; color: #27815d !important; background: #e8f6ee; font-size: 9px !important; font-weight: 700; }
.planner-precheck.error .planner-precheck-count { color: #a64049 !important; background: #fdebed; }
.planner-precheck.warning .planner-precheck-count { color: #8b692c !important; background: #fff0cf; }
.planner-precheck-list { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 18px; color: #657286; font-size: 9px; line-height: 1.5; }
.planner-precheck-list li.error::marker { color: #c44953; }
.planner-precheck-list li.warning::marker { color: #bc872c; }
.planner-precheck-clear, .planner-precheck-note, .planner-precheck-more { margin: 7px 0 0; color: #718096; font-size: 9px; }
.planner-edit-table tr.planner-invalid td { background: #fff4f4 !important; }
.planner-warnings { margin: 10px 0; padding: 9px 12px 9px 28px; border: 1px solid #f2dfb9; border-radius: 6px; color: #8b692c; background: #fff9ec; font-size: 10px; }
.planner-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.planner-detail-grid h4, .planner-issues h4 { margin: 0 0 7px; color: #3a4960; font: 700 11px 'Manrope', sans-serif; }
.planner-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #edf0f4; border-radius: 6px; background: #fff; }
.planner-issues .planner-table-wrap { max-height: 380px; overflow: auto; }
.planner-table-wrap table { width: 100%; min-width: 390px; table-layout: fixed; border-collapse: collapse; text-align: left; }
.planner-table-wrap th { position: sticky; top: 0; padding: 7px 8px; color: #8792a3; background: #f7f8fb; font-size: 8px; font-weight: 700; white-space: nowrap; }
.planner-table-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.planner-table-sort:hover, .planner-sortable-table th[aria-sort="ascending"] .planner-table-sort, .planner-sortable-table th[aria-sort="descending"] .planner-table-sort { color: #496bc3; }
.planner-table-sort-indicator { color: #a1aaba; font-size: 8px; }
.planner-table-wrap td { padding: 7px 8px; border-top: 1px solid #eff1f5; color: #68758a; font-size: 9px; }
.planner-table-wrap td strong { color: #37455b; font-weight: 600; }
.planner-issues { margin-top: 14px; }
.planner-import-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e9edf3; }
.planner-muted { color: #929dad; font-size: 9px; }
.planner-last-import { align-items: center; margin-bottom: 13px; padding: 13px 15px; }
.planner-last-import > div { display: flex; flex-direction: column; gap: 2px; }
.planner-last-import strong { color: #34435a; font-size: 11px; }
.planner-last-import small { color: #8995a6; font-size: 9px; }
.planner-room-warning { margin: 0 0 14px; }
.planner-room-warning > span:nth-child(2) { flex: 1; }
.planner-room-warning .banner-link { margin-left: 0; }
.planner-grid-card { padding: 17px; margin-bottom: 14px; }
.planner-grid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.planner-grid-head h3 { margin: 3px 0 4px; color: #2b394e; font: 700 15px 'Manrope', sans-serif; }
.planner-grid-head p { margin: 0; color: #7f8b9d; font-size: 10px; }
.planner-save-status { padding: 4px 8px; border-radius: 12px; color: #27815d; background: #eaf8f1; font-size: 9px; white-space: nowrap; }
.planner-save-status.pending { color: #91651e; background: #fff4df; }
.planner-save-status.locked { color: #6b5b3a; background: #f4efe4; }
.planner-lock-banner { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid #e4e9f0; border-radius: 8px; background: #f8fafc; color: #5f6d82; font-size: 10px; line-height: 1.45; }
.planner-lock-banner.locked { border-color: #e6dcc8; background: #faf6ee; color: #6a5d45; }
.planner-lock-banner .banner-symbol { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: #edf2ff; color: #5474c4; font-size: 11px; font-weight: 700; }
.planner-lock-banner.locked .banner-symbol { background: #f0e6d4; color: #8a6d3b; }
.planner-grid-card.is-locked .planner-edit-table { background: #fbfcfe; }
.planner-grid-card.is-locked .planner-cell-input:disabled,
.planner-grid-card.is-locked .planner-check input:disabled { cursor: not-allowed; opacity: 0.85; background: #f4f6f9; }
.planner-grid-card.is-locked { border-color: #d9dee7; background: #fff; box-shadow: 0 5px 18px rgba(35, 49, 69, .06); }
.planner-grid-card.is-locked .planner-grid-head h3 { color: #1e2938; font-size: 18px; }
.planner-grid-card.is-locked .planner-lock-banner.locked { border-color: #dfe4eb; background: #f7f9fc; color: #536174; }
.planner-grid-card.is-locked .planner-grid-scroll { max-height: none; min-height: 0; overflow-x: auto; overflow-y: visible; border-color: #dfe4eb; border-radius: 4px; }
.planner-grid-card.is-locked .planner-edit-table { border-collapse: collapse; border-spacing: 0; background: #fff; }
.planner-grid-card.is-locked .planner-edit-table th { padding: 13px 10px; border: 0; border-bottom: 2px solid #8390a1; color: #334155; background: #f1f3f6; font-size: 12px; }
.planner-grid-card.is-locked .planner-edit-table td { padding: 12px 10px; border: 0; border-bottom: 1px solid #dfe3e9; color: #273244; background: #fff; font-size: 11px; }
.planner-grid-card.is-locked .planner-edit-table tbody tr:nth-child(even) td { background: #fafbfc; }
.planner-grid-card.is-locked .planner-edit-table tr.selected td { background: inherit; }
.planner-grid-card.is-locked .planner-edit-table td:nth-child(4) { text-align: center; font-weight: 600; }
.planner-grid-card.is-locked .planner-sort-button { min-height: 20px; color: #334155; cursor: pointer; }
.planner-grid-card.is-locked .planner-sort-indicator { color: #65758a; font-size: 10px; font-weight: 600; }
.planner-document-value { display: block; min-height: 18px; color: #273244; line-height: 1.5; overflow-wrap: anywhere; }
.planner-document-value.empty { color: #9aa4b2; font-style: italic; }
.planner-grid-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 13px 0 10px; }
.planner-grid-actions .btn:disabled { cursor: not-allowed; opacity: .48; }
.planner-teacher-import .planner-bulk-controls { align-items: center; }
.planner-teacher-import .planner-file { flex: 1 1 280px; max-width: 380px; }
.planner-teacher-import-preview { flex: 1 1 100%; display: grid; gap: 9px; padding-top: 11px; border-top: 1px solid #e2e8f0; }
.planner-teacher-import-preview > div:first-child { display: grid; gap: 3px; }
.planner-teacher-import-preview strong { color: #243247; font-size: 12px; }
.planner-teacher-import-preview span, .planner-teacher-import-preview li { color: #66758a; font-size: 11px; line-height: 1.45; }
.planner-teacher-import-preview ul { max-height: 180px; overflow-y: auto; margin: 0; padding-left: 20px; }
.planner-teacher-import-preview .planner-bulk-controls { justify-content: flex-start; }
.planner-bulk-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6fa 100%);
}
.planner-bulk-copy { display: grid; gap: 3px; min-width: min(100%, 220px); }
.planner-bulk-copy strong { color: #243247; font-size: 12px; }
.planner-bulk-copy span { color: #66758a; font-size: 11px; line-height: 1.4; }
.planner-bulk-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.planner-bulk-controls .planner-file { flex: 1 1 220px; max-width: 320px; }
.planner-grid-hint { margin-left: auto; color: #929dad; font-size: 9px; }
.planner-grid-scroll { max-height: none; min-height: 0; overflow-x: auto; overflow-y: visible; border: 1px solid #e7ebf1; border-radius: 7px; background: #fff; }
.planner-edit-table { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 0; text-align: left; }
.planner-grid-card.is-compact .planner-edit-table { table-layout: fixed; }
.planner-grid-card.is-compact .planner-edit-table th:nth-child(1) { width: 41%; min-width: 190px; }
.planner-grid-card.is-compact .planner-edit-table th:nth-child(2) { width: 35%; min-width: 250px; }
.planner-grid-card.is-compact .planner-edit-table th:nth-child(3) { width: 12%; min-width: 125px; }
.planner-grid-card.is-compact .planner-edit-table th:nth-child(4) { width: 12%; min-width: 110px; }
.planner-grid-card.is-compact .planner-edit-table th:nth-child(3) .planner-sort-button,
.planner-grid-card.is-compact .planner-edit-table th:nth-child(4) .planner-sort-button { justify-content: center; }
.planner-grid-card.is-compact .planner-edit-table td:nth-child(3),
.planner-grid-card.is-compact .planner-edit-table td:nth-child(4) { text-align: center; }
.planner-edit-table th { position: sticky; top: 0; z-index: 1; padding: 12px 8px; border-bottom: 1px solid #e7ebf1; color: #778499; background: #f6f8fb; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
.planner-sort-button { display: flex; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.planner-sort-button:hover, .planner-edit-table th[aria-sort="ascending"] .planner-sort-button, .planner-edit-table th[aria-sort="descending"] .planner-sort-button { color: #496bc3; }
.planner-sort-indicator { color: #a1aaba; font-size: 9px; }
.list-sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.list-sort-button:hover, .sortable-list-table th[aria-sort="ascending"] .list-sort-button, .sortable-list-table th[aria-sort="descending"] .list-sort-button { color: #0878bf; }
.list-sort-indicator { color: #a1aaba; font-size: 10px; font-weight: 700; }
.lessons-sort-field { white-space: nowrap; }
.planner-edit-table td { padding: 5px 8px; border-bottom: 1px solid #f0f2f6; background: #fff; }
.planner-grid-card.is-compact .planner-edit-table td:nth-child(1) { padding-right: 150px; }
.planner-edit-table tr.selected td { background: #f7f9ff; }
.planner-edit-table tr:last-child td { border-bottom: 0; }
.planner-edit-table th:nth-child(1) { min-width: 150px; }
.planner-edit-table th:nth-child(2) { min-width: 180px; }
.planner-edit-table th:nth-child(3) { min-width: 180px; }
.planner-edit-table th:nth-child(4) { min-width: 150px; }
.planner-cell-input { width: 100%; min-width: 66px; height: 32px; padding: 5px 6px; border: 1px solid #e6eaf0; border-radius: 5px; color: #35445a; background: #fff; font-size: 10px; outline: none; }
.planner-cell-input:focus { border-color: #91a9ef; box-shadow: 0 0 0 2px rgba(73,118,237,.1); }
.planner-edit-table td:nth-child(4) .planner-cell-input { text-align: center; }
.planner-check { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; color: #64738a; font-size: 9px; }
.planner-check input { accent-color: #4976ed; }
.planner-grid-empty { padding: 17px 12px; color: #98a2b1; text-align: center; font-size: 10px; }
.planner-grid-note { margin: 9px 0 0; color: #8d98a8; font-size: 9px; }
.planner-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 13px; }
.planner-summary-card { min-width: 0; padding: 11px; border: 1px solid #edf0f4; border-radius: 7px; background: #fbfcfe; }
.planner-summary-card h4 { margin: 0 0 7px; color: #3a4960; font: 700 10px 'Manrope', sans-serif; }
.planner-summary-card .planner-table-wrap table { min-width: 280px; }
.planner-summary-card .planner-table-wrap { max-height: 210px; overflow: auto; }
.planner-import-details { margin-top: 13px; padding: 12px 14px; border: 1px solid #e9edf3; border-radius: 8px; background: #fafbfd; }
.planner-import-details > summary { color: #52627a; font-size: 10px; font-weight: 700; cursor: pointer; }
.planner-import-details > p { margin: 7px 0 12px; color: #8995a6; font-size: 9px; }
.planner-import-details[open] > summary { margin-bottom: 4px; }
.planner-import-details[open] .planner-source { margin-bottom: 10px; }
.planner-import-details[open] .planner-source:last-child { margin-bottom: 0; }

.school-setup-intro { padding: 20px 24px; }
.school-setup-intro h2 { margin: 4px 0 6px; color: #53657b; font: 600 21px 'Manrope', sans-serif; }
.school-setup-intro > p { max-width: 760px; margin: 0; color: #718096; font-size: 12px; line-height: 1.55; }
.school-setup-roadmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 0; margin: 12px 0; padding: 0; list-style: none; }
.school-setup-roadmap li { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 7px 2px; border-bottom: 1px solid #edf1f5; background: transparent; }
.school-setup-roadmap li:nth-last-child(-n + 2) { border-bottom: 0; }
.school-setup-roadmap li > span { display: block; flex: 0 0 7px; width: 7px; height: 7px; margin: 6px 2px 0; overflow: hidden; border-radius: 50%; color: #78afd4; background: #78afd4; font-size: 0; }
.school-setup-roadmap strong { display: block; color: #526377; font-size: 12px; font-weight: 600; }
.school-setup-roadmap small { display: block; margin-top: 3px; color: #8793a3; font-size: 10px; line-height: 1.45; }
.school-setup-intro-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.school-setup-intro-footer > .muted { margin-right: auto; }
.school-setup-progress { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; padding: 8px 4px 4px; overflow-x: auto; }
.school-setup-progress-part { position: relative; min-width: 0; }
.school-setup-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; min-width: 0; min-height: 52px; padding: 0 3px; border: 0; color: #77869a; background: transparent; cursor: pointer; }
.school-setup-step:hover { color: #35598f; }
.school-setup-step.active { color: #0566a6; }
.school-setup-step.complete { color: #17734a; }
.school-setup-step > span { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid #d7e0eb; border-radius: 50%; color: inherit; background: #fff; font-size: 10px; font-weight: 800; }
.school-setup-step.active > span { border-color: #0878bf; color: #fff; background: #0878bf; box-shadow: 0 0 0 4px #e8f4fc; }
.school-setup-step.complete > span { border-color: #55a886; color: #fff; background: #55a886; }
.school-setup-step strong { max-width: 100%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.school-setup-connector { position: absolute; z-index: 0; top: 14px; left: calc(50% + 17px); right: calc(-50% + 17px); height: 2px; background: #dfe6ef; }
.school-setup-connector.complete { background: #55a886; }
.school-setup-step-navigation { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0 0; }
.school-setup-next { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; min-width: 260px; min-height: 58px; margin-left: auto; padding: 9px 18px; text-align: left; box-shadow: 0 4px 12px rgba(8, 120, 191, .16); }
.school-setup-next > span:first-child { grid-column: 1; color: rgba(255,255,255,.82); font-size: 10px; font-weight: 600; }
.school-setup-next > strong { grid-column: 1; font-size: 14px; }
.school-setup-next .school-setup-next-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 22px; }
.school-setup-finish { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid #dce7f1; border-radius: 9px; background: #f7fafc; }
.school-setup-finish > div:first-child { min-width: 180px; flex: 1 1 240px; }
.school-setup-finish h3 { margin: 0 0 4px; color: #2b3c51; font: 700 13px 'Manrope', sans-serif; }
.school-setup-finish p { margin: 0; color: #718096; font-size: 10px; line-height: 1.5; }
.school-setup-finish-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.school-setup-finish .planner-precheck { flex: 1 0 100%; }
.faculty-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.faculty-tab { min-height: 34px; padding: 0 12px; border: 1px solid #dbe3ee; border-radius: 7px; color: #5a6a80; background: #fff; font: 700 11px 'Manrope', sans-serif; cursor: pointer; }
.faculty-tab:hover { border-color: #b7c8e4; color: #35598f; }
.faculty-tab.active { border-color: #0878bf; color: #0566a6; background: #e8f4fc; }
.faculty-panel { padding: 16px 18px; }
.faculty-panel-head { margin-bottom: 14px; }
.faculty-panel-head h3 { margin: 3px 0 5px; color: #243247; font: 700 16px 'Manrope', sans-serif; }
.faculty-panel-head p { margin: 0; color: #7a8799; font-size: 11px; max-width: 760px; }
.faculty-list { display: grid; gap: 8px; }
.faculty-list-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.faculty-card { padding: 12px; border: 1px solid #e7ebf1; border-radius: 8px; background: #fbfcfe; }
.faculty-card-row { display: flex; align-items: center; gap: 8px; }
.faculty-inline-input { flex: 1 1 auto; min-width: 0; height: 32px; padding: 5px 8px; border: 1px solid #e1e6ee; border-radius: 6px; color: #2f3f55; background: #fff; font-size: 12.5px; }
.faculty-meta { margin-top: 4px; color: #8090a3; font-size: 11.5px; }
.faculty-teacher-list,
.faculty-entity-list { width: 100%; max-width: 720px; }
.faculty-subject-list { width: 1000px; max-width: 100%; margin-inline: 0 auto; }
.faculty-subject-list > .faculty-entity-head > span:first-child { justify-self: stretch; justify-content: center; padding-left: 0; text-align: center; }
.faculty-subject-list > .faculty-entity-head > .faculty-sort-heading:not([data-field="name"]) { justify-content: center; text-align: center; }
.faculty-subject-list > .faculty-entity-head .faculty-sort-heading > .faculty-sort-indicator { flex: 0 0 auto; width: auto; min-width: 0; padding: 0; text-align: inherit; }
.faculty-entity-list.faculty-subject-list > .faculty-entity-head > span:last-child { min-width: 0; justify-self: stretch; justify-content: center; text-align: center; }
.faculty-subject-list .faculty-entity-row--4 > .faculty-row-num { justify-self: stretch; text-align: center; }
.faculty-subject-list .faculty-entity-row--4 > .faculty-entity-semester { justify-content: center; }
.faculty-subject-list .faculty-entity-actions { min-width: 0; justify-content: flex-end; }
.faculty-teacher-head,
.faculty-teacher-row,
.faculty-entity-head,
.faculty-entity-row {
  display: grid;
  grid-template-columns: 16px minmax(min-content, 1fr) minmax(120px, 1fr) max-content;
  column-gap: 38px;
  row-gap: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.faculty-entity-head > *,
.faculty-entity-row > * { min-width: 0; }
.faculty-teacher-head,
.faculty-teacher-row {
  grid-template-columns: 32px 140px 380px 104px;
}
.faculty-teacher-head--simple,
.faculty-teacher-row--simple {
  grid-template-columns: 32px minmax(0, 1fr) 104px;
  column-gap: 32px;
}
.faculty-teacher-head--simple > span:last-child { justify-self: center; text-align: center; }
.faculty-teacher-head > span:first-child { justify-self: stretch; width: 100%; justify-content: center; padding-left: 0; text-align: center; }
.faculty-teacher-row > .faculty-row-num { justify-self: stretch; width: 100%; text-align: center; }
.faculty-teacher-head > span:nth-child(3), .faculty-teacher-head > .faculty-sort-heading:nth-child(3) { justify-self: center; text-align: center; }
.faculty-teacher-head > .faculty-sort-heading:nth-child(3) { justify-self: stretch; justify-content: center; text-align: center; }
.faculty-sort-heading { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.faculty-sort-heading:hover, .faculty-sort-heading[aria-sort="ascending"], .faculty-sort-heading[aria-sort="descending"] { color: #496bc3; }
.faculty-sort-indicator { color: #a1aaba; font-size: 9px; }
.faculty-teacher-head > span:nth-child(2),
.faculty-teacher-head > span:last-child { padding-left: 0; }
.faculty-entity-row--2 {
  grid-template-columns: 32px 196px 132px;
  column-gap: 32px;
}
.faculty-entity-head.faculty-entity-row--2 > span:nth-child(2), .faculty-entity-head.faculty-entity-row--2 > .faculty-sort-heading:nth-child(2) { justify-self: center; justify-content: center; text-align: center; }
.faculty-entity-row--2 .faculty-entity-name { justify-content: center; text-align: center; }
.faculty-entity-row--3 {
  grid-template-columns: 32px 136px 100px 132px;
  column-gap: 38px;
}
.faculty-entity-row--4 {
  grid-template-columns: 32px 430px 130px 100px 132px;
  column-gap: 38px;
}
.faculty-row-num {
  justify-self: start;
  min-width: 1em;
  color: #9aa5b4;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.faculty-teacher-head > span:first-child,
.faculty-entity-head > span:first-child {
  justify-self: start;
  min-width: 0;
  padding: 5px 2px;
  justify-content: flex-start;
}
.faculty-teacher-head,
.faculty-entity-head {
  margin: 0 0 8px;
  /* Match .faculty-card horizontal padding so labels sit over cells */
  padding: 0 12px;
  white-space: nowrap;
  text-align: left;
}
.faculty-teacher-head > span,
.faculty-entity-head > span {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid #e3e8ef;
  border-radius: 7px;
  color: #334055;
  background: #f1f3f5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: none;
  box-sizing: border-box;
}
.faculty-teacher-head span:last-child,
.faculty-entity-head span:last-child {
  justify-self: start;
  min-width: 104px;
  text-align: center;
}
.faculty-teacher-list { width: 350px; max-width: 100%; }
.faculty-teacher-list .faculty-teacher-actions { justify-content: flex-end; }
.faculty-semester-list {
  --semester-number-width: 32px;
  --semester-name-width: 70px;
  --semester-actions-width: 100px;
  --semester-column-gap: 32px;
  --semester-horizontal-padding: 12px;
  --semester-column-widths: var(--semester-number-width) var(--semester-name-width) var(--semester-actions-width);
  width: calc(var(--semester-number-width) + var(--semester-name-width) + var(--semester-actions-width) + var(--semester-column-gap) + var(--semester-column-gap) + var(--semester-horizontal-padding) + var(--semester-horizontal-padding) + 2px);
  max-width: 100%;
}
.faculty-semester-list .faculty-entity-row--2 {
  grid-template-columns: var(--semester-column-widths);
  column-gap: var(--semester-column-gap);
  padding-left: var(--semester-horizontal-padding);
  padding-right: var(--semester-horizontal-padding);
}
.faculty-semester-list .faculty-entity-name { justify-content: flex-start; text-align: left; }
.faculty-semester-list .faculty-row-num { justify-self: stretch; width: 100%; text-align: center; }
.faculty-semester-list .faculty-entity-actions { min-width: 0; }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 > span:first-child { grid-column: 1; }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 > .faculty-sort-heading:nth-child(2) { grid-column: 2; }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 > span:last-child { grid-column: 3; }
.faculty-semester-list .faculty-entity-row--2 > .faculty-row-num { grid-column: 1; }
.faculty-semester-list .faculty-entity-row--2 > .faculty-entity-name { grid-column: 2; }
.faculty-semester-list .faculty-entity-row--2 > .faculty-entity-actions { grid-column: 3; }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 { position: relative; padding-left: var(--semester-horizontal-padding); padding-right: var(--semester-horizontal-padding); }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 > span:first-child { justify-self: stretch; justify-content: center; padding-left: 0; padding-right: 0; text-align: center; }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 > .faculty-sort-heading:nth-child(2) { position: static; top: auto; left: auto; width: auto; justify-self: stretch; justify-content: center; text-align: center; transform: none; }
.faculty-semester-list > .faculty-entity-head .faculty-sort-heading > .faculty-sort-indicator { flex: 0 0 auto; width: auto; min-width: 0; padding: 0; text-align: inherit; }
.faculty-semester-list > .faculty-entity-head.faculty-entity-row--2 > span:last-child { min-width: 0; justify-self: stretch; justify-content: center; text-align: center; }
.faculty-program-list {
  width: calc(32px + 70px + 82px + 100px + 32px + 32px + 32px + 12px + 12px + 2px);
  max-width: 100%;
}
.faculty-program-list .faculty-entity-row--3 {
  grid-template-columns: 32px 70px 82px 100px;
  column-gap: 32px;
}
.faculty-program-list > .faculty-entity-head > .faculty-sort-heading:first-of-type { justify-content: flex-start; text-align: left; }
.faculty-program-list > .faculty-entity-head > .faculty-sort-heading:nth-of-type(2) { justify-content: center; text-align: center; }
.faculty-program-list > .faculty-entity-head .faculty-sort-heading > .faculty-sort-indicator { flex: 0 0 auto; width: auto; min-width: 0; padding: 0; text-align: inherit; }
.faculty-program-list .faculty-entity-name { justify-content: flex-start; text-align: left; }
.faculty-program-list .faculty-entity-name strong { text-align: left; }
.faculty-program-list .faculty-entity-semester { justify-content: center; }
.faculty-program-list .faculty-entity-actions { min-width: 0; justify-content: center; }
.faculty-entity-list.faculty-program-list > .faculty-entity-head > span:last-child { min-width: 0; }
.faculty-program-list > .faculty-entity-head > span:first-child { justify-self: stretch; justify-content: center; padding-left: 0; text-align: center; }
.faculty-program-list > .faculty-entity-head > .faculty-sort-heading { justify-content: center; text-align: center; }
.faculty-program-list .faculty-row-num { justify-self: stretch; text-align: center; }
.faculty-program-list .faculty-entity-name { justify-content: center; text-align: center; }
.faculty-program-list .faculty-entity-name strong { text-align: center; }
.faculty-entity-list.faculty-program-list > .faculty-entity-head,
.faculty-program-list .faculty-entity-row { padding-left: 12px; }
.faculty-entity-list.faculty-program-list > .faculty-entity-head,
.faculty-program-list .faculty-entity-row { padding-right: 12px; }
.faculty-teacher-head {
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e8edf3;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f4f6f9;
}
.faculty-teacher-head > span {
  display: flex;
  align-items: center;
  justify-self: start;
  width: auto;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  color: #748198;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}
.faculty-teacher-head > span:first-child { padding-left: 2px; }
.faculty-teacher-list > .faculty-teacher-head > span:first-child {
  justify-self: stretch;
  width: 100%;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}
.faculty-teacher-head span:last-child { min-width: 104px; text-align: left; }
.faculty-teacher-list > .faculty-list { gap: 0; overflow: hidden; border: 1px solid #e8edf3; border-radius: 0 0 6px 6px; background: #fff; }
.faculty-teacher-list .faculty-teacher-row {
  border: 0;
  border-top: 1px solid #e9edf2;
  border-radius: 0;
  background: #fff;
}
.faculty-teacher-list .faculty-teacher-row:first-child { border-top: 0; }
.faculty-entity-list > .faculty-entity-head {
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e8edf3;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f4f6f9;
}
.faculty-entity-list > .faculty-entity-head > span {
  display: flex;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  color: #748198;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}
.faculty-entity-list > .faculty-entity-head > span:first-child { padding: 0; }
.faculty-entity-list > .faculty-entity-head span:last-child { min-width: 104px; text-align: left; }
.faculty-entity-list > .faculty-list { gap: 0; overflow: hidden; border: 1px solid #e8edf3; border-radius: 0 0 6px 6px; background: #fff; }
.faculty-entity-list .faculty-entity-row {
  border: 0;
  border-top: 1px solid #e9edf2;
  border-radius: 0;
  background: #fff;
}
.faculty-entity-list .faculty-entity-row:first-child { border-top: 0; }
.faculty-list > .faculty-teacher-row,
.faculty-list > .faculty-entity-row { justify-self: stretch; width: 100%; }
.faculty-teacher-name,
.faculty-entity-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.faculty-teacher-name strong,
.faculty-entity-name strong { flex: 1 1 auto; min-width: 0; color: #243247; font-size: 13px; }
.faculty-teacher-actions,
.faculty-entity-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; min-width: 104px; }
.faculty-teacher-actions .btn,
.faculty-entity-actions .btn { font-size: 10px; min-height: 29px; padding: 0 9px; }
.faculty-panel button[data-action^="faculty-edit-"] { border-color: #f2c7c7; color: #b42318; background: #fff7f7; }
.faculty-panel button[data-action^="faculty-edit-"]:hover { border-color: #e9a8a8; background: #ffeded; }
.faculty-teacher-days,
.faculty-entity-semester { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; align-items: center; min-width: 0; }
.faculty-teacher-days { justify-content: center; }
.faculty-inline-select { width: 100%; max-width: 220px; min-height: 32px; padding: 5px 8px; border: 1px solid #e1e6ee; border-radius: 6px; color: #2f3f55; background: #fff; font-size: 12.5px; }
.faculty-day-check { flex-direction: row; gap: 5px; min-width: 50px; padding: 5px 5px; }
.faculty-day-check span { color: #334055; font-size: 11.5px; font-weight: 700; }
.faculty-hours-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #e3e8ef;
  border-radius: 7px;
  color: #334055;
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.faculty-day-check.is-readonly { cursor: default; pointer-events: none; opacity: .92; }
.faculty-day-check.is-readonly input { pointer-events: none; }
.faculty-day-check.is-readonly:not(.is-on) { opacity: .45; background: #f4f6f8; }
.faculty-teacher-row .faculty-meta,
.faculty-entity-row .faculty-meta { margin: 0; font-size: 11.5px; }
.faculty-teacher-row.is-editing,
.faculty-entity-row.is-editing { border-color: #b7d7ef; background: #f5fafd; }
.faculty-add-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: end; margin-bottom: 12px; max-width: 520px; }
.faculty-add-grid-group { grid-template-columns: minmax(0, 1fr) minmax(110px, 150px) auto auto; max-width: 640px; }
.faculty-add-grid-subject { grid-template-columns: minmax(0, 1fr) minmax(110px, 150px) minmax(90px, 110px) auto auto; max-width: 760px; }
.faculty-add-grid label, .faculty-bulk label, .faculty-select-label { display: grid; gap: 4px; color: #5b687c; font-size: 10px; font-weight: 700; }
.faculty-add-grid input, .faculty-add-grid select, .faculty-bulk textarea, .faculty-select-label select { min-height: 34px; padding: 6px 8px; border: 1px solid #e1e6ee; border-radius: 6px; color: #33455c; background: #fff; font-size: 12px; font-weight: 500; }
.faculty-bulk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 14px; max-width: 520px; }
.faculty-bulk textarea { width: 100%; max-width: 100%; resize: vertical; }
.faculty-bulk-actions { display: grid; gap: 8px; }
.faculty-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  grid-auto-rows: 172px;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 12px;
}
.faculty-summary-help { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; color: #718096; font-size: 11px; }
.faculty-summary-help strong { color: #33465e; font-size: 11px; }
.faculty-summary-card {
  display: grid;
  grid-template-rows: 84px 86px;
  align-content: stretch;
  min-width: 0;
  height: 172px;
  border: 1px solid #e4ebf4;
  border-radius: 7px;
  overflow: hidden;
  background: #f7fafc;
}
.faculty-summary-card.is-inactive { border-style: dashed; background: #f1f3f5; }
.faculty-summary-chip {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 64px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.faculty-summary-chip:hover:not(:disabled) { background: #f0f6fc; }
.faculty-summary-chip:focus-visible { outline: 2px solid #4388d1; outline-offset: 2px; }
.faculty-summary-card.is-inactive .faculty-summary-chip { position: relative; padding-right: 34px; opacity: .72; }
.faculty-summary-chip .faculty-summary-cross { position: absolute; top: 50%; right: 9px; color: #c43d45; font-size: 28px; font-weight: 500; line-height: 1; transform: translateY(-50%); }
.faculty-summary-chip:disabled { cursor: not-allowed; }
.faculty-summary-chip strong { color: #2c3d54; font-size: 11px; }
.faculty-summary-chip span { color: #738397; font-size: 10px; }
.faculty-summary-chip .faculty-summary-status { color: #318064; font-size: 9px; font-weight: 700; }
.faculty-summary-card.is-inactive .faculty-summary-status { color: #9a5c37; }
.faculty-summary-day-area { padding: 6px 7px 7px; border-top: 1px solid #e6edf4; background: rgba(255,255,255,.62); }
.faculty-summary-day-title { display: block; margin: 0 0 5px 1px; color: #8291a4; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.faculty-summary-day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 20px; margin-bottom: 4px; }
.faculty-summary-day-head .faculty-summary-day-title { margin: 0; }
.faculty-summary-day-head .row-action { min-height: 20px; padding: 1px 7px; font-size: 9px; }
.faculty-day-edit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #dce6f0; border-radius: 7px; background: #f7fafc; }
.faculty-day-edit-bar > strong { color: #34465d; font-size: 11px; }
.faculty-day-edit-bar > div { display: flex; flex-wrap: wrap; gap: 6px; }
.faculty-day-edit-bar .btn { min-height: 27px; }
.faculty-summary-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.faculty-day-option { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 26px; padding: 3px 2px; border: 1px solid #e0e7ef; border-radius: 5px; background: #fff; color: #66768b; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.faculty-day-option:has(input:checked) { border-color: #9bc5e5; background: #eaf5fd; color: #1f6597; }
.faculty-day-option input { appearance: none; display: grid; place-content: center; flex: 0 0 12px; width: 12px; height: 12px; margin: 0; border: 1.5px solid #aab8c8; border-radius: 3px; background: #fff; }
.faculty-day-option input::before { content: ""; width: 6px; height: 3px; border: solid #fff; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg) scale(0); }
.faculty-day-option input:checked { border-color: #1680c2; background: #1680c2; }
.faculty-day-option input:checked::before { transform: rotate(-45deg) scale(1); }
.faculty-day-option input:focus-visible { outline: 2px solid #65a9dc; outline-offset: 2px; }
.faculty-day-option span { overflow: hidden; font-size: 9px; font-weight: 700; line-height: 1; text-overflow: clip; }
.faculty-day-option:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.faculty-allocate-main { min-width: 0; }
.faculty-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.faculty-review-grid h4, .faculty-fet-preview h4 { margin: 0 0 8px; color: #3a4960; font: 700 11px 'Manrope', sans-serif; }
.faculty-fet-preview { margin-top: 12px; }
.faculty-excel-actions { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #e4ebf4; border-radius: 8px; background: #f7fafc; }
.faculty-excel-actions strong { color: #243247; font-size: 12px; }
.faculty-excel-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 900px) {
  .school-setup-progress { grid-template-columns: repeat(7, minmax(86px, 1fr)); }
  .faculty-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0 2px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .faculty-tab {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    font-size: 10px;
    white-space: nowrap;
  }
  .faculty-panel { padding: 12px 12px 14px; }
  .faculty-panel-head { margin-bottom: 10px; }
  .faculty-panel-head h3 { font-size: 15px; }
  .faculty-panel-head p { font-size: 10px; }
  .faculty-teacher-list,
  .faculty-entity-list,
  .faculty-subject-list,
  .faculty-semester-list,
  .faculty-program-list { width: 100%; max-width: none; }
  .faculty-review-grid { grid-template-columns: 1fr; }
  .faculty-add-grid,
  .faculty-add-grid-group,
  .faculty-add-grid-subject,
  .faculty-bulk {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
  }
  .faculty-add-grid > .btn,
  .faculty-add-grid-group > .btn,
  .faculty-add-grid-subject > .btn,
  .faculty-bulk-actions,
  .faculty-bulk-actions .btn {
    width: 100%;
  }
  .faculty-bulk-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .faculty-teacher-head,
  .faculty-entity-head { display: none; }
  .faculty-teacher-row,
  .faculty-entity-row,
  .faculty-entity-row--2,
  .faculty-entity-row--3,
  .faculty-entity-row--4 {
    grid-template-columns: 32px minmax(0, 1fr) 112px;
    column-gap: 8px;
    row-gap: 8px;
    padding: 10px;
  }
  .faculty-row-num {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .faculty-teacher-name,
  .faculty-entity-name { grid-column: 2; min-width: 0; }
  .faculty-teacher-actions,
  .faculty-entity-actions {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    align-self: start;
    min-width: 0;
  }
  .faculty-semester-list .faculty-entity-actions { min-width: 0; }
  .faculty-teacher-days,
  .faculty-entity-semester {
    grid-column: 1 / -1;
    gap: 5px;
  }
  .faculty-teacher-days::before {
    flex: 0 0 100%;
    color: #748198;
    content: 'Available days';
    font-size: 10px;
    font-weight: 700;
  }
  .faculty-entity-row--3 .faculty-entity-semester,
  .faculty-entity-row--4 .faculty-entity-semester { grid-column: 1 / -1; }
  .faculty-entity-row--3 .faculty-entity-semester::before,
  .faculty-entity-row--4 > .faculty-entity-semester::before {
    flex: 0 0 100%;
    color: #748198;
    font-size: 10px;
    font-weight: 700;
  }
  .faculty-entity-row--3 .faculty-entity-semester::before { content: 'Semester'; }
  .faculty-entity-row--4 > .faculty-entity-semester:nth-child(3)::before { content: 'Program'; }
  .faculty-entity-row--4 > .faculty-entity-semester:nth-child(4)::before { content: 'Hours per week'; }
  .faculty-day-check {
    min-width: 0;
    flex: 1 1 calc(33.33% - 5px);
    justify-content: center;
    padding: 6px 4px;
  }
  .faculty-inline-input,
  .faculty-inline-select {
    width: 100%;
    max-width: none;
    min-height: 36px;
    font-size: 14px;
  }
  .faculty-teacher-actions .btn,
  .faculty-entity-actions .btn {
    min-height: 40px;
    padding: 0 10px;
    font-size: 11px;
  }
  .faculty-allocate-main,
  .planner-grid-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .planner-grid-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .planner-grid-actions .btn,
  .planner-grid-hint {
    width: 100%;
    margin-left: 0;
  }
  .faculty-excel-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .faculty-excel-buttons {
    width: 100%;
  }
  .faculty-excel-buttons .btn,
  .faculty-excel-buttons .planner-file {
    width: 100%;
    max-width: none;
  }
  .planner-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 560px) {
  .school-setup-intro { padding: 16px; }
  .school-setup-roadmap { grid-template-columns: 1fr; gap: 0; margin: 10px 0; }
  .school-setup-roadmap li:nth-last-child(-n + 2) { border-bottom: 1px solid #edf1f5; }
  .school-setup-roadmap li:last-child { border-bottom: 0; }
  .school-setup-intro-footer { flex-wrap: wrap; }
  .school-setup-progress { grid-template-columns: repeat(7, minmax(78px, 1fr)); }
  .school-setup-step { min-height: 48px; }
  .school-setup-step strong { font-size: 8px; }
  .school-setup-step-navigation { flex-wrap: wrap; }
  .school-setup-step-navigation > .btn:not(.school-setup-next) { flex: 1 1 100%; }
  .school-setup-next { flex: 1 1 100%; width: 100%; min-width: 0; min-height: 58px; }
  .faculty-tabs { margin-bottom: 10px; }
  .faculty-tab { min-height: 34px; padding: 0 10px; font-size: 9px; }
  .faculty-panel { padding: 10px; border-radius: 8px; }
  .faculty-day-check { flex: 1 1 calc(50% - 5px); }
  .faculty-day-check span { font-size: 11px; }
  .faculty-row-num { font-size: 12px; }
  .faculty-teacher-name strong,
  .faculty-entity-name strong { font-size: 12.5px; }
  .faculty-bulk-actions { grid-template-columns: 1fr; }
}

@media (max-width: 1050px) {
  .page-content { padding: 27px 25px 42px; }
  .topbar { padding: 0 25px; }
  .hero-illustration { margin-right: 1%; }
  .overview-columns { grid-template-columns: minmax(0, 1.3fr) minmax(245px, .9fr); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 35px rgba(14,28,54,.12); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; width: 100%; }
  .mobile-menu { display: block; margin-right: 10px; }
  .topbar { justify-content: flex-start; padding: 0 18px; }
  .topbar-actions { margin-left: 0; gap: 9px; }
  .server-clock { margin: 0 8px; }
  .engine-mini > span:nth-child(2) strong { display: none; }
  .engine-mini { padding: 0 8px; }
  .topbar-account-copy { display: none; }
  .term-chip { display: none; }
  .page-content { padding: 24px 18px 36px; }
  .overview-columns { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-illustration { width: 145px; margin-right: 0; }
}
@media (max-width: 560px) {
  .topbar { height: 56px; padding: 0 12px; }
  .breadcrumb { gap: 6px; font-size: 9px; }
  .topbar-actions { gap: 8px; }
  .icon-button { display: none; }
  .server-clock-time { font-size: 16px; }
  .server-clock-date { font-size: 9px; }
  .page-content { padding: 20px 12px 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 17px; }
  .page-heading h1 { font-size: 22px; }
  .heading-actions { width: 100%; }
  .overview-hero { padding: 20px 18px; min-height: 190px; }
  .hero-copy h2 { max-width: 300px; font-size: 18px; }
  .hero-copy p { max-width: 320px; }
  .hero-illustration { position: absolute; right: -6px; bottom: 2px; opacity: .38; transform: scale(.8); transform-origin: bottom right; }
  .hero-copy { z-index: 2; }
  .stats-grid { gap: 8px; margin: 11px 0; }
  .stat-card { min-height: 76px; padding: 11px 12px; }
  .stat-value { font-size: 20px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .day-checkboxes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .period-row { grid-template-columns: 28px 1fr; }
  .period-row .period-field:last-child { grid-column: 2; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .statistics-th-stack { min-width: 96px; }
  .setup-banner { align-items: flex-start; }
  .banner-link { align-self: center; }
  .planner-source { padding: 13px; }
  .planner-preview { padding: 11px; }
  .planner-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planner-detail-grid { grid-template-columns: 1fr; }
  .planner-precheck-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .planner-import-actions { align-items: flex-start; flex-direction: column; }
  .planner-file { min-width: 100%; }
  .planner-bulk-controls .planner-file { max-width: none; min-width: 100%; }
  .planner-bulk-row { padding: 11px; }
  .planner-teacher-import .planner-file { max-width: none; min-width: 100%; }
  .planner-grid-card { padding: 12px; }
  .planner-grid-head { flex-direction: column; }
  .planner-grid-hint { width: 100%; margin-left: 0; }
  .planner-summary-grid { grid-template-columns: 1fr; }
  .planner-import-details { padding: 10px; }
}

/* Bright campus dashboard styling. */
:root {
  --canvas: #f3f5f7;
  --blue: #0878bf;
  --blue-dark: #0566a6;
  --blue-pale: #e8f4fc;
}
body { background: var(--canvas); }
.sidebar {
  width: 270px;
  background: #fff;
  color: #34465e;
  border: 0;
  border-radius: 0 26px 26px 0;
  box-shadow: 2px 0 18px rgba(34, 52, 78, .08);
  padding: 20px 14px 16px;
}
.brand { margin: 0 2px 18px; padding: 6px 5px; background: transparent; }
.brand-logo { max-height: 76px; }
.workspace-switcher { border-color: #e8edf3; background: #f7f9fb; }
.school-avatar { color: #fff; background: #0878bf; }
.workspace-name strong { color: #23334a; font-size: 12px; }
.workspace-name small { color: #8c98a8; }
.workspace-switcher .chevron { color: #7f8b9c; }
.nav-label { color: #95a1b0; }
.nav-item { color: #5d6b80; border-radius: 8px; }
.nav-item:hover { color: #0878bf; background: #eff6fb; }
.nav-item.active { color: #0878bf; background: #eeeaf6; box-shadow: inset 4px 0 #0878bf; }
.nav-icon, .nav-item.active .nav-icon { color: #0878bf; }
.nav-count { color: #60728a; background: #edf1f5; }
.more-dots { color: #8996a7; }
.main-area { margin-left: 270px; width: calc(100% - 270px); background: var(--canvas); }
.topbar {
  height: 74px;
  padding: 0 30px;
  border: 0;
  background: #0878bf;
  backdrop-filter: none;
  z-index: 40;
  position: sticky;
  overflow: visible;
}
.campus-title { display: flex; flex-direction: column; gap: 4px; color: #fff; min-width: 0; max-width: min(280px, 28vw); flex: 0 1 auto; }
.campus-kicker { align-self: flex-start; padding: 1px 8px; border-radius: 5px; color: #ed9a15; background: #fff; font-size: 11px; font-weight: 700; line-height: 1.5; }
.campus-switch-label { display: block; min-width: 0; }
.campus-switch-label select {
  width: 100%;
  max-width: 280px;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 10px;
  font: 600 13px/1.2 'Manrope', sans-serif;
  appearance: none;
  cursor: pointer;
}
.campus-switch-label select:disabled { opacity: .85; cursor: default; }
.campus-switch-label select option { color: #172a41; background: #fff; }
.campus-school-name,
.campus-title strong { overflow: hidden; color: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.campus-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.campus-create-form input {
  flex: 1 1 180px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
}
.campus-assign-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #f8fafc;
}
.campus-assign-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  color: #344258;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.campus-assign-option span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  line-height: 1.35;
}
.campus-assign-option input,
.auth-field input[type="checkbox"],
.account-check input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: #0878bf;
}
.breadcrumb { display: none; }
.topbar-actions { flex: 0 0 auto; margin-left: auto; gap: 12px; }
.topbar-generate { display: flex; align-items: center; }
.btn-topbar-link {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-size: 12px;
  font-weight: 700;
}
.btn-topbar-link:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .7);
}
.btn-topbar-link.active {
  color: #0878bf;
  background: #fff;
  border-color: #fff;
}
.btn-topbar-generate {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #0878bf;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 40, 80, .12);
  font-size: 12px;
}
.btn-topbar-generate:hover {
  color: #06639e;
  background: #f3f9fd;
  border-color: transparent;
}
.btn-topbar-generate:disabled {
  color: #6a93b0;
  background: rgba(255, 255, 255, .72);
  cursor: wait;
  opacity: 1;
}
.term-chip { height: 36px; color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.1); }
.term-chip strong, .term-chip .chevron { color: #fff; }
.term-dot { background: #8de0b7; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 9px; color: #fff; background: #1597df; font-size: 15px; }
.mobile-menu { color: #fff; }
.profile-avatar { width: 28px; height: 28px; }
.page-content {
  width: auto;
  max-width: none;
  min-height: calc(100vh - 116px);
  margin: 16px 16px 26px;
  padding: 24px 25px 34px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(28, 49, 74, .025);
}
.page-heading h1 { color: #172a41; }
.page-heading p { color: #8491a2; }
.card { border-color: #e8edf3; border-radius: 14px; box-shadow: 0 2px 10px rgba(34,52,78,.035); }
.overview-modules { min-height: 470px; }
.modules-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 22px; }
.modules-heading h1 { margin: 0; color: #172a41; font: 800 30px/1.2 'Manrope', sans-serif; letter-spacing: -.9px; }
.role-home-kicker {
  margin: 0 0 6px;
  color: #4a5f86;
  font: 750 11px/1.2 'Manrope', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.module-hub-lead { margin: 8px 0 0; color: #67778c; font-size: 13px; line-height: 1.45; }
.overview-modules .module-hub-lead { margin: 8px 0 18px; }
.hr-hub { max-width: 960px; }
.hr-panel { text-align: left; }
.hr-subhead { margin: 22px 0 10px; color: #172a41; font: 750 16px/1.3 'Manrope', sans-serif; }
.hr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hr-list li {
  padding: 14px 16px;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #f8fbfe;
}
.hr-list strong { display: block; color: #172a41; font: 750 14px/1.3 'Manrope', sans-serif; }
.hr-list small { display: block; margin-top: 4px; color: #67778c; font-size: 11px; }
.hr-list p { margin: 8px 0 0; color: #344156; font-size: 13px; line-height: 1.45; }
.hr-sync-card { max-width: 560px; margin: 0; text-align: left; }
.hr-sync-form .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.hr-sync-result {
  margin-top: 14px;
  max-height: 240px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #f4f7fb;
  color: #344156;
  font: 12px/1.4 ui-monospace, Consolas, monospace;
  text-align: left;
}
.guide-button { min-height: 40px; color: #fff; border-color: #343a40; border-radius: 6px; background: #343a40; font-size: 12px; }
.guide-button:hover { color: #fff; border-color: #20252a; background: #20252a; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.module-tile {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 108px;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 21px;
  color: #14263a;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.module-tile:hover { transform: translateY(-2px); border-color: rgba(34,52,78,.1); box-shadow: 0 8px 20px rgba(34,52,78,.08); }
.module-icon { display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 68px; border: 6px solid rgba(255,255,255,.62); border-radius: 50%; color: #fff; background: #0878bf; box-shadow: 0 0 0 2px rgba(255,255,255,.42); font: 700 27px/1 'Segoe UI Symbol', 'Segoe UI', sans-serif; }
.module-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.module-copy strong { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #172a41; font: 750 15px/1.25 'Manrope', sans-serif; }
.module-copy small { color: #67778c; font-size: 10px; line-height: 1.35; }
.module-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  color: #4a5f86;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(74, 95, 134, .18);
  font: 700 9px/1.2 'Manrope', sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.module-coming-soon .module-arrow { opacity: .45; }
.module-arrow { margin-left: auto; color: rgba(29,51,76,.4); font-size: 24px; opacity: 0; transition: opacity .15s ease; }
.module-tile:hover .module-arrow, .module-tile:focus-visible .module-arrow { opacity: 1; }
.hr-placeholder {
  max-width: 520px;
  margin: 28px auto 12px;
  padding: 28px 8px 8px;
  text-align: center;
}
.hr-placeholder-kicker {
  margin: 0 0 10px;
  color: #4a5f86;
  font: 750 11px/1.2 'Manrope', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hr-placeholder h1 {
  margin: 0 0 12px;
  color: #172a41;
  font: 800 32px/1.15 'Manrope', sans-serif;
  letter-spacing: -.9px;
}
.hr-placeholder-copy {
  margin: 0 0 22px;
  color: #67778c;
  font-size: 14px;
  line-height: 1.55;
}
.hr-placeholder .btn { min-height: 42px; }
.module-blue { background: #e6f2f8; }
.module-blue .module-icon { background: #007fc7; box-shadow: 0 0 0 2px #96d0eb; }
.module-pink { background: #f7e4ed; }
.module-pink .module-icon { background: #c40068; box-shadow: 0 0 0 2px #e7a4c4; }
.module-teal { background: #e3f3f2; }
.module-teal .module-icon { background: #0b9b9c; box-shadow: 0 0 0 2px #8ed2d0; }
.module-gray { background: #e9edef; }
.module-gray .module-icon { background: #264452; box-shadow: 0 0 0 2px #a8b7bc; }
.module-purple { background: #eee7f8; }
.module-purple .module-icon { background: #5310c6; box-shadow: 0 0 0 2px #c0a5e6; }
.module-orange { background: #faeee6; }
.module-orange .module-icon { background: #db5d0b; box-shadow: 0 0 0 2px #edb88f; }
.module-green { background: #e6f3e9; }
.module-green .module-icon { background: #168b25; box-shadow: 0 0 0 2px #9bd0a3; }
.module-navy { background: #e6ebf4; }
.module-navy .module-icon { background: #073f93; box-shadow: 0 0 0 2px #a6b8d8; }
.module-sky { background: #e4f2f8; }
.module-sky .module-icon { background: #0878bf; box-shadow: 0 0 0 2px #9bcfe5; }
.module-rose { background: #f8e6e8; }
.module-rose .module-icon { background: #d40000; box-shadow: 0 0 0 2px #efa2a2; }
.overview-footer { display: flex; align-items: center; gap: 7px; margin-top: 25px; padding: 13px 4px 0; border-top: 1px solid #edf0f4; color: #8390a2; font-size: 11px; }
.overview-footer strong { color: #3f4d60; }
.overview-footer .link-button { margin-left: auto; color: #0878bf; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #dfa948; }
.status-dot.ready { background: #29a875; }

@media (max-width: 1250px) {
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 1000px) {
  .fet-timetable-toolbar,
  .fet-timetable-menu { gap: 6px; }
}
@media (max-width: 1050px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { border-radius: 0 20px 20px 0; }
  .main-area { margin-left: 0; width: 100%; }
  .topbar { height: 68px; padding: 0 18px; }
  .page-content { min-height: calc(100vh - 92px); margin: 12px; padding: 22px 19px 30px; }
}
@media (max-width: 560px) {
  .topbar { height: 58px; padding: 0 12px; }
  .campus-title { max-width: 58vw; }
  .campus-switch-label select { max-width: 100%; font-size: 12px; }
  .campus-school-name,
  .campus-title strong { max-width: 145px; font-size: 11px; }
  .campus-kicker { font-size: 10px; }
  .profile-avatar { width: 28px; height: 28px; }
  .page-content { min-height: calc(100vh - 74px); margin: 8px; padding: 19px 14px 26px; border-radius: 18px; }
  .modules-heading { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
  .modules-heading h1 { font-size: 25px; }
  .module-grid { grid-template-columns: 1fr; gap: 10px; }
  .module-tile { min-height: 86px; border-radius: 16px; }
  .module-icon { width: 58px; height: 58px; flex-basis: 58px; font-size: 23px; }
  .overview-footer { flex-wrap: wrap; }
  .overview-footer .link-button { margin-left: 0; }
  .hr-sync-form .field-grid { grid-template-columns: 1fr; }
  .hr-placeholder { padding: 18px 4px; }
  .hr-placeholder h1 { font-size: 26px; }
  .topbar-actions .engine-mini,
  .topbar-actions .term-chip { display: none; }
  .btn, .module-tile, .nav-item { touch-action: manipulation; }
  .fet-time-menu-wrap { padding: 14px 12px 8px; }
  .fet-timetable-toolbar,
  .fet-timetable-menu { gap: 6px; }
  .fet-timetable-sep { display: none; }
  .fet-timetable-option { min-height: 34px; padding: 0 10px; }
}
@media print {
  .page-content { min-height: 0 !important; border-radius: 0 !important; }
}

.history-panel { overflow: hidden; }
.history-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #edf0f4; }
.history-panel-head h3 { margin: 0; color: #2d3d52; font: 700 14px 'Manrope', sans-serif; }
.history-panel-head p { margin: 4px 0 0; color: #8491a2; font-size: 11px; }
.history-retention { display: flex; align-items: center; gap: 9px; margin: 16px 18px 8px; padding: 11px 13px; border: 1px solid #dcebf5; border-radius: 9px; color: #526b80; background: #f1f8fc; font-size: 11px; }
.history-retention-icon { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; color: #fff; background: #0d8a68; font-size: 12px; font-weight: 700; }
.history-list { padding: 4px 18px 12px; }
.history-entry { display: flex; align-items: center; gap: 13px; padding: 14px 2px; border-bottom: 1px solid #edf0f4; }
.history-entry:last-child { border-bottom: 0; }
.history-entry-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: #0878bf; background: #e8f4fc; font-size: 19px; }
.history-entry-mark.manual { color: #118461; background: #e7f6ef; }
.history-entry-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.history-entry-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.history-entry-title strong { color: #33445a; font-size: 12px; }
.history-entry-copy time { color: #52667f; font-size: 11px; font-weight: 600; }
.history-entry-copy small { color: #8a96a6; font-size: 10px; }
.history-kind { padding: 2px 7px; border-radius: 9px; color: #57718a; background: #eef2f6; font-size: 9px; font-weight: 700; }
.history-entry-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.history-entry .btn { flex: 0 0 auto; }
.history-entry .btn:disabled { cursor: not-allowed; opacity: .5; }
.history-entry .history-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #0878bf;
  border-color: #c5dff0;
  background: #f0f8fd;
}
.history-entry .history-download:hover {
  color: #06639e;
  border-color: #9ecceb;
  background: #e5f3fb;
}
.history-action-icon {
  font-size: 12px;
  line-height: 1;
}
.history-entry .history-delete {
  color: #b42318;
  border-color: #f0b6be;
  background: #fff5f6;
}
.history-entry .history-delete:hover {
  color: #912018;
  border-color: #e89aa3;
  background: #ffecee;
}
.history-loading, .history-empty { padding: 28px 12px; color: #8693a4; text-align: center; font-size: 12px; }
.privilege-preview-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; padding: 13px 16px; border: 1px solid #d8e8f5; border-radius: 10px; background: #f2f8fc; color: #526a80; }
.privilege-preview-mark { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: #dceefa; color: #0878bf; font: 700 14px 'Manrope', sans-serif; }
.privilege-preview-banner strong { display: block; color: #2e4d68; font-size: 11px; }
.privilege-preview-banner p { margin: 3px 0 0; font-size: 10px; line-height: 1.45; }
.privilege-preview-badge { margin-left: auto; padding: 4px 8px; border-radius: 10px; background: #e3f1fa; color: #0878bf; font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.privilege-workspace { display: grid; grid-template-columns: minmax(235px, 285px) minmax(0, 1fr); align-items: start; gap: 15px; }
.privilege-target-panel { overflow: hidden; padding: 0; }
.privilege-target-heading { padding: 17px 17px 13px; }
.privilege-target-heading h2 { margin: 5px 0 4px; color: #24364d; font: 700 15px 'Manrope', sans-serif; }
.privilege-target-heading p { margin: 0; color: #8491a2; font-size: 10px; }
.privilege-scope-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 14px 10px; padding: 4px; border-radius: 8px; background: #f1f4f8; }
.privilege-scope-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 33px; border: 0; border-radius: 6px; color: #69788d; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.privilege-scope-tabs button.active { color: #0878bf; background: #fff; box-shadow: 0 1px 4px rgba(34, 52, 78, .1); }
.privilege-scope-tabs button span { padding: 1px 6px; border-radius: 8px; background: #e8edf3; font-size: 9px; }
.privilege-list-tools {
  display: grid; gap: 8px; margin: 0 14px 10px;
}
@media (min-width: 520px) {
  .privilege-list-tools {
    grid-template-columns: 1fr 1fr;
  }
  .privilege-list-tools .privilege-search {
    grid-column: 1 / -1;
  }
}
.privilege-search { width: 100%; }
.privilege-sort {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px;
  color: #69788d; font-size: 10px; font-weight: 650;
}
.privilege-sort select {
  width: 100%; height: 31px; border: 1px solid #e6eaf1; border-radius: 6px;
  padding: 0 8px; outline: none; color: #415069; background: #fff; font-size: 10px;
}
.privilege-sort select:focus { border-color: #94aef4; box-shadow: 0 0 0 3px rgba(73,118,237,.1); }
.privilege-list-empty {
  margin: 4px 5px; padding: 14px 10px; border-radius: 8px; color: #8491a2;
  background: #f7f9fc; font-size: 10px; text-align: center;
}
.privilege-grouped-list { gap: 10px; }
.privilege-group-block {
  border: 1px solid #d5dee9; border-radius: 10px; background: #eef2f7; overflow: hidden;
}
.privilege-group-head {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 11px 12px; border: 0; border-bottom: 1px solid #d5dee9; background: #e4ebf3;
  text-align: left; cursor: pointer; color: inherit;
}
.privilege-group-head:hover { background: #dbe4ef; }
.privilege-group-head.active { background: #d7e8f5; }
.privilege-group-head .privilege-target-icon {
  width: 28px; height: 28px; border-radius: 8px; background: #cfe3f3; color: #0a6eaf;
  font-size: 12px;
}
.privilege-group-head .privilege-target-copy strong {
  color: #1f334c; font-size: 11px; font-weight: 750; letter-spacing: .01em;
}
.privilege-group-head .privilege-target-copy small {
  color: #6d7e93; font-size: 9px;
}
.privilege-group-toggle {
  display: grid; place-items: center; width: 16px; flex: 0 0 16px;
  color: #4f6178; font-size: 11px; line-height: 1;
}
.privilege-group-panel {
  background: #fbfcfe;
  border-top: 0;
}
.privilege-group-block.is-collapsed .privilege-group-panel { display: none; }
.privilege-group-block.is-collapsed .privilege-group-head { border-bottom: 0; }
.privilege-group-panel > .account-target-actions {
  padding: 4px 8px 0 28px;
}
.privilege-group-users {
  display: grid; gap: 2px;
  margin: 4px 8px 8px 18px;
  padding: 4px 0 4px 10px;
  border-left: 2px solid #c9d6e5;
  background: transparent;
}
.privilege-group-empty {
  padding: 8px 10px; color: #93a0b0; font-size: 9px; text-align: left;
}
.privilege-user-row .privilege-target {
  padding: 7px 8px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #edf1f6;
}
.privilege-user-row .privilege-target:hover {
  background: #f4f8fc;
  border-color: #d9e5f0;
}
.privilege-user-row .privilege-target.active {
  background: #eff7fc;
  border-color: #c5dbef;
}
.privilege-user-row .privilege-target-icon {
  width: 26px; height: 26px; flex-basis: 26px; border-radius: 50%;
  font-size: 9px; background: #eaf3fa;
}
.privilege-user-row .privilege-target-copy strong {
  font-size: 10px; font-weight: 650; color: #45586f;
}
.privilege-user-row .privilege-target-copy small {
  font-size: 8px; color: #93a0b0;
}
.privilege-user-row .privilege-target-count {
  font-size: 8px; color: #8494a8;
}
.account-summary-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 8px;
}
.account-summary-item {
  display: grid; gap: 4px; padding: 10px 11px; border: 1px solid #e9edf2; border-radius: 8px; background: #fafbfd;
}
.account-summary-item.full { grid-column: 1 / -1; }
.account-summary-item span { color: #8491a2; font-size: 9px; font-weight: 650; }
.account-summary-item strong { color: #31465e; font-size: 11px; font-weight: 700; word-break: break-word; }
.account-summary-hint {
  margin: 0; padding: 0 18px 16px; color: #8290a2; font-size: 10px; line-height: 1.45;
}
.account-summary-hint strong { color: #4c647b; }
.privilege-target-list { display: grid; gap: 3px; padding: 0 9px 10px; max-height: min(62vh, 640px); overflow: auto; }
.privilege-target { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; padding: 9px 8px; border: 1px solid transparent; border-radius: 8px; text-align: left; background: transparent; cursor: pointer; }
.privilege-target:hover { background: #f7f9fc; }
.privilege-target.active { border-color: #d7e7f5; background: #eff7fc; }
.privilege-target-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; color: #0878bf; background: #e2f1fa; font: 700 10px 'Manrope', sans-serif; }
.privilege-target-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.privilege-target-copy strong { overflow: hidden; color: #37485f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.privilege-target-copy small { overflow: hidden; color: #8a96a6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.privilege-target-count { color: #65778d; font-size: 9px; font-weight: 700; white-space: nowrap; }
.privilege-target-foot { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-top: 1px solid #edf0f4; color: #8290a2; font-size: 9px; }
.privilege-target-foot .status-dot { width: 6px; height: 6px; }
.privilege-detail-column { min-width: 0; }
.privilege-detail-card { overflow: hidden; }
.privilege-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid #edf0f4; }
.privilege-detail-head h2 { margin: 4px 0; color: #24364d; font: 750 19px 'Manrope', sans-serif; }
.privilege-detail-head p { margin: 0; color: #8290a2; font-size: 10px; }
.privilege-access-total { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; color: #62728a; background: #f2f5f8; white-space: nowrap; }
.privilege-access-total > strong { color: #0878bf; font: 800 22px 'Manrope', sans-serif; }
.privilege-access-total > span { font-size: 9px; font-weight: 700; }
.privilege-access-total small { display: block; margin-top: 2px; color: #8b97a7; font-size: 8px; font-weight: 500; }
.privilege-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 14px; }
.permission-section { min-width: 0; border: 1px solid #e9edf2; border-radius: 9px; background: #fff; }
.permission-section-head { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-bottom: 1px solid #edf0f4; background: #fafbfd; }
.permission-section-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 7px; color: #0878bf; background: #e8f3fa; font-size: 13px; }
.permission-section-title { flex: 1; min-width: 0; }
.permission-section-title h3 { margin: 0; color: #34455c; font: 700 10px 'Manrope', sans-serif; }
.permission-section-title small { display: block; margin-top: 3px; color: #8c98a8; font-size: 8px; }
.permission-all-toggle { display: flex; align-items: center; gap: 4px; color: #718097; font-size: 9px; font-weight: 700; cursor: pointer; }
.permission-all-toggle input, .permission-option input { accent-color: #0878bf; }
.permission-options { padding: 4px 10px 7px; }
.permission-option { display: grid; grid-template-columns: 15px minmax(0, 1fr); align-items: center; column-gap: 7px; row-gap: 2px; min-height: 32px; padding: 5px 2px; border-bottom: 1px solid #f1f3f6; cursor: pointer; }
.permission-option:last-child { border-bottom: 0; }
.permission-option input { grid-row: span 2; margin: 0; }
.permission-option-name { color: #68778c; font-size: 9px; line-height: 1.3; }
.permission-option.is-enabled .permission-option-name { color: #33465f; font-weight: 600; }
.permission-option small { color: #98a2b0; font-size: 7px; }
.permission-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid #e9edf2; background: #fbfcfe; }
.permission-save-bar.has-changes { border-top-color: #f0d59b; background: #fffaf0; }
.permission-save-state { display: flex; align-items: center; gap: 9px; min-width: 0; }
.permission-save-indicator { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #36a47a; box-shadow: 0 0 0 3px #e8f6ef; }
.permission-save-bar.has-changes .permission-save-indicator { background: #d79a27; box-shadow: 0 0 0 3px #fff0ce; }
.permission-save-state strong { display: block; color: #475a70; font-size: 10px; }
.permission-save-state small { display: block; margin-top: 3px; color: #8290a2; font-size: 9px; }
.permission-save-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.permission-save-actions button:disabled { cursor: not-allowed; opacity: .5; }
.privilege-note { display: flex; flex-direction: column; gap: 4px; margin-top: 11px; padding: 11px 14px; border-left: 3px solid #68a9d2; border-radius: 5px; background: #f4f8fb; }
.privilege-note strong { color: #4c647b; font-size: 9px; }
.privilege-note span { color: #7e8c9e; font-size: 9px; line-height: 1.45; }
.privilege-note em { color: #496b86; font-style: normal; font-weight: 700; }
.privilege-empty { padding: 25px; color: #8391a2; text-align: center; font-size: 11px; }
.auth-screen[hidden] { display: none; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 85% 12%, #eaf4fb 0, transparent 32%), var(--canvas); }
.auth-card { width: min(440px, 100%); padding: 28px; border: 1px solid #e6ebf2; border-radius: 14px; background: #fff; box-shadow: 0 18px 55px rgba(30, 54, 83, .1); }
.auth-brand { display: flex; justify-content: center; align-items: center; min-height: 62px; margin-bottom: 22px; }
.auth-brand img { width: min(250px, 78%); max-height: 65px; object-fit: contain; }
.auth-card h1 { margin: 4px 0 6px; color: #1c2a3c; font: 750 23px/1.3 'Manrope', sans-serif; letter-spacing: -.5px; }
.auth-card > p { margin: 0 0 19px; color: #7a8799; font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 12px; }
.auth-field { display: grid; gap: 5px; color: #536278; font-size: 11px; font-weight: 650; }
.auth-field input, .auth-field select { width: 100%; height: 39px; border: 1px solid #e1e7ef; border-radius: 6px; padding: 0 10px; outline: none; color: #344258; background: #fff; font-size: 12px; }
.auth-field input:focus, .auth-field select:focus { border-color: #94aef4; box-shadow: 0 0 0 3px rgba(73,118,237,.1); }
.auth-submit { width: 100%; min-height: 40px; margin-top: 5px; }
.auth-message { display: none; margin: 0 0 13px; padding: 9px 11px; border-radius: 6px; color: #9f3e49; background: #fff0f1; font-size: 11px; }
.auth-message.visible { display: block; }
.auth-hint { margin-top: 13px; color: #929dad; font-size: 10px; line-height: 1.55; }
.profile-signout {
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  color: rgba(255, 255, 255, .88);
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}
.profile-signout:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.nav-item[hidden],
.nav-label[hidden],
.engine-mini[hidden] {
  display: none !important;
}
.account-management-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.account-form-card { padding: 14px; }
.account-form-card h3 { margin: 0 0 10px; color: #344156; font: 700 12px 'Manrope', sans-serif; }
.account-side-form { margin: 0; padding: 0 0 14px; }
.account-side-form .privilege-detail-head { margin-bottom: 0; }
.account-side-form-grid { padding: 14px 18px 0; }
.account-side-form .account-form-actions { padding: 0 18px; }
.account-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.account-form-grid .field { margin: 0; }
.account-form-grid .field.full,
.account-form-grid .auth-field.full,
.account-form-grid .account-check.full { grid-column: 1 / -1; }
.account-form-card .account-form-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px;
}
.account-summary-card .account-form-actions { padding: 0 18px 14px; margin-top: 4px; }
.account-check { display: flex; align-items: center; gap: 7px; color: #66758a; font-size: 10px; }
.account-check input { accent-color: #4976ed; }
.account-credentials-card { padding: 14px; margin-bottom: 12px; }
.account-credentials-card h3 { margin: 0 0 10px; color: #344156; font: 700 12px 'Manrope', sans-serif; }
.account-credentials-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.password-reveal-row { display: flex; align-items: center; gap: 8px; }
.password-reveal-row input { flex: 1 1 auto; }
@media (max-width: 680px) {
  .account-credentials-grid { grid-template-columns: 1fr; }
}
.privilege-target { position: relative; }
.account-target-actions { display: flex; align-items: center; gap: 4px; }
.privilege-row { display: grid; gap: 2px; }
.privilege-row .privilege-target { margin: 0; }
.privilege-row .account-target-actions { justify-content: flex-end; padding: 0 6px 3px; }
.account-target-actions button { border: 0; padding: 3px 5px; border-radius: 4px; color: #728199; background: transparent; font-size: 9px; }
.account-target-actions button:hover { color: #b8434e; background: #fff0f1; }
.account-state { display: inline-flex; margin-left: 5px; padding: 2px 5px; border-radius: 6px; color: #258d67; background: #e9f7f0; font-size: 8px; font-weight: 700; }
.account-state.inactive { color: #8a93a3; background: #eef0f3; }
.permission-option:has(input:disabled) { opacity: .7; }
.permission-all-toggle input:disabled { cursor: not-allowed; }
@media (max-width: 680px) {
  .auth-screen { padding: 14px; }
  .auth-card { padding: 21px; }
  .account-management-forms { grid-template-columns: 1fr; }
  .account-form-grid { grid-template-columns: 1fr; }
  .account-form-grid .field.full,
  .account-form-grid .auth-field.full,
  .account-form-grid .account-check.full { grid-column: auto; }
}
@media (max-width: 560px) {
  .history-panel-head { align-items: flex-start; }
  .history-retention { align-items: flex-start; margin: 12px; }
  .history-list { padding: 0 12px 9px; }
  .history-entry { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .history-entry-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .history-entry-copy { flex: 1 1 160px; }
  .history-entry-copy time { line-height: 1.4; }
  .history-entry-actions { width: 100%; justify-content: flex-end; }
}
@media (max-width: 980px) {
  .privilege-workspace { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); gap: 11px; }
  .privilege-permission-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .privilege-workspace { grid-template-columns: 1fr; }
  .privilege-target-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .privilege-preview-banner { align-items: flex-start; padding: 11px; }
  .privilege-preview-badge { display: none; }
  .privilege-target-list { grid-template-columns: 1fr; }
  .privilege-detail-head { align-items: flex-start; padding: 14px; }
  .privilege-access-total { gap: 5px; padding: 7px; }
  .privilege-access-total > strong { font-size: 18px; }
  .privilege-permission-grid { gap: 8px; padding: 9px; }
  .permission-save-bar { align-items: flex-start; flex-direction: column; }
  .permission-save-actions { width: 100%; justify-content: flex-end; }
  .account-summary-grid { grid-template-columns: 1fr; }
}

.lesson-pin-table .pill.blue { margin-right: 4px; }

.attendance-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 12px;
}
.attendance-filter-bar label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #536278;
}
.attendance-count-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border: 0;
}
.attendance-count-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #dce3ec;
  background: #fff;
  box-shadow: 0 1px 0 rgba(31, 42, 61, 0.04);
}
.attendance-count-num {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #1f2a3d;
}
.attendance-count-label {
  font-size: 11px;
  font-weight: 600;
  color: #66758a;
}
.attendance-count-chip.is-empty {
  opacity: 0.72;
}
.attendance-count-chip.has-value {
  opacity: 1;
}
.attendance-count-chip.tone-present {
  border-color: #9ed4bc;
  background: linear-gradient(180deg, #eef9f3 0%, #fff 70%);
}
.attendance-count-chip.tone-present.has-value .attendance-count-num { color: #1f7a55; }
.attendance-count-chip.tone-late1,
.attendance-count-chip.tone-late2,
.attendance-count-chip.tone-late3,
.attendance-count-chip.tone-late4 {
  border-color: #e2c28a;
  background: linear-gradient(180deg, #fff7ea 0%, #fff 70%);
}
.attendance-count-chip.tone-late1.has-value .attendance-count-num,
.attendance-count-chip.tone-late2.has-value .attendance-count-num,
.attendance-count-chip.tone-late3.has-value .attendance-count-num,
.attendance-count-chip.tone-late4.has-value .attendance-count-num { color: #a66b12; }
.attendance-count-chip.tone-absent {
  border-color: #e3a8ae;
  background: linear-gradient(180deg, #fff1f2 0%, #fff 70%);
}
.attendance-count-chip.tone-absent.has-value .attendance-count-num { color: #b8434e; }
.attendance-count-chip.tone-pending {
  border-color: #c5cee0;
  background: linear-gradient(180deg, #f3f5f9 0%, #fff 70%);
}
.attendance-count-chip.tone-pending.has-value .attendance-count-num { color: #3d4d66; }
.attendance-panel-tabs,
.attendance-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.attendance-teacher-list {
  display: grid;
  gap: 10px;
}
.attendance-teacher-card {
  padding: 12px 14px;
}
.attendance-teacher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.attendance-teacher-head strong {
  display: block;
  font-size: 15px;
  color: #1f2a3d;
}
.attendance-teacher-head small {
  display: block;
  margin-top: 2px;
  color: #536278;
  font-size: 12px;
}
.attendance-teacher-card.tone-absent { border-left: 3px solid #c85a64; }
.attendance-teacher-card.tone-late1,
.attendance-teacher-card.tone-late2,
.attendance-teacher-card.tone-late3,
.attendance-teacher-card.tone-late4 { border-left: 3px solid #d39a3a; }
.attendance-teacher-card.tone-pending { border-left: 3px solid #7a8799; }
.attendance-teacher-card.tone-present { border-left: 3px solid #2f9d72; }
.attendance-teacher-card .table-wrap {
  margin-top: 12px;
}
.attendance-teacher-head .status-pill {
  margin-left: 8px;
  vertical-align: middle;
}
.attendance-lesson-bubble-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.attendance-lesson-bubble {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 10px;
  border-radius: 18px;
  border: 1px solid #dce3ec;
  background: #fff;
  box-shadow: 0 1px 0 rgba(31, 42, 61, 0.04);
  min-height: 108px;
}
.attendance-lesson-bubble.tone-present {
  border-color: #9ed4bc;
  background: linear-gradient(180deg, #f3fbf7 0%, #fff 55%);
}
.attendance-lesson-bubble.tone-pending {
  border-color: #cfd6e0;
  background: linear-gradient(180deg, #f7f8fa 0%, #fff 55%);
}
.attendance-lesson-bubble.tone-absent {
  border-color: #e3a8ae;
  background: linear-gradient(180deg, #fff5f6 0%, #fff 55%);
}
.attendance-lesson-bubble.tone-late1,
.attendance-lesson-bubble.tone-late2,
.attendance-lesson-bubble.tone-late3,
.attendance-lesson-bubble.tone-late4 {
  border-color: #e2c28a;
  background: linear-gradient(180deg, #fff8ec 0%, #fff 55%);
}
.attendance-lesson-bubble-main {
  display: grid;
  gap: 4px;
  flex: 1;
}
.attendance-lesson-time {
  font-size: 13px;
  color: #1f2a3d;
  letter-spacing: 0.01em;
}
.attendance-lesson-meta {
  font-size: 11px;
  line-height: 1.35;
  color: #536278;
}
.attendance-lesson-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.attendance-lesson-actions {
  margin-top: auto;
}
.attendance-range-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
}
.attendance-range-label {
  font-size: 15px;
  color: #1f2a3d;
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: center;
}
.attendance-nav-btn {
  flex: 0 0 auto;
  min-width: 34px;
  padding-left: 8px;
  padding-right: 8px;
}
.attendance-filter-bar .btn,
.attendance-range-nav .btn {
  margin-left: 0;
}
.attendance-month-chart {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #f8fafc;
}
.attendance-month-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.attendance-month-chart-head strong {
  color: #1f2a3d;
  font-size: 13px;
}
.attendance-month-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: #536278;
}
.attendance-month-legend .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px;
}
.attendance-month-legend .swatch.present,
.attendance-month-bar .seg.present { background: #2f9d72; }
.attendance-month-legend .swatch.late,
.attendance-month-bar .seg.late { background: #d39a3a; }
.attendance-month-legend .swatch.absent,
.attendance-month-bar .seg.absent { background: #c85a64; }
.attendance-month-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 140px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.attendance-month-col {
  flex: 1 1 0;
  min-width: 14px;
  max-width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.attendance-month-bar {
  width: 100%;
  height: 120px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: stretch;
  background: #eef2f6;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
}
.attendance-month-bar .seg {
  display: block;
  width: 100%;
  min-height: 0;
}
.attendance-month-day {
  font-size: 10px;
  color: #6b7788;
  line-height: 1;
}
@media print {
  .attendance-filter-bar,
  .attendance-panel-tabs,
  .attendance-preset-row,
  .attendance-report-section .found-actions,
  .attendance-report-table .no-print { display: none !important; }
}

/* My Schedule + Attendance */
.status-pill.ready { color: #218d67; background: #e9f7f0; }
.status-pill.warn { color: #b77c20; background: #fff4e0; }
.status-pill.bad { color: #b8434e; background: #fff0f1; }
.feedback-conflict-row td { background: #fff5f6; }
.my-schedule-mount { display: grid; gap: 14px; }
.my-schedule-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 12px; border: 1px solid #e4e9f0; border-radius: 8px; background: #f8fafc;
  color: #536278; font-size: 12px;
}
.my-schedule-toolbar .btn { margin-left: auto; }
.my-schedule-week { display: grid; gap: 16px; }
.my-schedule-day {
  display: grid; gap: 10px; padding: 12px; border: 1px solid #e4e9f0; border-radius: 10px; background: #fff;
}
.my-schedule-day.is-today {
  border-color: #b7d0f5; background: linear-gradient(180deg, #f5f9ff 0%, #fff 48%);
}
.my-schedule-day-head {
  display: flex; align-items: center; gap: 8px;
}
.my-schedule-day-head h3 {
  margin: 0; color: #344156; font: 700 13px 'Manrope', sans-serif;
}
.my-schedule-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.my-schedule-card { padding: 12px 14px; display: grid; gap: 6px; }
.my-schedule-card.is-today { border-color: #c5d7f5; }
.my-schedule-card.request-pending {
  border-color: #f0c56d; background: linear-gradient(180deg, #fff8eb 0%, #fff 55%);
}
.my-schedule-card.request-admin {
  border-color: #f0b35a; background: linear-gradient(180deg, #fff4e0 0%, #fff 55%);
}
.my-schedule-card.request-approved {
  border-color: #7dcca8; background: linear-gradient(180deg, #eefaf4 0%, #fff 55%);
}
.my-schedule-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.my-schedule-pills { display: inline-flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.my-schedule-request-line {
  color: #5b6576; font-size: 11px; line-height: 1.4;
  padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .7);
}
.my-schedule-card p { margin: 0; color: #445164; font-size: 12px; line-height: 1.45; }
.my-schedule-card small { color: #8a93a3; font-size: 10px; }
.my-schedule-card .found-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 11px; color: #445164;
}
.data-table th, .data-table td {
  padding: 8px 9px; border-bottom: 1px solid #e8edf3; text-align: left; vertical-align: top;
}
.data-table th {
  color: #6b778a; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #f7f9fc;
}
.data-table tr:last-child td { border-bottom: 0; }
@media (max-width: 680px) {
  .my-schedule-toolbar .btn { margin-left: 0; width: 100%; }
}

/* Class-rep lesson feedback */
.class-feedback-form,
.class-reps-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.class-feedback-form {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
}
.class-feedback-form label,
.class-reps-form label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: #536278;
}
.class-feedback-form select {
  min-height: 34px;
  border: 1px solid #d5dde8;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}
.class-reps-list { display: grid; gap: 14px; }
.class-reps-form {
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  background: #fbfcfe;
}
.class-reps-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 10px;
}
.class-reps-form.is-locked {
  background: #f5f7fa;
}
.class-reps-form.is-locked .account-check.is-locked {
  opacity: 0.85;
  cursor: default;
}
.class-reps-form.is-editing {
  border-color: #9db7ef;
  background: #fff;
}

.excel-planner-studio-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 14px;
}
.excel-planner-studio-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e4e9f0;
}
.excel-planner-studio-head h3 {
  margin: 4px 0 6px;
  font-size: 1.15rem;
}
.excel-planner-studio-head p {
  margin: 0;
  color: #536278;
  font-size: 0.92rem;
  max-width: 62ch;
}
.excel-planner-studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.excel-planner-frame {
  display: block;
  width: 100%;
  min-height: min(78vh, 920px);
  height: 78vh;
  border: 0;
  background: #07111c;
}
@media (max-width: 900px) {
  .excel-planner-studio-head { flex-direction: column; }
  .excel-planner-frame { min-height: 70vh; height: 70vh; }
}

/* Frappe HR embedded inside Studio (one shell) */
.app-shell.hr-embedded .page-content {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}
.app-shell.hr-embedded .topbar .engine-mini,
.app-shell.hr-embedded .topbar #topbarGenerate,
.app-shell.hr-embedded .topbar .term-chip {
  display: none;
}
.hr-embed {
  flex: 1;
  display: flex;
  min-height: calc(100vh - 72px);
  background: #f5f7fa;
}
.hr-embed-frame {
  flex: 1;
  width: 100%;
  border: 0;
  min-height: calc(100vh - 72px);
  background: #fff;
}
.hr-embed-loading {
  margin: auto;
  padding: 24px;
  color: #536278;
  font-size: 1rem;
}
.hr-embed-loading.hr-embed-error { color: #b42318; }
