/* Design Benchmarking Agent — 1단계 화면 스타일
   화면 구성은 제출자 웹 프로토타입(짙은 남색 사이드바 + 밝은 본문 + 파란 강조)을 따릅니다.
   360px 까지 반응형, 좁은 화면에서는 사이드바가 위쪽 메뉴로 바뀝니다. */
:root {
  --container-pad: 16px;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --text: #16202c;
  --muted: #56616f;
  --line: #d6dde6;
  --primary: #2f73d9;
  --primary-dark: #215cb4;
  --primary-soft: #e8f0fc;
  --on-primary: #ffffff;
  --side: #0f2544;
  --side-2: #183a66;
  --on-side: #e7eef8;
  --on-side-muted: #9fb2cc;
  --danger: #b3261e;
  --warn-bg: #fff4d6;
  --ok: #1b6e3a;
  --fact: #1b6e3a;
  --obs: #8a4b00;
  --radius: 10px;
}
@media (min-width: 640px) { :root { --container-pad: 24px; } }
@media (min-width: 1024px) { :root { --container-pad: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}
button, input, select, textarea { font: inherit; color: inherit; }
input[type="file"] { max-width: 100%; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
a { color: var(--primary); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 50; }
[hidden] { display: none !important; }

/* ── 뼈대: 사이드바 + 본문 ─────────────────── */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--on-side); padding: 20px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-side); padding: 0 8px 18px; }
.brand-mark { font-weight: 800; font-size: 1.4rem; letter-spacing: .02em; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.05rem; }
.brand-sub { font-size: .78rem; color: var(--on-side-muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 8px; align-items: baseline;
  padding: 10px 12px; border-radius: var(--radius); color: var(--on-side); text-decoration: none;
}
.nav a .no { font-size: .78rem; color: var(--on-side-muted); }
.nav a .t { font-weight: 700; font-size: .95rem; }
.nav a .s { grid-column: 2; font-size: .78rem; color: var(--on-side-muted); }
.nav a:hover { background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { background: var(--side-2); }
.nav a[aria-current="page"] .no { color: #7fb0ff; }

.body { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 12px var(--container-pad); background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.scope-chip {
  display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; min-width: 0; max-width: 100%;
  padding: 6px 14px; border-radius: 16px; background: var(--primary-soft); border: 1px solid #c3d6f3;
  color: #17427e; font-weight: 700; font-size: .9rem; text-decoration: none;
}
.scope-chip .dim { font-weight: 500; color: var(--muted); }
.topbar-note { margin-left: auto; font-size: .85rem; color: var(--muted); }
.sample-banner { background: var(--warn-bg); border-bottom: 1px solid #e8cf85; color: #5a4400; font-size: .92rem; padding: 8px var(--container-pad); }
.main { padding: 24px var(--container-pad) 48px; width: 100%; max-width: calc(1280px + 2 * var(--container-pad)); }
.main:focus { outline: none; }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; padding: 14px var(--container-pad); }

@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 12px var(--container-pad); }
  .brand { padding: 0 0 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav a { display: inline-flex; gap: 6px; padding: 6px 10px; }
  .nav a .s { display: none; }
  .topbar { position: static; }
}

/* ── 공통 부품 ─────────────────────────── */
.stage { font-size: .8rem; font-weight: 800; color: var(--primary); letter-spacing: .04em; margin-bottom: 4px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin-bottom: 18px; }
.page-head .titles { margin-right: auto; min-width: 0; }
.page-head h1 { margin: 0; }
.page-head .lead { color: var(--muted); margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; min-width: 0; }
.card > h2 { font-size: 1.05rem; }
.note { color: var(--muted); font-size: .9rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.btn-big { min-height: 52px; font-size: 1.05rem; padding: 12px 28px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 선택 칸(Scope Setup) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.opt {
  position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; min-height: 52px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; min-width: 0;
}
.opt input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--primary); }
.opt .t { font-weight: 700; display: block; }
.opt .s { font-size: .8rem; color: var(--muted); display: block; }
.opt:has(input:checked) { background: var(--primary-soft); border-color: #9dbdf0; }
.opt .avail { font-size: .78rem; color: var(--muted); }
.opt .avail.zero { color: var(--obs); }
.summary { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 700; min-width: 0; }
.scope-id { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; color: #17427e; }

/* 양식 */
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 1100px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-weight: 700; font-size: .9rem; }
.field > span .req { color: var(--danger); margin-left: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.field textarea { min-height: 80px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--muted); }
.field .err { color: var(--danger); font-size: .88rem; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
fieldset.block { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 18px; margin: 0 0 18px; background: var(--surface); min-width: 0; }
fieldset.block legend { font-weight: 800; padding: 0 6px; }
.kind { display: inline-block; font-size: .75rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.kind.fact { background: #e3f3e8; color: var(--fact); }
.kind.obs { background: #fdf0dc; color: var(--obs); }
.kind.meta { background: #eef1f5; color: var(--muted); }
.submit-bar { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }

/* 이미지 목록(등록 화면) */
.media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.media-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; background: #fafbfd; }
.media-item .thumb { aspect-ratio: 4 / 3; background: #e9eef4; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); font-size: .85rem; text-align: center; padding: 6px; }
.media-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-item select, .media-item input { width: 100%; min-height: 38px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: #eef2f7; white-space: nowrap; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
table.list td.zero { color: #a3adba; }
table.list tr.differs td { background: #fffaf0; }
table.list td.blk { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.heat-1 { background: #eef4fd; } .heat-2 { background: #d9e7fb; } .heat-3 { background: #bcd4f7; }

/* 통계 타일 */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.tile .k { font-size: .85rem; color: var(--muted); }
.tile .v { font-size: 1.6rem; font-weight: 800; }

/* 갤러리 */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.mcard.picked { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.mcard .img { aspect-ratio: 4 / 3; background: #e9eef4; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; }
.mcard .img img { width: 100%; height: 100%; object-fit: contain; }
.mcard .bd { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mcard .nm { font-weight: 800; }
.mcard .nm a { color: var(--text); text-decoration: none; }
.mcard .nm a:hover { color: var(--primary); }
.mcard .spec { font-size: .85rem; color: var(--muted); }
.mcard .ft { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: #17427e; font-size: .78rem; font-weight: 700; }
.tag.muted { background: #eef1f5; color: var(--muted); }
.tag.warn { background: #fdecea; color: #7a1c14; }
.tag.ok { background: #e3f3e8; color: var(--ok); }

/* Side-by-Side */
.sbs { display: grid; gap: 12px; }
.sbs-row { display: grid; grid-template-columns: 120px repeat(var(--n), minmax(0, 1fr)); gap: 12px; align-items: start; }
.sbs-row .lab { font-weight: 800; font-size: .9rem; padding-top: 6px; }
.sbs-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.sbs-cell .img { aspect-ratio: 4 / 3; background: #e9eef4; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; text-align: center; padding: 4px; }
.sbs-cell .img img { width: 100%; height: 100%; object-fit: contain; }
.sbs-cell .cap { padding: 6px 10px; font-weight: 700; font-size: .9rem; }
@media (max-width: 700px) {
  .sbs-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sbs-row .lab { grid-column: 1 / -1; padding-top: 0; }
}

/* 상세 */
.detail-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
@media (max-width: 900px) { .detail-top { grid-template-columns: minmax(0, 1fr); } }
.viewer .main-img { aspect-ratio: 4 / 3; background: #e9eef4; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); }
.viewer .main-img img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs button { border: 2px solid var(--line); border-radius: 8px; background: #fff; padding: 4px 8px; cursor: pointer; font-size: .82rem; font-weight: 700; min-height: 36px; }
.thumbs button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); }
dl.kvs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: .92rem; }
dl.kvs dt { color: var(--muted); }
dl.kvs dd { margin: 0; min-width: 0; }
.blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .blocks { grid-template-columns: minmax(0, 1fr); } }

/* 가져오기 */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; }
.map-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fafbfd; }
.map-row .col { font-weight: 800; }
.map-row .ex { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-row select { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: #fff; width: 100%; }

.alert { padding: 10px 14px; border-radius: var(--radius); margin: 10px 0; }
.alert.warn { background: #fdecea; color: #7a1c14; }
.alert.info { background: #eaf1fa; color: #123a66; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* 대화상자·알림 */
.dialog { border: none; border-radius: 12px; padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog-body { padding: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b2430; color: #fff; padding: 12px 18px; border-radius: var(--radius); z-index: 100; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); }

/* 인쇄: 비교표만 */
/* ── 2026-09-29 추가: 07 Insight · 08 Report · 09 피드백 · 10 운영 루프 ── */
table.list td.up { background: #e3f4e8; }
table.list td.down { background: #fde8e6; }
table.list tr.sum th, table.list tr.sum td { background: #eef2f7; font-weight: 700; }
table.list td.pre { white-space: pre-line; min-width: 200px; }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.sw-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.sw-card h3 { margin: 0 0 6px; }
.sw-card ul { margin: 2px 0 8px; padding-left: 20px; }
.sw-k { font-weight: 800; font-size: .88rem; }
.sw-k.ok { color: var(--ok); }
.sw-k.bad { color: var(--danger); }
ol.loop { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ol.loop li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
ol.loop li.done { background: #eef8f1; border-color: #b9dfc5; }
ol.loop li .opt { border: 0; padding: 0; min-height: 44px; flex: 1 1 220px; }
.nav a .s.badge-warn { color: #ffd98a; font-weight: 700; }
.rp-screen { padding: 24px; }
.rp-screen .rp-fb { margin-top: 8px; }

@media print {
  .side, .topbar, .site-footer, .sample-banner, .no-print, .toast { display: none !important; }
  .shell { display: block; }
  body { background: #fff; font-size: 11pt; }
  .main { padding: 0; max-width: none; }
  .card { border: none; padding: 0; }
  .table-wrap { overflow: visible; border: none; }
  table.list th, table.list td { padding: 4px 6px; }
  .print-only { display: block !important; }
  .sbs-row { break-inside: avoid; }
}
.print-only { display: none; }

/* ── 과제 전환 링크 (2026-09-29, 과제 B 추가) ── */
.side-switch {
  display: block; margin: 18px 4px 0; padding: 10px 12px; border: 1px solid var(--side-2); border-radius: var(--radius);
  color: var(--on-side); text-decoration: none; font-weight: 700; font-size: .9rem;
}
.side-switch:hover { background: rgba(255, 255, 255, .06); }
@media (max-width: 1023px) { .side-switch { display: inline-block; margin: 8px 0 0; padding: 6px 10px; } }

/* ── 과제 B · 업무보고 Agent ── */
.drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 22px; border: 2px dashed var(--line); border-radius: 14px; background: #fafbfd; margin-bottom: 12px; }
.drop.over { border-color: var(--primary); background: var(--primary-soft); }
.btn input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn { position: relative; }
.pj-rows { display: grid; gap: 10px; margin-bottom: 12px; }
.pj-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 10px; align-items: end; }
@media (max-width: 700px) { .pj-row { grid-template-columns: minmax(0, 1fr); } }
.nowrap { white-space: nowrap; }
.att { font-size: .82rem; color: var(--muted); }
a.evlink { display: inline-block; margin: 0 6px 2px 0; font-weight: 800; font-size: .85rem; }
table.list.items td { min-width: 90px; }
table.list.items td.wide { min-width: 260px; }
table.list.items select, table.list.items input[type="text"], table.list.items input[type="date"], table.list.items textarea {
  width: 100%; min-height: 36px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
table.list.items textarea { resize: vertical; }
table.list tr.excluded td { opacity: .5; }
table.list tr.inferred textarea { font-style: italic; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.steps { margin: 8px 0 12px; padding-left: 22px; }
.steps li { margin: 4px 0; }
pre.mail-body { white-space: pre-wrap; word-break: keep-all; overflow-wrap: break-word; font-family: inherit; background: #fafbfd; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 10px; }
.paper { padding: 28px; }
.paper .rp h1 { font-size: 1.4rem; }
.paper .rp h2 { font-size: 1.1rem; }
.paper .rp a.ev { text-decoration: none; }
@media (max-width: 700px) {
  .paper { padding: 16px; }
  .paper .rp table { display: block; overflow-x: auto; } /* 좁은 화면에서는 표만 옆으로 밀어 봅니다 */
}
@media print {
  .task-b .paper { border: none; padding: 0; }
}

/* 2026-09-29 오후 늦게 — 평가 8기준 표 · AI 연결 설정 */
.blocks > .span-all { grid-column: 1 / -1; }
.eval-table th[scope="row"] { min-width: 220px; }
.eval-table td select { min-width: 84px; }
.eval-table td input { min-width: 220px; width: 100%; }
.ai-send { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* 2026-09-30 — 보고서 목적별 비중 · Radar Chart · 내 PC 에서 쓰기 */
.weight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 8px 0; }
.weight-grid input { width: 100%; }
.wt-ok { color: var(--ok); }
.wt-bad { color: var(--danger); }
.radar-box { margin-top: 12px; }
.radar-fig { margin: 0; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.radar-fig svg { flex: 1 1 320px; min-width: 0; height: auto; }
.radar-fig figcaption { flex: 1 1 200px; min-width: 0; }
.radar-legend { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.radar-legend li { margin: 3px 0; }
.radar-legend .muted { color: var(--muted); }
.radar-key { display: inline-block; width: 20px; border-top: 3px solid; margin-right: 8px; vertical-align: middle; }
.local-use ol { margin: 0 0 12px; padding-left: 22px; }
.local-use li { margin: 4px 0; }

/* ── data09-27: 02 메일 자동 수집 · 보고서 (한 화면) ── */
.step h2 { display: flex; align-items: center; gap: 10px; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: .95rem; flex: none; }
.seg.big .opt { flex: 1 1 220px; padding: 14px 16px; }
.seg.big .opt .t { font-size: 1.05rem; }
.inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.inline-row input[type="date"] { min-height: 36px; }
.btn-lg { min-height: 52px; padding: 10px 28px; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.tile .v.small { font-size: 1.15rem; white-space: nowrap; }
.tile .note { margin-top: 2px; font-size: .8rem; }
.warn-text { color: var(--obs); }
details.card > summary { cursor: pointer; list-style-position: inside; }
details.card[open] > summary { margin-bottom: 12px; }
.att-detail { border-top: 1px solid var(--line); padding: 8px 0; }
.att-detail > summary { cursor: pointer; overflow-wrap: anywhere; }
.att .tag { margin-left: 4px; }

/* 2026-09-30 「메일로 송/수신」 — 받은 메일에서 찾은 보고서 파일 · 임원 보고용 요약 미리보기 */
.found { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: #fafbfd; }
.found h3 { margin: 0 0 8px; font-size: 1rem; }
.found td .tag + .tag { margin-left: 4px; }
.exec-preview { display: block; width: 100%; min-height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 8px; }

/* ── 2026-09-30 「메인디자인 요청드립니다」 — 00 한눈에 보기(첫 화면) ──
   남색 머리 띠(흐름 소개 + 지금 할 일) → 흐름 다섯 단계 → 설정 상태 · 이번 기간 현황 → 모든 메뉴.
   색은 기존 토큰(남색 사이드바 · 파란 강조)을 그대로 쓰고, 글자 대비는 모두 4.5:1 이상으로 계산해 골랐습니다. */
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 1rem; flex: none; }
.home > * { margin-bottom: 20px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: stretch;
  background: linear-gradient(135deg, #0f2544 0%, #1a3f73 100%); color: #ffffff; border-radius: 16px; padding: 28px;
}
.hero-eyebrow { margin: 0 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; color: #9cc3ff; }
.hero h1 { color: #ffffff; font-size: 1.75rem; margin: 0 0 10px; }
.hero-lead { color: #d5e1f2; margin: 0 0 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn-hero { background: #ffffff; color: #0f2544; border-color: #ffffff; }
.btn-hero:hover { background: #e8f0fc; border-color: #e8f0fc; }
.btn-ghost { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, .6); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #ffffff; }
.hero-next { display: flex; flex-direction: column; gap: 6px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; padding: 18px; min-width: 0; }
.hero-next p { margin: 0; }
.hero-next-k { font-size: .8rem; font-weight: 800; letter-spacing: .04em; color: #9cc3ff; }
.hero-next-t { font-size: 1.2rem; font-weight: 800; color: #ffffff; }
.hero-next-s { color: #d5e1f2; font-size: .92rem; flex: 1; }
.hero-next .btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; } .hero h1 { font-size: 1.45rem; } }

.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.sec-head h2 { margin: 0; }
.sec-head .note { margin: 0; }
ol.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { ol.flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } ol.flow > li:last-child { grid-column: 1 / -1; } }
@media (min-width: 1200px) { ol.flow { grid-template-columns: repeat(5, minmax(0, 1fr)); } ol.flow > li:last-child { grid-column: auto; } }
.flow-step { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); min-width: 0; }
.flow-step h3 { margin: 6px 0 0; font-size: 1.02rem; }
.flow-step p { margin: 0; }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flow-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--side); color: #ffffff; font-weight: 800; flex: none; }
.flow-state { font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.flow-sub { font-size: .85rem; color: var(--muted); }
.flow-now { font-size: .9rem; font-weight: 700; color: var(--text); flex: 1; }
.flow-go { align-self: flex-start; margin-top: 6px; font-weight: 800; font-size: .92rem; color: var(--primary-dark); text-decoration: none; padding: 4px 0; }
.flow-go:hover { text-decoration: underline; }
.flow-step.done { background: #f1f9f3; border-color: #b9dfc5; }
.flow-step.done .flow-state { background: #e3f3e8; color: var(--ok); }
.flow-step.done .flow-no { background: var(--ok); }
.flow-step.now { border: 2px solid var(--primary); background: #f4f8fe; padding: 13px; }
.flow-step.now .flow-state { background: var(--primary-dark); color: #ffffff; }
.flow-step.now .flow-no { background: var(--primary-dark); }
.flow-step.upper { background: #f3f5f8; }
.flow-step.upper .flow-no { background: #6b7684; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.home-grid > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
dl.stat-list { margin: 0; display: grid; gap: 0; }
.stat-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row dt { color: var(--muted); font-size: .9rem; }
.stat-row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; font-weight: 700; }
.stat-v { min-width: 0; flex: 1 1 12em; }
.stat-fix { font-size: .85rem; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; align-self: center; }
.dot.ok { background: var(--ok); }
.dot.warn { background: #b26a00; }
@media (max-width: 560px) { .stat-row { grid-template-columns: minmax(0, 1fr); } }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; background: #fafbfd; }
.kpi-k { font-size: .85rem; color: var(--muted); font-weight: 700; }
.kpi-v { font-size: 1.8rem; font-weight: 800; line-height: 1.2; color: #17427e; }
.kpi-s { font-size: .82rem; color: var(--muted); }
.kpi.warn { background: var(--warn-bg); border-color: #e8cf85; }
.kpi.warn .kpi-k, .kpi.warn .kpi-s, .kpi.warn .kpi-v { color: #5a4400; }
.kpi.warn a { color: #5a4400; font-weight: 800; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.menu-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; min-height: 44px; }
.menu-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.menu-no { font-size: .8rem; font-weight: 800; color: var(--primary-dark); }
.menu-t { font-weight: 800; }
.menu-s { grid-column: 2; font-size: .82rem; color: var(--muted); }
