/* ===================================================================
   Marketing Hub — FrancBrain-inspired Design System
   =================================================================== */

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

/* ----------------------------- Theme Variables -------------------- */
:root {
  /* Colors – Light (default) */
  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Brand */
  --pink: #E8175D;
  --cyan: #0099CC;
  --brand: #E8175D;
  --brand-light: rgba(232, 23, 93, 0.08);
  --brand-hover: #d01452;

  /* Semantic */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);

  /* Status colors for content pipeline */
  --status-processing: #8b5cf6;
  --status-processing-bg: rgba(139, 92, 246, 0.1);
  --status-pending: #f59e0b;
  --status-pending-bg: rgba(245, 158, 11, 0.1);
  --status-approved: #10b981;
  --status-approved-bg: rgba(16, 185, 129, 0.1);
  --status-published: #3b82f6;
  --status-published-bg: rgba(59, 130, 246, 0.1);
  --status-rejected: #ef4444;
  --status-rejected-bg: rgba(239, 68, 68, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Sidebar */
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-width: 240px;

  /* Topbar */
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --topbar-border: #e2e8f0;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ----------------------------- Dark Theme ------------------------ */
[data-theme="dark"] {
  --bg: #06060e;
  --surface: #0a0a18;
  --surface-hover: #111128;
  --border: #1e1e35;
  --border-hover: #2d2d4a;

  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --brand-light: rgba(232, 23, 93, 0.15);
  --brand-hover: #f02068;

  --success-bg: rgba(16, 185, 129, 0.15);
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info-bg: rgba(59, 130, 246, 0.15);

  --status-processing-bg: rgba(139, 92, 246, 0.18);
  --status-pending-bg: rgba(245, 158, 11, 0.18);
  --status-approved-bg: rgba(16, 185, 129, 0.18);
  --status-published-bg: rgba(59, 130, 246, 0.18);
  --status-rejected-bg: rgba(239, 68, 68, 0.18);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);

  --sidebar-bg: #080814;
  --sidebar-border: rgba(255, 255, 255, 0.06);

  --topbar-bg: rgba(6, 6, 14, 0.85);
  --topbar-border: #1e1e35;
}

/* ----------------------------- Base ------------------------------- */
html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ----------------------------- Scrollbar -------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===================================================================
   LOGIN SCREEN
   =================================================================== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px 32px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-mark {
  display: inline-flex;
  margin-bottom: 16px;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
}

.login-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===================================================================
   FORM ELEMENTS
   =================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  color: #fff;
  box-shadow: 0 1px 3px rgba(232, 23, 93, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(232, 23, 93, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-full {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 10px;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* ===================================================================
   BRAND PILLS
   =================================================================== */
.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-pill--pink {
  background: rgba(232, 23, 93, 0.1);
  color: var(--pink);
}

.brand-pill--cyan {
  background: rgba(0, 153, 204, 0.1);
  color: var(--cyan);
}

/* ===================================================================
   BADGES
   =================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--processing {
  background: var(--status-processing-bg);
  color: var(--status-processing);
}

.badge--pending {
  background: var(--status-pending-bg);
  color: var(--status-pending);
}

.badge--approved {
  background: var(--status-approved-bg);
  color: var(--status-approved);
}

.badge--published {
  background: var(--status-published-bg);
  color: var(--status-published);
}

.badge--rejected {
  background: var(--status-rejected-bg);
  color: var(--status-rejected);
}

.badge--success {
  background: var(--success-bg);
  color: var(--success);
}

.badge--warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge--info {
  background: var(--info-bg);
  color: var(--info);
}

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

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

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

.sidebar-brand-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
}

.sidebar-close:hover {
  background: var(--sidebar-hover);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group-label {
  display: block;
  padding: 8px 20px 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  margin: 1px 8px;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

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

.nav-item.active {
  background: rgba(232, 23, 93, 0.12);
  color: var(--sidebar-text-active);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--pink);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  justify-content: center;
  gap: 6px;
}

/* ===================================================================
   SIDEBAR OVERLAY (mobile)
   =================================================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.visible {
  display: block;
}

/* ===================================================================
   MAIN CONTENT AREA
   =================================================================== */
.app {
  min-height: 100vh;
}

.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================================================================
   TOPBAR
   =================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 56px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* Theme toggle icons */
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ===================================================================
   CONTENT AREA
   =================================================================== */
.content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

/* ===================================================================
   PAGE HEADER
   =================================================================== */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.page-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--brand-light);
  color: var(--brand);
  flex-shrink: 0;
}

.page-header-icon svg {
  width: 22px;
  height: 22px;
}

.page-header-text h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.page-header-text p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.stat-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: 20px;
  height: 20px;
}

.stat-card-icon--pink  { background: rgba(232, 23, 93, 0.1); color: var(--pink); }
.stat-card-icon--cyan  { background: rgba(0, 153, 204, 0.1); color: var(--cyan); }
.stat-card-icon--green { background: var(--success-bg); color: var(--success); }
.stat-card-icon--amber { background: var(--warning-bg); color: var(--warning); }
.stat-card-icon--blue  { background: var(--info-bg); color: var(--info); }
.stat-card-icon--red   { background: var(--danger-bg); color: var(--danger); }

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===================================================================
   SECTION HEADERS & PANELS
   =================================================================== */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.panel-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.panel-body {
  padding: 16px 20px;
}

/* ===================================================================
   TWO-COLUMN LAYOUT
   =================================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* ===================================================================
   FILTER TABS (underline style)
   =================================================================== */
.filter-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  padding: 10px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ===================================================================
   DATA TABLE
   =================================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.data-table tbody td {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

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

/* ===================================================================
   CONTENT CARDS
   =================================================================== */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 16px;
}

.content-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.content-card-main {
  display: flex;
  gap: 16px;
  padding: 16px;
}

.content-card-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface-hover);
  flex-shrink: 0;
}

.content-card-info {
  flex: 1;
  min-width: 0;
}

.content-card-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.content-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.content-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.content-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

/* Expandable platform copies */
.content-card-expand {
  border-top: 1px solid var(--border);
}

.content-card-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.content-card-expand-toggle:hover {
  background: var(--surface-hover);
}

.content-card-expand-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.content-card-expand-toggle.open svg {
  transform: rotate(180deg);
}

.content-card-expand-body {
  display: none;
  padding: 0 16px 16px;
}

.content-card-expand-body.open {
  display: block;
}

/* Platform copy cards */
.platform-copy {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
}

.platform-copy:last-child {
  margin-bottom: 0;
}

.platform-copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.platform-copy-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.platform-copy-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.platform-copy-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.platform-copy-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ===================================================================
   REVIEW CARDS
   =================================================================== */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.review-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

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

.review-card-author {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.review-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.star.filled {
  color: #f59e0b;
}

.review-card-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.review-card-text.expandable {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-card-text.expanded {
  -webkit-line-clamp: unset;
}

.review-card-response {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.review-card-response-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.review-card-response-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.review-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Sentiment badges */
.sentiment--positive { background: var(--success-bg); color: var(--success); }
.sentiment--neutral  { background: var(--info-bg); color: var(--info); }
.sentiment--negative { background: var(--danger-bg); color: var(--danger); }

/* ===================================================================
   UPLOAD ZONE
   =================================================================== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--surface);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}

.upload-zone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  margin: 0 auto 16px;
}

.upload-zone-icon svg {
  width: 28px;
  height: 28px;
}

.upload-zone h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.upload-zone p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.upload-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.upload-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

/* ===================================================================
   CHART CONTAINERS
   =================================================================== */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

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

.chart-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.chart-card canvas {
  width: 100% !important;
  max-height: 280px;
}

/* ===================================================================
   SETTINGS
   =================================================================== */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.settings-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===================================================================
   PAGINATION
   =================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.pagination button.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===================================================================
   TOAST NOTIFICATIONS
   =================================================================== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  color: var(--text);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all var(--transition-slow);
  max-width: 380px;
}

.toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.toast--exiting {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
}

.toast--success .toast-icon { color: var(--success); }
.toast--error .toast-icon   { color: var(--danger); }
.toast--info .toast-icon    { color: var(--info); }

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

.toast-message {
  flex: 1;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text);
}

/* ===================================================================
   EMPTY STATE
   =================================================================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.875rem;
}

/* ===================================================================
   LOADING SPINNER
   =================================================================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================================================================
   QUICK ACTION ROW
   =================================================================== */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

/* ===================================================================
   LIST ITEM (compact content/review row in dashboard)
   =================================================================== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-hover);
  flex-shrink: 0;
}

.list-item-info {
  flex: 1;
  min-width: 0;
}

.list-item-info h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===================================================================
   FILTERS ROW
   =================================================================== */
.filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters-row select,
.filters-row input {
  max-width: 200px;
}

/* ===================================================================
   BULK ACTIONS BAR
   =================================================================== */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--brand-light);
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--text);
}

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

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
  }

  .main {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .topbar {
    padding: 0 16px;
  }

  .content {
    padding: 16px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

  .stat-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .upload-form-fields {
    grid-template-columns: 1fr;
  }

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

  .content-card-main {
    flex-direction: column;
  }

  .content-card-thumb {
    width: 100%;
    height: 180px;
  }

  .filters-row {
    flex-direction: column;
  }

  .filters-row select,
  .filters-row input {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card-value {
    font-size: 1.375rem;
  }

  .login-card {
    padding: 28px 20px 20px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .review-card-actions {
    flex-direction: column;
  }

  .review-card-actions .btn {
    width: 100%;
  }
}
