/* 큐레이션관 현황판
 *
 * 색 규칙: 색이 채워진 면 위의 글자는 전부 -deep 계열 배경 + 흰 글자로 간다.
 * 밝은 원색 배경에 흰 글자를 올리면 2:1 대비가 나와 못 읽는다(todo_web 에서 겪은 것).
 * verify_contrast.mjs 가 이 파일을 파싱해 WCAG AA(4.5:1)를 강제한다 — 밝게 되돌리지 마라.
 */

:root {
  --bg:        #f6f7f9;
  --surface:   #ffffff;
  --line:      #e3e6ea;
  --line2:     #cbd2da;

  --text:      #14181d;   /* on --surface : 15.8:1 */
  --text2:     #3d4652;   /* on --surface :  9.4:1 */
  --text3:     #5f6b7a;   /* on --surface :  5.4:1 — 이보다 밝게 하지 말 것 */

  --accent:    #1c4ed8;
  --accent-bg: #eef2ff;

  --danger:      #b42318;  /* on --surface : 6.4:1 */
  --danger-bg:   #fef3f2;
  --warn:        #92400e;  /* on --surface : 6.6:1 */
  --warn-bg:     #fffaeb;
  --ok:          #027a48;  /* on --surface : 5.0:1 */
  --ok-bg:       #ecfdf3;

  /* 상태 바 — 전부 흰 글자를 얹으므로 deep 계열만 쓴다 */
  --s1: #64748b;  /* 부킹요청  4.8:1 vs white */
  --s2: #b45309;  /* 소재대기  4.6:1 */
  --s3: #7c3aed;  /* 검수요청  5.6:1 */
  --s3r:#b42318;  /* 검수반려  6.4:1 */
  --s4: #1d4ed8;  /* 세팅완료  6.3:1 */
  --s5: #047857;  /* 라이브    4.8:1 */
  --s7: #475569;  /* 종료      7.0:1 */

  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo",
        "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── 상단 ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.mark { font-size: 26px; color: var(--accent); }
.topbar h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.sub { margin: 1px 0 0; font-size: 12.5px; color: var(--text3); }
.who { font-size: 12.5px; color: var(--text2); text-align: right; line-height: 1.5; }
.who .role {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px;
  font-weight: 700; background: var(--accent-bg); color: var(--accent);
}
.who .role.partner { background: #fff5ed; color: #9a3412; }

/* ── 탭 ───────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.tab {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 11px 15px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

main { max-width: 1180px; margin: 0 auto; padding: 22px 24px 64px; }
.h { font-size: 14px; font-weight: 700; margin: 26px 0 10px; letter-spacing: -.01em; }
.h:first-child { margin-top: 0; }
.note { font-size: 12.5px; color: var(--text3); margin: 0 0 12px; }

.banner {
  padding: 12px 14px; border-radius: var(--radius); margin-bottom: 18px;
  background: var(--danger-bg); color: var(--danger); border: 1px solid #fecdc9;
  font-size: 13.5px;
}
.banner.info { background: var(--accent-bg); color: var(--accent); border-color: #c7d2fe; }

/* ── 요약 타일 ────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px;
}
.stat b { display: block; font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.stat span { font-size: 12px; color: var(--text3); }
.stat.danger b { color: var(--danger); }
.stat.warn b   { color: var(--warn); }

/* ── 카드 · 알림 ──────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px; margin-bottom: 8px;
}
.alert { display: flex; gap: 12px; align-items: flex-start; border-left: 3px solid var(--line2); }
.alert.danger { border-left-color: var(--danger); background: var(--danger-bg); }
.alert.warn   { border-left-color: var(--warn);   background: var(--warn-bg); }
.alert .lv {
  flex: none; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  background: var(--danger); color: #fff;
}
.alert.warn .lv { background: var(--warn); }
.alert .body { flex: 1; min-width: 0; }
.alert .body b { font-size: 13.5px; }
.alert .body p { margin: 2px 0 0; font-size: 13px; color: var(--text2); }
.alert .meta { font-size: 11.5px; color: var(--text3); margin-top: 3px; }

.empty {
  padding: 26px; text-align: center; color: var(--text3); font-size: 13.5px;
  background: var(--surface); border: 1px dashed var(--line2); border-radius: var(--radius);
}

/* ── 상태 배지 ────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; color: #fff; white-space: nowrap;
}
.b1 { background: var(--s1); } .b2 { background: var(--s2); } .b3 { background: var(--s3); }
.b3r{ background: var(--s3r);} .b4 { background: var(--s4); } .b5 { background: var(--s5); }
.b7 { background: var(--s7); }

.id { font-family: var(--mono); font-size: 12px; color: var(--text3); }

/* ── 목록 ─────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.filters label { font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.filters select, .filters input[type=search] {
  font: inherit; font-size: 13px; padding: 6px 9px;
  border: 1px solid var(--line2); border-radius: 7px; background: var(--surface); color: var(--text);
}
.filters input[type=search] { min-width: 200px; }
.filters .chk { gap: 5px; }

.row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.row .title { font-weight: 700; font-size: 14.5px; }
.row .line { font-size: 12.5px; color: var(--text2); margin-top: 3px; }
.row .line.warnish { color: var(--warn); font-weight: 600; }
.row .line.dangerish { color: var(--danger); font-weight: 600; }
.row .right { text-align: right; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.card.is-cancelled { opacity: .55; }
.card.is-cancelled .title { text-decoration: line-through; }

.slack {
  font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.slack:hover { text-decoration: underline; }

.kv { font-size: 12.5px; color: var(--text2); margin-top: 6px; }
.kv b { color: var(--text); font-weight: 600; }

/* ── 타임라인 ─────────────────────────────────────── */
.tl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
#timeline { min-width: 900px; padding: 14px 16px 18px; }
.tl-axis { position: relative; height: 20px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tl-mon {
  position: absolute; top: 0; font-size: 11.5px; color: var(--text3);
  border-left: 1px solid var(--line); padding-left: 5px; height: 20px;
}
.tl-row { position: relative; height: 30px; margin-bottom: 5px; }
.tl-row::before {
  content: ""; position: absolute; inset: 12px 0 auto; height: 1px; background: var(--line);
}
.tl-bar {
  position: absolute; top: 2px; height: 25px; border-radius: 6px; color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 25px; padding: 0 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 3; }
.tl-today span {
  position: absolute; top: -18px; left: -14px; font-size: 10.5px; font-weight: 700;
  color: var(--danger); background: var(--surface); padding: 0 3px;
}

/* ── 안내 ─────────────────────────────────────────── */
.guide { max-width: 820px; }
.guide h2 { font-size: 17px; margin: 32px 0 10px; letter-spacing: -.01em; }
.guide h2:first-child { margin-top: 0; }
.guide h3 { font-size: 14px; margin: 20px 0 7px; }
.guide p, .guide li { font-size: 14px; color: var(--text2); }
.guide li { margin-bottom: 4px; }
.guide code {
  font-family: var(--mono); font-size: 12.5px; background: #eef1f4;
  padding: 1.5px 5px; border-radius: 4px; color: #1a1f26;
}
.guide table { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 13px; }
.guide th, .guide td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide th { font-size: 12px; color: var(--text3); font-weight: 700; background: #f9fafb; }
.guide td b { font-weight: 700; color: var(--text); }

.box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin: 12px 0;
}
.box.accent { background: var(--accent-bg); border-color: #c7d2fe; }
.box.warnbox { background: var(--warn-bg); border-color: #fde68a; }

.steps { display: flex; gap: 10px; margin: 14px 0; }
.step {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 13px;
}
.step .n {
  display: inline-flex; width: 21px; height: 21px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  align-items: center; justify-content: center; margin-bottom: 7px;
}
.step b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.step p { margin: 0; font-size: 12.5px; color: var(--text3); line-height: 1.5; }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 14px 0 18px; }
.flow .node { display: inline-block; }
.flow .arrow { color: var(--text3); font-size: 13px; }

@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .who { text-align: left; }
  .tabs { overflow-x: auto; }
  .steps { flex-direction: column; }
  main { padding: 18px 16px 56px; }
}
