/* ============================
   CREATOROS — STYLE.CSS
   Apple + Linear + Notion Dark
============================ */

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #16161f;
  --bg4: #1c1c28;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.13);

  --text: #f0f0f8;
  --text2: #9191a8;
  --text3: #5e5e78;

  --accent: #7c5cfc;
  --accent2: #9b7ffe;
  --accent-glow: rgba(124,92,252,0.25);

  --green: #22d484;
  --green-dim: rgba(34,212,132,0.15);
  --yellow: #f5c842;
  --yellow-dim: rgba(245,200,66,0.15);
  --red: #f55c5c;
  --red-dim: rgba(245,92,92,0.15);
  --blue: #4ea7fc;
  --blue-dim: rgba(78,167,252,0.15);
  --orange: #ff8c42;
  --orange-dim: rgba(255,140,66,0.15);
  --purple: #c45cfc;
  --purple-dim: rgba(196,92,252,0.15);

  --sidebar-w: 240px;
  --topbar-h: 60px;
  --bnav-h: 64px;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-sm: 8px;

  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ==================
   SIDEBAR
================== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 20px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 22px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.sidebar-close { display: none; background: none; border: none; color: var(--text2); cursor: pointer; font-size: 16px; }

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: none;
  color: var(--text2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 99px;
}

.nav-icon { font-size: 15px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  color: #fff;
}

.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-role { font-size: 11px; color: var(--text3); }

/* ==================
   MAIN
================== */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.topbar-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  flex: 1;
}

/* ==================
   PAGES
================== */
.pages { flex: 1; }

.page { display: none; padding: 32px 28px 100px; }
.page.active { display: block; animation: fadeUp 0.35s cubic-bezier(0.4,0,0.2,1); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-subtitle { color: var(--text2); font-size: 14px; margin-top: 4px; }

/* ==================
   BUTTONS
================== */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(245,92,92,0.25);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover { background: rgba(245,92,92,0.25); }

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--surface2); color: var(--text); }

.btn-small {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-small:hover { color: var(--accent); border-color: var(--accent); }

/* ==================
   STAT CARDS
================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: all var(--transition);
}

.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover::before { opacity: 1; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-sub { font-size: 12px; color: var(--text2); }

/* ==================
   SECTION GRID
================== */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.section-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.section-block.full-width { grid-column: 1/-1; }

.section-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
}

.item-list { padding: 8px; }

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
}

.item-row:hover { background: var(--surface); }

.item-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.item-info { flex: 1; min-width: 0; }
.item-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.item-badge { flex-shrink: 0; }

/* ==================
   PIPELINE BAR
================== */
.pipeline-bar {
  padding: 20px;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.pipeline-segment {
  height: 8px;
  border-radius: 99px;
  transition: all var(--transition);
  cursor: default;
  position: relative;
}

.pipeline-segment:hover { transform: scaleY(2); }

.pipeline-legend {
  width: 100%;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
}

.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* ==================
   BADGES
================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-idea     { background: var(--surface);   color: var(--text2); }
.badge-research { background: var(--yellow-dim); color: var(--yellow); }
.badge-script   { background: var(--blue-dim);   color: var(--blue); }
.badge-recording{ background: var(--orange-dim); color: var(--orange); }
.badge-editing  { background: var(--purple-dim); color: var(--purple); }
.badge-ready    { background: var(--green-dim);  color: var(--green); }
.badge-published{ background: rgba(124,92,252,0.2); color: var(--accent2); }

.dot-idea      { background: var(--text3); }
.dot-research  { background: var(--yellow); }
.dot-script    { background: var(--blue); }
.dot-recording { background: var(--orange); }
.dot-editing   { background: var(--purple); }
.dot-ready     { background: var(--green); }
.dot-published { background: var(--accent); }

/* ==================
   FILTER BAR
================== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input, .filter-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  transition: border-color var(--transition);
  outline: none;
}

.search-input { flex: 1; min-width: 200px; }
.search-input::placeholder { color: var(--text3); }
.search-input:focus, .filter-select:focus { border-color: var(--accent); }
.filter-select { cursor: pointer; }
.filter-select.wide { flex: 1; }

/* ==================
   VIDEO GRID & CARDS
================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.video-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

.video-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.video-card-top {
  padding: 18px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.video-card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.video-card-body {
  padding: 10px 18px 14px;
}

.video-card-hook {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.video-card-series {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}

.video-card-actions {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
}

.action-btn {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.action-btn:hover { background: var(--surface2); color: var(--text); }
.action-btn.del:hover { border-color: var(--red); color: var(--red); }

/* ==================
   KANBAN
================== */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 500px;
}

.kanban-col {
  min-width: 240px;
  max-width: 240px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kanban-col-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.kanban-count {
  font-size: 11px;
  background: var(--surface2);
  color: var(--text2);
  padding: 2px 8px;
  border-radius: 99px;
}

.kanban-cards {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 80px;
}

.kanban-cards.drag-over {
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
}

.kanban-card {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: all var(--transition);
  user-select: none;
}

.kanban-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.kanban-card-series {
  font-size: 11px;
  color: var(--text3);
}

/* ==================
   SCRIPTS
================== */
.script-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  height: calc(100vh - 220px);
}

.script-sidebar {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.script-list-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.script-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.script-list-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.script-list-item:hover { background: var(--surface); }
.script-list-item.active { background: var(--accent-glow); border-color: rgba(124,92,252,0.3); }

.script-list-title { font-size: 13px; font-weight: 600; }
.script-list-meta { font-size: 11px; color: var(--text3); margin-top: 3px; }

.script-editor-area {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.script-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text3);
  font-size: 14px;
}

.script-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.script-editor-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.script-title-input {
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  outline: none;
  flex: 1;
}

.script-title-input::placeholder { color: var(--text3); }

.script-stats {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

.script-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.script-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent2);
  margin-bottom: 6px;
}

.script-textarea {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color var(--transition);
}

.script-textarea:focus { border-color: var(--accent); }

.autosave-indicator {
  font-size: 11px;
  color: var(--text3);
  padding: 8px 20px;
  border-top: 1px solid var(--border);
  text-align: right;
}

/* ==================
   SERIES
================== */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.series-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all var(--transition);
}

.series-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.series-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.series-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
}

.series-emoji {
  font-size: 28px;
  line-height: 1;
}

.series-description {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
  line-height: 1.5;
}

.progress-bar-wrap {
  background: var(--surface);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.series-stats {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}

.series-stat-item { font-size: 12px; color: var(--text2); }
.series-stat-value { font-weight: 700; color: var(--text); }

.series-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ==================
   THUMBNAILS
================== */
.thumb-card-checklist {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface);
  color: var(--text3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.check-pill.checked {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34,212,132,0.2);
}

/* ==================
   SEO
================== */
.seo-select-bar { margin-bottom: 24px; }

.seo-editor {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.seo-editor.hidden { display: none; }

.seo-field-group {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.seo-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.seo-counter { color: var(--accent2); }
.seo-counter.over { color: var(--red); }

.seo-input {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
}

.seo-input:focus { border-color: var(--accent); }

.seo-textarea {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color var(--transition);
}

.seo-textarea:focus { border-color: var(--accent); }

.tags-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: text;
  min-height: 44px;
  align-items: center;
  transition: border-color var(--transition);
}

.tags-input-wrap:focus-within { border-color: var(--accent); }

.tag-chip {
  background: var(--accent-glow);
  color: var(--accent2);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag-chip-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 11px;
  line-height: 1;
}

.tag-chip-remove:hover { opacity: 1; }

.tags-bare-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  min-width: 80px;
  flex: 1;
}

.seo-actions {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
}

/* ==================
   CALENDAR
================== */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}

.calendar-grid {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}

.cal-day-name {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
}

.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 90px;
  padding: 8px;
  transition: background var(--transition);
}

.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--surface); }
.cal-cell.other-month { opacity: 0.3; }
.cal-cell.today { background: var(--accent-glow); }

.cal-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 4px;
}

.cal-cell.today .cal-date {
  background: var(--accent);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-event {
  background: var(--accent-glow);
  color: var(--accent2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ==================
   TASKS
================== */
.task-layout { display: flex; flex-direction: column; gap: 12px; }

.task-input-area {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.task-input-field {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  flex: 1;
  min-width: 200px;
  transition: border-color var(--transition);
}

.task-input-field:focus { border-color: var(--accent); }

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
}

.task-item:hover { border-color: var(--border2); }
.task-item.done { opacity: 0.5; }

.task-checkbox {
  width: 18px; height: 18px;
  border: 2px solid var(--border2);
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.task-checkbox.checked {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  font-size: 11px;
}

.task-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.task-item.done .task-text {
  text-decoration: line-through;
  color: var(--text3);
}

.task-due { font-size: 12px; color: var(--text3); }
.task-priority-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-high { background: var(--red-dim); color: var(--red); }
.priority-low  { background: var(--blue-dim); color: var(--blue); }
.priority-normal { background: var(--surface); color: var(--text3); }

.task-delete {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
}

.task-delete:hover { color: var(--red); }

/* ==================
   ANALYTICS
================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.chart-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}

.chart-card.wide { grid-column: 1/-1; }

canvas { max-height: 280px; }

/* ==================
   BACKUP
================== */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.backup-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.backup-card.danger { border-color: rgba(245,92,92,0.2); }

.backup-icon {
  font-size: 32px;
  line-height: 1;
}

.backup-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
}

.backup-card p { font-size: 13px; color: var(--text2); line-height: 1.5; }

.backup-info {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.8;
}

/* ==================
   MODAL
================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.overlay.active { opacity: 1; pointer-events: all; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

.modal-box.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
}

.modal-close {
  background: var(--surface);
  border: none;
  color: var(--text2);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--surface2); color: var(--text); }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---- Form Fields in Modal ---- */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text3);
  margin-bottom: 7px;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ==================
   TOAST
================== */
.toast-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

.toast.out { animation: slideOut 0.3s cubic-bezier(0.4,0,0.2,1) forwards; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ==================
   BOTTOM NAV
================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: rgba(17,17,24,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0 8px;
  gap: 0;
}

.bnav-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: color var(--transition);
  padding: 8px 4px;
  border-radius: var(--radius-sm);
}

.bnav-item span { font-size: 18px; }
.bnav-item small { font-size: 10px; font-weight: 600; }
.bnav-item.active { color: var(--accent2); }

/* ==================
   EMPTY STATE
================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text3);
  text-align: center;
  gap: 12px;
}

.empty-state-icon { font-size: 48px; }
.empty-state-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text2); }
.empty-state-text { font-size: 13px; max-width: 280px; line-height: 1.6; }

/* ==================
   CONFIRM DIALOG
================== */
.confirm-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* ==================
   RESPONSIVE
================== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-close { display: block; }

  .main { margin-left: 0; }
  .menu-btn { display: block; }

  .bottom-nav { display: flex; }

  .toast-container { bottom: 80px; }

  .section-grid { grid-template-columns: 1fr; }

  .analytics-grid { grid-template-columns: 1fr; }
  .chart-card.wide { grid-column: auto; }

  .script-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .script-sidebar { min-height: 200px; }

  .page { padding: 20px 16px 100px; }

  .page-title { font-size: 22px; }

  .kanban-board { gap: 12px; }
  .kanban-col { min-width: 200px; }
}

@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: 1fr; }
  .backup-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .search-input { min-width: unset; }
}

/* ==================
   GLASS SHIMMER EFFECT
================== */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ==================
   GRADIENT ACCENTS
================== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent2), var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================
   NOISE OVERLAY
================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}
