:root {
  --blue: #0879cf;
  --blue-dark: #145ca8;
  --blue-pale: #eef8ff;
  --ink: #18334f;
  --muted: #607b93;
  --line: #d7e6f2;
  --card: #ffffff;
  --bg: #f7fbfe;
  --green: #27ae60;
  --green-pale: #eefaf3;
  --amber: #b87800;
  --amber-pale: #fff7e5;
  --red: #bd3a3a;
  --red-pale: #fff2f2;
  --shadow: 0 8px 24px rgba(24, 51, 79, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { overflow-x: hidden; }
button { font: inherit; }
.shell { min-height: 100vh; padding: clamp(22px, 2.2vw, 44px); padding-bottom: 76px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; border-bottom: 2px solid var(--line); padding-bottom: 20px; }
.eyebrow, .live-label { letter-spacing: .19em; font-weight: 800; font-size: clamp(14px, 1vw, 20px); color: var(--blue); }
h1 { margin: 5px 0 4px; font-size: clamp(34px, 3vw, 60px); line-height: 1.04; color: var(--blue-dark); }
.date-line { color: var(--muted); font-size: clamp(18px, 1.5vw, 28px); font-weight: 650; }
.live-clock-wrap { text-align: right; flex: 0 0 auto; }
.clock { margin-top: 3px; font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(44px, 4vw, 78px); line-height: 1; color: var(--blue); letter-spacing: .02em; }
.staff-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.3vw, 24px); margin: 22px 0 18px; }
.summary-card { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: clamp(18px, 1.5vw, 28px); min-height: 132px; box-shadow: var(--shadow); }
.summary-label { font-size: clamp(15px, 1.05vw, 21px); font-weight: 850; letter-spacing: .09em; color: var(--muted); }
.summary-value { margin-top: 8px; font-size: clamp(25px, 2vw, 39px); line-height: 1.08; font-weight: 800; color: var(--blue-dark); overflow-wrap: anywhere; }
.summary-sub { margin-top: 6px; font-size: clamp(17px, 1.25vw, 24px); color: var(--muted); font-weight: 600; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 18px; }
.tab { border: 2px solid var(--line); background: var(--card); color: var(--blue-dark); padding: 15px 18px; border-radius: 15px; font-size: clamp(18px, 1.35vw, 26px); font-weight: 800; cursor: pointer; transition: .15s ease; }
.tab.active { background: linear-gradient(135deg, #0a86e5, #0798e5); color: #fff; border-color: transparent; box-shadow: 0 7px 18px rgba(8, 121, 207, .22); }
.panel { display: none; }
.panel.active { display: block; }
.panel-grid.two-col { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 18px; }
.content-card { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: clamp(20px, 1.55vw, 30px); box-shadow: var(--shadow); min-height: 48vh; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid #edf3f8; }
h2 { margin: 0; font-size: clamp(27px, 2vw, 39px); line-height: 1.1; color: var(--blue-dark); }
.count-badge { min-width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--blue-pale); color: var(--blue); font-size: 22px; font-weight: 850; }
.card-list { display: grid; gap: 12px; padding-top: 14px; }
.item-card { border: 2px solid #e5eef5; border-radius: 18px; padding: 17px 19px; background: #fbfdff; }
.item-card.approaching { border-color: #f1cb75; background: var(--amber-pale); }
.item-title { font-size: clamp(22px, 1.62vw, 31px); font-weight: 850; line-height: 1.15; color: var(--ink); }
.item-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: clamp(17px, 1.18vw, 23px); color: var(--muted); font-weight: 630; }
.participant-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.participant-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 13px; border-radius: 999px; background: var(--blue-pale); color: var(--blue-dark); border: 1px solid #c7e5f8; font-size: clamp(18px, 1.25vw, 24px); font-weight: 800; }
.item-description { margin-top: 9px; font-size: clamp(17px, 1.13vw, 22px); line-height: 1.35; color: var(--muted); }
.empty { display: grid; place-items: center; min-height: 150px; border: 2px dashed var(--line); border-radius: 17px; color: var(--muted); font-weight: 700; font-size: clamp(18px, 1.3vw, 25px); padding: 24px; text-align: center; }
.week-card { min-height: 55vh; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); gap: 10px; padding-top: 16px; align-items: start; }
.day-column { border: 2px solid #e5eef5; border-radius: 17px; overflow: hidden; background: #fbfdff; min-height: 290px; }
.day-column.today { border-color: #9fd2f5; background: #f5fbff; }
.day-head { padding: 14px 13px 10px; border-bottom: 2px solid #e8f0f6; }
.day-name { font-size: clamp(18px, 1.22vw, 23px); font-weight: 850; color: var(--blue-dark); }
.day-date { font-size: clamp(15px, 1vw, 19px); color: var(--muted); margin-top: 2px; font-weight: 650; }
.day-items { padding: 10px; display: grid; gap: 10px; }
.mini-item { padding: 10px; border-radius: 13px; background: #fff; border: 1px solid #dfeaf2; }
.mini-time { font-size: clamp(14px, .9vw, 17px); font-weight: 850; color: var(--blue); }
.mini-title { margin-top: 3px; font-size: clamp(17px, 1.05vw, 21px); font-weight: 800; line-height: 1.18; }
.mini-people { margin-top: 5px; font-size: clamp(14px, .87vw, 17px); color: var(--muted); font-weight: 650; }
.appointment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 16px; }
.roster-row { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(180px, 1.25fr); gap: 16px; align-items: center; }
.roster-status { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-width: 112px; padding: 7px 12px; border-radius: 999px; font-size: clamp(15px, 1vw, 19px); font-weight: 850; letter-spacing: .04em; background: var(--green-pale); color: #24704a; border: 1px solid #a9dcc0; }
.roster-status.next { background: #f3f7fa; color: var(--muted); border-color: #d7e2eb; }
.roster-status.vacant { background: var(--red-pale); color: var(--red); border-color: #efc2c2; }
.roster-name { font-size: clamp(22px, 1.55vw, 30px); font-weight: 850; }
.roster-time { margin-top: 4px; font-size: clamp(17px, 1.15vw, 22px); color: var(--muted); font-weight: 650; }
.statusbar { position: fixed; left: 0; right: 0; bottom: 0; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px clamp(22px, 2.2vw, 44px); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); backdrop-filter: blur(8px); z-index: 50; }
.rotation-note { color: var(--muted); font-size: clamp(14px, .95vw, 18px); font-weight: 650; }
.sync-status { display: flex; align-items: center; gap: 8px; font-size: clamp(15px, 1vw, 19px); color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(39,174,96,.10); }
.sync-status.retrying .status-dot { background: #e2a300; box-shadow: 0 0 0 4px rgba(226,163,0,.12); }
@media (max-width: 1150px) {
  .week-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .appointment-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .shell { padding: 18px; padding-bottom: 72px; }
  .topbar { align-items: center; }
  .staff-strip, .panel-grid.two-col, .appointment-grid { grid-template-columns: 1fr; }
  .staff-strip { gap: 10px; }
  .summary-card { min-height: 0; }
  .tabs { grid-template-columns: repeat(2,1fr); }
  .week-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
