/* ncom.oxythus.com — 기안문서 아카이브
   ---------------------------------------------------------------------------
   화면 언어는 노트북 조회 도구(127.0.0.1:5000, app.py/templates/index.html)와
   같은 것을 쓴다. 어두운 바탕 · 왼쪽 고정 사이드바 · 촘촘한 표.
   토큰 이름은 옛 이름(--surface/--ink/--series-1 …)을 그대로 남겨 두었다 —
   기존 화면들이 그 이름을 쓰고 있어, 값만 바꿔 끼우면 전부 따라온다. */
:root {
  color-scheme: dark;

  /* app.py 화면의 색 그대로 */
  --bg:        #0f1420;
  --panel:     #161d2e;
  --panel2:    #1c2740;
  --border:    #2a3654;
  --text:      #e6ecf5;
  --accent:    #4c8dff;
  --accent2:   #2dd4bf;
  --pk:        #f5b955;
  --danger:    #ff6b6b;
  --row-hover: #202c48;

  /* 옛 이름 — 값만 새 팔레트로 */
  --surface:   var(--panel);
  --page:      var(--bg);
  --ink:       var(--text);
  --ink-2:     #b6c6e2;
  --muted:     #8ea0c0;
  --grid:      var(--border);
  --line:      #35446b;
  --ring:      rgba(76,141,255,.35);

  --series-1:  var(--accent);
  --series-1-w:#24345a;
  --good:      var(--accent2);
  --warning:   var(--pk);
  --critical:  var(--danger);

  --radius: 10px;
  /* 위쪽 띠 높이 — 왼쪽 브랜드 줄과 오른쪽 정보 줄이 한 선으로 이어지게 한다 */
  --topbar-h: 46px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 13px/1.65 "Segoe UI", "Malgun Gothic", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.dim { color: var(--muted); font-weight: 400; font-size: 12px; }
.tiny { font-size: 11px; color: var(--muted); }
h1 { font-size: 19px; margin: 0 0 6px; letter-spacing: -.2px; }
h2 { font-size: 14px; margin: 0; }
.sub { color: var(--ink-2); margin: 0 0 18px; }
.note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
code { font-family: Consolas, ui-monospace, monospace; color: var(--accent2); }

/* ── 앱 껍데기 (사이드바 + 본문) ───────────────────────
   app.py 화면은 100vh 안에서 각 칸이 따로 스크롤한다. 여기는 문서를 읽는
   사이트라 본문은 페이지째 흐르게 두고, 사이드바만 붙여 둔다. */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--panel); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; overflow: hidden;
}
/* 브랜드 줄 — 오른쪽 위쪽 띠(.topbar)와 **같은 높이**로 맞춘다.
   두 줄이 한 선으로 이어져야 화면이 정돈돼 보인다. */
.brandrow {
  display: flex; align-items: center; gap: 6px; height: var(--topbar-h);
  padding: 0 8px 0 14px; border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  color: var(--text); font-size: 13.5px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden;
}
.brand:hover { text-decoration: none; opacity: .85; }
.brand .logo { width: 26px; height: 26px; flex: none; display: block; }
.brand .tx { overflow: hidden; text-overflow: ellipsis; }
.pinbtn {
  flex: none; background: none; border: 1px solid transparent; border-radius: 7px;
  padding: 5px; cursor: pointer; line-height: 0; color: var(--muted);
}
.pinbtn svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.pinbtn:hover { background: var(--panel2); color: var(--text); }
.pinbtn.on { color: var(--accent); background: rgba(76,141,255,.14); border-color: rgba(76,141,255,.32); }

/* ── 접힌 사이드바(아이콘 줄) ──────────────────────────
   고정을 풀면 56px 줄만 남기고, 마우스를 올리면 본문 위로 펼쳐진다.
   본문이 밀리지 않아야 하므로 펼칠 때는 자리(그리드 칸)를 늘리지 않는다. */
.app.rail { grid-template-columns: 56px minmax(0, 1fr); }
/* 사이드바가 position:fixed 로 빠지면 본문이 1번 칸(56px)으로 올라온다 — 자리를 못 박아 둔다 */
.app.rail .main { grid-column: 2; }
.app.rail .sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 56px; z-index: 60;
  transition: width .16s ease;
}
.app.rail .sidebar:hover, .app.rail .sidebar:focus-within {
  width: 272px; box-shadow: 8px 0 28px rgba(0,0,0,.45);
}
/* 접혀 있을 때는 아이콘만 남긴다 */
.app.rail .sidebar:not(:hover):not(:focus-within) .tx,
.app.rail .sidebar:not(:hover):not(:focus-within) .brand .sub,
.app.rail .sidebar:not(:hover):not(:focus-within) .dbpick,
.app.rail .sidebar:not(:hover):not(:focus-within) .side-admin > .lbl,
.app.rail .sidebar:not(:hover):not(:focus-within) .side-admin .tx em,
.app.rail .sidebar:not(:hover):not(:focus-within) .side-sec > .lbl { display: none; }
.app.rail .sidebar:not(:hover):not(:focus-within) .brandrow { padding: 0; justify-content: center; }
.app.rail .sidebar:not(:hover):not(:focus-within) .brand { flex: none; }
.app.rail .sidebar:not(:hover):not(:focus-within) .pinbtn { display: none; }
.app.rail .sidebar:not(:hover):not(:focus-within) .snav a { justify-content: center; padding: 9px 0; }
@media (max-width: 900px) {
  .app.rail { grid-template-columns: 1fr; }
  .app.rail .sidebar { position: static; width: auto; }
}

.side-scroll { flex: 1; overflow-y: auto; }
.side-sec { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.side-sec > .lbl {
  display: block; color: var(--muted); font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 5px;
}
/* 사이드바 메뉴 — 고른 항목은 **부드럽게 채운 칸**으로 나타낸다.
   왼쪽에 세로 막대를 세우는 방식은 쓰지 않는다(다른 도구들과 너무 닮았다). */
.snav { display: flex; flex-direction: column; padding: 8px; gap: 2px; }
.snav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13px;
  border: 1px solid transparent;
}
.snav a:hover { background: var(--panel2); text-decoration: none; color: var(--text); }
.snav a.on {
  background: rgba(76,141,255,.14); border-color: rgba(76,141,255,.30);
  color: var(--text); font-weight: 600;
}
.snav a.on .ic { filter: none; opacity: 1; }
.snav .ic { width: 16px; text-align: center; flex: none; opacity: .8; }

/* 기관(DB) 고르기 — app.py 의 검색되는 드롭다운을 그대로 옮겼다 */
.dbpick { padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--panel2); }
.dbpick .lbl {
  display: block; color: var(--muted); font-size: 10px; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 4px;
}
.dbpick .dbcount { color: var(--muted); font-size: 10px; margin-top: 4px; }
.db-combo { position: relative; }
.db-current {
  width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--accent);
  border-radius: 6px; color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
  text-align: left; display: flex; align-items: center; gap: 6px;
}
.db-current span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-current .caret { color: var(--muted); }
.db-drop {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); overflow: hidden;
}
.db-drop input {
  width: 100%; padding: 8px 10px; background: var(--bg); border: none;
  border-bottom: 1px solid var(--border); color: var(--text); font-size: 12px; border-radius: 0;
}
.db-drop input:focus { outline: none; }
.db-opts { max-height: 340px; overflow-y: auto; }
.db-opt {
  padding: 7px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px;
}
.db-opt .on-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.db-opt .on-meta { color: var(--muted); font-size: 10.5px; flex: none; }
.db-opt:hover, .db-opt.active { background: var(--panel2); }
.db-opt.cur { color: var(--accent2); font-weight: 600; }
.db-opt.cur::before { content: "✓"; }
.db-grouphdr {
  padding: 6px 12px; font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; background: #0c1120; position: sticky; top: 0;
}
.db-opt mark { background: rgba(76,141,255,.35); color: inherit; border-radius: 2px; }
.db-empty { padding: 12px; color: var(--muted); font-size: 12px; text-align: center; }

/* 관리자 도구 — 사이드바 **맨 아래**에 붙는다.
   위 메뉴는 '고른 기관을 본다', 여기는 '아카이브를 굴린다' 는 뜻이라 자리를 뗐다. */
.side-admin {
  flex: none; border-top: 1px solid var(--border); background: var(--panel2);
  padding: 7px 0 9px;
}
.side-admin > .lbl {
  display: block; padding: 2px 16px 4px; color: var(--muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
}
.side-admin .snav { padding: 0 8px; gap: 1px; }
.side-admin .snav a { font-size: 12.5px; padding: 7px 10px; }
.side-admin .tx em { font-style: normal; font-size: 10px; opacity: .55; margin-left: 5px; }
/* 위쪽 메뉴 칸은 아래 선을 두지 않는다 — 관리자 칸과 헷갈리지 않게 */
.side-sec.nb { border-bottom: 0; }

/* (사이드바에 있던 기관 51곳 목록 스타일 .orglist/.oitem/.side-legend 는 걷어냈다 —
    그 목록은 작업 현황의 '기관별 현황' 표로 옮겼다: .og-table) */

/* 본문 쪽 */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--panel); border-bottom: 1px solid var(--border);
  height: var(--topbar-h); padding: 0 18px;
  display: flex; align-items: center; gap: 16px;
  font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden;
}
.topbar .info { overflow: hidden; text-overflow: ellipsis; }
.topbar b { color: var(--accent2); font-weight: 600; }
.topbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.badge {
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 1px 9px; font-size: 10.5px; font-weight: 700;
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 18px; padding-bottom: 56px; }
/* .main 은 세로 flex 다. 그 안에서 `margin: 0 auto` 를 만나면 늘어나지 않고
   **내용 크기로 줄어든다**(교차축 auto 여백이 stretch 를 이긴다). 그러면 표가 없는
   화면 — 문서 상세 같은 — 이 창이 넓어도 600px 로 쪼그라든다. 폭을 먼저 채우게 한다. */
.main > .wrap { width: 100%; }
.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 11.5px; }
.foot .wrap { padding-top: 14px; padding-bottom: 22px; }

/* ☰ 단추 — 넓은 화면에서는 숨긴다.
   이 규칙은 반드시 아래 미디어 쿼리보다 **앞에** 있어야 한다. 뒤에 두면
   같은 우선순위라 나중 것이 이겨서, 좁은 화면에서도 단추가 안 나온다(실제로 그랬다). */
.navbtn {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 30px; margin-right: 8px; flex: none;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  color: var(--ink-2); cursor: pointer;
}
.navbtn:hover { background: var(--panel2); color: var(--text); }

/* ── 휴대폰·좁은 화면 ────────────────────────────────
   메뉴가 화면 절반을 먹으면 정작 볼 것이 안 보인다. 평소에는 접어 두고
   위쪽 ☰ 단추로 펼친다. 펼친 메뉴는 본문 위에 겹쳐 뜬다. */
@media (max-width: 900px) {
  .app, .app.rail { grid-template-columns: 1fr; }
  .sidebar, .app.rail .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 300px);
    z-index: 80; border-right: 1px solid var(--border); border-bottom: 0;
    transform: translateX(-102%); transition: transform .18s ease;
    box-shadow: 8px 0 28px rgba(0, 0, 0, .5);
  }
  body.navopen .sidebar, body.navopen .app.rail .sidebar { transform: none; }
  .app.rail .sidebar:hover, .app.rail .sidebar:focus-within { width: min(84vw, 300px); }
  /* 접힘(rail) 상태에서 글자를 숨기던 규칙을 휴대폰에서는 되돌린다.
     숨기는 쪽 선택자가 :not(:hover):not(:focus-within) 까지 달고 있어 매우 강하다.
     그래서 **똑같은 선택자를 그대로 다시 써서** 이겨야 한다(짧게 쓰면 진다). */
  .app.rail .sidebar:not(:hover):not(:focus-within) .tx,
  .app.rail .sidebar:not(:hover):not(:focus-within) .brand .sub,
  .app.rail .sidebar:not(:hover):not(:focus-within) .dbpick,
  .app.rail .sidebar:not(:hover):not(:focus-within) .side-admin > .lbl,
  .app.rail .sidebar:not(:hover):not(:focus-within) .side-admin .tx em,
  .app.rail .sidebar:not(:hover):not(:focus-within) .side-sec > .lbl { display: revert; }
  .app.rail .sidebar:not(:hover):not(:focus-within) .snav a {
    justify-content: flex-start; padding: 8px 10px;
  }
  .app.rail .sidebar:not(:hover):not(:focus-within) .brandrow {
    padding: 10px 12px; justify-content: flex-start;
  }
  .app.rail .main { grid-column: 1; }
  .pinbtn { display: none; }
  .navbtn { display: inline-flex; }
  body.navopen::after {                     /* 메뉴 밖을 누르면 닫히도록 덮개 */
    content: ''; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .5);
  }
  .side-scroll { max-height: none; }
  .wrap { padding-left: 12px; padding-right: 12px; }
  .topbar .info { display: none; }          /* 좁으면 제목 줄이 두 줄로 접힌다 */
}

/* ── 대시보드 상단 ────────────────────────────────── */
.hero {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 14px;
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
}
.hero-main { flex: 0 0 auto; }
.hero-label { margin: 0; font-size: 12px; color: var(--muted); }
.hero-value {
  margin: 2px 0 4px; font-size: 46px; line-height: 1.05; font-weight: 600;
  letter-spacing: -.02em; color: var(--text);
}
.hero-value .unit { font-size: 18px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.hero-sub { margin: 0; font-size: 12px; color: var(--muted); }
.hero-search { flex: 1 1 340px; display: flex; gap: 8px; }
.hero-search input { flex: 1; }

/* ── 통계 타일 ────────────────────────────────────── */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.tile {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.t-label { margin: 0; font-size: 12px; color: var(--muted); }
.t-value { margin: 4px 0 2px; font-size: 25px; font-weight: 600; line-height: 1.2; }
.t-note { margin: 0; font-size: 11.5px; color: var(--muted); }

/* ── 패널 / 배치 ──────────────────────────────────── */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.p-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .grid-2, .two-col { grid-template-columns: 1fr; } }
.page-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
/* 제목 옆에 지금 보고 있는 기관을 적는다 — 어느 기관 화면인지 늘 보이게 */
.h1-org {
  margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: rgba(76,141,255,.14); border: 1px solid rgba(76,141,255,.30);
  color: var(--accent); font-size: 12.5px; font-weight: 600; vertical-align: 2px;
}

/* 기간 고르개 (통계) — 빠른 단추 + 날짜 두 칸 */
.period {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px;
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px;
}
.period .p-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-right: 4px; }
.period label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.period input[type=date] {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 7px; padding: 6px 8px; font-size: 12.5px;
}
.period input[type=date]:focus { outline: none; border-color: var(--accent); }
/* 사람 고르개 (근무 통계) — 200명이 넘는 기관이 있어 검색되는 상자를 쓴다 */
.hr-emp { min-width: 210px; }
.hr-emp .select2 { min-width: 180px; }
.hr-emp select { min-width: 180px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; }

/* 볼 항목 체크 (근무 통계: 출장·초과근무·휴가·출퇴근·법인카드) */
.hr-picks { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.hr-picks .pick {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel2); color: var(--ink-2); font-size: 12.5px;
}
.hr-picks .pick:hover { color: var(--text); border-color: var(--accent); }
.hr-picks .pick:has(input:checked) {
  background: rgba(76,141,255,.16); border-color: rgba(76,141,255,.34);
  color: var(--text); font-weight: 600;
}
.hr-picks input { accent-color: var(--accent); margin: 0; }

/* 막대를 눌러 그 해만 보기 — 링크가 된 막대는 손가락 커서를 준다 */
a.cc { cursor: pointer; text-decoration: none; }
a.cc:hover .cc-b { filter: brightness(1.25); }

/* 한 화면 안의 갈래 (통계: 문서 통계 · 근무 통계) */
.subtabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.subtabs a {
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--border); background: var(--panel); color: var(--ink-2);
}
.subtabs a:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.subtabs a.on {
  background: rgba(76,141,255,.16); border-color: rgba(76,141,255,.34);
  color: var(--text); font-weight: 600;
}

/* ── 세로 막대 차트 ───────────────────────────────── */
.chart-wrap { display: flex; gap: 10px; height: var(--h); }
.yaxis {
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: calc(var(--padT) - 8px); padding-bottom: calc(var(--padB) - 4px);
  font-size: 10.5px; color: var(--muted); text-align: right;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto; min-width: 34px;
}
.plot { position: relative; flex: 1; }
.chart.col { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bars {
  position: absolute; inset: 0;
  padding-top: var(--padT); padding-bottom: var(--padB);
  display: flex; align-items: stretch;
}
.band { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.band > a, .band > span { display: flex; flex-direction: column; flex: 1; text-decoration: none; }
.bar-slot { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.bar {
  background: var(--accent); border-radius: 4px 4px 0 0; max-width: 24px;
  /* 이웃 막대 사이 간격은 패널 바탕색으로 낸다(테두리를 그리지 않는다) */
  box-shadow: 2px 0 0 var(--panel), -2px 0 0 var(--panel);
  transition: opacity .12s;
}
.band:hover .bar { opacity: .78; }
.cap {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.xlab {
  height: var(--padB); display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.band:hover .xlab { color: var(--text); }

/* ── 가로 막대 ────────────────────────────────────── */
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { margin-bottom: 9px; }
.hbars li:last-child { margin-bottom: 0; }
.hbars a, .hbars span.row { display: grid; }
.hbars li > a, .hbars li > span {
  display: grid; grid-template-columns: 92px 1fr 56px;
  align-items: center; gap: 10px; text-decoration: none; color: inherit;
}
.hb-label {
  font-size: 12px; color: var(--ink-2); text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hb-track { background: var(--panel2); border-radius: 4px; height: 16px; overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hb-val { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hbars li:hover .hb-fill { opacity: .78; }
.hbars li:hover .hb-label { color: var(--text); }

/* ── 진행률 ───────────────────────────────────────── */
.meter { margin-bottom: 14px; }
.meter:last-of-type { margin-bottom: 0; }
.m-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.m-label { font-size: 12.5px; color: var(--ink-2); }
.m-pct { font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.m-track { background: var(--series-1-w); border-radius: 4px; height: 8px; overflow: hidden; }
/* span 으로 써도 막대가 보이도록 block — inline 이면 width/height 가 먹지 않는다 */
.m-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0;
          transition: width .4s ease; }
.meter.done .m-fill { background: var(--accent2); }
.m-foot { margin-top: 4px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── 최근 문서 ────────────────────────────────────── */
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.recent li:last-child { border-bottom: 0; padding-bottom: 0; }
.recent a { display: block; font-size: 13px; }
.r-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── 검색 / 필터 ──────────────────────────────────── */
.search {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
}
.search input[type=search] { flex: 1 1 320px; }

.filters {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px; margin-bottom: 12px;
}
.f-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.f-row:last-child { margin-bottom: 0; }
.f-main input[type=search] { flex: 1 1 340px; }
.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); flex: 1 1 170px; }
.f.sm { flex: 0 1 128px; }
.range { display: flex; align-items: center; gap: 6px; }
.range input[type=date] { flex: 1; min-width: 0; }
.tilde { color: var(--muted); }

/* 기간 프리셋 · 연도 칩 */
.presets { align-items: center; gap: 6px; padding-top: 4px; border-top: 1px solid var(--border); }
.chip-btn {
  font-size: 12px; color: var(--ink-2); background: var(--panel2);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
}
.chip-btn:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.chip-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-btn.clear { color: var(--muted); }
.chip-btn b { font-weight: 700; margin-left: 3px; }
.chip-btn:not(.on) b { color: var(--text); }

.chips-file { border-top: 0; padding-top: 0; margin: 0 0 12px; flex-wrap: wrap; }
/* 분류 탭 — 양식이 여러 종이라 줄바꿈되며 쌓인다. 자료 상태 칩과 같은 모양. */
.chips-cat { border-top: 0; padding-top: 0; margin: 0 0 12px; flex-wrap: wrap; row-gap: 6px; }
.chips-cat .chip-btn { max-width: 100%; }

/* 자료 보유 표시 — 색만으로 뜻을 나르지 않게 글자를 넣는다 */
.fmark { display: inline-flex; gap: 3px; margin-right: 7px; vertical-align: 1px; }
.fx {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .2px;
  border-radius: 3px; padding: 1px 5px; white-space: nowrap; line-height: 1.5;
}
.fx.ok   { background: var(--accent2); color: #06231f; }
.fx.hwp  { background: var(--accent); color: #fff; }
.fx.pdf  { background: var(--danger); color: #fff; }
.fx.html { background: var(--ink-2); color: var(--bg); }
.fx.att  { background: #2a2340; color: #c4b5ff; border: 1px solid #4c3d78; }
.fx.none { background: transparent; color: var(--muted); border: 1px dashed var(--line); font-weight: 400; }
.fmark.no + a { color: #7d8ba6; }

/* ── 상태 표시 (두 계열이 함께 쓰인다) ───────────────
   .st.done/.ing/.void — 문서 상태.  .st.st-* — 가져오기 상태. */
.st {
  display: inline-block; font-size: 11px; border-radius: 999px; padding: 1px 8px;
  white-space: nowrap; font-weight: 600; border: 1px solid transparent;
}
.st.done { background: rgba(45,212,191,.12); color: var(--accent2); border-color: rgba(45,212,191,.3); }
.st.ing  { background: rgba(245,185,85,.14); color: var(--pk); border-color: rgba(245,185,85,.3); }
.st.void { background: rgba(255,107,107,.12); color: var(--danger); border-color: rgba(255,107,107,.3); }

.st.st-none  { color: var(--muted); border-color: var(--border); }
.st.st-queue { color: var(--accent); border-color: rgba(76,141,255,.4); background: rgba(76,141,255,.12); }
.st.st-run   { color: var(--pk); border-color: rgba(245,185,85,.4); background: rgba(245,185,85,.14); }
.st.st-done  { color: var(--accent2); border-color: rgba(45,212,191,.35); background: rgba(45,212,191,.12); }
.st.st-warn  { color: var(--pk); border-color: rgba(245,185,85,.4); background: rgba(245,185,85,.14); }
.st.st-err   { color: var(--danger); border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.12); }
.st.st-run::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px;
  border-radius: 50%; background: currentColor; vertical-align: middle;
  animation: st-pulse 1.1s ease-in-out infinite;
}
@keyframes st-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .st.st-run::before { animation: none; } }

/* ── 입력 ─────────────────────────────────────────── */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px;
}
input::placeholder, textarea::placeholder { color: #6d7f9f; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.result-count { margin: 0 0 10px; font-size: 13px; }
.result-count strong { color: var(--text); }

/* ── Select2 — 우리 색에 맞춘다 ───────────────────── */
.select2-container { font-size: 13px; }
.select2-container--default .select2-selection--single {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; height: 36px; position: relative;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text); line-height: 34px; padding-left: 10px; padding-right: 52px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 34px; top: 1px; right: 7px; width: 18px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: var(--muted); }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-bottom-color: var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__clear {
  position: absolute; top: 0; right: 27px; float: none; margin: 0; padding: 0;
  width: 20px; height: 34px; line-height: 34px; text-align: center;
  font-size: 16px; font-weight: 400; color: var(--muted); border-radius: 4px;
}
.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: var(--text); background: var(--panel2);
}
.select2-container--default .select2-selection--single .select2-selection__clear span { line-height: inherit; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--accent); outline: 1px solid var(--accent);
}
.select2-dropdown {
  background: var(--panel); border: 1px solid var(--accent);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.select2-container--default .select2-search--dropdown { padding: 8px; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px;
}
.select2-container--default .select2-results__option { color: var(--ink-2); padding: 7px 11px; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
  background: var(--accent); color: #fff;
}
.select2-container--default .select2-results__option[aria-selected=true] {
  background: var(--panel2); color: var(--accent2); font-weight: 600;
}
.select2-container--default .select2-results__group { color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.select2-results__options { max-height: 300px; }
.select2-container--default .select2-results__message { color: var(--muted); }

/* ── 버튼 ─────────────────────────────────────────── */
.btn {
  display: inline-block; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); border-radius: 7px; padding: 8px 15px;
  font: inherit; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; background: #24345a; border-color: var(--line); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #3d7bf0; border-color: #3d7bf0; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--panel2); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger:hover { background: rgba(255,107,107,.12); border-color: var(--danger); }
.btn.sm { padding: 4px 11px; font-size: 12px; }
.btn.wide { width: 100%; padding: 10px; font-weight: 600; }

/* ── 표 ───────────────────────────────────────────── */
table.list {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
table.list th, table.list td {
  padding: 8px 11px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
/* 표 머리는 붙이지 않는다 — app.py 화면은 표가 든 칸이 따로 굴렀지만
   여기는 페이지째 구르므로, 붙이면 위쪽 띠 뒤로 숨어 오히려 안 보인다. */
table.list th {
  background: var(--panel2); font-size: 11.5px; color: var(--muted); font-weight: 600;
}
table.list th a { color: var(--muted); }
table.list th a:hover { color: var(--text); }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: var(--row-hover); }
table.list.sm th, table.list.sm td { padding: 6px 9px; font-size: 12.5px; }
table.list .tiny { font-size: 11px; color: var(--muted); }
.table-scroll {
  overflow-x: auto; border-radius: var(--radius);
}

/* 숫자 칸 — 자릿수를 맞춰 세로로 읽히게 */
table.list th.num, table.list td.num {
  text-align: right; white-space: nowrap;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
table.list td.num.zero { color: #44557a; }
table.list tfoot th {
  background: var(--panel2); color: var(--text); font-weight: 700;
  border-top: 2px solid var(--border); border-bottom: 0;
}
td.empty { text-align: center; color: var(--muted); padding: 40px 0; white-space: normal; }

/* 문서 목록 — 제목만 줄바꿈, 나머지는 한 줄 */
table.list.docs { min-width: 900px; }
table.list.docs td, table.list.docs th { white-space: nowrap; }
table.list.docs td.c-title, table.list.docs th.c-title { white-space: normal; }
.c-title { width: 100%; }
.c-title a { font-weight: 500; word-break: keep-all; overflow-wrap: anywhere; }
.c-no  { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.c-att { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat {
  display: inline-block; font-size: 11px; color: var(--ink-2);
  background: var(--panel2); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 7px; white-space: nowrap;
}

/* ── DB 조회 (db.php) ─────────────────────────────── */
.dbv { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { .dbv { grid-template-columns: 1fr; } }
.dbv-list {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); max-height: 72vh; overflow: auto; padding: 6px;
}
.dbv-list ul { list-style: none; margin: 0; padding: 0; }
.dbv-list li a {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 5px 8px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2);
}
.dbv-list li a:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.dbv-list li.on a { background: var(--accent); color: #fff; }
.dbv-list .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbv-list .tc { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.dbv-list li.on .tc { color: #fff; }

.dbv-main { min-width: 0; }
table.dbv-data td, table.dbv-data th { white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
table.dbv-data td.zero { color: #44557a; }
.dbv-console textarea {
  width: 100%; font-family: Consolas, ui-monospace, monospace; font-size: 12.5px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #0b0f1a; color: #d5e2ff; resize: vertical;
}
.dbv-console .f-row { margin-top: 8px; align-items: center; gap: 10px; }
.p-head a.on, .result-count a.on { font-weight: 700; color: var(--text); }

/* ── 다른 복지관 DB 가져오기 ──────────────────────── */
.dbv-import { margin-bottom: 16px; }
.dbv-import .import-pick {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px;
}
.dbv-import .import-pick .select2, .dbv-import .import-pick .s2 {
  flex: 1 1 320px; min-width: 260px; max-width: 480px;
}
.dbv-import .note { margin: 2px 0 12px; }
table.import-status td { vertical-align: top; }
table.import-status .tiny { font-size: 11px; }

/* ── 기관 문서 (orgs.php) ─────────────────────────── */
/* 지금 보고 있는 기관 — 사이드바에서 고른 것이 무엇인지 본문 위에 한 줄로 적는다 */
.org-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 16px; margin: 0 0 12px;
}
.org-head .oh-name { font-size: 15px; font-weight: 600; }
.org-head .oh-meta { color: var(--muted); font-size: 11.5px; }
.org-head .oh-meta b { color: var(--accent2); font-weight: 600; }
.org-head .oh-act { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.org-pick {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px;
}
.org-pick .f { flex: 1 1 420px; min-width: 280px; font-weight: 600; }
.org-pick .f > .select2, .org-pick .f > .s2 { margin-top: 6px; }

/* 연도 바로가기 */
.yearbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.yearbar .lbl { color: var(--muted); font-size: 11.5px; margin-right: 2px; }

.chk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-2); }
.chk input { width: 15px; height: 15px; accent-color: var(--accent); }

.crumb { margin: 0 0 12px; font-size: 13px; }
.crumb a { color: var(--ink-2); }

.orgdoc-meta { margin: 0 0 14px; }
.orgdoc-meta dl {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px;
  margin: 0; align-items: baseline;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.orgdoc-meta dt { color: var(--muted); font-size: 12px; }
.orgdoc-meta dd { margin: 0; color: var(--text); }

.orgdoc-files .file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 4px; border-bottom: 1px solid var(--border);
}
.file-list li:last-child { border-bottom: 0; }
.fi-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-act { flex: none; display: flex; gap: 6px; }

/* ── 작업 현황 (jobs.php) ──────────────────────────── */
.jobcard .meter { margin: 10px 0 6px; }
.joblog { margin-top: 12px; }
.joblog .jl-title { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.joblog pre {
  margin: 0; padding: 9px 11px; background: #0b0f1a; border: 1px solid var(--border);
  border-radius: 8px; color: #b7c6e4; font: 11.5px/1.55 Consolas, ui-monospace, monospace;
  white-space: pre-wrap; word-break: break-all; max-height: 190px; overflow-y: auto;
}

/* (근무 통계 안에 있던 기관 고르개 .hr-pick 은 걷어냈다 — 기관은 왼쪽 위
    고르개 하나가 정한다. 근무 통계는 통계 화면의 한 갈래(.subtabs)가 되었다) */

/* ── 통계 화면 (insight.php) ────────────────────────
   그림은 전부 CSS/인라인 SVG 다 — 바깥에서 무엇을 받아 오지 않는다. */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi > div {
  background: #101830; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; text-align: center;
}
.kpi b { display: block; font-size: 22px; font-weight: 700; color: var(--ink);
         font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }

/* 가로 막대 */
.ib { display: grid; grid-template-columns: minmax(110px, 210px) 1fr minmax(90px, auto);
      align-items: center; gap: 10px; padding: 4px 0; }
.ib-l { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-t { display: block; height: 9px; background: #24345a; border-radius: 5px; overflow: hidden; }
.ib-t i { display: block; height: 100%; background: var(--accent); }
.ib-v { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ib-v em { font-style: normal; color: var(--muted); font-size: 11px; }

/* 세로 막대 */
.col-chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 8px; }
.col-chart .cc { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end;
                 align-items: center; height: 100%; min-width: 0; }
.cc-v { font-size: 10.5px; color: var(--muted); margin-bottom: 3px;
        font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-b { width: 100%; max-width: 46px; background: linear-gradient(180deg, #4c8dff, #2f5fb8);
        border-radius: 4px 4px 0 0; min-height: 2px; }
.cc-k { font-size: 11px; color: var(--ink-2); margin-top: 6px; white-space: nowrap; }

/* 선 그래프 */
.spark { width: 100%; height: 150px; display: block; }
.spark .sx { fill: #8fa3c8; font-size: 11px; }
.spark .sx.mid { text-anchor: middle; }
.spark .sx.end { text-anchor: end; }
.spark .sy { fill: #8fa3c8; font-size: 11px; }

/* 둘로 나뉜 막대 */
.stack { display: flex; height: 26px; border-radius: 7px; overflow: hidden; margin: 6px 0 10px; }
.stack .s1 { background: var(--accent); }
.stack .s2 { background: var(--accent2); }
.c1 { color: #9fc0ff; } .c2 { color: #7fe3d6; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.grid2 > .panel { margin: 0; }

/* 기관별 현황 표 — 어느 PC 가 받았는지는 보여 주지 않는다(자료는 NAS 한 곳에 모인다).
   예전 사이드바에 있던 기관 51곳 목록도 이 표로 합쳤다(이름을 누르면 그 기관 문서로). */
/* 멈춘 줄은 흐리게 — 옛 진행률이 '지금 값' 처럼 보이지 않게 */
.meter.stale { opacity: .55; }
.meter.stale .m-fill { background: var(--muted); }

/* 내려받는 줄 번호 — 여섯 줄이 동시에 도는 것을 한눈에 */
.lane-no {
  display: inline-block; min-width: 18px; text-align: center; margin-right: 4px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); font-size: 10.5px; padding: 0 4px;
}

.og-tools { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.og-tools input {
  flex: 1 1 auto; max-width: 320px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12.5px;
}
.og-tools input:focus { outline: none; border-color: var(--accent); }
.og-mk { font-size: 10.5px; letter-spacing: -1px; }
.og-tablewrap { overflow-x: auto; }
.og-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.og-table th, .og-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.og-table thead th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-align: left; }
.og-table td.n, .og-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.og-table td.c, .og-table th.c { text-align: center; }
.og-table tbody tr:hover { background: rgba(76, 141, 255, .06); }
.og-table tbody tr:last-child td { border-bottom: 0; }
.og-pct { display: inline-block; min-width: 46px; font-weight: 600; }
.og-bar {
  display: inline-block; width: 70px; height: 6px; margin-left: 8px; vertical-align: middle;
  background: #24345a; border-radius: 3px; overflow: hidden;
}
.og-bar i { display: block; height: 100%; background: var(--accent); }

/* ── 페이지 이동 ──────────────────────────────────── */
.pager { display: flex; gap: 4px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pager a {
  min-width: 32px; text-align: center; padding: 5px 9px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--ink-2);
}
.pager a.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.pager a:hover { text-decoration: none; border-color: var(--accent); color: var(--text); }

/* ── 문서 상세 ────────────────────────────────────── */
.doc {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.doc h1 { font-size: 19px; line-height: 1.45; margin-bottom: 14px; }
dl.meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 20px; margin: 0 0 18px; padding: 14px 16px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 8px;
}
dl.meta div { display: flex; gap: 10px; font-size: 12.5px; }
dl.meta dt { color: var(--muted); min-width: 62px; flex: none; }
dl.meta dd { margin: 0; }
.summary {
  border-left: 3px solid var(--border); padding: 4px 0 4px 14px;
  color: var(--ink-2); margin: 0 0 18px;
}
.doc section { margin-top: 24px; }
.doc section h2 { margin-bottom: 12px; }
/* 본문은 흰 종이 위에 인쇄된 문서다 — 어두운 화면에서도 흰 배경을 지킨다 */
.body-view {
  border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden;
}
.body-view iframe { display: block; width: 100%; height: 620px; border: 0; }
.body-view.pdf iframe { height: min(1100px, 78vh); background: #525659; }

ul.filelist { list-style: none; margin: 0; padding: 0; }
ul.filelist li {
  padding: 9px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
ul.filelist li:last-child { border-bottom: 0; }
.ext {
  display: inline-block; min-width: 42px; text-align: center;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  border-radius: 4px; padding: 3px 6px;
  background: var(--panel2); color: var(--muted); border: 1px solid var(--border);
}
.ext.pdf { background: var(--danger); color: #fff; border-color: var(--danger); }
.ext.hwp { background: var(--accent); color: #fff; border-color: var(--accent); }
.ext.html { background: var(--ink-2); color: var(--bg); border-color: var(--ink-2); }

/* ── 알림 ─────────────────────────────────────────── */
.alert {
  border-radius: 8px; padding: 11px 14px; margin: 0 0 14px; font-size: 13px;
  border: 1px solid transparent;
}
.alert.ok   { background: rgba(45,212,191,.10); color: var(--accent2); border-color: rgba(45,212,191,.3); }
.alert.err  { background: rgba(255,107,107,.10); color: var(--danger); border-color: rgba(255,107,107,.3); }
.alert.warn { background: rgba(245,185,85,.12); color: var(--pk); border-color: rgba(245,185,85,.3); }
.alert strong { color: inherit; }
.ok-t { color: var(--accent2); }
.err-t { color: var(--danger); }

/* ── 권한 관리 ────────────────────────────────────── */
.grant-form .row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.grant-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.grant-form label.grow { flex: 1 1 220px; }
.grant-form select, .grant-form input { min-width: 190px; }
.chip {
  display: inline-block; font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 2px 9px; border: 1px solid var(--border);
}
.chip.p { background: rgba(76,141,255,.14); color: var(--accent); border-color: transparent; }
.chip.d { background: rgba(245,185,85,.16); color: var(--pk); border-color: transparent; }

/* ── 로그인 / 거부 화면 ───────────────────────────── */
.center-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 30px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.card h1 { font-size: 18px; text-align: center; }
.card .sub { text-align: center; font-size: 13px; }
.card form { display: flex; flex-direction: column; gap: 13px; margin-top: 18px; }
.card label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.card .note { text-align: center; margin-top: 16px; }
.card.denied { max-width: 470px; text-align: center; }
dl.who {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px;
  text-align: left; background: var(--panel2); border-radius: 8px;
  padding: 13px; margin: 16px 0; font-size: 13px;
}
dl.who dt { color: var(--muted); }
dl.who dd { margin: 0; }

@media (max-width: 700px) {
  .hero-value { font-size: 38px; }
  .hbars li > a, .hbars li > span { grid-template-columns: 72px 1fr 50px; }
  .topbar { font-size: 11px; }
}

/* ── 인쇄 ─────────────────────────────────────────────
   종이에는 화면 껍데기가 필요 없다. 문서만 남기고 밝게 되돌린다. */
@media print {
  @page { size: A4 portrait; margin: 12mm 14mm; }
  html, body { background: #fff; color: #000; }
  .app { display: block; }
  .sidebar, .topbar, .foot, .filters, .search, .pager, .p-head a,
  .crumb, .page-head a, .btn, .hero-search, .yearbar, .org-head .oh-act { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .panel, .doc, .card, .tile, .hero, .org-head {
    border: 0; box-shadow: none; padding: 0; margin: 0 0 10mm;
    background: #fff; break-inside: avoid;
  }
  .body-view { border: 0; }
  .body-view iframe { height: auto; min-height: 0; }
  table.list { border: 1px solid #999; background: #fff; }
  table.list th { background: #eee; color: #000; }
  table.list th, table.list td { border-bottom: 1px solid #ccc; color: #000; }
  a { color: #000; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
