/* JINPUB — 인쇄 PDF 플랫폼 화면 스타일 */

/* Pretendard 1.3.9 가변 글꼴(굵기 45~920) · SIL OFL 1.1 · fonts/Pretendard-LICENSE.txt */
@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("fonts/PretendardVariable.woff2") format("woff2-variations"), url("fonts/PretendardVariable.woff2") format("woff2");
}
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --ink: #0e1630;
  --ink-2: #39415a;
  --muted: #6b7390;
  --line: #e4e8f0;
  --line-2: #eef1f6;

  --navy-900: #0b1126;
  --navy-800: #111a38;
  --navy-700: #1a2550;
  --indigo: #4057d6;
  --indigo-600: #3447b8;
  --indigo-50: #eef1fd;
  --gold: #c8a24a;

  --ok: #0f8a5f;   --ok-bg: #e8f6f0;
  --err: #c2412d;  --err-bg: #fdeeea;
  --warn: #a86b00; --warn-bg: #fff6e0;

  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(14,22,48,.05);
  --shadow-2: 0 1px 2px rgba(14,22,48,.04), 0 8px 24px -8px rgba(14,22,48,.10);
  --shadow-3: 0 24px 60px -20px rgba(11,17,38,.35);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.6 var(--font); color: var(--ink); background: var(--bg); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--indigo-600); }
h1, h2, h3 { letter-spacing: -0.025em; color: var(--ink); }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; }
.ml-auto { margin-left: auto; } .mt-20 { margin-top: 20px; }
.err-text { color: var(--err); } .warn-text { color: var(--warn); }

/* ---------- 로고 ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo .mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, #5b72f2 0%, #3447b8 55%, #1a2550 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px -6px rgba(64,87,214,.6); }
.logo .word { display: flex; flex-direction: column; font-weight: 800; font-size: 16px; letter-spacing: .06em; line-height: 1.1; }
.logo .word small { font-weight: 500; font-size: 10.5px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.logo.light, .side .logo { color: #fff; }
.logo.light .word small, .side .logo .word small { color: rgba(255,255,255,.5); }

/* ---------- 앱 틀: 왼쪽 메뉴 ---------- */
body.app { display: flex; min-height: 100vh; }
.side { width: 256px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px 16px;
  background: radial-gradient(120% 60% at 0% 0%, #1d2a5e 0%, rgba(29,42,94,0) 60%), linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #c9cfe3; }
.side .logo { padding: 0 8px; }
.side-project { margin: 26px 4px 18px; padding: 14px 14px; border-radius: var(--r); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.side-project .eyebrow { display: block; font-size: 11px; color: rgba(255,255,255,.5); margin-bottom: 4px; }
.side-project b { display: block; color: #fff; font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #b7bed6; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(91,114,242,.28), rgba(91,114,242,.08)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #7d92ff; }
.nav-item.soon { color: rgba(255,255,255,.32); cursor: default; }
.nav-item.soon:hover { background: none; color: rgba(255,255,255,.32); }
.nav-item i { margin-left: auto; font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.4); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user .u { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.side-user .u b { color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .u span { font-size: 12px; color: rgba(255,255,255,.5); }
.side-user form { margin: 0; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #c9cfe3; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { flex: 1; min-width: 0; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 40px; background: #fff6e0; border-bottom: 1px solid #f1d79a; color: #7a5200; font-size: 13px; font-weight: 500; position: sticky; top: 0; z-index: 5; }
.admin-bar > span { display: flex; align-items: center; gap: 8px; }
.admin-bar form { margin: 0; }
.content { max-width: 1240px; margin: 0 auto; padding: 36px 40px 60px; }

/* ---------- 페이지 머리 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 800; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .actions { margin: 0; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--indigo); letter-spacing: .02em; }
h2.section { font-size: 16px; font-weight: 700; margin: 32px 0 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- 카드 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-2); margin-bottom: 20px; }
.card.flat { box-shadow: var(--shadow-1); }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.card.center { text-align: center; max-width: 420px; margin: 0 auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h3 { margin: 0; }

/* ---------- 통계 ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-1); display: flex; align-items: center; gap: 14px; }
.stat .si { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--indigo-50); color: var(--indigo); }
.stat b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- 관리자 대시보드 ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-label small { font-weight: 400; }
.kpi b { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; color: var(--ink); }
.kpi b small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-foot { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi-foot .ic { width: 15px; height: 15px; }
.kpi.is-warn { border-color: #f1d79a; background: linear-gradient(180deg, #fffdf6, #fff); }
.kpi.is-warn .kpi-foot { color: var(--warn); font-weight: 600; }
.pbar { display: block; }
.pb-track { fill: #e9ecf4; }
.pb-fill { fill: var(--indigo); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dash-side .card { margin-bottom: 20px; }
.prog-list { display: flex; flex-direction: column; }
.prog-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 20px; align-items: center; padding: 16px 4px; border-top: 1px solid var(--line-2); color: inherit; }
.prog-row:first-child { border-top: 0; padding-top: 4px; }
.prog-row:hover { background: #fafbff; }
.pr-top { display: flex; align-items: center; gap: 8px; }
.pr-top b { font-size: 15px; color: var(--ink); }
.pr-sub { display: block; font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; }
.pr-stages { display: flex; flex-wrap: wrap; gap: 4px; }
.st { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #f0f2f7; color: #9aa1b8; font-weight: 500; }
.st.done { background: var(--indigo-50); color: var(--indigo); }
.st.now { background: var(--indigo); color: #fff; font-weight: 600; }
.pr-side { display: flex; flex-direction: column; gap: 6px; }
.pr-pct { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.pr-pct small { font-size: 13px; color: var(--muted); margin-left: 2px; }
.pr-ms { font-size: 12px; color: var(--muted); }
.hbars { display: grid; gap: 10px; margin-bottom: 10px; }
.hbar { display: grid; grid-template-columns: 70px 1fr 28px; align-items: center; gap: 10px; }
.hb-label { font-size: 12.5px; color: var(--ink-2); }
.hb-val { font-size: 13px; font-weight: 700; text-align: right; color: var(--ink); }
.hb-track { display: block; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.events li { display: flex; align-items: center; gap: 12px; }
.ev-date { width: 46px; height: 50px; flex: none; border-radius: 12px; background: var(--indigo-50); color: var(--indigo); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; line-height: 1.1; }
.ev-date b { font-size: 18px; font-weight: 800; }
.ev-t { flex: 1; min-width: 0; }
.ev-t b { display: block; font-size: 13.5px; color: var(--ink); }
.ev-t span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.activity li { display: flex; gap: 10px; font-size: 13px; }
.activity .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--indigo); margin-top: 7px; flex: none; box-shadow: 0 0 0 3px var(--indigo-50); }
.pct-cell { min-width: 150px; }
.pct-cell b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.pct-cell .pbar { margin-bottom: 4px; }
@media (max-width: 1180px) { .dash-grid { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .prog-row { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr; } }

/* ---------- 세션·강의 ---------- */
.kpis-sm .kpi b { font-size: 26px; }
.kpis-sm .kpi form { margin-top: 4px; }
.session-card { margin-bottom: 18px; }
.session-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #fbfcff, #fff); }
.session-head b { display: block; font-size: 15px; color: var(--ink); }
.session-head .actions { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 0 4px 4px 0; }
.chip .avatar { width: 22px; height: 22px; font-size: 11px; }
.chip i { font-style: normal; color: var(--indigo); font-size: 11px; }
.link-cell { min-width: 190px; }
.link-edit { margin-top: 6px; }
.link-edit summary { cursor: pointer; font-size: 12px; color: var(--indigo); list-style: none; }
.link-edit summary::-webkit-details-marker { display: none; }
.link-edit form { display: flex; gap: 6px; margin-top: 6px; }
.link-edit select { height: 32px; font-size: 12.5px; min-width: 200px; }
.btn.danger { color: var(--err); } .btn.danger:hover { background: var(--err-bg); }
.actions .ml-auto { flex: 1; }

/* ---------- 도서 설정: 고르는 칸 ---------- */
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-grid.cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 110px; padding: 14px 14px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; transition: border-color .15s, box-shadow .15s, background .15s; height: 100%; }
.choice-body b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.choice-body small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.choice.plain .choice-body { min-width: 0; padding: 10px 16px; flex-direction: row; gap: 8px; }
.choice:hover .choice-body { border-color: #c9d2fb; }
.choice input:checked + .choice-body { border-color: var(--indigo); background: var(--indigo-50); box-shadow: 0 0 0 3px rgba(64,87,214,.12); }
.choice input:focus-visible + .choice-body { box-shadow: 0 0 0 4px rgba(64,87,214,.25); }
.pict { width: 44px; height: 50px; margin-bottom: 4px; }
.pict .pg { fill: #fff; stroke: #c4cbe0; stroke-width: 1.2; }
.pict .pg.dark { fill: #1a2550; stroke: #1a2550; }
.pict .ln { fill: #9aa3c0; } .pict .ln.light { fill: #fff; }
.pict .bx { fill: #dfe4f7; stroke: #b5bfe6; stroke-width: .8; }
.pict .band { fill: #4057d6; }
.pict .x { stroke: #d28b7c; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.choice input:checked + .choice-body .pg:not(.dark) { stroke: var(--indigo); }
.setting-rows { display: flex; flex-direction: column; }
.setting-row { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line-2); align-items: center; }
.setting-row:first-child { border-top: 0; padding-top: 4px; }
.sr-label b { display: block; font-size: 14px; color: var(--ink); }
.sr-label span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.narrow-field { max-width: 480px; margin-top: 16px; }
.check.mini { display: inline-flex; margin-top: 8px; padding: 6px 10px; font-size: 12.5px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(243,245,250,0), var(--bg) 30%); padding: 16px 0 8px; margin-top: 0; z-index: 3; }
@media (max-width: 900px) { .setting-row { grid-template-columns: 1fr; gap: 10px; } .choice-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 원고 ---------- */
.ms-top { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ms-top .card h3 { display: flex; align-items: center; gap: 8px; }
.ms-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-file b { font-size: 15px; color: var(--ink); word-break: break-all; }
.ms-status .btn { margin-top: 8px; }
.ms-uploader { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; color: var(--ink-2); }
.ms-uploader .ic { width: 15px; height: 15px; color: var(--muted); }
.ms-breakdown { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; margin: 6px 0; }
.ms-breakdown b { color: var(--ink); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed #c3cbe4; border-radius: var(--r); background: var(--surface-2); text-align: center; cursor: pointer; margin-bottom: 14px; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--indigo); background: var(--indigo-50); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }
.dropzone .dz-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--indigo); }
.dropzone b { color: var(--ink); }
.dropzone small { color: var(--muted); }
.dropzone:has(input:valid) { border-color: var(--ok); background: var(--ok-bg); }
.dropzone:has(input:valid) b::after { content: " · 골랐습니다"; color: var(--ok); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.section-head h2.section { margin: 8px 0; }
.add-form { display: flex; gap: 8px; align-items: center; }
.add-form input[type=file] { width: auto; height: 32px; padding: 4px 8px; font-size: 12px; }
.slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.slide { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; display: flex; flex-direction: column; }
.slide-img { display: grid; place-items: center; background: #f4f6fb; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line-2); }
.slide-img img { max-width: 100%; max-height: 100%; display: block; }
.slide figcaption { display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; flex-wrap: wrap; }
.slide figcaption .num { font-weight: 800; color: var(--ink); margin-right: 2px; }
.slide-tools { display: flex; gap: 4px; padding: 4px 8px 10px; align-items: flex-start; flex-wrap: wrap; }
.slide-tools form { margin: 0; }
.icon-b { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; display: inline-grid; place-items: center; font-size: 14px; list-style: none; }
.icon-b:hover:not([disabled]) { border-color: #c9d2fb; color: var(--indigo); }
.icon-b[disabled] { opacity: .35; cursor: default; }
.icon-b.danger:hover { color: var(--err); border-color: #f5c9bf; }
.replace summary::-webkit-details-marker { display: none; }
.replace[open] { flex-basis: 100%; order: 9; }
.replace form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.replace input[type=file] { height: auto; padding: 6px; font-size: 12px; }
@media (max-width: 900px) { .ms-top { grid-template-columns: 1fr; } }

/* 학회 첫 화면 바로 가기 */
.soc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 8px; }
.soc-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 0; }
.soc-card .pbar { width: 100%; }
.soc-card p { margin: 0; }
.soc-big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.soc-big small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* 강의 하나만 교정용 PDF */
.lproof { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 22px;
  background: linear-gradient(135deg, var(--indigo-50), #fff 60%); border-color: #dfe4fb; }
.lp-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--indigo); color: #fff; box-shadow: 0 8px 18px -8px rgba(64,87,214,.6); }
.lp-ic .ic { width: 24px; height: 24px; }
.lp-body h3 { margin: 0 0 4px; font-size: 15.5px; }
.lp-body p { margin: 2px 0; }
.lp-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.lp-act form { margin: 0; }
.err-text { color: var(--err); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--indigo-50); border-top-color: var(--indigo); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.lp-body h3 .small { font-weight: 500; margin-left: 4px; white-space: nowrap; }
@media (max-width: 1200px) { .lproof { grid-template-columns: 48px minmax(0, 1fr); } .lp-act { grid-column: 2; justify-content: flex-start; } }
@media (max-width: 760px) { .lproof { grid-template-columns: 1fr; } .lp-ic { display: none; } .lp-act { grid-column: auto; } }

/* ---------- 조판 ---------- */
.kpi b.kpi-text { font-size: 18px; letter-spacing: -0.02em; }
.pagelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.pagelist li { display: flex; gap: 12px; align-items: center; }
.pagelist .pg { min-width: 40px; height: 30px; border-radius: 8px; background: var(--indigo-50); color: var(--indigo); font-weight: 800; display: grid; place-items: center; }
.pagelist b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.pagelist span { font-size: 12px; color: var(--muted); }
button[disabled] { opacity: .6; cursor: default; }

/* ---------- 디자인·앞뒤 쪽 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--indigo); border-bottom-color: var(--indigo); }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.design-card { display: flex; gap: 16px; padding: 18px; margin: 0; }
.design-card.unused { opacity: .7; }
.dc-thumb { width: 110px; height: 146px; flex: none; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.dc-thumb.band { height: 60px; width: 140px; } .dc-thumb.logo { height: 50px; width: 140px; }
.dc-thumb img { max-width: 100%; max-height: 100%; display: block; }
.dc-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.dc-body > b { font-size: 14px; color: var(--ink); }
.tag.wrap { white-space: normal; line-height: 1.4; }
.dc-up { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.dc-up input[type=file] { height: 32px; padding: 4px 6px; font-size: 12px; flex: 1; min-width: 0; }
.dc-pos { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.dc-pos label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; }
.dc-pos input { width: 64px; height: 30px; padding: 0 6px; }
.dc-body form { margin: 0; }
.slide-img.portrait { aspect-ratio: 3 / 4; }

/* ---------- 표지·광고 ---------- */
.cover-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 16px; margin-bottom: 8px; }
.cover-grid .cover-print { grid-row: span 2; display: flex; flex-direction: column; gap: 8px; }
.cover-grid .card { margin: 0; }
.cover-web { display: flex; gap: 14px; padding: 16px; }
.cover-web .dc-thumb { width: 84px; height: 110px; }
.w-200 { width: 200px; }
.ad-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ad-meta input { width: 160px; height: 32px; } .ad-meta select { width: auto; height: 32px; }
.ad-cell { min-width: 220px; }
.ad-cell .dc-up { margin-top: 6px; }
.ad-thumb { height: 70px; border: 1px solid var(--line); border-radius: 6px; display: block; }
form.inline { display: inline-flex; gap: 4px; margin: 0; }
@media (max-width: 1100px) { .cover-grid { grid-template-columns: 1fr 1fr; } .cover-grid .cover-print { grid-row: auto; grid-column: span 2; } }

/* ---------- 뺀 슬라이드·변경 기록 ---------- */
.removed-box { margin-top: 8px; }
.removed-box summary { cursor: pointer; list-style: none; }
.removed-box summary::-webkit-details-marker { display: none; }
.removed-box summary h2 { display: inline-flex; }
.slide.removed { opacity: .85; border-style: dashed; }
.slide.removed .slide-img img { filter: grayscale(.6); }
.removed-by { padding: 0 10px 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-thumb { height: 34px; border: 1px solid var(--line); border-radius: 4px; display: block; }
table.changes td { padding-top: 8px; padding-bottom: 8px; }

/* ---------- text형 에디터 ---------- */
.text-editor { margin-top: 20px; }
.text-editor .card-head label.btn { cursor: pointer; }
.text-preview { border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; background: #fff; font-family: "Noto Serif KR", serif; line-height: 1.8; }
.text-preview table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; }
.text-preview td, .text-preview th { border: 1px solid #888; padding: 4px 6px; }
.text-preview th { background: #e8eef4; }
.text-preview img { max-width: 100%; }

/* ---------- 승인·잠금 ---------- */
.lock-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r); background: #eef1fd; border: 1px solid #c9d2fb; margin-bottom: 18px; color: var(--ink); }
.lock-bar .ic { width: 26px; height: 26px; color: var(--indigo); }
.lock-bar b { display: block; } .lock-bar span { font-size: 13px; color: var(--ink-2); }
.approve-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #c9d2fb; background: linear-gradient(180deg, #f7f8ff, #fff); }
.approve-card b { display: block; font-size: 15px; } .approve-card form { margin: 0; }
.page-head .actions form { margin: 0; }

/* ---------- 단계 ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.steps .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #fff; border: 1px solid var(--line); color: var(--muted); flex: none; }
.steps li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now { border-color: #c9d2fb; background: var(--indigo-50); }
.steps li.now .num { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.steps .t { flex: 1; } .steps .t b { display: block; font-weight: 600; } .steps .t span { font-size: 12.5px; color: var(--muted); }

/* ---------- 버튼 ---------- */
button, .btn { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-1); transition: all .15s; }
.btn:hover { border-color: #cfd5e3; color: var(--ink); background: #fbfcfe; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, #4b63e6, var(--indigo-600)); border-color: var(--indigo-600); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -6px rgba(52,71,184,.6); }
.btn.primary:hover { background: linear-gradient(180deg, #4057d6, #2c3da3); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--indigo); }
.btn.ghost:hover { background: var(--indigo-50); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 48px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }

/* ---------- 입력 ---------- */
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field > span small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.field > span em { color: var(--err); font-style: normal; margin-left: 2px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d8dde8; border-radius: 10px; padding: 0 13px; height: 42px; transition: border-color .15s, box-shadow .15s; }
textarea { padding: 10px 13px; height: auto; min-height: 84px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a7adc0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(64,87,214,.12); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--indigo); flex: none; }
input[type=file] { height: auto; padding: 10px; border-style: dashed; background: var(--surface-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-card { max-width: 760px; }
.form-section { padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line-2); }
.form-section > h3 { font-size: 14px; margin: 0 0 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); cursor: pointer; font-weight: 500; color: var(--ink-2); }
.check:hover { border-color: #d4daf6; }
.check:has(input:checked) { border-color: #c9d2fb; background: var(--indigo-50); color: var(--ink); }
.permgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.preset select { width: auto; min-width: 160px; }

/* ---------- 알림 ---------- */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.flash .ic { margin-top: 2px; }
.flash.ok { background: var(--ok-bg); border-color: #b9e3d2; color: #0b6b4a; }
.flash.err { background: var(--err-bg); border-color: #f5c9bf; color: #9b2f1f; }
.notice { background: var(--indigo-50); border: 1px solid #dbe1fb; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; margin: 0 0 18px; font-size: 13.5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--indigo-50); color: var(--indigo); }

/* ---------- 표 ---------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.table-tools { display: flex; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; align-items: center; }
.table-tools .search { position: relative; }
.table-tools .search .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); width: 17px; height: 17px; }
.table-tools .search input { padding-left: 38px; width: 220px; }
.table-tools select { width: auto; min-width: 110px; }
.table-scroll { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
table.list tbody tr { transition: background .12s; }
table.list tbody tr:hover { background: #fafbff; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tr.inactive td { opacity: .55; }
table.list tr.row-err td { background: #fff7f5; }
table.list tr.row-warn td { background: #fffbef; }
td.url a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.url a:hover { border-color: #cfd6f7; color: var(--indigo); }
td.url .ic { width: 14px; height: 14px; }
.who-cell { display: flex; align-items: center; gap: 11px; }
.who-cell b { display: block; color: var(--ink); font-weight: 600; }
.who-cell > div > span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
table.list td { overflow-wrap: normal; }
.who-cell b .tag { margin-left: 6px; vertical-align: 1px; }
td.aff { min-width: 130px; }
.title-cell b { display: block; color: var(--ink); font-weight: 600; }
.title-cell span { font-size: 12.5px; color: var(--muted); }
.empty { color: var(--muted); padding: 40px 16px; text-align: center; }

/* ---------- 배지·아바타 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #eef0f5; color: var(--ink-2); white-space: nowrap; }
.tag.t-jin { background: #1a2550; color: #fff; }
.tag.t-society { background: #e7f0ff; color: #2456b8; }
.tag.t-author { background: #e8f6f0; color: #0b6b4a; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.lock { background: var(--err-bg); color: var(--err); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.off { background: #f0f1f4; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 13.5px; flex: none; color: #fff; background: linear-gradient(135deg, #6b7cf0, #3447b8); }
.avatar.av-society { background: linear-gradient(135deg, #5aa0f5, #2456b8); }
.avatar.av-author { background: linear-gradient(135deg, #3cc28e, #0f8a5f); }
.avatar.av-jin { background: linear-gradient(135deg, #3a4a86, #111a38); }
.side .avatar { background: linear-gradient(135deg, #7d92ff, #4057d6); }
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.perm-chips .tag { font-weight: 500; }

/* ---------- 내 권한 ---------- */
.perm-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.perm-list li .dot { width: 8px; height: 8px; border-radius: 50%; background: #d3d8e4; flex: none; }
.perm-list li.on { color: var(--ink); background: var(--indigo-50); }
.perm-list li.on .dot { background: var(--indigo); box-shadow: 0 0 0 3px rgba(64,87,214,.18); }

/* ---------- 올리기 ---------- */
.drop { display: flex; gap: 12px; align-items: center; padding: 18px; border: 1.5px dashed #cdd4e6; border-radius: var(--r); background: var(--surface-2); }
.drop input[type=file] { border: 0; background: transparent; padding: 0; }
.hint-list { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; }
.hint-list li { display: flex; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.hint-list li .ic { width: 16px; height: 16px; color: var(--ok); margin-top: 3px; }
.cols-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.cols-chips span { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 12px; align-items: center; }
.summary h2 { margin: 0 8px 0 0; font-size: 16px; }

/* ---------- 로그인 화면 ---------- */
body.auth { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; background: var(--surface); }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; color: #fff;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(125,146,255,.35) 0%, rgba(125,146,255,0) 70%),
    radial-gradient(50% 45% at 10% 95%, rgba(200,162,74,.22) 0%, rgba(200,162,74,0) 70%),
    linear-gradient(160deg, #1a2550 0%, #0e1630 55%, #0a0f22 100%); }
.auth-aside::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 80%); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-copy { max-width: 460px; }
.auth-copy .eyebrow { color: #aab8ff; font-size: 13px; }
.auth-copy h2 { color: #fff; font-size: 36px; line-height: 1.3; font-weight: 800; margin: 12px 0 14px; letter-spacing: -0.035em; }
.auth-copy p { color: rgba(255,255,255,.7); font-size: 15px; margin: 0 0 28px; }
.auth-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-copy li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.88); font-size: 14.5px; }
.auth-copy li .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #c9d2ff; }
.auth-foot { color: rgba(255,255,255,.4); font-size: 12px; margin: 0; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: linear-gradient(180deg, #fff, #f7f8fc); }
.auth-box { width: 100%; max-width: 400px; }
.auth-title { font-size: 28px; font-weight: 800; margin: 14px 0 6px; line-height: 1.3; }
.auth-sub { color: var(--muted); margin: 0 0 28px; }
.auth-help { color: var(--muted); font-size: 12.5px; margin-top: 18px; text-align: center; }
.stack .btn.block { margin-top: 8px; }

/* ---------- 오류 화면 ---------- */
body.bare { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.bare-box { width: 100%; max-width: 440px; padding: 24px; text-align: center; }
.bare-box .logo { margin-bottom: 24px; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  body.app { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; padding: 14px 16px; }
  .side-project { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; margin: 10px 0; }
  .nav-item.soon { display: none; }
  .nav-item.active::before { display: none; }
  .content { padding: 24px 16px 40px; }
  body.auth { grid-template-columns: 1fr; }
  .auth-aside { padding: 28px 24px; }
  .auth-copy h2 { font-size: 26px; }
  .auth-copy ul, .auth-copy p { display: none; }
  .grid2, .permgrid, .perm-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
