/* ---- DASHBOARD LAYOUT ---- */
.db-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.db-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.db-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.db-brand-ghost { font-size: 1.4rem; }

.db-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.db-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }

.db-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.db-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--fg);
}

.db-nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(192,132,252,0.2);
}

.db-nav-icon { font-size: 1rem; }

.db-back-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--fg-muted);
  font-size: 0.8rem;
  text-decoration: none;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.db-back-link:hover { color: var(--fg); }

/* ---- MAIN ---- */
.db-main {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-x: auto;
}

.db-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.db-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.db-subtitle {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.db-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--fg-muted);
}

/* ---- BUTTONS ---- */
.btn-primary {
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover { border-color: rgba(255,255,255,0.2); color: var(--fg); }

.btn-danger {
  padding: 0.35rem 0.7rem;
  background: transparent;
  color: var(--crime);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger:hover { background: rgba(239,68,68,0.1); }

.btn-danger-xs {
  padding: 0.2rem 0.5rem;
  background: transparent;
  color: var(--crime);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
}

/* ---- TABLE ---- */
.db-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.db-table th {
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
}

.db-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.db-table tr:last-child td { border-bottom: none; }

.db-table tr:hover td { background: rgba(255,255,255,0.02); }

.db-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ---- NICHE PILLS ---- */
.niche-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.niche-true-crime { background: rgba(239,68,68,0.12); color: var(--crime); }
.niche-finance { background: rgba(34,197,94,0.12); color: var(--finance); }
.niche-ai-news { background: rgba(129,140,248,0.12); color: var(--ai); }
.niche-motivation { background: rgba(245,158,11,0.12); color: var(--motivation); }
.niche-football { background: rgba(6,182,212,0.12); color: var(--football); }
.niche-tech { background: rgba(236,72,153,0.12); color: var(--tech); }
.niche-documentaries { background: rgba(167,139,250,0.12); color: var(--docs); }

/* ---- EMPTY STATE ---- */
.db-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-muted);
}

.db-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.db-empty h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--fg); margin-bottom: 0.5rem; }
.db-empty p { margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ---- KANBAN ---- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.kanban-col {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.kanban-col-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  border-top: 3px solid;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-col-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.kanban-col-count {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  color: var(--fg-muted);
}

.kanban-cards {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 120px;
}

.kanban-empty {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.8rem;
  padding: 1.5rem;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem;
  transition: border-color 0.2s;
}

.kanban-card:hover { border-color: rgba(255,255,255,0.12); }

.kanban-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.kanban-card-meta { margin-bottom: 0.5rem; }

.kanban-channel {
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.kanban-card-notes {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.kanban-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.status-select {
  font-size: 0.78rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  flex: 1;
}

/* ---- REVENUE ---- */
.rev-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.rev-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
}

.rev-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.rev-card-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rev-ad { color: var(--finance); }
.rev-affiliate { color: var(--motivation); }
.rev-sponsor { color: var(--accent); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}

.modal-close:hover { color: var(--fg); }

/* ---- FORMS ---- */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(192,132,252,0.4);
}

.form-group textarea { resize: vertical; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--finance);
  border-radius: 8px;
  padding: 0.75rem 1.2rem;
  font-size: 0.875rem;
  z-index: 9999;
  animation: toast-in 0.3s ease;
}

.toast.error { border-left-color: var(--crime); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .db-main { padding: 1.5rem 1rem; }
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
  .rev-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .db-sidebar { display: none; }
  .kanban-board { grid-template-columns: 1fr; }
  .rev-summary { grid-template-columns: 1fr 1fr; }
}
