/* 이전 사업 상황관리 시스템 */
:root {
  color-scheme: light;
  --plane:      #f3f5fa;
  --surface:    #ffffff;
  --ink:        #0b0b0b;
  --ink-2:      #52514e;
  --muted:      #898781;
  --line:       #eaedf4;
  --border:     #e4e8f0;
  --track:      #e9edf5;
  --accent:     #3b5bdb;
  --navy:       #1b3b7a;
  --amber:      #f5a623;
  --violet:     #7b61ff;
  --don-done:   #22c58b;
  --don-rest:   #f5a623;
  --radius2:    14px;
  --good:       #0ca30c;
  --crit:       #d03b3b;
  --warn:       #fab219;
  --radius:     10px;
  --shadow:     0 1px 3px rgba(27,59,122,.07), 0 1px 1px rgba(27,59,122,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane:   #0e1116;
    --surface: #171b22;
    --ink:     #ffffff;
    --ink-2:   #c3c2b7;
    --muted:   #898781;
    --line:    #242a33;
    --border:  #262c36;
    --track:   #262c36;
    --accent:  #6b8afd;
    --navy:    #cfd8ea;
    --shadow:  none;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

/* ---------------------------------------------------------- 헤더 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px; height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 6px 12px; border-radius: 7px; color: var(--ink-2); font-weight: 550;
}
.nav a:hover { background: var(--track); text-decoration: none; }
.nav a.on { background: var(--accent); color: #fff; }
.who { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.who b { color: var(--ink-2); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 18px 20px 60px; }

/* ---------------------------------------------------------- 카드 */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
}
.card + .card { margin-top: 14px; }
.card > h2 {
  font-size: 13px; text-transform: none; color: var(--ink-2);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.card > h2 .sub { color: var(--muted); font-weight: 500; font-size: 12px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .g2, .g3 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- 단계 탭 */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px;
  margin-bottom: 14px; scrollbar-width: thin;
}
.tab {
  flex: 1 1 0; min-width: 132px; text-decoration: none; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px 10px; box-shadow: var(--shadow); transition: border-color .12s;
}
.tab:hover { text-decoration: none; border-color: var(--accent); }
.tab.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow); }
.tab.on .t-name { color: var(--accent); }
.tab .t-name {
  display: block; font-weight: 650; font-size: 12.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tab .t-no {
  display: inline-block; min-width: 15px; height: 15px; line-height: 15px; text-align: center;
  border-radius: 4px; background: var(--track); color: var(--muted);
  font-size: 10.5px; font-weight: 700; margin-right: 5px; vertical-align: 1px;
}
.tab.on .t-no { background: var(--accent); color: #fff; }
.tab .t-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tab .t-pct {
  font-size: 15px; font-weight: 680; font-variant-numeric: tabular-nums;
  white-space: nowrap; min-width: 42px;
}
.tab .meter { height: 6px; }
.tab .t-cnt {
  display: block; margin-top: 6px; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tab .t-cnt b { color: var(--ink-2); font-weight: 600; }
.tab.all { background: var(--plane); }
.tab.none { border-style: dashed; }

/* ---------------------------------------------------------- 히어로 */
.hero { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-num { line-height: 1; }
.hero-num > b { font-size: 58px; font-weight: 680; letter-spacing: -.03em; }
.hero-num > i { font-size: 22px; font-style: normal; color: var(--muted); margin-left: 2px; }
.hero-num p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; max-width: 260px; }
.hero-num p b { font-size: 13.5px; font-weight: 700; }
.hero-main { flex: 1; min-width: 320px; }

.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px;
  background: var(--plane);
}
.tile b { display: block; font-size: 24px; font-weight: 650; line-height: 1.15; }
.tile span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.tile span::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--muted));
}

/* ---------------------------------------------------------- 미터 */
.meter {
  display: flex; gap: 2px; height: 10px; background: var(--track);
  border-radius: 5px; overflow: hidden; flex: 1; min-width: 80px;
}
.meter .seg { display: block; height: 100%; border-radius: 4px; }
.meter-val {
  font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-2);
  min-width: 52px; text-align: right; font-weight: 600;
}
.meter-row { display: flex; align-items: center; gap: 10px; }
.hero-main .meter { height: 16px; border-radius: 8px; }

/* 롤업 목록 */
.rollup { display: flex; flex-direction: column; gap: 2px; }
.rollup .r1 > summary, .rollup .flat {
  display: flex; align-items: center; gap: 12px; padding: 7px 8px;
  border-radius: 7px; cursor: pointer; list-style: none;
}
.rollup .flat { cursor: default; }
.rollup .r1 > summary::-webkit-details-marker { display: none; }
.rollup .r1 > summary:hover, .rollup .flat:hover { background: var(--plane); }
.rollup .nm {
  width: 220px; min-width: 140px; font-weight: 600; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rollup .r1 > summary .nm::before { content: "▸ "; color: var(--muted); }
.rollup .r1[open] > summary .nm::before { content: "▾ "; }
.rollup .cnt {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 92px; text-align: right;
}
.rollup .kids { padding: 2px 0 8px 22px; display: flex; flex-direction: column; gap: 2px; }
.rollup .kids .nm { font-weight: 500; font-size: 12.5px; color: var(--ink-2); }

/* ---------------------------------------------------------- 배지 */
.badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--ink-2); background: var(--plane); border: 1px solid var(--border);
}
.badge i { color: var(--c); font-style: normal; font-size: 11px; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend b { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.legend b::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* ---------------------------------------------------------- 표 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
/* 긴 작업 목록에서만 헤더 고정 (표 영역 자체가 세로 스크롤) */
.tbl-scroll.sticky { max-height: calc(100vh - 185px); overflow: auto; }
.tbl-scroll.sticky th { position: sticky; top: 0; background: var(--surface); z-index: 5; }
tbody tr:hover { background: var(--plane); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-scroll { overflow-x: auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.dim { color: var(--muted); }
.ell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- 폼 */
input[type=text], input[type=password], input[type=search], select, textarea, input[type=file] {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { font-size: 12.5px; color: var(--ink-2); }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 7px;
  padding: 6px 13px; border: 1px solid var(--border); white-space: nowrap;
  background: var(--surface); color: var(--ink-2);
}
.btn:hover { background: var(--track); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.danger  { background: var(--crit);   border-color: transparent; color: #fff; }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }

.stbtns { display: inline-flex; gap: 3px; }
.stbtns button {
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); white-space: nowrap;
}
.stbtns button:hover { border-color: var(--c); color: var(--c); }
.stbtns button.on { background: var(--c); border-color: transparent; color: #fff; }

/* ---------------------------------------------------------- 기타 */
.flash {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; font-weight: 550;
  background: #e8f4ea; color: #14532d; border: 1px solid rgba(12,163,12,.25);
}
.flash.err { background: #fdeaea; color: #7f1d1d; border-color: rgba(208,59,59,.25); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .flash { background: #14301c; color: #b7e3c1; }
  :root:not([data-theme="light"]) .flash.err { background: #331717; color: #f2b8b8; }
}

.login-page {
  min-height: 100vh; display: grid; place-items: center; background: var(--plane); padding: 20px;
}
.login-box { width: 340px; }
.login-box h1 { font-size: 19px; margin-bottom: 4px; }
.login-box p.sub { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; }
.login-box label { display: block; margin: 12px 0 4px; }
.login-box input { width: 100%; }
.login-box .btn { width: 100%; margin-top: 18px; padding: 9px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h2 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }

.upl-hint { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.upl-hint code {
  background: var(--track); padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-2);
}
.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.pulse.off { background: var(--muted); }

/* ================================================================
   정부 표준형 헤더 + 대시보드 (참고 시스템 레이아웃 기준)
   ================================================================ */
.gov-head {
  display: flex; align-items: center; gap: 16px;
  max-width: 1500px; margin: 0 auto; padding: 12px 20px 10px;
}
.gov-logo { flex: 0 0 auto; min-width: 40px; }
.gov-logo img { height: 34px; width: auto; display: block; }
.gov-head h1 {
  flex: 1; text-align: right; font-size: 21px; font-weight: 800;
  letter-spacing: -.02em; color: var(--navy); line-height: 1.3;
}
.gov-mark {
  display: inline-block; width: 14px; height: 20px; margin-right: 9px;
  background: var(--track); border-radius: 2px; vertical-align: -3px;
}
@media (max-width: 760px) {
  .gov-head { padding: 10px 14px 8px; gap: 10px; }
  .gov-head h1 { font-size: 14px; text-align: left; }
  .gov-logo img { height: 26px; }
  .gov-mark { display: none; }
}

/* 상단 메뉴 — 참고 시스템의 조밀한 사각 탭 */
.topbar {
  gap: 10px; height: auto; min-height: 46px; padding: 6px 20px;
  flex-wrap: wrap; border-top: 2px solid var(--navy);
}
.nav { gap: 3px; flex-wrap: wrap; }
.nav a {
  padding: 7px 14px; border-radius: 5px; font-size: 13px; font-weight: 650;
  border: 1px solid var(--border); background: var(--surface);
}
.nav a.on { background: #2b3444; border-color: #2b3444; color: #fff; }

/* ---------------------------------------------------------- 카드 그리드 */
.dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.dash > .card {
  margin: 0; border-radius: var(--radius2); padding: 15px 17px 16px;
  display: flex; flex-direction: column;
}
.dash > .card > h2 {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  margin-bottom: 13px; gap: 7px;
}
.ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 6px; font-style: normal;
  font-size: 12px; color: #fff; flex: 0 0 auto;
}
.ic-blue { background: var(--accent); }
.ic-green { background: var(--don-done); }
.ic-amber { background: var(--amber); }
.ic-violet { background: var(--violet); }
.ic-red { background: var(--crit); }
.dash h2 .pill {
  margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 6px; background: #fdecec; color: var(--crit); white-space: nowrap;
}
.dash h2 .upd { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); }

.c-total  { grid-column: span 4; }
.c-bars   { grid-column: span 8; }
.c-clock  { grid-column: span 3; }
.c-span   { grid-column: span 3; }
.c-live   { grid-column: span 6; grid-row: span 2; }
.c-notice { grid-column: span 6; }
.c-flow   { grid-column: span 6; }
.c-issue  { grid-column: span 6; }
.c-owner  { grid-column: span 6; }
.c-log    { grid-column: span 12; }   /* 최근 이력은 가로 전체 */
@media (max-width: 1180px) {
  .c-total, .c-bars, .c-clock, .c-span, .c-live, .c-notice,
  .c-flow, .c-owner, .c-log { grid-column: span 12; }
  .c-live { grid-row: auto; }
}

/* ---------------------------------------------------------- 도넛 + 스탯 */
.total-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { position: relative; flex: 0 0 auto; }
.donut-c {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.1;
}
.donut-c b { font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.donut-c span { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.statbox { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 8px; }
.sb {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid; border-radius: 10px; padding: 11px 13px;
}
.sb i {
  width: 26px; height: 26px; border-radius: 8px; font-style: normal; font-size: 13px;
  display: flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto;
}
.sb span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sb b { margin-left: auto; font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
.sb-blue  { background: #eef2ff; border-color: #d7e0ff; }
.sb-blue i, .sb-blue b { background: var(--accent); }
.sb-green { background: #eafaf3; border-color: #cfefe2; }
.sb-green i { background: var(--don-done); }
.sb-amber { background: #fff8e8; border-color: #f6e4bd; }
.sb-amber i { background: var(--amber); }
.sb-red   { background: #fdecec; border-color: #f6cfcf; }
.sb-red i { background: var(--crit); }
.sb-blue b { background: none; color: var(--accent); }
.sb-green b { color: #14a06c; }
.sb-amber b { color: #c47f06; }
.sb-red b { color: var(--crit); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sb { background: #1d222b; border-color: #2b323d; }
}

/* ---------------------------------------------------------- 단계별 세로 막대 */
.vchart { display: flex; gap: 10px; flex: 1; }
.vaxis {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: 10px; color: var(--muted); text-align: right;
  padding-bottom: 46px; height: 214px; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.vbars {
  display: flex; gap: 7px; flex: 1; overflow-x: auto; padding-bottom: 2px;
  align-items: flex-end;
}
.vbar {
  flex: 1 1 0; min-width: 62px; text-align: center; text-decoration: none;
  color: var(--ink-2); border-radius: 8px; padding: 0 2px 4px;
}
.vbar:hover { text-decoration: none; background: var(--plane); }
.vbar.on { background: #eef2ff; box-shadow: inset 0 0 0 1px var(--accent); }
.vbar .track {
  display: block; height: 168px; background: var(--track);
  border-radius: 6px; position: relative; overflow: hidden;
}
.vbar .fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #ffb84d, var(--amber)); border-radius: 6px;
}
/* 도넛·진행상황 칩과 동일한 상태 색 */
.vbar .fill.f-done  { background: linear-gradient(180deg, #3ddba6, var(--don-done)); }
.vbar .fill.f-run   { background: linear-gradient(180deg, #ffb84d, var(--amber)); }
.vbar .fill.f-issue { background: linear-gradient(180deg, #f07a6a, var(--crit)); }
/* 이슈 단계는 진척률 0%여도 트랙 테두리로 표시 */
.vbar.has-issue .track { box-shadow: inset 0 0 0 2px rgba(208,59,59,.45); }
.vbar .nm {
  display: block; margin-top: 7px; font-size: 11px; font-weight: 600; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vbar .pc {
  display: block; font-size: 12px; font-weight: 750;
  font-variant-numeric: tabular-nums; margin-top: 2px;
}
.vbar .pc.p-done { color: #14a06c; }   /* 100% 완료 — 초록 */
.vbar .pc.p-run  { color: var(--navy); } /* 진행 중 — 남색 */
.vbar .pc.p-none { color: var(--muted); } /* 미착수 — 회색 */

/* 통제자 범위 표시 */
.scope-tag {
  font-size: 12.5px;
  color: var(--navy);
  background: #eaf0fb;
  border: 1px solid #c9d8f2;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.scope-tag b { font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vbar .pc.p-done { color: #22c58b; }
  :root:not([data-theme="light"]) .vbar .pc.p-run  { color: #9db4e0; }
}
.vbar .ct { display: block; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vbar.on .nm { color: var(--accent); }

/* ---------------------------------------------------------- 시계 */
.clock { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.clock-ico {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.clock .lbl { display: block; font-size: 10px; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.clock b { font-size: 27px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock-date {
  margin-left: auto; text-align: right; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.clock-date span { display: block; font-size: 11px; }

/* ---------------------------------------------------------- 개시/종료 · 공지 */
.span-form, .span-view { display: flex; flex-direction: column; gap: 8px; }
.span-form label, .span-view p {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.span-form input[type=datetime-local] { margin-left: auto; font-size: 12.5px; }
.span-view p b { margin-left: auto; color: var(--accent); font-variant-numeric: tabular-nums; }
.dot { font-size: 9px; color: var(--accent); }
.dot-navy { color: var(--navy); }
.span-form .btn { align-self: flex-end; }

.notice-form { display: flex; gap: 7px; margin-bottom: 10px; }
.notice-form input { flex: 1; }
.notice-box {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 16px; border-radius: 10px; background: #eafaf3;
  border-left: 4px solid var(--don-done);
  font-size: 19px; font-weight: 700; text-align: center; color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notice-box { background: #17251f; }
}

/* ---------------------------------------------------------- 진행상황 흐름 */
.flow { display: flex; flex-wrap: wrap; gap: 8px; }
.flow .chip {
  display: flex; align-items: center; gap: 7px; text-decoration: none;
  background: var(--plane); border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 11px; min-width: 168px; flex: 1 1 200px;
}
.flow .chip:hover { text-decoration: none; border-color: var(--accent); }
.flow .chip.on { background: #eef2ff; border-color: var(--accent); }
.flow .no {
  width: 20px; height: 20px; border-radius: 50%; background: var(--track);
  color: var(--muted); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.flow .mk { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.flow .tx {
  flex: 1 1 auto; min-width: 0;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flow .pp {
  margin-left: auto; font-size: 12px; font-weight: 750;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.flow .s-done .mk { background: var(--don-done); }
.flow .s-done .no { background: var(--don-done); color: #fff; }
.flow .s-done .pp { color: #14a06c; }
.flow .s-run  .mk { background: var(--amber); }
.flow .s-run  .no { background: var(--amber); color: #fff; }
.flow .s-run  .pp { color: #c47f06; }
.flow .s-issue .mk { background: var(--crit); }
.flow .s-issue .no { background: var(--crit); color: #fff; }
.flow .s-issue .pp { color: var(--crit); }
.flow .s-empty { opacity: .55; }

/* ---------------------------------------------------------- 기타 */
.filterbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 9px 14px; border-radius: 10px; background: #eef2ff;
  border: 1px solid #d7e0ff; font-size: 13px; color: var(--ink-2);
}
.filterbar b { color: var(--accent); }
.filterbar a { margin-left: auto; font-weight: 650; }
.dash-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 4px; font-size: 12.5px; color: var(--muted);
}
.dash-foot form { display: flex; align-items: center; gap: 7px; }
.dash-foot .auto { display: flex; align-items: center; gap: 6px; cursor: pointer; margin-left: auto; }
.sep { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
.dash .tbl-scroll { flex: 1; }
.dash .c-live tbody tr.pend td { background: transparent; }

/* 그리드/플렉스 자식이 내용 폭에 밀려나지 않도록 (표가 카드를 넓히는 현상 방지) */
.dash > .card { min-width: 0; }
.dash .tbl-scroll, .dash .vchart, .dash .rollup { min-width: 0; }

/* ---------------------------------------------------------- 모바일 */
@media (max-width: 760px) {
  .wrap { padding: 12px 12px 40px; }
  .topbar { padding: 6px 12px; }
  .nav a { padding: 6px 10px; font-size: 12.5px; }
  .who { font-size: 11.5px; width: 100%; }
  .dash { gap: 10px; }
  .dash > .card { padding: 13px 13px 14px; border-radius: 12px; }
  .dash > .card > h2 { font-size: 13.5px; }
  .donut svg { width: 122px; height: 122px; }
  .donut-c b { font-size: 25px; }
  .statbox { min-width: 0; }
  .sb b { font-size: 19px; }
  .vaxis { height: 190px; padding-bottom: 44px; font-size: 9px; }
  .vbar .track { height: 146px; }
  .vbar { min-width: 54px; }
  .clock b { font-size: 23px; }
  .clock-date { font-size: 11px; }
  .notice-box { font-size: 15px; padding: 13px; }
  .flow .chip { min-width: 0; flex: 1 1 100%; }
  .rollup .nm { width: auto; min-width: 82px; flex: 1 1 auto; }
  .rollup .cnt { min-width: 54px; }
  .meter-val { min-width: 44px; font-size: 12px; }
  .dash-foot { gap: 8px; }
  .dash-foot .auto { margin-left: 0; }
  .filterbar { font-size: 12.5px; }
}

/* ---------------------------------------------------------- 전체진척율 상세 팝업 */
.card.clickable { cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.card.clickable:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(27,59,122,.10); }
.detail-hint {
  font-size: 11.5px; font-weight: 650; color: var(--accent);
  background: #eef2ff; border-radius: 5px; padding: 2px 7px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .detail-hint { background: #1d2436; }
}

.dlg {
  border: none; border-radius: 14px; padding: 22px 24px 20px;
  width: min(640px, 92vw); background: var(--surface); color: var(--ink);
  box-shadow: 0 12px 40px rgba(27,59,122,.22);
}
.dlg::backdrop { background: rgba(11,11,11,.42); }
.dlg h3 { font-size: 16px; margin-bottom: 4px; }
.dlg h4 { font-size: 13px; color: var(--ink-2); margin: 18px 0 8px; }
.dlg-x { position: absolute; top: 14px; right: 14px; }
.dlg-x button {
  border: none; background: none; font-size: 16px; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 4px;
}
.dlg-x button:hover { color: var(--ink); }
.dlg-pct { line-height: 1; margin: 10px 0 16px; }
.dlg-pct b { font-size: 42px; font-weight: 700; letter-spacing: -.03em; }
.dlg-pct i { font-size: 18px; font-style: normal; color: var(--muted); margin-left: 2px; }
.dlg .statbox { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dlg-tbl { max-height: 240px; overflow: auto; }
.dlg-foot { margin-top: 18px; text-align: right; }
@media (max-width: 560px) {
  .dlg { padding: 18px 16px 16px; }
  .dlg .statbox { grid-template-columns: 1fr; }
  .dlg-pct b { font-size: 34px; }
}
/* 최근 변경 이력의 상태 표기 — 대시보드에서는 색으로 강조하지 않음 */
.logst { font-weight: 650; color: var(--ink-2); }

.nw { white-space: nowrap; }

/* ---------------------------------------------------------- 열 너비 조절 표 */
table.rzt {
  table-layout: fixed;
  /* 실제 폭은 app.js 가 열 너비 합계로 지정한다 (JS 없을 때는 100%) */
  width: 100%;
}
/* 모든 칸을 한 줄 말줄임으로 — 열을 좁혀도 행 높이가 늘지 않는다 */
table.rzt td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.rzt td > .ell { max-width: none; }
table.rzt td .memo { width: 100%; }
table.rzt th { position: relative; overflow: hidden; }

/* 헤더 오른쪽 경계의 드래그 손잡이 */
.rz {
  position: absolute; top: 0; right: 0; width: 8px; height: 100%;
  cursor: col-resize; user-select: none; touch-action: none; z-index: 6;
}
.rz::after {
  content: ""; position: absolute; right: 3px; top: 22%; width: 2px; height: 56%;
  background: var(--border); border-radius: 1px;
}
.rz:hover::after, .rz.on::after {
  background: var(--accent); top: 0; height: 100%;
}
body.rz-drag { cursor: col-resize; user-select: none; }
body.rz-drag * { cursor: col-resize !important; }

/* 작업 목록은 화면을 넓게 쓴다 */
.wrap.full { max-width: none; }

/* 최근 변경 이력 — 가로 전체를 쓰므로 칸이 벌어지지 않게 고정 배분 */
.logtbl { table-layout: fixed; }
.logtbl td.ell, .logtbl th { max-width: none; }

/* 삭제 등 되돌릴 수 없는 동작 */
.btn.sm.danger {
  background: var(--surface); color: var(--crit);
  border-color: rgba(208, 59, 59, .35);
}
.btn.sm.danger:hover { background: var(--crit); border-color: var(--crit); color: #fff; }

/* 작업 목록 표 — 열 제목은 가운데 정렬 */
table.rzt th { text-align: center; }
table.rzt th.num { text-align: center; }
