:root {
  --purple-950: #26123a;
  --purple-900: #35164f;
  --purple-800: #4a206e;
  --purple-700: #5b2d8b;
  --purple-600: #7141a4;
  --purple-500: #875bc0;
  --purple-100: #eee7f6;
  --purple-50: #f8f5fb;
  --amber-500: #f4b942;
  --amber-100: #fff3d5;
  --green-600: #248f6a;
  --green-100: #dcf5e9;
  --blue-600: #3975cb;
  --blue-100: #e2eefc;
  --pink-600: #c34a7b;
  --pink-100: #fbe5ef;
  --red-600: #c44545;
  --red-100: #fde7e7;
  --ink: #211d26;
  --muted: #766f7d;
  --muted-2: #a29ca8;
  --line: #e9e5eb;
  --surface: #ffffff;
  --canvas: #f7f6f8;
  --shadow: 0 18px 55px rgba(42, 26, 55, 0.08);
  --shadow-soft: 0 8px 28px rgba(42, 26, 55, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(113,65,164,.2); outline-offset: 2px; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; padding: 28px 18px 20px; display: flex; flex-direction: column; background: var(--purple-950); color: #fff; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, var(--amber-500), #ffd87a); color: var(--purple-950); box-shadow: 0 8px 22px rgba(244,185,66,.2); }
.brand-mark svg { width: 25px; height: 25px; fill: currentColor; stroke: none; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 11px; }
.brand-mark.small svg { width: 20px; }
.brand strong { display: block; font-size: 19px; line-height: 1.1; letter-spacing: .1px; }
.brand span { display: block; color: rgba(255,255,255,.56); font-size: 11px; margin-top: 5px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { position: relative; width: 100%; border: 0; border-radius: 13px; background: transparent; color: rgba(255,255,255,.68); display: flex; align-items: center; gap: 13px; padding: 12px 13px; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.nav-item.active { color: #fff; background: linear-gradient(135deg, rgba(143,91,192,.38), rgba(113,65,164,.23)); box-shadow: inset 3px 0 var(--amber-500); }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: var(--amber-500); color: var(--purple-950); font-weight: 700; font-size: 11px; }
.sidebar-card { position: relative; overflow: hidden; margin-top: auto; padding: 18px; border-radius: 17px; background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.055)); border: 1px solid rgba(255,255,255,.09); }
.sidebar-card strong { position: relative; display: block; font-size: 13px; }
.sidebar-card p { position: relative; margin: 6px 0 12px; color: rgba(255,255,255,.58); line-height: 1.5; font-size: 11px; }
.sidebar-card .text-button { color: #ffd472; font-size: 11px; }
.mini-orbit { position: absolute; width: 100px; height: 100px; right: -42px; top: -45px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.mini-orbit:after { content:""; position:absolute; inset:16px; border:1px solid rgba(255,255,255,.1); border-radius:50%; }
.mini-orbit span { position: absolute; left: 11px; top: 55px; width: 9px; height: 9px; background: var(--amber-500); border-radius: 50%; box-shadow: 0 0 20px #ffd677; }
.account-card { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.09); }
.account-card > div:nth-child(2) { min-width: 0; flex: 1; }
.account-card strong { display:block; font-size: 11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-card span { display:block; margin-top:3px; color:rgba(255,255,255,.45); font-size:10px; }

.main-area { margin-left: 252px; min-height: 100vh; }
.topbar { position: sticky; top: 0; height: 78px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: rgba(247,246,248,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(224,220,227,.78); z-index: 20; }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar-title h1 { margin: 0; font-size: 18px; line-height: 1.2; }
.topbar-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.mobile-brand, .mobile-menu { display: none; }
.content { padding: 26px 34px 80px; max-width: 1660px; margin: 0 auto; }
.view { display: none; animation: enter .28s ease both; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.button { border: 0; border-radius: 12px; height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg, var(--purple-700), var(--purple-600)); color: #fff; box-shadow: 0 8px 20px rgba(91,45,139,.18); }
.button-primary:hover { box-shadow: 0 10px 26px rgba(91,45,139,.27); }
.button-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(35,24,43,.03); }
.button-ghost { height: 34px; background: var(--purple-50); color: var(--purple-700); }
.button.full { width: 100%; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 12px; display: grid; place-items: center; background: #fff; cursor: pointer; color: var(--muted); transition: .18s ease; }
.icon-button:hover { color: var(--purple-700); background: var(--purple-50); }
.icon-button.subtle { width: 34px; height: 34px; background: transparent; }
.notification-button { position: relative; border: 1px solid var(--line); }
.notification-button i { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid #fff; background: #e85454; border-radius: 50%; }
.text-button { border: 0; padding: 0; background: none; color: var(--purple-700); font-weight: 700; cursor: pointer; }
.more-button { border:0; background:transparent; color:var(--muted-2); cursor:pointer; }
.show-small { display: none; }

.welcome-row { display:flex; justify-content:space-between; align-items:flex-end; gap:25px; margin-bottom:22px; }
.eyebrow, .panel-kicker { color: var(--purple-700); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.welcome-row h2, .requests-head h2, .settings-layout > div:first-child h2 { margin: 6px 0 4px; font-size: 25px; letter-spacing: -.02em; }
.welcome-row p, .requests-head p, .settings-layout > div:first-child p { margin: 0; color: var(--muted); font-size: 12px; }
.published-pill { min-width: 315px; padding: 13px 14px; display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:var(--shadow-soft); }
.published-pill .status-dot { width:10px; height:10px; background:#33b17e; border-radius:50%; box-shadow:0 0 0 5px var(--green-100); margin:0 5px; }
.published-pill div { flex:1; }
.published-pill b { display:block; font-size:11px; }
.published-pill small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.published-pill button { border:0; background:var(--purple-50); color:var(--purple-700); border-radius:8px; padding:6px 9px; font-size:9px; font-weight:800; cursor:pointer; }

.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.metric-card { min-height: 156px; padding:18px; background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-soft); transition:.2s ease; }
.metric-card.actionable { cursor:pointer; }
.metric-card.actionable:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.metric-featured { color:#fff; background:linear-gradient(145deg, var(--purple-800), var(--purple-600)); border-color:transparent; position:relative; overflow:hidden; }
.metric-featured:after { content:""; position:absolute; width:150px; height:150px; right:-55px; top:-65px; border:1px solid rgba(255,255,255,.13); border-radius:50%; box-shadow:0 0 0 24px rgba(255,255,255,.025),0 0 0 48px rgba(255,255,255,.02); }
.metric-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.metric-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:rgba(255,255,255,.13); color:#fff; }
.metric-icon.lilac { background:var(--purple-100); color:var(--purple-700); }
.metric-icon.amber { background:var(--amber-100); color:#b87800; }
.metric-icon.blue { background:var(--blue-100); color:var(--blue-600); }
.metric-icon.green { background:var(--green-100); color:var(--green-600); }
.trend { padding:5px 8px; border-radius:99px; font-size:8px; font-weight:800; }
.trend.positive { color:#137e59; background:var(--green-100); }
.metric-featured .trend.positive { color:#d8ffee; background:rgba(255,255,255,.13); }
.trend.warning { color:#996500; background:var(--amber-100); }
.metric-card > div:nth-child(2) strong { display:block; font-size:28px; line-height:1; }
.metric-card > div:nth-child(2) strong small { font-size:12px; font-weight:700; color:var(--muted); }
.metric-featured > div:nth-child(2) strong small { color:rgba(255,255,255,.64); }
.metric-card > div:nth-child(2) > span { display:block; margin-top:8px; color:var(--muted); font-size:10px; }
.metric-featured > div:nth-child(2) > span { color:rgba(255,255,255,.67); }
.progress { height:4px; margin-top:18px; background:rgba(255,255,255,.14); border-radius:99px; overflow:hidden; }
.progress i { display:block; height:100%; background:linear-gradient(90deg,var(--amber-500),#ffe198); border-radius:inherit; }
.metric-note { margin:17px 0 0; color:var(--muted); font-size:9px; }
.metric-note .dot { display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:5px; }
.dot.purple { background:var(--purple-500); }.dot.blue { background:var(--blue-600); }
.link-note { color:var(--purple-700); font-weight:800; }
.link-note span { float:right; }

.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,.75fr); gap:16px; margin-bottom:16px; }
.panel { background:#fff; border:1px solid var(--line); border-radius:var(--radius-xl); box-shadow:var(--shadow-soft); }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:20px 22px 15px; }
.panel-header h3 { margin:4px 0 0; font-size:15px; }
.timeline { position:relative; padding:0 22px; }
.timeline-rail { position:absolute; left:84px; top:28px; bottom:28px; width:1px; background:var(--line); }
.timeline-rail span { position:absolute; left:-4px; width:9px; height:9px; background:#fff; border:2px solid var(--purple-500); border-radius:50%; }
.timeline-rail span:nth-child(1) { top:0; }.timeline-rail span:nth-child(2) { top:50%; }.timeline-rail span:nth-child(3) { bottom:0; }
.shift-row { display:grid; grid-template-columns:78px 1.05fr 1.05fr auto; align-items:center; gap:14px; min-height:80px; border-top:1px solid var(--line); }
.shift-row:first-of-type { border-top:0; }
.shift-row time { position:relative; z-index:2; color:var(--ink); font-size:12px; font-weight:800; line-height:1.25; }
.shift-row time small { display:block; color:var(--muted-2); font-size:8px; font-weight:600; }
.shift-info, .people-stack { display:flex; align-items:center; gap:10px; min-width:0; }
.shift-icon { flex:0 0 auto; width:34px; height:34px; display:grid; place-items:center; border-radius:11px; }
.shift-icon.morning { color:#b87300; background:var(--amber-100); }.shift-icon.noon { color:var(--purple-700); background:var(--purple-100); }.shift-icon.afternoon { color:#cc5d2a; background:#ffeadf; }
.shift-info strong, .people-stack b { display:block; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shift-info span, .people-stack small { display:block; margin-top:3px; color:var(--muted); font-size:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.people-stack .avatar + .avatar { margin-left:-17px; }
.avatar { flex:0 0 auto; width:31px; height:31px; display:grid; place-items:center; border:2px solid #fff; border-radius:50%; font-size:8px; font-weight:900; }
.avatar-purple { color:#fff; background:linear-gradient(135deg,var(--purple-700),var(--purple-500)); }
.avatar-green { color:#12694d; background:#c8efdc; }.avatar-pink { color:#9a315e; background:#f8cfe0; }.avatar-blue { color:#245c9f; background:#d6e9ff; }.avatar-amber { color:#916000; background:#ffe7a7; }.avatar-cyan { color:#147184; background:#d2f2f5; }.avatar-red { color:#9f3b3b; background:#f9d6d6; }
.status-badge { padding:6px 8px; border-radius:8px; white-space:nowrap; font-size:8px; font-weight:800; }
.active-status { color:#137e59; background:var(--green-100); }.upcoming-status { color:#8e5f00; background:var(--amber-100); }.ready-status { color:var(--purple-700); background:var(--purple-100); }.leave-status { color:var(--red-600); background:var(--red-100); }
.panel-footer { padding:13px 22px 18px; border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.info-chip { display:flex; align-items:center; gap:6px; color:var(--green-600); font-size:9px; font-weight:700; }
.panel-footer .text-button { font-size:9px; }

.activity-list { padding:0 20px; }
.activity-item { position:relative; display:flex; gap:10px; padding:13px 0; border-top:1px solid var(--line); }
.activity-item:first-child { border-top:0; }
.activity-icon { flex:0 0 auto; width:31px; height:31px; display:grid; place-items:center; border-radius:10px; }
.activity-icon.swap { color:var(--purple-700); background:var(--purple-100); }.activity-icon.success { color:var(--green-600); background:var(--green-100); }.activity-icon.leave { color:#b37500; background:var(--amber-100); }.activity-icon.notify { color:var(--blue-600); background:var(--blue-100); }
.activity-item p { margin:0; font-size:9px; line-height:1.55; }
.activity-item small { display:block; margin-top:4px; color:var(--muted-2); font-size:8px; }
.new-dot { position:absolute; right:1px; top:18px; width:6px; height:6px; background:#df5757; border-radius:50%; }
.full-text-button { width:100%; height:42px; border:0; border-top:1px solid var(--line); border-radius:0 0 var(--radius-xl) var(--radius-xl); background:var(--purple-50); color:var(--purple-700); font-size:9px; font-weight:800; cursor:pointer; }

.week-panel { overflow:hidden; }
.header-actions { display:flex; align-items:center; gap:4px; }
.week-strip { display:grid; grid-template-columns:repeat(5,1fr); border-top:1px solid var(--line); }
.week-day { padding:14px; min-width:0; border-left:1px solid var(--line); }
.week-day:first-child { border-left:0; }
.week-day.today { background:linear-gradient(180deg,var(--purple-50),#fff); }
.week-day-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.week-day-head span { color:var(--muted); font-size:8px; font-weight:700; }.week-day-head b { width:23px; height:23px; display:grid; place-items:center; border-radius:8px; font-size:10px; }
.week-day.today .week-day-head b { color:#fff; background:var(--purple-700); }
.mini-shift { display:flex; align-items:center; gap:6px; padding:6px 7px; margin-top:5px; border-radius:8px; background:#faf9fb; font-size:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mini-shift i { flex:0 0 auto; width:4px; height:18px; border-radius:99px; background:var(--purple-500); }.mini-shift.noon i { background:var(--amber-500); }

.schedule-toolbar { padding:17px 20px; display:flex; align-items:center; justify-content:space-between; }
.month-nav { display:flex; align-items:center; gap:12px; }.month-nav h2 { margin:2px 0 0; font-size:18px; }
.toolbar-actions { display:flex; align-items:center; gap:8px; }
.segmented { display:flex; padding:3px; background:var(--canvas); border:1px solid var(--line); border-radius:10px; }
.segmented button { border:0; padding:7px 12px; border-radius:7px; background:transparent; color:var(--muted); font-size:9px; cursor:pointer; }
.segmented button.active { color:var(--purple-700); background:#fff; box-shadow:0 3px 10px rgba(38,18,58,.07); font-weight:800; }
.schedule-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 5px 10px; }
.legend { display:flex; flex-wrap:wrap; gap:12px; color:var(--muted); font-size:8px; }
.legend span { display:flex; align-items:center; gap:5px; }.legend i { width:8px; height:8px; border-radius:3px; }.legend-main{background:var(--purple-700)}.legend-rotation{background:var(--green-600)}.legend-noon{background:var(--amber-500)}.legend-leave{background:#d9d5dc}
.coverage-chip { display:flex; align-items:center; gap:6px; padding:7px 9px; border-radius:9px; background:var(--green-100); color:var(--green-600); font-size:8px; font-weight:800; }
.calendar-panel { overflow:hidden; border-radius:var(--radius-lg); }
.calendar-head, .calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-head { border-bottom:1px solid var(--line); background:#fbfafc; }
.calendar-head span { padding:10px; color:var(--muted); text-align:center; font-size:8px; font-weight:800; }.calendar-head .weekend-label { color:var(--purple-700); }
.calendar-cell { position:relative; min-height:148px; padding:10px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); cursor:pointer; transition:.15s ease; }
.calendar-cell:nth-child(7n) { border-right:0; }.calendar-cell:hover { z-index:2; background:var(--purple-50); box-shadow:inset 0 0 0 2px rgba(113,65,164,.15); }
.calendar-cell.empty { background:#fbfafc; cursor:default; }.calendar-cell.weekend { background:#fcfbfd; }.calendar-cell.holiday { background:linear-gradient(135deg,#fbfafc,#f7f3f9); }
.calendar-cell.today { box-shadow:inset 0 0 0 2px var(--purple-600); }
.date-number { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; font-size:9px; font-weight:800; }.date-number b { font-size:10px; }.date-number .today-label { padding:3px 6px; border-radius:6px; color:#fff; background:var(--purple-700); font-size:7px; }
.holiday-copy { height:90px; display:grid; place-items:center; color:var(--muted-2); text-align:center; font-size:8px; }.holiday-copy span { display:block; font-size:18px; margin-bottom:4px; opacity:.7; }
.calendar-shift { display:flex; align-items:center; gap:5px; min-height:27px; margin-top:4px; padding:5px 6px; border-radius:7px; font-size:7px; overflow:hidden; }
.calendar-shift strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.calendar-shift small { margin-left:auto; color:inherit; opacity:.7; white-space:nowrap; }
.calendar-shift.main { color:var(--purple-800); background:var(--purple-100); }.calendar-shift.rotation { color:#176c50; background:var(--green-100); }.calendar-shift.noon { color:#8c5c00; background:var(--amber-100); }
.calendar-cell.editing:after { content:"แก้ไข"; position:absolute; right:8px; bottom:7px; color:var(--purple-600); font-size:7px; font-weight:800; }
.schedule-bottom-grid { display:grid; grid-template-columns:1.35fr .65fr; gap:16px; margin-top:16px; }
.fairness-bars { padding:0 22px 20px; display:grid; gap:10px; }.fairness-row { display:grid; grid-template-columns:105px 1fr 45px; align-items:center; gap:10px; font-size:8px; }.fairness-person { display:flex; align-items:center; gap:7px; font-weight:700; }.fairness-track { height:6px; border-radius:99px; background:#f1eef2; overflow:hidden; }.fairness-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--purple-500),#b390d2); }.fairness-row > b { color:var(--muted); text-align:right; font-size:8px; }
.rules-panel ul { list-style:none; margin:0; padding:0 22px 20px; display:grid; gap:11px; }.rules-panel li { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:9px; }.rules-panel li svg { color:var(--green-600); }

.requests-head { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:22px; }
.request-tabs { display:flex; gap:5px; margin-bottom:12px; }.request-tabs button { border:0; padding:9px 12px; border-radius:10px; background:transparent; color:var(--muted); font-size:10px; cursor:pointer; }.request-tabs button.active { color:var(--purple-700); background:var(--purple-100); font-weight:800; }.request-tabs span { display:inline-grid; place-items:center; min-width:20px; height:20px; margin-left:5px; border-radius:99px; background:#fff; }
.request-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:16px; }.request-list { display:grid; gap:12px; align-content:start; }
.request-card { padding:18px; display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:start; background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-soft); animation:enter .2s ease both; }
.request-type-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:13px; }.request-type-icon.swap{color:var(--purple-700);background:var(--purple-100)}.request-type-icon.leave{color:#a06a00;background:var(--amber-100)}.request-type-icon.approved{color:var(--green-600);background:var(--green-100)}
.request-main h3 { margin:0 0 4px; font-size:12px; }.request-main > p { margin:0; color:var(--muted); font-size:9px; }.request-flow { display:flex; align-items:center; gap:7px; margin:13px 0 10px; }.flow-person { display:flex; align-items:center; gap:6px; padding:6px 8px; background:var(--canvas); border-radius:9px; font-size:8px; font-weight:700; }.request-flow > svg { color:var(--muted-2); }.request-meta { display:flex; flex-wrap:wrap; gap:9px; color:var(--muted); font-size:8px; }.request-meta span { display:flex; align-items:center; gap:4px; }
.request-actions { display:flex; gap:6px; }.request-actions .button { height:34px; font-size:9px; padding:0 11px; }
.request-guide { padding:24px; height:max-content; background:linear-gradient(155deg,var(--purple-950),var(--purple-800)); color:#fff; border:0; }.guide-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:15px; color:var(--amber-500); background:rgba(255,255,255,.1); }.request-guide h3 { margin:18px 0 8px; font-size:17px; }.request-guide > p { margin:0; color:rgba(255,255,255,.63); font-size:10px; line-height:1.7; }.guide-check { display:flex; gap:9px; align-items:center; margin-top:22px; padding:12px; border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.07); border-radius:13px; }.guide-check > svg { color:#76e5b7; }.guide-check b { display:block; font-size:9px; }.guide-check small { display:block; color:rgba(255,255,255,.5); font-size:7px; margin-top:3px; }
.empty-state { padding:50px; text-align:center; background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); color:var(--muted); }.empty-state strong { display:block; color:var(--ink); margin-bottom:5px; }

.team-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }.person-card { padding:18px; background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-soft); }.person-head { display:flex; align-items:center; gap:10px; }.person-head .avatar { width:40px; height:40px; }.person-head div { flex:1; }.person-head h3 { margin:0; font-size:11px; }.person-head span { display:block; margin-top:3px; color:var(--muted); font-size:8px; }.online-dot { width:7px; height:7px; border-radius:50%; background:#3bb981; box-shadow:0 0 0 4px var(--green-100); }.person-stats { display:grid; grid-template-columns:1fr 1fr; margin-top:15px; padding-top:13px; border-top:1px solid var(--line); }.person-stats div+div{border-left:1px solid var(--line);padding-left:12px}.person-stats b{display:block;font-size:13px}.person-stats small{color:var(--muted);font-size:7px}.person-footer{display:flex;align-items:center;justify-content:space-between;margin-top:13px}.person-footer span{font-size:8px;color:var(--green-600);font-weight:700}.person-footer button{border:0;background:transparent;color:var(--purple-700);font-size:8px;font-weight:800;cursor:pointer}

.person-detail-modal { width:min(720px,calc(100vw - 30px)); }
.person-detail-hero { position:relative; min-height:176px; padding:30px; display:flex; align-items:center; gap:18px; color:#fff; overflow:hidden; background:radial-gradient(circle at 88% 12%,rgba(255,217,121,.28),transparent 24%),linear-gradient(135deg,#301548,#7540a3 72%,#9c64c7); }
.person-detail-hero:after { content:""; position:absolute; right:-68px; bottom:-115px; width:255px; height:255px; border:1px solid rgba(255,255,255,.16); border-radius:50%; box-shadow:0 0 0 35px rgba(255,255,255,.035),0 0 0 70px rgba(255,255,255,.025); }
.person-detail-avatar { position:relative; z-index:1; flex:0 0 auto; width:78px; height:78px; border-width:4px; font-size:21px; box-shadow:0 16px 35px rgba(27,10,39,.24); }
.person-detail-hero > div { position:relative; z-index:1; min-width:0; }
.person-detail-hero h2 { margin:5px 0 2px; font-size:27px; line-height:1.2; }
.person-detail-hero p { margin:0; color:rgba(255,255,255,.76); font-size:14px !important; }
.person-detail-status { position:absolute; z-index:1; right:28px; bottom:25px; display:flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid rgba(255,255,255,.2); border-radius:99px; background:rgba(255,255,255,.12); font-size:11px; font-weight:800; }
.person-detail-status i { width:8px; height:8px; border-radius:50%; background:#67e1ad; box-shadow:0 0 0 4px rgba(103,225,173,.15); }
.person-detail-body { padding:24px; }
.person-detail-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.person-detail-summary article { min-height:88px; padding:15px; display:flex; align-items:center; gap:12px; border:1px solid #e8e0ed; border-radius:15px; background:linear-gradient(145deg,#fff,#faf7fc); }
.person-detail-summary article > span { flex:0 0 auto; width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:var(--purple-700); background:var(--purple-100); }
.person-detail-summary article > span svg { width:22px; height:22px; }
.person-detail-summary b,.person-detail-summary small { display:block; }
.person-detail-summary b { font-size:19px; }
.person-detail-summary small { margin-top:2px; color:#655e69; font-size:11px !important; }
.person-detail-section { margin-top:22px; }
.person-detail-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:15px; margin-bottom:11px; }
.person-detail-section-head h3 { margin:3px 0 0; font-size:18px; }
.person-next-duty { padding:6px 9px; border-radius:9px; color:#176c50; background:var(--green-100); font-size:10px; font-weight:800; }
.person-duty-list { max-height:300px; overflow:auto; display:grid; gap:7px; padding-right:4px; scrollbar-color:#bca7cf #f2eef5; }
.person-duty-row { min-height:58px; padding:9px 11px; display:flex; align-items:center; gap:13px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.person-duty-date { flex:0 0 58px; display:flex; align-items:center; gap:7px; }
.person-duty-date b { width:29px; height:29px; display:grid; place-items:center; border-radius:9px; color:#fff; background:var(--purple-700); font-size:13px; }
.person-duty-date span { color:#514a56; font-size:10px; font-weight:800; }
.person-duty-slots { display:flex; flex-wrap:wrap; gap:5px; }
.duty-pill { padding:5px 8px; border-radius:8px; font-size:10px; font-weight:800; }
.duty-pill.morning { color:var(--purple-800); background:var(--purple-100); }
.duty-pill.noon { color:#8c5c00; background:var(--amber-100); }
.duty-pill.afternoon { color:#176c50; background:var(--green-100); }
.password-setup-dialog::backdrop { background:rgba(25,12,35,.68); backdrop-filter:blur(7px); }
.password-setup-hero { padding-bottom:25px; }
.password-requirements { display:flex; gap:9px; padding:12px; border-radius:12px; color:#176c50; background:var(--green-100); }
.password-requirements > svg { flex:0 0 auto; margin-top:2px; }
.password-requirements p { margin:0; font-size:11px; line-height:1.6; }
.password-setup-dialog .auth-error { margin:0; }
.password-setup-dialog .modal-actions { padding-top:0; border-top:0; }

@media (max-width:560px) {
  .person-detail-hero { min-height:210px; padding:25px 20px 65px; align-items:flex-start; }
  .person-detail-avatar { width:64px; height:64px; font-size:17px; }
  .person-detail-hero h2 { font-size:22px; }
  .person-detail-status { left:20px; right:auto; bottom:21px; }
  .person-detail-body { padding:18px; }
  .person-detail-summary { grid-template-columns:1fr; }
  .person-detail-summary article { min-height:70px; }
  .person-detail-section-head { align-items:flex-start; flex-direction:column; }
  .person-duty-row { align-items:flex-start; flex-direction:column; }
}

.settings-layout > div:first-child { margin-bottom:22px; }.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }.setting-card { padding:20px; }.setting-head { display:flex; align-items:center; gap:11px; margin-bottom:17px; }.setting-head > div:nth-child(2){flex:1}.setting-head h3 { margin:0; font-size:12px; }.setting-head p { margin:4px 0 0; color:var(--muted); font-size:8px; }.toggle { width:36px; height:21px; padding:2px; border:0; border-radius:99px; background:#d9d5dd; cursor:pointer; }.toggle i { display:block; width:17px; height:17px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.17); transition:.2s ease; }.toggle.on { background:var(--purple-600); }.toggle.on i { transform:translateX(15px); }.setting-row { display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-top:1px solid var(--line); font-size:9px; }.setting-row span { color:var(--muted); }.setting-card .button.full { margin-top:12px; }.check-row, .radio-row { display:flex; align-items:flex-start; gap:8px; padding:9px 0; border-top:1px solid var(--line); color:var(--muted); font-size:9px; cursor:pointer; }.check-row input, .radio-row input { accent-color:var(--purple-700); }.radio-row b,.radio-row small{display:block}.radio-row b{color:var(--ink);font-size:9px}.radio-row small{margin-top:3px;font-size:7px}.holiday-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-top:1px solid var(--line)}.holiday-date{width:38px;height:43px;display:grid;place-items:center;border-radius:10px;background:var(--red-100);color:var(--red-600);font-size:13px;font-weight:900;line-height:1}.holiday-date small{font-size:7px}.holiday-row>div{flex:1}.holiday-row b,.holiday-row small{display:block}.holiday-row b{font-size:9px}.holiday-row small{margin-top:3px;color:var(--muted);font-size:7px}

.scrim { position:fixed; inset:0; z-index:60; background:rgba(26,15,35,.42); backdrop-filter:blur(3px); opacity:0; pointer-events:none; transition:.2s ease; }.scrim.active { opacity:1; pointer-events:auto; }
.sidebar.open { z-index:65; }
.notification-drawer { position:fixed; z-index:70; inset:0 0 0 auto; width:min(410px,100%); padding:23px; background:#fff; box-shadow:-24px 0 70px rgba(33,17,45,.18); transform:translateX(105%); transition:.3s cubic-bezier(.2,.8,.2,1); overflow:auto; }.notification-drawer.open { transform:none; }.drawer-head { display:flex; align-items:center; justify-content:space-between; padding-bottom:20px; border-bottom:1px solid var(--line); }.drawer-head h2{margin:3px 0 0;font-size:19px}.drawer-section{padding-top:17px}.drawer-date{margin-bottom:8px;color:var(--muted);font-size:9px;font-weight:800}.notification-card{position:relative;display:flex;gap:11px;padding:13px;margin-bottom:8px;border:1px solid var(--line);border-radius:13px}.notification-card.unread{background:var(--purple-50);border-color:#ded1ea}.notification-card.unread:after{content:"";position:absolute;right:11px;top:13px;width:6px;height:6px;background:#df5757;border-radius:50%}.notification-card>div:nth-child(2){padding-right:8px}.notification-card b{font-size:9px}.notification-card p{margin:3px 0;color:var(--muted);font-size:8px;line-height:1.55}.notification-card small{color:var(--muted-2);font-size:7px}.notification-drawer>.button{margin-top:20px}

dialog { padding:0; border:0; background:transparent; max-width:none; max-height:none; }.modal::backdrop { background:rgba(26,15,35,.52); backdrop-filter:blur(4px); }.modal-card { width:min(560px,calc(100vw - 30px)); max-height:calc(100vh - 30px); overflow:auto; padding:0; border-radius:24px; background:#fff; box-shadow:0 30px 100px rgba(29,16,39,.28); }.purple-hero { position:relative; padding:28px; background:linear-gradient(145deg,var(--purple-950),var(--purple-700)); color:#fff; overflow:hidden; }.purple-hero:after{content:"";position:absolute;width:200px;height:200px;right:-75px;top:-85px;border:1px solid rgba(255,255,255,.12);border-radius:50%;box-shadow:0 0 0 32px rgba(255,255,255,.025),0 0 0 65px rgba(255,255,255,.018)}.modal-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:rgba(255,255,255,.12);color:var(--amber-500);margin-bottom:18px}.panel-kicker.light{color:#f8d57d}.purple-hero h2{position:relative;margin:5px 0;font-size:23px}.purple-hero p{position:relative;margin:0;color:rgba(255,255,255,.65);font-size:10px}.modal-close{position:absolute;right:18px;top:18px;color:#fff;background:rgba(255,255,255,.08)}.modal-body{padding:22px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;padding:15px 22px 21px;border-top:1px solid var(--line)}.field{display:grid;gap:6px}.field>span{font-size:9px;font-weight:800}.field select,.field textarea,.field input{width:100%;border:1px solid var(--line);border-radius:11px;background:#fff;padding:10px 11px;color:var(--ink);font-size:10px;resize:vertical}.rule-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:15px}.rule-summary>div{display:flex;gap:7px;padding:10px;border:1px solid var(--line);border-radius:11px}.rule-summary svg{flex:0 0 auto;color:var(--purple-600)}.rule-summary b,.rule-summary small{display:block}.rule-summary b{font-size:8px}.rule-summary small{margin-top:3px;color:var(--muted);font-size:7px;line-height:1.4}.smart-note{display:flex;gap:10px;padding:12px;margin-top:14px;border-radius:12px;background:var(--purple-50);color:var(--purple-800)}.smart-note>svg{flex:0 0 auto}.smart-note p{margin:0;font-size:8px;line-height:1.6}.success-note{background:var(--green-100);color:var(--green-600)}.compact-modal{width:min(500px,calc(100vw - 30px))}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--line)}.modal-head h2{margin:3px 0 0;font-size:17px}.form-grid{display:grid;gap:14px}.edit-shift{display:grid;grid-template-columns:110px 1fr;gap:12px;align-items:center;padding:12px 0;border-top:1px solid var(--line)}.edit-shift:first-child{border-top:0}.edit-shift>div b,.edit-shift>div small{display:block}.edit-shift>div b{font-size:9px}.edit-shift>div small{margin-top:3px;color:var(--muted);font-size:7px}.edit-selects{display:flex;gap:6px}.edit-selects select{min-width:0;flex:1;border:1px solid var(--line);border-radius:9px;padding:8px;font-size:8px}
.toast-region{position:fixed;right:22px;bottom:22px;z-index:100;display:grid;gap:8px}.toast{min-width:280px;max-width:390px;display:flex;align-items:center;gap:10px;padding:13px 15px;border-radius:13px;background:var(--purple-950);color:#fff;box-shadow:0 16px 45px rgba(24,13,32,.25);animation:toast-in .28s ease both}.toast.success{background:#176d52}.toast.warning{background:#8a5c09}.toast svg{flex:0 0 auto}.toast div{font-size:9px}.toast b{display:block;font-size:10px}.toast span{display:block;margin-top:2px;color:rgba(255,255,255,.68)}@keyframes toast-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.mobile-nav { display:none; }

@media (max-width: 1180px) {
  .sidebar { width:220px; }.main-area{margin-left:220px}.content,.topbar{padding-left:22px;padding-right:22px}.metric-grid{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.activity-panel{display:none}.team-grid{grid-template-columns:1fr 1fr}.request-layout{grid-template-columns:1fr}.request-guide{display:none}.calendar-cell{min-height:132px;padding:7px}.calendar-shift{font-size:6.5px}.schedule-bottom-grid{grid-template-columns:1fr 1fr}
}

@media (max-width: 820px) {
  body{background:#fbfafc}.sidebar{transform:translateX(-105%);width:260px;transition:.25s ease}.sidebar.open{transform:none;box-shadow:20px 0 55px rgba(31,17,40,.25)}.main-area{margin-left:0}.topbar{height:67px;padding:0 16px}.topbar-title h1{font-size:15px}.topbar-title p{font-size:9px}.mobile-menu{display:grid}.content{padding:18px 15px 90px}.hide-mobile{display:none}.welcome-row{display:block}.published-pill{min-width:0;margin-top:15px}.welcome-row h2{font-size:21px}.metric-grid{display:flex;overflow:auto;margin-left:-15px;margin-right:-15px;padding:0 15px 8px;scroll-snap-type:x mandatory}.metric-card{min-width:205px;scroll-snap-align:start}.dashboard-grid{display:block}.today-panel{border-radius:18px}.shift-row{grid-template-columns:62px 1fr auto;gap:8px}.shift-row .shift-info{display:none}.status-badge{display:none}.timeline-rail{left:77px}.week-strip{overflow:auto;grid-template-columns:repeat(5,160px)}.panel-header{padding:17px}.timeline{padding:0 17px}.panel-footer{padding:12px 17px 16px}.schedule-toolbar{align-items:flex-start;gap:12px}.toolbar-actions .segmented,.toolbar-actions .button-secondary{display:none}.schedule-meta{display:block}.coverage-chip{width:max-content;margin-top:8px}.calendar-panel{overflow:auto}.calendar-head,.calendar-grid{min-width:870px}.schedule-bottom-grid{grid-template-columns:1fr}.team-grid,.settings-grid{grid-template-columns:1fr}.requests-head{align-items:flex-start}.request-card{grid-template-columns:auto 1fr}.request-actions{grid-column:2}.mobile-nav{position:fixed;z-index:40;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;height:66px;padding:7px 8px 8px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-top:1px solid var(--line);box-shadow:0 -10px 35px rgba(44,26,57,.08)}.mobile-nav button{position:relative;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;gap:3px;font-size:18px}.mobile-nav button.active{color:var(--purple-700)}.mobile-nav small{font-size:7px;font-weight:700}.mobile-nav .mobile-action{width:49px;height:49px;margin:0 auto 10px;border-radius:16px;background:linear-gradient(135deg,var(--purple-700),var(--purple-500));color:#fff;box-shadow:0 9px 22px rgba(91,45,139,.26)}.mobile-nav i{position:absolute;right:20%;top:-2px;min-width:16px;height:16px;display:grid;place-items:center;border:2px solid #fff;border-radius:99px;background:#e55252;color:#fff;font-size:6px;font-style:normal}.toast-region{left:12px;right:12px;bottom:78px}.toast{min-width:0;width:100%}
}

@media (max-width: 520px) {
  .mobile-brand{display:flex;align-items:center;gap:8px}.mobile-brand strong{font-size:14px}.topbar-title{display:none}.top-actions{margin-left:auto}.show-small{display:inline}.hide-small{display:none}.top-actions .button{height:37px;padding:0 11px}.notification-button{width:37px;height:37px}.welcome-row p{line-height:1.6}.published-pill{padding:11px}.metric-grid{margin-top:17px}.metric-card{min-width:190px;min-height:145px}.panel-header h3{font-size:13px}.shift-row{min-height:76px}.people-stack b{font-size:9px}.panel-footer{display:block}.panel-footer .text-button{margin-top:10px}.requests-head{display:block}.requests-head .button{margin-top:14px}.request-card{grid-template-columns:1fr;padding:15px}.request-type-icon{display:none}.request-actions{grid-column:1}.request-flow{flex-wrap:wrap}.schedule-toolbar{padding:13px}.month-nav{gap:5px}.month-nav h2{font-size:15px}.toolbar-actions .button-primary{padding:0 10px}.legend{line-height:1.8}.settings-layout>div:first-child h2,.requests-head h2{font-size:21px}.rule-summary{grid-template-columns:1fr}.modal-actions .button{flex:1}.edit-shift{grid-template-columns:1fr}.edit-selects{flex-wrap:wrap}.welcome-row{margin-bottom:12px}
}

@media print {
  .sidebar,.topbar,.mobile-nav,.schedule-toolbar,.schedule-meta,.schedule-bottom-grid{display:none!important}.main-area{margin:0}.content{padding:0}.view{display:none!important}#view-schedule{display:block!important}.calendar-panel{box-shadow:none;border:1px solid #999}.calendar-head,.calendar-grid{min-width:0}.calendar-cell{min-height:110px}.calendar-shift{font-size:7px}@page{size:A4 landscape;margin:10mm}
}

/* Readability pass: all operational text must remain legible at normal browser zoom. */
body { font-size: 16px; line-height: 1.55; }
.mobile-menu { display: none; }
.topbar-title h1 { font-size: 22px; }
.topbar-title p { font-size: 13px; }
.button { height: 44px; padding-inline: 17px; font-size: 14px; }
.button-ghost { height: 38px; }
.icon-button { width: 44px; height: 44px; }
.nav-item { font-size: 14px; }
.brand span, .account-card span { font-size: 12px; }
.account-card strong, .sidebar-card strong { font-size: 13px; }
.sidebar-card p, .sidebar-card .text-button { font-size: 12px; }

.eyebrow, .panel-kicker { font-size: 12px; letter-spacing: .045em; }
.welcome-row h2, .requests-head h2, .settings-layout > div:first-child h2 { font-size: 30px; }
.welcome-row p, .requests-head p, .settings-layout > div:first-child p { font-size: 14px; line-height: 1.65; }
.published-pill { min-width: 350px; padding: 15px 16px; }
.published-pill b { font-size: 14px; }
.published-pill small, .published-pill button { font-size: 11px; }

.metric-card { min-height: 178px; padding: 20px; }
.metric-icon { width: 40px; height: 40px; }
.trend { padding: 6px 10px; font-size: 11px; }
.metric-card > div:nth-child(2) strong { font-size: 36px; }
.metric-card > div:nth-child(2) strong small { font-size: 15px; }
.metric-card > div:nth-child(2) > span { margin-top: 10px; font-size: 13px; }
.metric-note { margin-top: 18px; font-size: 12px; }

.panel-header { padding: 22px 24px 17px; }
.panel-header h3 { font-size: 19px; }
.timeline { padding-inline: 24px; }
.timeline-rail { left: 102px; }
.shift-row { grid-template-columns: 96px 1.05fr 1.05fr auto; min-height: 102px; gap: 16px; }
.shift-row time { font-size: 16px; }
.shift-row time small { margin-top: 2px; font-size: 11px; }
.shift-icon { width: 42px; height: 42px; }
.shift-info strong, .people-stack b { font-size: 14px; }
.shift-info span, .people-stack small { margin-top: 4px; font-size: 11px; }
.avatar { width: 36px; height: 36px; font-size: 10px; }
.status-badge { padding: 7px 10px; font-size: 11px; }
.panel-footer { padding: 15px 24px 20px; }
.info-chip, .panel-footer .text-button { font-size: 12px; }

.activity-list { padding-inline: 22px; }
.activity-item { gap: 12px; padding: 16px 0; }
.activity-icon { width: 38px; height: 38px; }
.activity-item p { font-size: 13px; line-height: 1.6; }
.activity-item small { font-size: 11px; }
.full-text-button { height: 48px; font-size: 12px; }

.week-day { padding: 16px; }
.week-day-head span { font-size: 11px; }
.week-day-head b { width: 29px; height: 29px; font-size: 13px; }
.mini-shift { min-height: 34px; padding: 8px 9px; font-size: 10px; }

.month-nav h2 { font-size: 22px; }
.segmented button { padding: 8px 14px; font-size: 12px; }
.legend { gap: 16px; font-size: 12px; }
.legend i { width: 10px; height: 10px; }
.coverage-chip { padding: 9px 12px; font-size: 11px; }
.calendar-head span { padding: 13px 10px; font-size: 12px; }
.calendar-cell { min-height: 178px; padding: 11px; }
.date-number { margin-bottom: 9px; font-size: 12px; }
.date-number b { font-size: 15px; }
.date-number .today-label { padding: 4px 7px; font-size: 10px; }
.holiday-copy { height: 112px; font-size: 12px; }
.holiday-copy span { font-size: 22px; }
.calendar-shift { min-height: 34px; margin-top: 6px; padding: 7px 8px; font-size: 11px; }
.calendar-cell.editing:after { font-size: 10px; }
.fairness-row { grid-template-columns: 130px 1fr 62px; gap: 12px; font-size: 11px; }
.fairness-row > b { font-size: 11px; }
.rules-panel li { font-size: 12px; }

.request-tabs button { padding: 10px 14px; font-size: 13px; }
.request-card { padding: 20px; gap: 16px; }
.request-type-icon { width: 44px; height: 44px; }
.request-main h3 { font-size: 16px; }
.request-main > p { font-size: 12px; }
.flow-person { padding: 7px 10px; font-size: 11px; }
.request-meta { font-size: 11px; }
.request-actions .button { height: 38px; font-size: 12px; }
.request-guide > p { font-size: 13px; }
.guide-check b { font-size: 12px; }
.guide-check small { font-size: 10px; }

.person-head h3 { font-size: 15px; }
.person-head span { font-size: 11px; }
.person-stats b { font-size: 17px; }
.person-stats small, .person-footer span, .person-footer button { font-size: 10px; }
.setting-head h3 { font-size: 16px; }
.setting-head p, .setting-row, .check-row, .radio-row b, .holiday-row b { font-size: 12px; }
.radio-row small, .holiday-row small { font-size: 10px; }
.field > span { font-size: 12px; }
.field select, .field textarea, .field input { padding: 12px; font-size: 13px; }
.rule-summary b { font-size: 11px; }
.rule-summary small, .smart-note p { font-size: 10px; }
.notification-card b { font-size: 12px; }
.notification-card p { font-size: 11px; }
.notification-card small, .drawer-date { font-size: 10px; }
.edit-shift > div b { font-size: 12px; }
.edit-shift > div small, .edit-selects select { font-size: 10px; }
.toast div { font-size: 11px; }
.toast b { font-size: 13px; }

@media (max-width: 1180px) {
  .metric-card { min-width: 235px; }
  .calendar-head, .calendar-grid { min-width: 1080px; }
  .calendar-panel { overflow-x: auto; scrollbar-color: #bda9d0 #f1edf4; }
}

@media (max-width: 820px) {
  .mobile-menu { display: grid; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-title p { font-size: 12px; }
  .content { padding-top: 22px; }
  .welcome-row h2 { font-size: 27px; }
  .published-pill { min-width: 0; }
  .metric-card { min-width: 250px; min-height: 170px; }
  .shift-row { grid-template-columns: 84px 1fr auto; min-height: 96px; }
  .timeline-rail { left: 92px; }
  .shift-row time { font-size: 15px; }
  .people-stack b { font-size: 13px; }
  .week-strip { grid-template-columns: repeat(5, 205px); }
  .calendar-head, .calendar-grid { min-width: 1080px; }
  .mobile-nav { height: 72px; }
  .mobile-nav small { font-size: 10px; }
}

@media (max-width: 520px) {
  .mobile-brand strong { font-size: 17px; }
  .welcome-row h2, .requests-head h2, .settings-layout > div:first-child h2 { font-size: 25px; }
  .welcome-row p { font-size: 13px; }
  .metric-card { min-width: 245px; }
  .panel-header h3 { font-size: 17px; }
  .shift-row { grid-template-columns: 78px 1fr; }
  .shift-row .status-badge { display: none; }
  .people-stack b { white-space: normal; }
  .request-card { padding: 18px; }
}

@media print {
  body { font-size: 11px; }
  .calendar-head, .calendar-grid { min-width: 0; }
  .calendar-head span { font-size: 9px; }
  .calendar-cell { min-height: 112px; padding: 6px; }
  .calendar-shift { min-height: 24px; margin-top: 3px; padding: 4px; font-size: 8px; }
}

/* High-visibility typography and contrast pass. */
:root {
  --muted: #4d4752;
  --muted-2: #655e69;
  --line: #dcd6df;
  --canvas: #f3f1f5;
}

body { font-size: 18px; color: #1d1921; }
p, small, .metric-note, .shift-info span, .people-stack small { font-weight: 500; }
.topbar-title h1 { font-size: 24px; }
.topbar-title p { font-size: 15px; color: #514b56; }
.button { height: 48px; padding-inline: 20px; font-size: 16px; }
.button-ghost { height: 42px; }
.text-button { font-size: 14px; }
.icon-button { width: 48px; height: 48px; }
.nav-item { min-height: 50px; font-size: 16px; }
.brand span, .account-card span, .sidebar-card p, .sidebar-card .text-button { font-size: 14px; }
.account-card strong, .sidebar-card strong { font-size: 15px; }

.eyebrow, .panel-kicker { color: #542680; font-size: 14px; letter-spacing: .02em; }
.welcome-row h2, .requests-head h2, .settings-layout > div:first-child h2 { font-size: 34px; }
.welcome-row p, .requests-head p, .settings-layout > div:first-child p { color: #4d4752; font-size: 16px; }
.published-pill { min-width: 380px; padding: 17px 18px; }
.published-pill b { font-size: 16px; }
.published-pill small, .published-pill button { font-size: 13px; }

.metric-card { min-height: 196px; padding: 23px; }
.metric-icon { width: 44px; height: 44px; }
.trend { font-size: 13px; }
.metric-card > div:nth-child(2) strong { font-size: 42px; }
.metric-card > div:nth-child(2) strong small { font-size: 17px; color: #4d4752; }
.metric-card > div:nth-child(2) > span { color: #3f3944; font-size: 15px; }
.metric-note { color: #4d4752; font-size: 14px; }

.panel-header { padding: 25px 27px 20px; }
.panel-header h3 { font-size: 22px; }
.timeline { padding-inline: 27px; }
.timeline-rail { left: 113px; }
.shift-row { grid-template-columns: 106px 1.05fr 1.05fr auto; min-height: 116px; gap: 18px; }
.shift-row time { font-size: 18px; }
.shift-row time small { color: #5c5661; font-size: 13px; }
.shift-icon { width: 48px; height: 48px; }
.shift-info strong, .people-stack b { font-size: 16px; }
.shift-info span, .people-stack small { color: #514b56; font-size: 14px; }
.avatar { width: 40px; height: 40px; font-size: 12px; }
.status-badge { padding: 9px 12px; font-size: 13px; }
.panel-footer { padding: 18px 27px 22px; }
.info-chip, .panel-footer .text-button { font-size: 14px; }

.activity-list { padding-inline: 25px; }
.activity-item { padding: 19px 0; }
.activity-icon { width: 44px; height: 44px; }
.activity-item p { color: #302b34; font-size: 15px; }
.activity-item small { color: #5d5662; font-size: 13px; }
.full-text-button { height: 54px; font-size: 14px; }

/* The five-day overview is a primary reading surface, not micro-copy. */
.week-panel .panel-header { padding-block: 26px 22px; }
.week-panel .panel-header h3 { font-size: 24px; }
.week-day { min-height: 192px; padding: 20px; }
.week-day-head { margin-bottom: 16px; }
.week-day-head span { color: #302b34; font-size: 15px; }
.week-day-head b { width: 36px; height: 36px; font-size: 17px; }
.mini-shift { min-height: 46px; gap: 10px; margin-top: 9px; padding: 11px 12px; color: #29242d; background: #f5f2f7; font-size: 14px; font-weight: 700; }
.mini-shift i { width: 5px; height: 26px; }

.month-nav h2 { font-size: 25px; }
.segmented button { font-size: 14px; }
.legend { color: #403a45; font-size: 14px; font-weight: 600; }
.legend i { width: 12px; height: 12px; }
.coverage-chip { font-size: 13px; }
.calendar-head span { color: #3f3944; font-size: 14px; }
.calendar-head .weekend-label { color: #542680; }
.calendar-cell { min-height: 220px; padding: 14px; }
.date-number { font-size: 14px; }
.date-number b { font-size: 18px; }
.date-number .today-label { font-size: 12px; }
.holiday-copy { height: 145px; color: #514b56; font-size: 14px; }
.calendar-shift { min-height: 43px; margin-top: 8px; padding: 10px; font-size: 14px; }
.calendar-cell.editing:after { font-size: 12px; }
.fairness-row { grid-template-columns: 150px 1fr 76px; font-size: 14px; }
.fairness-row > b { font-size: 13px; }
.rules-panel li { color: #403a45; font-size: 14px; }

.request-tabs button { font-size: 15px; }
.request-main h3 { font-size: 18px; }
.request-main > p { color: #4d4752; font-size: 14px; }
.flow-person { font-size: 13px; }
.request-meta { color: #4d4752; font-size: 13px; }
.request-actions .button { height: 42px; font-size: 14px; }
.request-guide > p { color: rgba(255,255,255,.82); font-size: 15px; }
.guide-check b { font-size: 14px; }
.guide-check small { color: rgba(255,255,255,.72); font-size: 12px; }

.person-head h3 { font-size: 17px; }
.person-head span { color: #4d4752; font-size: 13px; }
.person-stats b { font-size: 20px; }
.person-stats small, .person-footer span, .person-footer button { color: #4d4752; font-size: 12px; }
.setting-head h3 { font-size: 18px; }
.setting-head p, .setting-row, .check-row, .radio-row b, .holiday-row b { color: #403a45; font-size: 14px; }
.radio-row small, .holiday-row small { color: #514b56; font-size: 12px; }
.field > span { font-size: 14px; }
.field select, .field textarea, .field input { font-size: 15px; }
.rule-summary b { font-size: 13px; }
.rule-summary small, .smart-note p { color: #403a45; font-size: 12px; }
.notification-card b { font-size: 14px; }
.notification-card p { color: #403a45; font-size: 13px; }
.notification-card small, .drawer-date { color: #5b5460; font-size: 12px; }
.edit-shift > div b { font-size: 14px; }
.edit-shift > div small, .edit-selects select { color: #4d4752; font-size: 12px; }
.toast div { font-size: 13px; }
.toast b { font-size: 15px; }

@media (max-width: 1180px) {
  .metric-card { min-width: 275px; }
  .calendar-head, .calendar-grid { min-width: 1420px; }
  .week-strip { overflow-x: auto; grid-template-columns: repeat(5, 265px); }
}

@media (max-width: 820px) {
  .topbar-title h1 { font-size: 21px; }
  .topbar-title p { font-size: 14px; }
  .welcome-row h2 { font-size: 31px; }
  .welcome-row p { font-size: 15px; }
  .metric-card { min-width: 275px; min-height: 190px; }
  .shift-row { grid-template-columns: 94px 1fr auto; min-height: 108px; }
  .timeline-rail { left: 104px; }
  .shift-row time { font-size: 17px; }
  .people-stack b { font-size: 15px; }
  .week-strip { grid-template-columns: repeat(5, 270px); }
  .calendar-head, .calendar-grid { min-width: 1420px; }
  .mobile-nav { height: 78px; }
  .mobile-nav small { color: #4d4752; font-size: 12px; }
}

@media (max-width: 520px) {
  .mobile-brand strong { font-size: 19px; }
  .welcome-row h2, .requests-head h2, .settings-layout > div:first-child h2 { font-size: 29px; }
  .welcome-row p { font-size: 15px; }
  .metric-card { min-width: 270px; }
  .panel-header h3 { font-size: 20px; }
  .week-strip { grid-template-columns: repeat(5, 265px); }
}

@media print {
  body { font-size: 11px; }
  .calendar-head, .calendar-grid { min-width: 0; }
  .calendar-head span { font-size: 9px; }
  .calendar-cell { min-height: 112px; padding: 6px; }
  .date-number b { font-size: 10px; }
  .calendar-shift { min-height: 24px; margin-top: 3px; padding: 4px; font-size: 8px; }
}

/* Sitewide legibility standard — applies to every screen, drawer and modal. */
:root {
  --muted: #3f3944;
  --muted-2: #514a57;
  --line: #d7d1da;
}

body { font-size: 18px; }
p { color: #3f3944; font-size: 15px !important; line-height: 1.7; }
small { color: #514a57; font-size: 14px !important; line-height: 1.45; }
label, input, select, textarea { font-size: 15px; }
.eyebrow, .panel-kicker { font-size: 14px !important; }
.text-button, .full-text-button { font-size: 15px !important; }
.nav-count { min-width: 27px; height: 27px; font-size: 14px; }

/* Dashboard */
.published-pill b { font-size: 17px; }
.published-pill button { font-size: 14px; }
.trend { font-size: 14px; }
.metric-card > div:nth-child(2) > span { font-size: 16px; }
.metric-card.metric-featured > div:nth-child(2) > span {
  color: #fff !important;
  font-weight: 700;
  opacity: 1;
  text-shadow: 0 1px 2px rgba(31, 13, 54, .28);
}
.metric-note { font-size: 15px !important; }
.shift-row time { font-size: 19px; }
.shift-info strong, .people-stack b { font-size: 17px; }
.shift-info span, .people-stack small { font-size: 14px !important; }
.avatar { font-size: 14px; }
.status-badge { font-size: 14px; }
.info-chip, .panel-footer .text-button { font-size: 15px; }
.activity-item p { font-size: 15px !important; }
.activity-item small { font-size: 14px !important; }
.week-day-head span { font-size: 16px; }
.week-day-head b { font-size: 18px; }
.mini-shift { min-height: 48px; font-size: 15px; }

/* Schedule */
.segmented button { font-size: 15px; }
.legend, .coverage-chip { font-size: 15px; }
.calendar-head span { font-size: 15px; }
.date-number { font-size: 15px; }
.date-number b { font-size: 19px; }
.date-number .today-label { font-size: 14px; }
.holiday-copy { font-size: 15px; }
.calendar-shift { min-height: 46px; font-size: 15px; }
.calendar-cell.editing:after { font-size: 14px; }
.fairness-row, .fairness-row > b { font-size: 14px; }
.rules-panel li { font-size: 15px; }

/* Requests */
.request-tabs button { font-size: 16px; }
.request-main h3 { font-size: 19px; }
.request-main > p { font-size: 15px !important; }
.flow-person, .request-meta { font-size: 14px; }
.request-actions .button { font-size: 15px; }
.request-guide > p { color: rgba(255,255,255,.88); font-size: 15px !important; }
.guide-check b, .guide-check small { font-size: 14px !important; }

/* Team */
.person-head h3 { font-size: 18px; }
.person-head span { color: #3f3944; font-size: 14px; }
.person-stats b { font-size: 21px; }
.person-stats small, .person-footer span, .person-footer button { color: #3f3944; font-size: 14px !important; }

/* Settings */
.setting-head h3 { font-size: 19px; }
.setting-head p, .setting-row, .check-row, .radio-row b, .holiday-row b { color: #332e38; font-size: 15px !important; }
.radio-row small, .holiday-row small { color: #4a4450; font-size: 14px !important; }
.field > span { font-size: 15px; }
.field select, .field textarea, .field input { font-size: 15px; }

/* Drawers, dialogs and temporary feedback */
.drawer-date { font-size: 14px; }
.notification-card b { font-size: 16px; }
.notification-card p { color: #332e38; font-size: 15px !important; }
.notification-card small { color: #4a4450; font-size: 14px !important; }
.purple-hero p { color: rgba(255,255,255,.9); font-size: 15px !important; }
.rule-summary b { font-size: 15px; }
.rule-summary small, .smart-note p { color: #332e38; font-size: 14px !important; }
.edit-shift > div b { font-size: 16px; }
.edit-shift > div small, .edit-selects select { font-size: 14px !important; }
.toast div { font-size: 14px; }
.toast b { font-size: 16px; }
.toast span { color: rgba(255,255,255,.9); }

@media (max-width: 820px) {
  .mobile-nav small { color: #3f3944; font-size: 14px !important; }
  .calendar-head, .calendar-grid { min-width: 1480px; }
  .week-strip { grid-template-columns: repeat(5, 290px); }
}

/* Printing is intentionally compact and independent from on-screen type sizes. */
@media print {
  body { font-size: 11px; }
  p, small { font-size: 9px !important; }
  .calendar-head, .calendar-grid { min-width: 0; }
  .calendar-head span { font-size: 9px; }
  .calendar-cell { min-height: 112px; padding: 6px; }
  .date-number b { font-size: 10px; }
  .calendar-shift { min-height: 24px; margin-top: 3px; padding: 4px; font-size: 8px; }
}

/* Colorful visual calendar */
.schedule-hero {
  position: relative;
  min-height: 322px;
  margin-bottom: 18px;
  padding: 42px 48px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  overflow: hidden;
  color: #fff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,213,112,.22), transparent 24%),
    radial-gradient(circle at 16% 110%, rgba(176,114,232,.38), transparent 35%),
    linear-gradient(125deg, #29123f 0%, #52267a 46%, #7437a0 100%);
  box-shadow: 0 28px 70px rgba(65,31,91,.22);
}
.schedule-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 25px 25px;
  mask-image: linear-gradient(90deg, transparent, #000 58%, #000);
}
.hero-glow { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.hero-glow-one { width: 370px; height: 370px; right: -90px; top: -180px; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018); }
.hero-glow-two { width: 210px; height: 210px; left: -110px; bottom: -125px; box-shadow: 0 0 0 35px rgba(255,255,255,.025); }
.schedule-hero-copy { position: relative; z-index: 2; max-width: 610px; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; color: #ffd979; font-size: 14px; font-weight: 900; letter-spacing: .08em; }
.hero-eyebrow svg { width: 18px; height: 18px; }
.schedule-hero h2 { margin: 13px 0 10px; color: #fff; font-size: clamp(39px, 3.6vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
.schedule-hero h2 em { color: #ffd979; font-style: normal; text-shadow: 0 8px 30px rgba(255,210,100,.18); }
.schedule-hero p { max-width: 550px; margin: 0; color: rgba(255,255,255,.86); font-size: 16px !important; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.hero-pills > span { min-height: 39px; padding: 8px 12px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; color: #fff; background: rgba(255,255,255,.09); backdrop-filter: blur(8px); font-size: 14px; font-weight: 700; }
.hero-pills i { width: 9px; height: 9px; border-radius: 50%; background: #6ce0af; box-shadow: 0 0 0 5px rgba(108,224,175,.13), 0 0 18px #6ce0af; }
.schedule-hero-visual { position: relative; z-index: 2; min-height: 230px; }
.orbit { position: absolute; left: 53%; top: 51%; translate: -50% -50%; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.orbit-one { width: 260px; height: 260px; animation: orbit-spin 18s linear infinite; }
.orbit-one:after { content:""; position:absolute; width:12px; height:12px; left:26px; top:28px; border-radius:50%; background:#ffd979; box-shadow:0 0 25px #ffd979; }
.orbit-two { width: 190px; height: 190px; border-style: dashed; animation: orbit-spin 14s linear infinite reverse; }
@keyframes orbit-spin { to { rotate: 360deg; } }
.month-orb { position: absolute; left: 53%; top: 51%; translate: -50% -50%; width: 154px; height: 154px; display: grid; place-content: center; text-align: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: linear-gradient(145deg, rgba(255,255,255,.19), rgba(255,255,255,.08)); backdrop-filter: blur(16px); box-shadow: inset 0 1px rgba(255,255,255,.3), 0 24px 55px rgba(25,8,38,.25); }
.month-orb span { color: #ffd979; font-size: 14px; font-weight: 800; }
.month-orb strong { margin: -3px 0; font-size: 61px; line-height: 1; letter-spacing: -.06em; }
.month-orb small { color: rgba(255,255,255,.8); }
.floating-card { position: absolute; min-height: 66px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 17px; background: rgba(255,255,255,.91); color: #29232e; box-shadow: 0 20px 45px rgba(24,9,35,.23); backdrop-filter: blur(15px); animation: card-float 4s ease-in-out infinite; }
.floating-card b { display: block; font-size: 15px; }
.floating-card small { display: block; color: #514a57; }
.floating-card-top { right: -3%; top: 0; min-width: 190px; }
.floating-card-bottom { left: -2%; bottom: -1%; min-width: 220px; animation-delay: -2s; }
@keyframes card-float { 50% { transform: translateY(-8px); } }
.float-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; }
.sun-float { color: #a96a00; background: #fff0c7; }
.float-check { margin-left: auto; width: 25px; height: 25px; display: grid; place-items: center; color: #137e59; background: #dff7eb; border-radius: 50%; font-weight: 900; }
.hero-avatar-stack { display: flex; padding-left: 8px; }
.hero-avatar-stack .avatar { margin-left: -9px; }
.sparkle { position: absolute; color: #ffd979; text-shadow: 0 0 18px #ffd979; animation: sparkle-pulse 2.3s ease-in-out infinite; }
.sparkle-a { right: 9%; bottom: 14%; font-size: 24px; }.sparkle-b { left: 14%; top: 8%; font-size: 18px; animation-delay: -.8s; }.sparkle-c { right: 0; top: 48%; color: #85e9c0; font-size: 38px; }
@keyframes sparkle-pulse { 50% { opacity: .35; scale: .7; rotate: 22deg; } }

.schedule-toolbar { border-color: #d9cfe2; background: linear-gradient(135deg, #fff, #fbf7ff); }
.schedule-meta { padding-block: 17px 13px; }
.legend-hint { color: #5b2d8b; font-weight: 800; }
.legend-hint svg { color: #bd8211; }
.calendar-panel { border-color: #d7cce1; box-shadow: 0 22px 60px rgba(63,34,80,.1); }
.calendar-head { background: linear-gradient(90deg, #f5eefb, #fff8e8, #eef9f5); }
.calendar-head span { padding-block: 16px; color: #3d3344; }

/* First-use state: never leave the live schedule looking like a broken blank page. */
.schedule-empty-state[hidden] { display: none !important; }
.schedule-empty-state {
  position: relative;
  min-height: 520px;
  padding: 52px clamp(28px, 6vw, 86px);
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(430px, 1.28fr);
  align-items: center;
  gap: clamp(38px, 7vw, 96px);
  overflow: hidden;
  background: radial-gradient(circle at 12% 18%, rgba(138,81,190,.16), transparent 27%), radial-gradient(circle at 93% 84%, rgba(255,201,77,.18), transparent 30%), linear-gradient(135deg, #fbf7ff 0%, #fff 48%, #fff9e9 100%);
}
.schedule-empty-state:before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.4; background-image:radial-gradient(#aa83c9 1px,transparent 1px); background-size:28px 28px; mask-image:linear-gradient(110deg,#000,transparent 48%,#000); }
.empty-roster-art { position:relative; z-index:1; min-height:310px; display:grid; place-items:center; }
.empty-orbit { position:absolute; border:1px solid rgba(112,58,155,.2); border-radius:50%; animation:empty-orbit 20s linear infinite; }
.empty-orbit-one { width:300px; height:300px; box-shadow:0 0 0 32px rgba(112,58,155,.035),0 0 0 65px rgba(112,58,155,.02); }
.empty-orbit-one:after { content:""; position:absolute; width:15px; height:15px; top:34px; left:31px; border-radius:50%; background:#ffca4c; box-shadow:0 0 0 8px rgba(255,202,76,.18),0 0 28px rgba(255,177,39,.7); }
.empty-orbit-two { width:215px; height:215px; border-style:dashed; animation-duration:14s; animation-direction:reverse; }
@keyframes empty-orbit { to { rotate:360deg; } }
.empty-calendar-icon { position:relative; width:148px; height:148px; display:grid; place-items:center; color:#fff; border:1px solid rgba(255,255,255,.65); border-radius:40px; background:linear-gradient(145deg,#8953b8,#53247a); box-shadow:0 30px 65px rgba(76,35,105,.28),inset 0 1px rgba(255,255,255,.28); rotate:-5deg; }
.empty-calendar-icon svg { width:68px; height:68px; stroke-width:1.6; }
.empty-calendar-icon b { position:absolute; right:-14px; bottom:-13px; width:50px; height:50px; display:grid; place-items:center; color:#563079; border:5px solid #fff; border-radius:50%; background:#ffd66c; font-size:28px; box-shadow:0 12px 24px rgba(85,49,17,.18); }
.empty-spark { position:absolute; color:#7540a2; font-size:28px; text-shadow:0 0 20px rgba(117,64,162,.28); animation:sparkle-pulse 2.3s ease-in-out infinite; }
.empty-spark-one { top:15px; right:18%; }.empty-spark-two { left:9%; bottom:20px; color:#e8a315; animation-delay:-1s; }
.schedule-empty-copy { position:relative; z-index:1; max-width:720px; }
.empty-kicker { display:flex; align-items:center; gap:8px; color:#663190; font-size:15px; font-weight:900; letter-spacing:.04em; }
.empty-kicker svg { width:18px; height:18px; }
.schedule-empty-copy h3 { margin:12px 0 8px; color:#211b26; font-size:clamp(28px,2.4vw,41px); line-height:1.18; letter-spacing:-.035em; }
.schedule-empty-copy > p { max-width:690px; margin:0; color:#4c4352; font-size:17px !important; line-height:1.75; }
.setup-progress { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:27px 0 24px; }
.setup-progress > div { min-height:92px; padding:13px; display:flex; align-items:flex-start; gap:10px; border:1px solid #e1d9e7; border-radius:15px; background:rgba(255,255,255,.82); box-shadow:0 8px 24px rgba(54,30,69,.06); }
.setup-progress > div > span { flex:0 0 auto; width:30px; height:30px; display:grid; place-items:center; color:#fff; border-radius:10px; background:#9d8ba9; font-size:14px; font-weight:900; }
.setup-progress > div.complete { border-color:#b9e9d4; background:#f1fbf6; }
.setup-progress > div.complete > span { background:#2aa778; font-size:0; }
.setup-progress > div.complete > span:before { content:"✓"; font-size:15px; }
.setup-progress b,.setup-progress small { display:block; }.setup-progress b { color:#302935; font-size:15px; line-height:1.35; }.setup-progress small { margin-top:4px; color:#59505f; font-size:13px !important; line-height:1.4; }
.schedule-empty-actions { display:flex; flex-wrap:wrap; gap:10px; }
.schedule-empty-actions .button { min-height:48px; padding-inline:18px; font-size:15px; }
.schedule-empty-actions .button:disabled,.toolbar-actions .button:disabled { cursor:not-allowed; filter:grayscale(.35); opacity:.45; box-shadow:none; }
.empty-roster-hint { display:block; margin-top:14px; color:#4b4351; font-size:14px !important; line-height:1.55; }
.schedule-empty-mode .calendar-head,.schedule-empty-mode .calendar-grid,.schedule-empty-mode .schedule-meta,.schedule-empty-mode .schedule-bottom-grid { display:none !important; }
.schedule-empty-mode .calendar-panel { overflow:hidden; }

@media (max-width: 980px) {
  .schedule-empty-state { grid-template-columns:1fr; gap:15px; padding:38px 28px; }
  .empty-roster-art { min-height:230px; }.empty-orbit-one{width:225px;height:225px}.empty-orbit-two{width:165px;height:165px}.empty-calendar-icon{width:115px;height:115px;border-radius:30px}.empty-calendar-icon svg{width:52px;height:52px}
}
@media (max-width: 620px) {
  .schedule-empty-state { padding:30px 20px 36px; }.setup-progress{grid-template-columns:1fr}.setup-progress>div{min-height:0}.schedule-empty-copy>p{font-size:16px!important}.schedule-empty-actions{display:grid}.schedule-empty-actions .button{width:100%}
}
.calendar-cell {
  --person-accent: #8150b3;
  --person-soft: #f0e7f8;
  --person-deep: #532779;
  position: relative;
  min-height: 252px;
  padding: 15px;
  background: linear-gradient(165deg, #fff 55%, color-mix(in srgb, var(--person-soft) 32%, white));
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.calendar-cell:not(.empty):not(.weekend):not(.holiday):before { content:""; position:absolute; left:0; right:0; top:0; height:4px; background:linear-gradient(90deg,var(--person-accent),#ffd46a); opacity:.8; }
.calendar-cell:not(.empty):hover { z-index: 4; transform: translateY(-5px) scale(1.012); border-radius: 15px; background: #fff; box-shadow: 0 18px 45px rgba(57,28,74,.18), inset 0 0 0 2px color-mix(in srgb,var(--person-accent) 22%,transparent); }
.calendar-cell.today { z-index: 2; background: linear-gradient(160deg, #fcf8ff, #fff9e9); box-shadow: inset 0 0 0 3px #7441a5, 0 12px 30px rgba(91,45,139,.14); }
.calendar-cell.today:after { content:"TODAY"; position:absolute; right:12px; bottom:10px; color:var(--person-deep); opacity:.52; font-size:14px; font-weight:900; letter-spacing:.12em; }
.person-blue { --person-accent:#4d8ee5; --person-soft:#e4f0ff; --person-deep:#235a9e; }
.person-cyan { --person-accent:#31a9bc; --person-soft:#dcf5f7; --person-deep:#176b78; }
.person-amber { --person-accent:#e9a92a; --person-soft:#fff0c9; --person-deep:#8d5d00; }
.person-green { --person-accent:#35a977; --person-soft:#def5e9; --person-deep:#176a4c; }
.person-pink { --person-accent:#d45f91; --person-soft:#fbe3ed; --person-deep:#8e315a; }
.person-purple { --person-accent:#8550b7; --person-soft:#eee4f7; --person-deep:#54267c; }
.calendar-shift { position: relative; min-height: 56px; padding: 9px 8px 9px 10px; gap: 9px; border: 1px solid transparent; border-radius: 13px; box-shadow: 0 4px 12px rgba(48,30,59,.045); overflow: visible; }
.calendar-shift.main { color: #4d2373; background: linear-gradient(135deg, #eee5f7, #f9f4fc); border-color: #e1d2ed; }
.calendar-shift.noon { color: #835600; background: linear-gradient(135deg, #fff0c7, #fff8e6); border-color: #f5df9f; }
.calendar-shift.rotation { color: var(--person-deep); background: linear-gradient(135deg, var(--person-soft), #fff); border-color: color-mix(in srgb,var(--person-accent) 24%,white); }
.shift-glyph { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.72); box-shadow: 0 4px 10px rgba(54,32,65,.08); }
.shift-glyph svg { width: 16px; height: 16px; }
.calendar-shift-copy { flex: 1; min-width: 0; }
.calendar-shift-copy strong, .calendar-shift-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-shift-copy strong { font-size: 15px; }
.calendar-shift-copy small { margin-top: 2px; color: currentColor; opacity: .82; font-size: 14px !important; }
.calendar-avatar, .mini-avatar { flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; font-weight: 900; box-shadow: 0 4px 12px rgba(43,24,53,.12); }
.calendar-avatar { width: 36px; height: 36px; font-size: 14px; }

.calendar-cell.weekend, .calendar-cell.holiday { background: linear-gradient(145deg, #faf8fb, #f5f1f7); }
.holiday-copy { height: 190px; gap: 12px; align-content: center; }
.holiday-copy b, .holiday-copy small { display:block; }.holiday-copy b { color:#493e50; font-size:16px; }.holiday-copy small { margin-top:4px; color:#625969; }
.weekend-art { position: relative; width: 74px; height: 52px; margin: 0 auto 8px; }
.weekend-sun { position:absolute; width:38px; height:38px; right:4px; top:0; border-radius:50%; background:linear-gradient(145deg,#ffd365,#f5a936); box-shadow:0 8px 22px rgba(244,178,58,.24); }
.weekend-cloud { position:absolute; width:58px; height:24px; left:2px; bottom:1px; border-radius:99px; background:linear-gradient(180deg,#fff,#e9e3ec); box-shadow:0 8px 20px rgba(62,42,72,.12); }
.weekend-cloud:before,.weekend-cloud:after{content:"";position:absolute;bottom:7px;border-radius:50%;background:#fff}.weekend-cloud:before{width:27px;height:27px;left:9px}.weekend-cloud:after{width:20px;height:20px;left:30px}
.holiday-art { position:relative; width:78px; height:65px; margin:0 auto 7px; display:grid; place-items:center; color:#fff; }
.holiday-art:before { content:""; position:absolute; inset:6px; rotate:8deg; border-radius:21px; background:linear-gradient(145deg,#df70a0,#7c45aa); box-shadow:0 12px 27px rgba(128,62,145,.25); }
.holiday-art span { position:relative; z-index:2; font-size:30px; text-shadow:0 0 18px #fff; }
.holiday-art i { position:absolute; width:6px; height:6px; border-radius:50%; background:#ffd56e; }.holiday-art i:nth-child(1){left:3px;top:8px}.holiday-art i:nth-child(2){right:0;bottom:11px}.holiday-art i:nth-child(3){right:12px;top:0;background:#71d6ae}

.week-day { --week-accent:#8150b3; --week-soft:#f0e8f7; position:relative; overflow:hidden; background:linear-gradient(165deg,#fff 62%,var(--week-soft)); }
.week-day:before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--week-accent); opacity:.65; }
.week-day.accent-blue{--week-accent:#4d8ee5;--week-soft:#e8f2ff}.week-day.accent-cyan{--week-accent:#31a9bc;--week-soft:#e5f8f9}.week-day.accent-amber{--week-accent:#e8a729;--week-soft:#fff4d8}.week-day.accent-green{--week-accent:#35a977;--week-soft:#e7f7ef}.week-day.accent-pink{--week-accent:#d45f91;--week-soft:#fbe9f0}.week-day.accent-purple{--week-accent:#8550b7;--week-soft:#f0e8f7}
.week-day.today { background:linear-gradient(160deg,#f5eafb,#fff6d9); box-shadow:inset 0 0 0 2px #7a43a9; }
.week-panel .header-actions button:disabled { opacity:.38; cursor:not-allowed; box-shadow:none; }
.week-day-empty { display:flex; flex-direction:column; background:linear-gradient(165deg,#fff,#f8f6f9); }
.week-day-empty:before { background:#c8c0cc; }
.week-empty-copy { flex:1; display:grid; place-items:center; align-content:center; gap:7px; padding:14px; color:#746d79; text-align:center; }
.week-empty-copy > span { width:38px; height:38px; display:grid; place-items:center; border-radius:13px; background:#f0edf2; color:#817987; font-size:18px; font-weight:800; }
.week-empty-copy b { color:#4a444e; font-size:13px; line-height:1.4; }
.week-empty-copy small { color:#746d79; font-size:11px; }
.week-day-holiday { background:linear-gradient(165deg,#fff9fb,#fff2f5); }
.week-day-holiday:before { background:#d45f91; }
.week-day-holiday .week-empty-copy > span { background:#f8dce8; color:#b54172; }
.mini-shift { align-items:center; background:rgba(255,255,255,.76); border:1px solid rgba(97,72,110,.09); box-shadow:0 5px 14px rgba(64,38,76,.045); }
.mini-shift i { background:var(--week-accent); }
.mini-shift.noon i { background:#efae2d; }
.mini-shift > span:last-child { min-width:0; }
.mini-shift strong,.mini-shift small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mini-shift strong{font-size:15px}.mini-shift small{margin-top:2px;font-size:14px!important;color:#403a45}
.mini-avatar { width:36px; height:36px; font-size:14px; }

/* Duty names must be readable in full; initials are only a visual aid. */
.calendar-cell { min-height: 318px; }
.calendar-shift { min-height: 84px; align-items: flex-start; padding: 10px 9px; gap: 8px; overflow: visible; }
.calendar-shift-copy { padding-top: 1px; }
.calendar-shift-copy .duty-names,
.mini-shift .duty-names { display: grid; gap: 1px; min-width: 0; }
.calendar-shift-copy .duty-names strong,
.mini-shift .duty-names strong {
  display: block;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.28;
}
.calendar-shift-copy .duty-names strong { font-size: 15px; }
.duty-names .secondary-name { color: currentColor; font-weight: 800; }
.duty-names .secondary-name > span { display: inline; margin-right: 2px; opacity: .62; font-size: 13px; }
.calendar-shift-copy small { display: block; margin-top: 5px; overflow: visible; white-space: nowrap; text-overflow: clip; font-size: 12px !important; }
.calendar-avatar,.shift-glyph { margin-top: 2px; }
.mini-shift { min-height: 72px; align-items: flex-start; white-space: normal; overflow: visible; }
.mini-shift .duty-names strong { font-size: 14px; }
.mini-shift small { margin-top: 4px; overflow: visible; white-space: normal; text-overflow: clip; }
.people-stack b { overflow: visible; white-space: normal; text-overflow: clip; line-height: 1.4; }

/* Schedule focus mode: the complete month is the first thing users see. */
@media (min-width: 821px) {
  body.schedule-focus { overflow: hidden; }
  body.schedule-focus .sidebar {
    width: 252px;
    transform: translateX(-105%);
    transition: transform .24s ease, box-shadow .24s ease;
  }
  body.schedule-focus .sidebar.open {
    transform: none;
    box-shadow: 20px 0 55px rgba(31,17,40,.25);
  }
  body.schedule-focus .main-area { margin-left: 0; height: 100dvh; overflow: hidden; }
  body.schedule-focus .mobile-menu { display: grid; }
  body.schedule-focus .content {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 78px);
    padding: 10px 14px 12px;
    overflow: hidden;
  }
  body.schedule-focus #view-schedule.active {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
    animation: none;
  }
  body.schedule-focus .schedule-hero,
  body.schedule-focus .schedule-bottom-grid { display: none; }
  body.schedule-focus .schedule-toolbar {
    min-height: 58px;
    padding: 7px 12px;
    border-radius: 16px;
  }
  body.schedule-focus .month-nav { gap: 6px; }
  body.schedule-focus .month-nav h2 { font-size: 20px; }
  body.schedule-focus .toolbar-actions { gap: 6px; }
  body.schedule-focus .toolbar-actions .segmented { display: none; }
  body.schedule-focus .toolbar-actions .button { height: 38px; padding-inline: 12px; }
  body.schedule-focus .schedule-density-button.active {
    color: var(--purple-700);
    background: var(--purple-100);
    border-color: #d7c3e8;
  }
  body.schedule-focus .schedule-meta {
    min-height: 26px;
    padding: 0 4px;
  }
  body.schedule-focus .legend { gap: 10px; font-size: 10px; }
  body.schedule-focus .legend-hint { display: none; }
  body.schedule-focus .coverage-chip { padding: 5px 8px; font-size: 9px; }
  body.schedule-focus .calendar-panel {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
  }
  body.schedule-focus .calendar-head,
  body.schedule-focus .calendar-grid { min-width: 0 !important; width: 100%; }
  body.schedule-focus .calendar-head { flex: 0 0 34px; }
  body.schedule-focus .calendar-head span { display: grid; place-items: center; padding: 4px; font-size: 11px; }
  body.schedule-focus .calendar-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: repeat(var(--calendar-weeks, 6), minmax(0, 1fr));
  }
  body.schedule-focus .calendar-cell {
    min-height: 0 !important;
    padding: 3px 5px;
    overflow: hidden;
    transform: none !important;
  }
  body.schedule-focus .calendar-cell:hover { transform: none; }
  body.schedule-focus .date-number { min-height: 17px; margin-bottom: 0; }
  body.schedule-focus .date-number b { font-size: 13px; }
  body.schedule-focus .date-number .today-label { padding: 2px 5px; font-size: 9px; }
  body.schedule-focus .calendar-shift {
    min-height: 0;
    margin-top: 2px;
    padding: 3px 5px;
    gap: 0;
    align-items: center;
    border-radius: 7px;
    overflow: hidden;
  }
  body.schedule-focus .calendar-shift-copy { width: 100%; min-width: 0; padding: 0; }
  body.schedule-focus .calendar-shift-copy .duty-names {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 4px;
    line-height: 1.12;
  }
  body.schedule-focus .calendar-shift-copy .duty-names strong {
    display: inline;
    font-size: clamp(10px, .82vw, 13px);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }
  body.schedule-focus .duty-names .secondary-name > span { font-size: .88em; }
  body.schedule-focus .calendar-shift-copy small,
  body.schedule-focus .calendar-avatar,
  body.schedule-focus .shift-glyph { display: none; }
  body.schedule-focus .holiday-copy {
    height: calc(100% - 19px);
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 3px;
  }
  body.schedule-focus .holiday-copy b { display: block; color: #5f5665; font-size: 12px; }
  body.schedule-focus .holiday-copy small { display: block; margin-top: 2px; color: #766f7d; font-size: 10px; }
  body.schedule-focus .holiday-art,
  body.schedule-focus .weekend-art { display: none; }
  body.schedule-focus .calendar-cell.today:after { display: none; }
  body.schedule-focus .calendar-cell.editing:after { right: 4px; bottom: 2px; font-size: 8px; }
}

@media (min-width: 821px) and (max-height: 760px) {
  body.schedule-focus .topbar { height: 64px; }
  body.schedule-focus .content { height: calc(100dvh - 64px); padding: 7px 10px 9px; }
  body.schedule-focus #view-schedule.active { gap: 5px; }
  body.schedule-focus .schedule-toolbar { min-height: 50px; padding-block: 5px; }
  body.schedule-focus .schedule-toolbar .panel-kicker { display: none; }
  body.schedule-focus .schedule-meta { display: none; }
  body.schedule-focus #view-schedule.active { grid-template-rows: auto minmax(0, 1fr); }
  body.schedule-focus .calendar-head { flex-basis: 29px; }
  body.schedule-focus .calendar-shift { padding-block: 2px; }
}

@media (max-width: 1180px) {
  .calendar-head,.calendar-grid { min-width: 1560px; }
}

@media (max-width: 980px) {
  .schedule-hero { grid-template-columns: 1fr; min-height: 550px; padding: 34px; }
  .schedule-hero-copy { max-width: none; }
  .schedule-hero-visual { min-height: 245px; margin-top: 16px; }
  .floating-card-top { right: 4%; }.floating-card-bottom { left: 4%; }
}
@media (max-width: 560px) {
  .schedule-hero { min-height: 590px; padding: 27px 22px; border-radius: 23px; }
  .schedule-hero h2 { font-size: 40px; }
  .hero-pills { gap: 7px; }.hero-pills > span { font-size: 14px; }
  .orbit-one { width:230px;height:230px }.orbit-two{width:170px;height:170px}.month-orb{width:142px;height:142px}
  .floating-card { scale: .88; }.floating-card-top{right:-6%}.floating-card-bottom{left:-8%}
}

@media (prefers-reduced-motion: reduce) {
  .orbit, .floating-card, .sparkle { animation: none; }
  .calendar-cell { transition: none; }
}

@media print {
  .schedule-hero { display:none; }
  .calendar-cell { transform:none!important; background:#fff; }
  .calendar-shift-copy small,.mini-shift small{font-size:7px!important}
  .calendar-avatar,.shift-glyph{display:none}
}

/* Dedicated document layout — intentionally separate from the application UI. */
.print-sheet { display: none; }

@media print {
  @page { size: A4 landscape; margin: 7mm; }

  html,
  body {
    width: 100%;
    min-width: 0 !important;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #241d29;
    background: #fff !important;
    font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > * { display: none !important; }
  body > .print-sheet {
    width: 283mm;
    height: 196mm;
    margin: 0 auto;
    padding: 0;
    display: grid !important;
    grid-template-rows: 23mm 14mm 1fr 17mm;
    gap: 2mm;
    overflow: hidden;
    box-sizing: border-box;
    page-break-inside: avoid;
    break-inside: avoid-page;
    page-break-after: avoid;
  }

  .print-sheet,
  .print-sheet * { box-sizing: border-box; }

  .print-header {
    position: relative;
    padding: 3.2mm 4mm;
    display: grid;
    grid-template-columns: 15mm 1fr 31mm;
    align-items: center;
    gap: 3mm;
    overflow: hidden;
    color: #fff;
    border-radius: 4mm;
    background:
      radial-gradient(circle at 84% 10%, rgba(255, 216, 111, .34), transparent 24%),
      linear-gradient(112deg, #35164e 0%, #612d8a 58%, #7941a5 100%);
  }
  .print-header::after {
    content: "";
    position: absolute;
    right: 42mm;
    top: -20mm;
    width: 48mm;
    height: 48mm;
    border: .4mm solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 8mm rgba(255,255,255,.035), 0 0 0 16mm rgba(255,255,255,.02);
  }
  .print-brand-mark {
    position: relative;
    z-index: 1;
    width: 13mm;
    height: 13mm;
    display: grid;
    place-items: center;
    border: .35mm solid rgba(255,255,255,.32);
    border-radius: 4mm;
    background: rgba(255,255,255,.14);
  }
  .print-brand-mark svg { width: 8mm; height: 8mm; fill: #ffda70; }
  .print-heading { position: relative; z-index: 1; min-width: 0; }
  .print-heading span {
    display: block;
    color: #ffdf86;
    font-size: 7pt;
    font-weight: 800;
    letter-spacing: .02em;
  }
  .print-heading h1 {
    margin: .4mm 0 0;
    color: #fff;
    font-size: 17pt;
    line-height: 1.1;
    letter-spacing: -.02em;
  }
  .print-heading p {
    margin: .5mm 0 0;
    color: rgba(255,255,255,.86);
    font-size: 7.5pt !important;
    line-height: 1;
  }
  .print-month-badge {
    position: relative;
    z-index: 1;
    height: 16mm;
    padding: 2mm 3mm;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: 1.5mm;
    border: .35mm solid rgba(255,255,255,.28);
    border-radius: 3mm;
    background: rgba(255,255,255,.13);
  }
  .print-month-badge span { color: #ffdf86; font-size: 7pt; font-weight: 900; letter-spacing: .12em; }
  .print-month-badge strong { color: #fff; font-size: 15pt; line-height: 1; }
  .print-month-badge small {
    grid-column: 1 / -1;
    margin-top: .8mm;
    color: #dff7eb;
    font-size: 6.5pt !important;
    font-weight: 800;
  }

  .print-summary {
    padding: 1.5mm 2.2mm;
    display: grid;
    grid-template-columns: 40mm 47mm 44mm 1fr;
    align-items: stretch;
    gap: 2mm;
    border: .25mm solid #e5ddea;
    border-radius: 3mm;
    background: linear-gradient(90deg, #fbf7ff, #fffaf0 66%, #f1fbf7);
  }
  .print-summary > div { display: flex; align-items: center; gap: 2mm; min-width: 0; }
  .print-summary-icon {
    flex: 0 0 auto;
    width: 8mm;
    height: 8mm;
    display: grid;
    place-items: center;
    border-radius: 2.4mm;
    font-size: 8pt;
    font-weight: 900;
  }
  .print-summary-icon.purple { color: #653291; background: #eee4f7; }
  .print-summary-icon.gold { color: #996500; background: #fff0c8; }
  .print-summary-icon.green { color: #137651; background: #ddf5e9; }
  .print-summary p { margin: 0; line-height: 1.08; }
  .print-summary b { display: block; color: #2c2431; font-size: 7pt; }
  .print-summary small { display: block; margin-top: .6mm; color: #5a515f; font-size: 6.1pt !important; }
  .print-summary-note {
    padding-left: 3mm;
    border-left: .35mm solid #d8ccdf;
  }
  .print-summary-note b { flex: 0 0 auto; color: #653291; }
  .print-summary-note span { color: #4a414f; font-size: 6.4pt; line-height: 1.25; }

  .print-calendar {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 7mm repeat(5, minmax(0, 1fr));
    gap: .8mm;
    overflow: hidden;
    border-radius: 3mm;
    background: #e1d8e5;
  }
  .print-day-head {
    display: grid;
    place-items: center;
    color: #fff;
    background: #542676;
    font-size: 7.4pt;
    font-weight: 900;
  }
  .print-day-head:nth-child(2) { background: #69318e; }
  .print-day-head:nth-child(3) { background: #78419b; }
  .print-day-head:nth-child(4) { background: #8a529e; }
  .print-day-head:nth-child(5) { background: #9560a3; }
  .print-day-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 1mm 1.2mm;
    display: grid;
    grid-template-rows: 4.2mm repeat(3, minmax(0, 1fr));
    gap: .55mm;
    overflow: hidden;
    background: #fff;
  }
  .print-day-cell::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: .8mm;
    background: #7a43a8;
  }
  .print-date {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1mm;
    padding-left: .7mm;
    line-height: 1;
  }
  .print-date b { color: #2e2434; font-size: 8.5pt; }
  .print-date span { color: #655b6a; font-size: 5.8pt; font-weight: 700; }
  .print-date em {
    margin-left: auto;
    padding: .6mm 1.4mm;
    color: #fff;
    border-radius: 99px;
    background: #7440a2;
    font-size: 5.4pt;
    font-style: normal;
    font-weight: 900;
  }
  .print-shift {
    min-width: 0;
    min-height: 0;
    padding: .55mm 1mm;
    display: grid;
    grid-template-columns: 1.4mm minmax(0, 1fr);
    align-items: center;
    gap: 1mm;
    overflow: hidden;
    border-radius: 1.5mm;
  }
  .print-shift i { width: 1.1mm; height: 65%; border-radius: 99px; }
  .print-shift div { min-width: 0; }
  .print-shift span,
  .print-shift b {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.1;
  }
  .print-shift span { color: #5a505f; font-size: 5.2pt; font-weight: 700; }
  .print-shift b { margin-top: .35mm; color: #2b2330; font-size: 6.3pt; font-weight: 800; }
  .print-morning { background: #f0e7f8; }
  .print-morning i { background: #7440a2; }
  .print-noon { background: #fff1cc; }
  .print-noon i { background: #e6a51d; }
  .print-afternoon { background: #dff5eb; }
  .print-afternoon i { background: #2e9d70; }
  .print-today { background: linear-gradient(145deg, #fff, #faf2ff); box-shadow: inset 0 0 0 .65mm #7440a2; }
  .print-today::before { display: none; }
  .print-holiday {
    padding: 2mm;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    place-items: center;
    text-align: center;
    background: linear-gradient(145deg, #fbf7fd, #fff7e7);
  }
  .print-holiday::before { background: #d26796; }
  .print-holiday .print-date { width: 100%; place-self: start; }
  .print-holiday-art {
    width: 8mm;
    height: 8mm;
    display: grid;
    place-items: center;
    align-self: center;
    color: #fff;
    border-radius: 2.5mm;
    background: linear-gradient(145deg, #d96f9d, #7841a1);
    font-size: 12pt;
  }
  .print-holiday strong { color: #5b2d7d; font-size: 6.6pt; line-height: 1; }
  .print-holiday small { color: #665b6b; font-size: 5.6pt !important; line-height: 1; }
  .print-empty { background: repeating-linear-gradient(135deg, #faf8fb, #faf8fb 2mm, #f7f4f8 2mm, #f7f4f8 4mm); }
  .print-empty::before { display: none; }

  .print-footer {
    padding: 2mm 2.5mm 0;
    display: grid;
    grid-template-columns: 1.15fr 1fr 31mm;
    align-items: start;
    gap: 4mm;
    border-top: .35mm solid #d9d0de;
  }
  .print-legend { display: flex; flex-wrap: wrap; align-content: start; gap: 1.6mm 3mm; padding-top: .8mm; }
  .print-legend span { display: flex; align-items: center; gap: 1mm; color: #463c4b; font-size: 5.8pt; font-weight: 700; }
  .print-dot { width: 2.2mm; height: 2.2mm; border-radius: .7mm; }
  .print-dot.morning { background: #7440a2; }
  .print-dot.noon { background: #e6a51d; }
  .print-dot.afternoon { background: #2e9d70; }
  .print-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
  .print-signatures div { text-align: center; }
  .print-signatures span { display: block; height: 6mm; border-bottom: .3mm solid #8e8493; }
  .print-signatures b { display: block; margin-top: 1mm; color: #4c424f; font-size: 5.7pt; }
  .print-generated { padding-top: .7mm; color: #5d2f82; text-align: right; font-size: 6.4pt; font-weight: 900; line-height: 1.35; }
  .print-generated span { color: #6d636f; font-size: 5.5pt; font-weight: 600; }
}

/* Production runtime: authentication, connectivity and installable-app states. */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100dvh;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(430px, 1.1fr);
  align-items: center;
  gap: clamp(35px, 8vw, 120px);
  overflow: auto;
  color: #fff;
  background:
    radial-gradient(circle at 15% 80%, rgba(255, 214, 105, .22), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(144, 90, 187, .38), transparent 32%),
    linear-gradient(130deg, #251134, #4d216e 54%, #6a3291);
}
.auth-gate[hidden] { display: none !important; }
.auth-visual { position: relative; display: grid; justify-items: center; text-align: center; }
.auth-visual::before,
.auth-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.auth-visual::before { width: 330px; height: 330px; top: 50%; left: 50%; translate: -50% -50%; }
.auth-visual::after { width: 430px; height: 430px; top: 50%; left: 50%; translate: -50% -50%; box-shadow: 0 0 0 55px rgba(255,255,255,.025); }
.auth-visual span { position: relative; z-index: 1; width: 126px; height: 126px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 36px; color: #ffd86d; background: rgba(255,255,255,.11); font-size: 58px; box-shadow: 0 28px 70px rgba(18,6,26,.28); }
.auth-visual strong { position: relative; z-index: 1; margin-top: 27px; font-size: 46px; letter-spacing: -.04em; }
.auth-visual small { position: relative; z-index: 1; color: rgba(255,255,255,.72); font-size: 16px !important; letter-spacing: .12em; text-transform: uppercase; }
.auth-card { width: min(520px, 100%); padding: clamp(30px, 4.2vw, 54px); color: #2d2632; border: 1px solid rgba(255,255,255,.58); border-radius: 30px; background: rgba(255,255,255,.96); box-shadow: 0 35px 90px rgba(25,8,36,.3); }
.auth-kicker { color: #70409c; font-size: 14px; font-weight: 900; letter-spacing: .06em; }
.auth-card h1 { margin: 11px 0 9px; font-size: clamp(30px, 3vw, 42px); line-height: 1.18; letter-spacing: -.035em; }
.auth-card > p { margin: 0 0 25px; color: #514957; font-size: 16px !important; }
.auth-card .field { margin-top: 16px; }
.auth-card input { width: 100%; height: 51px; padding: 0 15px; color: #2d2632; border: 1px solid #cec4d3; border-radius: 13px; background: #fff; outline: none; }
.auth-card input:focus { border-color: #7843a5; box-shadow: 0 0 0 4px rgba(120,67,165,.12); }
.auth-submit { width: 100%; height: 52px; margin-top: 22px; justify-content: center; }
.auth-card > small { display: block; margin-top: 15px; color: #635a68; text-align: center; font-size: 13px !important; }
.auth-error { margin-top: 14px; padding: 11px 13px; color: #9a2e39; border: 1px solid #f2c5ca; border-radius: 11px; background: #fff0f1; font-size: 14px; }
.runtime-status { position: fixed; right: 23px; bottom: 22px; z-index: 990; min-height: 42px; padding: 9px 14px; display: flex; align-items: center; gap: 9px; color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 99px; background: #34253d; box-shadow: 0 13px 35px rgba(29,16,35,.23); font-size: 13px; font-weight: 800; }
.runtime-status[hidden] { display: none; }
.runtime-status i { width: 9px; height: 9px; border-radius: 50%; background: #ffd46d; box-shadow: 0 0 0 5px rgba(255,212,109,.13); }
.runtime-status.online i { background: #65d8a7; box-shadow: 0 0 0 5px rgba(101,216,167,.14); }
.runtime-status.offline i { background: #ee7c79; box-shadow: 0 0 0 5px rgba(238,124,121,.14); }
.production-request-field:not([hidden]) { display: grid; }
body.production-loading .app-shell { pointer-events: none; filter: saturate(.65); }
body.production-staff [data-action="generate"],
body.production-staff [data-action="edit-mode"],
body.production-staff [data-action="add-person"],
body.production-staff [data-action="rules"],
body.production-staff [data-action="holiday"] { display: none !important; }
body.production-staff [data-action="publish-roster"] { display: none !important; }
body.production-staff [data-view="settings"],
body.production-staff [data-view-link="settings"] { display: none !important; }

.notifications-disabled .check-row { opacity: .5; cursor: not-allowed; }
.notifications-disabled .check-row input { cursor: not-allowed; }

/* Holiday calendar management */
.holiday-count-badge { margin-left:auto; padding:7px 11px; border-radius:999px; background:#e7f7f0; color:#08785d; font-size:12px; font-weight:800; white-space:nowrap; }
.holiday-loading { padding:18px 0; border-top:1px solid var(--line); color:#5b5460; font-size:14px; }
#holidaySummaryList .holiday-row { min-height:66px; }
#holidaySummaryList .holiday-row > div b { font-size:14px; line-height:1.35; }
#holidaySummaryList .holiday-row > div small { color:#4f4855; font-size:12px; }
.holiday-date { flex:0 0 48px; width:48px; height:52px; font-size:17px; }
.holiday-date small { font-size:10px; }
.holiday-modal-card { width:min(1120px, calc(100vw - 40px)); max-height:calc(100vh - 44px); overflow:hidden; }
.holiday-modal-head { padding:24px 26px 20px; }
.holiday-modal-head h2 { margin:4px 0 5px; font-size:27px; }
.holiday-modal-head p { margin:0; color:#4f4855; font-size:14px; }
.holiday-manager-layout { display:grid; grid-template-columns:330px minmax(0,1fr); min-height:540px; border-top:1px solid var(--line); }
.holiday-editor { padding:24px; background:#fbf9fc; border-right:1px solid var(--line); }
.holiday-editor-title { display:flex; align-items:center; gap:12px; margin-bottom:20px; color:#64319a; }
.holiday-editor-title > span { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:#eee4f7; }
.holiday-editor-title b,.holiday-editor-title small { display:block; }
.holiday-editor-title b { color:#26212a; font-size:17px; }
.holiday-editor-title small { margin-top:3px; color:#5f5865; font-size:12px; line-height:1.45; }
.holiday-editor .field { margin-bottom:15px; }
.holiday-editor .field > span { font-size:13px; }
.holiday-editor .field input,.holiday-editor .field select { min-height:45px; font-size:14px; }
.holiday-working-check { color:#39333e; font-size:13px; line-height:1.45; }
.holiday-editor-actions { display:flex; gap:9px; margin-top:18px; }
.holiday-editor-actions .button { flex:1; }
.holiday-list-panel { min-width:0; padding:22px 24px; overflow:hidden; }
.holiday-list-head { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:14px; }
.holiday-list-head h3 { margin:4px 0 0; font-size:20px; }
.official-source-chip { display:flex; align-items:center; gap:6px; padding:8px 11px; border-radius:999px; background:#e6f7f0; color:#08785d; font-size:12px; font-weight:800; }
.official-source-chip > span { width:15px; }
.holiday-manager-list { max-height:470px; overflow:auto; padding-right:5px; }
.holiday-manager-item { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:center; gap:13px; padding:13px 0; border-top:1px solid var(--line); }
.holiday-manager-date { width:54px; height:54px; display:grid; place-items:center; border-radius:14px; background:linear-gradient(145deg,#fff0ef,#ffe1df); color:#bd3e45; font-size:18px; font-weight:900; line-height:1; }
.holiday-manager-date small { font-size:10px; }
.holiday-manager-copy { min-width:0; }
.holiday-manager-copy b { display:block; overflow:hidden; color:#26212a; font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.holiday-manager-copy small { display:flex; align-items:center; gap:6px; margin-top:6px; color:#56505b; font-size:12px; }
.holiday-type-pill { display:inline-flex; padding:4px 7px; border-radius:999px; background:#f0e8f7; color:#623193; font-size:10px; font-weight:800; }
.holiday-type-pill.working { background:#e6f6ee; color:#08785d; }
.holiday-source-link { color:#613096; text-decoration:none; }
.holiday-manager-actions { display:flex; gap:7px; }
.holiday-manager-actions button { min-width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:11px; background:#fff; color:#4d4652; cursor:pointer; }
.holiday-manager-actions button:hover { border-color:#a98abb; color:#5b2d8b; }
.holiday-manager-actions .holiday-delete:hover { border-color:#e9a3a7; color:#bd3e45; }
.holiday-empty { padding:42px 20px; color:#5c5561; text-align:center; font-size:14px; }

@media (max-width: 820px) {
  .holiday-modal-card { width:min(96vw,620px); max-height:92vh; overflow:auto; }
  .holiday-manager-layout { grid-template-columns:1fr; }
  .holiday-editor { border-right:0; border-bottom:1px solid var(--line); }
  .holiday-manager-list { max-height:none; }
  .holiday-manager-item { grid-template-columns:52px minmax(0,1fr); }
  .holiday-manager-actions { grid-column:2; }
}

@media (max-width: 850px) {
  .auth-gate { grid-template-columns: 1fr; padding: 22px; }
  .auth-visual { display: none; }
  .auth-card { margin: auto; }
}

/* Nong Prakai: a friendly visual companion that keeps the operational UI readable. */
.welcome-side { display: flex; align-items: flex-end; gap: 12px; }
.welcome-companion {
  position: relative;
  width: 138px;
  height: 104px;
  flex: 0 0 138px;
  overflow: visible;
}
.welcome-companion img {
  position: absolute;
  right: 2px;
  bottom: -4px;
  width: 84px;
  height: 98px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(65, 33, 87, .18));
  animation: mascot-bob 4.4s ease-in-out infinite;
}
.mascot-bubble {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 5px;
  max-width: 91px;
  padding: 8px 10px;
  color: #57277f;
  border: 1px solid #e4d6ef;
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(145deg, #fff, #fbf5ff);
  box-shadow: 0 9px 24px rgba(77, 38, 100, .11);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}
.mascot-bubble::after { content: ""; position: absolute; right: -6px; bottom: 6px; width: 11px; height: 11px; rotate: 45deg; border-top: 1px solid #e4d6ef; border-right: 1px solid #e4d6ef; background: #fff; }
.welcome-companion i { position: absolute; color: #e5a51e; font-style: normal; text-shadow: 0 0 13px rgba(237, 176, 48, .55); animation: mascot-spark 2.2s ease-in-out infinite; }
.welcome-companion i:nth-of-type(1) { right: 2px; top: 1px; font-size: 17px; }
.welcome-companion i:nth-of-type(2) { left: 16px; bottom: 4px; color: #66cfa7; font-size: 8px; animation-delay: -.8s; }

.hero-mascot {
  position: absolute;
  z-index: 3;
  right: -2%;
  bottom: -38px;
  width: 184px;
  max-height: 258px;
  object-fit: contain;
  filter: drop-shadow(0 24px 30px rgba(22, 7, 34, .32));
  animation: mascot-bob 4.4s ease-in-out infinite;
}
.schedule-hero-visual .orbit,
.schedule-hero-visual .month-orb { left: 39%; }
.schedule-hero-visual .floating-card-top { right: 24%; }

.schedule-toolbar { gap: 12px; }
.schedule-buddy {
  position: relative;
  height: 48px;
  margin-left: auto;
  padding: 0 13px 0 52px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: #5d2c87;
  border: 1px solid #eadff1;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8db, #fbf4ff);
  box-shadow: 0 8px 20px rgba(69, 35, 87, .07);
  font-size: 13px;
  font-weight: 900;
}
.schedule-buddy img { position: absolute; left: 4px; bottom: 0; width: 45px; height: 55px; object-fit: contain; filter: drop-shadow(0 7px 9px rgba(65, 33, 87, .16)); }
.schedule-buddy b { margin-left: 4px; color: #e3a11f; font-size: 17px; }

.empty-mascot { position: relative; z-index: 3; width: 220px; max-height: 280px; object-fit: contain; filter: drop-shadow(0 25px 28px rgba(67, 32, 91, .22)); animation: mascot-bob 4.4s ease-in-out infinite; }
.empty-roster-art .empty-calendar-icon { position: absolute; z-index: 2; right: 8%; bottom: 6%; width: 74px; height: 74px; border-radius: 22px; rotate: 8deg; }
.empty-roster-art .empty-calendar-icon svg { width: 34px; height: 34px; }
.empty-roster-art .empty-calendar-icon b { right: -11px; bottom: -10px; width: 36px; height: 36px; border-width: 4px; font-size: 20px; }

@keyframes mascot-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes mascot-spark { 50% { opacity: .35; transform: scale(.72) rotate(18deg); } }

@media (max-width: 1280px) {
  .welcome-companion { width: 96px; flex-basis: 96px; }
  .mascot-bubble { display: none; }
  .schedule-buddy span { display: none; }
  .schedule-buddy { width: 50px; padding: 0; }
  .hero-mascot { right: -6%; width: 168px; }
}
@media (max-width: 980px) {
  .schedule-hero-visual .orbit,
  .schedule-hero-visual .month-orb { left: 42%; }
  .schedule-hero-visual .floating-card-top { right: 18%; }
  .hero-mascot { right: 2%; width: 175px; }
}
@media (max-width: 820px) {
  .welcome-side { width: 100%; margin-top: 13px; }
  .welcome-companion { width: 94px; height: 86px; flex-basis: 94px; }
  .welcome-companion img { width: 76px; height: 88px; }
  .welcome-side .published-pill { flex: 1; margin-top: 0; }
  .schedule-buddy { display: none; }
}
@media (max-width: 560px) {
  .welcome-side { align-items: center; gap: 7px; }
  .welcome-companion { width: 66px; height: 70px; flex-basis: 66px; }
  .welcome-companion img { width: 62px; height: 72px; }
  .welcome-companion i { display: none; }
  .hero-mascot { right: -7%; bottom: -26px; width: 142px; }
  .schedule-hero-visual .floating-card-top { right: 12%; }
  .empty-mascot { width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-companion img, .hero-mascot, .empty-mascot, .welcome-companion i { animation: none; }
}
@media print {
  .welcome-companion, .hero-mascot, .schedule-buddy, .empty-mascot { display: none !important; }
}
