/* ===== Work Calendar — base styles ===== */

:root {
  /* These are overridden by tweaks */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;

  /* Neutrals */
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;
  --paper:   #ffffff;
  --canvas:  #f6f8fb;

  /* Status */
  --vac:      #2563eb;     /* vacation - blue (uses brand) */
  --vac-bg:   #eff6ff;
  --sick:     #dc2626;     /* sick - red */
  --sick-bg:  #fef2f2;
  --pers:     #9333ea;     /* personal - purple */
  --pers-bg:  #faf5ff;
  --ot:       #ea580c;     /* OT - orange */
  --ot-bg:    #fff7ed;
  --swap:     #0d9488;     /* swap - teal */
  --swap-bg:  #f0fdfa;
  --hol:      #be185d;     /* holiday - pink */
  --hol-bg:   #fdf2f8;
  --weekend:  #64748b;     /* sunday - slate */
  --weekend-bg:#f1f5f9;
  --special:  #f59e0b;     /* special off - amber */
  --special-bg:#fffbeb;

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow-md: 0 4px 12px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 20px 40px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);

  --font-th: 'IBM Plex Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Inter', 'IBM Plex Sans Thai', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-th);
  background: var(--canvas);
  color: var(--ink-800);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== Layout ===== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ───── Sidebar ───── */
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--ink-200);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--ink-100);
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-en);
  box-shadow: 0 4px 10px color-mix(in oklab, var(--brand-600) 30%, transparent);
}
.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-500);
}

.role-switch {
  margin: 14px 14px 6px;
  background: var(--ink-100);
  border-radius: 8px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.role-switch button {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-600);
  transition: all .15s;
}
.role-switch button.active {
  background: var(--paper);
  color: var(--brand-700);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.nav-section {
  padding: 14px 14px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-400);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.nav {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--ink-700);
  transition: background .12s, color .12s;
  text-align: left;
  width: 100%;
  position: relative;
}
.nav-item:hover { background: var(--ink-50); }
.nav-item.active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}
.nav-item svg {
  width: 17px; height: 17px;
  color: var(--ink-500);
  flex-shrink: 0;
}
.nav-item.active svg { color: var(--brand-600); }
.nav-badge {
  margin-left: auto;
  background: var(--brand-600);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  font-family: var(--font-en);
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--ink-100);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.user-card:hover { background: var(--ink-50); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  font-family: var(--font-en);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role { font-size: 11px; color: var(--ink-500); }

/* ───── Main ───── */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: var(--topbar-h);
  background: var(--paper);
  border-bottom: 1px solid var(--ink-200);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.crumbs {
  font-size: 13px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumbs strong {
  color: var(--ink-900);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-100);
  padding: 7px 12px;
  border-radius: 8px;
  width: 280px;
  color: var(--ink-500);
  font-size: 13px;
}
.search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: var(--ink-800);
}
.search kbd {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-500);
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-600);
  position: relative;
}
.icon-btn:hover { background: var(--ink-100); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute;
  top: 8px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sick);
  border: 2px solid var(--paper);
}

.page {
  padding: 28px;
  flex: 1;
  min-width: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all .12s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--brand-600);
  color: white;
}
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost {
  color: var(--ink-700);
  border-color: var(--ink-200);
  background: var(--paper);
}
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn-quiet { color: var(--ink-600); }
.btn-quiet:hover { background: var(--ink-100); }
.btn-danger {
  background: var(--sick);
  color: white;
}
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===== Cards ===== */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}
.card-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.card-body { padding: 16px 18px; }

/* ===== Badges / chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--ink-100);
  color: var(--ink-700);
  white-space: nowrap;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-vac { background: var(--vac-bg); color: var(--vac); }
.chip-sick { background: var(--sick-bg); color: var(--sick); }
.chip-pers { background: var(--pers-bg); color: var(--pers); }
.chip-ot { background: var(--ot-bg); color: var(--ot); }
.chip-swap { background: var(--swap-bg); color: var(--swap); }
.chip-hol { background: var(--hol-bg); color: var(--hol); }
.chip-special { background: var(--special-bg); color: var(--special); }
.chip-pending { background: #fef3c7; color: #92400e; }
.chip-approved { background: #d1fae5; color: #047857; }
.chip-rejected { background: #fee2e2; color: #b91c1c; }

/* ===== Stat cards ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 12px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.stat-label svg { width: 14px; height: 14px; }
.stat-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-en);
  color: var(--ink-900);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.stat-meta { font-size: 11px; color: var(--ink-500); margin-top: 4px; }
.stat-meta strong { color: var(--ink-700); font-weight: 600; }
.stat-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-50);
  color: var(--brand-700);
  float: right;
}
.stat-icon svg { width: 16px; height: 16px; }

/* ===== Calendar ===== */
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cal-nav button {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1px solid var(--ink-200);
  background: var(--paper);
  display: grid; place-items: center;
  color: var(--ink-700);
}
.cal-nav button:hover { background: var(--ink-50); }
.cal-month {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink-900);
}
.cal-month-year {
  color: var(--ink-500);
  font-weight: 500;
  font-family: var(--font-en);
  margin-left: 6px;
}

.cal-grid {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
}
.cal-header {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cal-header.sun { color: var(--weekend); }

.cal-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(138px, 1fr);
}
.cal-cell {
  border-right: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  padding: 8px 10px;
  cursor: pointer;
  transition: background .12s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-cell:hover { background: var(--ink-50); }
.cal-cell.other-month { background: #fafbfc; }
.cal-cell.other-month .cal-day-num { color: var(--ink-300); }
.cal-cell.weekend { background: var(--weekend-bg); }
.cal-cell.holiday { background: var(--hol-bg); }
.cal-cell.today {
  box-shadow: inset 0 0 0 2px var(--brand-600);
  background: var(--brand-50);
}
.cal-cell.selected {
  background: var(--brand-100);
  box-shadow: inset 0 0 0 2px var(--brand-700);
}
.cal-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cal-day-num {
  font-weight: 600;
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--ink-800);
}
.cal-day-num.today {
  background: var(--brand-600);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
}
.cal-cell.holiday .cal-day-num { color: var(--hol); }
.cal-cell.weekend .cal-day-num { color: var(--weekend); }
.cal-day-label {
  font-size: 10px;
  color: var(--hol);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.cal-event {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ink-100);
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event .ava {
  width: 14px; height: 14px;
  border-radius: 50%;
  font-size: 8px;
  flex-shrink: 0;
}
.cal-event.vac  { background: var(--vac-bg);  color: var(--vac); }
.cal-event.sick { background: var(--sick-bg); color: var(--sick); }
.cal-event.pers { background: var(--pers-bg); color: var(--pers); }
.cal-event.ot   { background: var(--ot-bg);   color: var(--ot); }
.cal-event.swap { background: var(--swap-bg); color: var(--swap); }
.cal-event.special { background: var(--special-bg); color: var(--special); }
.cal-more { font-size: 10px; color: var(--ink-500); padding: 0 6px; }

.cal-headroom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.headcount {
  font-size: 10px;
  font-family: var(--font-en);
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(15,23,42,.06);
  color: var(--ink-600);
}
.headcount.low { background: rgba(220,38,38,.1); color: var(--sick); }
.headcount.full { background: rgba(13,148,136,.1); color: var(--swap); }

/* ===== Day Drawer (slide-in panel) ===== */
.day-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .25);
  backdrop-filter: blur(2px);
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn .15s ease-out;
}
.day-drawer {
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: var(--paper);
  box-shadow: -20px 0 60px rgba(15, 23, 42, .15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideIn .25s cubic-bezier(.2,.8,.2,1);
}
.day-drawer > .day-panel {
  height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideIn { from { transform: translateX(100%) } to { transform: translateX(0) } }

/* ===== Day Panel ===== */
.day-panel {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.day-panel-header {
  padding: 18px;
  border-bottom: 1px solid var(--ink-100);
  background: linear-gradient(180deg, var(--brand-50), transparent);
}
.day-big {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-en);
  color: var(--brand-800);
  line-height: 1;
  letter-spacing: -.03em;
}
.day-sub {
  font-size: 13px;
  color: var(--ink-600);
  margin-top: 4px;
}
.day-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.day-body {
  padding: 14px 18px;
  flex: 1;
  overflow-y: auto;
}
.day-section {
  margin-bottom: 16px;
}
.day-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-500);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.day-section-title .count {
  font-family: var(--font-en);
  background: var(--ink-100);
  color: var(--ink-700);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
}
.day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--ink-100);
}
.day-row:last-child { border-bottom: none; }
.day-row .emp-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-800);
}
.day-row .emp-meta {
  font-size: 11px;
  color: var(--ink-500);
}
.day-row .row-tail { margin-left: auto; }

.day-panel-footer {
  padding: 12px;
  border-top: 1px solid var(--ink-100);
  background: var(--ink-50);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.day-panel-footer .btn {
  padding: 8px 10px;
  font-size: 12px;
  justify-content: center;
}

/* ===== Tables ===== */
.t {
  width: 100%;
  border-collapse: collapse;
}
.t th, .t td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ink-100);
  font-size: 13px;
}
.t th {
  background: var(--ink-50);
  font-weight: 600;
  color: var(--ink-600);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.t tr:hover td { background: var(--ink-50); }
.t .num {
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
}

/* ===== Forms ===== */
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 7px;
  font-size: 13px;
  background: var(--paper);
  color: var(--ink-900);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-500) 18%, transparent);
}
.field textarea { resize: vertical; min-height: 70px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-help { font-size: 11px; color: var(--ink-500); margin-top: 4px; }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--ink-200);
  margin-bottom: 18px;
}
.tab {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-600);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink-900); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); font-weight: 600; }

/* ===== Type Indicators ===== */
.type-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.type-icon svg { width: 14px; height: 14px; }
.type-icon.vac { background: var(--vac-bg); color: var(--vac); }
.type-icon.sick { background: var(--sick-bg); color: var(--sick); }
.type-icon.pers { background: var(--pers-bg); color: var(--pers); }
.type-icon.ot { background: var(--ot-bg); color: var(--ot); }
.type-icon.swap { background: var(--swap-bg); color: var(--swap); }
.type-icon.hol { background: var(--hol-bg); color: var(--hol); }
.type-icon.special { background: var(--special-bg); color: var(--special); }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
}
.modal {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--ink-100);
  background: var(--ink-50);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ===== Two-column page layouts ===== */
.two-col {
  display: grid;
  grid-template-columns: 4fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ===== Avatar dots ===== */
.ava-stack {
  display: inline-flex;
}
.ava-stack .avatar {
  width: 24px; height: 24px;
  font-size: 10px;
  border: 2px solid var(--paper);
  margin-left: -6px;
}
.ava-stack .avatar:first-child { margin-left: 0; }
.ava-more {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--ink-200);
  color: var(--ink-600);
  font-size: 10px;
  font-weight: 600;
  display: grid; place-items: center;
  margin-left: -6px;
  font-family: var(--font-en);
}

/* ===== Bars / Charts ===== */
.bar {
  height: 8px;
  background: var(--ink-100);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span { display: block; height: 100%; background: var(--brand-500); border-radius: 999px; }
.bar.sick > span { background: var(--sick); }
.bar.pers > span { background: var(--pers); }
.bar.vac > span  { background: var(--vac); }

/* ===== Empty state ===== */
.empty {
  padding: 28px;
  text-align: center;
  color: var(--ink-500);
  font-size: 13px;
}

/* ===== Login screen ===== */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.login-art {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: white;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-art::before {
  content: "";
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--brand-400) 20%, transparent), transparent 70%);
  top: -200px; right: -200px;
}

/* ───── Login Art v2 — image-led, warm/playful ───── */
.login-art-v2 {
  position: relative;
  padding: 36px 44px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #faf8f4;
}
.login-art-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, #fef3c7 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, #fce7f3 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, #dbeafe 0%, transparent 50%),
    #faf8f4;
  z-index: 0;
}
.login-art-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 23, 42, .03) 1px, transparent 0);
  background-size: 14px 14px;
  pointer-events: none;
}
.login-art-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.login-collage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 140px 140px;
  gap: 14px;
  margin-bottom: 32px;
  max-width: 480px;
}
.login-collage image-slot {
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .1), 0 2px 4px rgba(15, 23, 42, .04);
}
.login-today-badge {
  position: absolute;
  right: -28px;
  top: 14px;
  background: white;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  z-index: 2;
  transform: rotate(4deg);
  text-align: center;
}
.login-badge-divider {
  height: 1px;
  background: var(--ink-100);
  margin: 8px 0;
}
.login-note-card {
  position: absolute;
  left: -16px;
  bottom: -18px;
  background: white;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12), 0 2px 4px rgba(15, 23, 42, .04);
  z-index: 2;
  transform: rotate(-3deg);
  min-width: 200px;
}
.login-art-bottom {
  position: relative;
  z-index: 1;
  margin-top: auto;
  max-width: 460px;
}
.login-emp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.login-form {
  display: grid; place-items: center;
  padding: 56px;
}
.login-form-inner {
  width: 100%;
  max-width: 360px;
}

/* ===== Utility ===== */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.muted { color: var(--ink-500); }
.fwhite { color: white; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--ink-100); margin: 12px 0; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-600);
}
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

.scroll-y { overflow-y: auto; }
