:root {
  --indigo-950: #201d65;
  --indigo-900: #2d287a;
  --indigo-800: #393394;
  --indigo-700: #4f46e5;
  --indigo-100: #e9e8ff;
  --ink: #1b1b29;
  --muted: #6f7185;
  --line: #e6e7ef;
  --surface: #ffffff;
  --page: #f6f7fb;
  --success: #147d52;
  --success-bg: #e9f8f0;
  --warning: #a15c05;
  --warning-bg: #fff5df;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --shadow: 0 14px 38px rgba(40, 38, 99, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang HK", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--page); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(79, 70, 229, .25); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 248px; display: flex; flex-direction: column; padding: 30px 16px 16px; color: #fff; background: linear-gradient(180deg, var(--indigo-900), var(--indigo-950)); }
.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 0 12px 36px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; color: #c9c5ff; background: rgba(255,255,255,.11); font-size: 18px; }
.eyebrow { margin: 0 0 2px; color: #aaa8d9; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.brand-lockup h1 { margin: 0; font-size: 19px; letter-spacing: .02em; }
.primary-nav { display: grid; gap: 6px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 11px; padding: 13px 14px; color: #c9c8ef; background: transparent; text-align: left; font-size: 14px; font-weight: 650; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item span:first-child { width: 20px; color: #aaa9df; font-size: 18px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.10); }
.nav-item.active { color: #fff; background: linear-gradient(135deg, #6155f0, #4b43d9); box-shadow: 0 8px 18px rgba(28, 23, 122, .25); }
.nav-item.active span:first-child { color: #fff; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 12px 4px; border-top: 1px solid rgba(255,255,255,.12); color: #e9e8ff; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 13px; }
.sidebar-footer small { margin-top: 3px; color: #aaa8d9; font-size: 11px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #6ee7b7; box-shadow: 0 0 0 4px rgba(110, 231, 183, .12); }

.app-main { width: calc(100% - 248px); min-width: 0; margin-left: 248px; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(22px, 4vw, 64px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.78); backdrop-filter: blur(16px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.user-switcher select { min-width: 148px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 28px 8px 10px; color: var(--ink); background: var(--surface); font-size: 12px; }
.local-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfeee0; border-radius: 999px; padding: 7px 10px; color: var(--success); background: #f5fffa; font-size: 11px; font-weight: 700; white-space: nowrap; }
.local-badge span { font-size: 8px; }
.mobile-menu { display: none; }

main { max-width: 1480px; margin: 0 auto; padding: 38px clamp(22px, 4vw, 64px) 72px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.03em; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; border: 1px solid transparent; border-radius: 9px; padding: 9px 13px; font-size: 13px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--indigo-700); box-shadow: 0 7px 14px rgba(79,70,229,.20); }
.button.primary:hover { background: #4338ca; }
.button.secondary { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button.secondary:hover { border-color: #c9c8ed; background: #fbfbff; }
.button.ghost { color: var(--indigo-700); background: transparent; }
.button.danger { border-color: #ffd4cf; color: var(--danger); background: var(--danger-bg); }
.button.small { min-height: 32px; padding: 6px 9px; font-size: 12px; }
.button.icon-only { width: 34px; min-height: 34px; padding: 0; }
.icon-button { display: inline-grid; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 20px; }
.icon-button.mobile-menu { display: none; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-header h3, .panel-header h4 { margin: 0; font-size: 16px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 22px; }
.announcement-panel { border-color: #f2dfa7; background: linear-gradient(135deg, #fffcf1, #fffaf0); }
.announcement-panel .panel-header { border-bottom-color: #f2e6c5; }
.announcement-content { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.announcement-content p { margin: 0; color: #8b6b2a; font-size: 13px; line-height: 1.6; }
.announcement-list { display: grid; gap: 10px; }
.announcement-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0e4c6; }
.announcement-item:last-child { padding-bottom: 0; border-bottom: 0; }
.announcement-item p { color: var(--ink); }
.announcement-item small { display: block; margin-top: 4px; color: #9f906d; font-size: 11px; }
.assistant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.assistant-card { border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: #fbfbfe; }
.assistant-card h4 { margin: 0; font-size: 14px; }
.assistant-card p { min-height: 38px; margin: 7px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.assistant-card.demo-active { border-color: #d7d3ff; background: #f7f6ff; }
.assistant-status { display: block; min-height: 18px; margin-top: 9px; color: var(--muted); font-size: 11px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 24px 0 16px; }
.toolbar-left, .toolbar-right, .segmented { display: flex; align-items: center; gap: 8px; }
.segmented { border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--surface); }
.segmented button { min-height: 30px; border: 0; border-radius: 6px; padding: 6px 9px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.segmented button.active { color: var(--indigo-700); background: var(--indigo-100); }
.month-control { display: flex; align-items: center; gap: 8px; }
.month-control input { width: 124px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; color: var(--ink); background: var(--surface); font-size: 13px; }
.month-control .icon-button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); }
.empty-state { display: grid; place-items: center; min-height: 250px; padding: 28px; color: var(--muted); text-align: center; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 15px; color: #a9acbb; background: #f0f1f6; font-size: 25px; }
.empty-state h3 { margin: 0; color: #454655; font-size: 16px; }
.empty-state p { margin: 8px 0 0; font-size: 13px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 13px 16px; color: var(--muted); background: #fafaff; font-size: 11px; font-weight: 750; letter-spacing: .02em; text-align: left; white-space: nowrap; }
td { padding: 15px 16px; border-top: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #fcfcff; }
.date-cell strong, .date-cell small { display: block; }
.date-cell strong { font-size: 13px; }
.date-cell small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.service-cell strong { display: block; }
.service-cell small { color: var(--muted); font-size: 11px; }
.assignment-stack { display: grid; gap: 5px; min-width: 126px; }
.assignment-line { display: flex; align-items: center; gap: 5px; color: #454655; font-size: 12px; }
.assignment-line em { color: var(--muted); font-style: normal; }
.assignment-line.empty { color: #b2b4c2; }
.row-actions { display: flex; gap: 5px; white-space: nowrap; }
.list-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 13px; padding: 20px; }
.roster-card { border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: #fff; }
.roster-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.roster-card h4 { margin: 0; font-size: 15px; }
.roster-card .date { margin: 5px 0 14px; color: var(--muted); font-size: 12px; }
.assignment-group { margin-top: 12px; }
.assignment-group h5 { margin: 0 0 6px; color: var(--muted); font-size: 11px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field > span { color: #4f5061; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #dfe0e9; border-radius: 9px; padding: 10px 11px; color: var(--ink); background: #fff; font-size: 13px; }
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #b1b2be; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.helper-text { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.notice { border-radius: 10px; padding: 11px 13px; color: #725014; background: var(--warning-bg); font-size: 12px; line-height: 1.55; }
.notice.success { color: #14613e; background: var(--success-bg); }
.notice.danger { color: #9c251d; background: var(--danger-bg); }
.warning-list { display: grid; gap: 5px; margin: 13px 0 0; padding-left: 18px; color: var(--warning); font-size: 12px; }

.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status.approved { color: var(--success); background: var(--success-bg); }
.status.pending { color: var(--warning); background: var(--warning-bg); }
.status.rejected { color: var(--danger); background: var(--danger-bg); }
.role-chip { display: inline-flex; border-radius: 6px; padding: 4px 7px; color: var(--indigo-700); background: var(--indigo-100); font-size: 11px; font-weight: 700; }
.department-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.department-chips .role-chip { color: #595b6e; background: #f0f1f6; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 9px; color: #57586b; background: #fff; font-size: 12px; }
.checkbox-label input { width: auto; accent-color: var(--indigo-700); }
.settings-section + .settings-section { margin-top: 26px; }
.settings-section h4 { margin: 0 0 10px; font-size: 14px; }
.settings-section > p { margin: -3px 0 13px; color: var(--muted); font-size: 12px; }
.settings-table { display: grid; gap: 8px; }
.settings-row { display: grid; grid-template-columns: minmax(150px, 2fr) 120px 110px auto; gap: 8px; align-items: center; }
.settings-row.special { grid-template-columns: 150px minmax(150px, 2fr) 110px auto; }
.settings-row.role { grid-template-columns: minmax(180px, 1fr) auto; }
.settings-row.header { color: var(--muted); font-size: 11px; font-weight: 700; }
.template-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.template-row:last-child { border-bottom: 0; }
.template-row small { display: block; margin-top: 3px; color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(24, 24, 54, .42); backdrop-filter: blur(4px); }
.modal { width: min(820px, 100%); max-height: min(88vh, 900px); overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 30px 80px rgba(25, 24, 70, .24); }
.modal.narrow { width: min(580px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.modal-body { padding: 22px 24px 24px; }
.assignment-editor { display: grid; gap: 8px; margin-top: 17px; }
.assignment-editor-row { display: grid; grid-template-columns: 145px minmax(120px, 1fr) minmax(150px, 1.2fr); gap: 8px; align-items: center; }
.assignment-editor-row .role-name { color: #55576b; font-size: 12px; font-weight: 700; }
.assignment-editor-row select { padding: 8px 9px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; }
.modal-footer .form-actions { margin-top: 0; }
.demo-card-inline { margin-top: 18px; border: 1px dashed #c8c4f4; border-radius: 12px; padding: 14px; background: #faf9ff; }
.demo-card-inline header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demo-card-inline strong { font-size: 13px; }
.demo-card-inline p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: grid; gap: 8px; width: min(360px, calc(100% - 40px)); pointer-events: none; }
.toast { border: 1px solid #d8d9e7; border-radius: 11px; padding: 12px 14px; color: var(--ink); background: #fff; box-shadow: 0 12px 32px rgba(40,38,99,.16); font-size: 12px; }
.toast.success { border-color: #c7ead9; }
.toast.error { border-color: #f0c9c4; color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.scrim { position: fixed; inset: 0; z-index: 15; background: rgba(17, 17, 47, .36); }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 12px 0 30px rgba(21, 19, 76, .22); }
  .sidebar.open { transform: translateX(0); }
  .app-main { width: 100%; margin-left: 0; }
  .icon-button.mobile-menu { display: inline-grid; width: 34px; height: 34px; }
  .topbar { padding: 0 20px; }
  main { padding: 28px 20px 56px; }
}

@media (max-width: 640px) {
  .topbar { min-height: 64px; }
  .breadcrumb > span { display: none; }
  .local-badge { display: none; }
  .user-switcher select { min-width: 126px; }
  .page-heading { display: block; }
  .heading-actions { justify-content: flex-start; margin-top: 16px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { justify-content: space-between; }
  .toolbar-right { flex-wrap: wrap; }
  .assistant-grid, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .panel-header, .panel-body { padding: 16px; }
  .announcement-content { display: block; }
  .announcement-content .button { margin-top: 12px; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .settings-row, .settings-row.special, .settings-row.role { grid-template-columns: 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
  .settings-row.header { display: none; }
  .assignment-editor-row { grid-template-columns: 1fr; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal-header, .modal-body { padding-left: 18px; padding-right: 18px; }
  .modal-footer { display: block; }
  .modal-footer .form-actions { margin-top: 12px; justify-content: stretch; }
  .modal-footer .form-actions .button { flex: 1; }
  .list-grid { grid-template-columns: 1fr; padding: 14px; }
}

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

/* Reference layout parity: these tokens mirror the original local sample. */
:root {
  --reference-page: #f9fafb;
  --reference-indigo-900: #312e81;
  --reference-indigo-800: #3730a3;
  --reference-indigo-600: #4f46e5;
  --reference-indigo-200: #c7d2fe;
}

html, body { background: var(--reference-page); }
body { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1f2937; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--reference-page); }
.mobile-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 16px; color: #fff; background: #3730a3; box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1); }
.mobile-header h1 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 700; }
.ui-icon { display: block; flex: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 256px; display: flex; flex-direction: column; flex-shrink: 0; transform: translateX(-100%); border: 0; border-radius: 0; padding: 0; color: #e0e7ff; background: #312e81; box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); transition: transform .3s ease-in-out; }
.sidebar.open { transform: translateX(0); }
.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 24px; border-bottom: 1px solid rgb(55 48 163 / .5); }
.brand-mark { width: auto; height: auto; display: block; border: 0; border-radius: 8px; padding: 8px; color: #fff; background: rgb(255 255 255 / .1); font-size: inherit; }
.brand-lockup h1 { margin: 0; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .025em; }
.eyebrow { display: none; }
.primary-nav { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 4px; padding: 24px 12px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; padding: 12px 16px; color: #c7d2fe; background: transparent; font-size: 14px; font-weight: 500; text-align: left; box-shadow: none; transition: background .2s ease, color .2s ease; }
.nav-item:hover { color: #fff; background: rgb(255 255 255 / .1); transform: none; }
.nav-item.active { color: #fff; background: #4f46e5; box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1); }
.nav-item span:first-child, .nav-item .nav-icon { width: 20px; color: #818cf8; font-size: inherit; text-align: center; }
.nav-item.active span:first-child, .nav-item.active .nav-icon { color: #fff; }
.sidebar-footer { display: flex; align-items: center; gap: 12px; margin-top: auto; border-top: 1px solid rgb(55 48 163 / .5); padding: 16px; color: #fff; background: rgb(30 27 75 / .3); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { overflow: hidden; color: #fff; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer small { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: #818cf8; font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.user-mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9999px; color: #c7d2fe; background: rgb(99 102 241 / .2); box-shadow: 0 0 0 1px rgb(99 102 241 / .3); }
.status-dot { display: none; }
.app-main { width: 100%; min-width: 0; max-width: 1280px; margin: 0 auto; padding: 16px; background: var(--reference-page); }
.topbar, .breadcrumb, .topbar-actions { display: none; }
main { max-width: none; margin: 0 auto; padding: 0; }
.page-heading { margin-bottom: 24px; }
.page-heading h2 { color: #1f2937; font-size: 24px; line-height: 32px; letter-spacing: 0; }
.page-heading p { color: #6b7280; }
.button { min-height: 38px; border-radius: 6px; padding: 8px 16px; font-weight: 500; box-shadow: none; }
.button:hover { transform: none; }
.button.primary { color: #fff; background: #4f46e5; box-shadow: none; }
.button.primary:hover { background: #4338ca; }
.button.secondary { border-color: #d1d5db; color: #1f2937; background: #e5e7eb; }
.button.secondary:hover { border-color: #d1d5db; background: #d1d5db; }
.button.ghost { color: #4f46e5; }
.panel { border-color: #e5e7eb; border-radius: 8px; box-shadow: none; }
.panel-header { padding: 16px; border-bottom-color: #fde68a; }
.panel-body { padding: 16px; }
.mobile-menu { color: #fff; }
.icon-button.mobile-menu { display: grid; width: 32px; height: 32px; }
.legacy-space-y-6 > * + * { margin-top: 24px; }
.legacy-announcement { border: 1px solid #fde68a; border-radius: 8px; padding: 16px; color: #b45309; background: #fffbeb; }
.legacy-announcement-header { height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.legacy-announcement-header h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: #78350f; font-size: 14px; font-weight: 700; }
.announcement-publish { border: 0; border-radius: 6px; padding: 4px 8px; color: #92400e; background: #fef3c7; font-size: 12px; font-weight: 500; }
.announcement-publish:hover { background: #fde68a; }
.legacy-announcement-list { max-height: 192px; overflow-y: auto; padding-right: 8px; }
.legacy-announcement-list > p { margin: 0; color: rgb(180 83 9 / .6); font-size: 14px; font-style: italic; }
.legacy-announcement-list .announcement-item { border-bottom-color: #fde68a; }
.legacy-roster-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.legacy-roster-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.legacy-roster-controls h2 { margin: 0; color: #1f2937; font-size: 24px; line-height: 32px; font-weight: 700; }
.legacy-roster-actions { display: flex; align-items: center; gap: 8px; }
.legacy-roster-actions .button { display: inline-flex; height: 42px; min-height: 42px; font-size: 16px; line-height: 24px; }
.legacy-roster-actions .button.primary { border-width: 0; }
.legacy-roster-actions .ui-icon { color: #6366f1; }
.segmented { display: flex; align-items: center; gap: 0; border: 0; border-radius: 8px; padding: 4px; background: #e5e7eb; box-shadow: inset 0 1px 2px rgb(0 0 0 / .08); }
.segmented button { display: grid; place-items: center; min-height: 32px; border-radius: 6px; padding: 6px; color: #6b7280; background: transparent; font-size: 12px; font-weight: 500; }
.segmented button.active { color: #4f46e5; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.month-control { height: 40px; display: flex; align-items: center; gap: 0; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .05); overflow: hidden; }
.month-arrow { display: grid; place-items: center; width: 36px; height: 36px; border: 0; color: #4b5563; background: #fff; }
.month-arrow:hover { background: #f3f4f6; }
.month-control input { width: 128px; height: 38px; border: 0; border-right: 1px solid #e5e7eb; border-left: 1px solid #e5e7eb; border-radius: 0; padding: 8px 12px; color: #374151; font-size: 14px; font-weight: 500; }
.legacy-empty-panel { min-height: 0; border: 1px solid #e5e7eb; border-radius: 8px; color: #6b7280; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .1), 0 1px 2px rgb(0 0 0 / .06); text-align: center; }
.legacy-empty-panel .empty-state { min-height: 0; padding: 64px 16px; }
.legacy-empty-panel .empty-calendar { margin: 0 auto 12px; color: #d1d5db; }
.legacy-empty-panel .empty-title { margin: 0 0 8px; color: #6b7280; font-size: 18px; line-height: 28px; }
.legacy-empty-panel .empty-copy { margin: 0; color: #6b7280; font-size: 14px; line-height: 20px; }
.legacy-empty-panel .table-wrap, .legacy-empty-panel .list-grid { text-align: left; }
.legacy-table-panel { width: 100%; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 8px; color: #374151; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .1), 0 1px 2px rgb(0 0 0 / .06); }
.roster-matrix-wrap { width: 100%; overflow-x: auto; overflow-y: hidden; }
.roster-matrix { width: max-content; min-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.roster-matrix .matrix-role-column { width: 150px; }
.roster-matrix .matrix-service-column { width: 140px; }
.roster-matrix th, .roster-matrix td { border-top: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; padding: 0 12px; }
.roster-matrix thead th { border-top: 0; }
.roster-matrix th:last-child, .roster-matrix td:last-child { border-right: 0; }
.roster-matrix .matrix-corner { position: sticky; left: 0; z-index: 4; width: 150px; min-width: 150px; height: 102px; color: #374151; background: #f9fafb; font-size: 14px; font-weight: 700; text-align: left; white-space: nowrap; }
.roster-matrix .matrix-service-header { width: 140px; min-width: 140px; height: 102px; padding: 10px 12px 11px; color: #1f2937; background: #f9fafb; text-align: center; vertical-align: middle; }
.matrix-service-date { color: #1f2937; font-size: 18px; line-height: 24px; font-weight: 700; }
.matrix-service-name { overflow: hidden; margin-top: 2px; color: #6b7280; font-size: 12px; line-height: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.matrix-edit-button { width: 100%; height: 27px; margin-top: 4px; border: 1px solid #dbeafe; border-radius: 4px; color: #4f46e5; background: #eef2ff; font-size: 12px; font-weight: 600; }
.matrix-edit-button:hover { background: #e0e7ff; }
.roster-matrix .matrix-group { height: 37px; padding: 0 8px; color: #3730a3; background: #eef2ff; font-size: 14px; line-height: 20px; font-weight: 700; text-align: left; }
.roster-matrix .matrix-role { position: sticky; left: 0; z-index: 2; width: 150px; min-width: 150px; height: 45px; color: #374151; background: #fff; font-size: 14px; font-weight: 600; text-align: left; white-space: nowrap; }
.roster-matrix .matrix-cell { width: 140px; min-width: 140px; height: 45px; color: #c4cbd6; background: #fff; font-size: 14px; text-align: center; vertical-align: middle; white-space: nowrap; }
.roster-matrix tbody tr:hover .matrix-role, .roster-matrix tbody tr:hover .matrix-cell { background: #fcfcff; }
.roster-matrix .matrix-group { position: relative; z-index: 3; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (min-width: 768px) {
  .app-shell { flex-direction: row; }
  .mobile-header { display: none; }
  .icon-button.mobile-menu { display: none; }
  .sidebar { position: relative; inset: auto; transform: translateX(0); box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); }
  .app-main { padding: 32px; }
}

@media (max-width: 767px) {
  .sidebar { transform: translateX(-100%); }
  .legacy-roster-heading { flex-direction: column; align-items: stretch; }
  .legacy-roster-actions { justify-content: flex-start; flex-wrap: wrap; }
  .legacy-roster-controls { gap: 10px; }
  .legacy-roster-controls h2 { width: 100%; }
  .legacy-roster-controls .month-control { flex: 1; }
  .legacy-roster-controls .month-control input { flex: 1; min-width: 0; }
}
