:root {
  --ink: #17201d;
  --muted: #66736e;
  --line: #dce4df;
  --paper: #f3f6f3;
  --card: #ffffff;
  --green: #0f6b4f;
  --green-2: #1b8a68;
  --lime: #dff35d;
  --amber: #f3a83b;
  --red: #c34a45;
  --nav: #13241f;
  --shadow: 0 18px 50px rgba(20, 49, 39, .08);
  --sidebar-collapsed: 72px;
  --sidebar-expanded: 210px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--green); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--lime); color: var(--nav); font-weight: 950; letter-spacing: -.08em; }
.brand-mark.large { width: 112px; height: 112px; border-radius: 28px; font-size: 40px; }
.status-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: #4fe0a7; box-shadow: 0 0 0 4px rgba(79,224,167,.12); }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(460px, .95fr); background: var(--nav); }
.login-art { position: relative; overflow: hidden; padding: clamp(50px, 7vw, 110px); color: white; display: flex; flex-direction: column; justify-content: center; }
.login-art::before { content: ""; position: absolute; width: 680px; height: 680px; border: 1px solid rgba(223,243,93,.16); border-radius: 50%; right: -280px; top: -220px; box-shadow: 0 0 0 110px rgba(223,243,93,.035), 0 0 0 220px rgba(223,243,93,.025); }
.login-art p { position: relative; margin: 30px 0; font-size: clamp(32px, 4vw, 64px); line-height: .96; font-weight: 850; letter-spacing: -.04em; }
.route-line { display: flex; align-items: center; gap: 0; width: 75%; margin-top: 34px; }
.route-line::before, .route-line::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,.26); }
.route-line span { width: 14px; height: 14px; border: 3px solid var(--nav); outline: 1px solid var(--lime); background: var(--lime); border-radius: 50%; margin: 0 11%; }
.login-card { background: #fff; padding: clamp(54px, 8vw, 130px); display: flex; flex-direction: column; justify-content: center; }
.login-card h1 { font-size: clamp(38px, 5vw, 68px); line-height: 1.04; margin: 18px 0 22px; letter-spacing: -.055em; }
.login-description { color: var(--muted); max-width: 490px; line-height: 1.7; margin: 0 0 34px; }
.login-card form { max-width: 460px; display: grid; gap: 10px; }
.login-card label { font-size: 13px; font-weight: 750; margin-top: 8px; }
input, select { border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); min-height: 42px; padding: 0 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(27,138,104,.12); }
.login-card input { min-height: 52px; }
.form-error { color: var(--red); min-height: 22px; font-size: 13px; }
.login-footnote { margin-top: 22px; color: var(--muted); font-size: 12px; }

.primary, .secondary { border: 0; border-radius: 9px; min-height: 42px; padding: 0 17px; font-weight: 780; transition: transform .15s, background .15s; }
.primary { color: #fff; background: var(--green); box-shadow: 0 8px 18px rgba(15,107,79,.16); }
.primary:hover { background: #0b5a43; transform: translateY(-1px); }
.secondary { color: var(--ink); background: #edf2ee; border: 1px solid #dce6df; }
.secondary:hover { background: #e4ebe6; }
.wide { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.text-button { background: transparent; border: 0; color: var(--green); font-weight: 760; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr); transition: grid-template-columns .2s ease; }
.app-shell.sidebar-pinned { grid-template-columns: var(--sidebar-expanded) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 20; width: var(--sidebar-collapsed); height: 100vh; overflow: hidden; background: var(--nav); color: white; padding: 20px 10px; display: flex; flex-direction: column; transition: width .2s ease, padding .2s ease, box-shadow .2s ease; }
.app-shell.sidebar-expanded .sidebar { width: var(--sidebar-expanded); padding-inline: 14px; }
.app-shell.sidebar-expanded:not(.sidebar-pinned) .sidebar { box-shadow: 18px 0 38px rgba(8, 22, 17, .2); }
.sidebar-brand { display: flex; align-items: center; justify-content: center; gap: 0; padding: 0 0 16px; }
.app-shell.sidebar-expanded .sidebar-brand { justify-content: flex-start; gap: 12px; padding-inline: 10px; }
.sidebar-brand .brand-mark { flex: 0 0 44px; }
.sidebar-brand strong { display: block; font-size: 17px; }
.sidebar-brand small { display: block; color: #8ea49b; font-size: 9px; letter-spacing: .13em; margin-top: 4px; }
.sidebar-brand-copy, .sidebar-label, .sidebar-note-copy { max-width: 0; overflow: hidden; opacity: 0; transform: translateX(-6px); white-space: nowrap; transition: max-width .2s ease, opacity .14s ease, transform .2s ease; }
.app-shell.sidebar-expanded .sidebar-brand-copy, .app-shell.sidebar-expanded .sidebar-label, .app-shell.sidebar-expanded .sidebar-note-copy { max-width: 160px; opacity: 1; transform: translateX(0); }
.sidebar-pin { width: 100%; min-height: 34px; margin-bottom: 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 9px; color: #9eb0a9; background: rgba(255,255,255,.025); display: flex; align-items: center; justify-content: center; gap: 0; font-size: 11px; font-weight: 800; }
.app-shell.sidebar-expanded .sidebar-pin { justify-content: flex-start; gap: 10px; padding: 0 13px; }
.sidebar-pin:hover { color: white; background: rgba(255,255,255,.07); }
.sidebar-pin[aria-pressed="true"] { color: var(--lime); border-color: rgba(223,243,93,.28); background: rgba(223,243,93,.08); }
.pin-icon { flex: 0 0 20px; font-size: 16px; line-height: 1; text-align: center; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { width: 100%; color: #b7c6c0; background: transparent; border: 0; border-radius: 10px; padding: 13px 0; text-align: left; font-weight: 700; display: flex; justify-content: center; gap: 0; align-items: center; }
.app-shell.sidebar-expanded .nav-item { justify-content: flex-start; gap: 12px; padding-inline: 14px; }
.nav-icon { flex: 0 0 20px; width: 20px; color: #80938b; font-size: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.05); color: white; }
.nav-item.active { color: var(--nav); background: var(--lime); }
.nav-item.active .nav-icon { color: var(--nav); }
.sidebar-note { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; align-items: center; justify-content: center; gap: 0; }
.app-shell.sidebar-expanded .sidebar-note { justify-content: flex-start; gap: 12px; padding-inline: 10px; }
.sidebar-note .status-dot { flex: 0 0 9px; }
.sidebar-note b, .sidebar-note small { display: block; }
.sidebar-note b { font-size: 12px; }
.sidebar-note small { color: #93a79e; margin-top: 4px; }
.logout-button { width: 100%; color: #a7b7b0; background: transparent; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 0; }
.app-shell.sidebar-expanded .logout-button { gap: 9px; }
.logout-icon { flex: 0 0 20px; font-size: 17px; }

.workspace { min-width: 0; padding: 28px 34px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.topbar h1 { margin: 6px 0 0; font-size: 30px; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: flex-end; gap: 9px; }
.date-control { font-size: 11px; font-weight: 750; color: var(--muted); display: grid; gap: 5px; }
.view { display: none; }
.view.active { display: block; }
.date-summary { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.date-summary strong { font-size: 15px; }
.date-summary span { color: var(--muted); font-size: 12px; }
.summary-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-bottom: 14px; }
.summary-toolbar h2 { margin: 5px 0; font-size: 22px; }
.summary-toolbar p { margin: 0; color: var(--muted); font-size: 11px; }
.summary-toolbar-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.summary-toolbar-actions label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -28px; bottom: -42px; width: 110px; height: 110px; border-radius: 50%; background: rgba(15,107,79,.055); }
.stat-card.accent { background: var(--green); color: white; border-color: var(--green); }
.stat-card.accent::after { background: rgba(223,243,93,.16); }
.stat-card.warning::after { background: rgba(243,168,59,.13); }
.stat-card span { display: block; color: inherit; opacity: .72; font-size: 12px; font-weight: 700; }
.stat-card strong { display: inline-block; margin-top: 10px; font-size: 36px; letter-spacing: -.05em; }
.stat-card small { margin-left: 5px; opacity: .65; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.panel.compact { border-radius: 12px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.panel-heading { padding: 20px 22px 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.03em; }
.bar-chart { min-height: 230px; padding: 18px 22px 24px; display: grid; align-content: center; gap: 14px; }
.bar-item { display: grid; grid-template-columns: 80px minmax(0,1fr) 34px; align-items: center; gap: 10px; font-size: 12px; font-weight: 730; }
.bar-track { height: 11px; border-radius: 20px; background: #edf1ee; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--green-2); min-width: 4px; }
.bar-item:nth-child(2n) .bar-fill { background: #5aa68b; }
.dashboard-table-panel { margin-top: 14px; }
.count-pill { background: #edf3ef; color: var(--green); border-radius: 30px; padding: 5px 10px; font-size: 11px; font-weight: 800; }
.count-pill.danger { color: #a63f32; background: #ffe0dc; }
.floor-check-panel, .pending-deadline-panel { min-height: 310px; }
.floor-check-actions { display: flex; align-items: center; gap: 10px; }
.floor-check-rule { display: -webkit-box; margin: 0; padding: 0 22px 12px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.floor-check-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 22px 14px; }
.floor-check-summary > span { display: grid; align-content: space-between; gap: 4px; min-width: 0; padding: 9px 10px; border: 1px solid #dce6df; border-radius: 10px; background: #f6faf7; }
.floor-check-summary small { color: var(--muted); font-size: 10px; font-weight: 800; }
.floor-check-summary strong { color: var(--green); font-size: 17px; }
.floor-check-summary.has-missing > span:last-child { border-color: #efb4ad; background: #fff0ed; }
.floor-check-summary.has-missing > span:last-child strong { color: #b34235; }
.floor-check-list { max-height: 175px; overflow: auto; padding: 0 22px 22px; }
.floor-check-list.empty-state, .floor-check-ok, .floor-check-error { display: grid; place-items: center; min-height: 90px; margin: 0 22px 22px; padding: 18px; border-radius: 10px; }
.floor-check-ok { color: #08684d; background: #e5f5ed; font-size: 12px; font-weight: 850; text-align: center; }
.floor-check-error { color: #a53c31; background: #fff0ed; font-size: 12px; font-weight: 800; text-align: center; }
.floor-check-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid #e6ece8; }
.floor-check-date { color: #9b4338; font-size: 12px; font-weight: 900; }
.floor-check-details { min-width: 0; display: grid; gap: 3px; }
.floor-check-details b, .floor-check-details small, .floor-check-details em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-check-details b { color: #172d25; font-size: 12px; }
.floor-check-details small { color: #4e625a; font-size: 10px; }
.floor-check-details em { color: #8d6100; font-size: 10px; font-style: normal; }
.floor-check-status { justify-self: end; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.floor-check-status.missing { color: #a53c31; background: #ffe1dd; }
.floor-check-status.incomplete { color: #8b5a00; background: #ffedbe; }
.pending-deadline-actions { display: flex; align-items: center; gap: 10px; }
.pending-deadline-rule { margin: 0; padding: 0 22px 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pending-deadline-list { max-height: 215px; overflow: auto; padding: 0 22px 22px; }
.pending-deadline-list.empty-state { display: grid; place-items: center; min-height: 145px; margin: 0 22px 22px; padding: 18px; border-radius: 10px; background: #f6faf7; }
.pending-deadline-list.pending-deadline-error { display: grid; place-items: center; min-height: 145px; margin: 0 22px 22px; padding: 18px; border-radius: 10px; color: #a53c31; background: #fff0ed; font-size: 12px; font-weight: 800; text-align: center; }
.pending-deadline-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 11px 0; border-top: 1px solid #e6ece8; }
.pending-deadline-row:first-child { border-top: 0; }
.pending-deadline-row.due-today { margin: 0 -8px; padding-right: 8px; padding-left: 8px; border-radius: 9px; background: #fff4dc; }
.pending-deadline-due { justify-self: start; padding: 5px 7px; border-radius: 999px; color: #8a5700; background: #ffecba; font-size: 10px; font-weight: 900; white-space: nowrap; }
.pending-deadline-row.due-today .pending-deadline-due { color: #a53c31; background: #ffe0dc; }
.pending-deadline-details { min-width: 0; display: grid; gap: 3px; }
.pending-deadline-details time { color: #0b6d50; font-size: 10px; font-weight: 850; }
.pending-deadline-details b, .pending-deadline-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-deadline-details b { color: #172d25; font-size: 12px; }
.pending-deadline-details small { color: var(--muted); font-size: 10px; }
.pending-deadline-status { justify-self: end; padding: 5px 7px; border-radius: 999px; color: #8b5a00; background: #ffedbe; font-size: 9px; font-weight: 900; white-space: nowrap; }
.pending-deadline-status.failed { color: #a53c31; background: #ffe1dd; }
.pending-deadline-status.confirming { color: #24587d; background: #e4f2ff; }
.preview-list { padding: 8px 22px 22px; }
.preview-row { display: grid; grid-template-columns: 112px 82px 1fr 160px 90px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #edf1ee; font-size: 12px; }
.preview-row time { font-weight: 800; color: var(--green); }
.preview-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-row small { color: var(--muted); }
.empty-state { color: var(--muted); text-align: center; font-size: 13px; }

.monthly-detail-panel { margin-top: 14px; overflow: hidden; }
.monthly-detail-panel .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.monthly-detail-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 10px 20px 14px; border-bottom: 1px solid var(--line); background: #f8fbf9; }
.monthly-detail-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.monthly-detail-toolbar select { min-width: 130px; }
.monthly-detail-toolbar .monthly-detail-search { flex: 1; min-width: 260px; }
.monthly-detail-toolbar .monthly-detail-search input { width: 100%; }
.monthly-detail-wrap { max-height: min(650px, calc(100vh - 230px)); overflow: auto; }
.monthly-detail-table { width: 100%; min-width: 1510px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 11px; }
.monthly-detail-table th, .monthly-detail-table td { padding: 10px 9px; border-right: 1px solid #e2e9e4; border-bottom: 1px solid #e2e9e4; text-align: left; vertical-align: middle; background: white; line-height: 1.45; }
.monthly-detail-table th { position: sticky; top: 0; z-index: 3; height: 40px; color: #52615b; background: #eaf1ed; font-size: 10px; font-weight: 900; white-space: nowrap; }
.monthly-detail-table tbody tr:hover td { background: #f7faf8; }
.monthly-detail-table tbody tr.unassigned td { background: #fffaf0; }
.monthly-detail-table tbody tr.unassigned:hover td { background: #fff4dc; }
.monthly-detail-table tbody tr.date-group-start td { border-top: 4px solid #b7cdc1; }
.monthly-detail-table tbody tr.date-group-start td:nth-child(2) { box-shadow: inset 0 4px 0 #8eafa0; }
.monthly-detail-table tbody tr.date-group-start .monthly-date-time b { color: #08694c; font-size: 12px; }
.monthly-detail-table th:nth-child(1), .monthly-detail-table td:nth-child(1) { width: 80px; text-align: center; }
.monthly-detail-table th:nth-child(2), .monthly-detail-table td:nth-child(2) { width: 110px; }
.monthly-detail-table th:nth-child(3), .monthly-detail-table td:nth-child(3) { width: 125px; }
.monthly-detail-table th:nth-child(4), .monthly-detail-table td:nth-child(4) { width: 115px; }
.monthly-detail-table th:nth-child(5), .monthly-detail-table td:nth-child(5) { width: 255px; }
.monthly-detail-table th:nth-child(6), .monthly-detail-table td:nth-child(6) { width: 280px; }
.monthly-detail-table th:nth-child(7), .monthly-detail-table td:nth-child(7) { width: 205px; }
.monthly-detail-table th:nth-child(8), .monthly-detail-table td:nth-child(8) { width: 100px; text-align: center; }
.monthly-detail-table th:nth-child(9), .monthly-detail-table td:nth-child(9) { width: 95px; text-align: center; }
.monthly-detail-table th:nth-child(10), .monthly-detail-table td:nth-child(10) { width: 85px; text-align: center; }
.monthly-assignment, .monthly-worker { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.monthly-assignment.assigned, .monthly-worker.assigned { color: #0b6d50; background: #ddf2e7; }
.monthly-assignment.unassigned, .monthly-worker.unassigned { color: #9a5700; background: #ffe6b4; }
.monthly-date-time, .monthly-multiline { display: grid; gap: 2px; white-space: pre-line; }
.monthly-date-time b { color: #143b2e; font-size: 11px; }
.monthly-date-time small { color: var(--muted); font-size: 10px; }
.monthly-period { display: inline-block; padding: 4px 7px; border-radius: 6px; color: #704000; background: #ffe7b6; font-weight: 850; white-space: pre-line; }
.monthly-address { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: #172d25; font-size: 12px; font-weight: 800; word-break: keep-all; overflow-wrap: anywhere; }
.monthly-detail-text, .monthly-contact { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.monthly-detail-text { color: #5d6f68; }
.monthly-contact { color: #344b43; }
.monthly-detail-table .has-full-tooltip { cursor: help; text-decoration: underline dotted #8da198; text-underline-offset: 3px; }
.monthly-detail-table .monthly-dispatch-action { min-height: 31px; color: white; border-color: var(--green); background: var(--green); }
.monthly-detail-table .monthly-contact-action { min-height: 31px; color: #24587d; border-color: #9dbfd8; background: #eff7ff; }
.monthly-detail-table .monthly-contact-action:disabled { color: #9ba8b0; border-color: #dce3e5; background: #f1f3f3; }
.monthly-detail-panel > .empty-state { padding: 38px 20px; }

.toolbar { padding: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar-group { display: flex; align-items: flex-end; gap: 10px; }
.toolbar-group.end { margin-left: auto; }
.toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.toolbar input[type=search] { width: min(330px, 30vw); }
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.schedule-grid-wrap { min-width: 0; overflow: hidden; }
.grid-meta { min-height: 46px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); }
.schedule-grid-scroll { overflow: auto; max-height: calc(100vh - 245px); }
.schedule-grid { border-collapse: separate; border-spacing: 0; min-width: 1280px; width: 100%; table-layout: fixed; font-size: 12px; }
.schedule-grid th { position: sticky; top: 0; z-index: 3; height: 42px; background: #f0f4f1; color: #52615b; border-bottom: 1px solid #ccd8d0; border-right: 1px solid #dce4df; padding: 0 10px; white-space: nowrap; text-align: left; }
.schedule-grid td { border-bottom: 1px solid #e2e9e4; border-right: 1px solid #edf1ee; padding: 12px 10px; vertical-align: middle; line-height: 1.45; background: white; }
.schedule-grid tr:hover td { background: #f8fbf9; }
.schedule-grid tr.dragging td { opacity: .42; background: #e7f2ec; }
.schedule-grid tr.drop-target td { border-top: 2px solid var(--green-2); }
.schedule-grid th:nth-child(1), .schedule-grid td:nth-child(1) { width: 44px; text-align: center; }
.schedule-grid th:nth-child(2), .schedule-grid td:nth-child(2) { width: 76px; text-align: center; }
.schedule-grid th:nth-child(3), .schedule-grid td:nth-child(3) { width: auto; }
.schedule-grid th:nth-child(4), .schedule-grid td:nth-child(4) { width: 330px; }
.schedule-grid th:nth-child(5), .schedule-grid td:nth-child(5) { width: 290px; }
.schedule-grid th:nth-child(6), .schedule-grid td:nth-child(6) { width: 88px; text-align: center; }
.schedule-grid th:nth-child(7), .schedule-grid td:nth-child(7) { width: 76px; text-align: center; }
.schedule-grid th:nth-child(8), .schedule-grid td:nth-child(8) { width: 66px; text-align: center; }
.select-col { width: 44px; text-align: center !important; }
.drag-handle { border: 0; background: transparent; color: #779086; cursor: grab; font-size: 17px; padding: 2px; }
.order-cell { display: flex; align-items: center; justify-content: center; gap: 7px; }
.order-cell b { color: var(--green); font-size: 13px; }
.site-summary-cell { vertical-align: top !important; }
.site-summary { min-width: 0; display: grid; gap: 6px; }
.site-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.site-meta span { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border-radius: 20px; color: #51615b; background: #edf3ef; font-size: 10px; font-weight: 800; }
.site-meta .date, .site-meta .time { color: #0e684d; background: #def1e7; }
.site-meta .schedule-range { color: #713c00; background: #ffe2a8; border: 1px solid #e9b653; font-size: 10.5px; font-weight: 900; }
.site-meta .progress { color: #80590c; background: #fff0ba; }
.site-address-row { display: flex; align-items: flex-start; gap: 8px; }
.site-address { flex: 1; min-width: 0; color: #13251f; font-size: 15px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.address-copy { flex: none; min-height: 28px; padding: 0 8px; border: 1px solid #cbd9d1; border-radius: 7px; color: var(--green); background: #f5f9f6; font-size: 10px; font-weight: 800; white-space: nowrap; }
.address-copy:disabled { opacity: .45; }
.site-contact { color: #43524d; font-size: 11px; font-weight: 750; word-break: keep-all; overflow-wrap: anywhere; }
.site-content { margin: 0; color: #64716c; font-size: 11px; line-height: 1.55; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.site-content.has-full-tooltip { cursor: help; text-decoration: underline dotted #8da198; text-underline-offset: 3px; }
.schedule-grid select, .schedule-grid input.worker-select, .schedule-grid input.provisional-worker-select { width: 100%; min-height: 38px; font-size: 11px; }
.worker-input-cell { background: #fffbed !important; }
.worker-select { border-color: #d8c876; background: #fffef7; font-weight: 800; }
.worker-assignment { display: grid; grid-template-columns: minmax(0, 1fr) 48px 56px; align-items: center; gap: 7px; }
.provisional-input-cell { background: #eef7ff !important; }
.provisional-input-cell.pending-provisional { background: #dcefff !important; }
.provisional-worker-select { border-color: #9bbfda; background: #f8fcff; color: #1b506f; font-weight: 800; }
.provisional-assignment { display: grid; grid-template-columns: minmax(0, 1fr) 48px 56px; align-items: center; gap: 7px; }
.provisional-assignment.has-provisional .provisional-worker-select { background: #e3f2ff; border-color: #6ca6cb; }
.row-action { border: 1px solid #d8e2dc; background: #f3f7f4; color: var(--green); border-radius: 7px; min-height: 32px; padding: 0 9px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.row-action.alert { color: #875311; background: #fff8ec; border-color: #f1dfbd; }
.row-action.apply { color: white; background: var(--green); border-color: var(--green); }
.row-action.apply:disabled { color: #94a29c; background: #edf1ee; border-color: #e0e6e2; }
.row-action.contact-copy { color: #2f5c86; background: #eff6ff; border-color: #c9dced; }
.row-action.contact-copy:disabled { color: #9ba8b0; background: #f0f3f4; border-color: #e1e6e8; }
.row-action.provisional-save { color: white; background: #2f7197; border-color: #2f7197; }
.row-action.provisional-save:disabled { color: #91a1aa; background: #e9f0f4; border-color: #dce6ec; }
.schedule-grid tr.pending-change td { background: #fffbed; }
.schedule-grid tr.date-group-start td { border-top: 4px solid #dce8e1; }
.schedule-grid tr.date-group-start .site-meta .date { background: #cfeadd; box-shadow: 0 0 0 1px rgba(18, 119, 86, .14); }
.match-badge { display: inline-block; border-radius: 20px; padding: 4px 8px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.match-badge.matched { color: #0f6b4f; background: #dff2e8; }
.match-badge.not_found, .match-badge.ambiguous, .match-badge.unknown { color: #8b620c; background: #fff0ba; }
.link-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.availability-list { min-height: 230px; max-height: 310px; overflow: auto; padding: 12px 22px 22px; }
.availability-row { display: grid; grid-template-columns: 74px minmax(0,1fr) 68px 48px; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid #edf1ee; font-size: 11px; }
.availability-row b { color: var(--ink); }
.availability-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.availability-row small { font-weight: 800; }
.availability-row small.mapped { color: var(--green); }
.availability-row small.unmapped { color: var(--red); }
.availability-row em { text-align: right; color: var(--green); font-style: normal; font-weight: 850; }
.availability-row.leave { background: #f6efff; }
.availability-row.leave em { color: #7b4aa1; }
.grid-empty { padding: 32px; }
.status-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.status-toolbar h2 { margin: 5px 0; font-size: 22px; }
.status-toolbar p { margin: 0; color: var(--muted); font-size: 11px; }
.status-toolbar-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.status-toolbar-actions label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.status-toolbar-actions input { min-height: 40px; }
.status-board-card { overflow: hidden; }
.status-grid-meta { display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(70px, 1fr); align-items: center; gap: 12px; }
.status-grid-meta .count-pill { justify-self: end; }
.status-date-legend { display: flex; align-items: center; justify-content: center; gap: 12px; color: #53655d; font-size: 10px; font-weight: 850; flex-wrap: wrap; }
.status-date-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.status-date-legend .quick-assign-legend { padding: 3px 7px; border-radius: 999px; color: #0b6d50; background: #e7f4ed; }
.legend-swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid rgba(42,65,56,.14); border-radius: 3px; }
.legend-swatch.saturday { background: #c8e3fb; }
.legend-swatch.sunday { background: #ffcfd0; }
.legend-swatch.public-holiday { background: #f7aeb5; }
.legend-swatch.substitute-holiday { background: #f6c876; }
.dispatch-status-wrap { overflow-y: auto; overflow-x: hidden; max-height: calc(100vh - 205px); border-top: 1px solid var(--line); }
.dispatch-status-table { --status-day-width: 28px; --status-table-width: 100%; border-collapse: separate; border-spacing: 0; width: var(--status-table-width); min-width: var(--status-table-width); table-layout: fixed; font-size: 9.4px; }
.dispatch-status-table th, .dispatch-status-table td { border-right: 1px solid #d5e0d9; border-bottom: 1px solid #d5e0d9; padding: 3px 1px; text-align: center; vertical-align: middle; overflow: hidden; }
.dispatch-status-table thead th { position: sticky; z-index: 8; background: #edf3ef; color: #4f6059; font-weight: 900; }
.dispatch-status-table thead tr:first-child th { top: 0; height: 28px; font-size: 9.5px; }
.dispatch-status-table thead tr:nth-child(2) th { top: 28px; height: 22px; font-size: 9px; }
.dispatch-status-table tbody td { height: 50px; background: white; white-space: pre-line; line-height: 1.16; word-break: break-all; }
.dispatch-status-table tbody tr:hover td { background: #f7faf8; }
.dispatch-status-table .status-fixed { position: sticky; z-index: 5; background: #fbfdfc; text-align: left; white-space: normal; text-overflow: ellipsis; line-height: 1.22; font-size: 8.7px; }
.dispatch-status-table thead .status-fixed { z-index: 12; background: #e6efe9; text-align: center; }
.dispatch-status-table .status-fixed-1 { left: 0; width: 68px; min-width: 68px; }
.dispatch-status-table tbody .status-fixed-1 { color: #17382d; font-size: 10.5px; font-weight: 950; letter-spacing: -.02em; }
.dispatch-status-table .status-fixed-2 { left: 68px; width: 44px; min-width: 44px; }
.dispatch-status-table .status-fixed-3 { left: 112px; width: 72px; min-width: 72px; font-size: 8px; }
.dispatch-status-table .status-fixed-4 { left: 184px; width: 62px; min-width: 62px; }
.dispatch-status-table .status-fixed-5 { left: 246px; width: 68px; min-width: 68px; }
.dispatch-status-table .status-fixed-6 { left: 314px; width: 34px; min-width: 34px; text-align: center; box-shadow: 4px 0 8px rgba(20,45,36,.08); }
.dispatch-status-table .status-day-head, .dispatch-status-table .status-weekday, .dispatch-status-table .status-day-cell { width: var(--status-day-width); min-width: var(--status-day-width); max-width: var(--status-day-width); }
.dispatch-status-table .saturday { color: #155e96; background: #dceefe; }
.dispatch-status-table .sunday { color: #b83238; background: #ffdddd; }
.dispatch-status-table thead .public-holiday { color: #971d29; background: #f7b9bf; }
.dispatch-status-table thead .substitute-holiday { color: #854400; background: #f7d38f; }
.dispatch-status-table .status-day-cell.public-holiday { background: #fbdfe2; }
.dispatch-status-table .status-day-cell.substitute-holiday { background: #fbe7bd; }
.dispatch-status-table .status-total { color: var(--green); font-size: 11px; font-weight: 900; }
.dispatch-status-table .status-day-cell.scheduled { background: #e9f6ef; color: #123e2e; font-size: 9px; font-weight: 800; }
.dispatch-status-table .status-day-cell.scheduled.has-full-tooltip { cursor: help; }
.dispatch-status-table .status-day-cell.full-tooltip-doubleclick { cursor: zoom-in !important; }
.dispatch-status-table .status-day-cell.scheduled.has-full-tooltip:hover,
.dispatch-status-table .status-day-cell.scheduled.has-full-tooltip:focus,
.dispatch-status-table .status-day-cell.provisional.has-full-tooltip:hover,
.dispatch-status-table .status-day-cell.provisional.has-full-tooltip:focus { position: relative; z-index: 3; box-shadow: inset 0 0 0 2px rgba(27,138,104,.42); }
.dispatch-status-table .status-day-cell.multi { background: #f2f8cf; }
.dispatch-status-table .status-day-cell.leave { background: #e5d5ff; color: #5e2d96; box-shadow: inset 0 0 0 1px #c6a6ee; font-weight: 900; }
.dispatch-status-table .status-day-cell.provisional { position: relative; padding-top: 18px; background: #fff8c9; color: #493a00; font-size: 9px; font-weight: 900; cursor: help; box-shadow: inset 0 0 0 1px #e3bd20; }
.dispatch-status-table .status-day-cell.provisional::before { content: "카톡"; position: absolute; top: 2px; left: 50%; z-index: 2; min-width: 25px; height: 14px; padding: 0 3px; transform: translateX(-50%); border: 1px solid #d9b900; border-radius: 4px; color: #191919; background: #fee500; box-shadow: 0 1px 2px rgba(0,0,0,.12); font-size: 8px; font-weight: 950; line-height: 13px; text-align: center; white-space: nowrap; }
.dispatch-status-table .status-day-cell.provisional[data-kakao-count]:not([data-kakao-count="1"])::before { content: "카톡 " attr(data-kakao-count); min-width: 34px; }
.dispatch-status-table .status-day-cell.provisional.with-scheduled { background: linear-gradient(135deg, #e9f6ef 0 58%, #fff3a8 58% 100%); }
.dispatch-status-table .status-day-cell.provisional.leave { background: linear-gradient(135deg, #e5d5ff 0 58%, #fff3a8 58% 100%); box-shadow: inset 0 0 0 1px #b98d30; }
.dispatch-status-table .status-day-cell.unassigned { background: #fff0d2; color: #8b5800; }
.dispatch-status-table .status-day-cell.scheduled.saturday { background: #cfe5ee; }
.dispatch-status-table .status-day-cell.scheduled.sunday { background: #f1d4d3; }
.dispatch-status-table .status-day-cell.scheduled.public-holiday { background: #efc4c9; color: #6e2028; }
.dispatch-status-table .status-day-cell.scheduled.substitute-holiday { background: #efd39e; color: #653908; }
.dispatch-status-table .status-unassigned-row .status-fixed { background: #fff7e8; }
.dispatch-status-table .status-day-cell.quick-assign-cell { position: relative; cursor: pointer; }
.dispatch-status-table .status-day-cell.quick-assign-cell::after { content: "+"; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); color: #087456; font-size: 15px; font-weight: 900; opacity: 0; transition: opacity .15s ease; }
.dispatch-status-table .status-day-cell.quick-assign-cell:hover, .dispatch-status-table .status-day-cell.quick-assign-cell:focus { box-shadow: inset 0 0 0 2px #15906d; outline: none; }
.dispatch-status-table .status-day-cell.quick-assign-cell:hover::after, .dispatch-status-table .status-day-cell.quick-assign-cell:focus::after { opacity: .72; }

body.status-mode .workspace { padding: 14px 12px 32px; }
body.status-mode .topbar { margin-bottom: 12px; }
body.status-mode .status-toolbar { margin-bottom: 8px; }

body.dispatch-mode .topbar-actions { display: none; }
body.dispatch-mode .workspace { padding-top: 20px; }
body.dispatch-mode .topbar { margin-bottom: 16px; }

.management-grid { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); gap: 14px; align-items: start; }
.management-form-card, .management-list-card { overflow: hidden; }
.management-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 22px 24px; }
.management-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.management-form input, .management-form select, .management-form textarea { width: 100%; min-height: 42px; }
.management-form textarea { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; resize: vertical; font: inherit; }
.management-form .full { grid-column: 1 / -1; }
.management-form .check-label { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.management-form .check-label input { width: 18px; min-height: 18px; }
.management-table-wrap { overflow: auto; padding: 0 18px 18px; }
.management-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
.management-table th, .management-table td { padding: 11px 9px; border-bottom: 1px solid #e7ede9; text-align: left; vertical-align: middle; }
.management-table th { color: var(--muted); font-size: 10px; white-space: nowrap; }
.management-table tr.inactive { opacity: .55; }
.management-table .table-action { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: #f5f8f6; font-size: 10px; font-weight: 800; white-space: nowrap; }
.management-table .danger { color: var(--red); }
.roster-status { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: #e5f5ed; color: var(--green); font-size: 9px; font-weight: 900; }
.roster-status.off { background: #edf0ee; color: var(--muted); }

.roster-sheet-card { overflow: hidden; }
.roster-sheet-card .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.roster-heading-actions { display: flex; align-items: center; gap: 9px; }
.roster-sheet-wrap { max-height: calc(100vh - 220px); overflow: auto; border-top: 1px solid var(--line); }
.roster-sheet-table { width: 100%; min-width: 1096px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 10px; }
.roster-sheet-table th, .roster-sheet-table td { height: 42px; padding: 6px 7px; border-right: 1px solid #e1e8e3; border-bottom: 1px solid #e1e8e3; text-align: left; vertical-align: middle; background: white; }
.roster-sheet-table th { position: sticky; top: 0; z-index: 3; height: 38px; color: #4f6059; background: #e9f1ec; font-size: 9px; font-weight: 900; white-space: nowrap; text-align: center; }
.roster-sheet-table tbody tr:hover td { background: #f7faf8; }
.roster-sheet-table tr.inactive td { color: #7d8984; background: #f7f8f7; }
.roster-sheet-table tr.roster-dragging td { opacity: .42; background: #e7f2ec; }
.roster-sheet-table tr.roster-drop-target td { border-top: 2px solid var(--green-2); }
.roster-sheet-table th:nth-child(1), .roster-sheet-table td:nth-child(1) { width: 58px; text-align: center; }
.roster-sheet-table th:nth-child(2), .roster-sheet-table td:nth-child(2) { width: 98px; }
.roster-sheet-table th:nth-child(3), .roster-sheet-table td:nth-child(3) { width: 67px; }
.roster-sheet-table th:nth-child(4), .roster-sheet-table td:nth-child(4) { width: 78px; }
.roster-sheet-table th:nth-child(5), .roster-sheet-table td:nth-child(5) { width: 105px; }
.roster-sheet-table th:nth-child(6), .roster-sheet-table td:nth-child(6) { width: 88px; }
.roster-sheet-table th:nth-child(7), .roster-sheet-table td:nth-child(7) { width: 92px; }
.roster-sheet-table th:nth-child(8), .roster-sheet-table td:nth-child(8) { width: 235px; }
.roster-sheet-table th:nth-child(9), .roster-sheet-table td:nth-child(9),
.roster-sheet-table th:nth-child(10), .roster-sheet-table td:nth-child(10) { width: 58px; text-align: center; }
.roster-sheet-table th:nth-child(11), .roster-sheet-table td:nth-child(11) { width: 90px; }
.roster-sheet-table th:nth-child(12), .roster-sheet-table td:nth-child(12) { width: 72px; text-align: center; }
.roster-sheet-table th:nth-child(13), .roster-sheet-table td:nth-child(13) { width: 94px; text-align: center; }
.roster-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.roster-order-cell { display: flex; align-items: center; justify-content: center; gap: 5px; }
.roster-drag-handle { border: 0; padding: 2px; color: #638177; background: transparent; cursor: grab; font-size: 15px; line-height: 1; }
.roster-drag-handle:active { cursor: grabbing; }
.roster-drag-handle:hover, .roster-drag-handle:focus { color: var(--green); background: #e3f0e9; border-radius: 5px; outline: none; }
.roster-sheet-table .table-action { min-height: 29px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--green); background: #f5f8f6; font-size: 9px; font-weight: 850; }
.roster-row-actions { display: flex; align-items: center; justify-content: center; gap: 4px; }
.roster-sheet-table .table-action.danger { color: #a93636; border-color: #efc3c3; background: #fff4f4; }
.roster-editor { margin-top: 14px; overflow: hidden; }
.roster-editor summary { min-height: 58px; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.roster-editor summary::-webkit-details-marker { display: none; }
.roster-editor summary > span:first-child { display: grid; gap: 3px; }
.roster-editor summary small { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.roster-editor summary strong { font-size: 15px; }
.roster-editor summary > span:last-child { color: var(--muted); font-size: 10px; }
.roster-editor[open] summary { border-bottom: 1px solid var(--line); }
.roster-editor-body { padding-top: 18px; }
.roster-editor .management-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.management-form label small { color: #8a9892; font-weight: 600; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-actions button { min-width: 120px; }

.full-content-tooltip { position: fixed; z-index: 120; width: min(620px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 32px)); overflow: auto; padding: 13px 15px; border: 1px solid rgba(223,243,93,.55); border-radius: 10px; color: white; background: #13241f; box-shadow: 0 20px 55px rgba(0,0,0,.32); font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; pointer-events: auto; cursor: text; scrollbar-color: #dff35d #203a31; }
.full-content-tooltip.pinned { border-color: #dff35d; box-shadow: 0 24px 70px rgba(0,0,0,.42), 0 0 0 3px rgba(223,243,93,.22); }
.full-content-tooltip.pinned::before { content: "📌 고정됨 · 스크롤 가능 · 바깥 클릭 또는 Esc로 닫기"; position: sticky; top: -13px; z-index: 1; display: block; margin: -13px -15px 12px; padding: 9px 15px; color: #13241f; background: #dff35d; font-size: 11px; font-weight: 900; white-space: normal; }
.full-content-tooltip:focus { outline: 3px solid rgba(223,243,93,.45); outline-offset: 2px; }
.has-full-tooltip:focus { outline: 2px solid rgba(27,138,104,.35); outline-offset: 2px; }

body.modal-open { overflow: hidden; }
.quick-assign-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(11,29,23,.62); backdrop-filter: blur(5px); }
.quick-assign-card { width: min(860px, calc(100vw - 32px)); max-height: min(780px, calc(100vh - 32px)); display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid rgba(255,255,255,.42); border-radius: 18px; background: #f7faf8; box-shadow: 0 34px 100px rgba(0,0,0,.34); }
.quick-assign-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px 16px; background: white; }
.quick-assign-header h2 { margin: 5px 0 0; font-size: 22px; }
.quick-assign-close { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; color: #2c443b; background: #f1f6f3; font-size: 25px; line-height: 1; cursor: pointer; }
.quick-assign-close:hover, .quick-assign-close:focus { color: white; background: var(--green); outline: none; }
.quick-assign-context { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 8px; padding: 13px 24px; border-top: 1px solid #e5ece8; border-bottom: 1px solid #e5ece8; background: white; }
.quick-assign-context strong { padding: 6px 11px; border-radius: 999px; color: white; background: var(--green); font-size: 14px; }
.quick-assign-context > span:not(.count-pill) { color: #344b43; font-weight: 800; }
.quick-assign-context.on-leave { border-color: #b995e7; background: #f1e8ff; }
.quick-assign-context.on-leave strong { background: #6f3aa8; }
.quick-contact-copy { min-height: 34px; padding: 0 12px; border: 1px solid #9db7cc; border-radius: 8px; color: #24587d; background: #eff7ff; font-size: 11px; font-weight: 850; white-space: nowrap; cursor: pointer; }
.quick-contact-copy:disabled { color: #96a2a8; border-color: #dce3e5; background: #f1f3f3; cursor: not-allowed; }
.quick-leave-toggle { min-height: 34px; padding: 0 12px; border: 1px solid #b995e7; border-radius: 8px; color: #62349a; background: #f4ecff; font-size: 11px; font-weight: 900; white-space: nowrap; cursor: pointer; }
.quick-leave-toggle:hover, .quick-leave-toggle:focus, .quick-leave-toggle.active { color: white; background: #7040a6; outline: none; }
.quick-leave-form { display: grid; grid-template-columns: minmax(170px, 1fr) 145px auto 145px auto auto; align-items: end; gap: 9px; padding: 13px 24px; border-bottom: 1px solid #cdb4ec; color: #4f267e; background: #eee3fb; }
.quick-leave-copy { align-self: center; display: grid; gap: 3px; }
.quick-leave-copy strong { color: #4f267e; font-size: 13px; }
.quick-leave-copy span { color: #76569b; font-size: 10px; line-height: 1.4; }
.quick-leave-form label { display: grid; gap: 4px; color: #6b4b90; font-size: 10px; font-weight: 850; }
.quick-leave-form input { width: 100%; min-height: 38px; border-color: #b995e7; background: white; }
.quick-leave-separator { align-self: center; padding-bottom: 9px; color: #6f3aa8; font-weight: 900; }
.quick-leave-form button { min-height: 38px; white-space: nowrap; }
.quick-leave-submit { background: #7040a6; }
.quick-assign-help { margin: 0; padding: 12px 24px; color: #4d645b; background: #eef5f1; font-size: 12px; }
.quick-assign-help.warning { color: #8d4a16; background: #fff1d7; font-weight: 750; }
.quick-assign-help.leave-warning { color: #59258e; background: #eadcff; }
.quick-assign-list { display: grid; gap: 10px; padding: 16px 20px; overflow-y: auto; }
.quick-assign-job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 15px 16px; border: 1px solid #dce7e1; border-radius: 12px; background: white; box-shadow: 0 5px 15px rgba(17,65,49,.05); }
.quick-assign-job-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quick-assign-job-time { color: #557067; font-size: 11px; font-weight: 800; }
.quick-assign-current { padding: 4px 8px; border-radius: 999px; color: #7a540b; background: #fff0c9; font-size: 10px; font-weight: 900; }
.quick-assign-current.assigned { color: #9b3535; background: #ffe1df; }
.quick-assign-current.provisional { color: #24587d; background: #dceeff; }
.quick-assign-address { grid-column: 1; font-size: 15px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.quick-assign-company { grid-column: 1; color: #3e5b50; font-size: 11px; }
.quick-assign-detail { grid-column: 1; max-height: 40px; margin: 1px 0 0; overflow: hidden; color: #71837c; font-size: 11px; line-height: 1.5; }
.quick-assign-job-actions { grid-column: 2; grid-row: 2 / 5; align-self: center; display: grid; gap: 8px; min-width: 154px; }
.quick-assign-job-actions button { min-height: 40px; border-radius: 9px; font-weight: 850; }
.quick-assign-inquiry { color: #24587d; border: 1px solid #9dbfd8; background: #eff7ff; }
.quick-assign-apply { min-width: 142px; }
.quick-assign-apply.reassign { background: #a64f43; }
.quick-assign-empty { padding: 48px 20px; color: var(--muted); text-align: center; }
.quick-assign-footer { display: flex; justify-content: flex-end; padding: 13px 20px; border-top: 1px solid #e1e9e4; background: white; }
.quick-assign-footer button { min-width: 110px; }
.quick-assign-modal.busy .quick-assign-card { cursor: wait; }
.quick-assign-modal.busy button { pointer-events: none; opacity: .65; }

.pending-toolbar input[type=search] { width: min(360px, 30vw); }
.pending-list-card { overflow: hidden; }
.pending-list-card .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.pending-table-wrap { position: relative; max-height: calc(100vh - 250px); overflow: auto; border-top: 1px solid var(--line); }
.pending-table { width: 100%; min-width: 1420px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 11px; }
.pending-table th, .pending-table td { padding: 10px 9px; border-right: 1px solid #e1e8e3; border-bottom: 1px solid #e1e8e3; text-align: left; vertical-align: middle; background: white; }
.pending-table th { position: sticky; top: 0; z-index: 3; height: 38px; color: #4f6059; background: #e9f1ec; font-size: 10px; font-weight: 900; text-align: center; white-space: nowrap; }
.pending-table tbody tr:hover td { background: #f8fbf9; }
.pending-table tr.status-failed td { background: #fff9f8; }
.pending-table tr.status-confirmed td { background: #f7fbf8; }
.pending-table tr.status-cancelled { opacity: .58; }
.pending-table th:nth-child(1), .pending-table td:nth-child(1) { width: 64px; text-align: center; }
.pending-table th:nth-child(2), .pending-table td:nth-child(2) { width: 88px; text-align: center; }
.pending-table th:nth-child(3), .pending-table td:nth-child(3) { width: 94px; }
.pending-table th:nth-child(4), .pending-table td:nth-child(4) { width: 122px; }
.pending-table th:nth-child(5), .pending-table td:nth-child(5) { width: 90px; text-align: center; }
.pending-table th:nth-child(6), .pending-table td:nth-child(6) { width: 370px; }
.pending-table th:nth-child(7), .pending-table td:nth-child(7) { width: 175px; }
.pending-table th:nth-child(8), .pending-table td:nth-child(8) { width: 100px; }
.pending-table th:nth-child(9), .pending-table td:nth-child(9) { width: 78px; text-align: center; }
.pending-table th:nth-child(10), .pending-table td:nth-child(10) {
  position: sticky;
  right: 0;
  width: 250px;
  min-width: 250px;
  box-shadow: -10px 0 18px rgba(22, 55, 43, .08);
}
.pending-table th:nth-child(10) { z-index: 5; background: #dfeae4; }
.pending-table td:nth-child(10) { z-index: 2; }
.pending-number { color: #0b7355; font-size: 12px; font-weight: 900; }
.pending-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.pending-status.draft { color: #8a5b00; background: #fff0c9; }
.pending-status.confirming { color: #155e96; background: #dceefe; }
.pending-status.confirmed { color: #087456; background: #dff3e9; }
.pending-status.failed { color: #a93636; background: #ffe0de; }
.pending-status.cancelled { color: #66746f; background: #edf0ee; }
.pending-date, .pending-contact { display: grid; gap: 4px; }
.pending-date strong { color: #0c684f; }
.pending-date small, .pending-contact span { color: var(--muted); font-size: 10px; }
.pending-site { display: grid; gap: 5px; min-width: 0; }
.pending-site strong { font-size: 13px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.pending-site p, .pending-site small { display: -webkit-box; margin: 0; overflow: hidden; color: #52675f; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; word-break: keep-all; overflow-wrap: anywhere; }
.pending-site small { color: #8a6a22; -webkit-line-clamp: 1; }
.pending-row-actions { display: grid; gap: 7px; min-width: 0; }
.pending-action-primary, .pending-action-secondary { display: grid; gap: 6px; }
.pending-action-secondary { grid-template-columns: 1.35fr 1fr 1fr; }
.pending-row-actions .table-action {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: #f5f8f6;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}
.pending-row-actions .table-action:hover { border-color: #9fb8ad; background: #edf5f0; }
.pending-row-actions .table-action.confirm { min-height: 40px; color: white; border-color: var(--green); background: var(--green); font-size: 11px; }
.pending-row-actions .table-action.confirm:hover { border-color: #075f47; background: #075f47; }
.pending-row-actions .table-action.danger { color: #a93636; border-color: #efc3c3; background: #fff4f4; }
.pending-row-actions .table-action.danger:hover { border-color: #dca5a5; background: #ffecec; }
.pending-action-note { display: block; padding: 9px 10px; border-radius: 8px; color: var(--muted); background: #f2f5f3; font-size: 10px; line-height: 1.45; text-align: center; }
.sprogram-link-id { color: var(--green); font-weight: 900; }
.pending-editor-modal { z-index: 105; padding: 24px; background: rgba(7, 28, 22, .68); }
.pending-editor-card {
  width: min(920px, calc(100vw - 48px));
  max-height: min(880px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 2px solid #dff35d;
  border-radius: 18px;
  background: #eaf2ed;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .42);
}
.pending-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  color: white;
  background: #10352b;
}
.pending-editor-header > div { display: grid; gap: 5px; }
.pending-editor-header .eyebrow { color: #dff35d; }
.pending-editor-header h2 { margin: 0; font-size: 21px; }
.pending-editor-header p { margin: 0; color: #bcd2c9; font-size: 11px; }
.pending-editor-header .quick-assign-close { color: #10352b; background: #dff35d; }
.pending-editor-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid #c8d9d0;
  color: #174c3d;
  background: #dce9e2;
  font-size: 11px;
  line-height: 1.5;
}
.pending-editor-intro strong { flex: 0 0 auto; color: #0a694f; }
.pending-editor-scroll { min-height: 0; overflow-y: auto; padding: 20px 24px 24px; }
.pending-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pending-form label {
  padding: 12px;
  border: 1px solid #ccdbd3;
  border-radius: 10px;
  background: #f5f9f6;
}
.pending-form input, .pending-form select, .pending-form textarea { background: white; }
.pending-form .form-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin: 4px -24px -24px;
  padding: 15px 24px;
  border-top: 1px solid #c8d8cf;
  background: #dce8e1;
}
.pending-form .form-actions button { min-width: 170px; }
.pending-form-notice { padding: 11px 13px; border: 1px solid #ecd59d; border-radius: 9px; color: #75520d; background: #fff8e7; font-size: 11px; line-height: 1.55; }
.pending-confirm-card { width: min(720px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; overflow: hidden; border: 1px solid rgba(255,255,255,.42); border-radius: 18px; background: #f7faf8; box-shadow: 0 34px 100px rgba(0,0,0,.34); }
.pending-confirm-summary { display: grid; overflow-y: auto; padding: 8px 24px 14px; background: white; }
.pending-confirm-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 13px; padding: 11px 0; border-bottom: 1px solid #e7ede9; }
.pending-confirm-row span { color: var(--muted); font-size: 11px; font-weight: 800; }
.pending-confirm-row strong { font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.pending-payment-check { display: flex; align-items: flex-start; gap: 12px; margin: 14px 24px; padding: 15px 16px; border: 2px solid #e7c75f; border-radius: 12px; color: #563c05; background: #fff7d9; cursor: pointer; }
.pending-payment-check input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--green); }
.pending-payment-check span { display: grid; gap: 4px; }
.pending-payment-check small { color: #80651e; font-size: 11px; }
.pending-confirm-error { min-height: 18px; margin: 0 24px 8px; }
.pending-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 24px; border-top: 1px solid var(--line); background: white; }
.pending-confirm-actions button { min-width: 160px; }
.pending-confirm-card:has(.pending-payment-check input:not(:checked)) #pendingConfirmSubmit { opacity: .52; }
.quick-assign-modal.busy .pending-confirm-card { cursor: wait; }
.quick-assign-modal.busy .pending-confirm-card button, .quick-assign-modal.busy .pending-confirm-card input { pointer-events: none; opacity: .6; }

.audit-table-wrap { overflow-x: auto; padding: 6px 22px 22px; }
.audit-table { border-collapse: collapse; width: 100%; min-width: 870px; font-size: 12px; }
.audit-table th, .audit-table td { padding: 11px; border-bottom: 1px solid #e7ede9; text-align: left; }
.audit-table th { color: var(--muted); font-size: 10px; }
.status-success { color: var(--green); font-weight: 800; }
.status-failed { color: var(--red); font-weight: 800; }

.progress-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(12,25,21,.52); backdrop-filter: blur(4px); }
.progress-card { width: min(420px, calc(100vw - 40px)); background: white; border-radius: 16px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.25); display: grid; gap: 10px; text-align: center; }
.progress-card span { color: var(--muted); font-size: 12px; }
.spinner { width: 34px; height: 34px; margin: 0 auto 5px; border-radius: 50%; border: 3px solid #e3eae5; border-top-color: var(--green); animation: spin .8s linear infinite; }
.progress-track { height: 7px; background: #edf1ee; border-radius: 9px; overflow: hidden; margin-top: 10px; }
.progress-track i { display: block; height: 100%; width: 12%; background: var(--green-2); transition: width .25s; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 8px; }
.toast { width: min(390px, calc(100vw - 44px)); background: var(--nav); color: white; border-radius: 10px; padding: 13px 16px; box-shadow: 0 14px 42px rgba(0,0,0,.22); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { border-left: 4px solid #f26b61; }
.toast.success { border-left: 4px solid var(--lime); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .board-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .app-shell, .app-shell.sidebar-pinned { grid-template-columns: 1fr; }
  .sidebar, .app-shell.sidebar-expanded .sidebar { position: static; width: 100%; height: auto; padding: 14px; overflow: visible; }
  .sidebar-brand { justify-content: flex-start; gap: 12px; padding: 0 10px 14px; }
  .sidebar-brand-copy, .sidebar-label, .sidebar-note-copy { max-width: 160px; opacity: 1; transform: none; }
  .sidebar-pin { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .nav-item, .app-shell.sidebar-expanded .nav-item { justify-content: flex-start; gap: 10px; padding: 11px 14px; }
  .sidebar-note, .logout-button { display: none; }
  .workspace { padding: 22px 16px 50px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .topbar-actions { align-items: stretch; }
  .topbar-actions > * { flex: 1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-group, .toolbar-group.end { margin: 0; flex-wrap: wrap; }
  .toolbar input[type=search] { width: 240px; }
  .status-toolbar { align-items: stretch; flex-direction: column; }
  .status-toolbar-actions > * { flex: 1; }
  .summary-toolbar { align-items: stretch; flex-direction: column; }
  .summary-toolbar-actions > * { flex: 1; }
  .monthly-detail-toolbar .monthly-detail-search { flex-basis: 100%; }
  .roster-editor .management-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pending-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-assign-modal { padding: 12px; }
  .quick-leave-form { grid-template-columns: minmax(160px, 1fr) 135px auto 135px; }
  .quick-leave-form button { grid-row: 2; }
  .quick-leave-form #quickLeaveCancel { grid-column: 2; }
  .quick-leave-form #quickLeaveSubmit { grid-column: 4; }
}
@media (max-width: 540px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 28px; }
  .management-form { grid-template-columns: 1fr; }
  .management-form .full { grid-column: auto; }
  .roster-editor .management-form { grid-template-columns: 1fr; }
  .pending-form { grid-template-columns: 1fr; }
  .pending-confirm-row { grid-template-columns: 1fr; gap: 4px; }
  .preview-row { grid-template-columns: 56px 65px 1fr; }
  .preview-row small, .preview-row .preview-worker { display: none; }
  .quick-assign-context { grid-template-columns: 1fr auto; }
  .quick-assign-context strong { grid-column: 1 / -1; justify-self: start; }
  .quick-leave-form { grid-template-columns: 1fr auto 1fr; align-items: end; padding: 12px 16px; }
  .quick-leave-copy { grid-column: 1 / -1; }
  .quick-leave-form #quickLeaveCancel { grid-column: 1; grid-row: auto; }
  .quick-leave-form #quickLeaveSubmit { grid-column: 3; grid-row: auto; }
  .quick-assign-job { grid-template-columns: 1fr; }
  .quick-assign-apply { grid-column: 1; grid-row: auto; width: 100%; }
}
.permission-hidden {
  display: none !important;
}

.readonly-banner {
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid #edc765;
  border-left: 5px solid #d89a00;
  border-radius: 12px;
  background: #fff6d9;
  color: #6f4b00;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.readonly-banner strong {
  font-size: 14px;
}

.viewer-readonly #workerForm,
.viewer-readonly #leaveForm {
  display: none !important;
}

.readonly-cell-note {
  color: #718078;
  font-size: 11px;
  white-space: nowrap;
}

.role-badge {
  width: fit-content;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #c9d8d1;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.role-badge.admin {
  background: #e4fa52;
  color: #102921;
}

.role-badge.editor {
  background: rgba(82, 220, 163, 0.2);
  color: #8cf0c6;
}

.role-badge.viewer {
  background: rgba(255, 203, 86, 0.18);
  color: #ffd778;
}

.audit-filters {
  display: grid;
  grid-template-columns: 150px 190px minmax(260px, 1fr);
  gap: 10px;
  margin: 0 0 14px;
}

.audit-filters label,
.staff-create-form label {
  display: grid;
  gap: 6px;
}

.audit-filters label > span,
.staff-create-form label > span {
  color: #50645c;
  font-size: 11px;
  font-weight: 800;
}

.audit-filters input,
.audit-filters select,
.staff-create-form input,
.staff-create-form select,
.staff-table input,
.staff-table select {
  min-height: 38px;
  border: 1px solid #d5e0db;
  border-radius: 9px;
  background: #fff;
  color: #12231d;
  padding: 7px 10px;
  font: inherit;
}

.audit-detail summary {
  cursor: pointer;
  color: #0e7057;
  font-weight: 700;
}

.audit-detail pre {
  max-width: 680px;
  max-height: 280px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid #dbe5e0;
  border-radius: 8px;
  background: #f5f8f6;
  color: #263b33;
  font: 11px/1.55 Consolas, "Malgun Gothic", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.staff-panel {
  min-height: 430px;
}

.staff-create-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 150px minmax(220px, 1.5fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #d7e3dd;
  border-radius: 12px;
  background: #f7faf8;
}

.staff-create-form button {
  min-height: 38px;
}

.staff-role-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.staff-role-guide span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf4f0;
  color: #425b51;
  font-size: 11px;
}

.staff-role-guide b {
  color: #0b7256;
}

.staff-table-wrap {
  overflow: auto;
  border: 1px solid #dbe5e0;
  border-radius: 10px;
}

.staff-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.staff-table th,
.staff-table td {
  padding: 10px;
  border-bottom: 1px solid #e0e8e4;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.staff-table th {
  background: #edf4f0;
  color: #355047;
  font-size: 11px;
  white-space: nowrap;
}

.staff-table tr.inactive {
  opacity: 0.58;
  background: #f5f6f5;
}

.staff-table input {
  width: 100%;
  min-width: 120px;
}

.staff-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 700;
}

.staff-active-toggle input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
}

@media (max-width: 1100px) {
  .audit-filters {
    grid-template-columns: 1fr 1fr;
  }

  .audit-search {
    grid-column: 1 / -1;
  }

  .staff-create-form {
    grid-template-columns: 1fr 1fr;
  }

  .staff-note-input {
    grid-column: 1 / -1;
  }
}
