/* ── 디자인 토큰 ────────────────────────────────────────────────────
   시리즈 색은 화면에서 뽑은 보라·파랑·민트·앰버 계열을 유지하되,
   대비/색맹 검사(validate_palette.js)를 통과하는 단계로 맞춘 값이다. */
:root {
  --purple:        #6C3BF4;
  --purple-600:    #5B2BE0;
  --purple-100:    #EFEAFE;
  --purple-050:    #F6F3FF;
  --strip:         #E9E7FB;

  --s1: #6C3BF4;  --s2: #2B86DB;  --s3: #0E9C85;
  --s4: #C97F00;  --s5: #D62A57;

  --up:   #12B76A;
  --down: #F0426B;

  --page:      #F4F4F8;
  --card:      #FFFFFF;
  --rail:      #FFFFFF;
  --ink:       #16161D;
  --ink-2:     #4A4A5A;
  --muted:     #8A8A9C;
  --muted-2:   #A5A5B5;
  --line:      #ECECF2;
  --line-soft: #F2F2F7;
  --chip:      #F3F3F8;

  --shadow-card: 0 4px 18px rgba(22, 22, 60, .05);
  --shadow-pill: 0 2px 8px rgba(22, 22, 60, .04);
  --shadow-rail: 2px 0 14px rgba(22, 22, 60, .04);
  --r-card: 20px;
  --r-pill: 14px;
  --rail-w: 92px;
  --strip-h: 30px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── 상단 띠 ─────────────────────────────────────────────────────── */
.topstrip {
  position: fixed; inset: 0 0 auto 0; height: var(--strip-h); z-index: 30;
  background: var(--strip);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 22px; gap: 14px;
  font-size: 12px; color: #7B76A8;
}
.topstrip button {
  border: 0; background: none; cursor: pointer;
  font-size: 12px; color: #6A64A0; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.topstrip button:hover { color: var(--purple); }
.topstrip button { white-space: nowrap; }
/* 폼 안의 버튼을 글자 링크처럼 보이게 (로그아웃 등 POST 가 필요한 동작) */
button.linklike { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
button.linklike:hover { color: var(--purple); }
.topstrip button svg {
  width: 14px; height: 14px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.topstrip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.topstrip .dot.stale { background: #C9C5E4; }

/* ── 사이드바 (아이콘 레일) ──────────────────────────────────────── */
.rail {
  position: fixed; top: var(--strip-h); bottom: 0; left: 0; width: var(--rail-w);
  background: var(--rail); box-shadow: var(--shadow-rail); z-index: 20;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 16px;
}
.rail .brand {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(140deg, #7A4BFF, #5B2BE0);
  display: grid; place-items: center; margin-bottom: 26px;
  box-shadow: 0 6px 14px rgba(108, 59, 244, .3);
}
.rail .brand svg { width: 26px; height: 26px; stroke: #fff; }

.rail nav { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.rail .spacer { flex: 1; }

.navitem { display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.navitem .tile {
  width: 54px; height: 54px; border-radius: 17px;
  background: var(--chip); display: grid; place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.navitem .tile svg { width: 24px; height: 24px; stroke: #9B9BAC; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.navitem span { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: -.2px; }
.navitem:hover .tile { background: var(--purple-100); transform: translateY(-1px); }
.navitem:hover .tile svg { stroke: var(--purple); }

.navitem.active .tile { background: var(--purple); box-shadow: 0 6px 14px rgba(108, 59, 244, .28); }
.navitem.active .tile svg { stroke: #fff; }
.navitem.active span { color: var(--ink); font-weight: 700; }

.badge {
  position: absolute; top: -6px; right: 8px; min-width: 20px; height: 20px;
  border-radius: 10px; padding: 0 6px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--down);
  border: 2px solid #fff;
}
.badge.purple { background: var(--purple); }

/* ── 레이아웃 ────────────────────────────────────────────────────── */
.shell { margin-left: var(--rail-w); padding-top: var(--strip-h); }
.content { padding: 30px 40px 56px; }

.pagehead {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.pagehead h1 { font-size: 27px; font-weight: 800; margin: 0; letter-spacing: -.6px; }
.helplink {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--purple); font-size: 14px; font-weight: 700; cursor: pointer;
}
.helplink .q {
  width: 19px; height: 19px; border-radius: 50%; border: 1.6px solid #C9BDF7;
  display: grid; place-items: center; font-size: 11px; color: #A896F0;
}
.pagehead .grow { flex: 1; }

/* 상단 우측 컨트롤 */
.pill {
  height: 54px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-pill); box-shadow: var(--shadow-pill);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0 16px; cursor: pointer; position: relative;
}
.pill .ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--purple);
  display: grid; place-items: center;
}
.pill .ico svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2.1; stroke-linecap: round; }
.pill .ico.ghost { background: none; }
.pill .ico.ghost svg { stroke: var(--purple); stroke-width: 1.9; }
.pill .label { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pill .label small { color: var(--muted); font-weight: 500; font-size: 13px; }
.pill .chev { margin-left: 10px; color: var(--muted-2); display: grid; place-items: center; }
.pill .chev svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.pill:hover { border-color: #DCD6F8; }

.dropdown {
  position: absolute; top: 60px; right: 0; min-width: 280px; z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(22, 22, 60, .12); padding: 10px; display: none;
}
.dropdown.open { display: block; }
.dropdown label {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; font-size: 14px; cursor: pointer; color: var(--ink-2);
}
.dropdown label:hover { background: var(--purple-050); }
.dropdown .sep { height: 1px; background: var(--line-soft); margin: 8px 4px; }
.dropdown input[type="date"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-family: inherit; font-size: 14px; width: 100%;
}
.dropdown .row { display: flex; gap: 8px; padding: 6px 8px; }
.preset { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 10px; }
.preset button {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 7px 11px; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.preset button:hover { border-color: var(--purple); color: var(--purple); }

/* ── 카드 ────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); padding: 26px 30px 28px;
}
.card + .card { margin-top: 22px; }
/* 그리드 안에서는 gap 이 간격을 담당한다. 여기에 margin 이 붙으면
   2번째 카드부터 아래로 밀려 윗줄이 어긋난다. */
.grid-2 > .card + .card,
.grid-3 > .card + .card,
.grid-4 > .card + .card { margin-top: 0; }
.card-title {
  font-size: 17px; font-weight: 700; color: #7A7A8C; margin: 0 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .arrow { color: var(--muted-2); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; }
.card-actions { display: flex; align-items: center; gap: 14px; color: var(--muted-2); }
.card-actions svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; cursor: pointer; }
.card-actions svg:hover { stroke: var(--purple); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
@media (max-width: 1200px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .content { padding: 22px 18px 40px; }
}

/* KPI 카드 */
.kpi .value {
  font-size: 29px; font-weight: 800; letter-spacing: -1px; margin: 10px 0 0;
  display: flex; align-items: baseline; gap: 10px;
}
.kpi .value .won { font-size: 25px; font-weight: 700; }
/* 증감률은 카드 오른쪽 끝에 붙는다. 실제 flex 자식은 JS가 채우는 래퍼 span 이므로
   래퍼에 auto 마진을 건다. */
.kpi .value > span[id$="Delta"] { margin-left: auto; }
.kpi .delta { font-size: 17px; font-weight: 700; }
.kpi .delta.up { color: var(--up); }
.kpi .delta.down { color: var(--down); }
.kpi .delta.flat { color: var(--muted-2); }
.kpi .sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.kpi .spark { height: 92px; margin-top: 12px; }
.kpi .divider { height: 1px; background: var(--line-soft); margin: 16px 0 0; }

/* 목표 카드 */
.goal-row { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.goal-row .big { font-size: 29px; font-weight: 800; letter-spacing: -1px; }
.goal-row .cmp { font-size: 15px; color: var(--muted); }
.goal-row .cmp b { font-size: 16px; }
.goal-row .cmp b.up { color: var(--up); }
.goal-row .cmp b.down { color: var(--down); }

/* 범례 */
.legend { display: flex; flex-direction: column; gap: 11px; }
.legend.h { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.legend .item { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #6F6F80; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.chartwrap { display: grid; grid-template-columns: 1fr 190px 1fr 190px; gap: 10px; align-items: center; }
@media (max-width: 1280px) {
  .chartwrap { grid-template-columns: 1fr 170px; row-gap: 26px; }
}
.chart { width: 100%; height: 400px; }
.chart.donut { height: 400px; }

/* ── 표 ──────────────────────────────────────────────────────────── */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: #FBFBFD;
}
table.tbl td {
  padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2);
  white-space: nowrap;
}
table.tbl tr:hover td { background: #FAFAFE; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.strong { color: var(--ink); font-weight: 700; }
.tbl-scroll { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 8px; font-size: 12.5px; font-weight: 700;
}
.tag.ok { background: #E7F8F0; color: #0B8A5A; }
.tag.off { background: #FDECEF; color: #C32448; }
.tag.info { background: var(--purple-100); color: var(--purple-600); }
.tag.neutral { background: var(--chip); color: var(--muted); }
.tag.off-soft { background: #F1F1F5; color: #6F6F80; }   /* 꺼진 소재 — 경고색이 아니라 회색 */
.tag.warn { background: #FFF3D6; color: #8A6100; }

/* 브리핑 날짜 이동 */
.daynav { display: inline-flex; align-items: center; gap: 6px; }
.daynav input[type="date"] { height: 34px; padding: 0 8px; }
.daynav button {
  width: 30px; height: 34px; border: 1px solid var(--line); background: #fff;
  border-radius: 9px; cursor: pointer; color: var(--ink-2); font-size: 17px; line-height: 1;
}
.daynav button:hover { border-color: var(--purple); color: var(--purple); }
.daynav button[disabled] { opacity: .4; cursor: not-allowed; }

/* 손익 등급 — 모양은 기존 태그 그대로, 색만 단계별로 */
.tag.tier1 { background: #FDECEF; color: #C32448; }   /* 적자 */
.tag.tier2 { background: #FFF3D6; color: #8A6100; }   /* 손익분기 */
.tag.tier3 { background: #FFEFE2; color: #A8551B; }   /* 개선필요 */
.tag.tier4 { background: #E7F8F0; color: #0B8A5A; }   /* 양호 */
.tag.tier5 { background: var(--purple-100); color: var(--purple-600); }  /* 우수 */

/* ── 폼 ──────────────────────────────────────────────────────────── */
input[type="text"], input[type="number"], input[type="date"], select, input[type="file"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font-family: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--purple-100); border-color: var(--purple); }
.btn {
  height: 42px; padding: 0 20px; border-radius: 11px; border: 0; cursor: pointer;
  background: var(--purple); color: #fff; font-size: 14.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--purple-600); }
.btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.note {
  background: var(--purple-050); border: 1px solid #E6DEFB; color: #5A4B9B;
  border-radius: 12px; padding: 13px 16px; font-size: 13.5px; line-height: 1.65;
}
.note.warn { background: #FFF8E9; border-color: #F6E3B8; color: #8A6100; }
.note.err { background: #FDECEF; border-color: #F7CBD5; color: #A81D42; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 10px; }

.section-title { font-size: 19px; font-weight: 800; margin: 34px 0 14px; letter-spacing: -.4px; }
.empty {
  padding: 60px 20px; text-align: center; color: var(--muted); font-size: 14.5px;
}
.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, #F2F2F7 25%, #E9E9F2 37%, #F2F2F7 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 10px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ── 이 프로젝트에서 추가한 것들 ─────────────────────────────────── */

/* 본문 블록(카드·그리드)은 순서에 상관없이 같은 간격을 갖는다.
   .card + .card 만으로는 그리드 다음에 오는 카드가 붙어 보였다. */
.content > * + * { margin-top: 22px; }
.content > .grid-2,
.content > .grid-3,
.content > .grid-4 { margin-top: 22px; }

/* 버튼 안 아이콘 — 크기를 안 잡아주면 SVG 가 늘어나 글자를 밀어낸다 */
.btn svg {
  width: 18px; height: 18px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn { white-space: nowrap; }

/* 브리핑 코멘트 — 왼쪽 색 띠로 종류를 구분한다 */
.brief {
  border-left: 3px solid var(--line); background: #FBFBFD; border-radius: 10px;
  padding: 12px 16px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2);
}
.brief b { color: var(--ink); }
.brief.good { border-left-color: var(--up);    background: #F4FCF8; }
.brief.bad  { border-left-color: var(--down);  background: #FEF6F8; }
.brief.warn { border-left-color: #E0A300;      background: #FFFBF0; }
.brief.info { border-left-color: #C9C5E4;      background: #FAFAFD; }

/* 알림이 여러 개면 그 사이만 좁게 */
.note + .note { margin-top: 12px; }

/* 상단 컨트롤 묶음 — 좁은 화면에서 줄이 바뀌어도 오른쪽에 모여 있게 */
.pagehead .controls {
  display: flex; align-items: center; gap: 14px;
  margin-left: auto; flex-wrap: wrap; justify-content: flex-end;
}

/* 카드 헤더의 지표 토글 */
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; }
.segbtn {
  border: 0; background: none; cursor: pointer; padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.segbtn.active { background: #fff; color: var(--purple); box-shadow: var(--shadow-pill); }

/* 정렬 중인 열 표시 */
table.tbl th[data-sort]:hover { color: var(--purple); }
table.tbl th[data-active="desc"]::after { content: " ↓"; color: var(--purple); }
table.tbl th[data-active="asc"]::after { content: " ↑"; color: var(--purple); }

/* 표 안에 들어가는 작은 폼 */
table.tbl form select, table.tbl form input[type="text"] { padding: 6px 9px; font-size: 13px; }

/* 카드 헤더에 검색창이 들어갈 때 줄이 깨지지 않게 */
.card-actions { flex-wrap: wrap; gap: 10px 14px; }
.card-actions input[type="text"], .card-actions input[type="number"] { height: 34px; }

code {
  background: var(--chip); border-radius: 6px; padding: 1px 6px;
  font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: #5A4B9B;
}

/* 담당자 선택 드롭다운 항목 */
.dropdown label { user-select: none; }

/* ── 상세 서랍 ───────────────────────────────────────────────────── */
body.no-scroll { overflow: hidden; }
.drawer-mask {
  position: fixed; inset: 0; background: rgba(22, 22, 60, .28);
  opacity: 0; pointer-events: none; transition: opacity .16s; z-index: 60;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 620px; max-width: 94vw;
  background: var(--card); box-shadow: -8px 0 30px rgba(22, 22, 60, .12);
  transform: translateX(102%); transition: transform .2s ease; z-index: 61;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 22px 26px 16px; border-bottom: 1px solid var(--line-soft);
}
.drawer-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); }
.drawer-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.drawer-head button {
  margin-left: auto; border: 0; background: var(--chip); color: var(--muted);
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 15px;
}
.drawer-head button:hover { background: var(--purple-100); color: var(--purple); }
.drawer-body { overflow: auto; padding: 20px 26px 40px; }
.drawer-body .section-title {
  font-size: 12.5px; font-weight: 700; margin: 24px 0 10px; color: var(--muted); letter-spacing: 0;
}
.drawer-body .section-title:first-child { margin-top: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 620px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-grid .cell {
  background: #FAFAFC; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px;
}
.kpi-grid .cell .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-grid .cell .v {
  font-size: 18px; font-weight: 700; letter-spacing: -.3px; margin-top: 5px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.kpi-grid .cell .d { font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.kpi-grid .cell .d.up { color: var(--up); }
.kpi-grid .cell .d.down { color: var(--down); }
.kpi-grid .cell .d.flat { color: var(--muted-2); }

/* 서랍 안 소재 미리보기 */
.creative-frame {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #F7F7FB; display: flex; justify-content: center;
}
.creative-frame iframe { width: 100%; max-width: 380px; height: 520px; border: 0; display: block; }
.creative-frame img { max-width: 320px; width: 100%; display: block; }
.creative-frame video { max-width: 320px; width: 100%; display: block; background: #000; }
.creative-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px;
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.creative-meta a { color: var(--purple); font-weight: 600; }

/* 영상 구간별 도달률 */
.vsteps {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px;
}
.vsteps .vstep {
  background: #FAFAFC; border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 10px 6px; text-align: center;
}
.vsteps .vstep .k { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.vsteps .vstep .v {
  font-size: 15px; font-weight: 700; margin-top: 4px; letter-spacing: -.2px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.vsteps .vstep .s { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
@media (max-width: 620px) { .vsteps { grid-template-columns: repeat(3, 1fr); } }

/* 설정 > 사용자 권한 표 — 좁은 창에서도 한 줄에 들어가게 */
.users-tbl td { vertical-align: top; }
.users-tbl td .sub { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 2px; }
.users-tbl .stack { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.users-tbl select, .users-tbl input[type="text"], .users-tbl input[type="password"] { height: 34px; font-size: 13px; min-width: 96px; }
.users-tbl .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }


/* ── 인플루언서 시딩 ───────────────────────────────────────────── */
.seed-tbl th, .seed-tbl td { white-space: nowrap; }
.seed-tbl td .sub { color: var(--muted); font-size: 11.5px; font-weight: 500; margin-top: 2px; }
.seed-tbl .sticky-l, .seed-tbl .sticky-l2 { position: sticky; background: #fff; z-index: 2; }
.seed-tbl .sticky-l { left: 0; }
.seed-tbl .sticky-l2 { left: 40px; box-shadow: 4px 0 8px -6px rgba(22, 22, 60, .18); }
.seed-tbl thead .sticky-l, .seed-tbl thead .sticky-l2, .seed-tbl tfoot .sticky-l, .seed-tbl tfoot .sticky-l2 { background: var(--chip); z-index: 3; }
.seed-tbl td.kind { color: var(--muted); font-size: 12px; font-weight: 600; }
.seed-tbl tr.spend-row td { border-bottom: 0; }
.seed-tbl tr.revenue-row td { border-bottom: 1px solid var(--line); }
.seed-tbl tr.spend-row td.month-col { background: #FFFBEA; }      /* 시트의 노란 칸 */
.seed-tbl tr.revenue-row td.month-col { background: #F1FAEC; }    /* 시트의 연두 칸 */
.seed-tbl td.editable { cursor: text; position: relative; min-width: 84px; }
.seed-tbl td.editable:hover { outline: 2px solid var(--purple-100); outline-offset: -2px; }
.seed-tbl td.editable.manual { font-weight: 700; color: var(--purple-600); }
.seed-tbl td.editable .dot { position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); }
.seed-tbl td.editable .cell-input { width: 100%; height: 28px; padding: 0 6px; font-size: 13px; text-align: right; border: 1px solid var(--purple); border-radius: 6px; }
.seed-tbl tfoot td { background: #FAFAFD; font-weight: 600; }
.seed-tbl tr.flash td { animation: seedFlash 1.6s ease-out; }
@keyframes seedFlash { from { background: var(--purple-100); } to { background: transparent; } }
.seed-form { display: flex; flex-direction: column; gap: 10px; }
.seed-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.seed-form input { width: 100%; }
.seed-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 소재 표 — 광고 관리자처럼: 표 안에서 위아래·좌우 스크롤, 머리글은 위에, 소재명은 왼쪽에 고정 */
.ads-scroll {
  overflow: auto; max-height: calc(100vh - 250px); margin: 16px 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: 12px;
}
#adTable { border-collapse: separate; border-spacing: 0; }
#adTable thead th { position: sticky; top: 0; z-index: 3; background: #FBFBFD; }
#adTable th:first-child, #adTable td:first-child {
  position: sticky; left: 0; z-index: 2; background: #fff;
  max-width: 420px; width: 1%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  box-shadow: 4px 0 8px -6px rgba(22, 22, 60, .18);
}
#adTable thead th:first-child { z-index: 4; background: #FBFBFD; }
#adTable tbody tr:hover td:first-child { background: #FAFAFD; }
#adTable td { border-bottom: 1px solid var(--line); }
#adTable td.num, #adTable th.num { white-space: nowrap; }

/* ── 기간 선택 (프리셋 + 두 달 달력) ─────────────────────────── */
.dropdown.datepick { display: none; padding: 0; min-width: 0; width: 760px; overflow: hidden; }
.dropdown.datepick.open { display: flex; }
.dp-presets {
  width: 168px; flex: none; padding: 12px 10px; border-right: 1px solid var(--line-soft);
  background: #FBFBFD; display: flex; flex-direction: column; gap: 0;
}
.dp-presets-title { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 10px 8px; }
.dp-presets button {
  border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: 9px;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.dp-presets button:hover { background: var(--purple-050); }
.dp-presets button.active { background: var(--purple-100); color: var(--purple-600); font-weight: 700; }
.dp-presets-sep { height: 1px; background: var(--line-soft); margin: 4px 6px; }
.dp-main { flex: 1; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.dp-cals { display: flex; align-items: flex-start; gap: 6px; }
.dp-nav {
  border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; color: var(--muted); margin-top: 2px; flex: none;
}
.dp-nav:hover { background: var(--purple-050); color: var(--purple); }
.dp-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-cal { flex: 1; }
.dp-title { text-align: center; font-size: 14px; font-weight: 700; color: var(--ink); padding: 4px 0 10px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px 0; justify-content: center; }
.dp-dow { font-size: 11.5px; color: var(--muted); text-align: center; padding-bottom: 6px; font-weight: 600; }
.dp-day {
  height: 32px; border: 0; background: none; font-size: 13px; color: var(--ink-2); cursor: pointer;
  font-family: inherit; font-variant-numeric: tabular-nums; border-radius: 0;
}
.dp-day:hover { background: var(--purple-050); border-radius: 8px; }
.dp-day.future { color: #D6D6E0; cursor: default; pointer-events: none; }   /* 아직 오지 않은 날 */
.dp-day.today { font-weight: 800; color: var(--purple); }
.dp-day.in { background: var(--purple-100); color: var(--purple-600); }
.dp-day.start, .dp-day.end { background: var(--purple); color: #fff; font-weight: 700; }
.dp-day.start { border-radius: 8px 0 0 8px; }
.dp-day.end { border-radius: 0 8px 8px 0; }
.dp-day.start.end { border-radius: 8px; }
.dp-day.start:hover, .dp-day.end:hover { background: var(--purple-600); border-radius: 8px; }
.dp-foot { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.dp-inputs { display: flex; align-items: center; gap: 8px; }
.dp-inputs input[type="date"] { width: 170px; }
.dp-dash { color: var(--muted); }
.dp-actions { display: flex; align-items: center; gap: 8px; }
.dp-actions .btn { height: 36px; padding: 0 16px; }

/* 소재 표 스크롤바 — 연한 회색 */
.ads-scroll { scrollbar-color: #E3E3EA #FAFAFC; scrollbar-width: thin; }
.ads-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.ads-scroll::-webkit-scrollbar-track { background: #FAFAFC; }
.ads-scroll::-webkit-scrollbar-thumb { background: #E3E3EA; border-radius: 8px; border: 2px solid #FAFAFC; }
.ads-scroll::-webkit-scrollbar-thumb:hover { background: #D3D3DD; }

/* 소재 상세 — 구매가 어느 성별·연령대에서 나왔나 */
.demo-top { display: flex; gap: 10px; margin-bottom: 14px; }
.demo-pick {
  flex: 1; background: #FAFAFC; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px;
}
.demo-pick .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.demo-pick .v { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.3px; margin: 5px 0 3px; }
.demo-pick .s { font-size: 11.5px; color: var(--muted); }
.age-list { display: flex; flex-direction: column; gap: 4px; }
.age-head { display: grid; grid-template-columns: 76px 1fr 72px; font-size: 11.5px; color: var(--muted-2); font-weight: 500; padding: 0 4px 6px; }
.age-head span:last-child { text-align: right; }
.age-row { display: grid; grid-template-columns: 76px 1fr 72px; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.age-row.top .age-k, .age-row.top .age-v { color: var(--ink); font-weight: 600; }
.age-k { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.age-bar { display: flex; align-items: center; gap: 8px; height: 16px; padding-right: 48px; }
.age-bar i { display: block; height: 100%; border-radius: 4px; flex: 0 0 0%; min-width: 2px; background: #DEDEE8; }
.age-row.top .age-bar i { background: var(--purple); }
.age-bar span { font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.age-v { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 담당자 다중 선택 */
.mpick { position: relative; min-width: 160px; }
.mpick-btn {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.mpick-btn .mpick-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpick-btn .chev { color: var(--muted-2); font-size: 12px; }
.mpick-menu {
  display: none; position: absolute; top: 38px; left: 0; z-index: 30; min-width: 200px; max-height: 260px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(22, 22, 60, .12); padding: 6px;
}
.mpick-menu.open { display: block; }
.mpick-menu label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.mpick-menu label:hover { background: var(--purple-050); }
.mpick-menu label small { color: var(--muted); }
