:root {
  --bg:#ede9e1; --surface:#f8f4ee; --surface2:#eee9e0; --surface3:#e5dfd6;
  --border:#d4cec5; --border2:#c8c1b7;
  --accent:#7c5c3b; --accent-bg:#f0e6d8;
  --accent2:#b84c39; --accent3:#4e8060; --accent4:#b87d1a;
  --sug:#9b5ea8;
  --text:#28221e; --text-muted:#7a7068; --text-dim:#b5afa8;
  --radius:10px; --radius-sm:6px;
  --shadow:0 2px 12px rgba(100,80,60,.12);
  --shadow-lg:0 6px 32px rgba(100,80,60,.18);
}
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--bg);color:var(--text);display:flex;height:100vh;overflow:hidden;}

/* ── Sidebar ── */
.sidebar{width:210px;min-width:210px;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:0 0 16px;}
.sidebar-logo{padding:22px 20px 18px;border-bottom:1px solid var(--border);}
.sidebar-logo h1{font-size:15px;font-weight:800;color:var(--accent);letter-spacing:-.3px;}
.sidebar-logo p{font-size:11px;color:var(--text-muted);margin-top:2px;}
.nav{list-style:none;padding:12px 10px;flex:1;}
.nav li{margin-bottom:3px;}
.nav-item{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:var(--radius-sm);cursor:pointer;color:var(--text-muted);font-size:13.5px;font-weight:500;transition:background .14s,color .14s;user-select:none;}
.nav-item:hover{background:var(--surface2);color:var(--text);}
.nav-item.active{background:var(--accent);color:#fff;}
.nav-item svg{width:15px;height:15px;flex-shrink:0;}

/* ── Main ── */
.main{flex:1;display:flex;flex-direction:column;overflow:hidden;}
.topbar{padding:18px 28px;border-bottom:1px solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
.topbar h2{font-size:17px;font-weight:800;}
.topbar p{font-size:11.5px;color:var(--text-muted);margin-top:1px;}
.page-actions{display:flex;gap:8px;align-items:center;}
.content{flex:1;overflow-y:auto;padding:24px 28px;}
.section{display:none;}
.section.active{display:block;}

/* ── Buttons ── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 15px;border-radius:var(--radius-sm);font-size:13px;font-weight:600;cursor:pointer;border:none;transition:opacity .14s;font-family:inherit;}
.btn:hover{opacity:.86;}
.btn-primary{background:var(--accent);color:#fff;box-shadow:0 1px 4px rgba(124,92,59,.28);}
.btn-ghost{background:var(--surface);color:var(--text);border:1px solid var(--border);}
.btn-ghost:hover{background:var(--surface2);}
.btn-danger{background:#f8ede8;color:var(--accent2);border:1px solid #e5c9c2;}
.btn-sm{padding:5px 11px;font-size:12px;}
.btn-xs{padding:3px 8px;font-size:11px;}

/* ── Inner tabs ── */
.inner-tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:20px;}
.inner-tab{padding:10px 18px;font-size:13px;font-weight:700;cursor:pointer;color:var(--text-muted);border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .14s,border-color .14s;user-select:none;}
.inner-tab:hover{color:var(--text);}
.inner-tab.active{color:var(--accent);border-bottom-color:var(--accent);}
.inner-panel{display:none;}
.inner-panel.active{display:block;}

/* ── Calendar ── */
.multi-cal{display:flex;flex-direction:column;gap:36px;}
.month-heading{font-size:18px;font-weight:800;color:var(--accent);margin-bottom:12px;display:flex;align-items:baseline;gap:8px;}
.month-heading .yr{font-size:13px;font-weight:600;color:var(--text-muted);}
.month-heading .now-badge{font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;background:var(--accent);color:#fff;padding:2px 7px;border-radius:20px;}
.cal-grid{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);}
.cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);background:var(--surface2);border-bottom:1px solid var(--border);}
.cal-weekday{padding:8px 4px;text-align:center;font-size:10.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;}
.cal-days{display:grid;grid-template-columns:repeat(7,1fr);}
.cal-day{min-height:90px;padding:7px 6px 24px;border-top:1px solid var(--border);border-right:1px solid var(--border);position:relative;cursor:pointer;transition:background .12s;background:var(--surface);}
.cal-day:nth-child(7n){border-right:none;}
.cal-day:hover{background:var(--accent-bg);}
.cal-day.other-month{background:var(--bg);}
.cal-day.other-month .day-num{color:var(--text-dim);}
.cal-day.today .day-num{background:var(--accent);color:#fff;border-radius:50%;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;}
.day-num{font-size:11.5px;font-weight:700;color:var(--text-muted);margin-bottom:4px;display:inline-block;}
.day-events{display:flex;flex-direction:column;gap:2px;}
.day-event{font-size:10px;padding:2px 5px;border-radius:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600;cursor:pointer;transition:opacity .12s;}
.day-event:hover{opacity:.72;}
.day-add-btn{position:absolute;bottom:5px;right:5px;width:20px;height:20px;border-radius:50%;background:var(--surface3);border:1px solid var(--border2);color:var(--text-muted);font-size:15px;line-height:1;display:none;align-items:center;justify-content:center;cursor:pointer;font-weight:300;}
.cal-day:hover .day-add-btn{display:flex;}
.day-add-btn:hover{background:var(--accent);color:#fff;border-color:var(--accent);}

/* ── Board ── */
.board-layout{display:grid;grid-template-columns:1fr 340px;gap:24px;align-items:start;}
.panel-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;}
.panel-header{padding:14px 18px;border-bottom:1px solid var(--border);background:var(--surface2);display:flex;align-items:center;justify-content:space-between;}
.panel-header h3{font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted);}
.bucket-tabs-bar{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:12px 16px 0;border-bottom:1px solid var(--border);background:var(--surface);}
.bucket-tab{padding:7px 13px;font-size:12.5px;font-weight:600;cursor:pointer;border-radius:6px 6px 0 0;color:var(--text-muted);border:1px solid transparent;border-bottom:none;transition:all .14s;display:flex;align-items:center;gap:5px;position:relative;bottom:-1px;background:transparent;}
.bucket-tab:hover{color:var(--text);background:var(--surface2);}
.bucket-tab.active{color:var(--accent);background:var(--surface);border-color:var(--border);}
.tab-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.tab-x{margin-left:3px;font-size:13px;color:var(--text-dim);line-height:1;cursor:pointer;padding:0 2px;}
.tab-x:hover{color:var(--accent2);}
.bucket-panel{display:none;padding:16px;}
.bucket-panel.active{display:block;}
.bucket-panel-topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.bucket-panel-topbar h4{font-size:14px;font-weight:700;}
.bucket-panel-topbar p{font-size:12px;color:var(--text-muted);margin-top:1px;}
.bucket-items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;}
.bucket-item{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px;position:relative;}
.bucket-item-title{font-size:13px;font-weight:700;margin-bottom:6px;}
.bucket-item-meta{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:20px;font-size:10.5px;font-weight:700;}
.item-del{position:absolute;top:8px;right:8px;background:none;border:none;color:var(--text-dim);cursor:pointer;font-size:14px;padding:1px 4px;border-radius:3px;line-height:1;}
.item-del:hover{color:var(--accent2);background:#f8ede8;}
.panel-empty{padding:40px 20px;text-align:center;color:var(--text-muted);font-size:13px;}
.panel-empty strong{display:block;font-size:14px;color:var(--text);margin-bottom:4px;}
.channels-list{padding:12px;display:flex;flex-direction:column;gap:10px;}
.channel-card{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px;position:relative;}
.channel-card-top{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.ch-icon{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
.ch-name{font-size:14px;font-weight:700;}
.ch-handle{font-size:11.5px;color:var(--text-muted);margin-top:1px;}
.ch-stats{display:flex;gap:14px;margin-bottom:6px;}
.ch-stat strong{font-size:14px;font-weight:700;display:block;}
.ch-stat span{font-size:10.5px;color:var(--text-muted);}
.ch-notes{font-size:12px;color:var(--text-muted);line-height:1.6;}
.ch-del{position:absolute;top:10px;right:10px;background:none;border:none;color:var(--text-dim);cursor:pointer;font-size:14px;padding:2px 5px;border-radius:3px;line-height:1;}
.ch-del:hover{color:var(--accent2);background:#f8ede8;}

/* ════════════════ INSPO BOARD ════════════════ */
.inspo-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:12px;flex-wrap:wrap;}
.inspo-filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.plat-chip{padding:6px 14px;border-radius:20px;font-size:12px;font-weight:700;cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text-muted);transition:all .14s;user-select:none;white-space:nowrap;}
.plat-chip:hover{background:var(--surface2);color:var(--text);}
.plat-chip.active{background:var(--accent);color:#fff;border-color:var(--accent);}

/* Grid — masonry with CSS columns */
.inspo-grid{
  columns:3;
  column-gap:14px;
  width:100%;
}
@media(max-width:1100px){.inspo-grid{columns:2;}}
@media(max-width:700px){.inspo-grid{columns:1;}}

.inspo-card{
  break-inside:avoid;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  margin-bottom:14px;
  position:relative;
  transition:transform .15s,box-shadow .15s;
  display:inline-block;
  width:100%;
}
.inspo-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);}

/* Image card */
.inspo-card img{
  width:100%;display:block;
  max-height:380px;object-fit:cover;
}

/* Link card preview strip */
.inspo-link-preview{
  background:var(--surface2);
  padding:22px 16px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-height:100px;gap:8px;
  text-align:center;
}
.inspo-link-icon{
  width:42px;height:42px;border-radius:10px;
  background:var(--surface3);border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:20px;flex-shrink:0;
}
.inspo-link-domain{font-size:11.5px;font-weight:700;color:var(--text-muted);}

.inspo-card-body{padding:10px 13px 13px;}
.inspo-card-title{font-size:13px;font-weight:700;margin-bottom:5px;line-height:1.4;}
.inspo-card-url{
  font-size:11px;color:var(--accent);text-decoration:none;
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  margin-bottom:5px;
}
.inspo-card-url:hover{text-decoration:underline;}
.inspo-card-notes{font-size:12px;color:var(--text-muted);line-height:1.55;margin-top:5px;}
.inspo-card-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding-top:8px;border-top:1px solid var(--border);}
.inspo-card-plat{font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:20px;letter-spacing:.2px;}
.inspo-card-date{font-size:10.5px;color:var(--text-dim);}

/* Hover overlay controls */
.inspo-card-controls{
  position:absolute;top:8px;right:8px;
  display:flex;gap:5px;
  opacity:0;transition:opacity .14s;
}
.inspo-card:hover .inspo-card-controls{opacity:1;}
.inspo-ctrl-btn{
  width:26px;height:26px;border-radius:50%;
  background:rgba(248,244,238,.95);backdrop-filter:blur(4px);
  border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:13px;color:var(--text-muted);
  transition:background .12s,color .12s;
}
.inspo-ctrl-btn:hover{background:var(--accent2);color:#fff;border-color:var(--accent2);}
.inspo-ctrl-btn.open:hover{background:var(--accent);color:#fff;border-color:var(--accent);}

/* Empty state */
.inspo-empty{
  grid-column:1/-1;
  text-align:center;padding:80px 20px;
  color:var(--text-muted);
}
.inspo-empty h3{font-size:16px;font-weight:700;color:var(--text);margin-bottom:6px;}
.inspo-empty p{font-size:13px;margin-bottom:20px;}

/* Add inspo modal type switcher */
.type-switcher{display:flex;gap:0;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;margin-bottom:18px;}
.type-btn{flex:1;padding:9px;text-align:center;font-size:13px;font-weight:700;cursor:pointer;color:var(--text-muted);border:none;background:none;font-family:inherit;transition:background .12s,color .12s;}
.type-btn:hover{background:var(--surface3);}
.type-btn.active{background:var(--accent);color:#fff;}

/* Paste / drop zone in modal */
.img-drop-zone{
  border:2px dashed var(--border2);border-radius:var(--radius);
  padding:36px 20px;text-align:center;
  background:var(--bg);cursor:pointer;
  transition:all .2s;position:relative;
}
.img-drop-zone:hover,.img-drop-zone.drag-over{border-color:var(--accent);background:var(--accent-bg);}
.img-drop-zone input{display:none;}
.img-drop-zone p{font-size:13px;color:var(--text-muted);}
.img-drop-zone p strong{color:var(--text);}
.img-drop-zone .kbd{display:inline-block;background:var(--surface3);border:1px solid var(--border2);border-radius:4px;padding:1px 6px;font-size:11px;font-family:monospace;color:var(--text-muted);margin:0 2px;}

.img-preview-wrap{position:relative;}
.img-preview-wrap img{width:100%;border-radius:var(--radius-sm);display:block;max-height:200px;object-fit:cover;}
.img-preview-clear{position:absolute;top:6px;right:6px;background:rgba(248,244,238,.9);border:1px solid var(--border);border-radius:50%;width:24px;height:24px;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;color:var(--text-muted);}
.img-preview-clear:hover{color:var(--accent2);}

/* Platform pills in modal */
.plat-select-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:4px;}
.plat-pill{padding:5px 12px;border-radius:20px;font-size:12px;font-weight:700;cursor:pointer;border:1px solid var(--border);background:var(--surface2);color:var(--text-muted);transition:all .14s;user-select:none;}
.plat-pill:hover{background:var(--surface3);}
.plat-pill.selected{background:var(--accent);color:#fff;border-color:var(--accent);}

/* ════════════════ GOALS ════════════════ */
.goals-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:28px;box-shadow:var(--shadow);overflow:hidden;}
.goals-toggle{padding:13px 18px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;background:var(--surface2);user-select:none;border-bottom:1px solid transparent;transition:border-color .14s;}
.goals-toggle.open{border-bottom-color:var(--border);}
.goals-toggle h3{font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted);}
.goals-badge{background:var(--accent);color:#fff;font-size:10px;font-weight:800;padding:1px 7px;border-radius:20px;margin-left:6px;}
.goals-chevron{font-size:11px;color:var(--text-muted);transition:transform .2s;display:inline-block;}
.goals-chevron.open{transform:rotate(180deg);}
.goals-body{display:none;padding:16px;}
.goals-body.open{display:block;}
.goals-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;}
.goal-card{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px 14px 12px;position:relative;}
.goal-card-top{display:flex;align-items:center;gap:9px;margin-bottom:12px;}
.goal-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:17px;flex-shrink:0;}
.goal-platform{font-size:13px;font-weight:800;line-height:1.2;}
.goal-metric-lbl{font-size:10.5px;color:var(--text-muted);margin-top:1px;}
.goal-numbers{display:flex;align-items:baseline;gap:5px;margin-bottom:6px;}
.goal-current{font-size:22px;font-weight:800;line-height:1;}
.goal-sep{font-size:13px;color:var(--text-dim);}
.goal-target{font-size:13px;font-weight:600;color:var(--text-muted);}
.goal-pct{font-size:11px;font-weight:700;margin-left:auto;padding:2px 7px;border-radius:20px;}
.goal-bar-wrap{height:7px;background:var(--surface3);border-radius:4px;overflow:hidden;margin-bottom:8px;}
.goal-bar-fill{height:100%;border-radius:4px;transition:width .4s ease;}
.goal-url{font-size:11px;color:var(--text-muted);text-decoration:none;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.goal-url:hover{color:var(--accent);text-decoration:underline;}
.goal-csv-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid var(--border);}
.goal-csv-stat{display:flex;align-items:center;gap:4px;font-size:11px;font-weight:600;background:var(--accent-bg);color:var(--accent);padding:2px 8px;border-radius:20px;}
.goal-controls{position:absolute;top:8px;right:8px;display:flex;gap:4px;opacity:0;transition:opacity .14s;}
.goal-card:hover .goal-controls{opacity:1;}
.goal-ctrl{width:22px;height:22px;border-radius:4px;background:var(--surface2);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:11px;color:var(--text-muted);}
.goal-ctrl:hover{background:var(--accent2);color:#fff;border-color:var(--accent2);}
.goal-add-card{background:var(--surface2);border:2px dashed var(--border2);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;cursor:pointer;min-height:110px;transition:all .14s;font-size:13px;font-weight:600;color:var(--text-muted);gap:6px;}
.goal-add-card:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-bg);}

/* ── Analytics ── */
.yt-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:10px;}
.yt-toolbar-left{display:flex;align-items:center;gap:8px;}
.range-btns{display:flex;gap:0;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;}
.range-btn{padding:6px 13px;font-size:12px;font-weight:700;cursor:pointer;color:var(--text-muted);border:none;background:none;font-family:inherit;transition:background .12s,color .12s;}
.range-btn:hover{background:var(--surface3);}
.range-btn.active{background:var(--accent);color:#fff;}
.range-label{font-size:12px;color:var(--text-muted);font-weight:600;}
.period-nav{display:flex;gap:4px;align-items:center;}
.period-btn{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);width:28px;height:28px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:13px;transition:background .12s;}
.period-btn:hover{background:var(--surface2);color:var(--text);}
.metric-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-bottom:24px;}
.metric-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);}
.metric-card-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted);margin-bottom:6px;}
.metric-card-value{font-size:26px;font-weight:800;line-height:1;}
.metric-card-sub{font-size:11px;color:var(--text-muted);margin-top:4px;}
.metric-card-bar{height:3px;border-radius:2px;margin-top:10px;background:var(--surface3);}
.metric-card-bar-fill{height:100%;border-radius:2px;}
.chart-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px 16px 12px;box-shadow:var(--shadow);margin-bottom:24px;overflow:hidden;}
.chart-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.chart-header h4{font-size:13px;font-weight:800;color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px;}
.chart-legend{display:flex;gap:14px;}
.legend-item{display:flex;align-items:center;gap:5px;font-size:11.5px;color:var(--text-muted);font-weight:600;}
.legend-dot{width:8px;height:8px;border-radius:50%;}
.chart-svg{width:100%;display:block;}
.chart-tooltip{position:fixed;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 12px;font-size:12px;pointer-events:none;z-index:300;box-shadow:var(--shadow-lg);display:none;}
.chart-tooltip strong{display:block;font-size:11px;color:var(--text-muted);margin-bottom:3px;}
.yt-table-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);}
.yt-table-header{padding:12px 16px;background:var(--surface2);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;}
.yt-table-header h4{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted);}
.yt-scroll{overflow-x:auto;max-height:320px;overflow-y:auto;}
.sug-source-list{display:flex;flex-direction:column;gap:8px;margin-bottom:24px;}
.sug-source-row{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 16px;display:flex;align-items:center;gap:12px;}
.sug-source-name{font-size:13px;font-weight:700;flex:1;}
.sug-bar-wrap{flex:2;height:8px;background:var(--surface3);border-radius:4px;overflow:hidden;}
.sug-bar{height:100%;border-radius:4px;}
.sug-views{font-size:12.5px;font-weight:700;min-width:70px;text-align:right;}
.sug-pct{font-size:11px;color:var(--text-muted);min-width:40px;text-align:right;}
.upload-prompt{border:2px dashed var(--border2);border-radius:var(--radius);padding:50px 30px;text-align:center;background:var(--surface);}
.upload-prompt svg{opacity:.3;margin:0 auto 14px;display:block;}
.upload-prompt h3{font-size:15px;font-weight:700;margin-bottom:6px;}
.upload-prompt p{font-size:13px;color:var(--text-muted);margin-bottom:16px;line-height:1.6;}
.upload-prompt code{background:var(--surface2);border:1px solid var(--border);padding:2px 7px;border-radius:4px;font-size:12px;}

/* ════ VIDEO TABS ════ */
.csv-video-layout{display:grid;grid-template-columns:290px 1fr;gap:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);margin-top:20px;height:calc(100vh - 260px);min-height:500px;}
.video-list{border-right:1px solid var(--border);overflow-y:auto;background:var(--surface2);display:flex;flex-direction:column;}
.video-list-header{padding:11px 16px;background:var(--surface3);border-bottom:1px solid var(--border);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);position:sticky;top:0;z-index:1;flex-shrink:0;}
.video-list-item{padding:11px 14px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .12s;display:flex;gap:10px;align-items:flex-start;border-left:3px solid transparent;}
.video-list-item:hover{background:var(--surface);}
.video-list-item.active{background:var(--accent-bg);border-left-color:var(--accent);}
.video-rank{font-size:10.5px;font-weight:800;color:var(--text-dim);min-width:22px;padding-top:2px;flex-shrink:0;}
.video-list-item.active .video-rank{color:var(--accent);}
.video-list-item:nth-child(-n+4) .video-rank{color:var(--accent4);}
.video-list-info{flex:1;min-width:0;}
.video-list-title{font-size:12px;font-weight:600;line-height:1.4;color:var(--text);margin-bottom:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.video-list-item.active .video-list-title{color:var(--accent);}
.video-list-views{font-size:11px;color:var(--text-muted);font-weight:700;}
.video-list-bar{height:3px;background:var(--surface3);border-radius:2px;margin-top:5px;overflow:hidden;}
.video-list-bar-fill{height:100%;border-radius:2px;background:var(--accent);opacity:.5;}
.video-list-item.active .video-list-bar-fill{opacity:1;}

.video-detail{overflow-y:auto;padding:28px 28px 32px;background:var(--surface);}
.video-detail-rank{display:inline-flex;align-items:center;gap:6px;background:var(--accent);color:#fff;font-size:10px;font-weight:800;padding:3px 10px;border-radius:20px;letter-spacing:.4px;text-transform:uppercase;margin-bottom:14px;}
.video-detail-title{font-size:20px;font-weight:800;line-height:1.35;margin-bottom:10px;color:var(--text);}
.video-detail-meta{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px;align-items:center;}
.video-detail-meta-item{font-size:12px;color:var(--text-muted);font-weight:600;display:flex;align-items:center;gap:4px;}
.video-yt-link{font-size:12px;font-weight:700;color:var(--accent);text-decoration:none;padding:4px 10px;background:var(--accent-bg);border:1px solid var(--border);border-radius:20px;transition:opacity .14s;}
.video-yt-link:hover{opacity:.78;}

.video-stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-bottom:20px;}
.video-stat-card{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px 14px 12px;}
.video-stat-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-bottom:7px;}
.video-stat-value{font-size:22px;font-weight:800;line-height:1;}
.video-stat-sub{font-size:11px;color:var(--text-muted);margin-top:3px;}

.video-perf-section{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px 18px;}
.video-perf-title{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-bottom:14px;}
.video-perf-row{display:flex;align-items:center;gap:10px;margin-bottom:11px;}
.video-perf-row:last-child{margin-bottom:0;}
.video-perf-label{font-size:11.5px;color:var(--text-muted);font-weight:600;min-width:100px;}
.video-perf-bar-wrap{flex:1;height:7px;background:var(--surface3);border-radius:4px;overflow:hidden;}
.video-perf-bar-fill{height:100%;border-radius:4px;transition:width .5s ease;}
.video-perf-pct{font-size:11.5px;font-weight:700;color:var(--text-muted);min-width:42px;text-align:right;}

/* ── CSV Import ── */
.drop-zone{border:2px dashed var(--border2);border-radius:var(--radius);padding:56px 40px;text-align:center;background:var(--surface);cursor:pointer;transition:all .2s;}
.drop-zone:hover,.drop-zone.drag-over{border-color:var(--accent);background:var(--accent-bg);}
.drop-zone svg{opacity:.35;margin:0 auto 14px;display:block;}
.drop-zone p{color:var(--text-muted);font-size:13.5px;}
.drop-zone p strong{color:var(--text);}
.drop-zone input{display:none;}
.csv-preview{margin-top:20px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);}
.csv-header{padding:12px 16px;background:var(--surface2);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;}
.csv-header h3{font-size:13px;font-weight:700;}
.csv-header p{font-size:11.5px;color:var(--text-muted);margin-top:2px;}
.csv-scroll{overflow:auto;max-height:420px;}
table{width:100%;border-collapse:collapse;font-size:12.5px;}
thead{position:sticky;top:0;z-index:2;}
th{background:var(--surface3);padding:9px 13px;text-align:left;font-weight:700;font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid var(--border);white-space:nowrap;}
td{padding:8px 13px;border-bottom:1px solid var(--border);max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
tr:last-child td{border-bottom:none;}
tr:hover td{background:var(--surface2);}

/* ── Modals ── */
.modal-backdrop{position:fixed;inset:0;background:rgba(60,45,30,.45);display:flex;align-items:center;justify-content:center;z-index:200;padding:20px;}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:100%;max-width:480px;box-shadow:var(--shadow-lg);animation:pop .15s ease;}
.modal-lg{max-width:540px;}
@keyframes pop{from{opacity:0;transform:scale(.96) translateY(6px);}to{opacity:1;transform:none;}}
.modal-header{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;}
.modal-header h3{font-size:15px;font-weight:800;}
.modal-close{background:none;border:none;color:var(--text-muted);font-size:21px;cursor:pointer;line-height:1;padding:0 3px;}
.modal-close:hover{color:var(--text);}
.modal-body{padding:18px 20px;}
.modal-footer{padding:14px 20px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:8px;}
.form-group{margin-bottom:14px;}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
label{display:block;font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px;margin-bottom:5px;}
input,select,textarea{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 11px;font-size:13.5px;color:var(--text);outline:none;font-family:inherit;transition:border-color .14s;}
input:focus,select:focus,textarea:focus{border-color:var(--accent);}
textarea{resize:vertical;min-height:72px;}
select option{background:var(--surface);}
.color-row{display:flex;gap:7px;flex-wrap:wrap;}
.swatch{width:26px;height:26px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:transform .12s,border-color .12s;}
.swatch:hover{transform:scale(1.18);}
.swatch.selected{border-color:var(--text);}
::-webkit-scrollbar{width:5px;height:5px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--surface3);border-radius:3px;}
::-webkit-scrollbar-thumb:hover{background:var(--border2);}
