/* ============================================================
   LG AI 365 운영 툴 — Design tokens & global styles
   Visual baseline: original mockup (LG Red / CNX Blue / Pub Green)
   Direction: bolder LG-Red identity + richer data viz
   ============================================================ */

:root {
  /* Brand */
  --lg-red:        #C8102E;
  --lg-red-700:    #a50d26;
  --lg-red-600:    #b80f2a;
  --lg-red-100:    #f8d7dd;
  --lg-red-50:     #fdf0f2;
  --cnx-blue:      #1a6ec7;
  --cnx-blue-700:  #155aa3;
  --cnx-blue-50:   #eef4fd;
  --cnx-blue-100:  #d6e6fa;
  --pub-green:     #2a9d5c;
  --pub-green-700: #1f7a47;
  --pub-green-50:  #edf8f2;
  --pub-green-100: #cdeede;
  /* mid tones — 카드/뱃지 테두리용 (full보다 한 단계 연하게) */
  --cnx-blue-300:  #5392d5;
  --lg-red-300:    #d64c62;
  --pub-green-300: #5fb685;
  /* process sub-step role tones — WBS OWNER_FILL과 정합 (기획=파랑·디자인=보라·LGE=빨강·발행=초록) */
  --role-violet:    #7c3aed;   /* 디자인 (WBS DESIGN) */
  --role-violet-300:#a986ee;
  --role-violet-50: #f3eefe;

  /* Chrome accent — monotone. Brand red is removed from generic UI
     (nav, buttons, focus, selection, links, logo) and replaced by ink.
     LG-red stays defined above ONLY for meaning: LGE role, holiday,
     danger/alert, D-day/urgent, current-step. */
  --accent:      var(--ink);  /* 크롬 기본 = 잉크(단일 출처) */
  --accent-700:  #000000;     /* hover — 잉크보다 한 단계 더 어둡게 */
  --accent-100:  #e2e4e8;
  --accent-50:   #f1f2f4;

  /* 기한 도래/지난 미완료 경보 — 발행·완료 초록과 구분되는 연두(lime) */
  --attn:        #84cc16;
  --attn-50:     #ecfccb;

  /* Neutrals */
  --bg:        #f4f5f7;
  --surface:   #ffffff;
  --surface-2: #fafbfc;
  --ink:       #16181d;
  --ink-2:     #4a4f57;
  --ink-3:     #868c96;
  --ink-4:     #aeb4bd;
  --line:      #e7e9ee;
  --line-2:    #d8dbe2;

  /* Status */
  --amber:     #c98a12;
  --amber-50:  #fdf6e7;
  --slate:     #6b7280;
  --slate-50:  #f1f3f5;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(16,18,25,.06), 0 1px 3px rgba(16,18,25,.04);
  --sh-md: 0 4px 14px rgba(16,18,25,.07), 0 1px 3px rgba(16,18,25,.05);
  --sh-lg: 0 18px 48px rgba(16,18,25,.16), 0 4px 12px rgba(16,18,25,.08);
  --sh-red: 0 6px 20px rgba(200,16,46,.18);

  --sidebar-w: 248px;
  --topbar-h: 60px;
  --maxw: 1180px;
  --ease: cubic-bezier(.4,.1,.2,1);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-100); }

#root { height: 100%; }

/* ===== scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd1d8; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b6bcc6; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-stage {
  height: 100%; display: flex; align-items: center; justify-content: center;
}
.login-art {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #2a2d34 0%, var(--accent) 48%, #4a4f57 120%);
  color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-art::after{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(520px 520px at 84% 14%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(420px 420px at 8% 96%, rgba(0,0,0,.22), transparent 60%);
}
.login-art-grid{
  position:absolute; inset:0; opacity:.10;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg,#fff 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 78%);
}
.login-art > * { position: relative; z-index: 1; }
.login-art .mark { font-size: 13px; font-weight: 800; letter-spacing:.16em; opacity:.9; }
.login-art h1 { font-size: 40px; font-weight: 800; line-height: 1.12; letter-spacing:-.02em; }
.login-art .sub { font-size: 15px; opacity:.86; max-width: 30ch; margin-top: 16px; line-height:1.6; }
.login-art .foot { font-size: 12px; opacity:.7; letter-spacing:.02em; }
.login-art .ring { display:flex; gap:26px; margin-top: 22px; }
.login-art .ring b { font-size: 26px; font-weight:800; display:block; }
.login-art .ring span { font-size:12px; opacity:.78; }

.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 500px; }
.login-card .logo-lockup { display:flex; align-items:center; gap:10px; margin-bottom: 30px; }
.login-card h2 { font-size: 22px; font-weight: 750; letter-spacing:-.01em; }
.login-card .hint { color: var(--ink-3); font-size: 13px; margin-top: 4px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display:block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.login-presets { display:flex; gap: 8px; margin: 8px 0 22px; }
.preset {
  flex: 1; text-align: left; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 12px; transition: all .15s; background: var(--surface);
}
.preset:hover { border-color: var(--ink-4); }
.preset.sel { border-color: var(--accent); background: var(--accent-50); box-shadow: 0 0 0 3px var(--accent-50); }
.preset .pt { font-size: 13px; font-weight: 700; display:flex; align-items:center; gap:7px; }
.preset .pd { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.login-err { color: var(--lg-red); font-size: 12.5px; margin-top: -6px; margin-bottom: 14px; }
.sso-email-row { display: flex; align-items: center; gap: 6px; }
.sso-email-row input { flex: 1; min-width: 0; }
.sso-email-row .sso-at { color: var(--ink-3); font-size: 14px; }
.sso-email-row select {
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 10px; background: var(--surface); font-size: 13px; cursor: pointer;
  min-width: 130px;
}
.sso-email-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.sso-switch { margin-top: 6px; font-size: 12px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; }
.sso-switch:hover { text-decoration: underline; }

/* ============================================================
   APP SHELL
   ============================================================ */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100%; }
.sidebar {
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100%;
}
.sb-brand {
  display:flex; align-items:center; gap:11px; padding: 18px 20px 16px;
}
.sb-brand .ttl { font-size: 13.5px; font-weight: 750; line-height:1.15; }
.sb-brand .ttl small { display:block; font-size: 11px; font-weight:500; color: var(--ink-3); letter-spacing:.02em; }
.sb-nav { padding: 8px 12px; display:flex; flex-direction: column; gap: 2px; }
.sb-section { font-size: 10.5px; font-weight: 700; letter-spacing:.08em; color: var(--ink-4); padding: 14px 12px 6px; text-transform: uppercase; }
.sb-item {
  display:flex; align-items:center; gap:11px; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13.5px; font-weight: 550; transition: background .13s, color .13s; position: relative;
}
.sb-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-3); transition: color .13s; }
.sb-item:hover { background: var(--surface-2); color: var(--ink); }
.sb-item:hover svg { color: var(--ink-2); }
.sb-item.active { background: var(--accent-50); color: var(--accent-700); font-weight: 700; }
.sb-item.active svg { color: var(--accent); }
.sb-item.active::before {
  content:""; position:absolute; left:-12px; top:50%; transform:translateY(-50%);
  width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.sb-item .count { margin-left:auto; font-size: 11px; font-weight:700; background: var(--slate-50); color: var(--ink-3); border-radius: 99px; padding: 1px 8px; }
.sb-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--line); }
.sb-user { display:flex; align-items:center; gap:10px; padding: 8px; border-radius: var(--r-sm); }
.sb-user:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-weight:750; font-size:13px; color:#fff;
}
.sb-user .nm { font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.sb-user .rl { font-size: 11px; color: var(--ink-3); }
.logout-btn { margin-left:auto; color: var(--ink-4); padding: 4px; border-radius: 6px; }
.logout-btn:hover { color: var(--accent); background: var(--accent-50); }

/* main column */
.main-col { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0; background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display:flex; align-items:center; gap: 14px;
  padding: 0 28px;
}
.crumb { display:flex; align-items:center; gap: 8px; font-size: 13px; color: var(--ink-3); min-width:0; }
.crumb b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.crumb .sep { color: var(--ink-4); }
.crumb .cur { color: var(--ink); font-weight: 700; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display:flex; align-items:center; gap: 10px; }

.scroll-area { flex: 1; overflow-y: auto; overflow-x: hidden; }
.page-wrap { max-width: var(--maxw); margin: 0 auto; padding: 30px 28px 80px; }
.page-head { margin-bottom: 22px; }
.page-head .ph-row { display:flex; align-items:flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 780; letter-spacing:-.02em; }
.page-desc { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }

/* project-level tabs */
.ptabs { display:flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x:auto; overflow-y:hidden; }
.ptab {
  padding: 11px 16px; font-size: 13.5px; font-weight: 650; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .14s;
  display:flex; align-items:center; gap:7px;
}
.ptab svg { width: 16px; height:16px; }
.ptab:hover { color: var(--ink); }
.ptab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   PRIMITIVES
   ============================================================ */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding: 9px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 650;
  transition: all .14s var(--ease); white-space: nowrap; border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn-sm svg { width: 14px; height:14px; }
.btn-lg { padding: 12px 20px; font-size: 14px; }
.btn-primary { background: var(--accent); color:#fff; box-shadow: var(--sh-md); }
.btn-primary:hover { background: var(--accent-700); }
.btn-primary:disabled { background: var(--ink-4); box-shadow:none; cursor: not-allowed; }
.btn-blue { background: var(--cnx-blue); color:#fff; }
.btn-blue:hover { background: var(--cnx-blue-700); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-4); color: var(--ink); }
.btn-soft { background: var(--slate-50); color: var(--ink-2); }
.btn-soft:hover { background: #e7eaee; }
.btn-danger { background: var(--surface); color: var(--lg-red); border-color: var(--lg-red-100); }
.btn-danger:hover { background: var(--lg-red-50); }
.btn-block { width: 100%; }
.btn:disabled { cursor: not-allowed; }

.pill {
  display:inline-flex; align-items:center; gap: 5px; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px; letter-spacing:.01em; white-space: nowrap;
}
.pill .dot { width:6px; height:6px; border-radius:50%; }
.pill-active { background: var(--pub-green-50); color: var(--pub-green-700); }
.pill-active .dot { background: var(--pub-green); }
.pill-not_started { background: var(--slate-50); color: var(--slate); }
.pill-not_started .dot { background: var(--slate); }
.pill-done { background: var(--cnx-blue-50); color: var(--cnx-blue-700); }
.pill-done .dot { background: var(--cnx-blue); }

.role-badge {
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px;
  letter-spacing:.04em; white-space: nowrap;
}
.rb-admin { background: var(--ink); color: #fff; }
.rb-cnx { background: var(--cnx-blue-50); color: var(--cnx-blue); }
.rb-lge { background: var(--lg-red-50); color: var(--lg-red); }
.rb-pub { background: var(--pub-green-50); color: var(--pub-green-700); }

/* role dropdown in the users table */
.role-select { min-width: 92px; }

/* invite codes */
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700;
  background: var(--slate-50); padding: 3px 8px; border-radius: 6px; cursor: pointer; letter-spacing: .02em;
}
.invite-code:hover { background: var(--line-2); }
.invite-status {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .03em;
}
.invite-status.is-pending { background: var(--cnx-blue-50); color: var(--cnx-blue); }
.invite-status.is-used { background: var(--pub-green-50); color: var(--pub-green-700); }
.invite-status.is-revoked { background: var(--slate-50); color: var(--ink-3); text-decoration: line-through; }

.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}

/* clickable product picker (episode form) */
.prod-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-chip {
  font-size: 12px; padding: 5px 12px; border-radius: 99px; cursor: pointer;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  transition: background .12s, border-color .12s, color .12s;
}
.prod-chip:hover { border-color: var(--ink-4); }
.prod-chip.on { background: var(--accent-50); border-color: var(--accent); color: var(--accent); font-weight: 700; }
/* 제출 모달의 페르소나 칩: 라벨이 길면 한 줄 …로 자른다(전체는 title hover). */
.si-p .prod-chip { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-add { display: flex; gap: 8px; margin-top: 8px; }
.prod-add .input { flex: 1; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}

/* segmented month tabs */
.seg { display:inline-flex; background: var(--slate-50); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg button {
  padding: 7px 16px; border-radius: var(--r-xs); font-size: 13px; font-weight: 650; color: var(--ink-3);
  transition: all .14s; display:flex; align-items:center; gap:7px;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.seg button.on.red { color: var(--accent); }

/* dropdown menu */
.menu-wrap { position: relative; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-xs); display:flex; align-items:center; justify-content:center;
  color: var(--ink-3); transition: all .13s;
}
.icon-btn:hover { background: var(--slate-50); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--sh-lg); padding: 5px; min-width: 168px;
  animation: pop .12s var(--ease);
}
@keyframes pop { from { opacity:0; transform: translateY(-4px) scale(.98); } }
.menu button {
  display:flex; align-items:center; gap: 10px; width: 100%; text-align:left;
  padding: 8px 10px; border-radius: var(--r-xs); font-size: 13px; color: var(--ink-2); font-weight: 550;
}
.menu button svg { width: 15px; height: 15px; color: var(--ink-3); }
.menu button:hover { background: var(--surface-2); color: var(--ink); }
.menu button.danger { color: var(--lg-red); }
.menu button.danger svg { color: var(--lg-red); }
.menu button.danger:hover { background: var(--lg-red-50); }
.menu .menu-div { height:1px; background: var(--line); margin: 5px 2px; }

/* ===== Modal / Drawer ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(20,22,28,.42); backdrop-filter: blur(2px);
  z-index: 100; display:flex; align-items:center; justify-content:center; padding: 24px;
  animation: fade .15s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  width: 100%; max-width: 520px; max-height: 90vh; display:flex; flex-direction:column;
  animation: rise .2s var(--ease);
}
.modal-lg { max-width: 640px; }
@keyframes rise { from { opacity:0; transform: translateY(14px) scale(.985); } }
.modal-hd { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display:flex; align-items:flex-start; gap: 14px; }
.modal-hd h3 { font-size: 17px; font-weight: 750; letter-spacing:-.01em; }
.modal-hd p { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.modal-bd { padding: 20px 24px; overflow-y: auto; }
.modal-ft { padding: 16px 24px; border-top: 1px solid var(--line); display:flex; gap: 10px; justify-content:flex-end; }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,22,28,.40); backdrop-filter: blur(2px);
  z-index: 100; display:flex; justify-content:flex-end; animation: fade .15s var(--ease);
}
.drawer {
  background: var(--surface); width: 100%; max-width: 560px; height: 100%;
  display:flex; flex-direction: column; box-shadow: var(--sh-lg); animation: slidein .24s var(--ease);
}
@keyframes slidein { from { transform: translateX(28px); opacity:.6; } }
.drawer-hd { padding: 20px 26px; border-bottom: 1px solid var(--line); flex-shrink:0; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 24px 26px; }
.drawer-ft { padding: 16px 26px; border-top: 1px solid var(--line); flex-shrink:0; background: var(--surface-2); }

/* form controls */
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus, .textarea:focus { outline:none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
.flabel { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; display:block; }
.fhint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.frow { margin-bottom: 18px; }
.fgrid { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* checkbox month chips */
.month-chip {
  display:flex; align-items:center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); transition: all .14s; cursor: pointer;
}
.month-chip:hover { border-color: var(--ink-4); }
.month-chip.on { border-color: var(--accent); background: var(--accent-50); }
.month-chip .mc-name { font-weight: 700; font-size: 13px; }
.month-chip .qty { margin-left:auto; display:flex; align-items:center; gap:6px; }
.qty input { width: 52px; text-align:center; padding: 5px; border:1px solid var(--line-2); border-radius: var(--r-xs); }

/* ===== Toast ===== */
.toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast {
  background: #1c1f26; color: #fff; padding: 11px 16px 11px 14px; border-radius: var(--r-sm);
  box-shadow: var(--sh-lg); display:flex; align-items:center; gap: 10px; font-size: 13px; font-weight: 550;
  animation: toastin .25s var(--ease); min-width: 260px;
}
@keyframes toastin { from { opacity:0; transform: translateY(12px); } }
.toast .tdot { width: 22px; height: 22px; border-radius: 50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.toast.ok .tdot { background: var(--pub-green); }
.toast.err .tdot { background: var(--lg-red); }
.toast .tdot svg { width: 13px; height: 13px; color:#fff; }

/* ===== Skeleton ===== */
.skel { background: linear-gradient(90deg,#edeef1 25%, #f6f7f8 37%, #edeef1 63%); background-size: 400% 100%; animation: shim 1.3s infinite; border-radius: 6px; }
@keyframes shim { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ===== Empty / Error ===== */
.empty-state { text-align:center; padding: 64px 24px; }
.empty-ic { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--slate-50); display:flex; align-items:center; justify-content:center; margin: 0 auto 16px; color: var(--ink-4); }
.empty-ic svg { width: 26px; height: 26px; }
.empty-state h4 { font-size: 16px; font-weight: 700; }
.empty-state p { color: var(--ink-3); font-size: 13px; margin-top: 6px; max-width: 36ch; margin-inline:auto; }
.empty-state .btn { margin-top: 18px; }

/* ============================================================
   HOME — project grid
   ============================================================ */
.proj-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 18px; }
.proj-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 20px 18px; transition: box-shadow .18s, transform .18s, border-color .18s; position: relative; cursor: pointer;
  display:flex; flex-direction: column;
}
.proj-card:hover { box-shadow: var(--sh-md); border-color: var(--line-2); transform: translateY(-2px); }
.proj-card .pc-top { display:flex; align-items:flex-start; justify-content:space-between; gap: 10px; }
.proj-card .pc-name { font-size: 16.5px; font-weight: 750; letter-spacing:-.01em; line-height:1.3; }
.proj-card .pc-period { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; display:flex; align-items:center; gap:6px; }
.proj-card .pc-overview { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-card .pc-step { display:flex; align-items:center; gap:7px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.proj-card .pc-step.muted { color: var(--ink-3); font-weight: 500; }
.proj-card .pc-step-dot { width:7px; height:7px; border-radius:50%; background: var(--accent); flex-shrink:0; }
.proj-card .pc-foot { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.pc-foot .ppl { display:flex; align-items:center; gap:6px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.proj-card .pc-foot > span:last-child { white-space: nowrap; }

.new-proj-card {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap: 10px; color: var(--ink-3); min-height: 220px;
  transition: all .16s; background: transparent;
}
.new-proj-card:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-50); }
.new-proj-card .npc-ic { width: 44px; height:44px; border-radius: 50%; background: var(--surface); border:1px solid var(--line-2); display:flex; align-items:center; justify-content:center; }

/* stat strip */
.stat-strip { display:grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border:1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px;
  position: relative; overflow: hidden;
}
.stat .sv { font-size: 26px; font-weight: 800; letter-spacing:-.02em; line-height:1; }
.stat .sl { font-size: 12px; color: var(--ink-3); margin-top: 7px; font-weight: 550; }
.stat .sbar { position:absolute; left:0; top:0; bottom:0; width: 4px; }
@media (max-width: 760px){ .stat-strip { grid-template-columns: repeat(2,1fr); } }

/* ============================================================
   EPISODE BROWSE
   ============================================================ */
.submitbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 18px; margin-bottom: 22px;
  display:flex; align-items:center; gap: 18px; box-shadow: var(--sh-sm);
}
.quota { display:flex; align-items:center; gap: 13px; }
.quota-ring { position: relative; width: 44px; height: 44px; flex-shrink:0; }
.quota-ring .qn { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; }
.quota-txt .ql { font-size: 13.5px; font-weight: 750; }
.quota-txt .qs { font-size: 12px; margin-top:1px; }
.qs.under { color: var(--amber); }
.qs.ok { color: var(--pub-green-700); }
.submitbar .sb-actions { margin-left:auto; display:flex; align-items:center; gap: 10px; }

.theme-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; margin-bottom: 16px;
}
.theme-hd { display:flex; align-items:flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.theme-pill {
  font-size: 11px; font-weight: 750; letter-spacing:.04em; padding: 4px 11px; border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), #4a4f57); color: #fff; white-space: nowrap; box-shadow: var(--sh-sm);
}
.theme-name { font-size: 15.5px; font-weight: 750; }
.theme-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.theme-hd .theme-actions { margin-left:auto; display:flex; gap: 4px; }

/* minmax(0,1fr): 컬럼 최소폭=0이라야 nowrap 페르소나가 카드를 넓히지 못하고 …로 잘린다. */
.ep-grid { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
@media (max-width: 980px){ .ep-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px){ .ep-grid { grid-template-columns: minmax(0,1fr); } }
.ep {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 16px; transition: all .14s var(--ease); position: relative; cursor: pointer; display:flex; flex-direction:column;
  min-height: 280px; min-width: 0;
}
.ep:hover { border-color: var(--line-2); background: #fff; box-shadow: var(--sh-sm); }
.ep.sel { border-color: var(--accent); background: var(--accent-50); box-shadow: 0 0 0 1px var(--accent) inset; }
.ep .ep-check {
  position:absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--line-2); background:#fff; display:flex; align-items:center; justify-content:center; transition: all .14s;
}
.ep .ep-check svg { width: 13px; height: 13px; color:#fff; opacity:0; transform: scale(.6); transition: all .14s; }
.ep.sel .ep-check { background: var(--accent); border-color: var(--accent); }
.ep.sel .ep-check svg { opacity:1; transform: scale(1); }
.ep-wk { font-size: 11px; font-weight: 700; color: var(--ink-4); letter-spacing:.03em; margin-bottom: 6px; }
.ep-ttl { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; padding-right: 26px; }
.ep-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 10px; }
.ep-tags { display:flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ep-ten { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-top: auto; }
.ep-ten b { color: var(--ink); font-weight: 700; }
.ep-meta { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.ep-meta-row { font-size: 12px; line-height: 1.5; color: var(--ink-3); display: flex; gap: 7px; align-items: baseline; }
.ep-meta-label { flex-shrink: 0; min-width: 34px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; padding-top: 1px; }
.ep-meta-val { color: var(--ink-3); }
.ep-foot { display:flex; align-items:center; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.ep-persona-chip { flex:1; min-width:0; display:flex; align-items:center; gap:6px; font-size: 11.5px; font-weight: 650; color: var(--cnx-blue); }
.ep-persona-chip > svg { flex-shrink:0; }
/* 카드는 보기 좋게: 페르소나 라벨이 길어도 1줄 …로 자른다(전체는 상세 드로어에서). */
.ep-persona-chip .pl { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ep-persona-chip.none { color: var(--ink-4); font-weight: 550; }
.ep-detail-link { margin-left:auto; font-size: 12px; font-weight: 650; color: var(--ink-3); display:flex; align-items:center; gap: 3px; }
.ep-detail-link:hover { color: var(--accent); }
.ep.paused-ep { opacity: .58; }

/* ============================================================
   EPISODE DETAIL (drawer)
   ============================================================ */
.det-wk { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing:.03em; }
.det-title { font-size: 21px; font-weight: 780; letter-spacing:-.01em; line-height: 1.25; margin-top: 6px; }
.det-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top: 12px; }
.det-section { margin-top: 24px; }
.det-section .dsh { font-size: 11px; font-weight: 800; letter-spacing:.07em; color: var(--ink-4); text-transform: uppercase; margin-bottom: 9px; }
.det-tension { font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--ink); padding: 16px 18px; background: var(--accent-50); border-radius: var(--r-md); border-left: 3px solid var(--accent); }
.det-field { display:flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.det-field:last-child { border-bottom: none; }
.det-field .dfl { min-width: 64px; font-size: 11px; font-weight: 800; color: var(--ink-3); letter-spacing:.04em; padding-top:2px; flex-shrink:0; }
.det-field .dfv { font-size: 13px; color: var(--ink-2); line-height: 1.55; }

.persona-list { display:flex; flex-direction:column; gap: 6px; margin-top: 4px; }
.persona-opt {
  border: 1.5px solid var(--line-2); border-radius: var(--r-md); padding: 8px 12px; transition: all .14s; position: relative; cursor: pointer;
  display:flex; gap: 10px; align-items:center;
}
.persona-opt:hover { border-color: var(--cnx-blue); }
.persona-opt.sel { border-color: var(--cnx-blue); background: var(--cnx-blue-50); }
.persona-opt .radio { width: 18px; height:18px; border-radius:50%; border: 2px solid var(--line-2); flex-shrink:0; margin-top:2px; transition: all .14s; position: relative; }
.persona-opt.sel .radio { border-color: var(--cnx-blue); }
.persona-opt.sel .radio::after { content:""; position:absolute; inset:3px; border-radius:50%; background: var(--cnx-blue); }
.persona-opt .pname { font-size: 13px; font-weight: 650; }
.persona-opt .pseg { font-size: 11.5px; color: var(--cnx-blue); font-weight: 650; }
.persona-opt .pdesc { font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height:1.5; }
.persona-opt .pattrs { display:flex; flex-wrap:wrap; gap: 5px; margin-top: 9px; }
.persona-opt .pavatar { width: 38px; height:38px; border-radius: 10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:750; font-size:14px; }

/* ============================================================
   SUBMIT / HISTORY
   ============================================================ */
.submit-item { display:flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.submit-item:last-child { border-bottom:none; }
.submit-item .si-num { width: 24px; height:24px; border-radius: 7px; background: var(--accent); color:#fff; font-size: 12px; font-weight: 800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.submit-item .si-t { font-size: 13px; font-weight: 700; line-height:1.4; }
.submit-item .si-p { font-size: 11.5px; color: var(--cnx-blue); font-weight:650; margin-top:3px; display:flex; align-items:center; gap:5px; }
.si-warn { color: var(--amber); }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:""; position:absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position:absolute; left: -26px; top: 2px; width: 16px; height:16px; border-radius:50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line-2); background: var(--accent); }
.tl-item.cnx .tl-dot { background: var(--cnx-blue); }
.tl-head { display:flex; align-items:center; gap: 8px; flex-wrap:wrap; }
.tl-head .who { font-weight: 750; font-size: 13px; }
.tl-head .when { font-size: 11.5px; color: var(--ink-4); }
.tl-body { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.tl-eps { margin-top: 8px; display:flex; flex-direction:column; gap:5px; }
.tl-ep { font-size: 12px; color: var(--ink-2); display:flex; gap:7px; align-items:baseline; }
.tl-ep .te-p { color: var(--cnx-blue); font-weight:650; }
.tl-ep .te-title { font-weight: 600; color: var(--ink); }

/* submission history — submitter header + theme-grouped episodes */
.sub-head { display:flex; align-items:center; gap:10px; }
.sub-head .sub-id { min-width:0; flex:1; display:flex; flex-direction:column; gap:1px; }
.sub-head .when { font-size:11.5px; color:var(--ink-4); }
.sub-count { font-size:12px; font-weight:700; color:var(--ink-2); background:var(--surface-2); border:1px solid var(--line); border-radius:99px; padding:3px 11px; white-space:nowrap; }
.sub-note { margin:9px 0 2px; font-size:12.5px; color:var(--ink-3); }
.sub-themes { margin-top:12px; display:flex; flex-direction:column; gap:13px; }
.sub-theme-name { display:flex; align-items:center; gap:5px; font-size:11.5px; font-weight:750; color:var(--ink-3); margin-bottom:6px; }
.sub-theme-name svg { color:var(--ink-4); }

/* episode log (admin) — submitter master / submission detail */
.eplog { display:grid; grid-template-columns: 240px 1fr; gap:18px; align-items:start; }
.eplog-users { display:flex; flex-direction:column; gap:4px; }
.eplog-user { display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:10px; border:1px solid transparent; background:none; cursor:pointer; text-align:left; transition:background .12s, border-color .12s; }
.eplog-user:hover { background:var(--surface-2); }
.eplog-user.on { background:var(--accent-50); border-color:var(--accent); }
.eplog-user .eu-id { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.eplog-user .eu-id .nm { font-weight:700; font-size:13px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.eu-cnt { font-size:12px; font-weight:700; color:var(--ink-3); background:var(--surface); border:1px solid var(--line); border-radius:99px; padding:1px 8px; }
.eplog-user.on .eu-cnt { background:#fff; border-color:var(--accent); color:var(--accent); }
.eplog-detail { display:flex; flex-direction:column; gap:14px; min-width:0; }
.eplog-card { padding:18px 20px; }
.eplog-card-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.elc-proj { display:flex; align-items:center; gap:6px; font-weight:750; font-size:13.5px; color:var(--ink); }
.elc-proj svg { color:var(--ink-4); }
.elc-when { font-size:11.5px; color:var(--ink-4); }
.eplog-card-head .sub-count { margin-left:auto; }
@media (max-width:720px){ .eplog { grid-template-columns:1fr; } .eplog-users { flex-direction:row; flex-wrap:wrap; } }

/* ============================================================
   SUBMISSION LIST ROWS (history + episode-log) — compact, clickable,
   prominent date; full detail opens in a right drawer
   ============================================================ */
.log-list { display:flex; flex-direction:column; gap:9px; }
.log-row {
  display:flex; align-items:center; gap:13px; width:100%; text-align:left;
  padding:13px 15px; border:1px solid var(--line); border-radius:var(--r-md);
  background:var(--surface); cursor:pointer;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.log-row:hover { border-color:var(--accent); background:var(--accent-50); box-shadow: var(--sh-sm); }
.log-row .lr-id { min-width:0; flex:1; display:flex; flex-direction:column; gap:3px; }
.log-row .lr-who { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.log-row .lr-who .who { font-weight:750; font-size:13px; color:var(--ink); }
/* prominent date — bold, dark, ~14.5px */
.log-when { font-size:14.5px; font-weight:800; color:var(--ink); letter-spacing:-.01em; }
.log-row .lr-meta { display:flex; align-items:center; gap:6px; margin-top:1px; }
.log-row .lr-preview { font-size:12px; color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:260px; }
.log-row .lr-chev { color:var(--ink-4); flex-shrink:0; }
.log-row:hover .lr-chev { color:var(--accent); }

/* drawer: submitter header */
.log-dh-when { font-size:15px; font-weight:800; color:var(--ink); margin-top:8px; }
.log-dh-who { display:flex; align-items:center; gap:10px; }
.log-dh-who .who { font-weight:750; font-size:14.5px; color:var(--ink); }

/* drawer: consumer message (note) — quote block, clearly labeled */
.log-note { margin-top:18px; padding:14px 16px; background:var(--cnx-blue-50);
  border-left:3px solid var(--cnx-blue); border-radius:var(--r-md); }
.log-note .ln-label { font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--cnx-blue); margin-bottom:6px; }
.log-note .ln-quote { font-size:14px; line-height:1.5; color:var(--ink); font-weight:600; }

/* drawer: grouped selection breakdown */
.log-content-title { display:flex; align-items:center; gap:7px; font-size:15px; font-weight:800; color:var(--ink); margin:22px 0 4px; }
.log-content-title svg { color:var(--accent); }
.log-group { margin-top:16px; }
.log-group-head { font-size:12px; font-weight:750; color:var(--ink-3); padding:6px 0; border-bottom:1px solid var(--line); margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.log-group-head svg { color:var(--ink-4); }
.log-ep-line { display:flex; align-items:center; gap:9px; padding:7px 2px; }
.log-ep-line .lel-t { flex:1; min-width:0; font-size:13.5px; font-weight:650; color:var(--ink); }
.log-ep-chip { display:inline-flex; align-items:center; gap:4px; flex-shrink:0; font-size:11.5px; font-weight:700;
  color:var(--cnx-blue); background:var(--cnx-blue-50); border:1px solid var(--cnx-blue-100); border-radius:99px; padding:3px 10px; }
.log-ep-chip.none { color:var(--ink-4); background:var(--surface-2); border-color:var(--line); font-weight:600; }
/* one episode rendered as a self-contained block (title + persona + detail) */
.log-ep-block { padding:10px 12px; margin:8px 0; border:1px solid var(--line); border-radius:10px; background:var(--surface, #fff); }
.log-ep-block:first-child { margin-top:2px; }
.log-ep-head { display:flex; align-items:center; gap:9px; }
.log-ep-head .lel-t { flex:1; min-width:0; font-size:13.5px; font-weight:750; color:var(--ink); }
.log-ep-meta { margin-top:9px; padding-top:9px; border-top:1px dashed var(--line); }
.log-ep-meta .ep-tags { display:inline-flex; flex-wrap:wrap; gap:5px; }

/* ============================================================
   PROCESS PAGE
   ============================================================ */
.proc-banner {
  background: linear-gradient(120deg, #fff 60%, var(--accent-50));
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; margin-bottom: 22px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap: 12px;
}
.proc-banner .pbd { font-size: 16px; font-weight: 750; display:flex; align-items:center; gap:9px; }
.proc-banner .pbd .cal-ic { width: 34px; height:34px; border-radius: 9px; background: var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; }
.proc-banner .pbw { font-size: 12.5px; color: var(--ink-3); }
.proc-banner .pbw b { color: var(--accent); }

.proc-flow { display:flex; align-items:stretch; gap: 0; margin-bottom: 30px; overflow-x:auto; padding-bottom: 6px; }
.proc-step {
  flex:1; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px; position: relative; transition: all .2s; display:flex; flex-direction:column;
}
.proc-step.active { border: 1.5px solid var(--lg-red); box-shadow: var(--sh-red); }
.proc-step.done { background: var(--surface-2); }
.proc-step .ps-head { display:flex; align-items:center; gap: 10px; margin-bottom: 11px; }
.proc-step .ps-num { flex:none; width: 34px; height:34px; border-radius: 9px; background: var(--slate-50); color: var(--ink-3); font-weight: 800; display:flex; align-items:center; justify-content:center; font-size: 16px; }
.proc-step.active .ps-num { background: var(--lg-red); color:#fff; }
.proc-step.done .ps-num { background: var(--pub-green-50); color: var(--pub-green-700); }
.proc-step .ps-label { flex:1; font-size: 18px; font-weight: 760; line-height: 1.3; letter-spacing: -.01em; }
.proc-step .ps-head .menu-wrap { margin-left: auto; }
.proc-step .ps-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-top: 0; margin-bottom: 13px; }
.proc-step .ps-roles { display:flex; flex-direction:column; gap: 7px; margin-top: auto; }
.proc-role { font-size: 13px; color: var(--ink-2); display:flex; align-items:flex-start; gap: 7px; line-height: 1.45; }
/* ----- process sub-steps (역할 → 제목 → 내용) ----- */
.proc-step .ps-substeps { display:flex; flex-direction:column; gap: 9px; margin-top: 2px; }
.ps-sub { border-top: 1px solid var(--line); padding-top: 9px; }
.ps-sub:first-child { border-top: none; padding-top: 0; }
.ps-sub-head { display:flex; align-items:center; gap: 7px; }
.ps-sub-title { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.4; flex: 1; }
.ps-sub-content { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 3px; white-space: pre-line; }
.ps-sub-actions { display:flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.ps-sub:hover .ps-sub-actions { opacity: 1; }
.ps-sub-actions .icon-btn { width: 22px; height: 22px; }
.ps-sub-actions .icon-btn.danger:hover { color: var(--danger, #d32f2f); }
.ps-sub-add { margin-top: 4px; align-self:flex-start; display:inline-flex; align-items:center; gap:5px; font-size: 12px; font-weight: 600; color: var(--ink-3); background: none; border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 5px 9px; cursor: pointer; }
.ps-sub-add:hover { color: var(--accent); border-color: var(--accent-100); background: var(--accent-50); }
.ps-sub-add svg { width: 13px; height: 13px; }
/* sub-step 역할 뱃지 (기획/디자인/CNX/LGE/발행) — 아웃라인 톤 */
.subrole-badge { display:inline-flex; align-items:center; font-size: 10.5px; font-weight: 750; padding: 1px 7px; border-radius: 99px; white-space: nowrap; border: 1px solid; }
.srb-plan   { color: var(--cnx-blue);      border-color: var(--cnx-blue-300);     background: var(--cnx-blue-50); }
.srb-design { color: var(--role-violet);   border-color: var(--role-violet-300);  background: var(--role-violet-50); }
.srb-cnx    { color: var(--ink-2);         border-color: var(--line-2);           background: var(--slate-50); }
.srb-lge    { color: var(--lg-red);        border-color: var(--lg-red-300);       background: var(--lg-red-50); }
.srb-pub    { color: var(--pub-green-700); border-color: var(--pub-green-300);    background: var(--pub-green-50); }
/* 단계 수정 모달 — 세부 스텝 순서 조정 */
.substep-reorder { display:flex; flex-direction:column; gap: 6px; }
.sr-row { display:flex; align-items:center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.sr-title { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sr-btns { display:flex; gap: 2px; }
.sr-btns .icon-btn { width: 24px; height: 24px; font-size: 14px; font-weight: 800; color: var(--ink-3); }
.sr-btns .icon-btn:disabled { opacity: .3; cursor: default; }
.sr-empty { font-size: 12.5px; color: var(--ink-4); padding: 10px 0; }
.proc-active-tag { margin-top: 12px; font-size: 11px; font-weight: 750; color: var(--lg-red); display:flex; align-items:center; gap:5px; }
.proc-active-tag .blink { width: 7px; height:7px; border-radius:50%; background: var(--lg-red); animation: blink 1.4s infinite; }
.proc-step.is-current { border: 1.5px solid var(--lg-red); box-shadow: var(--sh-red); }
.proc-step.is-current .ps-num { background: var(--lg-red); color:#fff; }
.proc-current-tag { margin-top: 8px; display:inline-flex; align-items:center; gap:6px; font-size: 11.5px; font-weight: 700; color: var(--lg-red); }
@keyframes blink { 50% { opacity: .25; } }
.proc-arrow { display:flex; align-items:center; color: var(--line-2); padding: 0 3px; flex-shrink:0; }
.proc-arrow svg { width: 20px; height:20px; }

.thisweek-head { font-size: 20px; font-weight: 780; letter-spacing:-.02em; margin-bottom: 14px; display:flex; align-items:center; gap:9px; }
/* 완료 로그 버튼 (헤더 우측, Admin·CNX 전용) */
.tw-log-btn { margin-left: auto; display:inline-flex; align-items:center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer; color: var(--ink-2); background: #fff; border: 1px solid var(--line); letter-spacing: 0; transition: background .12s, border-color .12s, color .12s; }
.tw-log-btn svg { width: 14px; height: 14px; }
.tw-log-btn:hover { border-color: var(--ink-4); color: var(--ink); background: #fafbfc; }
/* 완료 로그 모달의 동작 태그 */
.tw-log-tag { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.tw-log-tag.done { background: var(--pub-green); color: #fff; }
.tw-log-tag.undone { background: #e9ecef; color: var(--ink-3, #555); }
.thisweek-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.tw-col-hd { font-size: 12px; font-weight: 750; padding: 8px 13px; border-radius: var(--r-sm); letter-spacing:.04em; color: var(--ink); margin-bottom: 9px; display:flex; align-items:center; justify-content:space-between; border: 1px solid transparent; }
/* 톤다운: 솔리드 채움 → 옅은 역할 색 배경 + 역할 색 글씨 */
.tw-col-hd.cnx { background: var(--cnx-blue-100);  color: var(--cnx-blue-700);  border-color: var(--cnx-blue-300); }
.tw-col-hd.lge { background: var(--lg-red-100);   color: var(--lg-red-700);   border-color: var(--lg-red-300); }
.tw-col-hd.pub { background: var(--pub-green-100); color: var(--pub-green-700); border-color: var(--pub-green-300); }
.tw-col-hd .ct { background: rgba(0,0,0,.06); border-radius:99px; padding: 0 7px; font-size: 11px; }
.tw-list { display:flex; flex-direction:column; gap: 8px; }
.tw-item { border-radius: var(--r-sm); padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
/* 시작 전·기타(기본): 옅은 역할 색 테두리, 흰 내부 + 검은 글씨 (가장 약함) */
.tw-item.cnx { border-color: var(--cnx-blue-100); }
.tw-item.lge { border-color: var(--lg-red-100); }
.tw-item.pub { border-color: var(--pub-green-100); }
.tw-step { font-size: 10px; font-weight: 800; letter-spacing:.05em; color: var(--ink-4); }
.tw-task { font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.tw-task .tw-lvl { font-weight: 800; color: var(--accent); margin-right: 5px; }
.tw-due { display:flex; align-items:center; gap: 8px; margin-top: 9px; }
.tw-date { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: .01em; }
.tw-dday { font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 1px 8px; border-radius: 99px; color: var(--ink-4); background: #fff; border: 1.5px solid var(--ink-4); white-space: nowrap; }
/* 기본 뱃지(D-1/D-2/D+1 등): 테두리만 역할 색, 내부 흰색 + 역할 색 글씨 */
.tw-item.cnx .tw-dday { color: var(--cnx-blue);  border-color: var(--cnx-blue-300); }
.tw-item.lge .tw-dday { color: var(--lg-red);   border-color: var(--lg-red-300); }
.tw-item.pub .tw-dday { color: var(--pub-green); border-color: var(--pub-green-300); }
/* D-day·D+n 뱃지: 내부 역할 색 채움 + 흰 글씨 (가장 강함) */
.tw-item.cnx .tw-dday.filled { background: var(--cnx-blue);  border-color: var(--cnx-blue);  color: #fff; }
.tw-item.lge .tw-dday.filled { background: var(--lg-red);   border-color: var(--lg-red);   color: #fff; }
.tw-item.pub .tw-dday.filled { background: var(--pub-green); border-color: var(--pub-green); color: #fff; }
/* 하이라이트(hl): 활성/지난 항목(시작~마감 사이·D-day·D+n) 카드 강조 — 역할 색 굵은 전체 테두리.
   (왼쪽 굵은 막대 ongoing 강조는 제거됨) */
.tw-item.cnx.hl { border-color: var(--cnx-blue-300);  box-shadow: inset 0 0 0 1px var(--cnx-blue-300); }
.tw-item.lge.hl { border-color: var(--lg-red-300);   box-shadow: inset 0 0 0 1px var(--lg-red-300); }
.tw-item.pub.hl { border-color: var(--pub-green-300); box-shadow: inset 0 0 0 1px var(--pub-green-300); }
/* 완료(done): 회색 딤드 처리 + 완료 딱지 */
.tw-item.done { background: #f6f7f9; border-color: var(--line) !important; box-shadow: none !important; }
.tw-item.done .tw-task { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--ink-5, rgba(0,0,0,.25)); }
.tw-item.done .tw-task .tw-lvl { color: var(--ink-4); }
.tw-item.done .tw-date { color: var(--ink-4); }
.tw-item.done .tw-dday { color: var(--ink-4) !important; background: #fff !important; border-color: var(--line) !important; }
.tw-done-tag { display:inline-block; font-size: 10px; font-weight: 800; letter-spacing:.04em; color: #fff; background: var(--ink-4); border-radius: 99px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; text-decoration: none; }
/* 완료 버튼 — 뱃지 옆, 작고 차분하게. 완료 상태에선 채워진 회색. */
.tw-due .tw-done-btn { margin-left: auto; display:inline-flex; align-items:center; gap: 3px; font-size: 11px; font-weight: 750; line-height:1; padding: 4px 9px; border-radius: 99px; cursor: pointer; color: var(--ink-3, #555); background: #fff; border: 1.5px solid var(--line); white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.tw-due .tw-done-btn svg { width: 12px; height: 12px; }
.tw-due .tw-done-btn:hover { border-color: var(--ink-4); color: var(--ink); }
.tw-due .tw-done-btn.is-done { background: var(--ink-4); border-color: var(--ink-4); color: #fff; }
.tw-due .tw-done-btn.is-done:hover { background: var(--ink-3, #555); }
.thisweek-head .tw-range { font-size: 13px; font-weight: 650; color: var(--ink-4); margin-left: 4px; }
.tw-empty { font-size: 12.5px; color: var(--ink-4); text-align:center; padding: 24px 0; border: 1px dashed var(--line); border-radius: var(--r-sm); }
@media (max-width: 880px){ .proc-flow { flex-direction: column; } .proc-arrow { transform: rotate(90deg); margin: 0 auto; } .thisweek-grid { grid-template-columns: 1fr; } }

/* ===== Weekly strip (top of episode page) ===== */
.weekly-strip { margin-bottom: 18px; overflow: hidden; }
.ws-hd { display:flex; align-items:center; justify-content:space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.ws-title { display:flex; align-items:center; gap: 9px; font-size: 13.5px; font-weight: 750; }
.ws-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; }
.ws-ic svg { width: 15px; height: 15px; }
.ws-table { font-size: 11.5px; }
.ws-table th { padding: 7px 8px; }
.ws-table td { padding: 6px 8px; }
.ws-table .cal-cell { font-size: 11px; padding: 5px 7px; }

/* ===== Monthly CTA (process·calendar page) ===== */
.subtab-seg { margin-bottom: 4px; }
.monthly-cta {
  display:flex; align-items:center; justify-content:space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--surface) 55%, var(--accent-50));
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; margin-top: 8px;
}
.monthly-cta .mc-t { font-size: 15px; font-weight: 750; display:flex; align-items:center; gap: 8px; }
.monthly-cta .mc-d { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

/* ============================================================
   CALENDAR
   ============================================================ */
.cal-legend { display:flex; gap: 18px; margin: 0 0 18px; flex-wrap:wrap; }
.leg-item { display:flex; align-items:center; gap: 7px; font-size: 12px; color: var(--ink-2); font-weight:550; }
.leg-dot { width: 11px; height:11px; border-radius: 50%; }
.cal-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 16px; }
.cal-box-hd { background: var(--surface-2); padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; display:flex; align-items:center; justify-content:space-between; }
.cal-box-hd .cur-wk { font-size: 11px; font-weight: 750; color: var(--accent); display:flex; align-items:center; gap:5px; }
.cal-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.cal-table th { background: var(--surface-2); padding: 9px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 700; color: var(--ink-2); text-align:center; white-space: nowrap; }
.cal-table th:first-child { width: 54px; }
.cal-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; line-height: 1.45; color: var(--ink-2); }
.cal-table tr:last-child td { border-bottom: none; }
.cal-table td.lbl { font-weight: 750; text-align:center; vertical-align: middle; }
.cal-table .row-cnx td.lbl { background: var(--cnx-blue-50); color: var(--cnx-blue); }
.cal-table .row-lge td.lbl { background: var(--lg-red-50); color: var(--lg-red); }
.cal-table .row-pub td.lbl { background: var(--pub-green-50); color: var(--pub-green-700); }
.cal-cell { border-radius: 6px; padding: 6px 8px; font-size: 11.5px; font-weight: 600; line-height:1.35; display:block; }
.row-cnx .cal-cell.has { background: var(--cnx-blue-50); color: var(--cnx-blue-700); }
.row-lge .cal-cell.has { background: var(--lg-red-50); color: var(--lg-red-700); }
.row-pub .cal-cell.has { background: var(--pub-green-50); color: var(--pub-green-700); }
.cal-cell.empty { color: var(--line-2); text-align:center; }
.cal-cell.holiday { color: var(--lg-red); font-weight: 700; text-align:center; font-size: 11px; }
.cal-table td.editable-cell { cursor: pointer; }
.cal-table td.editable-cell:hover { background: var(--surface-2); }

/* ============================================================
   AUDIT + USERS tables
   ============================================================ */
.toolbar { display:flex; align-items:center; gap: 10px; margin-bottom: 16px; flex-wrap:wrap; }
.search-box { display:flex; align-items:center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 12px; min-width: 230px; }
.search-box svg { width: 16px; height:16px; color: var(--ink-4); flex-shrink:0; }
.search-box input { border:none; outline:none; background:none; flex:1; }
.select-sm { padding: 8px 11px; border:1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-size: 13px; font-weight: 550; }

.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align:left; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 750; color: var(--ink-3); letter-spacing:.03em; text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .actor { display:flex; align-items:center; gap: 9px; }
.tbl .actor .nm { font-weight: 700; color: var(--ink); }
.action-chip { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 6px; letter-spacing:.02em; }
.ac-create { background: var(--pub-green-50); color: var(--pub-green-700); }
.ac-update { background: var(--cnx-blue-50); color: var(--cnx-blue); }
.ac-delete { background: var(--lg-red-50); color: var(--lg-red); }
.ac-submit { background: #f3edfd; color: #7c3aed; }
.ac-status { background: var(--amber-50); color: var(--amber); }
.ac-todo-complete { background: var(--pub-green-50); color: var(--pub-green-700); }
.ac-todo-uncomplete { background: #f1f3f5; color: var(--ink-3, #555); }
.diff { font-size: 12px; display:flex; align-items:center; gap: 7px; flex-wrap:wrap; }
.diff .before { color: var(--ink-4); text-decoration: line-through; }
.diff .after { color: var(--ink); font-weight: 650; }
.diff svg { width: 13px; height:13px; color: var(--ink-4); }

.pager { display:flex; align-items:center; justify-content:space-between; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.pager .pgs { display:flex; gap: 4px; }
.pager .pgs button { width: 30px; height:30px; border-radius: var(--r-xs); font-weight: 650; color: var(--ink-2); }
.pager .pgs button:hover { background: var(--surface-2); }
.pager .pgs button.on { background: var(--accent); color:#fff; }
.pager .pgs button:disabled { color: var(--line-2); cursor:not-allowed; }

.status-dot-row { display:flex; align-items:center; gap:7px; }
.status-dot { width: 8px; height:8px; border-radius:50%; }
.status-dot.on { background: var(--pub-green); }
.status-dot.off { background: var(--ink-4); }

/* mobile sidebar */
.mobile-bar { display:none; }
@media (max-width: 760px){
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top:0; bottom:0; width: 264px; z-index: 90; transform: translateX(-100%); transition: transform .22s var(--ease); box-shadow: var(--sh-lg); }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset:0; background: rgba(0,0,0,.4); z-index: 80; }
  .mobile-bar { display:flex; }
  .page-wrap { padding: 22px 16px 70px; }
  .stat-strip { grid-template-columns: repeat(2,1fr); }
  .fgrid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
}

.hide-mobile { }
@media (max-width: 760px){ .hide-mobile { display:none !important; } }

/* utility */
.muted { color: var(--ink-3); }
.flex { display:flex; }
.between { justify-content: space-between; }
.center { align-items:center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8{margin-top:8px;} .mt16{margin-top:16px;} .mt24{margin-top:24px;}
.wrap-flex { flex-wrap: wrap; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.week-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.week-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; line-height: 1.15; transition: border-color .12s, background .12s; }
.week-chip:hover { border-color: var(--accent); }
.week-chip .wc-no { font-size: 13px; font-weight: 700; color: var(--ink); }
.week-chip .wc-range { font-size: 11px; color: var(--ink-3); }
.week-chip.on { border-color: var(--accent); background: var(--accent); }

/* ── 운영 Overview ── */
/* 사이클 바(L1) — 자체 줄, 원래 크기, 활성 표시는 탭처럼 차분하게(흰 배경+옅은 그림자) */
.ov-cyclebar { display: flex; width: fit-content; gap: 2px; background: var(--slate-50); border-radius: var(--r-sm); padding: 3px; margin-bottom: 14px; }
.ov-cyclebtn { font-size: 15px; font-weight: 700; padding: 8px 16px; border-radius: var(--r-xs); color: var(--ink-3); background: none; border: none; cursor: pointer; transition: color .14s, background .14s; }
.ov-cyclebtn:hover { color: var(--ink); }
.ov-cyclebtn.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.ov-context { padding: 28px 28px 24px; }
.ov-title-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ov-month { font-size: 27px; font-weight: 800; margin: 0; }
.ov-meta { color: #6b7280; font-size: 14px; display: flex; gap: 7px; align-items: baseline; }
.ov-progress { height: 6px; background: #eef0f3; border-radius: 99px; margin: 14px 0 20px; overflow: hidden; }
.ov-progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.ov-steps { display: flex; gap: 14px; padding: 22px 0 14px; margin-top: 14px; }
.ov-step { flex: 1; text-align: center; position: relative; }
/* 단계 노드를 잇는 진행선(하나의 제작 과정). 점 중심(상단 22px+점 반지름 23px)에 맞춰 다음 점까지 연결, gap(14px) 보정 */
.ov-step:not(:last-child)::after { content: ''; position: absolute; top: 21.5px; left: 50%; width: calc(100% + 14px); height: 3px; background: #e5e7eb; z-index: 0; }
.ov-step.ov-done::after { background: #2563eb; } /* 완료된 단계 뒤 선은 파랑 */
.ov-step-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 99px; background: #e5e7eb; color: #9ca3af; font-weight: 800; font-size: 19px; }
.ov-step-dot svg { width: 22px; height: 22px; }
.ov-done .ov-step-dot { background: #2563eb; color: #fff; }
.ov-current .ov-step-dot { background: #2563eb; color: #fff; box-shadow: 0 0 0 6px #dbeafe; }
.ov-upcoming .ov-step-dot { background: #e5e7eb; color: #9ca3af; }
.ov-step-label { font-size: 16px; font-weight: 700; color: #1f2937; margin-top: 12px; }
.ov-step-label em { color: #9ca3af; font-style: normal; font-weight: 400; }
.ov-step-date { font-size: 13.5px; color: #6b7280; font-weight: 600; margin-top: 4px; }
.ov-legend { display: flex; gap: 16px; align-items: center; font-size: 12.5px; color: #6b7280; margin-top: 22px; }
.ov-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 4px; }
.ov-legend .lg-current { background: #2563eb; } .ov-legend .lg-upcoming { background: #cbd5e1; } .ov-legend .lg-done { background: #93c5fd; }
.ov-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .ov-cols { grid-template-columns: 1fr; } }
.ov-col { padding: 18px 20px; }
.ov-col-h { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #eef0f3; margin-bottom: 8px; }
.ov-col-h h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.ov-col-h small { display: block; margin-top: 3px; color: #9ca3af; font-size: 12px; letter-spacing: .01em; }
.ov-item { display: flex; gap: 10px; padding: 12px 4px; border-bottom: 1px solid #f3f4f6; }
.ov-item.urgent { border: 1px solid var(--lg-red); border-radius: 10px; padding: 12px; }
.ov-item.done { opacity: .55; }
.ov-check { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #d1d5db; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ov-check.on { background: #2563eb; border-color: #2563eb; color: #fff; } .ov-check svg { width: 14px; height: 14px; }
.ov-check:disabled { cursor: not-allowed; opacity: .6; }
.ov-item-body { flex: 1; } .ov-item-top { display: flex; justify-content: space-between; align-items: baseline; }
.ov-item-top b { font-size: 14px; } .ov-dday { color: var(--lg-red); font-weight: 700; font-size: 12px; }
.ov-item-sub { display: flex; justify-content: space-between; color: #9ca3af; font-size: 12px; margin-top: 2px; }
/* 프로세스 관리 */
.pa-month { font-weight: 700; font-size: 13px; color: #374151; margin: 8px 0; }
.pa-step-h { font-size: 12.5px; font-weight: 600; color: #6b7280; margin: 8px 0 4px; } .pa-step-h em { font-weight: 400; color: #9ca3af; font-style: normal; }
.pa-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 13px; }
.pa-row.done { opacity: .55; } .pa-task { flex: 1; } .pa-date { color: #9ca3af; font-size: 12px; }
.week-chip.on .wc-no, .week-chip.on .wc-range { color: #fff; }

/* v2 Overview */
.ov-wrap { }
.pa-step { margin-bottom: 10px; }
.ov-lge { margin-top: 18px; padding: 18px 22px; }
.ov-pub { margin-top: 16px; padding: 18px 22px; }
.ov-list { display: block; }
/* STEP별 구분 그룹 */
.ov-group + .ov-group { margin-top: 22px; }
.ov-group-h { font-size: 18px; font-weight: 800; color: #111827; letter-spacing: -0.01em; padding: 8px 0 10px; border-bottom: 2px solid #e5e7eb; margin-bottom: 8px; }
/* 행(리스트) */
.ov-row { display: flex; align-items: center; gap: 10px; padding: 17px 12px; border-bottom: 1px solid #f3f4f6; }
.ov-row.hl1 { background: var(--slate-50); border-left: 3px solid var(--ink-3); border-radius: 0 8px 8px 0; }
.ov-row.hl2 { background: var(--accent-50); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
.ov-row.done { opacity: .65; background: #eceef1; }
.ov-row-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
/* 시작~종료일: L4(제목) 급 검은색 글씨 */
.ov-row-date { flex: 0 0 auto; margin-right: 10px; font-size: 14px; font-weight: 600; color: #1f2937; white-space: nowrap; }
/* 우상단 작은 체크박스 */
.ov-check-tr { flex: 0 0 auto; margin-top: 2px; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #d1d5db; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ov-check-tr.on { background: #2563eb; border-color: #2563eb; color: #fff; } .ov-check-tr svg { width: 13px; height: 13px; } .ov-check-tr:disabled { cursor: not-allowed; opacity: .5; }
.ov-dday { display: inline-block; flex: 0 0 auto; font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: #f3f4f6; color: #4b5563; }
.ov-dday.active { background: var(--slate-50); color: var(--ink-2); }
.ov-dday.d0 { background: var(--lg-red); color: #fff; }
.ov-dday.overdue { background: #b91c1c; color: #fff; }
.ov-dday.done { background: #eef0f3; color: #9ca3af; }
/* 받을 것 (CNX 제공) 매핑 행 */
.ov-recv { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 10px; background: #f9fafb; border-radius: 8px; }
.ov-recv-tag { font-size: 10.5px; font-weight: 700; color: #fff; background: #6b7280; border-radius: 6px; padding: 2px 7px; flex: 0 0 auto; }
.ov-recv-task { font-size: 13px; color: #374151; flex: 1; min-width: 0; } .ov-recv-date { font-size: 12px; color: #9ca3af; flex: 0 0 auto; }
/* v2 날짜 D-day 중심 + 현재 단계 안내 */
.ov-nextdue { font-size: 13px; color: #374151; } .ov-nextdue b { color: var(--lg-red); }
.ov-nowstep { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; background: var(--lg-red-50); border: 1px solid var(--lg-red-100); border-radius: 12px; }
.ov-nowstep-tag { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--lg-red); border-radius: 6px; padding: 3px 9px; }
.ov-nowstep-body { font-size: 13.5px; color: #1e3a5f; } .ov-nowstep-body b { font-weight: 800; }
.ov-nowstep-hint { color: #475569; }
.ov-dday { white-space: nowrap; min-width: 52px; text-align: center; }
.ov-period { font-size: 13.5px; color: #374151; font-weight: 600; }
/* LGE 그룹 진행 마커 */
.ov-group-h { display: flex; align-items: center; gap: 8px; }
.ov-gmark { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 7px; letter-spacing: 0; }
/* L1(사이클)·L2(월) 탭 라벨 옆 인라인 연두 점 — 하위에 기한 도래/지난 미완료 항목이 있을 때 */
.ov-attn-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--attn); box-shadow: 0 0 0 2px var(--attn-50); margin-left: 7px; vertical-align: middle; }
.ov-gmark-done { background: #dbeafe; color: #2563eb; }
.ov-gmark-current { background: var(--lg-red); color: #fff; }
.ov-gmark-upcoming { background: #f3f4f6; color: #9ca3af; }

/* ── WBS 월별 캘린더 ── */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { font-size: 18px; font-weight: 700; min-width: 120px; text-align: center; }
.cal-today-btn { border: 1px solid var(--line, #e0e0e0); background: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.cal-filters { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cal-drill { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-drill-sel { padding: 5px 9px; font-size: 12px; }
.cal-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line, #e0e0e0); background: #fff; color: var(--ink-2, #607d8b); border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; opacity: .5; }
.cal-chip.on { opacity: 1; font-weight: 600; }
.cal-chip .cal-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
/* Role colours: bars get background-color; chips get text color (dot uses currentColor) */
/* 막대는 역할색 옅은 채색 + 진한 역할색 글씨 — [월]·작업명 동일 색/굵기(강조 없음) */
.cal-bar.cal-bar-cnx { background-color: #eaedf8; color: #000; }
.cal-bar.cal-bar-lge { background-color: var(--lg-red-50, #fdf0f2); color: #000; }
.cal-chip.cal-bar-cnx { color: #3f51b5; }
.cal-chip.cal-bar-lge { color: var(--lg-red, #c2185b); }

.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); } /* 월~금 (주말 미표시) */
.cal-head { border-bottom: 1px solid var(--line, #e0e0e0); background: var(--surface, #fff); }
.cal-hcell { text-align: center; font-size: 13px; font-weight: 600; padding: 8px 0; color: var(--ink-2, #607d8b); }
.cal-week { border-bottom: 1px solid var(--ink-4, #aeb4bd); background: var(--surface, #fff); }
.cal-dcell { min-height: 32px; border-left: 1px solid #f5f5f5; padding: 5px 6px 2px; }
.cal-dcell:first-child { border-left: 0; }
.cal-dcell.out .cal-dnum { color: #cfd8dc; }
/* Today = 배경 채움 없이 숫자 둘레 테두리만 하이라이트(타원) */
.cal-dcell.today { background: transparent; }
.cal-dcell.today .cal-dnum { color: #1565c0; font-weight: 800; border: 1.5px solid #2196f3; border-radius: 999px; padding: 0 5px; }
.cal-dnum { display: inline-block; font-size: 13.5px; font-weight: 650; line-height: 1.5; color: var(--ink); }

/* 공휴일 = 저강도 표기: 배경·테두리 없이 숫자만 빨강 + 아래 작은 공휴일명 라벨.
   주말 숫자와 같은 빨강 톤이라 '쉬는 날' 의미만 전달하고, LGE 막대와도 안 겹친다. */
.cal-dcell.hol .cal-dnum { color: #c0392b; }
.cal-holname { display: block; margin-top: 1px; font-size: 9.5px; font-weight: 600; line-height: 1.1; color: #bf6b74; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-bars { position: relative; min-height: 18px; margin: 0 0 4px; overflow: hidden; }
.cal-bar { position: absolute; height: 23px; line-height: 23px; font-size: 12px; font-weight: 600; color: var(--ink); border-radius: 5px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; cursor: pointer; text-align: left; }
.cal-bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-more { position: absolute; font-size: 11px; color: var(--ink-2, #607d8b); }

.cal-empty-note { padding: 10px 12px; margin-bottom: 8px; background: #fff7e6; border: 1px solid #ffe0a3; border-radius: 6px; color: #8a6d3b; font-size: 13px; }

.cal-detail { display: grid; gap: 8px; }
.cal-detail > div { display: flex; gap: 12px; }
.cal-detail > div > b { width: 48px; color: var(--ink-2, #607d8b); font-weight: 600; }
