:root {
  --ink: #17223b;
  --muted: #657086;
  --line: #e4e8ef;
  --canvas: #f5f7fb;
  --navy: #173b72;
  --navy-deep: #102c58;
  --sky: #edf4ff;
  --teal: #16817a;
  --teal-soft: #eaf8f6;
  --amber: #bc7715;
  --amber-soft: #fff6e7;
  --danger: #a84b4b;
  --danger-soft: #fff0f0;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
h1, h2, p { margin-top: 0; }

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.loader-logo { width: min(260px, 70vw); height: auto; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 34px 18px;
  background:
    radial-gradient(circle at 15% 12%, rgba(42, 91, 153, .12), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(22, 129, 122, .1), transparent 27%),
    #f4f7fb;
}
.auth-card {
  width: min(500px, calc(100vw - 36px));
  padding: 30px;
  border: 1px solid rgba(217, 224, 235, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 70px rgba(27, 47, 78, .12);
}
.auth-brand,
.brand {
  display: grid;
  justify-items: start;
}
.auth-brand {
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.auth-brand-logo { width: min(285px, 100%); height: auto; }
.brand-logo { width: 215px; max-width: 100%; height: auto; }
.auth-brand span,
.brand span { color: #8993a3; font-size: 11px; }
.auth-copy { padding: 27px 0 8px; }
.auth-copy h1 { margin-bottom: 8px; font-size: 27px; letter-spacing: -.04em; }
.auth-copy > p:last-child { margin-bottom: 0; color: #7c8797; font-size: 12px; line-height: 1.6; }
.auth-form,
.modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.auth-form > label,
.modal-form > label,
.entry-form > label,
.substitute-use-row > label,
.profile-strip > label,
.date-control {
  display: grid;
  gap: 6px;
}
.auth-form > label { grid-column: 1 / -1; }
.setup-form > label:not(.full) { grid-column: auto; }
label > span,
.date-control span,
.input-label {
  color: #727e90;
  font-size: 10px;
  font-weight: 800;
}
label > small { color: #929baa; font-size: 9px; line-height: 1.45; }
input {
  min-width: 0;
  height: 43px;
  padding: 0 12px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 650;
}
input:focus { border-color: #7898c6; box-shadow: 0 0 0 3px rgba(55, 105, 173, .1); }
input:disabled,
input[readonly] { color: #6f7888; background: #f4f6f9; }
.auth-form .primary-button { grid-column: 1 / -1; margin-top: 2px; }
.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.primary-button { border: 0; color: #fff; background: var(--navy); }
.primary-button:hover { background: var(--navy-deep); }
.primary-button.teal { background: var(--teal); }
.primary-button.teal:hover { background: #106f69; }
.secondary-button { border: 1px solid #d8dee8; color: #5f6b7d; background: #fff; }
.secondary-button:hover { color: var(--navy); border-color: #9fb3ce; background: var(--sky); }
button:disabled { cursor: not-allowed; opacity: .55; }
.auth-help,
.auth-footer { color: #8b95a5; font-size: 10px; text-align: center; }
.auth-help { margin: 17px 0 0; }
.auth-footer { margin: 16px 0 0; }
.text-button {
  padding: 2px 3px;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-divider {
  padding-top: 6px;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 850;
  line-height: 28px;
}
.full { grid-column: 1 / -1; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 276px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.brand { gap: 7px; padding: 0 8px 30px; }
.brand span { padding-left: 2px; font-weight: 750; }
.side-label { padding: 0 10px 9px; color: #9aa3b1; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.employee-list {
  display: grid;
  gap: 5px;
  max-height: calc(100vh - 285px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.employee-list-row {
  position: relative;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  border-radius: 13px;
  transition: opacity 120ms ease, transform 120ms ease;
}
.employee-list-row[draggable="true"] { cursor: grab; }
.employee-list-row[draggable="true"]:active { cursor: grabbing; }
.employee-list-row.dragging { opacity: .38; }
.employee-list-row.drop-before::before,
.employee-list-row.drop-after::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 4px;
  left: 4px;
  height: 3px;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 0 0 3px rgba(21, 65, 122, .1);
  animation: drop-guide-pulse 520ms ease-in-out infinite alternate;
}
.employee-list-row.drop-before::before { top: -4px; }
.employee-list-row.drop-after::after { bottom: -4px; }
@keyframes drop-guide-pulse {
  from { opacity: .55; transform: scaleX(.94); }
  to { opacity: 1; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .employee-list-row.drop-before::before,
  .employee-list-row.drop-after::after { animation: none; }
}
.drag-handle {
  color: #a1aaba;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -5px;
  user-select: none;
}
.employee-list-row:hover .drag-handle { color: var(--navy); }
.employee-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}
.employee-item:hover { background: #f5f7fb; }
.employee-item.active { color: var(--navy-deep); background: var(--sky); }
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #526174;
  background: #e8ebf0;
  font-size: 13px;
  font-weight: 800;
}
.employee-item.active .avatar { color: #fff; background: var(--navy); }
.employee-copy { min-width: 0; }
.employee-copy strong,
.employee-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.employee-copy strong { font-size: 13px; }
.employee-copy small { margin-top: 3px; color: #8c95a5; font-size: 10px; }
.employee-item b { color: var(--navy); font-size: 12px; }
.bulk-help { margin: -5px 2px 16px; color: #7d8797; font-size: 11px; }
.render-error { min-height: 180px; display: grid; place-content: center; gap: 8px; text-align: center; }
.render-error strong { color: #8a3d3d; font-size: 16px; }
.render-error p { color: #7d8797; font-size: 12px; }
.add-employee {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed #cfd6e1;
  border-radius: 12px;
  color: #5c6879;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.add-employee:hover { border-color: var(--navy); color: var(--navy); background: var(--sky); }
.privacy-note {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding: 13px;
  border-radius: 12px;
  color: #727d8e;
  background: #f6f8fb;
  font-size: 10px;
  line-height: 1.55;
}
.privacy-note span { color: var(--teal); font-size: 7px; line-height: 18px; }

.workspace { width: min(1240px, 100%); margin: 0 auto; padding: 34px 40px 60px; }
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}
.topbar h1 { margin-bottom: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.04em; }
.eyebrow { margin: 0 0 7px; color: #71809a; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.top-actions { display: flex; align-items: flex-end; gap: 9px; }
.admin-actions { display: flex; gap: 6px; }
.admin-actions .secondary-button { height: 42px; font-size: 10px; }
.date-control input { width: 146px; height: 42px; }
.user-menu {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  column-gap: 7px;
  padding: 4px 10px;
  border: 1px solid #dbe1e9;
  border-radius: 11px;
  background: #fff;
}
.user-menu strong { font-size: 10px; }
.user-menu button { grid-column: 2; padding: 0; border: 0; color: #8c95a4; background: none; cursor: pointer; font-size: 9px; text-align: left; }
.role-badge { grid-row: 1 / 3; align-self: center; padding: 5px 7px; border-radius: 999px; color: #315f98; background: var(--sky); font-size: 8px; font-weight: 850; }
.role-badge.editor { color: #21716a; background: var(--teal-soft); }
.role-badge.employee { color: #805f21; background: var(--amber-soft); }

.profile-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 190px minmax(200px, .9fr) auto;
  align-items: end;
  gap: 13px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
}
.assumption-chip {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border-radius: 10px;
  color: #1f655f;
  background: var(--teal-soft);
}
.assumption-chip span { color: #737f91; font-size: 9px; font-weight: 800; }
.assumption-chip strong { font-size: 11px; }
.profile-strip .secondary-button { height: 42px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.summary-card {
  min-height: 145px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 51, 78, .035);
}
.summary-card.featured { color: #fff; border-color: var(--navy); background: linear-gradient(145deg, #1e4a85, #143564); box-shadow: 0 12px 28px rgba(23, 59, 114, .2); }
.summary-card > span { color: #748095; font-size: 11px; font-weight: 800; }
.summary-card.featured > span,
.summary-card.featured p { color: rgba(255, 255, 255, .7); }
.summary-card > div { display: flex; align-items: baseline; gap: 5px; margin-top: 12px; }
.summary-card strong { font-size: 31px; letter-spacing: -.04em; }
.summary-card small { color: #7a8494; font-size: 12px; font-weight: 700; }
.summary-card.featured small { color: rgba(255, 255, 255, .75); }
.summary-card p { margin: 10px 0 0; color: #8b94a4; font-size: 10px; line-height: 1.5; }
.status-strip { margin: -5px 0 18px; }
.next-alert,
.overuse-alert { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: 11px; color: #52627a; background: #edf3fb; font-size: 11px; }
.next-alert strong,
.overuse-alert strong { padding: 4px 8px; border-radius: 999px; color: #fff; background: #5b78a0; font-size: 9px; }
.overuse-alert { color: #82541a; background: #fff5e5; }
.overuse-alert strong { background: #bb781d; }

.panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(32, 47, 74, .035); }
.records-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 16px; }
.records-panel { min-width: 0; overflow: hidden; }
.records-heading { min-height: 94px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 21px 22px 17px; border-bottom: 1px solid #edf0f4; }
.records-heading h2 { margin-bottom: 0; font-size: 17px; letter-spacing: -.03em; }
.balance-badge { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.balance-badge.annual { color: #315f98; background: var(--sky); }
.balance-badge.substitute { color: #21716a; background: var(--teal-soft); }
.entry-form { display: grid; grid-template-columns: 1.35fr .75fr; gap: 10px; padding: 16px 20px; background: #fafbfc; border-bottom: 1px solid #edf0f4; }
.entry-form .note-field { grid-column: 1 / -1; }
.entry-form input,
.substitute-use-row input { height: 37px; font-size: 11px; }
.entry-form .primary-button { grid-column: 1 / -1; }
.readonly-message { padding: 12px 20px; color: #687588; background: #f7f9fc; border-bottom: 1px solid #edf0f4; font-size: 10px; }
.record-list { max-height: 370px; overflow-y: auto; padding: 4px 20px 8px; }
.record-row,
.substitute-record-top { display: grid; grid-template-columns: 33px minmax(0, 1fr) auto 24px; align-items: center; gap: 10px; }
.record-row { min-height: 66px; border-bottom: 1px solid #eef1f4; }
.record-row:last-child { border-bottom: 0; }
.record-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: 16px; font-weight: 800; }
.record-icon.annual { color: #416ba1; background: var(--sky); }
.record-icon.substitute { color: #27746e; background: var(--teal-soft); }
.record-copy { min-width: 0; }
.record-copy strong,
.record-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-copy strong { font-size: 11px; }
.record-copy small { margin-top: 4px; color: #8a93a2; font-size: 9px; }
.record-row > b { color: #315f98; font-size: 11px; }
.substitute-record-top > b { color: var(--teal); font-size: 11px; }
.remove-button,
.icon-button { display: grid; place-items: center; border: 0; color: #a2a9b4; background: transparent; cursor: pointer; }
.remove-button { width: 24px; height: 24px; border-radius: 7px; font-size: 17px; }
.remove-button:hover { color: var(--danger); background: var(--danger-soft); }
.empty-records { min-height: 116px; display: grid; place-content: center; justify-items: center; gap: 7px; color: #99a1ae; text-align: center; }
.empty-records strong { color: #697486; font-size: 11px; }
.empty-records span { font-size: 9px; }
.substitute-record { padding: 13px 0; border-bottom: 1px solid #eef1f4; }
.substitute-record:last-child { border-bottom: 0; }
.substitute-use-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(80px, .7fr) auto; align-items: end; gap: 8px; margin: 10px 0 0 43px; padding: 10px; border-radius: 10px; background: #f6f8fa; }
.substitute-use-row .primary-button { height: 33px; min-height: 33px; font-size: 9px; }
.remaining-pill { align-self: end; height: 33px; display: grid; place-items: center; padding: 0 9px; border-radius: 8px; color: #27746e; background: var(--teal-soft); font-size: 9px; font-weight: 800; }
.remaining-pill.done { color: #777f8a; background: #e9ecef; }

.schedule-panel { margin-top: 16px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding: 24px 26px 20px; border-bottom: 1px solid #edf0f4; }
.panel-heading h2 { margin-bottom: 6px; font-size: 19px; letter-spacing: -.03em; }
.panel-heading > div > p:last-child { margin-bottom: 0; color: #7d8797; font-size: 11px; line-height: 1.6; }
.year-switcher { flex: 0 0 auto; display: grid; grid-template-columns: 34px 72px 34px; align-items: center; overflow: hidden; border: 1px solid #dfe4ec; border-radius: 10px; }
.year-switcher button { height: 34px; border: 0; background: #f8f9fb; cursor: pointer; font-size: 20px; }
.year-switcher button:hover { color: var(--navy); background: var(--sky); }
.year-switcher strong { text-align: center; font-size: 12px; }
.schedule-list { padding: 5px 26px 10px; }
.schedule-row { display: grid; grid-template-columns: 28px 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 78px; border-bottom: 1px solid #eef1f5; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row.disabled { opacity: .42; }
.grant-check { position: relative; width: 21px; height: 21px; }
.grant-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.grant-check input:disabled { cursor: default; }
.grant-check span { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid #cdd4df; border-radius: 6px; color: transparent; background: #fff; font-size: 12px; font-weight: 900; }
.grant-check input:checked + span { color: #fff; border-color: var(--teal); background: var(--teal); }
.date-tile { width: 46px; height: 50px; display: grid; place-content: center; border-radius: 11px; text-align: center; }
.date-tile.monthly { color: #256e68; background: var(--teal-soft); }
.date-tile.annual { color: #315c95; background: var(--sky); }
.date-tile small,
.date-tile strong { display: block; }
.date-tile small { font-size: 9px; font-weight: 800; }
.date-tile strong { font-size: 17px; }
.schedule-copy { min-width: 0; }
.schedule-copy > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.schedule-copy strong { font-size: 13px; }
.schedule-copy p { margin: 5px 0 0; color: #8b94a3; font-size: 10px; }
.kind-pill,
.status-pill { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.kind-pill.monthly { color: #28736d; background: var(--teal-soft); }
.kind-pill.annual { color: #365f96; background: var(--sky); }
.status-pill { color: #8a621c; background: var(--amber-soft); }
.status-pill.expired { color: #7d8795; background: #eff1f4; }
.grant-days { min-width: 118px; text-align: right; }
.grant-days strong,
.grant-days small { display: block; }
.grant-days strong { color: var(--teal); font-size: 14px; }
.grant-days small { margin-top: 5px; color: #9098a6; font-size: 9px; }
.empty-schedule { display: grid; justify-items: center; padding: 54px 20px; color: #8a94a4; text-align: center; }
.empty-schedule strong { color: #596577; font-size: 13px; }
.empty-schedule p { margin: 7px 0 0; font-size: 10px; }

.legal-banner { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 16px; padding: 16px 18px; border: 1px solid #dce4ef; border-radius: 14px; background: #f8fbff; }
.info-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #5c78a0; font-family: Georgia, serif; font-size: 13px; font-weight: 800; }
.legal-banner strong { font-size: 11px; }
.legal-banner p { margin: 4px 0 0; color: #7a8595; font-size: 9px; line-height: 1.55; }
.employee-mode-banner { border-color: #d8e8e6; background: #f5fbfa; }
.employee-mode-banner .info-mark { background: var(--teal); }
.empty-page { min-height: 460px; display: grid; place-content: center; justify-items: center; text-align: center; color: #7e8999; }
.empty-page > div { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--sky); font-size: 26px; }
.empty-page h2 { margin: 15px 0 7px; color: #4e5b6d; font-size: 18px; }
.empty-page p { font-size: 11px; }

.modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 20px; border: 0; background: transparent; }
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: rgba(17, 29, 48, .48); backdrop-filter: blur(3px); }
.modal-card { width: min(590px, calc(100vw - 34px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; border: 1px solid #dfe5ed; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(20, 37, 64, .25); }
.modal-card.wide { width: min(680px, calc(100vw - 34px)); }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.modal-heading h2 { margin-bottom: 0; font-size: 19px; }
.icon-button { width: 32px; height: 32px; border-radius: 9px; font-size: 22px; }
.icon-button:hover { color: var(--danger); background: var(--danger-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-actions .danger-outline { margin-right: auto; color: var(--danger); border-color: #e4bbbb; }
.modal-actions .danger-outline:hover { color: #873838; border-color: #cc8d8d; background: var(--danger-soft); }
.setup-notice {
  grid-column: 1 / -1;
  padding: 12px 13px;
  border: 1px solid #d9e6f6;
  border-radius: 10px;
  color: #526b8e;
  background: #f5f9ff;
  font-size: 10px;
  line-height: 1.6;
}
.credential-card { width: min(520px, calc(100vw - 34px)); }
.credential-copy { color: #677386; font-size: 11px; line-height: 1.7; }
.credential-code {
  display: block;
  margin: 18px 0 12px;
  padding: 20px 14px;
  border: 1px solid #cddcf0;
  border-radius: 14px;
  color: var(--navy-deep);
  background: var(--sky);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  user-select: all;
}
.credential-expiry { margin-bottom: 0; color: #8791a1; font-size: 10px; text-align: center; }
.check-row { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 10px; background: #f6f8fb; }
.check-row input { width: 17px; height: 17px; padding: 0; }
.section-title { color: var(--navy); font-size: 12px; font-weight: 850; }
.account-section + .account-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(390px, calc(100vw - 32px)); padding: 13px 16px; border-radius: 12px; color: #fff; background: #253958; box-shadow: 0 12px 34px rgba(24, 40, 67, .24); font-size: 11px; line-height: 1.5; }
.toast.error { background: #8a3d3d; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 228px minmax(0, 1fr); }
  .workspace { padding: 30px 25px 50px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .top-actions { flex-wrap: wrap; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .records-grid { grid-template-columns: 1fr; }
  .profile-strip { grid-template-columns: 1fr 180px; }
  .assumption-chip { grid-column: 1 / 2; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding-bottom: 15px; }
  .employee-list { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 3px; }
  .employee-list-row { min-width: 232px; }
  .employee-item { min-width: 210px; background: #f7f8fb; }
  .add-employee { width: 100%; }
  .privacy-note,
  .side-label { display: none; }
  .workspace { padding: 24px 15px 44px; }
  .top-actions { align-items: stretch; flex-direction: column; }
  .admin-actions { width: 100%; }
  .admin-actions .secondary-button { flex: 1; }
  .date-control input { width: 100%; }
  .user-menu { width: 100%; }
  .profile-strip { grid-template-columns: 1fr 1fr; }
  .assumption-chip { grid-column: 1 / -1; }
  .profile-strip > .secondary-button { grid-column: 1 / -1; }
  .panel-heading { flex-direction: column; gap: 16px; }
  .year-switcher { width: 100%; grid-template-columns: 40px 1fr 40px; }
  .schedule-list { padding: 4px 16px 8px; }
  .schedule-row { grid-template-columns: 25px 44px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
  .grant-days { grid-column: 3; min-width: 0; text-align: left; }
  .grant-days strong,
  .grant-days small { display: inline; }
  .grant-days small { margin-left: 7px; }
  .modal-form,
  .setup-form { grid-template-columns: 1fr; }
  .modal-form > *,
  .setup-form > * { grid-column: 1 !important; }
}

@media (max-width: 480px) {
  .auth-card { padding: 23px 19px; }
  .summary-grid,
  .profile-strip { grid-template-columns: 1fr; }
  .assumption-chip { grid-column: auto; }
  .summary-card { min-height: 130px; }
  .status-strip > div { align-items: flex-start; flex-direction: column; }
  .entry-form { grid-template-columns: 1fr 1fr; }
  .substitute-use-row { grid-template-columns: 1fr 1fr; margin-left: 0; }
  .substitute-use-row .primary-button,
  .remaining-pill { grid-column: 1 / -1; }
}
