:root {
  --navy-900: #060D16;
  --navy-800: #0A1525;
  --navy-700: #0F1D32;
  --navy-600: #162A46;
  --navy-500: #1E3A5F;
  --navy-400: #2A5080;
  --steel: #3674A8;
  --accent: #0EA5E9;
  --accent-lt: #67D4FF;
  --accent-xs: #E8F8FF;
  --accent-dim: rgba(14,165,233,.10);
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-150: #E9EFF6;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --red: #EF4444;
  --red-dark: #B91C1C;
  --red-lt: #FEF2F2;
  --red-bg: #FEE2E2;
  --blue-d: #0EA5E9;
  --green: #22C55E;
  --green-lt: #F0FDF4;
  --orange: #F97316;
  --header-h: 54px;
  --statsbar-h: 38px;
  --name-w: 178px;
  --cell-w: 48px;
  --row-h: clamp(40px, 4.5vh, 60px);
  --foot-h: 30px;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --border: 1px solid rgba(255,255,255,.08);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --glass-bg: rgba(255,255,255,.04);
  --glass-bg-hover: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.08);
  --glass-border-h: rgba(255,255,255,.14);
  --glass-blur: 16px;
  --glass-blur-lg: 24px;
  --glass-light: rgba(255,255,255,.65);
  --glass-light-hover: rgba(255,255,255,.78);
  --glass-light-border: rgba(255,255,255,.12);
  --glass-light-bg: rgba(255,255,255,.45);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 64px rgba(0,0,0,.2), 0 8px 20px rgba(0,0,0,.1);
  --shadow-glow: 0 0 20px rgba(14,165,233,.15), 0 0 60px rgba(14,165,233,.05);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--navy-900);
  color: var(--gray-800);
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(14,165,233,.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(99,102,241,.06) 0%, transparent 50%),
    radial-gradient(ellipse 70% 40% at 50% 50%, rgba(6,13,22,.9) 0%, transparent 100%),
    linear-gradient(160deg, #060D16 0%, #0A1525 40%, #0F1D32 100%);
  will-change: transform;
  pointer-events: none;
}
button { cursor: pointer; font-family: inherit; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
#app-header {
  height: var(--header-h);
  background: rgba(10,21,37,.6);
  backdrop-filter: blur(var(--glass-blur-lg));
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0; z-index: 100; position: relative;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 4px 24px rgba(0,0,0,.3);
  gap: 8px;
  contain: layout paint;
}
#app-header::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(14,165,233,.25) 20%, rgba(103,212,255,.35) 50%, rgba(14,165,233,.25) 80%, transparent 100%);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.brand-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, rgba(42,80,128,.6), rgba(14,165,233,.5));
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: #fff; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 2px 10px rgba(14,165,233,.2), inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .2s cubic-bezier(.34,1.2,.64,1), box-shadow .2s;
  will-change: transform;
}
.brand-icon:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(14,165,233,.3); }
.brand-name { font-size: 14px; font-weight: 700; color: var(--white); letter-spacing: -.015em; line-height: 1.2; }
.brand-text { min-width: 0; }
.month-nav {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 4px 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: border-color .2s, box-shadow .2s;
}
.month-nav:hover { border-color: var(--glass-border-h); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.nav-btn {
  background: none; border: none;
  color: rgba(255,255,255,.35); font-size: 18px; line-height: 1;
  padding: 2px 8px; border-radius: var(--radius-xs);
  transition: color .15s, background .15s, transform .15s;
  display: flex; align-items: center;
  will-change: transform;
}
.nav-btn:hover { background: rgba(255,255,255,.08); color: var(--white); transform: scale(1.1); }
.nav-btn:active { transform: scale(.95); }
#month-label {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,.9);
  min-width: 120px; text-align: center;
  letter-spacing: -.015em; user-select: none;
  white-space: nowrap;
}
.header-actions { display: flex; gap: 5px; align-items: center; }
.hbtn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  border: none; white-space: nowrap; line-height: 1.4;
  transition: all .15s cubic-bezier(.34,1.2,.64,1);
  will-change: transform;
}
.hbtn svg { flex-shrink: 0; }
.hbtn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: rgba(255,255,255,.7);
}
.hbtn-ghost:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-h); color: var(--white); transform: translateY(-1px); }
.hbtn-accent { background: rgba(14,165,233,.12); border: 1px solid rgba(14,165,233,.2); color: var(--accent-lt); }
.hbtn-accent:hover { background: rgba(14,165,233,.22); border-color: rgba(14,165,233,.35); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
#btn-today {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: rgba(255,255,255,.55);
  padding: 6px 9px; border-radius: var(--radius-sm);
  transition: all .15s; display: flex; align-items: center;
}
#btn-today:hover { background: var(--glass-bg-hover); color: var(--white); }
#btn-today.today-btn-active {
  background: rgba(14,165,233,.15);
  border-color: rgba(14,165,233,.3);
  color: var(--accent-lt);
  box-shadow: 0 0 12px rgba(14,165,233,.1);
}
.hbtn-divider { width: 1px; height: 22px; background: rgba(255,255,255,.06); margin: 0 2px; }
#stats-bar {
  height: var(--statsbar-h);
  background: rgba(248,250,252,.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid rgba(226,232,240,.5);
  display: flex; align-items: center;
  padding: 0 16px;
  flex-shrink: 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; gap: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
  position: relative;
  contain: layout paint;
}
#stats-bar::-webkit-scrollbar { display: none; }
#stats-bar::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 32px;
  background: linear-gradient(90deg, transparent, rgba(248,250,252,.75));
  pointer-events: none;
}
.stat-item {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 100%;
  border-right: 1px solid rgba(226,232,240,.4);
  white-space: nowrap; cursor: default;
  transition: background .15s;
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(14,165,233,.04); }
.stat-item-emp {
  padding: 0 12px 0 0;
  border-right: 1px solid var(--gray-200);
  margin-right: 4px; color: var(--gray-500);
  gap: 5px;
}
.stat-label-sm { font-size: 10px; font-weight: 600; color: var(--gray-400); letter-spacing: .04em; }
.stat-code {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: var(--radius-xs);
  line-height: 1.5; letter-spacing: .01em;
}
.stat-count { font-size: 13px; font-weight: 700; color: var(--gray-700); font-variant-numeric: tabular-nums; }
#stats-empty { font-size: 11px; color: var(--gray-400); font-style: italic; }
main { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 12px; }
#grid-wrapper {
  width: max-content;
  max-width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  margin: 0 auto;
  overflow: auto;
  position: relative;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.2);
  contain: paint layout;
  overscroll-behavior: contain;
}
#grid-wrapper::-webkit-scrollbar { width: 6px; height: 6px; }
#grid-wrapper::-webkit-scrollbar-track { background: rgba(241,245,249,.5); border-radius: 3px; }
#grid-wrapper::-webkit-scrollbar-thumb { background: rgba(148,163,184,.4); border-radius: 3px; }
#grid-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.6); }
#grid-wrapper::-webkit-scrollbar-corner { background: transparent; }
#plan-table { border-collapse: separate; border-spacing: 0; min-width: max-content; }
.th-corner {
  position: sticky; top: 0; left: 0; z-index: 50;
  width: var(--name-w); min-width: var(--name-w);
  background: rgba(10,21,37,.9);
  backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(14,165,233,.2);
}
.th-corner-inner {
  height: 58px; display: flex; align-items: center; padding: 0 14px;
  font-size: 9px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.25);
}
.th-day {
  position: sticky; top: 0; z-index: 30;
  width: var(--cell-w); min-width: var(--cell-w); max-width: var(--cell-w);
  border-right: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(14,165,233,.2);
  text-align: center; vertical-align: bottom; user-select: none;
}
.th-day.is-fri { border-right: 1px solid rgba(255,255,255,.12) !important; }
.th-day-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 4px 2px 5px; height: 58px;
}
.d-kw { font-family: var(--font-mono); font-size: 7px; font-weight: 500; letter-spacing: .04em; min-height: 10px; line-height: 1; opacity: .5; }
.d-num { font-family: var(--font-mono); font-size: 14px; font-weight: 600; line-height: 1; }
.d-dow { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.d-hol { font-size: 7px; margin-top: 2px; max-width: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.th-day.wd { background: rgba(22,42,70,.85); color: rgba(255,255,255,.9); }
.th-day.we { background: rgba(30,42,60,.8); color: var(--gray-400); }
.th-day.hol { background: rgba(61,42,0,.8); color: #FCD34D; }
.th-day.today { outline: 2px solid rgba(14,165,233,.5); outline-offset: -2px; z-index: 31; }
.td-name {
  position: sticky; left: 0; z-index: 20;
  width: var(--name-w); min-width: var(--name-w);
  height: var(--row-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border-right: 1px solid rgba(226,232,240,.4);
  border-bottom: 1px solid rgba(226,232,240,.4);
  padding: 0 8px 0 11px;
  display: flex; align-items: center; gap: 5px;
  cursor: pointer;
  transition: background .15s, border-right-color .15s;
  box-shadow: 2px 0 8px rgba(0,0,0,.03);
}
tr:hover .td-name { background: rgba(232,248,255,.8); border-right-color: rgba(14,165,233,.15); }
.emp-label {
  flex: 1; font-size: 12.5px; font-weight: 500; color: var(--gray-800);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .1s; line-height: 1.3;
}
tr:hover .emp-label { color: var(--navy-600); }
.emp-pos-tag {
  flex-shrink: 0;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 700;
  padding: 1px 5px; border-radius: var(--radius-xs);
  letter-spacing: .03em; line-height: 1.5;
  white-space: nowrap;
  opacity: .9; transition: opacity .1s;
}
tr:hover .emp-pos-tag { opacity: 1; }
.emp-profile-icon {
  opacity: 0; flex-shrink: 0; color: var(--accent); pointer-events: none;
  transition: opacity .12s; display: flex; align-items: center;
}
tr:hover .emp-profile-icon { opacity: .65; }
.emp-del {
  opacity: 0; flex-shrink: 0;
  width: 18px; height: 18px;
  background: none; border: none; color: var(--gray-400);
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .1s, background .1s, color .1s;
}
tr:hover .emp-del { opacity: 1; }
.emp-del:hover { color: var(--red); background: var(--red-bg); }
.td-cell {
  width: var(--cell-w); min-width: var(--cell-w); max-width: var(--cell-w);
  height: var(--row-h);
  border-right: 1px solid rgba(226,232,240,.4); border-bottom: 1px solid rgba(226,232,240,.4);
  cursor: pointer; position: relative; vertical-align: top;
  transition: filter .1s, box-shadow .15s; outline: none;
  will-change: filter;
}
.td-cell:hover { filter: brightness(.9); box-shadow: inset 0 0 0 1px rgba(14,165,233,.12); }
.td-cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 5; }
.td-cell.we { background-color: rgba(241,245,249,.6) !important; }
.td-cell.hol { background-color: rgba(255,251,235,.6) !important; }
.td-cell.today { box-shadow: inset 0 0 0 1px rgba(14,165,233,.3); z-index: 2; }
.td-cell.is-fri { border-right: 1px solid rgba(203,213,225,.5) !important; }
.cell-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 2px 3px;
}
.cell-assign {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  text-align: center; line-height: 1.2; word-break: break-all; max-width: 100%;
}
.td-cell.empty-wd .cell-inner::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gray-200); transition: background .1s; flex-shrink: 0;
}
.td-cell.empty-wd:hover .cell-inner::after { background: var(--gray-300); }
.td-cell.auto-f-rest .cell-assign {
  font-weight: 500 !important;
  font-style: italic;
  letter-spacing: .03em;
}
.td-cell.auto-f-rest::after {
  content: '';
  position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 2px; border-radius: 1px;
  background: rgba(71,85,105,0.18);
  pointer-events: none;
}
.cell-duty {
  position: absolute; top: 2px; right: 2px;
  font-size: 7px; font-weight: 800;
  padding: 1px 3px; border-radius: 3px; line-height: 1.3;
  letter-spacing: .02em; pointer-events: none;
}
.badge-D { background: var(--red); color: #fff; }
.badge-HG { background: var(--blue-d); color: #fff; }
.tr-stat.tr-stat-first .td-stat-lbl,
.tr-stat.tr-stat-first .td-stat-val { border-top: 1px solid rgba(203,213,225,.5); }
.tr-stat .td-stat-lbl {
  position: sticky; left: 0; z-index: 20;
  background: rgba(248,250,252,.85); color: var(--gray-600);
  backdrop-filter: blur(6px);
  height: var(--foot-h); padding: 0 10px;
  border-right: 1px solid rgba(226,232,240,.4);
  border-bottom: 1px solid rgba(226,232,240,.4);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  box-shadow: 2px 0 8px rgba(0,0,0,.03);
}
.tr-stat .td-stat-val {
  background: rgba(248,250,252,.6); color: var(--gray-300);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-align: center; vertical-align: middle;
  height: var(--foot-h);
  border-bottom: 1px solid rgba(226,232,240,.4); border-right: 1px solid rgba(226,232,240,.4);
  font-variant-numeric: tabular-nums; transition: color .12s, background .12s;
}
.td-stat-val.dim { opacity: .28; }
.td-stat-val.nz { color: var(--gray-700); }
.td-stat-val.warn { color: var(--red); background: var(--red-lt); font-weight: 800; }
.td-stat-val.today-col { background: var(--accent-xs); }
.td-stat-val.is-fri { border-right: 1px solid var(--gray-300) !important; }
.stat-lbl-badge { padding: 1px 6px; border-radius: var(--radius-xs); font-family: var(--font-mono); font-size: 10px; font-weight: 700; line-height: 1.6; letter-spacing: .01em; }
.stat-lbl-text { font-size: 10px; font-weight: 500; color: var(--gray-500); }
.td-empty { padding: 0; text-align: center; }
.empty-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 52px 24px; color: var(--gray-400); }
.empty-title { font-size: 14px; font-weight: 600; color: var(--gray-500); }
.empty-hint { font-size: 12px; line-height: 1.6; color: var(--gray-400); }
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,13,22,.55);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  padding: 16px;
  contain: strict;
}
.modal {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(var(--glass-blur-lg));
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.15), 0 0 80px rgba(14,165,233,.04);
  overflow: hidden; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalIn .2s cubic-bezier(.34,1.3,.64,1);
  will-change: transform, opacity;
  contain: layout style paint;
}
.modal.modal-closing { animation: modalOut .15s ease forwards; }
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(10px); } to { opacity:1; transform:none; } }
@keyframes modalOut { from { opacity:1; transform:none; } to { opacity:0; transform:scale(.97) translateY(6px); } }
.modal-hd {
  background: rgba(10,21,37,.85);
  backdrop-filter: blur(var(--glass-blur));
  color: var(--white);
  padding: 16px 20px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.modal-hd-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.modal-hd-sub { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 2px; }
.modal-x {
  background: none; border: none; color: rgba(255,255,255,.35); font-size: 16px;
  padding: 4px 6px; border-radius: var(--radius-xs); line-height: 1;
  transition: all .15s cubic-bezier(.34,1.2,.64,1); flex-shrink: 0; margin-top: 2px;
  will-change: transform;
}
.modal-x:hover { color: var(--white); background: rgba(255,255,255,.08); transform: scale(1.1); }
.modal-bd { padding: 20px; overflow-y: auto; flex: 1; }
.modal-ft {
  padding: 12px 20px; border-top: 1px solid rgba(226,232,240,.4);
  background: rgba(248,250,252,.6);
  backdrop-filter: blur(8px);
  display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0;
}
.mbtn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 15px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  border: none; cursor: pointer; line-height: 1.4;
  transition: all .15s cubic-bezier(.34,1.2,.64,1);
  will-change: transform;
}
.mbtn:active { transform: scale(.97); }
.mbtn-ghost { background: transparent; border: 1px solid rgba(203,213,225,.5); color: var(--gray-600); }
.mbtn-ghost:hover { background: rgba(14,165,233,.05); border-color: rgba(14,165,233,.2); transform: translateY(-1px); }
.mbtn-primary { background: rgba(22,42,70,.85); color: #fff; border: 1px solid rgba(255,255,255,.08); }
.mbtn-primary:hover { background: rgba(30,58,95,.9); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(14,165,233,.15); }
.mbtn-danger { background: rgba(239,68,68,.85); color: #fff; }
.mbtn-danger:hover { background: rgba(185,28,28,.9); transform: translateY(-1px); }
.preview-box {
  background: rgba(10,21,37,.75);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.preview-box-lbl { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 4px; }
.preview-box-val { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--white); min-width: 48px; line-height: 1; }
.preview-box-duties { display: flex; gap: 5px; }
.preview-duty-badge { font-family: var(--font-mono); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-sm); line-height: 1.4; }
.sect-hd {
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gray-400);
  margin: 18px 0 9px;
  display: flex; align-items: center; gap: 6px;
}
.sect-hd:first-of-type { margin-top: 0; }
.sect-hd::before { content: ''; flex: none; width: 3px; height: 12px; background: var(--accent); border-radius: 2px; }
.sect-hint { font-size: 8.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--gray-400); }
.day-type-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 12px; line-height: 1.4;
}
.dtl-we { background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200); }
.dtl-hol { background: #FEF3C7; color: #78350F; border: 1px solid #FDE68A; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-wp, .chip-st {
  padding: 5px 9px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; user-select: none;
  transition: all .1s; display: flex; flex-direction: column; align-items: center;
  min-width: 42px; text-align: center;
}
.chip-wp:hover, .chip-st:hover { filter: brightness(.9); }
.chip-wp.on, .chip-st.on { border-color: rgba(0,0,0,.2); box-shadow: 0 0 0 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.15); transform: scale(1.06); }
.chip-wp.dim, .chip-st.dim { opacity: .3; pointer-events: none; }
.chip-sub { font-size: 7.5px; font-weight: 400; opacity: .75; margin-top: 2px; white-space: nowrap; font-family: var(--font-sans); }
.chip-duty {
  display: flex; flex-direction: column; align-items: center;
  padding: 7px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 14px; font-weight: 800;
  border: 2px solid transparent; cursor: pointer; user-select: none;
  transition: all .1s; min-width: 72px; text-align: center; letter-spacing: .01em;
}
.chip-duty:hover { filter: brightness(.9); }
.chip-duty.on { transform: scale(1.06); border-color: rgba(0,0,0,.2); box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.chip-duty.blocked { opacity: .3; cursor: not-allowed; }
.duty-sub { font-size: 8.5px; font-weight: 400; margin-top: 3px; white-space: nowrap; font-family: var(--font-sans); letter-spacing: 0; }
.duty-D-off { background: #FEE2E2; color: #B91C1C; }
.duty-D-on { background: var(--red); color: #fff; }
.duty-HG-off { background: #E0F2FE; color: #0369A1; }
.duty-HG-on { background: var(--blue-d); color: #fff; }
.duty-warn {
  margin-top: 10px; padding: 8px 12px;
  background: var(--red-lt); color: #DC2626;
  border-radius: var(--radius-sm); font-size: 11.5px; line-height: 1.5;
  border: 1px solid #FCA5A5;
}
.emp-list-inner { max-height: 280px; overflow-y: auto; margin: -4px -4px 0; padding: 4px; }
.emp-list-inner::-webkit-scrollbar { width: 4px; }
.emp-list-inner::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.emp-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: var(--radius-sm); transition: background .1s; gap: 8px; }
.emp-row:hover { background: var(--gray-100); }
.emp-row-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.emp-avatar {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.emp-row-info { display: flex; flex-direction: column; min-width: 0; }
.emp-row-name { font-size: 13px; font-weight: 500; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-row-meta { font-size: 10px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.emp-row-del { background: none; border: none; color: var(--gray-400); padding: 4px 8px; border-radius: var(--radius-xs); transition: all .1s; display: flex; align-items: center; flex-shrink: 0; }
.emp-row-del:hover { color: var(--red); background: var(--red-bg); }
.emp-none { color: var(--gray-400); font-size: 12px; font-style: italic; padding: 16px; text-align: center; }
.emp-add-row { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-150); }
.text-input { flex: 1; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 13px; color: var(--gray-800); outline: none; transition: border .15s, box-shadow .15s; background: var(--white); }
.text-input:focus { border-color: var(--steel); box-shadow: 0 0 0 3px rgba(58,126,196,.15); }
.text-input::placeholder { color: var(--gray-400); }
.dropzone {
  position: relative; border: 2px dashed var(--gray-300);
  border-radius: var(--radius); padding: 24px 20px; text-align: center;
  cursor: pointer; background: var(--gray-50);
  transition: border-color .18s, background .18s, box-shadow .18s; user-select: none;
}
.dropzone:hover { border-color: var(--steel); background: var(--accent-xs); box-shadow: 0 0 0 3px rgba(14,165,233,.1); }
.dropzone.drag-over { border-color: var(--accent); background: var(--accent-xs); box-shadow: 0 0 0 4px rgba(14,165,233,.15); border-style: solid; }
.dropzone.has-file { border-color: var(--green); background: var(--green-lt); border-style: solid; }
.dropzone.has-file:hover { box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.dz-icon { width: 40px; height: 40px; background: var(--gray-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; color: var(--gray-400); transition: background .18s, color .18s; }
.dropzone.drag-over .dz-icon { background: rgba(14,165,233,.12); color: var(--accent); }
.dropzone.has-file .dz-icon { background: rgba(34,197,94,.12); color: var(--green); }
.dz-main { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 3px; }
.dropzone.drag-over .dz-main { color: var(--navy-600); }
.dropzone.has-file .dz-main { color: #15803D; }
.dz-hint { font-size: 11px; color: var(--gray-400); }
.dropzone.has-file .dz-hint { display: none; }
.dz-filename { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 10px; background: rgba(34,197,94,.1); color: #15803D; border-radius: 20px; font-size: 11px; font-weight: 600; font-family: var(--font-mono); }
.dz-filename:empty { display: none; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--gray-400); font-size: 11px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.json-ta {
  width: 100%; height: 140px;
  background: #070F18; color: #67E8F9;
  border: 1px solid rgba(103,232,249,.15);
  border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 11px;
  padding: 10px 12px; resize: vertical; outline: none;
  transition: border .15s; line-height: 1.5;
}
.json-ta:focus { border-color: rgba(103,232,249,.4); box-shadow: 0 0 0 3px rgba(14,165,233,.08); }
.json-ta::placeholder { color: rgba(103,232,249,.3); }
.import-err { margin-top: 8px; padding: 8px 12px; background: var(--red-lt); color: #DC2626; border-radius: var(--radius-sm); font-size: 11.5px; line-height: 1.4; border: 1px solid #FCA5A5; }
#toast {
  position: fixed; bottom: 20px; right: 20px;
  background: rgba(15,23,42,.8);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--white);
  padding: 10px 16px 10px 12px;
  border-radius: var(--radius); font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06);
  z-index: 500; pointer-events: none;
  opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .2s, transform .22s cubic-bezier(.34,1.3,.64,1);
  max-width: 340px; line-height: 1.4;
  display: flex; align-items: center; gap: 8px;
  will-change: transform, opacity;
  transform: translateZ(0);
}
#toast::before { content: '✓'; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: var(--green); border-radius: 50%; font-size: 10px; font-weight: 800; flex-shrink: 0; }
#toast.visible { opacity: 1; transform: none; }
.profile-hd-inner { display: flex; align-items: center; gap: 14px; }
.profile-avatar-lg {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: .04em;
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.pm-meta-row {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 6px;
}
.pm-pos-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  font-family: var(--font-mono); letter-spacing: .02em;
  white-space: nowrap;
}
.pm-meta-chip {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 500;
  padding: 2px 8px; border-radius: 20px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.12);
  white-space: nowrap;
}
.pm-chip-area { background: rgba(14,165,233,.15); color: var(--accent-lt); border-color: rgba(14,165,233,.2); }
.pm-chip-deputy { background: rgba(255,255,255,.06); color: rgba(255,255,255,.45); }
.pm-body { padding: 20px; overflow-y: auto; flex: 1; scroll-behavior: smooth; }
.pm-body::-webkit-scrollbar { width: 5px; }
.pm-body::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
.pm-sect-hd {
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gray-400);
  margin: 22px 0 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--gray-150);
  display: flex; align-items: center; gap: 7px;
}
.pm-sect-hd:first-of-type { margin-top: 0; }
.pm-sect-hint {
  font-size: 8px; font-weight: 400; text-transform: none; letter-spacing: 0;
  color: var(--gray-400); margin-left: 2px;
}
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kpi-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-top: 3px solid var(--gray-300); border-radius: var(--radius);
  padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .12s, box-shadow .12s;
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,.8), transparent);
  pointer-events: none;
}
.kpi-card:hover { box-shadow: var(--shadow-sm); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.kpi-icon { color: var(--gray-300); display: flex; align-items: center; transition: color .12s; }
.kpi-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); }
.kpi-value { font-family: var(--font-mono); font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--gray-800); display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.kpi-v-unit { font-size: 10px; font-weight: 600; margin-left: 1px; letter-spacing: .02em; }
.kpi-v-sep { font-size: 14px; color: var(--gray-300); margin: 0 2px; font-family: var(--font-sans); }
.kpi-sub { font-size: 9.5px; color: var(--gray-400); line-height: 1.3; margin-top: 3px; }
.kpi-bar-wrap { margin-top: 8px; height: 4px; background: var(--gray-150); border-radius: 2px; overflow: hidden; }
.kpi-bar-fill { height: 100%; border-radius: 2px; transition: width .55s cubic-bezier(.34,1.2,.64,1); }
.dist-chart { display: flex; flex-direction: column; gap: 6px; }
.dist-row { display: grid; grid-template-columns: 36px 1fr 28px 34px; align-items: center; gap: 8px; }
.dist-code { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; padding: 2px 4px; border-radius: var(--radius-xs); text-align: center; line-height: 1.5; }
.dist-bar-bg { height: 10px; border-radius: 5px; background: var(--gray-150); overflow: hidden; }
.dist-bar-fill { height: 100%; border-radius: 5px; transition: width .55s cubic-bezier(.34,1.2,.64,1); }
.dist-count { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--gray-700); text-align: right; font-variant-numeric: tabular-nums; }
.dist-pct { font-size: 10px; color: var(--gray-400); text-align: right; }
.pm-bar-fill { transition: width .55s cubic-bezier(.34,1.2,.64,1); }
.duty-detail-area { display: flex; flex-direction: column; gap: 10px; }
.duty-detail-group { display: flex; align-items: flex-start; gap: 10px; }
.duty-group-lbl { font-family: var(--font-mono); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: var(--radius-sm); flex-shrink: 0; line-height: 1.5; margin-top: 1px; }
.duty-group-label { font-size: 10.5px; color: var(--gray-500); font-weight: 500; flex-shrink: 0; padding-top: 3px; }
.duty-group-days { display: flex; flex-wrap: wrap; gap: 4px; }
.duty-day-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); cursor: default; }
.duty-day-badge:hover { background: var(--gray-150); }
.mcd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; max-width: 420px; margin: 0 auto; }
.mcd-dow { text-align: center; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); padding: 4px 0 7px; }
.mcd-dow.is-we { color: var(--gray-300); }
.mcd-ph { aspect-ratio: 1; min-height: 38px; }
.mcd {
  position: relative; aspect-ratio: 1; min-height: 38px;
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: filter .08s, transform .1s;
  border: 1px solid transparent; user-select: none; overflow: hidden;
}
.mcd:hover { filter: brightness(.86); transform: scale(1.08); z-index: 2; }
.mcd:focus { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 3; filter: none; transform: none; }
.mcd-we { background: var(--gray-100) !important; cursor: default; }
.mcd-we:hover, .mcd-we:focus { filter: none; transform: none; outline: none; }
.mcd-hol { background: #FEF9C3 !important; cursor: default; }
.mcd-hol:hover, .mcd-hol:focus { filter: none; transform: none; outline: none; }
.mcd-empty { background: var(--gray-50); border-color: var(--gray-150); }
.mcd-today { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
.mcd-num { position: absolute; top: 3px; left: 4px; font-family: var(--font-mono); font-size: 7px; font-weight: 500; color: rgba(0,0,0,.32); line-height: 1; pointer-events: none; }
.mcd-we .mcd-num, .mcd-hol .mcd-num { color: rgba(0,0,0,.22); }
.mcd-assign { font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; text-align: center; line-height: 1.2; max-width: 94%; padding: 0 2px; margin-top: 5px; pointer-events: none; }
.mcd-duty { position: absolute; bottom: 2px; right: 2px; font-size: 6px; font-weight: 800; padding: 1px 2.5px; border-radius: 2px; line-height: 1.3; pointer-events: none; }
.yr-kpi-strip {
  display: flex; align-items: stretch; gap: 0;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.yr-kpi-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 14px; flex: 1; gap: 3px;
  transition: background .1s;
}
.yr-kpi-item:hover { background: var(--gray-100); }
.yr-kpi-val {
  font-family: var(--font-mono); font-size: 20px; font-weight: 700;
  line-height: 1; letter-spacing: -.02em; color: var(--gray-800);
  display: flex; align-items: baseline; gap: 2px;
}
.yr-kpi-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); white-space: nowrap; }
.yr-kpi-detail { font-size: 8.5px; color: var(--gray-400); font-family: var(--font-mono); margin-top: 1px; }
.yr-kpi-sep { font-size: 12px; color: var(--gray-300); font-family: var(--font-sans); }
.yr-kpi-div { width: 1px; background: var(--gray-200); flex-shrink: 0; margin: 8px 0; }
.yr-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.yr-table-wrap::-webkit-scrollbar { height: 5px; }
.yr-table-wrap::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.yr-table { border-collapse: collapse; width: 100%; min-width: 500px; }
.yr-table thead tr { background: var(--gray-100); }
.yr-th {
  padding: 7px 10px; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-500);
  text-align: center; white-space: nowrap;
  border-bottom: 2px solid var(--gray-200);
}
.yr-th-month { text-align: left; padding-left: 12px; width: 52px; }
.yr-th-vac { color: #5B21B6; }
.yr-th-sick { color: #991B1B; }
.yr-th-d { color: #B91C1C; }
.yr-th-hg { color: #0369A1; }
.yr-row { border-bottom: 1px solid var(--gray-100); transition: background .08s; }
.yr-row:hover { background: var(--gray-50); }
.yr-row:last-child { border-bottom: none; }
.yr-row-current { background: var(--accent-xs) !important; }
.yr-row-current .yr-td-month { font-weight: 700; color: var(--navy-600); }
.yr-row-empty .yr-td-month { color: var(--gray-300); }
.yr-td-month {
  padding: 6px 10px 6px 12px; font-size: 11.5px; font-weight: 500;
  color: var(--gray-700); white-space: nowrap; font-family: var(--font-mono);
}
.yr-td { padding: 6px 10px; vertical-align: middle; }
.yr-td-num { text-align: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--gray-700); }
.yr-no-data { color: var(--gray-300); text-align: center; font-size: 11px; }
.yr-vac { color: #5B21B6; }
.yr-sick { color: #991B1B; }
.yr-duty-d { color: #B91C1C; font-weight: 700; }
.yr-duty-hg { color: #0369A1; font-weight: 700; }
.yr-no-data-msg { font-size: 12px; color: var(--gray-400); font-style: italic; padding: 12px 0 4px; }
.yr-total-row { background: var(--gray-100) !important; border-top: 2px solid var(--gray-300); }
.yr-total-lbl { font-size: 11px; font-weight: 700; color: var(--gray-700); padding: 7px 10px 7px 12px; white-space: nowrap; }
.yr-total { font-weight: 800 !important; color: var(--gray-800) !important; }
.pct-good { color: #15803D !important; }
.pct-mid { color: #854D0E !important; }
.pct-low { color: #991B1B !important; }
.dept-modal-hd { flex-direction: column; padding-bottom: 0; }
.dept-tabs { display: flex; gap: 0; margin-top: 14px; }
.dept-tab {
  padding: 8px 18px; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.45); background: transparent;
  border: none; border-bottom: 2px solid transparent;
  cursor: pointer; transition: all .15s; letter-spacing: .01em;
  font-family: var(--font-sans);
  display: flex; align-items: center; gap: 6px;
}
.dept-tab:hover { color: rgba(255,255,255,.75); }
.dept-tab.active { color: var(--white); border-bottom-color: var(--accent-lt); }
.dept-tab svg { flex-shrink: 0; }
.dept-context-line { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.dept-body { padding: 0; overflow-y: auto; overflow-x: hidden; flex: 1; }
.dept-body::-webkit-scrollbar { width: 5px; }
.dept-body::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.dept-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 48px 24px; color: var(--gray-400); text-align: center;
}
.dept-empty svg { opacity: .3; }
.dept-empty p { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.dept-empty-hint { font-size: 11px; color: var(--gray-400); font-style: italic; }
.dept-cov-strip {
  display: flex; align-items: stretch; gap: 0;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  padding: 16px 20px; gap: 20px;
}
.dept-cov-meta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0; gap: 3px; min-width: 60px;
  border-right: 1px solid var(--gray-200); padding-right: 20px;
}
.dept-cov-meta:last-of-type { border-right: none; }
.dept-cov-meta-val { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--gray-800); line-height: 1; }
.dept-cov-meta-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); }
.dept-cov-bars { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.dept-cov-bar-item { display: flex; flex-direction: column; gap: 3px; }
.dept-cov-bar-head { display: flex; align-items: center; gap: 8px; }
.dept-cov-code { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-xs); line-height: 1.5; flex-shrink: 0; }
.dept-cov-fraction { font-size: 10px; color: var(--gray-500); font-variant-numeric: tabular-nums; flex: 1; }
.dept-cov-pct { font-family: var(--font-mono); font-size: 11px; font-weight: 700; min-width: 36px; text-align: right; }
.dept-cov-bar-bg { height: 6px; border-radius: 3px; background: var(--gray-200); overflow: hidden; }
.dept-cov-bar-fill { height: 100%; border-radius: 3px; transition: width .5s cubic-bezier(.34,1.2,.64,1); }
.dept-table-wrap { overflow-x: auto; }
.dept-table-wrap::-webkit-scrollbar { height: 5px; }
.dept-table-wrap::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.dept-table { border-collapse: collapse; width: 100%; min-width: 600px; }
.dept-table thead tr { background: var(--gray-100); border-bottom: 2px solid var(--gray-200); }
.dept-th {
  padding: 8px 10px; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-500);
  text-align: center; white-space: nowrap;
}
.dept-th-name { text-align: left; padding-left: 14px; min-width: 160px; }
.dept-th-vac { color: #5B21B6; }
.dept-th-sick { color: #991B1B; }
.dept-th-d { color: #B91C1C; }
.dept-th-hg { color: #0369A1; }
.dept-th-offen{ color: var(--orange); }
.dept-tr { border-bottom: 1px solid var(--gray-100); transition: background .08s; }
.dept-tr:hover { background: var(--gray-50); }
.dept-tr:last-child { border-bottom: none; }
.dept-td-name { padding: 8px 10px 8px 14px; vertical-align: middle; white-space: nowrap; }
.dept-td { padding: 8px 10px; vertical-align: middle; text-align: center; }
.dept-td-num { font-family: var(--font-mono); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--gray-700); }
.dept-emp-name { font-size: 12.5px; font-weight: 500; color: var(--gray-800); }
.dept-pos-badge {
  display: inline-block; margin-left: 6px;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 700;
  padding: 1px 5px; border-radius: var(--radius-xs); line-height: 1.5;
  vertical-align: middle;
}
.dept-vac { color: #5B21B6; }
.dept-sick { color: #991B1B; }
.dept-duty-d { color: #B91C1C; font-weight: 700; }
.dept-duty-hg { color: #0369A1; font-weight: 700; }
.dept-frei { color: var(--gray-500); }
.dept-offen { color: var(--orange); font-weight: 700; }
.dept-cov-good { color: #15803D !important; }
.dept-cov-mid { color: #854D0E !important; }
.dept-cov-low { color: #991B1B !important; }
.dept-total-row { background: var(--gray-100) !important; border-top: 2px solid var(--gray-300) !important; }
.dept-total-lbl { font-size: 11px; font-weight: 700; color: var(--gray-700); padding: 8px 10px 8px 14px; white-space: nowrap; }
.dept-total { font-weight: 800 !important; color: var(--gray-800) !important; }
.dept-yr-strip {
  display: flex; align-items: center; gap: 0;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  overflow-x: auto; scrollbar-width: none;
}
.dept-yr-strip::-webkit-scrollbar { display: none; }
.dept-yr-kpi {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 18px; gap: 4px; flex: 1;
  border-right: 1px solid var(--gray-200); white-space: nowrap;
  transition: background .1s; cursor: default;
}
.dept-yr-kpi:last-child { border-right: none; }
.dept-yr-kpi:hover { background: var(--gray-100); }
.dept-yr-kpi-val { font-family: var(--font-mono); font-size: 22px; font-weight: 700; line-height: 1; color: var(--gray-800); }
.dept-yr-kpi-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); }
#plan-bar {
  height: 48px;
  background: rgba(59,10,0,.45);
  backdrop-filter: blur(var(--glass-blur-lg));
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px;
  flex-shrink: 0; z-index: 95; position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(251,191,36,.1);
  border-bottom: 1px solid rgba(251,191,36,.08);
  contain: layout paint;
}
#plan-bar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(251,191,36,.15) 20%, rgba(252,211,77,.35) 50%, rgba(251,191,36,.15) 80%, transparent 100%);
}
#plan-bar::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245,158,11,.12) 30%, rgba(252,211,77,.25) 50%, rgba(245,158,11,.12) 70%, transparent 100%);
}
.plan-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.plan-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(251,191,36,.15);
  border: 1px solid rgba(251,191,36,.35);
  border-radius: 20px;
  padding: 4px 12px 4px 9px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 800;
  color: #FCD34D; letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 0 10px rgba(251,191,36,.1), inset 0 1px 0 rgba(255,255,255,.06);
}
.plan-badge svg { flex-shrink: 0; }
.plan-badge-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #FCD34D;
  flex-shrink: 0;
  animation: planPulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(252,211,77,.6);
  transform: translateZ(0);
}
@keyframes planPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .3; transform: scale(.65); }
}
.plan-bar-month { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: rgba(255,255,255,.75); white-space: nowrap; flex-shrink: 0; }
.plan-bar-hint { font-size: 10.5px; color: rgba(255,255,255,.28); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-bar-center { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.plan-hist-btn {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.18);
  color: rgba(255,255,255,.5);
  padding: 5px 11px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  transition: all .12s; cursor: pointer;
  white-space: nowrap;
}
.plan-hist-btn:hover:not(:disabled) { background: rgba(251,191,36,.22); border-color: rgba(251,191,36,.38); color: #FCD34D; }
.plan-hist-btn:disabled { opacity: .28; cursor: not-allowed; }
.plan-hist-btn svg { flex-shrink: 0; }
.plan-bar-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.plan-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  border: none; transition: all .12s; white-space: nowrap; cursor: pointer;
  line-height: 1.4;
}
.plan-btn svg { flex-shrink: 0; }
.plan-btn-abort { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.6); }
.plan-btn-abort:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.9); }
.plan-btn-save { background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.28); color: #FCD34D; }
.plan-btn-save:hover { background: rgba(251,191,36,.24); border-color: rgba(251,191,36,.5); color: #FDE68A; }
.plan-btn-close { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.6); }
.plan-btn-close:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.9); }
.plan-btn-apply {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: 1px solid rgba(251,191,36,.4);
  color: #451a03; font-weight: 700;
  box-shadow: 0 2px 10px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
.plan-btn-apply:hover {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  box-shadow: 0 4px 16px rgba(245,158,11,.5), inset 0 1px 0 rgba(255,255,255,.25);
  transform: translateY(-1px);
}
.plan-btn-apply:active { transform: none; box-shadow: 0 1px 4px rgba(245,158,11,.3); }
.plan-btn-divider { width: 1px; height: 20px; background: rgba(255,255,255,.14); margin: 0 2px; flex-shrink: 0; }
body.plan-mode-active #app-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(245,158,11,.4) 15%, #F59E0B 35%, #FCD34D 50%, #F59E0B 65%, rgba(245,158,11,.4) 85%, transparent 100%);
  opacity: .8;
}
body.plan-mode-active #btn-plan { background: rgba(251,191,36,.2) !important; border-color: rgba(251,191,36,.45) !important; color: #FCD34D !important; }
body.plan-mode-active #btn-prev,
body.plan-mode-active #btn-next { opacity: .2; cursor: not-allowed; pointer-events: none; }
body.plan-mode-active .month-nav { border-color: rgba(245,158,11,.3); }
body.plan-mode-active #btn-import,
body.plan-mode-active #btn-employees { opacity: .3; cursor: not-allowed; pointer-events: none; }
body.plan-mode-active #grid-wrapper { box-shadow: inset 0 0 0 3px rgba(245,158,11,.35); outline: none; }
body.plan-mode-active .th-corner { background: linear-gradient(135deg, #3B1000 0%, #6B2100 100%); }
body.plan-mode-active .th-corner-inner::after {
  content: 'PLAN'; position: absolute; bottom: 4px; left: 14px;
  font-size: 7px; font-weight: 800; letter-spacing: .1em;
  color: #F59E0B; opacity: .7;
}
body.plan-mode-active .th-corner-inner { position: relative; }
body.plan-mode-active .td-cell.empty-wd .cell-inner::after { background: rgba(245,158,11,.28) !important; }
body.plan-mode-active .td-cell.empty-wd:hover .cell-inner::after { background: rgba(245,158,11,.5) !important; }
body.plan-mode-active #stats-bar { border-top: 2px solid rgba(245,158,11,.25); }
#modal-editor.plan-mode-editor .modal-hd,
#ed-modal-hd.plan-mode-hd { background: linear-gradient(180deg, #3B1000 0%, #78350F 100%); border-bottom-color: rgba(251,191,36,.15); }
.ed-plan-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(251,191,36,.18); border: 1px solid rgba(251,191,36,.35); color: #FCD34D;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
  letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0; vertical-align: middle;
}
#modal-editor.plan-mode-editor .preview-box { background: linear-gradient(135deg, #3B1000 0%, #6B2100 100%); border-color: rgba(251,191,36,.12); }
.cell-wish {
  position: absolute; bottom: 1px; left: 1px;
  font-size: 6px; font-weight: 900;
  padding: 0.5px 2.5px; border-radius: 2px; line-height: 1.3;
  pointer-events: none; letter-spacing: .02em; z-index: 1;
}
.cell-wish.wish-NO_DUTY { background: #FEE2E2; color: #991B1B; }
.cell-wish.wish-BD_WISH { background: #FEE2E2; color: #B91C1C; }
.cell-wish.wish-HG_WISH { background: #E0F2FE; color: #0369A1; }
.chip-wish {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; user-select: none;
  transition: all .12s;
}
.chip-wish:hover { filter: brightness(.88); transform: scale(1.03); }
.chip-wish.wish-on { box-shadow: 0 0 0 2px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.2); transform: scale(1.05); }
.wish-icon {
  font-family: var(--font-mono); font-size: 12px; font-weight: 900;
  width: 20px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.08);
}
.ap-sect-hd {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gray-500);
  margin: 0 0 8px; display: flex; align-items: center; gap: 8px;
}
.ap-sect-badge {
  font-family: var(--font-mono); font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: var(--radius-xs); line-height: 1.4;
  letter-spacing: .02em;
}
.ap-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); }
.ap-table { border-collapse: collapse; width: 100%; min-width: 440px; }
.ap-table thead tr { background: var(--gray-100); }
.ap-th, .ap-th-name, .ap-th-days {
  padding: 6px 10px; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray-500); text-align: center; white-space: nowrap;
  border-bottom: 2px solid var(--gray-200);
}
.ap-th-name { text-align: left; padding-left: 12px; min-width: 140px; }
.ap-th-days { text-align: left; min-width: 180px; }
.ap-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background .08s; }
.ap-table tbody tr:hover { background: var(--gray-50); }
.ap-td-name {
  padding: 7px 10px 7px 12px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--gray-800);
}
.ap-pos {
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  padding: 1px 5px; border-radius: var(--radius-xs); letter-spacing: .02em; line-height: 1.5;
}
.ap-td { padding: 7px 10px; text-align: center; vertical-align: middle; }
.ap-td-num { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.ap-td-days { padding: 7px 10px; vertical-align: middle; }
.ap-day-tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  padding: 1px 5px; border-radius: 10px;
  background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200);
  margin: 1px 2px; white-space: nowrap;
}
.ap-day-tag.ap-day-we { background: #FEF3C7; color: #78350F; border-color: #FDE68A; }
.ap-day-tag.ap-day-hol { background: #FDE68A; color: #451A03; border-color: #F59E0B; font-weight: 700; }
.ap-warnings { display: flex; flex-direction: column; gap: 4px; }
.ap-warn-item {
  padding: 6px 10px; border-radius: var(--radius-xs);
  background: #FEF3C7; color: #92400E;
  font-size: 11px; line-height: 1.4;
  border-left: 3px solid #F59E0B;
}
.ap-infos { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ap-info-item {
  padding: 6px 10px; border-radius: var(--radius-xs);
  background: #E0F2FE; color: #075985;
  font-size: 11px; line-height: 1.4;
  border-left: 3px solid #0EA5E9;
}
.plan-btn-auto {
  background: linear-gradient(135deg, rgba(14,165,233,.2) 0%, rgba(14,165,233,.12) 100%);
  border: 1px solid rgba(14,165,233,.35);
  color: #7DD3FC;
}
.plan-btn-auto:hover {
  background: linear-gradient(135deg, rgba(14,165,233,.32) 0%, rgba(14,165,233,.2) 100%);
  border-color: rgba(14,165,233,.55);
  color: #BAE6FD;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(14,165,233,.3);
}
.plan-btn-auto:active { transform: none; box-shadow: none; }
.ap-config-intro {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; margin-bottom: 14px;
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: var(--radius-sm); font-size: 11.5px; color: #92400E; line-height: 1.5;
}
.ap-exempt-note {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 14px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 11px; color: var(--gray-500); line-height: 1.4;
}
.ap-exempt-note strong { color: var(--gray-700); }
.ap-target-input {
  width: 52px; padding: 4px 6px; text-align: center;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--gray-800); background: var(--white);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.ap-target-input:focus { border-color: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.ap-target-input::-webkit-inner-spin-button { opacity: 1; }
.ap-total-row { background: var(--gray-100); border-top: 2px solid var(--gray-300); }
.ap-info-row td { border-top: 1px solid var(--gray-150); }
.ap-config-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  margin-top: 14px;
}
.ap-engine { display: flex; flex-direction: column; gap: 14px; }
.ap-pipeline {
  display: flex; align-items: center; gap: 0;
  padding: 12px 8px; background: var(--gray-50);
  border-radius: var(--radius); border: 1px solid var(--gray-200);
  overflow-x: auto; scrollbar-width: none;
  transform: translateZ(0);
}
.ap-pipeline::-webkit-scrollbar { display: none; }
.ap-phase-node {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0; padding: 0 8px; position: relative;
}
.ap-pn-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gray-200); border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  transition: all .4s cubic-bezier(.34,1.2,.64,1);
  position: relative;
  transform: translateZ(0);
}
.ap-pn-label {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray-400);
  white-space: nowrap; transition: color .3s;
}
.ap-phase-node.active .ap-pn-dot {
  background: #F59E0B; border-color: #FBBF24;
  box-shadow: 0 0 12px rgba(245,158,11,.5), 0 0 24px rgba(245,158,11,.2);
  transform: scale(1.2);
}
.ap-phase-node.active .ap-pn-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(245,158,11,.3); animation: apNodePulse 1.5s ease-in-out infinite;
}
@keyframes apNodePulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0; } }
.ap-phase-node.active .ap-pn-label { color: #D97706; font-weight: 800; }
.ap-phase-node.done .ap-pn-dot {
  background: #22C55E; border-color: #4ADE80;
  box-shadow: 0 0 6px rgba(34,197,94,.3);
}
.ap-phase-node.done .ap-pn-dot::before {
  content: '✓'; color: #fff; font-size: 10px; font-weight: 900;
}
.ap-phase-node.done .ap-pn-label { color: #15803D; }
.ap-phase-conn {
  flex: 1; min-width: 16px; height: 2px;
  background: var(--gray-200); border-radius: 1px;
  transition: background .4s;
}
.ap-phase-conn.done { background: linear-gradient(90deg, #22C55E, #4ADE80); }
.ap-live-stats {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: rgba(10,21,37,.55);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius); padding: 10px 16px;
  border: 1px solid rgba(14,165,233,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.02);
  transform: translateZ(0);
}
.ap-ls-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: 1; padding: 0 12px;
}
.ap-ls-val {
  font-family: var(--font-mono); font-size: 22px; font-weight: 800;
  line-height: 1; transition: all .3s;
}
.ap-ls-lbl {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.35);
}
.ap-ls-sep { width: 1px; height: 28px; background: rgba(255,255,255,.08); flex-shrink: 0; }
.ap-bar-wrap { position: relative; }
.ap-bar-track {
  height: 6px; border-radius: 3px; background: var(--gray-200);
  overflow: hidden; position: relative;
}
.ap-bar-fill {
  height: 100%; border-radius: 3px; width: 0%;
  background: linear-gradient(90deg, #F59E0B 0%, #FBBF24 50%, #F59E0B 100%);
  background-size: 200% 100%; animation: apBarShimmer 2s linear infinite;
  transition: width .35s cubic-bezier(.34,1.2,.64,1);
  transform: translateZ(0);
}
@keyframes apBarShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ap-bar-glow {
  position: absolute; top: -2px; left: 0; height: 10px; width: 0%;
  background: linear-gradient(90deg, transparent 80%, rgba(245,158,11,.4));
  filter: blur(4px); border-radius: 5px; pointer-events: none;
  transition: width .35s cubic-bezier(.34,1.2,.64,1);
  transform: translateZ(0);
}
.ap-bar-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
}
.ap-bar-phase {
  font-size: 11px; font-weight: 600; color: var(--gray-600);
  transition: color .2s;
}
.ap-bar-pct {
  font-family: var(--font-mono); font-size: 12px; font-weight: 800;
  color: #D97706;
}
.ap-terminal {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 4px 20px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.02);
  transform: translateZ(0);
}
.ap-term-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: rgba(26,26,46,.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.ap-term-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; opacity: .8; }
.ap-term-title {
  flex: 1; text-align: center; font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 500; color: rgba(255,255,255,.25);
  letter-spacing: .03em;
}
.ap-term-body {
  max-height: 260px; overflow-y: auto;
  background: rgba(10,10,20,.8);
  backdrop-filter: blur(8px);
  padding: 10px 12px; font-family: var(--font-mono); font-size: 10.5px;
  line-height: 1.6; color: #67E8F9;
}
.ap-term-body::-webkit-scrollbar { width: 4px; }
.ap-term-body::-webkit-scrollbar-thumb { background: rgba(103,232,249,.1); border-radius: 2px; }
.ap-log-entry {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 2px 0; animation: apLogIn .25s cubic-bezier(.34,1.2,.64,1);
  border-bottom: 1px solid rgba(103,232,249,.04);
  will-change: auto;
}
@keyframes apLogIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.ap-log-entry.ap-log-warn { color: #FCD34D; }
.ap-log-entry.ap-log-assign { color: rgba(103,232,249,.6); }
.ap-log-entry.ap-log-reason { color: rgba(251,191,36,.5); font-size: 9.5px; padding-left: 26px; border-bottom: none; }
.ap-log-entry.ap-log-vacation { color: #A78BFA; }
.ap-log-entry.ap-log-bundle { color: #34D399; font-weight: 500; }
.ap-log-entry.ap-log-success { color: #4ADE80; font-weight: 600; }
.ap-log-entry.ap-log-swap { color: #A855F7; font-weight: 600; }
.ap-log-entry.ap-log-rule { color: #38BDF8; font-style: italic; }
.ap-log-icon { flex-shrink: 0; width: 18px; text-align: center; }
.ap-log-msg { flex: 1; }
.ap-log-detail {
  color: rgba(103,232,249,.3); font-size: 9.5px;
  margin-left: auto; flex-shrink: 0; padding-left: 8px;
  white-space: nowrap;
}

.ap-report-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}
.ap-report-item {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: modalIn 0.3s ease-out backwards;
}
.ap-report-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ap-report-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.ap-report-emp {
  font-size: 12px;
  font-weight: 600;
  color: #E2E8F0;
}
.ap-report-duty {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.ap-report-duty.D {
  background: var(--red);
  color: #fff;
}
.ap-report-duty.HG {
  background: var(--blue-d);
  color: #fff;
}
.ap-report-body {
  font-size: 11.5px;
  color: #94A3B8;
  line-height: 1.5;
  padding-left: 8px;
  border-left: 2px solid rgba(255,255,255,0.1);
  margin-top: 4px;
}
.ap-report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.ap-report-tag {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(14,165,233,0.15);
  color: #7DD3FC;
  border: 1px solid rgba(14,165,233,0.3);
}

@media (max-width: 1200px) {
  .brand-sub { display: none; }
  #month-label { min-width: 100px; font-size: 13px; }
  .hbtn-lbl { display: none; }
  .hbtn { padding: 6px 8px; }
  .plan-bar-hint { display: none; }
  .plan-bar-month { font-size: 11px; }
}
@media (max-width: 768px) {
  :root { --header-h: 48px; --name-w: 140px; --cell-w: 40px; --row-h: clamp(36px, 4.5vh, 50px); }
  .brand-text { display: none; }
  .brand { gap: 0; }
  #month-label { min-width: 80px; font-size: 12px; }
  .nav-btn { padding: 2px 6px; font-size: 16px; }
  .header-actions { gap: 3px; }
  .hbtn { padding: 5px 7px; font-size: 11px; }
  .hbtn-divider { display: none; }
  #stats-bar { padding: 0 8px; }
  .stat-item { padding: 0 8px; }
  .stat-label-sm { display: none; }
  #plan-bar { gap: 8px; padding: 0 8px; flex-wrap: wrap; height: auto; min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
  .plan-bar-left { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .plan-bar-center { gap: 2px; }
  .plan-bar-right { gap: 3px; }
  .plan-btn { padding: 5px 8px; font-size: 11px; }
  .plan-btn span:not(svg):not(.plan-btn-icon) { display: none; }
  .plan-hist-btn { padding: 4px 8px; font-size: 10px; }
  .plan-hist-btn span { display: none; }
  .modal { border-radius: var(--radius); max-height: 95vh; }
  .modal-hd { padding: 12px 14px; }
  .modal-bd { padding: 14px; }
  .modal-ft { padding: 10px 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .mcd-grid { max-width: 100%; }
  .yr-kpi-strip { flex-wrap: wrap; }
  .yr-kpi-item { min-width: 80px; }
  .yr-kpi-div { display: none; }
  .dept-cov-strip { flex-direction: column; }
  .dept-cov-meta { flex-direction: row; border-right: none; border-bottom: 1px solid var(--gray-200); padding: 0 0 12px; margin-bottom: 4px; }
  .ap-pipeline { padding: 8px 4px; }
  .ap-pn-label { font-size: 7px; }
  .ap-ls-val { font-size: 18px; }
  .ap-ls-item { padding: 0 8px; }
}
@media (max-width: 480px) {
  :root { --header-h: 44px; --name-w: 110px; --cell-w: 36px; --row-h: clamp(32px, 4.5vh, 44px); --foot-h: 26px; }
  .brand-icon { width: 28px; height: 28px; font-size: 10px; }
  .month-nav { padding: 3px 4px; }
  #month-label { min-width: 70px; font-size: 11px; }
  .nav-btn { padding: 2px 4px; font-size: 14px; }
  .header-actions { gap: 2px; }
  .hbtn { padding: 4px 6px; }
  .cell-assign { font-size: 8px; }
  .td-name { padding: 0 4px 0 6px; }
  .emp-label { font-size: 11px; }
  .emp-pos-tag { font-size: 7.5px; padding: 1px 3px; }
  .emp-profile-icon { display: none; }
  .d-num { font-size: 12px; }
  .d-dow { font-size: 8px; }
  .d-kw { font-size: 6px; }
  .th-day-inner { height: 48px; }
  .th-corner-inner { height: 48px; font-size: 8px; }
  .plan-badge { padding: 3px 8px 3px 6px; font-size: 9px; }
  .plan-bar-month { display: none; }
  .plan-btn-auto { font-size: 10px !important; padding: 4px 6px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}