@charset "UTF-8";
/* ==========================================================================
   다오 파트너스 — minecap 관리자 결을 따른다.
   레일 사이드바(92px) + #f8f9fa 배경 + 선만 있는 평평한 카드, 작은 글자·촘촘한 표.
   색은 다오 관리자 남색 하나만 강조에 쓴다. 그림자·굵은 색 띠는 쓰지 않는다.
   ========================================================================== */

:root {
    --rail-w: 92px;
    --brand: #1D2B54;
    --brand-ink: #14203F;
    --brand-soft: #EEF1F8;
    --ink: #1e2433;
    --ink-2: #4e5560;
    --ink-3: #6b7280;
    --line: #eef0fb;
    --line-2: #e2e5f0;
    --red: #c8262b;
    --red-soft: #fdecec;
    --bg: #f8f9fa;
    --font: 'Paperlogy', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
body.modal-open { overflow: hidden; }

/* ─────────────────────────── 레일 사이드바 */
.rail {
    position: fixed; inset: 0 auto 0 0; width: var(--rail-w);
    display: flex; flex-direction: column; z-index: 50;
    background: #fff; border-right: 1px solid var(--line);
    box-shadow: 2px 0 16px rgba(2, 14, 226, .04);
}
.rail__logo {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 18px 8px 14px; border-bottom: 1px solid var(--line);
}
.rail__logo img { width: 30px; height: 30px; }
.rail__logo span { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--brand); }

.rail__nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.rail__sep { height: 1px; margin: 8px 14px; background: var(--line); }
.rail__item {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 11px 4px; color: var(--ink-3);
    transition: background .12s, color .12s;
}
.rail__item i { width: 21px; font-size: 18px; line-height: 21px; text-align: center; }
.rail__item span { font-size: 11px; font-weight: 600; letter-spacing: -.02em; }
.rail__item:hover { background: #f7f8fc; color: var(--ink); }
.rail__item.active { color: var(--brand); background: var(--brand-soft); }
.rail__item.active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}

.rail__foot { padding: 12px 8px; border-top: 1px solid var(--line); text-align: center; }
.rail__me { font-size: 11px; font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__team { font-size: 10.5px; color: var(--ink-3); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__btn {
    display: block; width: 100%; padding: 5px; margin-top: 4px;
    border: 1px solid var(--line-2); border-radius: 7px; background: #fff;
    font-size: 11px; color: var(--ink-3); cursor: pointer;
}
.rail__btn:hover { border-color: #c9cddb; color: var(--ink); }
.rail__btn--out:hover { border-color: var(--red); color: var(--red); }

/* ─────────────────────────── 본문 · 제목줄 */
.main { margin-left: var(--rail-w); padding: 0 26px 60px; min-width: 0; }
/* 넓은 모니터에서 끝없이 퍼지지 않게 — 표·두 칸 화면은 1200, 한 줄로 흐르는 화면(일정·실적·팀)은 960 */
.main > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.main--narrow > * { max-width: 960px; }
/* 칸이 많은 표(업무 현황) — 화면 너비를 다 쓴다 */
.main--wide > * { max-width: none; }
.main > .back-link { display: flex; width: fit-content; max-width: none; margin-left: max(0px, calc((100% - 1200px) / 2)); }
.main--narrow > .back-link { margin-left: max(0px, calc((100% - 960px) / 2)); }

.page-head {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 22px 0 18px; margin-bottom: 22px;
    border-bottom: 1px solid var(--line-2);
}
.page-head h1 { font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.page-head p { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); }
.page-head .actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-head > .btn { margin-left: auto; }

.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 18px; font-size: 12.5px; color: var(--ink-3);
}
.back-link:hover { color: var(--brand); }
.back-link + .page-head { padding-top: 8px; }

/* ─────────────────────────── 카드 */
.card {
    background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 18px 20px; margin-bottom: 18px;
}
.card-head {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head p { margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.card-head > .link, .card-head > a:not(.btn) { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.card-head > .link:hover, .card-head > a:not(.btn):hover { color: var(--brand); }
.card-head > .btn { margin-left: auto; }
.card-body { padding-top: 14px; }

/* 카드가 margin-bottom 을 가지므로 줄 간격은 0 — 한 줄로 쌓일 때 간격이 두 배가 되지 않게 */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 18px; align-items: start; }
.grid-2 .card { margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 0 18px; align-items: start; }
@media (max-width: 1180px) {
    .grid-2, .detail-grid { grid-template-columns: 1fr; }
}

.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }
.muted { color: var(--ink-3); }
.spacer { flex: 1; }

/* ─────────────────────────── 통계 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpis--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .kpis--5 { grid-template-columns: repeat(2, 1fr); } }
/* 다섯 칸일 때 금액이 두 줄로 꺾이지 않게 */
.kpis--5 .kpi-value { font-size: 24px; white-space: nowrap; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.kpi-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kpi-value {
    margin-top: 4px; font-size: 27px; font-weight: 700; letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.kpi-value small { margin-left: 2px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi-note { margin-top: 2px; min-height: 17px; font-size: 11.5px; font-weight: 600; color: var(--brand); }

/* ─────────────────────────── 표 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td {
    padding: 10px 8px; text-align: left; vertical-align: middle;
    border-bottom: 1px solid var(--line);
}
table.data thead th {
    font-size: 11.5px; font-weight: 700; color: var(--ink-3);
    border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafbfe; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover strong { color: var(--brand); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td strong { font-weight: 600; }
td .sub, .sub { display: block; margin-top: 1px; font-size: 11.5px; color: var(--ink-3); }
td.empty { padding: 36px 0; text-align: center; color: var(--ink-3); }
table.data tbody tr:has(td.empty):hover { background: none; }

/* ─────────────────────────── 비었을 때 — 가운데 그림 + 한 줄 */
.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 36px 16px 40px; text-align: center;
}
.empty-state img { width: 64px; height: 64px; margin-bottom: 10px; }
.empty-state strong { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.empty-state p { font-size: 13px; color: var(--ink-3); line-height: 1.55; word-break: keep-all; white-space: pre-line; }
td.empty:has(.empty-state) { padding: 0; }
.list-empty:has(.empty-state) { display: block !important; padding: 0 !important; }

/* ─────────────────────────── 스켈레톤 */
.sk {
    display: inline-block; height: 12px; max-width: 100%; border-radius: 6px; vertical-align: middle;
    background: linear-gradient(90deg, #f0f2f7 25%, #e4e7f0 37%, #f0f2f7 63%);
    background-size: 400% 100%;
    animation: sk 1.4s ease infinite;
}
.sk-sub { display: block; height: 10px; margin-top: 6px; }
.sk-row:hover { background: none !important; }
.tasks li.sk-item { gap: 12px; }
.tasks li.sk-item > .sk { flex: none; }
@keyframes sk {
    from { background-position: 100% 50%; }
    to { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ─────────────────────────── 태그 */
.badge {
    display: inline-block; padding: 2px 7px; border-radius: 5px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    background: #f1f3f9; color: var(--ink-2);
}
.badge-green { background: #e8f5ec; color: #11693c; }
.badge-amber { background: #fff4db; color: #8a5a00; }
.badge-blue  { background: var(--brand-soft); color: var(--brand-ink); }
.badge-gray  { background: #eceef3; color: #7b8090; }
.badge-red   { background: var(--red-soft); color: var(--red); }

/* ─────────────────────────── 버튼 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 13px; border-radius: 8px;
    border: 1px solid var(--line-2); background: #fff;
    font-size: 13px; font-weight: 600; color: var(--ink-2);
    cursor: pointer; white-space: nowrap; transition: all .12s;
}
.btn i { font-size: 12px; }
.btn:hover { border-color: #c9cddb; color: var(--ink); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-ghost { background: #fff; }
.btn-danger-ghost { color: var(--red); border-color: #f0d3d4; }
.btn-danger-ghost:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 6px; }

.icon-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 28px; height: 28px; border: 0; border-radius: 6px;
    background: transparent; color: var(--ink-3); cursor: pointer;
}
.icon-btn:hover { background: #f1f3f9; color: var(--ink); }

/* ─────────────────────────── 필터 줄 · 단계 탭 */
.tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line);
}
.tabs button {
    padding: 6px 12px; border: 0; border-radius: 8px; background: none;
    font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer;
}
.tabs button:hover { background: #f4f5fa; color: var(--ink); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tabs button span { margin-left: 5px; font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }

.toolbar {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.toolbar select, .toolbar input[type=search], .toolbar input[type=month], .toolbar input[type=date] {
    height: 34px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px;
    font-size: 13px; background: #fff;
}
.search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); }
.search input { width: 100%; padding-left: 30px !important; }
.toolbar-count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.toolbar-count strong { color: var(--ink); }
.toolbar strong#range { font-size: 14px; font-variant-numeric: tabular-nums; }

input[type=month].btn { padding: 0 10px; font-weight: 600; }

/* ─────────────────────────── 체크 */
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand); }

/* ─────────────────────────── 폼 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > span small { margin-left: 3px; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.field .req { font-style: normal; color: var(--red); }
.field input:not([type=checkbox]), .field select, .field textarea {
    width: 100%; height: 38px; padding: 0 11px;
    border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 13.5px;
}
.field textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus,
.log-form textarea:focus, .toolbar select:focus, .toolbar input:focus {
    outline: 2px solid var(--brand-soft); border-color: var(--brand);
}
.field input:disabled { background: #f7f8fc; color: var(--ink-3); }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
/* 한 줄 폼 — 입력칸 몇 개 + 오른쪽 끝 버튼 (배정) */
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 150px; }
.inline-form > .btn { height: 38px; }
/* 실행사 배정 — 드롭박스를 아래로 하나씩 더한다 */
.exec-picks { display: flex; flex: 1; flex-direction: column; gap: 10px; min-width: 200px; }
.exec-picks .field { flex: none; }

/* ─────────────────────────── 팝업 — minecap 확인 팝업(acc-pop)과 같은 결
 * 닫기 바·구분 띠 없이 넓은 여백, 제목 + 한 줄 설명, 아래는 반씩 나눈 큰 버튼 두 개.
 * 닫기는 바깥 누르기 · Esc · 취소 버튼. 좁은 화면에서는 바닥에서 올라오는 시트. */
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15, 20, 32, .5);
}
.modal-dialog {
    position: relative; display: flex; flex-direction: column;
    width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
    padding: 40px 40px 32px; border-radius: 12px; background: #fff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .15);
    animation: popIn .2s ease;
}
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 880px; }
/* 디비곳간에서 가져오기 — 미리 보기 표 */
.dbg-preview { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.dbg-preview table.data { font-size: 13px; }
.dbg-preview td small { display: block; color: var(--ink-3); }
@keyframes popIn {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.modal-head { display: flex; flex-direction: column; gap: 4px; }
.modal-head:not(:last-child) { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.modal-head--center { align-items: center; text-align: center; }
.modal-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.035em; }
.modal-sub { font-size: 15px; font-weight: 500; color: var(--ink-2); line-height: 1.5; letter-spacing: -.02em; word-break: keep-all; white-space: pre-line; }
.modal-head h2 { word-break: keep-all; }
.modal-head .icon-btn { display: none; }
/* 머리에 세우는 그림 — minecap 팝업(.acc-pop__art)과 같은 72px */
.modal-art { display: block; width: 72px; height: 72px; margin: 0 auto 14px; }

.modal-body { margin-top: 28px; }
.modal-body.form-grid { gap: 20px 12px; }
.modal-body .field { gap: 8px; }
.modal-body .field > span { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.modal-body .field > span small { font-size: 12.5px; }
.modal-body .field input:not([type=checkbox]), .modal-body .field select {
    height: 52px; padding: 0 16px; border: 1px solid #dfe1e5; border-radius: 12px; font-size: 15px;
}
.modal-body .field textarea { padding: 14px 16px; border: 1px solid #dfe1e5; border-radius: 12px; font-size: 15px; }
.modal-body .field input:focus, .modal-body .field select:focus, .modal-body .field textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 43, 84, .12);
}
.modal-body .field input::placeholder, .modal-body .field textarea::placeholder { color: #8a919b; }
.modal-body .check { font-size: 14px; min-height: 52px; }

.modal-foot { display: flex; gap: 10px; margin-top: 32px; }
.modal-foot .spacer { display: none; }
.modal-foot .btn {
    flex: 1; height: 54px; border-radius: 14px;
    font-size: 16px; font-weight: 700; letter-spacing: -.03em;
}
.modal-foot .btn-ghost { border: 1px solid #dfe1e5; color: var(--ink-2); font-weight: 600; }
.modal-foot .btn-ghost:hover { background: #f6f7f8; color: var(--ink-2); }
.modal-foot .btn-primary { border: 0; background: linear-gradient(135deg, #33457A 0%, #1D2B54 100%); }
.modal-foot .btn-primary:hover { background: linear-gradient(135deg, #25366A 0%, #14203F 100%); }
/* 지우기 — 되돌릴 수 없는 일은 빨강. 한 줄에 셋이면 좁게 */
.modal-foot .btn-danger-ghost { flex: 0 0 auto; padding: 0 18px; background: #fff; border: 1px solid #f3c2c4; color: #d6454c; }
.modal-foot .btn-danger-ghost:hover { background: #fff5f5; border-color: #eba9ad; color: var(--red); }
.modal-foot .btn-danger { border: 0; background: #ffe1e3; color: #e2505a; }
.modal-foot .btn-danger:hover { background: #ffcfd2; }

/* 확인 팝업 (AS.confirm) — 그림 없이 가운데 정렬 제목만 */
.modal-confirm .modal-head { padding-bottom: 0; border-bottom: 0; }
.modal-confirm .modal-foot { margin-top: 28px; }

@media (max-width: 768px) {
    .modal { align-items: flex-end; padding: 0; }
    .modal-dialog, .modal-sm {
        max-width: 100%; max-height: 88vh; padding: 28px 16px 32px;
        border-radius: 12px 12px 0 0; animation: popUp .25s ease;
    }
    .modal-head h2 { font-size: 18px; }
    .modal-sub { font-size: 14px; }
    .modal-foot .btn { height: 50px; font-size: 15px; border-radius: 12px; }
}
@keyframes popUp {
    from { transform: translateY(100%); }
    to { transform: none; }
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ─────────────────────────── 알림 */
.toast-stack {
    position: fixed; right: 20px; bottom: 20px; z-index: 200;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
    max-width: 360px; padding: 11px 16px; border-radius: 9px;
    background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
    opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { background: #11693c; }
.toast-error { background: var(--red); }

/* ─────────────────────────── 할 일 · 일정 한 줄 */
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.tasks li:last-child { border-bottom: 0; }
.task-time {
    flex: none; width: 50px; font-size: 13.5px; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.task-time small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.task-main { flex: 1; min-width: 0; }
.task-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.task-title a:hover { color: var(--brand); text-decoration: underline; }
.task-title small { font-size: 11.5px; font-weight: 500; }
.task-sub { margin-top: 1px; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-result { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; }
.tasks li.is-done .task-title, .tasks li.is-done .task-time { color: var(--ink-3); }
.tasks li.is-overdue .task-time { color: var(--red); }
.list-empty { padding: 30px 0 !important; justify-content: center; color: var(--ink-3); font-size: 13px; border-bottom: 0 !important; }
.type-tag {
    flex: none; padding: 1px 6px; border-radius: 5px;
    font-size: 11px; font-weight: 600; background: #f1f3f9; color: var(--ink-2);
}
.type-tag.is-meeting { background: var(--brand-soft); color: var(--brand-ink); }

/* 날짜 묶음 (일정 화면) */
.day-head {
    display: flex; align-items: baseline; gap: 8px;
    padding: 14px 2px 6px; border-bottom: 1px solid var(--line-2);
    font-size: 13px; font-weight: 700;
}
.day-head small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.day-head.is-today { color: var(--brand); }
.tasks li.day-none { padding: 10px 2px; font-size: 12.5px; color: var(--ink-3); }

/* ─────────────────────────── 토글 스위치 */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
    position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px;
    background: #d5d9e4; transition: background .18s;
}
.switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(15, 20, 32, .25); transition: transform .18s;
}
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand-soft); outline-offset: 2px; }

/* ─────────────────────────── 일정 — 월 달력 + 고른 날 */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 18px; align-items: start; }
@media (max-width: 1180px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; }
.cal-head h2 { min-width: 108px; text-align: center; font-size: 16px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cal-head .btn { margin-left: 6px; }
.cal-count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week {
    border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line);
}
.cal-week span { padding: 8px 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.cal-week .is-sun { color: #d6454c; }
.cal-week .is-sat { color: #3b62d9; }

.cal-cell {
    position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px;
    min-height: 104px; padding: 6px 6px 8px; margin: 0;
    border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
    background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit;
    transition: background .12s;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: #fafbfe; }
.cal-cell.is-out { background: #fcfcfd; }
.cal-cell.is-out .cal-date, .cal-cell.is-out .cal-chip { opacity: .45; }
.cal-cell.is-loading { cursor: default; }
.cal-date {
    display: inline-grid; place-items: center; align-self: flex-start;
    min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px;
    font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cal-cell.is-sun .cal-date { color: #d6454c; }
.cal-cell.is-sat .cal-date { color: #3b62d9; }
.cal-cell.is-today .cal-date { background: var(--brand); color: #fff; }
.cal-cell.is-selected { background: #f7f9ff; box-shadow: inset 0 0 0 2px var(--brand); z-index: 1; }
.cal-dot { display: none; }

.cal-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-chip {
    display: block; padding: 2px 6px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 11.5px; line-height: 1.45; background: #f1f3f9; color: var(--ink-2);
}
.cal-chip b { margin-right: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-chip.is-meeting { background: var(--brand-soft); color: var(--brand-ink); }
.cal-chip.is-overdue { background: var(--red-soft); color: var(--red); }
.cal-chip.is-done { background: #f4f5f8; color: #9aa0ab; text-decoration: line-through; }
.cal-more { padding-left: 6px; font-size: 11px; font-weight: 600; color: var(--ink-3); }

.cal-day { position: sticky; top: 18px; }

/* 좁은 화면 — 칸 안의 글자 칩 대신 점 하나 */
@media (max-width: 760px) {
    .cal-cell { min-height: 54px; align-items: center; padding: 6px 2px; }
    .cal-date { align-self: center; }
    .cal-chips { display: none; }
    .cal-dot { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
    .cal-week span { text-align: center; padding: 8px 0; }
    .cal-day { position: static; }
    .cal-card { padding: 14px 10px; }
    .cal-count { display: none; }
}

/* ─────────────────────────── DB 상세 */
.facts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px;
    margin: 0; padding: 14px 0 4px;
}
.facts dt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inquiry {
    margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #f7f8fc;
    font-size: 13px; white-space: pre-wrap; color: var(--ink-2);
}
.inquiry-label { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }

.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.files a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.files a:hover { color: var(--brand); text-decoration: underline; }
.files small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
/* 전자계약(모두싸인) 목록 — 파일 목록 아래 */
.esigns { margin-top: 12px; }
.esigns__title { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--ink-2, #4a5268); }
.esigns li > span:not(.badge) { flex: 1; min-width: 0; font-weight: 600; }
.esigns small { white-space: normal; }
/* 통화 녹음(TM 기록) — 이름 줄 아래에 바로 듣기 */
.recordings { margin-top: 12px; }
.recordings .files li { flex-wrap: wrap; }
.recordings audio { flex-basis: 100%; width: 100%; height: 32px; }
.drop small { display: block; margin-top: 2px; font-size: 11.5px; }
.drop {
    display: block; margin-top: 12px; padding: 16px;
    border: 1px dashed var(--line-2); border-radius: 8px;
    text-align: center; font-size: 12.5px; color: var(--ink-3); cursor: pointer;
}
.drop i { margin-right: 4px; }
.drop:hover, .drop.is-over { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.drop input { display: none; }

.log-form { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.log-form textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px;
    font-size: 13.5px; line-height: 1.5; resize: vertical;
}
.log-form-row { display: flex; gap: 8px; align-items: center; }
.log-form select {
    height: 28px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 6px;
    background: #fff; font-size: 12px;
}

.timeline { list-style: none; margin: 0; padding: 4px 0 0; }
.timeline li { padding: 11px 2px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); }
.timeline .kind {
    padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 600;
    background: var(--brand-soft); color: var(--brand-ink);
}
.timeline li.is-system .kind { background: #f1f3f9; color: var(--ink-3); }
.timeline li.is-system p { color: var(--ink-2); }
.timeline p { margin-top: 4px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

.danger-zone {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    font-size: 12.5px; color: var(--ink-3);
}

/* ─────────────────────────── 팀 화면 */
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding-top: 14px; }
.team {
    padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer;
    transition: border-color .12s;
}
.team:hover { border-color: var(--brand); }
.team h3 { font-size: 14.5px; font-weight: 700; }
.team p { margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.team-members { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.team-members span {
    padding: 2px 7px; border-radius: 5px; background: #f1f3f9;
    font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.team-list > p { padding: 20px 0; }

/* ─────────────────────────── 좁은 화면 — 레일을 아이콘만 남긴다 */
@media (max-width: 760px) {
    :root { --rail-w: 60px; }
    .rail__item span, .rail__logo span, .rail__me, .rail__team { display: none; }
    .rail__btn { font-size: 0; padding: 6px 0; }
    .rail__btn i { font-size: 12px; }
    .main { padding-inline: 14px; }
    .page-head h1 { font-size: 19px; }
    .kpi-value { font-size: 23px; }
}
.rail__btn i { display: none; }
@media (max-width: 760px) { .rail__btn i { display: inline; } }

/* ─────────────────────────── 드롭다운 (select 대신) — controls.js
 * 기본 select 는 값만 맡고 숨는다. 버튼 높이는 놓인 자리(툴바 · 필드 · 모달 · 기록 줄)를 따른다. */
select.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.dd {
    display: inline-flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
    height: 38px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px;
    background: #fff; font-size: 13.5px; text-align: left; cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.dd:hover:not(:disabled) { border-color: #c9cfe0; }
.dd:focus-visible, .dd[aria-expanded="true"] { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 43, 84, .12); }
.dd:disabled { background: #f7f8fc; color: var(--ink-3); cursor: default; }
.dd__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd.is-placeholder .dd__text { color: #8a919b; }
.dd__caret { flex: none; font-size: 10px; color: var(--ink-3); transition: transform .15s; }
.dd[aria-expanded="true"] .dd__caret { transform: rotate(180deg); }
.toolbar .dd { width: auto; min-width: 128px; max-width: 220px; height: 34px; font-size: 13px; }
.modal-body .field .dd { height: 52px; padding: 0 16px; border-color: #dfe1e5; border-radius: 12px; font-size: 15px; }
.log-form .dd { width: auto; min-width: 88px; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 12px; }

.dd-pop, .dp-pop {
    position: fixed; z-index: 300; max-width: calc(100vw - 16px);
    padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
    box-shadow: 0 12px 32px rgba(15, 20, 32, .14);
    animation: popIn .14s ease;
}
.dd-pop { max-height: 280px; overflow-y: auto; }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.dd-opt span { flex: 1; }
.dd-opt i { font-size: 11px; color: var(--brand); }
.dd-opt.is-active { background: #f4f6ff; }
.dd-opt[aria-selected="true"] { font-weight: 700; color: var(--brand-ink); }
.dd-opt.is-empty span { color: var(--ink-3); }
.dd-opt[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.dd-pop.is-lg .dd-opt { padding: 12px 14px; font-size: 15px; }

/* ─────────────────────────── 달력 · 시간 — controls.js */
.dp-btn__ico { flex: none; font-size: 13px; color: var(--brand); }
.dp-pop { width: 300px; padding: 14px; overflow-y: auto; }
.dp-pop.has-time { width: 332px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head strong { font-size: 15px; font-weight: 700; }
.dp-nav { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.dp-nav:hover { background: #f4f5fa; }
.dp-week, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { padding: 4px 0; font-size: 11.5px; font-weight: 600; text-align: center; color: var(--ink-3); }
.dp-week .is-sun, .dp-day.is-sun { color: #d9464b; }
.dp-week .is-sat, .dp-day.is-sat { color: #3d63e6; }
.dp-day { height: 34px; border: 0; border-radius: 9px; background: none; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
.dp-day:hover { background: #f4f6ff; }
.dp-day.is-out { opacity: .35; }
.dp-day.is-today { box-shadow: inset 0 0 0 1.5px #c9d4ff; font-weight: 700; }
.dp-day.is-on { background: var(--brand); color: #fff !important; font-weight: 700; }
.dp-time { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp-ampm { display: inline-flex; padding: 3px; border-radius: 9px; background: #f1f3f8; }
.dp-ampm button { height: 30px; padding: 0 16px; border: 0; border-radius: 7px; background: none; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.dp-ampm button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15, 20, 32, .1); }
.dp-label { margin: 10px 0 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.dp-hours, .dp-mins { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dp-hours button, .dp-mins button { height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.dp-hours button:hover, .dp-mins button:hover { border-color: #c9cfe0; }
.dp-hours button.is-on, .dp-mins button.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.dp-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-link { padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--brand); cursor: pointer; }
.dp-sum { flex: 1; font-size: 12px; color: var(--ink-3); text-align: right; }

/* ─────────────────────────── 진행 단계 막대 — common.js AS.stageBar
 * 막대 위 단계마다 그림: 지난 단계는 그대로(작게), 지금 단계는 크게, 아직 안 온 단계는 흐린 회색 */
.stage { position: relative; }
.stage__track { position: relative; height: 8px; margin: 18px 22px 0; border-radius: 99px; background: #e6eaf4; }
.stage__fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #dbe3ff, var(--brand)); }
.stage__icon { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; object-fit: contain; transition: transform .2s; }
.stage__icon.is-past { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.stage__icon.is-todo { filter: grayscale(1); opacity: .32; }
.stage__icon.is-on { z-index: 1; width: 40px; height: 40px; margin: -20px 0 0 -20px; filter: drop-shadow(0 3px 6px rgba(29, 43, 84, .3)); }
.stage__steps { position: relative; height: 20px; margin: 20px 22px 0; padding: 0; list-style: none; }
.stage__steps li { position: absolute; top: 0; transform: translateX(-50%); font-size: 12px; color: #a3a9b6; white-space: nowrap; }
.stage__steps li.is-past { color: var(--ink-2); }
.stage__steps li.is-on { font-weight: 700; color: var(--brand-ink); }
.stage.is-done .stage__fill { background: linear-gradient(90deg, #dbe3ff, var(--brand) 70%, #17a05d); }
.stage.is-done .stage__steps li.is-on { color: #11693c; }
.stage__steps li.is-off { top: auto; bottom: 42px; transform: translateX(-100%); padding: 1px 8px; border-radius: 6px; background: #fff4db; color: #8a5a00; font-weight: 700; }
.stage.is-lost .stage__steps li.is-off { background: var(--red-soft); color: var(--red); }

/* 목록 — 줄 아래 한 줄, 칸 너비 전체 */
table.data tr.has-stage td { border-bottom: 0; padding-bottom: 4px; }
table.data tr.stage-row td { padding-top: 8px; padding-bottom: 14px; }
table.data tr.stage-row .stage { width: 100%; }
table.data tr.has-stage:hover + tr.stage-row { background: #fafbfe; }
table.data tr.stage-row { cursor: pointer; }

/* 상세 — 머리 */
.stage--lg { padding: 4px 4px 2px; }
.stage__head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.stage__head img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.stage__head strong { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.stage__head p { margin-top: 2px; font-size: 13.5px; color: var(--ink-3); }
.stage--lg .stage__track { height: 10px; margin: 24px 28px 0; }
.stage--lg .stage__steps { margin: 26px 28px 0; }
.stage--lg .stage__icon { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
.stage--lg .stage__icon.is-past { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.stage--lg .stage__icon.is-on { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
.stage--lg .stage__steps li { font-size: 13px; }
.stage--lg .stage__steps li.is-off { bottom: 54px; }
@media (max-width: 720px) {
    .stage__steps li:not(.is-on) { visibility: hidden; }
}


.stage-card { padding: 22px 28px 20px; }

/* ─────────────────────────── 환경 설정 — 왼쪽 목록 메뉴 + 오른쪽 판 하나 */
.set-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-layout--wide { grid-template-columns: 300px minmax(0, 1fr); }
.set-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; position: sticky; top: 24px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; transition: background-color .15s; }
.set-nav a:hover { background: #f6f7fb; }
.set-nav a.is-on { background: var(--brand-soft); }
.set-nav img { flex: none; width: 36px; height: 36px; object-fit: contain; }
.set-nav span { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.set-nav b { font-size: 14px; font-weight: 700; }
.set-nav a.is-on b { color: var(--brand-ink); }
.set-nav small { font-size: 11.5px; color: var(--ink-3); }
/* 팀 메모 — 팀장 아래 한 줄 더 */
.set-nav small.set-nav__note { margin-top: 1px; color: var(--ink-4, #9aa1b2); }
.set-nav em { flex: none; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; background: #eef0f5; font-size: 12px; font-style: normal; font-weight: 700; line-height: 22px; text-align: center; color: var(--ink-3); }
.set-nav a.is-on em { background: var(--brand); color: #fff; }
.set-panel { padding: 22px 24px 24px; margin-bottom: 0; }
.set-head { padding-bottom: 16px; }
.set-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.set-head p { margin-top: 3px; font-size: 13px; color: var(--ink-3); }

/* 줄 — 순서 · 이름 · 목록에 보이기 · 이름 바꾸기. 모든 줄이 같은 칸 */
.code-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.code-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 150px 104px; align-items: center; gap: 8px; min-height: 54px; padding: 0 14px; }
.code-row--head { min-height: 38px; background: #f8f9fc; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.code-table.is-readonly .code-row { grid-template-columns: 72px minmax(0, 1fr) 150px; }
.code-table.is-readonly .code-act, .code-table.is-readonly .code-row--head span:last-child { display: none; }
.code-list { list-style: none; margin: 0; padding: 0; }
.code-list .code-row { position: relative; border-bottom: 1px solid var(--line); background: #fff; }
.code-list .code-row:last-child { border-bottom: 0; }
.code-list .list-empty { padding: 24px 0; }
.code-move { display: inline-flex; gap: 2px; }
.code-move .icon-btn:disabled { opacity: .25; cursor: default; background: none; }
.code-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.code-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-note { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.code-note i { font-size: 10px; }
.code-row.is-hidden .code-name > span { color: var(--ink-3); }
.code-switch { gap: 10px; font-size: 12.5px; }
.code-switch__text { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.code-switch input:not(:checked) ~ .code-switch__text { color: var(--ink-3); }
.code-switch.is-locked { cursor: default; }
.code-switch.is-locked .switch__track { opacity: .45; }
.code-switch.is-locked .code-switch__text { color: #8f96a6; }
.code-switch.is-locked .code-switch__text i { font-size: 10.5px; }
.code-switch input:disabled + .switch__track { cursor: default; }
.code-act .btn { width: 100%; justify-content: center; }

/* 옮기거나 추가·숨기기·이름 바꾼 줄이 눈에 띄게 */
.code-list .code-row.is-moving { z-index: 1; box-shadow: 0 6px 18px rgba(29, 43, 84, .14); }
.code-list .code-row.is-flash { animation: codeFlash 1.8s ease; }
@keyframes codeFlash {
    0%, 45% { background: #e3eaff; box-shadow: inset 3px 0 0 var(--brand); }
    100% { background: #fff; box-shadow: inset 3px 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .code-list .code-row.is-flash { animation: none; background: var(--brand-soft); }
}

/* 추가 — 목록 바로 아래 한 줄 */
.code-add { position: relative; display: flex; gap: 8px; margin-top: 12px; }
.code-add > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); }
.code-add input { flex: 1; height: 42px; padding: 0 12px 0 34px; border: 1px dashed #cfd5e3; border-radius: 10px; background: #fbfcfe; font-size: 13.5px; }
.code-add input:focus { outline: none; border: 1px solid var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(29, 43, 84, .12); }
.code-add .btn { height: 42px; padding: 0 18px; }

@media (max-width: 860px) {
    .set-layout { grid-template-columns: 1fr; }
    .set-nav { position: static; flex-direction: row; }
    .set-nav a { flex: 1; }
    .set-nav small { display: none; }
    .code-row { grid-template-columns: 60px minmax(0, 1fr) 110px 92px; padding: 0 8px; }
    .code-switch__text { display: none; }
}

/* ─────────────────────────── 사이드바 아래 — 이름을 누르면 내 정보 */
.rail__profile { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 8px; padding: 8px 4px; border-radius: 10px; transition: background-color .15s; }
.rail__profile:hover { background: #f4f6fb; }
.rail__profile.active { background: var(--brand-soft); }
.rail__profile.active .rail__me { color: var(--brand-ink); }
.rail__avatar { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 14px; font-weight: 700; }
.rail__profile.active .rail__avatar { background: var(--brand); color: #fff; }
.rail__profile .rail__team { margin-bottom: 0; }

/* ─────────────────────────── 내 정보 — minecap 계정 설정 결 (왼쪽 프로필 · 오른쪽 카드, 줄 = 이름/값 + 오른쪽 버튼) */
.acc-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 18px; align-items: start; }
.acc-me { position: sticky; top: 24px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; }
.acc-me__avatar { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 10px; border-radius: 50%; background: linear-gradient(135deg, #5b7cff, var(--brand)); color: #fff; font-size: 28px; font-weight: 700; }
.acc-me strong { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.acc-me span:last-child { font-size: 12.5px; color: var(--ink-3); }
.acc-cards { display: flex; flex-direction: column; gap: 18px; }
.acc-card { padding: 24px 28px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.acc-card__title { margin-bottom: 4px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.acc-row { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.acc-row:last-child { border-bottom: 0; }
.acc-row__main { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.acc-field { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.acc-field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.acc-field__value { font-size: 14px; color: var(--ink-3); word-break: break-all; }
.acc-field__value.is-strong { font-size: 17px; font-weight: 700; color: var(--ink); }
.acc-field__value.is-empty { color: #a3a9b6; }
.acc-avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 20px; font-weight: 700; }
.acc-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 92px; height: 42px; padding: 0 20px; border: 0; border-radius: 12px; background: #f1f3f6; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.acc-btn:hover { background: #e3e6ec; color: var(--ink); }
.acc-btn--danger { background: var(--red-soft); color: var(--red); }
.acc-btn--danger:hover { background: #f9dcdc; color: var(--red); }
@media (max-width: 860px) {
    .acc-layout { grid-template-columns: 1fr; }
    .acc-me { position: static; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 16px; text-align: left; }
    .acc-me__avatar { width: 48px; height: 48px; margin: 0; font-size: 20px; }
    .acc-card { padding: 18px 16px 4px; }
    .acc-btn { min-width: 72px; padding: 0 14px; }
}

/* ─────────────────────────── 팀 · 계정 — 환경 설정 틀(set-layout) 위에 */
.set-nav__label { margin: 10px 10px 2px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
/* 실행사 총관리자 — 대행사 아래에 그 대행사의 팀들 */
.set-nav__agency { display: flex; flex-direction: column; gap: 4px; }
.set-nav__agency + .set-nav__agency { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.set-nav__sub { display: flex; flex-direction: column; gap: 4px; margin-left: 14px; padding-left: 8px; border-left: 2px solid var(--line); }
.set-nav__sub .set-nav__label { margin-top: 6px; }
.set-nav__agency-head { display: flex; align-items: center; gap: 2px; }
.set-nav__agency-head > a { flex: 1; min-width: 0; }
.set-nav__fold { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.set-nav__fold:hover { background: #f6f7fb; color: var(--ink); }
.set-nav__fold i { font-size: 12px; transition: transform .15s; }
.set-nav__agency.is-folded .set-nav__fold i { transform: rotate(-90deg); }
/* ● 영업팀 [관리자 : 000] */
.set-nav__label--group { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.set-nav__label--group i { font-size: 6px; color: var(--ink-3); }
.set-nav__label--group span { display: inline; flex: none; font-weight: 500; color: var(--ink-3); }
.set-nav__none { margin: 4px 10px; font-size: 12.5px; color: var(--ink-3); }
.set-nav__add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; margin-top: 6px; border: 1px dashed #cfd5e3; border-radius: 10px; background: #fbfcfe; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.set-nav__add:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.set-head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.set-head__actions { display: flex; gap: 6px; }
.set-head__actions:empty { display: none; }
table.people td { vertical-align: middle; }
table.people tr.is-off td { opacity: .55; }
.who { display: flex; align-items: center; gap: 10px; }
.who__me { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; vertical-align: 1px; }

/* 이름을 못 바꾸는 기본 분야 — 버튼 자리를 같은 크기의 흐린 표시로 채운다 */
.code-fixed-name { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 28px; border: 1px dashed var(--line-2); border-radius: 6px; font-size: 12px; font-weight: 600; color: #9aa1b0; white-space: nowrap; cursor: default; }
.code-fixed-name i { font-size: 10px; }

/* ─────────────────────────── 오늘 할 일 — 왼쪽 일정 달력 · 오른쪽 할 일. 두 열 높이를 맞춘다 */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; align-items: stretch; }
.today-grid > .card, .today-side > .card { margin-bottom: 0; }
.today-cal .cal-head { padding-bottom: 12px; }
.today-cal .cal-count { color: var(--ink-3); }
.today-cal .cal-count:hover { color: var(--brand); }
.today-cal__grid .cal-cell { min-height: 78px; }
.today-day { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.today-day__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.today-day__head h3 { font-size: 14.5px; font-weight: 700; }
.today-day__head span { font-size: 12.5px; }
.today-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.today-side__fill { flex: 1; display: flex; flex-direction: column; }
.today-side__fill .tasks { flex: 1; }
.today-side__fill .tasks:has(.list-empty) { display: flex; align-items: center; justify-content: center; }
@media (max-width: 1100px) {
    .today-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────── TM — 여러 건 나누기 · 엑셀 양식 · TM 기록 */
.bulk-bar {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft);
    font-size: 13px;
    /* 아래쪽 DB 를 골라도 보이게 */
    position: sticky; top: 8px; z-index: 5; box-shadow: 0 4px 14px rgba(29, 43, 84, .12);
}
.bulk-bar .dd { flex: 0 0 auto; width: auto; min-width: 180px; max-width: 260px; height: 32px; font-size: 13px; }
.check-col { width: 36px; text-align: center; }
.check-col input { width: 16px; height: 16px; cursor: pointer; }
.del-col { width: 64px; text-align: right; white-space: nowrap; }
.import-templates {
    display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: 12px;
}
.facts .facts-full { grid-column: 1 / -1; }
.facts .facts-full dd { white-space: pre-wrap; font-weight: 500; }
.tm-form { padding-top: 14px; }
@media (max-width: 640px) { .import-templates { grid-template-columns: 1fr; } }

/* 업무 현황(TM팀원) — 콜 일자 · 전화상담 · 구분을 표 안에서 바로 고친다 */
.work-table td.edit { padding-block: 6px; }
.work-table td.edit .dd { width: auto; min-width: 116px; height: 32px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; }
.work-table td.edit .dp-btn { min-width: 132px; }
.work-table .work-name { color: inherit; }
.work-table .work-name:hover strong { color: var(--brand); text-decoration: underline; }
.work-table tr.is-saving td.edit { opacity: .55; pointer-events: none; }
.work-table td:not(.edit) { white-space: nowrap; }
.work-table td.edit input[type=text], .work-table td.edit textarea {
    height: 32px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px;
    background: #fff; font: inherit; font-size: 12.5px;
}
.work-table td.edit input[type=text]:focus, .work-table td.edit textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 43, 84, .12); }
.work-table .w-revenue { width: 150px; }
.work-table .w-employees { width: 72px; }
/* TM 내용 — 한 줄로 두다가 누르면 펼친다 */
.work-table .w-note { display: block; width: 240px; padding-block: 6px; line-height: 1.45; resize: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.work-table .w-note:focus { height: 96px; overflow: auto; white-space: pre-wrap; resize: vertical; }
/* 전화상담 · 구분 — 값마다 칸 색 */
.work-table .tint .dd { font-weight: 600; }
/* 전화상담 — 통화완료 파랑 · 부재중 초록 · 거절 빨강 · 번호없음 진한 빨강 */
.work-table .call-result[data-v="통화완료"] .dd { background: #e8f0ff; border-color: #b9cdfb; color: #1f4fc4; }
.work-table .call-result[data-v="부재중"] .dd { background: #e5f6ec; border-color: #b4e2c6; color: #1b7a43; }
.work-table .call-result[data-v="거절"] .dd { background: #fdeaea; border-color: #f5bcbc; color: #d0353b; }
.work-table .call-result[data-v="번호없음"] .dd { background: #a3161c; border-color: #a3161c; color: #fff; }
.work-table .call-result[data-v="번호없음"] .dd__caret { color: rgba(255, 255, 255, .8); }
/* 구분 — 잠재고객 노랑 · 단박거절 빨강 · 미팅확정 초록 · 재통화 보라 · 기타 회색 */
.work-table .grade[data-v="잠재고객"] .dd { background: #fff6d6; border-color: #f0dc8a; color: #8a6400; }
.work-table .grade[data-v="단박거절"] .dd { background: #fdeaea; border-color: #f5bcbc; color: #d0353b; }
.work-table .grade[data-v="미팅확정"] .dd { background: #e5f6ec; border-color: #b4e2c6; color: #1b7a43; }
.work-table .grade[data-v="재통화"] .dd { background: #f1ebff; border-color: #d3c4f7; color: #6a3fc9; }
.work-table .grade[data-v="기타"] .dd { background: #f1f3f7; border-color: #dadfe8; color: #4a5268; }

/* 확인 팝업의 적는 칸(반려 사유 등) */
.modal-confirm .modal-body { padding-top: 16px; }
.confirm-input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px;
    font: inherit; font-size: 13.5px; resize: vertical;
}
.confirm-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 43, 84, .12); }

/* 업무 현황 — 결재 칸은 오른쪽 끝에 붙여 둔다(가로로 밀어도 보이게) */
.work-table .approval-col {
    position: sticky; right: 0; z-index: 1; min-width: 180px; white-space: normal;
    background: var(--card, #fff); box-shadow: -1px 0 0 var(--line);
}
.work-table thead .approval-col { z-index: 2; }
.work-table tbody tr:hover .approval-col { background: #fafbfe; }
.work-table .approval-col .btn { margin-top: 6px; }
.approval-actions { display: flex; gap: 6px; }
.approval-reason { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--red); }

/* DB 상세 — 결재 카드: 단계마다 누가 · 언제 */
.approval-steps { list-style: none; margin: 0; padding: 4px 0 0; }
.approval-steps li { display: flex; align-items: baseline; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.approval-steps li:last-child { border-bottom: 0; }
.approval-step { flex: 0 0 132px; font-weight: 600; color: var(--ink-2); }
.approval-who { flex: 1; min-width: 0; }
.approval-who small { margin-left: 8px; font-size: 11.5px; color: var(--ink-3); }
.approval-steps li.is-done .approval-who { color: #11693c; font-weight: 600; }
.approval-steps li.is-no .approval-who { color: var(--red); font-weight: 600; }
.approval-steps li.is-wait .approval-who { color: #8a5a00; }
.approval-steps li.is-none .approval-who { color: var(--ink-3); }
.approval-reject { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 13px; white-space: pre-wrap; }
.approval-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
