/* ============================================
   Tube Console — Design System
   ============================================ */

/* --- Variables: Light (default) --- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --bg: #f7f7f8; --surface: #fff; --surface-2: #fafafb;
  --border: #e8e8ec; --border-strong: #d8d8dd;
  --text: #18181b; --text-2: #52525b; --text-3: #8a8a93;
  --accent: #4f46e5; --accent-soft: #eef2ff; --accent-text: #4338ca;
  --success: #059669; --success-soft: #ecfdf5;
  --warn: #d97706; --warn-soft: #fffbeb;
  --danger: #dc2626; --danger-soft: #fef2f2;
  --chart-grid: rgba(24,24,27,.06); --chart-text: #52525b;
  --body-size: 14px; --body-line: 1.6;
  --header-title-size: 20px; --section-title-size: 18px; --card-title-size: 16px;
  --table-size: 14px; --control-size: 14px;
  --subtext-size: 13px; --subtext-line: 1.5; --subtext-weight: 400;
  --shadow-sm: 0 1px 2px rgba(24,24,27,.04);
  --shadow: 0 1px 3px rgba(24,24,27,.06), 0 1px 2px rgba(24,24,27,.04);
  --sidebar-w: 236px; --header-h: 68px;
  --content-zoom: 1;
}
/* --- Variables: Dark --- */
[data-theme="dark"] {
  --bg: #09090b; --surface: #18181b; --surface-2: #1f1f23;
  --border: #27272a; --border-strong: #3f3f46;
  --text: #fafafa; --text-2: #a1a1aa; --text-3: #71717a;
  --accent: #818cf8; --accent-soft: #1e1b4b; --accent-text: #c7d2fe;
  --success: #10b981; --success-soft: #064e3b;
  --warn: #f59e0b; --warn-soft: #451a03;
  --danger: #ef4444; --danger-soft: #450a0a;
  --chart-grid: rgba(250,250,250,.10); --chart-text: #c4c4cc;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
}

/* --- Reset --- */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:var(--font-sans);
  font-size:var(--body-size);line-height:var(--body-line);color:var(--text);background:var(--bg);
  -webkit-font-smoothing:antialiased;letter-spacing:0;
}
button{font-family:inherit;font-size:inherit;cursor:pointer}
input,select,textarea{font-family:inherit;font-size:inherit}
a{color:inherit;text-decoration:none}
table{border-collapse:collapse;width:100%;line-height:1.5}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:10px;border:2px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:var(--text-3)}
.tnum{font-variant-numeric:tabular-nums}
.mono{font-family:var(--font-mono)}
.subtext,
.muted-small{
  font-size:var(--subtext-size);line-height:var(--subtext-line);
  color:var(--text-2);font-weight:var(--subtext-weight);
}

/* --- App Shell --- */
.app-shell{display:flex;height:100vh;overflow:hidden}

/* --- Sidebar --- */
.sidebar{
  width:var(--sidebar-w);background:var(--surface);border-right:1px solid var(--border);
  display:flex;flex-direction:column;flex-shrink:0;
}
.sidebar-logo{padding:20px 20px 16px;display:flex;align-items:center;gap:10px}
.sidebar-logo-icon{
  width:28px;height:28px;border-radius:7px;
  background:linear-gradient(135deg,var(--accent) 0%,#7c3aed 100%);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:14px;flex-shrink:0;
}
.sidebar-logo-text{font-size:16px;font-weight:700;letter-spacing:0}
.sidebar-logo-sub{font-size:13px;color:var(--text-2);font-weight:600}
.sidebar-nav{flex:1;padding:8px 10px;display:flex;flex-direction:column;gap:2px;overflow:auto}
.sidebar-section{font-size:13px;font-weight:600;color:var(--text-2);letter-spacing:0;padding:16px 10px 6px}
.sidebar-collapsible{display:flex;flex-direction:column;gap:2px}
.sidebar-section-toggle{
  width:100%;border:none;background:transparent;display:flex;align-items:center;justify-content:space-between;
  gap:8px;text-align:left;cursor:pointer;font-family:inherit;
}
.sidebar-section-toggle:hover{color:var(--text-2)}
.sidebar-section-chevron{
  width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);transition:transform .14s ease;flex-shrink:0;margin-right:2px;
}
.sidebar-collapsible.is-collapsed .sidebar-section-chevron{transform:rotate(-45deg)}
.sidebar-collapsible.is-collapsed .sidebar-collapse-body{display:none}
.sidebar-collapse-body{display:flex;flex-direction:column;gap:2px}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:6px;
  border:none;background:transparent;color:var(--text-2);font-size:14px;font-weight:600;
  text-align:left;width:100%;transition:background .1s;
}
.nav-item-top{margin-bottom:4px}
.nav-item:hover{background:var(--surface-2)}
.nav-item.active{background:var(--accent-soft);color:var(--accent-text);font-weight:700}
.nav-item svg{flex-shrink:0}
.nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-dev-badge{
  margin-left:auto;display:inline-flex;align-items:center;gap:3px;min-width:0;
  padding:2px 5px;border:1px solid var(--border);border-radius:999px;
  color:var(--text-2);font-size:10px;font-weight:500;line-height:1.1;background:var(--surface-2);
}
.nav-dev-badge-active{border-color:var(--warn-soft);color:var(--warn);background:var(--warn-soft)}
.nav-dev-badge-waiting{border-color:var(--border);color:var(--text-2);background:var(--surface-2)}
.nav-dev-badge span{white-space:nowrap}
.channel-pill{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:6px}
.channel-pill:hover{background:var(--surface-2)}
.channel-dot{width:7px;height:7px;border-radius:2px;flex-shrink:0}
.channel-name{font-size:14px;font-weight:600}
.channel-handle{display:none}
.sidebar-user{
  padding:12px;border-top:1px solid var(--border);display:flex;align-items:center;gap:10px;
}
.sidebar-avatar{
  width:32px;height:32px;border-radius:8px;background:var(--surface-2);
  border:1px solid var(--border);display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:600;color:var(--text-2);flex-shrink:0;
}
.sidebar-uname{font-size:14px;font-weight:400}
.sidebar-uemail{font-size:13px;color:var(--text-2);font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn-icon{background:none;border:none;padding:6px;border-radius:5px;color:var(--text-3);display:flex;align-items:center}
.btn-icon:hover{background:var(--surface-2);color:var(--text)}

/* --- Main Area --- */
.main-area{flex:1;display:flex;flex-direction:column;min-width:0}
.header{
  min-height:var(--header-h);background:var(--surface);border-bottom:1px solid var(--border);
  padding:10px 28px;display:flex;align-items:center;gap:20px;flex-shrink:0;
  flex-wrap:wrap;
}
.header > div:first-child{min-width:0;flex:0 1 auto}
.header-title{font-size:var(--header-title-size);font-weight:700;line-height:1.3;letter-spacing:0}
.header-desc{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight);margin-top:1px}
.header-spacer{flex:1 1 24px;min-width:24px}
.status-badge{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--surface-2);border-radius:6px}
.status-dot{width:6px;height:6px;border-radius:50%;background:var(--success);box-shadow:0 0 0 3px rgba(5,150,105,.15)}
.status-label{font-size:13px;color:var(--text-2);line-height:1.35;font-weight:600}
.status-value{font-size:14px;font-weight:400;line-height:1.4}
.theme-toggle{
  background:var(--surface-2);border:1px solid var(--border);border-radius:6px;
  padding:7px;color:var(--text-2);display:flex;align-items:center;flex:0 0 auto;
}
.theme-toggle:hover{color:var(--text);border-color:var(--border-strong)}

.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:1000}
.modal-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;min-width:480px;max-width:560px;box-shadow:0 24px 64px rgba(0,0,0,.25)}
.modal-title{font-size:20px;font-weight:700;line-height:1.3;letter-spacing:0}

/* Feedback */
.feedback-widget{
  position:relative;padding:12px 14px;border-top:1px solid var(--border);
  z-index:930;display:flex;flex-direction:column;align-items:stretch;gap:10px;
}
.feedback-fab{
  width:100%;height:42px;border:1px solid var(--border-strong);border-radius:8px;
  background:var(--accent);color:#fff;box-shadow:0 10px 30px rgba(24,24,27,.18);
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  font-size:13px;font-weight:700;padding:0 14px;
}
.feedback-fab:hover{filter:brightness(.98)}
.feedback-panel{
  position:fixed;left:calc(var(--sidebar-w) + 12px);bottom:78px;
  width:min(360px,calc(100vw - var(--sidebar-w) - 32px));border:1px solid var(--border);border-radius:8px;
  background:var(--surface);box-shadow:0 18px 50px rgba(24,24,27,.18);
  padding:12px;display:flex;flex-direction:column;gap:9px;
}
.feedback-panel[hidden]{display:none}
.feedback-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.feedback-title{font-size:14px;font-weight:700}
.feedback-close{
  border:1px solid var(--border);border-radius:6px;background:var(--surface-2);
  color:var(--text-2);width:26px;height:26px;line-height:1;font-size:18px;
}
.feedback-close:hover{border-color:var(--border-strong);color:var(--text)}
.feedback-input,.feedback-textarea{
  width:100%;resize:vertical;min-height:96px;border:1px solid var(--border);border-radius:6px;
  background:var(--surface-2);color:var(--text);padding:9px 10px;font-size:14px;line-height:1.5;
}
.feedback-input{min-height:0;height:38px;resize:none}
.feedback-input:focus,.feedback-textarea:focus{outline:none;border-color:var(--accent)}
.feedback-target{
  min-height:30px;border:1px dashed var(--border-strong);border-radius:6px;background:var(--surface-2);
  padding:7px 8px;color:var(--text-2);font-size:13px;line-height:1.5;word-break:break-word;
  font-family:var(--font-mono);
}
.feedback-target-quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.feedback-target-chip{
  border:1px solid var(--border);border-radius:6px;background:var(--surface-2);color:var(--text-2);
  height:30px;padding:0 8px;font-family:var(--font-mono);
  font-size:13px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;
}
.feedback-target-chip:hover{border-color:var(--border-strong);color:var(--text)}
.feedback-target-chip.active{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}
.feedback-actions{display:flex;justify-content:space-between;gap:8px}
.feedback-actions .btn{flex:1;justify-content:center}
.feedback-actions .active{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}
.feedback-status{min-height:18px;font-size:13px;color:var(--success)}
.feedback-status.is-error{color:var(--danger)}
body.feedback-picking .sidebar,
body.feedback-picking .header,
body.feedback-picking .content-zoom-scope{cursor:crosshair}
body.feedback-picking .sidebar *,
body.feedback-picking .header *,
body.feedback-picking .content-zoom-scope *{cursor:crosshair}
body.feedback-picking .sidebar *:hover,
body.feedback-picking .header *:hover,
body.feedback-picking .content-zoom-scope *:hover{outline:2px solid var(--accent);outline-offset:2px}

.zoom-control{display:inline-flex;align-items:stretch;border:1px solid var(--border);border-radius:6px;background:var(--surface-2);overflow:hidden;flex:0 0 auto}
.zoom-control .zoom-btn,.zoom-control .zoom-pct{
  background:transparent;border:none;color:var(--text-2);
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;font-family:inherit;padding:0
}
.zoom-control .zoom-btn{width:30px;height:30px}
.zoom-control .zoom-pct{
  min-width:46px;height:30px;padding:0 8px;font-size:13px;font-weight:600;
  border-left:1px solid var(--border);border-right:1px solid var(--border);
  font-variant-numeric:tabular-nums
}
.zoom-control .zoom-btn:hover,.zoom-control .zoom-pct:hover{color:var(--text);background:var(--surface)}

/* --- Header chips (collect status, quota) --- */
.header-chip{
  display:flex;align-items:center;gap:8px;
  padding:6px 12px;background:var(--surface-2);border-radius:7px;
  border:1px solid var(--border);min-width:0;
}
.header-chip-label{font-size:13px;color:var(--text-2);line-height:1.35;font-weight:600}
.header-chip-value{font-size:14px;font-weight:400;line-height:1.4}

.collect-dot{
  width:7px;height:7px;border-radius:50%;flex-shrink:0;
  background:var(--success);
  box-shadow:0 0 0 3px rgba(5,150,105,.15);
}

.header-quota{min-width:160px;flex:0 1 190px}
.quota-row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.quota-track{height:3px;background:var(--border);border-radius:2px;overflow:hidden;margin-top:4px}
.quota-bar{height:100%;background:var(--accent);border-radius:2px;transition:width .4s}
.quota-bar.warn{background:var(--warn)}
.quota-bar.danger{background:var(--danger)}
.header-collect-summary{
  display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 10px;
  border:1px solid var(--border);border-radius:6px;background:var(--surface-2);
  color:var(--text-2);font-size:13px;font-weight:600;white-space:nowrap;flex:0 0 auto;
}
.header-data-coverage-slot{display:flex;align-items:center;min-width:0;flex:0 1 auto}
.header-data-coverage-slot:empty{display:none}
.header-data-coverage{
  display:inline-flex;align-items:center;gap:7px;height:30px;max-width:260px;padding:0 10px;
  border:1px solid var(--border);border-radius:6px;background:var(--surface-2);
  color:var(--text-2);font-size:13px;font-weight:600;white-space:nowrap;min-width:0;
}
.header-data-coverage__dot{
  width:7px;height:7px;border-radius:50%;background:var(--success);flex:0 0 auto;
  box-shadow:0 0 0 3px rgba(5,150,105,.15);
}
.header-data-coverage__label{color:var(--text-3);flex:0 0 auto}
.header-data-coverage__value{min-width:0;overflow:hidden;text-overflow:ellipsis}
.header-data-coverage.is-partial{color:var(--warn)}
.header-data-coverage.is-partial .header-data-coverage__dot{
  background:var(--warn);box-shadow:0 0 0 3px rgba(217,119,6,.16);
}
.header-data-coverage.is-empty,
.header-data-coverage.is-unknown{color:var(--danger)}
.header-data-coverage.is-empty .header-data-coverage__dot,
.header-data-coverage.is-unknown .header-data-coverage__dot{
  background:var(--danger);box-shadow:0 0 0 3px rgba(220,38,38,.14);
}
.header-collect-summary:hover{border-color:var(--border-strong);color:var(--text)}
.header-collect-summary__dot{
  width:7px;height:7px;border-radius:50%;background:var(--success);flex:0 0 auto;
  box-shadow:0 0 0 3px rgba(5,150,105,.15);
}
.header-collect-summary.is-running{color:var(--warn)}
.header-collect-summary.is-running .header-collect-summary__dot{
  background:var(--warn);box-shadow:0 0 0 3px rgba(217,119,6,.16);
  animation:collect-pulse 1s ease-in-out infinite;
}
.header-collect-summary.is-error{color:var(--danger)}
.header-collect-summary.is-error .header-collect-summary__dot{
  background:var(--danger);box-shadow:0 0 0 3px rgba(220,38,38,.14);
}
.header-refresh-button{
  display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 10px;
  border:1px solid var(--border);border-radius:6px;background:var(--surface-2);
  color:var(--text-2);font-size:13px;font-weight:600;white-space:nowrap;
  font-family:inherit;line-height:1;cursor:pointer;flex:0 0 auto;
}
.header-refresh-button:hover{border-color:var(--border-strong);color:var(--text)}
.header-refresh-button:disabled{opacity:.62;cursor:wait}
.header-refresh-button__icon{flex:0 0 auto}
.header-refresh-button.is-refreshing .header-refresh-button__icon{animation:dash-spin .7s infinite linear}
@keyframes collect-pulse{
  0%,100%{opacity:.35;transform:scale(.85)}
  50%{opacity:1;transform:scale(1)}
}
.content{flex:1;overflow:auto;padding:24px;min-width:0}
.content-zoom-scope{zoom:var(--content-zoom);min-width:0}
.stack{display:flex;flex-direction:column;gap:16px}

/* --- Card --- */
.card{background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow-sm);min-width:0}
.card-pad{padding:20px}
.card-sm{padding:14px}
.card-0{padding:0}
.card-header{padding:16px 18px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0}
.card-title{font-size:var(--card-title-size);font-weight:600;line-height:1.4}
.card-subtitle{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight);margin-top:2px}
.card-overflow{overflow:hidden}

/* --- Stat Card --- */
.stat-card{min-height:96px;display:flex;flex-direction:column;gap:8px;padding:18px}
.stat-label{font-size:13px;color:var(--text-2);font-weight:600;line-height:1.4}
.stat-row{display:flex;align-items:baseline;gap:4px;min-width:0}
.stat-value{font-size:28px;font-weight:700;letter-spacing:0;line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis}
.stat-unit{font-size:14px;color:var(--text-2)}
.stat-sub{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight)}
.stat-sub.up{color:var(--success)}
.stat-sub.down{color:var(--danger)}

/* --- Grids --- */
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid-2-sm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

/* --- Buttons --- */
.btn{
  display:inline-flex;align-items:center;gap:6px;padding:6px 12px;height:34px;
  font-size:var(--control-size);font-weight:600;border-radius:6px;border:1px solid var(--border-strong);
  background:var(--surface);color:var(--text);transition:all .12s;white-space:nowrap;
}
.btn:hover{border-color:var(--text-3)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-primary:hover{filter:brightness(1.1);border-color:var(--accent)}
.btn-subtle{background:var(--surface-2);border-color:var(--border);color:var(--text)}
.btn-ghost{background:transparent;border-color:transparent;color:var(--text-2)}
.btn-ghost:hover{background:var(--surface-2);border-color:transparent}
.btn-danger{color:var(--danger)}
.btn-sm{padding:4px 10px;height:30px;font-size:13px}
.btn-lg{padding:9px 16px;height:38px;font-size:14px}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* --- Chip --- */
.chip{
  display:inline-flex;align-items:center;gap:4px;padding:3px 8px;height:22px;
  font-size:13px;font-weight:600;border-radius:4px;line-height:1.1;
  background:var(--surface-2);color:var(--text-2);border:1px solid var(--border);
}
.chip-sm{padding:2px 6px;height:20px;font-size:13px}
.chip-accent{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent-soft)}
.chip-success{background:var(--success-soft);color:var(--success);border-color:var(--success-soft)}
.chip-warn{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-soft)}
.chip-danger{background:var(--danger-soft);color:var(--danger);border-color:var(--danger-soft)}
.chip-ch-a{background:rgba(79,70,229,.1);color:#4f46e5;border-color:transparent}
.chip-ch-b{background:rgba(219,39,119,.1);color:#db2777;border-color:transparent}

/* --- Input / Select --- */
.input-wrap{
  display:inline-flex;align-items:center;gap:6px;padding:0 10px;height:34px;
  background:var(--surface);border:1px solid var(--border-strong);border-radius:6px;
}
.input-wrap:focus-within{border-color:var(--accent)}
.input-wrap input{flex:1;border:none;outline:none;background:transparent;font-size:14px;color:var(--text);min-width:0}
.input-wrap svg{flex-shrink:0;color:var(--text-3)}
.select-wrap{position:relative;display:inline-block}
.select-wrap select{
  appearance:none;padding:0 28px 0 10px;height:34px;
  background:var(--surface);border:1px solid var(--border-strong);border-radius:6px;
  font-size:14px;color:var(--text);cursor:pointer;font-family:inherit;
}
.select-wrap::after{
  content:'';position:absolute;right:10px;top:50%;transform:translateY(-50%);
  border:4px solid transparent;border-top:5px solid var(--text-3);
}

/* --- Segmented --- */
.segmented{
  display:inline-flex;padding:3px;background:var(--surface-2);
  border:1px solid var(--border);border-radius:7px;
}
.seg-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;text-decoration:none;cursor:pointer;
  padding:4px 12px;height:28px;font-size:14px;font-weight:600;
  background:transparent;color:var(--text-2);border:none;border-radius:5px;
}
.seg-btn.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm);font-weight:600}
.seg-btn:hover:not(.active){color:var(--text)}

/* --- Progress --- */
.progress-wrap{display:flex;flex-direction:column;gap:6px}
.progress-header{display:flex;justify-content:space-between;font-size:13px;color:var(--text-2)}
.progress-track{height:6px;background:var(--surface-2);border-radius:3px;overflow:hidden}
.progress-bar{height:100%;background:var(--accent);border-radius:3px;transition:width .4s}
.progress-bar.warn{background:var(--warn)}
.progress-bar.success{background:var(--success)}
.progress-thin .progress-track{height:3px}

/* --- Table --- */
.data-table{font-size:var(--table-size);line-height:1.5;width:100%;min-width:1080px;table-layout:fixed}
.data-table.videos-table{min-width:1380px}
.videos-table col.col-date{width:92px}
.videos-table col.col-url{width:126px}
.videos-table col.col-category{width:128px}
.videos-table col.col-title{width:auto}
.videos-table col.col-thumb{width:104px}
.videos-table col.col-cast{width:202px}
.videos-table col.col-editor{width:126px}
.videos-table col.col-views{width:74px}
.videos-table col.col-watch{width:92px}
.videos-table col.col-memo{width:140px}
.videos-table col.col-delete{width:36px}
.data-table.site-contents-table{width:100%;min-width:1280px}
.site-contents-table col.col-date{width:88px}
.site-contents-table col.col-site{width:72px}
.site-contents-table col.col-url{width:165px}
.site-contents-table col.col-author{width:126px}
.site-contents-table col.col-thumb{width:104px}
.site-contents-table col.col-title{width:312px}
.site-contents-table col.col-views{width:118px}
.site-contents-table col.col-engagement{width:148px}
.site-contents-table col.col-performance-extra{width:auto}
.site-contents-table col.col-delete{width:36px}
.data-table.site-home-table{min-width:1060px}
.site-home-table col.col-author{width:112px}
.site-home-table col.col-url{width:170px}
.site-home-table col.col-title{width:118px}
.site-home-table col.col-views{width:120px}
.site-home-table col.col-engagement{width:126px}
.site-home-table col.col-sessions{width:120px}
.site-home-table col.col-users{width:120px}
.site-home-table col.col-date{width:108px}
.site-home-table col.col-delete{width:36px}
.data-table thead tr{background:var(--surface-2);border-bottom:1px solid var(--border)}
.data-table thead tr.table-group-head th{
  padding:10px 14px;background:var(--surface);color:var(--text-2);
  border-bottom:1px solid var(--border);font-size:var(--table-size);font-weight:600;text-transform:none;
}
.data-table thead tr.table-column-head th{background:var(--surface-2)}
.data-table th{
  text-align:center;padding:11px 14px;font-size:var(--table-size);font-weight:600;
  color:var(--text-2);text-transform:none;letter-spacing:0;white-space:nowrap;
}
.data-table th.right{text-align:right}
.data-table th.left{text-align:left}
.data-table th .sort-link{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  color:inherit;text-decoration:none;max-width:100%;
}
.data-table th.right .sort-link{justify-content:flex-end}
.data-table th.left .sort-link{justify-content:flex-start}
.data-table th .sort-link:hover{color:var(--text)}
.data-table th .sort-link.active{color:var(--accent-text)}
.sort-indicator{display:inline-block;min-width:8px;font-size:13px;line-height:1;color:currentColor}
.sort-reset-bar{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;
  margin:0 0 12px;font-size:var(--subtext-size);line-height:var(--subtext-line);
  color:var(--text-2);font-weight:var(--subtext-weight)
}
.sort-reset-bar.sort-reset-inline{margin:0;white-space:nowrap}
.sort-card-header{justify-content:flex-end}
.site-sort-head{display:flex;flex-direction:column;align-items:center;gap:4px}
.site-sort-head .sort-link{line-height:1.15}
.site-sort-sub{font-size:13px;color:var(--text-2);font-weight:600;text-transform:none;letter-spacing:0}
.data-table td{padding:16px 14px;vertical-align:middle;border-bottom:1px solid var(--border)}
.data-table.videos-table th,
.data-table.videos-table td{padding-left:10px;padding-right:10px}
.data-table.site-contents-table th,
.data-table.site-contents-table td{padding-left:8px;padding-right:8px}
.data-table.site-home-table th,
.data-table.site-home-table td{padding-left:10px;padding-right:10px}
.data-table.videos-table thead tr.table-group-head th + th,
.data-table.videos-table thead tr.table-column-head th:nth-child(6),
.data-table.videos-table thead tr.table-column-head th:nth-child(8),
.data-table.videos-table thead tr.table-column-head th:nth-child(10),
.data-table.videos-table tbody td:nth-child(6),
.data-table.videos-table tbody td:nth-child(8),
.data-table.videos-table tbody td:nth-child(10){border-left:1px solid var(--border)}
.data-table.site-contents-table thead tr.table-group-head th + th,
.data-table.site-contents-table thead tr.table-column-head th:nth-child(7),
.data-table.site-contents-table tbody td:nth-child(7){border-left:1px solid var(--border)}
.data-table.site-home-table thead tr.table-group-head th + th,
.data-table.site-home-table thead tr.table-column-head th:nth-child(4),
.data-table.site-home-table tbody td:nth-child(4){border-left:1px solid var(--border)}
.data-table td.cell-id{font-family:var(--font-mono);font-size:var(--table-size);color:var(--text-2);overflow:hidden}
.data-table td.cell-id .id-link{display:inline-block;max-width:calc(100% - 28px);overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;color:var(--text);text-decoration:none}
.data-table td.cell-id .url-tail-link{font-weight:600;letter-spacing:0;max-width:11ch}
.data-table td.cell-id .content-path-link{font-weight:600;letter-spacing:0;max-width:calc(100% - 28px)}
.data-table .id-link:hover{color:var(--accent-text);text-decoration:underline}
.data-table .copy-btn:hover{color:var(--text);border-color:var(--text-3)}
.data-table .copy-btn.copied{color:var(--success);border-color:var(--success)}
.data-table .thumb{width:96px;height:54px;border-radius:4px;object-fit:cover;background:var(--surface-2);display:block}
.data-table td.nowrap{white-space:nowrap}
.data-table.videos-table .chip{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-title-tokens{
  display:flex;align-items:center;gap:5px;flex-wrap:wrap;
  min-width:0;margin-bottom:5px;
}
.video-title-tokens .chip{max-width:120px}

/* 카테고리 칩 드롭다운 */
.cat-chip,
.editor-chip{
  display:inline-flex;align-items:center;gap:4px;
  padding:4px 8px;border-radius:6px;
  border:1px solid var(--border);background:var(--surface);
  color:var(--text);font-size:var(--table-size);font-weight:400;font-family:inherit;
  cursor:pointer;line-height:1.2;max-width:100%;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cat-chip:hover,
.editor-chip:hover{border-color:var(--text-3)}
.cat-chip.cat-empty,
.editor-chip.editor-empty{
  background:rgba(220,38,38,.08);color:var(--danger);
  border-color:rgba(220,38,38,.3);font-weight:600;
  animation:cat-pulse 1.6s ease-in-out infinite;
}
.cat-chip.saving,
.editor-chip.saving{opacity:.5}
.cat-chip.saved,
.editor-chip.saved{border-color:var(--success);color:var(--success)}
.editor-chip .editor-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
@keyframes cat-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.0)}
  50%{box-shadow:0 0 0 3px rgba(220,38,38,.15)}
}
.cat-menu{
  position:absolute;z-index:9999;
  min-width:180px;max-height:320px;overflow-y:auto;
  background:var(--surface);border:1px solid var(--border-strong);
  border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.12);
  padding:4px;font-family:inherit;
}
.cat-menu .cat-opt{
  padding:7px 10px;border-radius:5px;cursor:pointer;
  font-size:var(--table-size);color:var(--text);
}
.cat-menu .cat-opt:hover{background:var(--surface-2)}
.cat-menu .cat-opt.active{background:var(--accent-soft);color:var(--accent-text);font-weight:400}
.cat-menu .cat-opt.cat-clear{color:var(--text-3)}
.cat-menu .cat-opt.cat-add{color:var(--accent-text);font-weight:600}
.cat-menu .cat-divider{height:1px;background:var(--border);margin:4px 0}
.category-cell,
.editor-cell,
.memo-cell{min-width:0;overflow:hidden}
.data-table .title-cell{min-width:0;max-width:100%;overflow:hidden}
.data-table .title-cell .title-link{display:block;min-width:0;max-width:100%;text-decoration:none;color:inherit}
.data-table .title-cell .ellipsis{
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;
  max-height:4.2em;max-width:100%;
  overflow:hidden;white-space:normal;word-break:break-word;overflow-wrap:anywhere;line-height:1.4;
}
.data-table.site-contents-table .title-cell .ellipsis{
  -webkit-line-clamp:2;max-height:2.8em;
}
.data-table.site-home-table .title-cell .ellipsis{
  -webkit-line-clamp:2;max-height:2.8em;
}
.data-table.site-home-table .site-home-title-col .ellipsis{
  -webkit-line-clamp:1;max-height:1.4em;
}
.data-table.site-home-table .site-home-author-col{padding-left:8px;padding-right:6px}
.data-table.site-home-table .site-home-author-col .name-cell{gap:5px;flex-wrap:nowrap}
.data-table.site-home-table .site-home-author-col .chips{flex-wrap:nowrap}
.data-table.site-home-table .site-home-author-col .name-chip{
  max-width:76px;font-size:14px;font-weight:700;padding:3px 7px;
}
.data-table .title-cell .title-link:hover .ellipsis{color:var(--accent-text)}
.row-delete-btn{
  width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--border);background:var(--surface);color:var(--text-3);
  border-radius:5px;cursor:pointer;padding:0;margin-right:4px;
}
.row-delete-btn:hover{color:var(--danger);border-color:var(--danger)}
.row-delete-btn:disabled{opacity:.5;cursor:wait}
.data-table .name-cell{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap}
.data-table .name-cell .chips{display:inline-flex;flex-wrap:wrap;gap:4px;min-width:0}
.data-table.videos-table .name-cell{display:grid;grid-template-columns:minmax(0,132px) auto;align-items:center;gap:6px;flex-wrap:nowrap}
.data-table.videos-table .name-cell .chips{display:flex;flex-wrap:wrap;gap:4px;max-height:54px;overflow:hidden;align-content:flex-start}
.data-table.videos-table .name-cell .cast-actions{display:inline-flex;align-items:center;gap:4px;justify-content:flex-end}
.data-table.videos-table .name-cell .name-chip{max-width:62px}
.data-table .name-cell .name-chip{display:inline-flex;align-items:center;max-width:120px;padding:3px 8px;border-radius:6px;background:var(--accent-soft);color:var(--accent-text);font-size:var(--table-size);font-weight:400;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.data-table .name-cell .name-chip.derived{border:1px dashed var(--accent);background:var(--surface)}
.data-table .name-cell .name-empty{color:var(--text-3);font-size:var(--table-size)}
.data-table .name-cell .edit-btn{flex-shrink:0;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:var(--surface);color:var(--text-3);border-radius:5px;cursor:pointer;padding:0}
.data-table .name-cell .edit-btn:hover{color:var(--text);border-color:var(--text-3)}
.data-table .name-cell .cast-confirm-btn{color:var(--success);border-color:rgba(5,150,105,.35)}
.data-table .name-cell .cast-confirm-btn:hover{color:var(--success);border-color:var(--success)}
.data-table .name-cell .cast-confirm-btn:disabled{opacity:.5;cursor:wait}
.data-table .name-cell .edit-area{display:none;flex:1;gap:4px;align-items:center;min-width:0}
.data-table .name-cell.editing .edit-area{display:flex}
.data-table .name-cell.editing .chips,
.data-table .name-cell.editing .edit-btn{display:none}
.data-table .name-cell .edit-area input{flex:1;min-width:0;padding:5px 8px;border:1px solid var(--accent);border-radius:5px;background:var(--surface);color:var(--text);font-size:var(--table-size);font-family:inherit;outline:none}
.data-table .name-cell .save-btn,
.data-table .name-cell .cancel-btn{flex-shrink:0;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);background:var(--surface);border-radius:5px;cursor:pointer;padding:0}
.data-table .name-cell .save-btn{color:var(--success);border-color:var(--success)}
.data-table .name-cell .cancel-btn{color:var(--text-3)}
.data-table .copy-btn{margin-left:6px;padding:3px;border:1px solid var(--border);background:var(--surface);color:var(--text-3);border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
.page-controls{display:flex;align-items:center;gap:12px;margin-left:auto}
.page-controls .page-numbers{display:inline-flex;align-items:center;gap:4px}
.page-controls select{padding:4px 8px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);font-size:13px;font-family:inherit}
.page-controls .pg-btn{padding:4px 10px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);border-radius:5px;font-size:13px;cursor:pointer;text-decoration:none}
.page-controls .pg-num{min-width:30px;text-align:center;padding-left:8px;padding-right:8px}
.page-controls .pg-num.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text);font-weight:700}
.page-controls .pg-btn[aria-disabled="true"]{opacity:.4;pointer-events:none}
.page-controls .pg-btn:hover{border-color:var(--text-3);color:var(--text)}
.data-table td.right{text-align:right}
.data-table td.muted{color:var(--text-2)}
.data-table td.bold{font-weight:400}
.data-table tbody tr{transition:background .1s}
.data-table tbody tr:hover{background:var(--surface-2)}
.data-table .ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;min-width:0}
.data-table .title-link{color:var(--text);text-decoration:none}
.data-table .title-link:hover .ellipsis{color:var(--accent-text);text-decoration:underline}

.site-thumb-placeholder{
  width:96px;height:54px;border-radius:4px;background:var(--surface-2);
  color:var(--text-3);display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:700;border:1px solid var(--border);
}
.site-author-cell{
  display:flex;flex-direction:row;align-items:center;gap:6px;
  flex-wrap:wrap;min-width:0;
}
.site-author-cell .chips{display:inline-flex;flex:0 1 auto;min-width:0}
.site-author-cell .name-chip{
  display:inline-flex;align-items:center;max-width:78px;padding:3px 8px;
  border-radius:6px;background:var(--accent-soft);color:var(--accent-text);
  font-size:13px;font-weight:400;line-height:1.2;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.site-author-cell .author-current{
  display:block;max-width:150px;color:var(--text-2);font-size:13px;font-weight:400;line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.site-chip{text-transform:none}
.site-chip.site-inside{color:#06B6D4;border-color:rgba(6,182,212,.35);background:rgba(6,182,212,.10)}
.site-chip.site-rfp{color:#F59E0B;border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.10)}
.site-chip.site-video{color:#EC4899;border-color:rgba(236,72,153,.35);background:rgba(236,72,153,.10)}
.site-chip.site-home{color:#8B5CF6;border-color:rgba(139,92,246,.35);background:rgba(139,92,246,.10)}
.site-chip.site-home_content{color:#14B8A6;border-color:rgba(20,184,166,.35);background:rgba(20,184,166,.10)}
.site-chip.site-item{color:#10B981;border-color:rgba(16,185,129,.35);background:rgba(16,185,129,.10)}
.site-chip.site-portfolio{color:#2563EB;border-color:rgba(37,99,235,.35);background:rgba(37,99,235,.10)}
.site-chip.site-chat{color:#F97316;border-color:rgba(249,115,22,.35);background:rgba(249,115,22,.10)}
.site-chip.site-keyword{color:#84CC16;border-color:rgba(132,204,22,.35);background:rgba(132,204,22,.10)}
.site-chip.site-main{color:#EF4444;border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.10)}
.site-chip.site-global{color:#0F766E;border-color:rgba(15,118,110,.35);background:rgba(15,118,110,.10)}
.site-chip.site-make{color:#A855F7;border-color:rgba(168,85,247,.35);background:rgba(168,85,247,.10)}
.site-metric-cell{min-width:0}
.metric-split{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-size:13px;line-height:1.4;min-width:0;
}
.metric-split + .metric-split{margin-top:3px}
.metric-split-label{flex:0 0 auto;color:var(--text-2);font-size:13px;font-weight:600;white-space:nowrap}
.metric-split-value{min-width:0;color:var(--text);font-weight:600;white-space:nowrap}
.metric-split.is-muted .metric-split-value{color:var(--text-2);font-weight:400}
.site-contents-table .metric-split{justify-content:flex-start;gap:10px}
.site-contents-table .metric-split-label{width:58px}
.data-table.site-contents-table{width:100%;min-width:1540px}
.site-contents-table col.col-date{width:92px}
.site-contents-table col.col-thumb{width:104px}
.site-contents-table col.col-title{width:340px}
.site-contents-table col.col-author{width:92px}
.site-contents-table col.col-performance{width:auto}
.data-table.site-contents-table th,
.data-table.site-contents-table td{padding-left:10px;padding-right:10px}
.data-table.site-contents-table thead tr.table-group-head th + th,
.data-table.site-contents-table thead tr.table-column-head th:nth-child(5),
.data-table.site-contents-table tbody td:nth-child(5){border-left:1px solid var(--border)}
.site-content-title-sub{
  margin-top:4px;color:var(--text-2);font-family:var(--font-mono);
  font-size:13px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.site-content-title-meta{margin-top:5px;color:var(--text-2);font-size:13px;line-height:1.4;font-weight:400}
.site-contents-table tbody td:nth-child(4){text-align:center}
.site-content-authors{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;min-width:0}
.site-content-authors .name-chip{
  display:inline-flex;align-items:center;max-width:74px;padding:3px 7px;
  border-radius:6px;background:var(--accent-soft);color:var(--accent-text);
  font-size:13px;font-weight:400;line-height:1.2;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.site-content-authors .name-empty{color:var(--text-3);font-size:13px}
.site-content-performance-cell{overflow:visible}
.site-performance-list{
  display:grid;grid-template-columns:repeat(3,260px);gap:12px;align-items:stretch;
}
.site-performance-item{position:relative;width:260px;height:142px}
.site-performance-chip{
  display:flex;flex-direction:column;align-items:stretch;gap:16px;
  width:260px;height:142px;padding:18px 18px 16px 18px;border:1px solid var(--border);
  border-radius:7px;background:var(--surface);font-family:inherit;text-align:left;
}
.site-performance-chip:hover{border-color:var(--text-3);box-shadow:0 2px 8px rgba(24,24,27,.08)}
.site-performance-chip.copied,
.site-performance-copy-in-chip.copied{border-color:var(--success);color:var(--success);box-shadow:0 0 0 2px rgba(5,150,105,.14)}
.site-performance-chip-head{display:flex;align-items:center;justify-content:flex-start;gap:7px;padding-right:66px;min-height:24px}
.site-performance-name{font-size:16px;font-weight:700;line-height:1.2}
.site-performance-count{
  display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;
  padding:0 5px;border-radius:999px;background:rgba(255,255,255,.65);font-size:13px;font-weight:700;
}
.site-performance-metrics{
  display:grid;grid-template-columns:58px minmax(58px,1fr) minmax(58px,1fr);
  gap:6px 10px;align-items:baseline;color:var(--text-2);font-size:13px;line-height:1.15;
}
.site-performance-metric-head{color:var(--text-3);font-weight:700;text-align:right;white-space:nowrap}
.site-performance-row-label{color:var(--text-2);font-weight:700;white-space:nowrap}
.site-performance-metrics b{color:var(--text);font-size:16px;font-weight:700;text-align:right;white-space:nowrap}
.site-performance-copy-in-chip,
.site-performance-open{
  position:absolute;top:12px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(255,255,255,.70);background:rgba(255,255,255,.72);color:var(--text-3);
  border-radius:5px;cursor:pointer;padding:0;text-decoration:none;
}
.site-performance-copy-in-chip{right:50px}
.site-performance-open{right:14px}
.site-performance-copy-in-chip:hover,
.site-performance-open:hover{color:var(--text);border-color:var(--border-strong);background:var(--surface)}
.site-content-url-menu{
  position:fixed;z-index:1200;width:360px;
  padding:10px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);
  box-shadow:0 12px 30px rgba(24,24,27,.16);
}
.site-content-url-menu[hidden]{display:none}
.site-content-url-menu-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:13px;font-weight:700;color:var(--text)}
.site-content-url-list{display:flex;flex-direction:column;gap:6px;max-height:260px;overflow:auto}
.site-content-url-row{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:7px;border:1px solid var(--border);border-radius:6px;background:var(--surface-2);
}
.site-content-url-main{min-width:0;flex:1 1 auto}
.site-content-url-main a{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--text);font-family:var(--font-mono);font-size:13px;font-weight:600;text-decoration:none;
}
.site-content-url-main a:hover{color:var(--accent-text);text-decoration:underline}
.site-content-url-meta{margin-top:3px;color:var(--text-2);font-size:13px;font-weight:400;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.memo-cell{min-width:0;overflow:hidden}
.memo-compact{
  display:flex;gap:4px;align-items:center;min-width:0;width:100%;
}
.memo-action{
  flex:0 0 auto;width:28px;height:28px;border:1px solid var(--border);border-radius:6px;
  background:var(--surface);color:var(--text-3);font-size:13px;font-weight:600;
  font-family:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;
}
.memo-action svg{display:block}
.memo-action:hover{border-color:var(--text-3);color:var(--text)}
.memo-action.has-memo{border-color:var(--accent-soft);background:var(--accent-soft);color:var(--accent-text)}
.memo-preview{
  flex:1 1 auto;min-width:0;color:var(--text);font-size:13px;line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.memo-preview.memo-empty{color:var(--text-3)}
.memo-popover{
  position:absolute;z-index:9999;width:300px;padding:10px;
  border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);
  box-shadow:0 10px 28px rgba(24,24,27,.12);
}
.memo-popover[hidden]{display:none}
.memo-popover-arrow{
  position:absolute;top:-6px;left:18px;width:10px;height:10px;
  border-left:1px solid var(--border-strong);border-top:1px solid var(--border-strong);
  background:var(--surface);transform:rotate(45deg);
}
.memo-popover-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}
.memo-textarea{
  width:100%;box-sizing:border-box;padding:9px 10px;
  border:1px solid var(--border);border-radius:6px;background:var(--surface);
  color:var(--text);font-size:13px;line-height:1.45;font-family:inherit;
  resize:vertical;outline:none;
}
.memo-textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(79,70,229,.08)}
.data-table .pagination{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;border-top:1px solid var(--border);background:var(--surface);
}
.data-table .pagination .info{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight)}

/* --- Rank badge --- */
.rank{
  display:inline-flex;width:26px;height:22px;align-items:center;justify-content:center;
  border-radius:4px;font-size:13px;font-weight:600;
  background:var(--surface-2);color:var(--text-2);
}
.rank.top{background:var(--accent-soft);color:var(--accent-text)}

/* --- Empty state --- */
.empty{padding:48px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
.empty-icon{
  width:44px;height:44px;border-radius:10px;background:var(--surface-2);
  display:flex;align-items:center;justify-content:center;color:var(--text-3);
}
.empty-title{font-size:13px;font-weight:400;margin-bottom:4px}
.empty-sub{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight)}
.access-denied{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--bg);color:var(--text)}
.access-denied-card{width:min(460px,100%);background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow);padding:28px;text-align:left}
.access-denied-kicker{font-size:13px;font-weight:700;color:var(--danger);letter-spacing:0;margin-bottom:8px}
.access-denied-card h1{margin:0 0 8px;font-size:20px;line-height:1.3}
.access-denied-card p{margin:0;color:var(--text-2);font-size:13px;line-height:1.6}
.access-denied-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}

/* --- Editor field (inline edit) --- */
.editor-field{
  display:inline-flex;align-items:center;gap:4px;padding:3px 6px;margin:-3px -6px;
  border-radius:4px;cursor:text;color:var(--text-2);
}
.editor-field:hover{background:var(--surface-2)}
.editor-field:hover .edit-hint{opacity:1!important}
.editor-input{
  width:100%;padding:4px 8px;height:26px;border:1.5px solid var(--accent);
  border-radius:5px;font-size:13px;background:var(--surface);color:var(--text);
  outline:none;font-family:inherit;
}

/* --- Filter bar --- */
.filter-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.filter-divider{width:1px;height:20px;background:var(--border)}
.site-contents-filter-bar{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
.site-contents-filter-bar .segmented{flex:0 0 auto}
.site-filter-reset-btn{flex:0 0 auto;margin-left:-4px}
.performance-sort-group{flex:0 0 auto}
.site-contents-search-actions{margin-left:auto;display:flex;align-items:center;gap:8px;flex:0 0 auto;flex-wrap:nowrap}
.site-contents-search{width:300px;flex:0 0 300px}
.filter-actions{margin-top:12px;padding-top:12px;border-top:1px solid var(--border);display:flex;align-items:center;gap:10px}
.filter-select{
  height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:6px;
  background:var(--surface);color:var(--text);font-size:13px;font-family:inherit;
}
.toggle-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider { position: relative; width: 36px; height: 20px; background-color: var(--border-strong); border-radius: 20px; transition: .2s; }
.toggle-slider::before { content: ""; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }
.toggle-label { font-size: 13px; color: var(--text-2); white-space: nowrap; transition: color .2s; }
.toggle-switch input:checked ~ .toggle-label { color: var(--text); font-weight:400; }
.promo-toggle-group{
  display:inline-flex;align-items:center;gap:8px;padding:5px 9px;
  border:1px solid var(--border);border-radius:7px;background:var(--surface-2);
  white-space:nowrap;
}
.promo-toggle-group--filter{border-color:rgba(5,150,105,.24);background:rgba(5,150,105,.045)}
.promo-toggle-group--display{border-color:rgba(79,70,229,.24);background:rgba(79,70,229,.045)}
.promo-toggle-prefix{font-size:13px;font-weight:700;color:var(--text-3)}
.promo-toggle-group--filter .promo-toggle-prefix{color:var(--success)}
.promo-toggle-group--display .promo-toggle-prefix{color:var(--accent-text)}
.promo-toggle-group .toggle-label{font-weight:600}
.promo-toggle-group .toggle-switch input:checked ~ .toggle-label{font-weight:600}

.employee-tools{display:flex;gap:20px;align-items:stretch;justify-content:flex-start}
.employee-tools__upload{min-width:0;flex:0 0 auto}
.employee-add-panel{border-left:1px solid var(--border);padding-left:20px;min-width:360px;max-width:420px;flex:0 1 420px}
.employee-add-panel[open]{border-left-color:var(--accent);flex-basis:760px;max-width:760px}
.employee-add-panel summary{
  list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;
  cursor:pointer;padding:9px 10px;border:1px solid var(--border);border-radius:7px;
  background:var(--surface-2);transition:background .12s,border-color .12s;
}
.employee-add-panel summary:hover{border-color:var(--border-strong);background:var(--surface)}
.employee-add-panel summary::-webkit-details-marker{display:none}
.employee-add-panel[open] summary{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 3px rgba(79,70,229,.08)}
.employee-add-title{display:inline-flex;align-items:center;gap:8px;min-width:0}
.employee-add-chevron{
  width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:5px;background:var(--surface);border:1px solid var(--border);
  color:var(--text-2);font-size:16px;line-height:1;transform:rotate(0deg);transition:transform .12s;
}
.employee-add-panel[open] .employee-add-chevron{transform:rotate(90deg);color:var(--accent-text);border-color:var(--accent)}
.employee-add-state{
  display:inline-flex;align-items:center;justify-content:center;height:22px;padding:0 8px;
  border-radius:4px;font-size:13px;font-weight:600;border:1px solid var(--border);
  color:var(--text-3);background:var(--surface);
}
.employee-add-state-open{display:none}
.employee-add-panel[open] .employee-add-state{color:var(--accent-text);border-color:var(--accent);background:var(--surface)}
.employee-add-panel[open] .employee-add-state-closed{display:none}
.employee-add-panel[open] .employee-add-state-open{display:inline}
.employee-add-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:center}
.employee-add-form .input-wrap,.employee-add-form .employee-date-field{width:100%}
.employee-add-form .btn,.employee-add-form #add-msg{justify-self:start}
.employee-add-panel[open] .employee-add-form{grid-template-columns:repeat(4,minmax(0,1fr))}
.employee-add-panel[open] .employee-add-form label{white-space:nowrap;align-self:center}

.employee-date-field{position:relative}
.employee-date-cell{position:relative}
.employee-date-field .pp-date-input{height:32px}
.employee-date-popover{
  position:absolute;top:38px;left:0;z-index:30;width:260px;
  background:var(--surface);border:1px solid var(--border-strong);border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.08),0 2px 6px rgba(0,0,0,.04);padding:10px;
}
.employee-date-popover[hidden]{display:none}
.emp-select-block{
  width:100%;height:30px;padding:0 28px 0 10px;
  border:1px solid var(--border);border-radius:6px;
  background:var(--surface-2);color:var(--text);font-size:13px;font-family:inherit;
}
.emp-select-block:focus{outline:none;border-color:var(--accent);background:var(--surface)}
.employees-root.is-loading{opacity:.62;pointer-events:none}
.employees-msg{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight);min-width:90px}
.emp-new-row td{background:var(--accent-soft)}
.emp-new-row .emp-inline-input,.emp-new-row .emp-select-block{background:var(--surface)}
.emp-new-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.emp-new-msg{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight);white-space:nowrap}

@media(max-width:1500px){
  .employee-add-panel[open]{flex-basis:640px;max-width:640px}
  .employee-add-panel[open] .employee-add-form{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:1100px){
  .employee-tools{flex-direction:column}
  .employee-add-panel{border-left:none;border-top:1px solid var(--border);padding-left:0;padding-top:14px;min-width:0;max-width:none;flex:0 1 auto}
  .employee-add-panel[open]{max-width:none;flex-basis:auto}
}

@media(max-width:700px){
  .employee-add-form{grid-template-columns:1fr}
  .employee-add-panel[open] .employee-add-form{grid-template-columns:1fr}
}

/* --- Section Label --- */
.section-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-label-text{font-size:var(--section-title-size);font-weight:600;line-height:1.4}
.section-label-hint{font-size:var(--subtext-size);color:var(--text-2);font-weight:var(--subtext-weight);line-height:var(--subtext-line)}
.chart-header-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-width:0}
.chart-header-title{display:flex;flex-direction:column;gap:2px;min-width:150px}
.chart-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:1 1 auto;min-width:0}
.chart-inline-legend{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0;color:var(--text-2);font-size:13px;font-weight:400;line-height:1.5}
.chart-inline-legend[hidden]{display:none}
.legend-focus-btn{appearance:none;border:0;background:transparent;color:inherit;font:inherit;line-height:inherit;padding:0;cursor:pointer}
.legend-focus-btn:hover,.legend-focus-btn.is-active{color:var(--text)}
.legend-focus-btn.is-active{font-weight:700}
.chart-inline-legend span,.chart-inline-legend .legend-focus-btn{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.chart-inline-legend i{display:inline-block;width:16px;height:2px;border-radius:999px;background:currentColor;flex:0 0 auto}
.chart-inline-legend-compact{
  display:grid;grid-template-columns:repeat(5,minmax(0,max-content));grid-auto-rows:16px;
  align-items:center;justify-content:end;column-gap:12px;row-gap:4px;
  flex:1 1 320px;overflow-x:auto;overflow-y:hidden;
  max-width:min(560px,100%);max-height:36px;padding:1px 0;scrollbar-width:none
}
.chart-inline-legend-compact::-webkit-scrollbar{display:none}
.chart-inline-legend-compact span,.chart-inline-legend-compact .legend-focus-btn{
  max-width:106px;overflow:hidden;text-overflow:ellipsis;
  color:var(--text-2);font-size:13px;font-weight:400
}
.chart-inline-legend-compact .legend-focus-btn:hover,.chart-inline-legend-compact .legend-focus-btn.is-active{color:var(--text)}
.chart-inline-legend-compact .legend-focus-btn.is-active{font-weight:700}
.chart-inline-legend-compact i{width:18px;height:3px}

/* --- Login --- */
.login-wrap{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px}
.login-card{
  width:100%;max-width:380px;padding:40px 32px;
  background:var(--surface);border:1px solid var(--border);border-radius:12px;
  box-shadow:var(--shadow);
}
.login-card .logo{display:flex;align-items:center;gap:10px;margin-bottom:32px}
.login-card h1{font-size:20px;font-weight:700;margin:0;line-height:1.3}
.login-card .sub{font-size:var(--subtext-size);color:var(--text-2);line-height:var(--subtext-line);font-weight:var(--subtext-weight);margin-top:2px}
.login-card form{display:flex;flex-direction:column;gap:16px}
.login-card label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:400;color:var(--text-2)}
.login-card label input{
  padding:10px 12px;border:1px solid var(--border-strong);border-radius:6px;
  background:var(--surface);color:var(--text);font-size:14px;outline:none;
}
.login-card label input:focus{border-color:var(--accent)}
.login-card .btn-primary{width:100%;justify-content:center;height:40px;font-size:14px;margin-top:4px}

/* --- Flash --- */
.flash{
  padding:12px 16px;border-radius:6px;margin-bottom:12px;font-size:14px;
  background:var(--danger-soft);color:var(--danger);border:1px solid rgba(220,38,38,.15);
}
.flash-success{background:var(--success-soft);color:var(--success);border-color:rgba(5,150,105,.15)}

/* --- Pre / Code --- */
pre{
  margin:0;padding:8px;background:var(--surface-2);border-radius:4px;
  font-size:13px;font-family:var(--font-mono);color:var(--text-2);
  white-space:pre-wrap;line-height:1.55;border:1px solid var(--border);
}
code{background:var(--surface-2);padding:2px 6px;border-radius:4px;font-size:13px}

/* --- Pattern card (description/bulk) --- */
.pattern-card{
  padding:14px;border-radius:7px;cursor:pointer;
  border:1.5px solid var(--border);background:var(--surface);
  transition:all .12s;display:flex;flex-direction:column;gap:10px;
}
.pattern-card:hover{border-color:var(--text-3)}
.pattern-card.active{border-color:var(--accent);background:var(--accent-soft)}
.pattern-header{display:flex;align-items:center;justify-content:space-between}
.pattern-count{font-size:18px;font-weight:600}
.pattern-elements{display:flex;flex-wrap:wrap;gap:4px}

/* --- Replacement grid --- */
.repl-grid{display:grid;grid-template-columns:100px 1fr 24px 1fr;gap:10px;align-items:center}
.repl-grid-header{font-size:13px;color:var(--text-3);text-transform:uppercase;letter-spacing:0;font-weight:600;padding:0 2px}
.repl-label{font-size:14px;font-weight:400}
.repl-arrow{display:flex;justify-content:center;color:var(--text-3)}

/* --- Topic item --- */
.topic-item{
  padding:14px 18px;display:flex;align-items:center;gap:12px;
  border-bottom:1px solid var(--border);transition:background .1s;cursor:default;
}
.topic-item:last-child{border-bottom:none}
.topic-item:hover{background:var(--surface-2)}
.topic-rank{
  width:22px;height:22px;display:flex;align-items:center;justify-content:center;
  background:var(--surface-2);border-radius:4px;font-size:13px;font-weight:600;color:var(--text-3);flex-shrink:0;
}
.topic-info{flex:1;min-width:0}
.topic-title{font-size:14px;font-weight:400;margin-bottom:3px}
.topic-meta{font-size:var(--subtext-size);color:var(--text-2);font-weight:var(--subtext-weight);line-height:var(--subtext-line);display:flex;gap:10px}
.topic-stat{text-align:right}
.topic-stat-value{font-size:14px;font-weight:600}
.topic-stat-label{font-size:13px;color:var(--text-2);font-weight:600}

/* --- AI suggestion card --- */
.suggest-card{
  padding:16px;border:1px solid var(--border);border-radius:7px;
  display:flex;flex-direction:column;gap:10px;background:var(--surface);transition:all .12s;
}
.suggest-card:hover{border-color:var(--text-3);box-shadow:var(--shadow)}
.suggest-header{display:flex;align-items:start;justify-content:space-between;gap:10px}
.suggest-title{font-size:16px;font-weight:600;line-height:1.4;flex:1}
.suggest-reason{font-size:13px;color:var(--text-2);line-height:1.5}
.suggest-footer{display:flex;gap:6px;margin-top:4px;padding-top:10px;border-top:1px solid var(--border);align-items:center}

/* --- Trend cloud --- */
.trend-cloud{padding:18px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.trend-tag{
  padding:6px 12px;border-radius:999px;cursor:pointer;transition:transform .12s;
  font-weight:400;border:1px solid transparent;
}
.trend-tag:hover{transform:translateY(-1px)}

/* --- Animations --- */
@keyframes pulse{0%,100%{opacity:.6}50%{opacity:.3}}
@keyframes spin{to{transform:rotate(360deg)}}
.skeleton{background:var(--border);border-radius:3px;animation:pulse 1.3s ease-in-out infinite}
.spinner{animation:spin .9s linear infinite}

/* --- Responsive (simple) --- */
@media(max-width:900px){
  .sidebar{display:none}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .dash-duo{grid-template-columns:1fr}
}

/* ============================================
   Dashboard — Duo Layout
   ============================================ */
.dash-duo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;width:100%;min-width:0}
.dash-channel{display:flex;flex-direction:column;gap:14px;min-width:0}
.dash-chart-stack{display:grid;grid-template-columns:1fr;gap:12px;min-width:0}
.dash-chart-stack,.dash-channel .card-overflow{content-visibility:auto;contain-intrinsic-size:520px}
.dash-ch-header{display:flex;align-items:center;gap:8px;padding:4px 0;min-width:0}
.dash-ch-name{font-size:16px;font-weight:700;line-height:1.4;letter-spacing:0}
.dash-ch-handle{font-size:var(--subtext-size);color:var(--text-2);font-weight:var(--subtext-weight);line-height:var(--subtext-line);margin-left:2px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chart-wrap{position:relative;height:180px;min-width:0}
.chart-wrap canvas{display:block;max-width:100%}
.chart-range-selection{
  position:absolute;
  z-index:3;
  pointer-events:none;
  border-left:1px solid var(--accent);
  border-right:1px solid var(--accent);
  background:rgba(79,70,229,.14);
}
.chart-range-summary{
  position:absolute;
  z-index:4;
  min-width:190px;
  max-width:min(320px,calc(100% - 16px));
  max-height:170px;
  overflow:auto;
  padding:10px 12px;
  border:1px solid var(--border-strong);
  border-radius:6px;
  background:var(--surface);
  color:var(--text);
  box-shadow:0 14px 36px rgba(15,23,42,.18);
  font-size:13px;
  line-height:1.35;
}
.chart-range-title{
  font-weight:700;
  margin-bottom:8px;
  white-space:nowrap;
}
.chart-range-rows{display:grid;gap:5px}
.chart-range-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chart-range-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2)}
.chart-range-row strong{font-weight:700;white-space:nowrap;color:var(--text)}

@media(min-width:1440px){
  .chart-wrap{height:200px}
}

@media(min-width:1920px){
  .chart-wrap{height:220px}
}

@media(min-width:2400px){
  .chart-wrap{height:240px}
}

/* Content rows (top videos/shorts/live) */
.content-row{
  display:flex;align-items:center;gap:12px;padding:12px 18px;
  border-bottom:1px solid var(--border);transition:background .1s;min-width:0;
}
.content-row:last-child{border-bottom:none}
.content-row:hover{background:var(--surface-2)}
.content-info{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px}
.content-info .chip{flex:0 0 auto}
.content-title{font-size:14px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.content-views{font-size:14px;font-weight:400;color:var(--text-2);white-space:nowrap;flex:0 0 auto}

/* Tab panels */
.tab-panel{display:none}
.tab-panel.active{display:block}

/* Dashboard loading overlay */
.dash-loading-overlay{
  position:absolute;inset:0;z-index:20;
  display:flex;align-items:center;justify-content:center;
  background:var(--bg);opacity:0;pointer-events:none;
  border-radius:16px;transition:opacity .2s;
}
.dash-loading-overlay.visible{opacity:.55;pointer-events:auto}
.dash-loading-spinner{
  width:32px;height:32px;
  border:3px solid var(--border-strong);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:dash-spin .6s linear infinite;
}
@keyframes dash-spin{to{transform:rotate(360deg)}}

/* Collect chip body (영상 리스트 / 영상 실적 통합) */
.collect-chip-group{display:flex;gap:8px;flex-wrap:wrap;min-width:0;flex:0 1 auto}
.header-collect{flex:1 1 260px;max-width:340px}
.header-collect .collect-chip-body{display:flex;flex-direction:column;gap:3px;min-width:0;width:clamp(180px,22vw,230px)}
.header-collect.is-running .header-chip-label,
.header-collect.is-running .header-chip-value{display:none}

/* Collect progress */
.dash-collect-progress{
  display:none;flex-direction:column;align-items:stretch;gap:4px;
  font-size:13px;color:var(--text-2);min-width:0;
}
.dash-collect-progress.visible{display:flex}
.dash-collect-progress__bar{
  width:100%;height:6px;border-radius:999px;
  background:var(--surface-2);overflow:hidden;min-width:0;
}
.dash-collect-progress__fill{
  height:100%;width:0%;background:var(--accent);
  transition:width .3s ease;
}
.dash-collect-progress__label{
  min-width:0;text-align:left;font-variant-numeric:tabular-nums;
  white-space:normal;overflow:visible;line-height:1.25;word-break:keep-all;
}
.dash-collect-progress.is-error .dash-collect-progress__fill{background:#dc2626}
.dash-collect-progress.is-stale .dash-collect-progress__fill{background:#d97706}

@media(max-width:1200px){
  .header-collect{flex-basis:240px}
  .header-collect .collect-chip-body{width:clamp(160px,28vw,210px)}
}

@media(max-width:900px){
  .header-data-coverage__label{display:none}
  .header-data-coverage{max-width:210px}
  .dash-duo{grid-template-columns:1fr}
}

/* Settings */
.settings-page{max-width:1280px}
.settings-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.settings-title{margin:0;font-size:20px;font-weight:600;line-height:1.4;letter-spacing:0}
.settings-desc{margin:4px 0 0;color:var(--text-2);font-size:var(--subtext-size);line-height:var(--subtext-line);font-weight:var(--subtext-weight)}
.settings-card-body{padding:14px 16px 16px}
.settings-collapsible.is-collapsed .settings-card-body{display:none}
.settings-collapse-header{align-items:flex-start}
.settings-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.settings-collapse-toggle{
  border:1px solid var(--border);border-radius:6px;background:var(--surface-2);
  color:var(--text-2);font-size:13px;font-weight:700;padding:6px 9px;
}
.settings-collapse-toggle:hover{border-color:var(--border-strong);color:var(--text)}
.settings-easter-toast{
  position:fixed;right:24px;bottom:24px;z-index:9999;
  max-width:min(360px,calc(100vw - 32px));padding:12px 16px;
  border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);
  color:var(--text);font-size:13px;font-weight:700;box-shadow:var(--shadow);
  opacity:0;transform:translateY(10px);pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.settings-easter-toast.is-visible{opacity:1;transform:translateY(0)}
.settings-connection-strip{
  display:grid;grid-template-rows:repeat(2,minmax(128px,auto));grid-auto-flow:column;
  grid-auto-columns:minmax(220px,1fr);gap:10px;overflow-x:auto;padding-bottom:4px;
}
.settings-connection-card{
  border:1px solid var(--border);border-radius:8px;background:var(--surface-2);
  padding:12px;min-width:0;
}
.settings-connection-card.is-api{border-color:var(--border-strong);background:var(--surface)}
.settings-connection-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.settings-connection-group{font-size:13px;font-weight:700;color:var(--text-2)}
.settings-connection-meta{display:grid;grid-template-columns:1fr;gap:6px;margin-top:10px}
.settings-connection-meta>div{
  min-width:0;border:1px solid var(--border);border-radius:6px;background:var(--surface);
  padding:6px 7px;
}
.settings-connection-meta span{display:block;font-size:13px;color:var(--text-2);font-weight:600;margin-bottom:2px}
.settings-connection-meta strong{
  display:block;font-size:13px;color:var(--text);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.settings-all-status{
  min-width:84px;color:var(--text-2);font-size:13px;font-weight:700;text-align:right;
}
.settings-api-grid,.settings-collect-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.settings-api-card,.settings-collect-card{
  border:1px solid var(--border);border-radius:8px;background:var(--surface-2);
  padding:14px;min-width:0;
}
.settings-security-grid{display:grid;grid-template-columns:minmax(260px,360px) 1fr;gap:12px;margin-bottom:12px}
.settings-account-panel,.settings-account-card{
  border:1px solid var(--border);border-radius:8px;background:var(--surface-2);
  padding:14px;min-width:0;
}
.settings-account-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:10px}
.settings-account-form{display:grid;grid-template-columns:1fr;gap:10px}
.settings-security-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.settings-security-notes>div{
  border:1px solid var(--border);border-radius:7px;background:var(--surface);
  padding:10px;min-width:0;
}
.settings-security-notes strong{display:block;font-size:13px;color:var(--text);margin-bottom:4px}
.settings-security-notes span{display:block;font-size:13px;color:var(--text-2);line-height:1.45;font-weight:400}
.settings-account-list{display:flex;flex-direction:column;gap:10px}
.settings-account-main{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.settings-account-actions{display:grid;grid-template-columns:1fr 1.35fr auto;gap:8px;align-items:end}
.settings-inline-form{display:flex;align-items:end;gap:8px;min-width:0}
.settings-inline-form .filter-input{min-width:0;width:100%}
.settings-inline-form .btn{white-space:nowrap}
.settings-collect-card.header-collect{max-width:none;flex:auto}
.settings-api-top,.settings-collect-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.settings-api-name{font-size:14px;font-weight:700;letter-spacing:0;color:var(--text)}
.settings-api-state{font-size:13px;color:var(--warn);margin-top:3px}
.settings-api-desc{font-size:13px;color:var(--text-2);line-height:1.5;margin:0 0 12px}
.settings-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.settings-meta-grid>div{
  border:1px solid var(--border);border-radius:6px;background:var(--surface);
  padding:8px;min-width:0;
}
.settings-meta-label{display:block;color:var(--text-2);font-size:13px;font-weight:600;margin-bottom:3px}
.settings-meta-grid strong{display:block;font-size:13px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-usage-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 6px}
.settings-usage-pill{
  border:1px solid var(--border);border-radius:6px;background:var(--surface);
  padding:8px;min-width:0;
}
.settings-usage-pill span{display:block;font-size:13px;color:var(--text-2);font-weight:600;margin-bottom:3px}
.settings-usage-pill strong{display:block;font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-usage-pill.is-estimate{opacity:.58}
.settings-usage-pill.is-estimate strong{font-weight:400}
.settings-usage-pill.is-actual{border-color:var(--border-strong);background:var(--surface)}
.settings-usage-pill.is-actual strong{font-size:14px;font-weight:700;color:var(--text)}
.settings-log-groups{padding:12px;display:flex;flex-direction:column;gap:8px}
.settings-log-panel{
  border:1px solid var(--border);border-radius:7px;background:var(--surface-2);
}
.settings-log-panel>summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 12px;cursor:pointer;font-size:13px;font-weight:700;color:var(--text);
  list-style:none;
}
.settings-log-panel>summary::-webkit-details-marker{display:none}
.settings-log-panel>summary::before{
  content:"";width:7px;height:7px;border-right:1.5px solid var(--text-3);
  border-bottom:1.5px solid var(--text-3);transform:rotate(-45deg);transition:transform .12s;
}
.settings-log-panel[open]>summary::before{transform:rotate(45deg)}
.settings-log-summary-grid{
  border-top:1px solid var(--border);padding:10px;display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;
}
.settings-log-event-head{
  border-top:1px solid var(--border);padding:10px 12px 0;
  color:var(--text-2);font-size:13px;font-weight:700;
}
.settings-log-summary-card{
  border:1px solid var(--border);border-radius:7px;background:var(--surface);
  padding:9px;min-width:0;display:flex;flex-direction:column;gap:4px;
}
.settings-log-summary-card strong{font-size:16px;color:var(--text)}
.settings-log-summary-card span,.settings-log-summary-card small{
  color:var(--text-2);font-size:13px;line-height:1.4;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.settings-log-table-wrap{border-top:1px solid var(--border);overflow-x:auto}
.settings-log-table{min-width:760px;font-size:var(--table-size)}
.settings-event-table{min-width:980px}
.settings-log-table th,.settings-log-table td{padding:8px 10px}
.settings-log-message{margin-top:3px;color:var(--text-2);font-size:13px;line-height:1.4;font-weight:400}
.settings-log-raw{border-top:1px solid var(--border)}
.settings-log-raw>summary{
  padding:9px 12px;font-size:13px;color:var(--text-2);background:var(--surface);
}
.settings-log-code{
  margin:0;border-top:1px solid var(--border);padding:12px;
  background:var(--surface);color:var(--text-2);font-size:13px;line-height:1.55;
  max-height:360px;overflow:auto;white-space:pre-wrap;word-break:break-word;
}
.settings-log-code code{background:transparent;padding:0;border-radius:0;font-size:inherit;color:inherit}
.settings-collect-card .dash-collect-progress{display:flex;margin-top:8px}
.settings-collect-card .dash-collect-progress__label{text-align:left}
.feedback-list{padding:12px;display:flex;flex-direction:column;gap:10px}
.feedback-item{
  display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:12px;
  border:1px solid var(--border);border-radius:8px;background:var(--surface-2);padding:12px;
}
.feedback-item-main{min-width:0}
.feedback-item-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.feedback-page{font-size:13px;font-weight:700;color:var(--text);word-break:break-all}
.feedback-date,.feedback-meta{font-size:13px;color:var(--text-2);line-height:1.4;font-weight:400}
.feedback-message{font-size:14px;line-height:1.55;color:var(--text);white-space:pre-wrap;word-break:break-word;margin-bottom:8px}
.feedback-target-detail{
  display:flex;flex-direction:column;gap:5px;border:1px solid var(--border);border-radius:6px;
  background:var(--surface);padding:8px;color:var(--text-2);font-size:13px;line-height:1.4;
}
.feedback-target-detail code{font-size:13px;line-height:1.45;white-space:pre-wrap;word-break:break-all;background:transparent;color:var(--text);padding:0}
.feedback-target-detail .feedback-selector{color:var(--text-2);font-weight:400}
.feedback-item-control{display:flex;flex-direction:column;gap:8px;min-width:0}
.feedback-control-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.feedback-control-actions .btn{justify-content:center}
.feedback-delete{color:var(--danger)}
.feedback-delete:hover{border-color:var(--danger);color:var(--danger);background:var(--danger-soft)}
.feedback-status-select,.feedback-admin-note{
  width:100%;border:1px solid var(--border);border-radius:6px;background:var(--surface);
  color:var(--text);font-size:13px;padding:8px;
}
.feedback-admin-note{resize:vertical;min-height:78px;line-height:1.45}
.feedback-status-chip{border-color:var(--border-strong)}
.feedback-status-new{background:var(--warn-soft);color:var(--warn)}
.feedback-status-reviewing{background:var(--accent-soft);color:var(--accent-text)}
.feedback-status-done{background:var(--success-soft);color:var(--success)}
.feedback-empty{padding:20px}
.site-placeholder-page .stat-value{font-size:18px}
.site-placeholder-badge{font-size:12px;font-weight:400;color:var(--text-3);background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:5px 8px}

@media(max-width:980px){
  .settings-api-grid,.settings-collect-grid{grid-template-columns:1fr}
  .settings-security-grid,.settings-security-notes,.settings-account-actions{grid-template-columns:1fr}
  .settings-inline-form{flex-direction:column;align-items:stretch}
  .settings-meta-grid,.settings-usage-row{grid-template-columns:1fr}
  .settings-connection-strip{grid-template-rows:none;grid-auto-flow:row;grid-template-columns:1fr}
  .settings-log-summary-grid{grid-template-columns:1fr}
  .feedback-item{grid-template-columns:1fr}
}


/* Placeholder card (Instagram, GA4 등 차후 연동) */
.placeholder-card{
  opacity:.7;
  border-style:dashed;
  background:repeating-linear-gradient(
    45deg,
    var(--surface) 0 8px,
    var(--surface-2) 8px 16px
  );
}
.placeholder-card .card-title{color:var(--text-2)}

/* --- Employee table compact --- */
.emp-table td{padding:8px 10px}
.emp-table th{padding:8px 10px}
.emp-inline-input{
  width:100%;padding:4px 8px;
  border:1px solid var(--border);border-radius:5px;
  background:var(--surface);color:var(--text);
  font-size:13px;font-family:inherit;
}
.emp-inline-input:focus{outline:none;border-color:var(--accent)}
