/* ───────── Calendly-inspired design system ───────── */
:root {
  --navy: #0b3558;
  --blue: #006bff;
  --blue-dark: #004eba;
  --slate: #476788;
  --carbon: #0a0a0a;
  --paper: #ffffff;
  --mist: #f8f9fb;
  --fog: #e7edf6;
  --border: #d4e0ed;
  --silver: #e6e6e6;
  --steel: #a6bbd1;
  --magenta: #e55cff;
  --violet: #8247f5;
  --amber: #ffa600;
  --cyan: #0099ff;

  --shadow-card: rgba(71,103,136,.04) 0 4px 5px 0, rgba(71,103,136,.03) 0 8px 15px 0, rgba(71,103,136,.08) 0 30px 50px 0;
  --shadow-soft: rgba(71,103,136,.04) 0 4px 5px 0, rgba(71,103,136,.03) 0 4px 10px 0, rgba(71,103,136,.05) 0 10px 20px 0;
  --shadow-btn: rgba(0,107,255,.18) 0 6px 16px 0, rgba(71,103,136,.06) 0 2px 5px 0;

  --r-btn: 4px; --r-card: 8px; --r-mock: 16px; --r-pill: 50px;
  --max: 1120px;
  --font: 'Pretendard', 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', '맑은 고딕', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--mist);
  color: var(--carbon);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--silver);
}
.nav-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); font-size: 19px; letter-spacing: -.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  display: grid; place-items: center; color: #fff; font-size: 16px;
  box-shadow: var(--shadow-btn);
}
.brand small { display:block; font-weight:500; font-size:11px; color: var(--steel); letter-spacing: 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link { color: var(--navy); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: var(--r-btn); }
.nav-link:hover { background: var(--fog); }

/* ───────── Buttons ───────── */
.btn {
  font-family: inherit; font-weight: 600; font-size: 16px;
  border: none; border-radius: var(--r-btn); cursor: pointer;
  padding: 12px 24px; transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: #0a5cff; }
.btn-primary:disabled { background: var(--steel); cursor: not-allowed; box-shadow: none; opacity: .8; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--fog); }
.btn-lg { padding: 15px 30px; font-size: 17px; }
.btn-block { width: 100%; }

/* ───────── Hero ───────── */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--fog); color: var(--blue-dark);
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: var(--r-pill);
  margin-bottom: 20px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
h1.display {
  font-size: 52px; line-height: 1.1; font-weight: 700; color: var(--navy);
  letter-spacing: -.03em; margin-bottom: 20px;
}
.hero p.lead { font-size: 19px; color: var(--slate); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; align-items: center; }
.hero-note { font-size: 13px; color: var(--steel); margin-top: 18px; display: flex; align-items: center; gap: 6px; }

/* decorative blob */
.blob {
  position: absolute; filter: blur(60px); opacity: .5; z-index: 0; pointer-events: none;
  border-radius: 50%;
}
.blob-1 { width: 460px; height: 420px; right: -60px; top: -40px;
  background: radial-gradient(circle at 30% 30%, var(--magenta), transparent 60%),
              radial-gradient(circle at 70% 70%, var(--violet), transparent 60%); }
.blob-2 { width: 360px; height: 340px; right: 180px; top: 220px;
  background: radial-gradient(circle at 50% 50%, var(--cyan), transparent 62%),
              radial-gradient(circle at 80% 20%, var(--amber), transparent 55%); opacity: .35; }

/* ───────── Upload card (product mock) ───────── */
.mock {
  position: relative; z-index: 1; background: var(--paper);
  border-radius: var(--r-mock); box-shadow: var(--shadow-card);
  padding: 22px;
}
.mock-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 16px; border-bottom: 1px solid var(--fog); margin-bottom: 18px; }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.mock-dots i:nth-child(1){ background:#ff5f57; } .mock-dots i:nth-child(2){ background:#febc2e; } .mock-dots i:nth-child(3){ background:#28c840; }
.mock-title { font-size: 13px; color: var(--slate); font-weight: 600; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--r-card);
  padding: 36px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--mist);
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #f3f8ff; }
.dropzone .up-ico {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--fog); color: var(--blue); display: grid; place-items: center;
}
.dropzone .up-ico svg { width: 26px; height: 26px; }
.dropzone h3 { font-size: 17px; color: var(--navy); font-weight: 600; margin-bottom: 4px; }
.dropzone p { font-size: 13px; color: var(--steel); }
.dropzone .pick { color: var(--blue); font-weight: 600; }

/* file list */
.files { list-style: none; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--r-card); background: #fff;
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.file-row .fico { width: 34px; height: 34px; border-radius: 8px; background: var(--fog); color: var(--blue-dark); display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 700; }
.file-row.err .fico { background: #fdeaea; color: #d64545; }
.file-meta { flex: 1; min-width: 0; }
.file-meta .name { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta .sub { font-size: 12px; color: var(--slate); }
.file-meta .sub.bad { color: #d64545; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: var(--fog); color: var(--blue-dark); flex: none; }
.file-x { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; border-radius: 6px; flex: none; }
.file-x:hover { background: var(--fog); color: var(--navy); }

.mock-foot { margin-top: 18px; }

/* result panel */
.result { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; display: none; }
.result.show { display: block; animation: pop .25s ease; }
.result-head { background: linear-gradient(120deg, #eafff4, #eef5ff); padding: 16px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--fog); }
.result-head .ok { width: 36px; height: 36px; border-radius: 50%; background: #28c840; color: #fff; display: grid; place-items: center; flex: none; }
.result-head .ttl { font-weight: 700; color: var(--navy); font-size: 15px; }
.result-head .sub { font-size: 12px; color: var(--slate); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--fog); }
.stat { background: #fff; padding: 14px 12px; text-align: center; }
.stat .v { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.stat .l { font-size: 11px; color: var(--slate); margin-top: 2px; }

/* ───────── Sections ───────── */
.section { padding: 72px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--silver); border-bottom: 1px solid var(--silver); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: 38px; line-height: 1.2; color: var(--navy); font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }
.section-head p { font-size: 18px; color: var(--slate); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px 24px; box-shadow: var(--shadow-soft); }
.step .num { width: 34px; height: 34px; border-radius: var(--r-btn); background: var(--blue); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 16px; }
.step h3 { font-size: 19px; color: var(--navy); font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--slate); }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.feat { display: flex; gap: 14px; }
.feat .ic { width: 26px; height: 26px; color: var(--blue); flex: none; }
.feat h4 { font-size: 18px; color: var(--navy); font-weight: 600; margin-bottom: 4px; }
.feat p { font-size: 15px; color: var(--slate); }

/* ───────── Footer ───────── */
.footer { background: var(--mist); border-top: 1px solid var(--silver); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer .brand { font-size: 16px; }
.footer p { font-size: 13px; color: var(--steel); }

/* ───────── Toast ───────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--r-card);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-card); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #c0392b; }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .hero-grid, .features { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  h1.display { font-size: 38px; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 30px; }
  .blob-1, .blob-2 { display: none; }
}

/* ════════════ 대시보드(워크스페이스) ════════════ */
.workspace { padding: 28px 0 64px; min-height: 60vh; }
.ws-hidden { display: none; }
.ws-head { margin-bottom: 20px; }
.ws-title { font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.ws-sub { font-size: 15px; color: var(--slate); margin-top: 4px; }
.table-hint { font-size: 12.5px; color: var(--steel); margin-top: 12px; }
.filter-controls { display: contents; }
.empty-zone { max-width: 640px; margin: 8px auto 0; }

/* ════════════ 모달 ════════════ */
.modal-overlay { position: fixed; inset: 0; background: rgba(11,53,88,.42); backdrop-filter: blur(2px); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: var(--r-mock); box-shadow: var(--shadow-card); width: min(540px, 96vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; animation: pop .18s ease; }
.modal-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--fog); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { border: none; background: var(--fog); color: var(--navy); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 16px; flex: none; }
.modal-close:hover { background: var(--border); }
.month-pick { display: flex; flex-direction: column; gap: 8px; }
.month-pick label { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-card); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--navy); transition: background .12s, border-color .12s; }
.month-pick label:hover { background: var(--mist); border-color: var(--steel); }
.month-pick label.on { border-color: var(--blue); background: #f3f8ff; }
.month-pick input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }
.month-pick .sub { font-weight: 400; color: var(--slate); font-size: 12.5px; }
.month-pick .ph { margin-left: auto; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); }
.month-pick .ph.b { background: var(--fog); color: var(--blue-dark); }
.month-pick .ph.a { background: #eafaf1; color: #1c7a4a; }
.pick-tools { display: flex; gap: 8px; margin-bottom: 12px; }
.pick-tools button { font-size: 12.5px; color: var(--blue); background: none; border: none; cursor: pointer; font-weight: 600; padding: 2px 4px; }
.pick-tools button:hover { text-decoration: underline; }

/* 툴바 */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .search input {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--carbon);
  padding: 11px 14px 11px 40px; border: 1px solid var(--border); border-radius: var(--r-btn);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.toolbar .search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,107,255,.12); }
.toolbar .search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--steel); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--fog); border-color: var(--steel); }
.btn-danger-ghost { background: transparent; color: #c0392b; border: 1px solid transparent; }
.btn-danger-ghost:hover { background: #fdeaea; }
.toolbar .spacer { flex: 1; min-width: 0; }
.filter-select {
  font-family: inherit; font-size: 14px; color: var(--navy); padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: #fff; cursor: pointer; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.filter-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,107,255,.12); }
.result-count { font-size: 13px; color: var(--slate); white-space: nowrap; }
.result-count b { color: var(--navy); }
/* 정렬 가능한 헤더 */
table.data thead th.sortable { cursor: pointer; user-select: none; }
table.data thead th.sortable:hover { background: #e3eefb; }
table.data thead th .sort-ind { color: var(--blue); font-size: 10px; margin-left: 3px; }
table.data thead th.sortable.active { color: var(--blue); }
.chips-filter { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chip-toggle {
  font-size: 12.5px; font-weight: 600; color: var(--slate); background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px; cursor: pointer; transition: all .12s;
}
.chip-toggle:hover { border-color: var(--steel); }
.chip-toggle.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 통계 카드 — 화면 너비에 균등 분할 + 콤팩트 */
.ws-stats { display: flex; gap: 10px; margin-bottom: 14px; width: 100%; }
.ws-stat { flex: 1 1 0; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 9px 16px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; justify-content: center; }
.ws-stat .v { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; }
.ws-stat .v small { font-size: 12px; font-weight: 600; }
.ws-stat .l { font-size: 11.5px; color: var(--slate); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-stat.accent { background: linear-gradient(120deg, #eef5ff, #eafff4); }
@media (max-width: 640px) { .ws-stats { flex-wrap: wrap; } .ws-stat { flex: 1 1 40%; } }

/* 데이터 테이블 */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); overflow: auto; box-shadow: var(--shadow-soft); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.data thead th {
  position: sticky; top: 0; z-index: 2; background: #f1f6fc; color: var(--navy);
  font-weight: 600; font-size: 12.5px; text-align: center; padding: 11px 10px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data thead .grp { background: #e7f0fb; font-size: 11px; letter-spacing: .03em; color: var(--blue-dark); padding: 6px; }
table.data thead .grp.after { background: #eafaf1; color: #1c7a4a; }
table.data tbody td { padding: 10px; border-bottom: 1px solid var(--fog); text-align: center; color: var(--slate); white-space: nowrap; }
table.data tbody tr { cursor: pointer; transition: background .12s; }
table.data tbody tr:hover { background: #f3f8ff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.name { text-align: left; font-weight: 600; color: var(--navy); }
table.data td.name .chev { color: var(--steel); margin-left: 6px; font-size: 11px; }
table.data td.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--carbon); }
table.data td.num.zero { color: var(--steel); font-weight: 400; }
table.data td.idx { color: var(--steel); font-size: 13px; }
.col-before { background: rgba(0,107,255,.03); }
.col-after { background: rgba(40,200,100,.04); }
.empty-row td { text-align: center; padding: 36px; color: var(--steel); }

.phase-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); }
.phase-badge.b { background: var(--fog); color: var(--blue-dark); }
.phase-badge.a { background: #eafaf1; color: #1c7a4a; }

/* 파일칩 (업로드된 달) */
.filechips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filechip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 8px 6px 14px; font-size: 13px; color: var(--navy); }
.filechip b { font-weight: 600; }
.filechip .ph { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); }
.filechip .ph.b { background: var(--fog); color: var(--blue-dark); } .filechip .ph.a { background: #eafaf1; color: #1c7a4a; }
.filechip .x { border: none; background: none; color: var(--steel); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 5px; }
.filechip .x:hover { background: var(--fog); color: #c0392b; }
.filechip.err { border-color: #f3c9c9; background: #fdf3f3; color: #c0392b; }

/* 빈 상태(업로드 카드) */
.empty-state { padding: 40px 0 64px; }
.empty-card { max-width: 620px; margin: 0 auto; }

/* ════════════ 상세 드로어(로우데이터) ════════════ */
.drawer-overlay { position: fixed; inset: 0; background: rgba(11,53,88,.38); backdrop-filter: blur(2px); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(880px, 96vw);
  background: var(--mist); z-index: 81; box-shadow: -20px 0 60px rgba(11,53,88,.2);
  transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head { background: #fff; border-bottom: 1px solid var(--border); padding: 20px 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.drawer-head .who h3 { font-size: 22px; color: var(--navy); font-weight: 700; letter-spacing: -.02em; }
.drawer-head .who p { font-size: 14px; color: var(--slate); margin-top: 3px; }
.drawer-head .who .tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.drawer-close { border: none; background: var(--fog); color: var(--navy); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 18px; flex: none; }
.drawer-close:hover { background: var(--border); }
.drawer-body { overflow-y: auto; padding: 20px 24px 60px; flex: 1; }

.month-block { margin-bottom: 26px; }
.month-block h4 { font-size: 15px; color: var(--navy); font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.month-block .msum { font-size: 12.5px; color: var(--slate); margin-bottom: 10px; }
.month-block .msum b { color: var(--blue-dark); }
.daytable-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); overflow: auto; }
table.daytable { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
table.daytable th { background: #f1f6fc; color: var(--navy); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
table.daytable td { padding: 7px 8px; border-bottom: 1px solid var(--fog); text-align: center; color: var(--slate); white-space: nowrap; }
table.daytable td.dt { font-weight: 600; color: var(--navy); text-align: left; }
table.daytable td.raw { color: var(--carbon); font-variant-numeric: tabular-nums; }
table.daytable tr.sun td.dt { color: #c0392b; }
table.daytable tr.sat td.dt { color: var(--blue-dark); }
table.daytable td .wt { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); }
.wt.work { background: #eafaf1; color: #1c7a4a; }
.wt.off { background: #f0f2f5; color: #8a98a8; }
.wt.holi { background: #fdeeee; color: #c0392b; }
.wt.leave { background: #fff4e0; color: #b7791f; }
.wt.none { color: var(--steel); }

@media (max-width: 900px) {
  .workspace { padding-top: 14px; }
  .drawer { width: 100vw; }
}

/* ════════════ 레이아웃: 페이지 고정 + 테이블 자체 스크롤 ════════════ */
html, body { height: 100%; }
body { overflow: hidden; display: flex; flex-direction: column; }
.nav { flex: none; }
.workspace { flex: 1 1 auto; min-height: 0; padding: 20px 0 0; }
.workspace > .container { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.workspace .ws-stats, .workspace .toolbar { flex: none; }
.workspace .table-wrap { flex: 1 1 auto; min-height: 0; margin-bottom: 7px; }
.empty-zone { margin: auto; width: 100%; max-width: 640px; }
.footer { flex: none; padding: 18px 0; }
.filter-select.strong { font-weight: 700; color: var(--navy); border-color: var(--steel); }

/* ════════════ 테이블 v2: 풀그리드 · 중앙정렬 · 고정 불투명 헤더 ════════════ */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); overflow: auto; box-shadow: var(--shadow-soft); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 680px; }
table.data th, table.data td {
  text-align: center; white-space: nowrap; padding: 10px 12px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
table.data th:first-child, table.data td:first-child { border-left: 1px solid var(--border); }
table.data thead th {
  position: sticky; top: 0; z-index: 5;
  background: #e9f1fb; color: var(--navy); font-weight: 600; font-size: 13px;
  border-top: 1px solid var(--border); border-bottom: 2px solid var(--mist-border);
}
table.data thead th.sortable { cursor: pointer; }
table.data thead th.sortable:hover { background: #dde9f8; }
table.data thead th.active { color: var(--blue); }
table.data tbody td { color: var(--slate); }
table.data tbody td.name { text-align: center; font-weight: 600; color: var(--navy); }
table.data tbody td.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--carbon); }
table.data tbody tr { cursor: pointer; transition: background .1s; }
table.data tbody tr:hover { background: #f3f8ff; }
table.data tbody tr.sel { background: #eaf3ff; }
table.data .chev { color: var(--steel); font-size: 11px; margin-left: 5px; }
/* 체크박스 / 관리 열 */
table.data .chk-col { width: 46px; }
table.data .chk-col input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; vertical-align: middle; margin: 0; }
table.data .manage-col { width: 84px; }
.row-del { font-size: 12px; font-weight: 600; color: #c0392b; background: #fdeaea; border: none; border-radius: 6px; padding: 5px 13px; cursor: pointer; transition: background .1s; }
.row-del:hover { background: #f8d2d2; }
.empty-row td { text-align: center; padding: 40px; color: var(--steel); }
table.data td.ym { font-weight: 600; color: var(--blue-dark); font-size: 13px; }

/* 전체 삭제·선택 삭제 버튼 테두리 */
.btn-danger-ghost { border: 1px solid #f0cccc; background: #fff; }
.btn-danger-ghost:hover { background: #fdeaea; border-color: #e9b3b3; }

/* 페이지네이션 */
.pager { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px 2px; flex-wrap: wrap; }
.pg-info { font-size: 13px; color: var(--slate); }
.pg-info b { color: var(--navy); }
.pg-ctrl { display: flex; gap: 4px; flex-wrap: wrap; }
.pg-num, .pg-nav { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--navy); font-family: inherit; }
.pg-num.on { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.pg-num:hover:not(.on), .pg-nav:hover:not(:disabled) { background: var(--fog); }
.pg-nav:disabled { opacity: .4; cursor: default; }

/* ════════════ 년월 멀티셀렉트(드롭다운+검색+체크박스) ════════════ */
.ms { position: relative; }
.ms-trigger { cursor: pointer; text-align: left; min-width: 150px; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; font-family: inherit; }
.ms-trigger .caret { color: var(--steel); font-size: 11px; }
.ms-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-card); width: 250px; padding: 8px; }
.ms-panel[hidden] { display: none; }
.ms-search { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; outline: none; margin-bottom: 6px; }
.ms-search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,107,255,.1); }
.ms-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.ms-tools button { flex: 1; font-size: 12px; color: var(--blue); background: var(--fog); border: none; border-radius: 6px; padding: 6px; cursor: pointer; font-weight: 600; font-family: inherit; }
.ms-tools button:hover { background: #dde9f8; }
.ms-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ms-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--navy); }
.ms-opt:hover { background: var(--mist); }
.ms-opt input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.ms-opt .ph { margin-left: auto; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); }
.ms-opt .ph.b { background: var(--fog); color: var(--blue-dark); }
.ms-opt .ph.a { background: #eafaf1; color: #1c7a4a; }
.ms-empty { font-size: 12.5px; color: var(--steel); text-align: center; padding: 14px; }

/* ════════════ 직원 상세 모달 ════════════ */
.modal-lg { width: min(940px, 96vw); }
.dw-who h3 { font-size: 21px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.dw-who p { font-size: 13.5px; color: var(--slate); margin-top: 3px; }
.dw-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.dw-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.detail-search { position: relative; width: 280px; max-width: 60%; flex: none; }
.detail-search input { width: 100%; padding: 9px 12px 9px 38px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; color: var(--carbon); outline: none; transition: border-color .15s, box-shadow .15s; }
.detail-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,107,255,.12); }
.detail-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--steel); }
.detail-wrap { border: 1px solid var(--border); border-radius: var(--r-card); overflow: auto; max-height: 50vh; }
#detailPager { padding-top: 8px; }
/* 일자 테이블: 중앙정렬 + 풀그리드 + 고정 불투명 헤더 */
table.daytable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 720px; }
table.daytable th, table.daytable td { text-align: center; white-space: nowrap; padding: 7px 9px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--slate); }
table.daytable th:first-child, table.daytable td:first-child { border-left: 1px solid var(--border); }
table.daytable thead th { position: sticky; top: 0; z-index: 3; background: #e9f1fb; color: var(--navy); font-weight: 600; border-top: 1px solid var(--border); }
table.daytable td.ym { font-weight: 600; color: var(--blue-dark); }
table.daytable td.raw { color: var(--carbon); font-variant-numeric: tabular-nums; }
table.daytable tr.sun td.dt { color: #c0392b; }
table.daytable tr.sat td.dt { color: var(--blue-dark); }
table.daytable tbody tr:hover { background: #f6f9fe; }

