:root {
  --ink: #17201d;
  --muted: #69736f;
  --paper: #f7f8f7;
  --surface: #ffffff;
  --line: #e2e6e4;
  --green: #176b51;
  --green-2: #e5f2ed;
  --orange: #d7663c;
  --yellow: #dcae50;
  --blue: #4b7e87;
  --purple: #76627c;
  --slot-height: 30px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 320px;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }

.topbar {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; margin-right: auto; }
.site-logo { display: block; width: 236px !important; height: 52px !important; max-width: 236px !important; max-height: 52px !important; object-fit: contain; object-position: left center; }
.brand-mark {
  width: 42px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; background: var(--ink); color: white;
  font-size: 9px; font-weight: 800; letter-spacing: .04em;
}
.brand b { display: block; max-width: 310px; font-size: 13px; line-height: 1.15; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; align-self: stretch; gap: 4px; overflow-x: auto; }
.nav-link {
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  padding: 0 11px; cursor: pointer; font-size: 13px; color: var(--muted); white-space: nowrap;
}
.nav-link:hover, .nav-link:focus-visible, .nav-link.active { color: var(--ink); border-bottom-color: var(--orange); }
.data-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.data-status i { width: 7px; height: 7px; border-radius: 50%; background: #6ba178; display: inline-block; margin-right: 7px; }
.account-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; white-space: nowrap; }
.account-button:hover { color: var(--green); }

main { max-width: 1500px; margin: auto; padding: 0 clamp(20px, 5vw, 76px) 80px; }
.hero {
  min-height: 300px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 70px; align-items: end; padding: 58px 0 48px; border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 14px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .19em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(43px, 5.5vw, 74px); line-height: .98; font-weight: 620; letter-spacing: -.055em; margin-bottom: 24px; }
h1 em { color: var(--green); font-style: normal; font-weight: 620; }
.hero-copy { max-width: 650px; color: var(--muted); line-height: 1.65; font-size: 15px; margin: 0; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
}
.hero-stats div { padding: 24px 18px; border-right: 1px solid var(--line); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats strong { font-size: 28px; font-weight: 620; letter-spacing: -.04em; display: block; }
.hero-stats span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

.view { display: none; padding-top: 58px; animation: fade .25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.section-heading h2 { font-size: clamp(29px, 4vw, 42px); line-height: 1.1; font-weight: 620; margin: 0; letter-spacing: -.04em; }
.section-heading > p { color: var(--muted); max-width: 480px; line-height: 1.55; font-size: 14px; margin-bottom: 3px; }

.filters, .schedule-toolbar {
  padding: 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; display: grid; grid-template-columns: 1.5fr .7fr 1fr; gap: 14px; align-items: end;
}
label { font-size: 10px; color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
select, input {
  width: 100%; height: 45px; margin-top: 8px; padding: 0 39px 0 13px;
  border: 1px solid var(--line); border-radius: 8px; background-color: #fff; color: var(--ink);
  text-transform: none; letter-spacing: normal; font-weight: 450; font-size: 13px;
}
select:focus, input:focus { outline: 2px solid rgba(30, 103, 78, .23); border-color: var(--green); }
.search-label { position: relative; }
.search-label span { position: absolute; right: 15px; bottom: 13px; color: var(--muted); font-size: 18px; }
.result-bar { display: flex; justify-content: space-between; margin: 19px 0 12px; font-size: 12px; color: var(--muted); }
.text-button { border: 0; padding: 0; background: none; color: var(--green); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

.uc-list { display: grid; gap: 10px; }
.uc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.uc-card summary {
  list-style: none; cursor: pointer; padding: 21px 24px; display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, .6fr) auto auto;
  align-items: center; gap: 20px;
}
.uc-card summary::-webkit-details-marker { display: none; }
.uc-card summary::after { content: "+"; font-size: 22px; color: var(--green); }
.uc-card[open] summary::after { content: "−"; }
.uc-title strong { display: block; font-size: 16px; font-weight: 620; margin-bottom: 4px; }
.uc-title small, .uc-dept { color: var(--muted); font-size: 11px; }
.pill-row { display: flex; gap: 5px; flex-wrap: wrap; }
.pill { padding: 4px 7px; border-radius: 20px; background: var(--green-2); color: var(--green); font-size: 10px; font-weight: 750; }
.count-badge { font-size: 11px; color: var(--muted); white-space: nowrap; }
.turns { border-top: 1px solid var(--line); padding: 0 24px 18px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { text-align: left; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: 9px; padding: 13px 10px; border-bottom: 1px solid var(--line); }
td { padding: 14px 10px; border-bottom: 1px solid #e9e9e3; vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.spotlight-panel { background: var(--ink); color: #f7f4eb; min-height: 400px; padding: clamp(24px, 4vw, 50px); border-radius: 14px; }
.spotlight-panel > label { display: block; max-width: 680px; color: #bdc8c2; }
.spotlight-panel select { background-color: #20362f; border-color: #465b54; color: #fff; }
.teacher-results { margin-top: 38px; }
.teacher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.teacher-card { border: 1px solid #40534c; border-radius: 9px; padding: 22px; min-height: 150px; background: #1a3029; }
.teacher-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 25px; }
.teacher-card p { color: #b8c3be; font-size: 12px; line-height: 1.55; }
.teacher-card button { border: 0; background: none; color: #efbc6b; padding: 0; font-size: 11px; cursor: pointer; }
.uc-weekly-section { margin-top: 38px; padding-top: 32px; border-top: 1px solid #40534c; }
.uc-weekly-heading { margin-bottom: 16px; }
.uc-weekly-heading .eyebrow { color: #9eafa8; margin-bottom: 6px; }
.uc-weekly-heading h3 { color: #f7f4eb; font-size: 20px; font-weight: 600; }
.uc-weekly-section .semester-schedule { color: var(--ink); }

.empty-state { text-align: center; color: var(--muted); display: grid; justify-items: center; align-content: center; min-height: 250px; }
.empty-state.large { min-height: 390px; background: var(--surface); border: 1px solid var(--line); margin-top: 12px; }
.empty-state h3 { color: inherit; font-size: 21px; font-weight: 600; margin: 15px 0 8px; }
.empty-state p { max-width: 420px; font-size: 13px; }
.empty-icon { width: 56px; height: 56px; border: 1px solid currentColor; border-radius: 12px; display: grid; place-items: center; font-size: 15px; font-weight: 650; }
.spotlight-panel .empty-state { color: #b8c3be; }

.schedule-toolbar { grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr) auto; justify-content: space-between; }
.class-toolbar {
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.class-toolbar label { display: block; max-width: 620px; }
.schedule-actions {
  margin-top: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.schedule-actions p { margin: 0; }
.schedule-actions strong, .schedule-actions span { display: block; }
.schedule-actions strong { font-size: 13px; }
.schedule-actions span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.export-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.workload-summary {
  margin-top: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px;
}
.workload-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 14px; }
.workload-heading h3 { margin: 0; font-size: 15px; font-weight: 650; }
.workload-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.workload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.workload-card { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; }
.workload-card > span { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.workload-card > strong { display: block; margin-top: 7px; font-size: 25px; font-weight: 620; letter-spacing: -.035em; }
.workload-card > small { color: var(--muted); font-size: 10px; }
.workload-card dl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 15px 0 0; padding-top: 11px; border-top: 1px solid var(--line); }
.workload-card dt { color: var(--muted); font-size: 10px; }
.workload-card dd { margin: 0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.primary-button {
  min-height: 40px; padding: 0 17px; border: 0; border-radius: 8px; background: var(--green);
  color: white; font-size: 12px; font-weight: 700; cursor: pointer;
}
.primary-button:hover:not(:disabled) { background: #10543f; }
.primary-button.wide { width: 100%; min-height: 46px; }
.secondary-button {
  min-height: 40px; padding: 0 17px; border: 1px solid var(--line); border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; appearance: none; -webkit-appearance: none;
  background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.secondary-button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.secondary-button:active { transform: translateY(1px); background: var(--green-2); }
.secondary-button:focus-visible { outline: 2px solid rgba(30, 103, 78, .3); outline-offset: 2px; }
.secondary-button.wide { width: 100%; min-height: 44px; }
.email-action-buttons { display: grid !important; gap: 8px !important; }
.segmented { display: flex; border: 1px solid var(--line); padding: 3px; background: var(--paper); }
.segmented button { border: 0; background: transparent; padding: 10px 21px; cursor: pointer; font-size: 12px; }
.segmented button.active { background: var(--ink); color: white; }
.week-scroll { margin-top: 12px; display: grid; gap: 20px; }
.semester-schedule { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.semester-heading {
  min-width: 860px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: #fbfcfb;
}
.semester-heading span { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.semester-heading h3 { margin: 3px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.semester-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.semester-empty { min-width: 600px; padding: 45px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.week-grid { display: grid; grid-template-columns: 70px repeat(5, minmax(145px, 1fr)); min-width: 860px; }
.week-head { position: sticky; top: 0; z-index: 4; background: var(--ink); color: white; text-align: center; padding: 15px 5px; font-size: 12px; font-weight: 600; border-right: 1px solid #3f514b; }
.week-head:first-child { font: 700 9px Inter, sans-serif; color: #aebcb7; letter-spacing: .08em; }
.time-axis, .day-column { position: relative; height: calc(28 * var(--slot-height)); }
.time-axis { border-right: 1px solid var(--line); }
.time-label { position: absolute; right: 10px; transform: translateY(-6px); font-size: 9px; color: var(--muted); }
.day-column { border-right: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot-height) - 1px), #e6e7e1 calc(var(--slot-height) - 1px), #e6e7e1 var(--slot-height)); }
.day-column:last-child { border-right: 0; }
.event {
  position: absolute; left: 4px; right: 4px; z-index: 2; padding: 7px 8px;
  background: #d9e9df; border-left: 3px solid var(--green); overflow: hidden;
  font-size: 9px; line-height: 1.25;
}
.event strong { display: block; font-size: 10px; margin-bottom: 3px; }
.event span { opacity: .78; display: block; }
.schedule-field-links { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 2px; }
.schedule-field-link {
  display: inline; margin: 0; padding: 0; border: 0; background: none; color: var(--green);
  font: inherit; font-weight: 700; text-align: left; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer;
}
.event .schedule-field-link { color: inherit; }
.schedule-field-link:hover, .schedule-field-link:focus-visible { color: var(--orange); outline: none; }
.schedule-link-separator { display: inline !important; opacity: .55; }
.event:hover, .event:focus-visible {
  z-index: 6; min-height: 72px; overflow: visible;
  outline: 2px solid rgba(23, 107, 81, .28); box-shadow: 0 7px 18px rgba(23, 32, 29, .16);
}
.event.color-1 { background: #f8dfd2; border-color: var(--orange); }
.event.color-2 { background: #f7e9bf; border-color: var(--yellow); }
.event.color-3 { background: #d8e8eb; border-color: var(--blue); }
.event.color-4 { background: #e7dce8; border-color: var(--purple); }
.event.overlapping { box-shadow: inset 0 0 0 1px rgba(23, 32, 29, .13); }
.interactive-event { cursor: pointer; }
.interactive-event:focus-visible { outline-color: var(--orange); }
.event-tooltip {
  position: absolute; top: calc(100% + 5px); left: 0; z-index: 12; width: max-content;
  max-width: 260px; padding: 8px 10px; border-radius: 7px; background: var(--ink);
  color: white; font-size: 10px; line-height: 1.4; box-shadow: 0 7px 18px rgba(23, 32, 29, .2);
  opacity: 0 !important; visibility: hidden; pointer-events: none;
}
.event:hover > .event-tooltip, .event:focus-visible > .event-tooltip { opacity: 1 !important; visibility: visible; }
.table-wrap { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; padding: 10px 20px; }
.semester-label { white-space: nowrap; color: var(--green); font-weight: 700; }
.table-uc { display: block; min-width: 190px; font-weight: 650; }
.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; }
.issue-column, .issue-cell { width: 38px; min-width: 38px; padding-left: 6px; padding-right: 6px; text-align: center; }
.issue-cell { white-space: nowrap; }
.row-with-issue { background: #fffdf9; }
.row-issue {
  width: 21px; height: 21px; display: inline-grid; place-items: center; margin: 1px;
  border-radius: 50%; font-size: 10px; font-weight: 850; cursor: help;
}
.row-issue.conflict { color: #a93e30; background: #f8e5e1; border: 1px solid #edc9c1; }
.row-issue.missing { color: #856314; background: #faf0d5; border: 1px solid #eedda8; }
.validation-ok {
  margin-top: 12px; padding: 14px 17px; display: flex; gap: 12px; align-items: center;
  border: 1px solid #cfe4da; border-radius: 10px; background: #f2faf6; color: var(--green);
}
.validation-ok > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 12px; }
.validation-ok p { margin: 0; font-size: 12px; }
.validation-ok small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
.diagnostic-summary { display: flex; gap: 1px; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: fit-content; background: var(--line); }
.diagnostic-summary div { min-width: 145px; padding: 13px 17px; background: var(--surface); }
.diagnostic-summary strong { display: block; font-size: 20px; }
.diagnostic-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.diagnostic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.diagnostic-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.diagnostic-card.conflict { border-left: 3px solid #c94e3d; }
.diagnostic-card.missing { border-left: 3px solid var(--yellow); }
.diagnostic-card summary { padding: 13px 15px; display: flex; align-items: center; gap: 11px; cursor: pointer; list-style: none; }
.diagnostic-card summary::-webkit-details-marker { display: none; }
.diagnostic-card summary strong, .diagnostic-card summary small { display: block; }
.diagnostic-card summary strong { font-size: 12px; }
.diagnostic-card summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.diagnostic-icon { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f8e5e1; color: #a93e30; font-size: 11px; font-weight: 800; }
.missing .diagnostic-icon { background: #faf0d5; color: #8a6818; }
.diagnostic-card > div { padding: 2px 51px 14px; }
.diagnostic-card > div p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.diagnostic-card > div strong { color: var(--ink); }

.email-view { padding-top: 38px; }
.back-button { margin-bottom: 26px; padding: 0; border: 0; background: none; color: var(--green); font-size: 12px; cursor: pointer; }
.email-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.email-settings, .email-canvas { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.email-settings { padding: 22px; position: sticky; top: 90px; display: grid; gap: 22px; }
.email-settings > div:not(.email-notice) { display: grid; gap: 7px; }
.settings-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.email-settings strong { font-size: 13px; line-height: 1.4; }
.recipient-list { display: flex !important; flex-wrap: wrap; gap: 6px !important; }
.recipient-list span { max-width: 100%; padding: 6px 8px; border-radius: 6px; background: var(--green-2); color: var(--green); font-size: 10px; overflow-wrap: anywhere; }
.no-recipient { margin: 0; color: #a93e30; font-size: 11px; line-height: 1.45; }
.email-notice { padding: 11px; background: var(--paper); border-radius: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.email-notice code { font-size: inherit; }
.send-status { min-height: 16px; margin: -10px 0 0; font-size: 11px; line-height: 1.4; }
.send-status.success { color: var(--green); }
.send-status.error { color: #a93e30; }
.editor-bar { min-height: 48px; padding: 8px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.editor-bar > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.editor-bar button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.email-editor { min-height: 700px; padding: clamp(24px, 5vw, 58px); outline: 0; overflow-x: auto; }
.email-editor:focus { box-shadow: inset 0 0 0 2px rgba(23, 107, 81, .16); }
.email-editor > div > div > table { min-width: 680px; }

footer { border-top: 1px solid var(--line); padding: 28px clamp(20px, 5vw, 76px); display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; letter-spacing: .09em; }
#toast { position: fixed; right: 22px; bottom: 22px; background: var(--ink); color: white; padding: 13px 18px; font-size: 12px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
#toast.show { opacity: 1; transform: none; }

.auth-page { min-height: 100vh; background: linear-gradient(135deg, #eef4f1, var(--paper) 55%); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 440px); padding: clamp(28px, 6vw, 48px); background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(23,32,29,.09); }
.auth-card h1 { font-size: 36px; margin-bottom: 12px; }
.auth-brand { display: flex; align-items: center; margin-bottom: 42px; }
.auth-logo { display: block; width: 332px !important; height: 72px !important; max-width: 332px !important; max-height: 72px !important; object-fit: contain; object-position: left center; }
.auth-brand small { color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.auth-intro, .settings-copy { color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-card form, .settings-card form { display: grid; gap: 16px; }
.auth-error { min-height: 20px; margin: 18px 0 0; color: #a93e30; font-size: 12px; line-height: 1.5; }
.primary-button.wide { width: 100%; }
.password-strength { display: grid; grid-template-columns: 1fr; gap: 7px; }
.password-strength > span { display: block; height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--green) calc(var(--score, 0) * 14.28%), var(--line) 0); }
.password-strength[data-score="0"] { --score: 0; } .password-strength[data-score="1"] { --score: 1; }
.password-strength[data-score="2"] { --score: 2; } .password-strength[data-score="3"] { --score: 3; }
.password-strength[data-score="4"] { --score: 4; } .password-strength[data-score="5"] { --score: 5; }
.password-strength[data-score="6"] { --score: 6; } .password-strength[data-score="7"] { --score: 7; }
.password-strength small { color: var(--muted); font-size: 10px; }
.password-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: 10px; }
.password-rules .valid { color: var(--green); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.settings-card h3 { margin-bottom: 20px; }
.settings-card code { display: block; padding: 12px; background: var(--paper); border-radius: 7px; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 11px; }
#totp-setup { display: grid; gap: 14px; margin-top: 16px; }
#totp-setup p { margin: 0; color: var(--muted); font-size: 11px; }
.danger-button { min-height: 40px; border: 1px solid #c94e3d; border-radius: 7px; background: white; color: #a93e30; cursor: pointer; }
.recovery-codes { margin-top: 18px; }
.recovery-codes strong { display: block; margin-bottom: 10px; font-size: 11px; line-height: 1.5; }
.users-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.users-list div { display: flex; justify-content: space-between; gap: 20px; padding: 13px; background: white; }
.users-list strong { font-size: 12px; }.users-list span { color: var(--muted); font-size: 10px; text-align: right; }
.static-download-card { display: flex; flex-direction: column; align-items: flex-start; }
.static-download-card .secondary-button { margin-top: auto; }
.static-warning { padding: 10px 12px; border-left: 3px solid var(--yellow); background: #fffaf0; color: #765b1d; font-size: 11px; line-height: 1.5; }
.excel-manager-card { grid-column: 1 / -1; }
.excel-manager-card h4 { margin: 24px 0 10px; font-size: 12px; }
.excel-structure-warning { margin: 14px 0 18px; padding: 14px 16px; border: 1px solid #e6c978; border-left: 4px solid var(--yellow); border-radius: 8px; background: #fffaf0; }
.excel-structure-warning strong { display: block; color: #60470f; font-size: 12px; }
.excel-structure-warning p { margin: 7px 0 0; color: #765b1d; font-size: 11px; line-height: 1.5; }
.excel-structure-warning ul { display: flex; gap: 7px; margin: 9px 0 0; padding: 0; list-style: none; }
.excel-structure-warning li { padding: 5px 8px; border-radius: 5px; background: #f5e6b9; color: #60470f; font-size: 11px; font-weight: 750; }
.excel-manager-card form { grid-template-columns: minmax(260px, 1fr) auto; align-items: end; }
.excel-manager-card input[type="file"] { height: auto; min-height: 45px; padding: 9px 12px; }
.excel-versions { display: grid; gap: 6px; }
.excel-version { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; }
.excel-version.active { border-color: #b8d8cb; background: var(--green-2); }
.excel-version strong, .excel-version small { display: block; }
.excel-version strong { font-size: 11px; overflow-wrap: anywhere; }
.excel-version small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.excel-version .version-authors { margin-top: 7px; line-height: 1.55; color: #4f5e58; }
.excel-version .secondary-button { min-height: 32px; flex: 0 0 auto; }
.active-version-label { color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.log-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.log-toolbar p { margin: 0; color: var(--muted); font-size: 11px; }
.log-table { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.log-table table { min-width: 900px; }
.log-table td { vertical-align: top; }
.log-date { white-space: nowrap; }
.log-detail { max-width: 460px; overflow-wrap: anywhere; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }

@media (max-width: 900px) {
  .topbar { gap: 10px; }
  .data-status { display: none; }
  .brand b { max-width: 200px; }
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-stats { max-width: 620px; }
  .section-heading { align-items: start; flex-direction: column; gap: 14px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-label { grid-column: 1 / -1; }
  .teacher-grid { grid-template-columns: 1fr 1fr; }
  .workload-grid { grid-template-columns: 1fr; }
  .email-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .excel-manager-card form { grid-template-columns: 1fr; }
  .email-settings { position: static; }
}
@media (max-width: 650px) {
  .topbar { height: auto; min-height: 68px; padding: 10px 16px; flex-wrap: wrap; }
  .site-logo { width: 212px !important; height: 48px !important; max-width: 212px !important; max-height: 48px !important; }
  nav { order: 3; width: 100%; height: 42px; overflow-x: auto; }
  .nav-link { flex: 1; padding: 0 8px; white-space: nowrap; }
  main { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 42px; min-height: auto; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats div { border-right: 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; }
  .hero-stats div:last-child { border-bottom: 0; }
  .filters, .schedule-toolbar { grid-template-columns: 1fr; }
  .search-label { grid-column: auto; }
  .uc-card summary { grid-template-columns: 1fr auto; gap: 10px; }
  .uc-dept, .count-badge { grid-column: 1; }
  .uc-card summary::after { grid-column: 2; grid-row: 1; }
  .teacher-grid { grid-template-columns: 1fr; }
  .diagnostic-list { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  footer { flex-direction: column; gap: 8px; }
  .schedule-actions { align-items: stretch; flex-direction: column; }
  .export-actions { justify-content: stretch; }
  .export-actions button { flex: 1; }
  .email-editor { padding: 20px; }
}
