/* 데이터룸(§14) 공통 — 내부 관리 화면(rooms.html)과 열람자 화면(room-view·room-doc)이 같이 쓴다. 팔레트는 home.css */
.badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:800; padding:2px 8px; border-radius:999px; background:#eef0f4; color:var(--sub); white-space:nowrap; }
.badge.ws { background:var(--blue-bg); color:var(--blue); } .badge.open { background:#e6f7ec; color:#15803d; } .badge.closed { background:#fdecec; color:var(--bad); }
.badge.paused { background:#fff3d6; color:#9a6400; } .badge.expired { background:#eef0f4; color:var(--sub); } .badge.active { background:#e6f7ec; color:#15803d; }
/* 폴더 트리(자동 번호) */
.rtree, .rtree ul { list-style:none; margin:0; padding:0; }
.rtree ul { margin-left:12px; border-left:1px solid var(--line); padding-left:6px; }
.rtree .row { display:flex; align-items:center; gap:6px; padding:7px 10px; border-radius:10px; cursor:pointer; font-weight:700; font-size:14px; color:var(--ink); }
.rtree .row:hover { background:#f3f5f9; } .rtree .row.on { background:var(--ink); color:#fff; }
.rtree .row .num { flex:none; font-size:11px; font-weight:800; color:var(--sub); font-variant-numeric:tabular-nums; min-width:22px; } .rtree .row.on .num { color:rgba(255,255,255,.7); }
.rtree .row .nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rtree .row .cnt { font-size:11px; font-weight:800; background:var(--blue-bg); color:var(--blue); border-radius:999px; padding:1px 7px; } .rtree .row.on .cnt { background:rgba(255,255,255,.18); color:#fff; }
.rtree .row.drop { box-shadow:0 0 0 2px var(--blue); }
/* 항목 줄: 아이콘 | 번호·이름·메타 | 조작 */
.ilist { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.irow { display:grid; grid-template-columns:34px minmax(0, 1fr) auto; gap:10px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); min-width:0; }
.irow .ic { font-size:22px; text-align:center; line-height:1; }
.irow .mid { display:grid; gap:2px; min-width:0; }
.irow .nm { font-weight:800; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .irow .nm .num { color:var(--sub); font-weight:800; margin-right:6px; font-variant-numeric:tabular-nums; }
.irow .mt { color:var(--sub); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.irow .ops { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; align-items:center; }
.irow .ops a, .irow .ops button { font:inherit; font-weight:800; font-size:12px; padding:6px 10px; min-height:32px; border-radius:9px; background:#f3f5f9; color:var(--ink); text-decoration:none; border:0; cursor:pointer; display:inline-flex; align-items:center; gap:4px; }
.irow .ops a.pri { background:var(--blue-bg); color:var(--blue); } .irow .ops button.del { background:#fdecec; color:var(--bad); }
.irow .ops label.chk { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:var(--sub); cursor:pointer; } .irow .ops label.chk input { margin:0; accent-color:var(--blue); }
.irow .ops select { max-width:150px; font-size:12px; padding:5px 26px 5px 9px; border-radius:9px; }
.irow.converting { opacity:.6; }
.sec-h { font-size:13px; font-weight:800; color:var(--sub); margin:16px 0 6px; display:flex; gap:8px; align-items:baseline; } .sec-h:first-child { margin-top:0; } .sec-h b { color:var(--ink); font-size:15px; }
.empty-line { color:var(--sub); font-size:13px; padding:10px 0; }
/* ---- 열람자 화면(로그인 없음) ---- */
.rv { max-width:980px; margin:0 auto; padding:28px 20px 64px; }
.rv .top { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.rv h1 { font-size:24px; } .rv .sub { color:var(--sub); font-size:13px; margin:4px 0 0; display:flex; flex-wrap:wrap; gap:4px 12px; } .rv .sub b { color:var(--ink); }
.rv .layout { display:grid; grid-template-columns:240px minmax(0, 1fr); gap:16px; align-items:start; }
.rv .note { background:#fff8eb; color:#8a6116; border-radius:12px; padding:10px 12px; font-size:13px; font-weight:700; margin:0 0 14px; white-space:pre-wrap; }
/* ---- 문서 쪽 보기(세로 스크롤) + 워터마크 ---- */
.doc { background:#2a3147; min-height:100vh; color:#fff; }
.docbar { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:12px; padding:10px 16px; background:rgba(20,33,61,.96); backdrop-filter:blur(6px); color:#fff; font-size:14px; font-weight:700; }
.docbar a { color:#fff; text-decoration:none; font-weight:800; opacity:.9; } .docbar a:hover { opacity:1; }
.docbar .nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .docbar .pg { font-variant-numeric:tabular-nums; opacity:.85; }
.docbar .dl { background:#fff; color:var(--ink); border-radius:999px; padding:6px 12px; font-size:12px; }
.pages { max-width:960px; margin:0 auto; padding:18px 12px 60px; display:grid; gap:16px; }
.page { margin:0; position:relative; background:#fff; border-radius:6px; overflow:hidden; box-shadow:0 10px 24px -14px rgba(0,0,0,.5); min-height:200px; }
.page img { display:block; width:100%; height:auto; user-select:none; -webkit-user-drag:none; pointer-events:none; }
.page .n { position:absolute; right:8px; bottom:6px; font-size:11px; font-weight:800; color:rgba(20,33,61,.45); }
.wm { position:fixed; inset:0; pointer-events:none; z-index:4; overflow:hidden; }
.wm span { position:absolute; white-space:nowrap; font-size:16px; font-weight:800; color:rgba(20,33,61,.13); transform:rotate(-24deg); letter-spacing:.02em; }
.doc .noview { max-width:520px; margin:60px auto; background:#fff; color:var(--ink); border-radius:18px; padding:28px; text-align:center; font-weight:700; }
.doc .noview a { display:inline-block; margin-top:14px; background:var(--grad-blue); color:#fff; text-decoration:none; border-radius:12px; padding:11px 18px; font-weight:800; }
.printmsg { display:none; }
@media print { .pages, .docbar, .wm { display:none !important; } .printmsg { display:block; padding:40px; font-size:18px; font-weight:800; color:#000; } body.doc { background:#fff; } }
@media (max-width: 820px) {
  .rv { padding:14px 12px 48px; } .rv .layout { grid-template-columns:1fr; } .rv .side { order:2; }
  .irow { grid-template-columns:28px minmax(0, 1fr); } .irow .ops { grid-column:1 / -1; justify-content:flex-start; } .irow .ic { font-size:18px; }
  .pages { padding:10px 6px 40px; gap:10px; } .wm span { font-size:13px; }
}
/* ---- 2·3단계: 표 보기(엑셀·CSV), 열람자 검색·Q&A ---- */
.sheet { max-width:1100px; margin:0 auto; padding:14px 12px 60px; display:grid; gap:14px; }
.sheet .tabs { display:flex; flex-wrap:wrap; gap:6px; } .sheet .tabs button { font:inherit; font-weight:800; font-size:13px; padding:7px 12px; min-height:34px; border-radius:999px; background:rgba(255,255,255,.12); color:#fff; border:0; cursor:pointer; } .sheet .tabs button.on { background:#fff; color:var(--ink); }
.sheet .tw { background:#fff; color:var(--ink); border-radius:8px; overflow:auto; max-height:78vh; position:relative; box-shadow:0 10px 24px -14px rgba(0,0,0,.5); }
.sheet table { border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; min-width:100%; }
.sheet th, .sheet td { border:1px solid #e3e7f0; padding:5px 8px; white-space:nowrap; max-width:320px; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.sheet th { background:#f3f5f9; font-weight:800; position:sticky; top:0; z-index:1; } .sheet td.rn, .sheet th.rn { background:#f3f5f9; color:var(--sub); font-weight:700; text-align:right; position:sticky; left:0; }
.sheet td.num { text-align:right; }
.rv .filter input[type=search] { width:100%; font:inherit; font-size:14px; border:1px solid var(--line); border-radius:12px; padding:9px 12px; background:#fbfcfe; color:var(--ink); margin-bottom:10px; }
.rv .qa { margin-top:16px; display:grid; gap:10px; }
.rv .qa form { display:grid; gap:8px; } .rv .qa textarea, .rv .qa select { font:inherit; font-size:14px; border:1px solid var(--line); border-radius:12px; padding:9px 12px; background:#fbfcfe; color:var(--ink); width:100%; } .rv .qa textarea { min-height:70px; resize:vertical; }
.rv .qa button { align-self:start; }
.qv { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.qv li { border:1px solid var(--line); border-radius:12px; padding:10px 12px; font-size:14px; display:grid; gap:6px; }
.qv li .m { font-size:12px; color:var(--sub); display:flex; flex-wrap:wrap; gap:4px 10px; } .qv li .m b { color:var(--ink); }
.qv li .a { background:#f3f5f9; border-radius:10px; padding:8px 10px; white-space:pre-wrap; } .qv li .w { color:var(--sub); font-size:13px; }
.docbar .ask { background:rgba(255,255,255,.14); color:#fff; border-radius:999px; padding:6px 12px; font-size:12px; border:0; font:inherit; font-weight:800; cursor:pointer; }
.askbox { position:fixed; right:16px; bottom:16px; z-index:6; background:#fff; color:var(--ink); border-radius:16px; padding:14px; width:min(420px, calc(100vw - 32px)); box-shadow:0 24px 48px -22px rgba(0,0,0,.6); display:grid; gap:8px; }
.askbox textarea { font:inherit; font-size:14px; border:1px solid var(--line); border-radius:12px; padding:9px 12px; min-height:80px; resize:vertical; } .askbox .r { display:flex; gap:8px; justify-content:flex-end; }
.askbox button { font:inherit; font-weight:800; border:0; border-radius:10px; padding:9px 14px; cursor:pointer; background:#f3f5f9; color:var(--ink); } .askbox button.pri { background:var(--grad-blue); color:#fff; }
