/* ═══════════════════════════════════════════════════════════════
   Instagram Reporter - Premium Dark Theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border: #E6E8F0;
  --border-light: #C9CDD8;
  --text-primary: #111827;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --gradient-instagram: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  --gradient-purple: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  --gradient-pink: linear-gradient(135deg, #ec4899, #db2777);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #2563eb);
  --sidebar-width: 260px;
  --topbar-height: 68px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15,23,42,0.06);
  --shadow-md: 0 12px 32px rgba(15,23,42,0.09);
  --shadow-lg: 0 16px 48px rgba(15,23,42,0.12);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ─── Sidebar ─────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

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

.logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-instagram);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

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

.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-instagram);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-group-title {
  margin: 14px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}
.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 50px 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}
.nav-btn-text {
  flex: 1;
  min-width: 0;
}

.nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-btn:hover { background: var(--bg-card); color: var(--text-primary); }

.nav-btn.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(236,72,153,0.1));
  color: var(--accent-purple);
}

.sidebar-accounts { padding: 16px 12px; flex: 1; overflow-y: auto; }

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 16px 8px;
}

.sidebar-account-list { display: flex; flex-direction: column; gap: 2px; }

.sidebar-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-account-item:hover { background: var(--bg-card); }

.sidebar-account-item img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.sidebar-account-item span {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Main Content ─────────────────────────────── */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 16px;
  background: linear-gradient(90deg, #111827 0%, #1e293b 100%);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
}

.menu-toggle svg { width: 24px; height: 24px; }

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
  color: #ffffff;
}

.current-date {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .current-date { display: none; }
}

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

/* ─── Views ─────────────────────────────── */

.view { display: none; padding: 32px; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

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

/* ─── Empty State ─────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.empty-icon {
  width: 80px; height: 80px;
  background: var(--gradient-instagram);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: white;
  animation: float 3s ease-in-out infinite;
}

.empty-icon svg { width: 40px; height: 40px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-state h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; font-size: 15px; }

/* ─── Buttons ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: white;
  box-shadow: 0 6px 14px rgba(109,40,217,0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(109,40,217,0.30);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-weight: 500;
}

.btn-secondary:hover {
  background: rgba(139,92,246,0.06);
  border-color: #C4B5FD;
  color: var(--accent-purple);
}

.btn-danger { background: rgba(239,68,68,0.15); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-generate { padding: 12px 28px; font-size: 15px; }

/* ─── Dashboard ─────────────────────────── */

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.quick-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-action-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-action-card.cover-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}
/* Cover sayfasında başlık + kalem butonunu inline tutar */
.cover-edit-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cover-edit-btn {
  width: 28px !important;
  height: 28px !important;
  opacity: 0.55;
}
.cover-edit-btn:hover { opacity: 1; }
.pdf-export-mode .cover-edit-btn { display: none !important; }

/* ── Unified cover edit button ── */
.cover-edit-unified {
  position: absolute;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  line-height: 1;
}
.cover-edit-unified:hover {
  background: var(--bg-hover, rgba(139,92,246,0.08));
  border-color: var(--accent, #7c3aed);
  color: var(--accent, #7c3aed);
  box-shadow: 0 2px 10px rgba(124,58,237,0.12);
}
.pdf-export-mode .cover-edit-unified { display: none !important; }
.edit-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.edit-btn:hover {
  background: var(--bg-input);
  color: var(--accent-purple);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}
.no-pdf {
  display: flex;
}
@media print {
  .no-pdf { display: none !important; }
}
.pdf-export-mode .no-pdf,
.pdf-export-mode .chart-expand-btn {
  display: none !important;
}

.quick-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.quick-icon svg { width: 24px; height: 24px; }

.gradient-purple { background: var(--gradient-purple); }
.gradient-pink { background: var(--gradient-pink); }
.gradient-blue { background: var(--gradient-blue); }

.quick-info h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.quick-info p { font-size: 13px; color: var(--text-secondary); }

.dashboard-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ─── Accounts ─────────────────────────── */

.accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.accounts-header h2 { font-size: 24px; font-weight: 700; }

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow);
}

.account-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.account-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.account-card-header img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: var(--gradient-instagram) border-box;
  background-clip: padding-box, border-box;
}

.account-card-header .account-name { font-size: 17px; font-weight: 700; color: #111827; letter-spacing: -0.01em; }
.account-card-header .account-ig { font-size: 13px; color: var(--text-muted); font-weight: 400; }

.account-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.account-card-actions .btn { flex: 1; justify-content: center; font-size: 13px; padding: 8px 12px; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.info-card h3 { font-size: 18px; margin-bottom: 16px; }

.info-card ol {
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 2;
  font-size: 14px;
}

.info-card a { color: var(--accent-purple); text-decoration: none; }
.info-card a:hover { text-decoration: underline; }
.info-card code { background: var(--bg-input); padding: 2px 8px; border-radius: 4px; font-size: 12px; color: var(--accent-pink); }

.info-note { margin-top: 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ─── Report Controls ─────────────────────────── */

.report-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.control-group { display: flex; flex-direction: column; gap: 6px; }

.control-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.select-input, .date-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  min-width: 180px;
  transition: var(--transition);
}

.select-input:focus, .date-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

/* ─── Loading ─────────────────────────── */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(139,92,246,0.08), 0 2px 8px rgba(0,0,0,0.04);
  max-width: 400px;
  margin: 24px auto;
  gap: 0;
}

/* Gradient ring spinner */
.spinner {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8b5cf6 0%, rgba(139,92,246,0.12) 70%, rgba(139,92,246,0) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  animation: spin 0.9s linear infinite;
}

.spinner.small {
  width: 18px; height: 18px;
  background: none;
  border: 2px solid var(--border);
  border-top-color: var(--accent-purple);
  -webkit-mask: none; mask: none;
}

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

.loading-state p { margin-top: 16px; color: var(--text-secondary); font-size: 14px; }

/* ─── Report Content ─────────────────────────── */

.report-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
  gap: 12px;
}

.report-account-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.report-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid;
  border-image: var(--gradient-instagram) 1;
  border-radius: 50%;
}

.report-account-info h2 { font-size: 22px; font-weight: 700; }
.report-bio { color: var(--text-secondary); font-size: 13px; margin-top: 4px; max-width: 500px; }

.report-meta { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.report-period-tag, .report-date-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(139,92,246,0.15);
  color: var(--accent-purple);
}

.report-date-tag { background: rgba(59,130,246,0.15); color: var(--accent-blue); }

/* ─── Executive Summary ─────────────────────────── */

.executive-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-purple);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.executive-summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--gradient-purple);
}

.executive-summary-card h3 { font-size: 16px; margin-bottom: 0; color: var(--accent-purple); display: flex; align-items: center; gap: 8px; }
.executive-summary-card p { color: var(--text-primary); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

/* Inline editable executive summary */
.executive-summary-editable {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  cursor: text;
  border-radius: 6px;
  padding: 8px;
  margin: 0 -8px;
  transition: background 0.15s;
}
.executive-summary-editable:hover {
  background: rgba(139,92,246,0.04);
}
.executive-summary-editable:focus {
  background: rgba(139,92,246,0.06);
  outline: none;
}
.executive-summary-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
  font-style: italic;
}
.pdf-export-mode .executive-summary-editable {
  cursor: default;
  background: none !important;
  padding: 0;
  margin: 0;
}

/* ─── Stats Grid & Growth Badges ─────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--gradient-purple));
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.stat-icon { font-size: 24px; }
.stat-value { font-size: 30px; font-weight: 800; margin-bottom: 2px; }
.stat-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: auto;}
.stat-sub { font-size: 13px; color: var(--accent-blue); margin-top: 8px; font-weight: 500; }

.growth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.growth-up { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.growth-down { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.growth-neutral { background: var(--bg-input); color: var(--text-muted); }

/* ─── Top Posts ─────────────────────────── */

.top-posts-section { margin-bottom: 32px; }

.section-title { margin-bottom: 16px; }
.section-title h3 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-title p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

.top-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.top-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.top-post-card:hover { border-color: var(--accent-purple); transform: translateY(-3px); box-shadow: var(--shadow); }

.top-post-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: var(--bg-input, #f1f5f9);
}

.top-post-img-wrapper img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}

.top-post-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--bg-card);
  color: #1e293b;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  display: flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.top-post-badge.gold { background: linear-gradient(135deg, #fef08a, #f59e0b); color: #78350f; border: 1px solid rgba(251,191,36,0.5); }
.top-post-badge.silver { background: linear-gradient(135deg, #f1f5f9, #cbd5e1); color: #1e293b; border: 1px solid rgba(148,163,184,0.5); }
.top-post-badge.bronze { background: linear-gradient(135deg, #fcd34d, #b45309); color: #fff; border: 1px solid rgba(180,83,9,0.5); }

.top-post-content { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.top-post-caption { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.top-post-stats { 
  display: flex; 
  gap: 12px; 
  margin-top: auto; 
  flex-wrap: nowrap !important; 
  padding-top: 12px; 
  border-top: 1px solid var(--border); 
}
.top-post-stat { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  font-size: 12px; 
  font-weight: 700; 
  white-space: nowrap !important; 
}

/* ─── Charts ─────────────────────────── */

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.charts-row:has(.wide) { grid-template-columns: 1fr; }

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
}

.chart-expand-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.chart-expand-btn:hover {
  color: var(--text-primary);
  background: var(--bg-body);
}

.chart-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-right: 24px; }

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

.chart-fullscreen {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 95vw !important;
  height: 90vh !important;
  z-index: 10000 !important;
  padding: 40px !important;
  display: flex !important;
  flex-direction: column !important;
}

.chart-fullscreen canvas {
  max-height: none !important;
  flex: 1 !important;
  width: 100% !important;
}

/* ─── Table ─────────────────────────── */

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}

.table-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

.table-wrapper {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}
/* table-card kendi içinde scroll yönetir, dışa taşmaz */
.table-card { width: 100%; min-width: 0; box-sizing: border-box; }
#competitor-analysis-container { min-width: 0; width: 100%; overflow: hidden; }
/* Tüm view'lar dışa taşmaz */
#view-competitor-analysis,
#view-competitor { overflow: hidden; }
.report-section { min-width: 0; }
.view { min-width: 0; max-width: 100%; }

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

/* Tarih ve sayısal kolonlar asla kırılmasın */
.report-table td:first-child { white-space: nowrap !important; min-width: 90px; }
.report-table td:nth-child(2) { white-space: nowrap !important; min-width: 70px; }
.report-table td:nth-child(n+4) { white-space: nowrap !important; min-width: 60px; }
.report-table th:first-child { white-space: nowrap !important; min-width: 90px; }
.report-table th { white-space: nowrap !important; }

.report-table th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.report-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.report-table tbody tr:hover { background: rgba(139,92,246,0.05); }

.report-table td:first-child { color: var(--text-primary); font-weight: 500; }

.media-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-image { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.badge-video { background: rgba(236,72,153,0.15); color: var(--accent-pink); }
.badge-carousel { background: rgba(249,115,22,0.15); color: var(--accent-orange); }
.badge-reel { background: rgba(139,92,246,0.15); color: var(--accent-purple); }

.caption-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reels-fixed-table .caption-cell { max-width: 0; }

/* ─── Modal ─────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 480px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }

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

.modal-header h2 { font-size: 18px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg-card); color: var(--text-primary); }

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

.form-group { margin-bottom: 20px; }

.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus { outline: none; border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }

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

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }

.modal-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 8px;
}

/* ─── Toast ─────────────────────────── */

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}

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

@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } }

/* ─── Growth Comparison Cards ─────────────────────────── */

.growth-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.growth-compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.growth-compare-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-blue);
}

.growth-compare-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.growth-compare-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.growth-compare-icon {
  font-size: 22px;
}

.growth-compare-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.growth-compare-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.growth-compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.growth-compare-period {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.growth-compare-val {
  font-weight: 700;
}

.growth-compare-val.prev {
  font-size: 15px;
  color: var(--text-secondary);
}

.growth-compare-val.curr {
  font-size: 22px;
  color: var(--text-primary);
}

.growth-compare-row.highlight {
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.growth-compare-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
}

.growth-compare-footer.positive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
}

.growth-compare-footer.negative {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}

.growth-compare-footer.neutral {
  background: rgba(100, 116, 139, 0.08);
  color: var(--text-muted);
}

.growth-compare-arrow {
  font-size: 18px;
  font-weight: 800;
}

.growth-compare-change {
  font-size: 15px;
}

.growth-compare-percent {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 600;
}

/* ─── Progress Bar ─────────────────────────── */
.progress-bar-container{width:100%;max-width:400px;height:6px;background:rgba(139,92,246,0.1);border-radius:99px;margin-top:20px;overflow:hidden;}
.progress-bar{height:100%;background:linear-gradient(90deg,#7c3aed,#a78bfa);border-radius:99px;transition:width 0.4s ease;box-shadow:0 0 8px rgba(139,92,246,0.4);}
.progress-text{margin-top:10px;font-size:22px;font-weight:800;color:var(--accent-purple);letter-spacing:-0.03em;}

/* ─── Score Section ─────────────────────────── */
.score-section{margin-bottom:24px;}
.score-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:32px;text-align:center;position:relative;overflow:hidden;min-width:0;}
.score-card::before{content:'';position:absolute;top:0;left:0;right:0;height:4px;background:var(--gradient-instagram);}
.score-gauge{display:flex;justify-content:center;margin-bottom:8px;}
.score-svg{width:220px;height:130px;}
.score-label{font-size:18px;font-weight:700;margin-bottom:20px;color:var(--text-primary);}
.score-breakdown{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;text-align:left;width:100%;box-sizing:border-box;}
.score-item{padding:8px 0;}
.score-item-header{display:flex;flex-direction:column;gap:2px;font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:6px;}
.score-item-header span:last-child{font-size:14px;font-weight:700;color:var(--text-primary);}
.score-item-bar{height:6px;background:var(--border);border-radius:3px;overflow:hidden;}
.score-item-fill{height:100%;border-radius:3px;transition:width 0.5s ease;}

/* ─── Specific grid overrides — tüm grid'ler tam genişlik ──────────── */
#reach-stats-grid      { grid-template-columns: repeat(4, 1fr) !important; }
#follower-stats-grid   { grid-template-columns: repeat(4, 1fr) !important; }
#engagement-stats-grid { grid-template-columns: repeat(6, 1fr) !important; }
#reels-totals-grid     { grid-template-columns: repeat(4, 1fr) !important; }
#reels-averages-grid   { grid-template-columns: repeat(4, 1fr) !important; }

/* ─── Account Activity ─────────────────────────── */
.stats-grid-sm{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))!important;gap:12px!important;}
.stats-grid-sm .stat-card{padding:16px;}
.stats-grid-sm .stat-value{font-size:22px;}

/* ─── Recommendations ─────────────────────────── */
.recommendations-grid{display:flex;flex-direction:column;gap:12px;}
.rec-card{display:flex;gap:16px;padding:20px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);transition:var(--transition);align-items:flex-start;}
.rec-card:hover{transform:translateY(-1px);box-shadow:var(--shadow);}
.rec-card.rec-success{border-left:4px solid var(--accent-green);}
.rec-card.rec-warning{border-left:4px solid var(--accent-orange);}
.rec-card.rec-tip{border-left:4px solid var(--accent-blue);}
.rec-icon{font-size:24px;flex-shrink:0;}
.rec-title{font-size:15px;font-weight:700;margin-bottom:4px;color:var(--text-primary);}
.rec-text{font-size:13px;color:var(--text-secondary);line-height:1.6;}

/* ─── Top Posts (3 sütun x 2 satır) ─────────────────────────── */
.top-posts-grid-6{grid-template-columns:repeat(3, 1fr)!important;gap:20px!important;}
.top-post-card.compact{font-size:14px;max-width:none;margin:0 auto;width:100%;}
.top-post-img-wrapper.compact{padding-top:130%;}
.top-post-card.compact .top-post-stats{flex-wrap:nowrap;gap:4px;justify-content:space-between;}
.top-post-card.compact .top-post-stat{font-size:11px;padding:4px;}
.top-post-card.compact .top-post-content{padding:14px;}
.top-post-card.compact .top-post-caption{font-size:13px;-webkit-line-clamp:2;line-height:1.4;min-height:36px;}
@media (max-width: 900px) {
  .top-posts-grid-6{grid-template-columns:repeat(2, 1fr)!important;}
}
@media (max-width: 580px) {
  .top-posts-grid-6{grid-template-columns:1fr!important;}
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar{transform:translateX(-100%);}
  .sidebar.open{transform:translateX(0);}
  .main-content{margin-left:0;}
  .menu-toggle{display:block;}
  .view{padding:20px 16px;}
  .report-controls{flex-direction:column;align-items:stretch;}
  .charts-row{grid-template-columns:1fr;}
  .stats-grid{grid-template-columns:repeat(2,1fr);}
  .growth-compare-grid{grid-template-columns:repeat(2,1fr);}
  .accounts-grid{grid-template-columns:1fr;}
  .dashboard-quick-actions{grid-template-columns:1fr;}
  .top-posts-grid-6{grid-template-columns:repeat(2,1fr)!important;}
  .score-breakdown{grid-template-columns:1fr;}
  #reach-stats-grid      { grid-template-columns: repeat(2, 1fr) !important; }
  #follower-stats-grid   { grid-template-columns: repeat(2, 1fr) !important; }
  #engagement-stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
  #reels-totals-grid     { grid-template-columns: repeat(2, 1fr) !important; }
  #reels-averages-grid   { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .growth-compare-grid{grid-template-columns:1fr;}
  .stats-grid{grid-template-columns:1fr;}
  .top-posts-grid-6{grid-template-columns:1fr!important;}
  #reach-stats-grid      { grid-template-columns: repeat(2, 1fr) !important; }
  #follower-stats-grid   { grid-template-columns: repeat(2, 1fr) !important; }
  #engagement-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  #reels-totals-grid     { grid-template-columns: repeat(2, 1fr) !important; }
  #reels-averages-grid   { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── Auth Screen (login / register / forgot / reset / verify) ── */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4f7fa 0%, #fdf2f8 50%, #f1f5f9 100%);
  z-index: 1000;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}
.auth-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-instagram);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.auth-logo .logo-icon svg { width: 20px; height: 20px; }
.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text-primary);
  text-align: center;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 22px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.auth-error {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.auth-success {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.auth-submit {
  margin-top: 6px;
  padding: 12px 16px;
  font-weight: 700;
  border-radius: 10px;
}
.auth-actions {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.auth-actions a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 600;
}
.auth-actions a:hover { text-decoration: underline; }
.auth-actions span { color: var(--text-muted); }

/* ─── Inline header / button icons (emoji yerine) ────── */
.hi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -3px;
  margin-right: 6px;
  color: currentColor;
  flex-shrink: 0;
}
.hi svg { width: 18px; height: 18px; stroke-width: 2; }
h2 .hi svg, h3 .hi svg { width: 20px; height: 20px; }
button .hi svg { width: 15px; height: 15px; }
th .hi { vertical-align: -2px; }
th .hi svg { width: 14px; height: 14px; }
.hi-md svg { width: 22px; height: 22px; }
.hi-lg svg { width: 28px; height: 28px; }
.hi-purple { color: var(--accent-purple); }
.hi-pink { color: var(--accent-pink); }
.hi-blue { color: var(--accent-blue); }
.hi-green { color: var(--accent-green); }
.hi-orange { color: var(--accent-orange); }
.hi-red { color: var(--accent-red); }

/* Stat card ikonları için SVG render */
.stat-icon svg { width: 22px; height: 22px; color: white; }
.top-post-stat svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; flex-shrink: 0; }
.enler-stat-i svg { width: 11px; height: 11px; vertical-align: -1px; }

/* ─── Locked action button (Free user için) ─────── */
.btn.locked-action {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1) !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  position: relative;
  transition: all 0.2s ease;
}
.btn.locked-action:hover {
  background: linear-gradient(135deg, #c084fc, #a855f7) !important;
  color: white !important;
  transform: translateY(-1px);
}
.btn.locked-action .lock-emoji { margin-right: 4px; }

/* ─── Export butonları — Share buton tarzı (beyaz/outlined), sağ üste PRO badge ─── */
.report-actions .btn {
  position: relative;
  overflow: visible;
}
.report-actions .btn.locked-action {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  transform: none;
}
.report-actions .btn.locked-action:hover {
  background: var(--bg-card-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
  transform: translateY(-1px);
}
.report-actions .btn.locked-action .lock-emoji { display: none; }
.btn-pro-corner-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: white;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 6px;
  pointer-events: none;
  line-height: 1.5;
  box-shadow: 0 1px 4px rgba(139,92,246,0.4);
}

/* ─── Locked Blur Overlay ───────────────────────────────── */
.locked-blur-target {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.locked-blur-target > *:not(.locked-blur-overlay) {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.3s ease;
}
.locked-blur-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.85));
  backdrop-filter: saturate(80%);
  -webkit-backdrop-filter: saturate(80%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: inherit;
}
.locked-blur-inner {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  max-width: 90%;
}
.locked-blur-icon {
  font-size: 36px;
  margin-bottom: 6px;
}
.locked-blur-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.locked-blur-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}
.locked-blur-btn {
  padding: 10px 22px;
  font-weight: 700;
  border-radius: 10px;
  font-size: 13px;
}

/* ─── Plan upgrade banner (view içi) ────────────────────────────── */
.plan-upgrade-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,191,36,0.06));
  border: 1px solid rgba(245,158,11,0.28);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.18s, border-color 0.18s;
  line-height: 1.45;
}
.plan-upgrade-banner:hover {
  background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(251,191,36,0.10));
  border-color: rgba(245,158,11,0.5);
}
.plan-upgrade-banner-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  flex-shrink: 0;
}
.plan-upgrade-banner-cta {
  margin-left: auto;
  font-weight: 800;
  color: #d97706;
  white-space: nowrap;
  font-size: 12.5px;
}

/* ─── Nav lock badge ─────────────────────────────────────────────── */
.nav-lock-badge {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.13);
  color: #8b5cf6;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.6;
  pointer-events: none;
  white-space: nowrap;
}
.nav-btn { position: relative; }
.nav-btn.locked-nav { cursor: pointer; }
.nav-btn:hover .nav-lock-badge {
  background: rgba(139, 92, 246, 0.22);
}

/* ─── Profile page ─────────────────────── */
.profile-wrap { max-width: 100%; }
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

/* ─── Billing card ──────────────────────────────────────────────── */
.billing-card { padding: 28px; }
.billing-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.billing-current-left { display: flex; align-items: center; gap: 16px; }
.billing-plan-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #4338ca;
  white-space: nowrap;
}
.billing-plan-badge.badge-pro   { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #6d28d9; }
.billing-plan-badge.badge-ultra { background: linear-gradient(135deg, #fdf4ff, #f3e8ff); color: #7e22ce; }
.billing-plan-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.billing-plan-name  { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.billing-plan-price { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.billing-member-since { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.billing-upgrade-btn { display: flex; align-items: center; gap: 7px; padding: 10px 20px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }

.billing-plans-title { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 16px; }

/* Pill-style billing toggle (shared with pricing.html) */
.pr-billing-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  user-select: none;
}
.pr-pill-btn {
  border: none;
  background: transparent;
  border-radius: 100px;
  padding: 7px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
}
.pr-pill-btn.active {
  color: var(--text-primary);
}
.pr-saving-pill {
  background: #34d399;
  color: #064e3b;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.billing-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 20px;
}
.billing-toggle-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s;
}
.billing-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.billing-save-badge {
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: white;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.billing-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) { .billing-plans-grid { grid-template-columns: 1fr; } }

/* ── Current plan banner ── */
.bp-current-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 24px;
}
.bp-current-left { display: flex; align-items: center; gap: 10px; }
.bp-current-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.bp-current-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #7c3aed;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 20px;
  padding: 3px 10px;
}
.bp-current-since { font-size: 13px; color: var(--text-muted); }

/* ── New Plan Cards (bp-*) ── */
.bp-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px 22px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.bp-card:hover { transform: translateY(-3px); border-color: var(--accent-purple); }
.bp-card.bp-card-popular {
  border-color: #7c3aed;
  background: linear-gradient(160deg, rgba(124,58,237,0.04) 0%, var(--bg-card) 60%);
}
.bp-card.bp-card-current { border-color: var(--accent-purple); }
.bp-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.bp-card-head { margin-bottom: 16px; }
.bp-plan-name { font-size: 18px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.bp-plan-tagline { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.bp-price { display: flex; align-items: baseline; gap: 2px; margin-bottom: 4px; }
.bp-price-cur { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.bp-price-amt { font-size: 38px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.bp-price-period { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.bp-billed { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; min-height: 16px; }

.bp-btn {
  display: block;
  width: 100%;
  padding: 11px 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  transition: all 0.18s;
  margin-bottom: 20px;
  text-align: center;
}
.bp-btn.bp-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border-color: transparent;
  color: #fff;
}
.bp-btn.bp-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.bp-btn.bp-btn-outline:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
.bp-btn.bp-btn-current { background: var(--bg-input); color: var(--text-muted); cursor: default; border-color: transparent; }
.bp-btn.bp-btn-disabled { opacity: 0.4; cursor: default; }

.bp-feat-list { list-style: none; padding: 0; margin: 0; flex: 1; }
.bp-feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
  line-height: 1.4;
}
.bp-feat-list li svg { flex-shrink: 0; margin-top: 2px; }
.bp-feat-list li:not(.bp-feat-disabled):not(.bp-feat-highlight) svg { color: #22c55e; }
.bp-feat-list li.bp-feat-disabled { color: var(--text-muted); opacity: 0.55; }
.bp-feat-list li.bp-feat-disabled svg { color: var(--text-muted); }
.bp-feat-list li.bp-feat-highlight {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding-top: 8px;
  padding-bottom: 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.billing-stripe-placeholder {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.billing-stripe-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-muted);
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } }

/* ─── User avatar + dropdown (topbar) ─────── */
#user-badge { position: relative; }

.user-avatar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.user-avatar-btn:hover { border-color: var(--accent-purple); transform: scale(1.05); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  user-select: none;
  box-shadow: 0 2px 6px rgba(15,23,42,0.15);
}
.user-avatar-lg {
  width: 44px; height: 44px;
  font-size: 16px;
  flex-shrink: 0;
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 100;
}
.user-menu-head {
  display: flex;
  gap: 12px;
  padding: 12px 12px 10px;
  align-items: center;
}
.user-menu-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.user-menu-email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  margin-top: 1px;
}
.user-menu-plan {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 12px;
  margin-top: 8px;
}
.user-plan-free  { background: rgba(100,116,139,0.12); color: #475569; }
.user-plan-pro   { background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(236,72,153,0.18)); color: #7c3aed; }
.user-plan-ultra { background: linear-gradient(135deg, #f59e0b, #ef4444); color: white; }

.user-menu-warn {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 4px 6px 0;
  font-size: 11.5px;
  color: #b45309;
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}
.user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
  color: var(--text-primary);
  border-radius: 8px;
  font-family: inherit;
}
.user-menu button:hover { background: var(--bg-card-hover); }
.user-menu button svg { opacity: 0.7; flex-shrink: 0; }

/* ─── Yeni Dashboard ────────────────────────── */
.db-section { margin-bottom: 28px; }
.db-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.db-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}
.db-section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-purple);
  text-decoration: none;
}
.db-section-link:hover { text-decoration: underline; }

/* Stat kartları */
.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.db-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.db-stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.db-stat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.db-stat-icon svg { width: 16px; height: 16px; }
.db-stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.db-stat-limit { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.db-stat-progress {
  margin-top: 12px;
  height: 5px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.db-stat-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Hızlı eylem kartları */
.db-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.db-quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.db-quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  box-shadow: 0 8px 24px rgba(139,92,246,0.10);
}
.db-quick-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.db-quick-icon svg { width: 22px; height: 22px; }
.db-quick-text strong { display: block; font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.db-quick-text span { font-size: 12px; color: var(--text-muted); }

/* İki sütunlu son aktiviteler */
.db-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .db-two-col { grid-template-columns: 1fr; }
}
.db-side-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-height: 200px;
  box-shadow: var(--shadow);
}
.db-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.db-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.db-recent-item:hover { background: var(--bg-input); }
.db-recent-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  flex-shrink: 0;
}
.db-recent-meta {
  flex: 1;
  min-width: 0;
}
.db-recent-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-recent-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.db-recent-empty {
  padding: 20px 8px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* Bağlı hesap şeridi */
.db-accounts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.db-account-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.db-account-chip:hover {
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}
.db-account-chip img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.db-account-chip .acc-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-account-chip-add {
  border-style: dashed;
  color: var(--text-muted);
  justify-content: center;
}
.db-account-chip-add svg { width: 20px; height: 20px; }

/* ─── Geçmiş raporlar liste ────────────────── */
.past-reports-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}
/* Past reports/reels/comp grid container'ı liste için override et */
#past-reports-grid, #past-reels-grid, #past-comp-grid {
  display: block !important;
  width: 100%;
  overflow-x: auto;
}
.past-reports-list, .past-reels-list, .past-comp-list {
  min-width: 700px;
}
.past-reports-head, .past-reports-row,
.past-comp-head, .past-comp-row {
  min-width: 700px;
}
.sortable-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
.sortable-header:hover { color: var(--accent-purple); }
.sortable-header .sort-arrow {
  margin-left: 4px;
  opacity: 0.3;
  font-size: 11px;
  display: inline-block;
}
.sortable-header.sort-active .sort-arrow { opacity: 1; color: var(--accent-purple); }
.sortable-header.sort-active { color: var(--accent-purple); }
.past-reports-head {
  display: grid;
  grid-template-columns: 36px minmax(120px, 1.4fr) minmax(130px, 1.4fr) 110px minmax(110px, 1fr) 48px;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.past-reports-row {
  display: grid;
  grid-template-columns: 36px minmax(120px, 1.4fr) minmax(130px, 1.4fr) 110px minmax(110px, 1fr) 48px;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.past-reports-row > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prl-col-period, .prl-col-date { font-variant-numeric: tabular-nums; }
.past-reports-row:last-child { border-bottom: none; }
.past-reports-row:hover { background: rgba(139, 92, 246, 0.04); }

.past-comp-head {
  display: grid;
  grid-template-columns: 36px minmax(120px, 1.4fr) minmax(130px, 1.4fr) 110px minmax(110px, 1fr) 48px;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.past-comp-row {
  display: grid;
  grid-template-columns: 36px minmax(120px, 1.4fr) minmax(130px, 1.4fr) 110px minmax(110px, 1fr) 48px;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.past-comp-row > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.past-comp-row:last-child { border-bottom: none; }
.past-comp-row:hover { background: rgba(139, 92, 246, 0.04); }

.prl-col-account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.prl-col-account strong { font-weight: 600; }
.prl-icon {
  color: var(--accent-purple);
  flex-shrink: 0;
}
.prl-score-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid;
}
.prl-delete-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.prl-delete-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.06);
}
/* ── Heart favourite button (uiverse/catraco) ── */
.prl-heart-container {
  --heart-color: rgb(255, 91, 137);
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.prl-heart-container:hover {
  border-color: var(--heart-color);
  background: rgba(255, 91, 137, 0.07);
}
.prl-heart-container .checkbox {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 20;
  cursor: pointer;
  margin: 0;
}
.prl-heart-container .svg-container {
  width: 16px;
  height: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.prl-heart-container .svg-outline {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  position: absolute;
  width: 16px;
  height: 16px;
  transition: stroke 0.15s;
}
.prl-heart-container:hover .svg-outline {
  stroke: var(--heart-color);
}
.prl-heart-container .svg-filled {
  fill: var(--heart-color);
  position: absolute;
  width: 16px;
  height: 16px;
  animation: prl-heart-filled 0.8s ease;
  display: none;
}
.prl-heart-container .svg-celebrate {
  position: absolute;
  width: 40px;
  height: 40px;
  animation: prl-heart-celebrate 0.5s ease forwards;
  display: none;
  stroke: var(--heart-color);
  fill: var(--heart-color);
}
.prl-heart-container .checkbox:checked ~ .svg-container .svg-outline { display: none; }
.prl-heart-container .checkbox:checked ~ .svg-container .svg-filled { display: block; }
.prl-heart-container .checkbox:checked ~ .svg-container .svg-celebrate { display: block; }
.prl-heart-container .checkbox:checked ~ .svg-container { /* active border */}
.prl-heart-container:has(.checkbox:checked) {
  border-color: var(--heart-color);
  background: rgba(255, 91, 137, 0.07);
}
@keyframes prl-heart-filled {
  0%   { transform: scale(0); }
  25%  { transform: scale(1.3); }
  50%  { transform: scale(1); filter: brightness(1.5); }
  100% { transform: scale(1); filter: none; }
}
@keyframes prl-heart-celebrate {
  0%   { transform: scale(0); opacity: 1; }
  60%  { opacity: 1; filter: brightness(1.5); }
  100% { transform: scale(1.6); opacity: 0; }
}
.prl-col-fav {
  display: flex;
  align-items: center;
  justify-content: center;
}
.prl-col-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 800px) {
  .past-reports-head, .past-comp-head { display: none; }
  .past-reports-row {
    grid-template-columns: 36px 1fr auto;
    gap: 8px;
    padding: 14px 16px;
  }
  .past-comp-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 14px 16px;
  }
  .prl-col-fav { grid-column: 1; grid-row: 1 / 3; }
  .prl-col-account { grid-column: 2; }
  .past-comp-row .prl-col-account { grid-column: 1; }
  .prl-col-period, .prl-col-date { grid-column: 2; font-size: 12px; color: var(--text-muted); }
  .past-comp-row .prl-col-period, .past-comp-row .prl-col-date { grid-column: 1; }
  .prl-col-score { grid-column: 3; grid-row: 1; }
  .past-comp-row .prl-col-score { grid-column: 2; grid-row: 1; }
  .prl-col-actions { grid-column: 3; grid-row: 2; }
  .past-comp-row .prl-col-actions { grid-column: 2; grid-row: 2; }
}

/* ─── Page subtitle + actions row ──────────────── */
.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.page-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-actions-row .page-subtitle { flex: 1; min-width: 200px; }

/* ─── Slot Counter Pill ─── */
.slot-counter-pill {
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  width: 100%;
  box-sizing: border-box;
  gap: 0;
}
.slot-counter-pill.slot-counter-full {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.04);
}
.slot-counter-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  align-items: center;
}
.slot-counter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.slot-counter-full .slot-counter-label { color: #dc2626; }
.slot-counter-bar-track {
  width: 100%;
  height: 4px;
  background: var(--bg-input, #f1f5f9);
  border-radius: 3px;
  overflow: hidden;
}
.slot-counter-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Topbar title biraz daha modern — daha büyük + flat */
.topbar .page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ─── Onboarding ekranı ───────────────────────── */
.ob-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4f7fa 0%, #fdf2f8 50%, #f1f5f9 100%);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}
.ob-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 36px 32px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}
.ob-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}
.ob-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-instagram);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.ob-logo .logo-icon svg { width: 20px; height: 20px; }

/* Progress bar */
.ob-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 8px;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}
.ob-step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-muted);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.ob-step-dot.ob-active {
  background: var(--gradient-purple);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(139,92,246,0.4);
}
.ob-step-dot.ob-done {
  background: var(--accent-green);
  color: white;
  border-color: transparent;
}
.ob-step-line {
  flex: 1;
  height: 3px;
  background: var(--border);
  margin: 0 8px;
  border-radius: 2px;
  overflow: hidden;
}
.ob-step-line-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-purple);
  transition: width 0.4s ease;
}
.ob-step-label {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 26px;
  letter-spacing: 0.3px;
}

.ob-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.ob-sub {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 24px;
}

.ob-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ob-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ob-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 480px) {
  .ob-row-2 { grid-template-columns: 1fr; }
}

.ob-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.ob-actions .lp-btn { padding: 11px 20px; font-size: 14px; }

/* ─── Reels: Fixed-layout table ──── */
.reels-fixed-table {
  table-layout: fixed;
  width: 100%;
}
.reels-fixed-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reels-fixed-table th {
  white-space: nowrap;
  overflow: visible;
}
/* Caption column: truncate with ellipsis */
.reels-fixed-table .reels-caption-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0; /* forces ellipsis to respect column width */
}
/* Tags cell: override global nowrap so tags can wrap within the cell */
.reels-fixed-table .reels-tags-cell {
  white-space: normal;
  overflow: hidden;
  vertical-align: top;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ─── Reels: Sticky controls + Enler grid ──── */
.reels-controls-sticky {
  position: sticky;
  top: var(--topbar-height);
  z-index: 30;
  background: var(--bg-primary);
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
/* Rapordaki Ayın En İyileri ile aynı boyut: 3 sütun grid + 9:16 thumbnail */
.enler-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .enler-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .enler-grid { grid-template-columns: 1fr; } }
.enler-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.enler-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.enler-card-header {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
}
.enler-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.enler-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* 9:16 Reels oranı */
  background: var(--bg-input);
}
.enler-thumb {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.enler-thumb-fallback {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.enler-card-body { padding: 10px 12px 12px; }
.enler-caption {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.enler-date { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.enler-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.enler-stat {
  background: var(--bg-input);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.enler-stat-i { opacity: 0.85; font-size: 10px; }

/* ─── PDF Specific Overrides ──────────────── */
@media print {
  body { background: var(--bg-card); }
  .sidebar, .top-bar, .report-actions, .executive-summary-input-section { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .chart-card, .stat-card, .account-card { break-inside: avoid; }
}

.pdf-export-mode {
  width: 1100px !important;
  background: #f8fafc !important;
  padding: 40px !important;
}
.pdf-export-mode .chart-card, 
.pdf-export-mode .stat-card {
  box-shadow: none !important;
  border: 1px solid #e2e8f0 !important;
}
.pdf-export-mode .top-post-card {
  break-inside: avoid;
  overflow: hidden;
}
/* Cover title: remove gradient for PDF (also handled in onclone) */
.pdf-export-mode #cover-title {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
}
/* Top posts grid: fixed 3-col, no overflow */
.pdf-export-mode .top-posts-grid,
.pdf-export-mode .top-posts-grid-6 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 100% !important;
  overflow: visible !important;
}
/* Charts: fixed height to prevent stretching */
.pdf-export-mode canvas {
  max-width: 100% !important;
}
.pdf-export-mode .chart-card {
  page-break-inside: avoid;
  overflow: hidden !important;
}
/* Stats & Enler grids: force full columns (override media queries) */
.pdf-export-mode .stats-grid,
.pdf-export-mode #reels-totals-grid,
.pdf-export-mode #reels-averages-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
}
.pdf-export-mode .enler-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
}
/* Enler thumb: PDF'te 4 kolon için 9:16 oranını koru */
.pdf-export-mode .enler-thumb-wrap {
  padding-top: 177.78% !important;
}
/* Reels table: don't overflow */
.pdf-export-mode .table-wrapper,
.pdf-export-mode .table-card {
  overflow: visible !important;
}
.pdf-export-mode .reels-fixed-table {
  font-size: 11px !important;
  min-width: 0 !important;
  width: 100% !important;
  table-layout: auto !important;
}
.pdf-export-mode .reels-fixed-table colgroup { display: none !important; }
/* Etiket hücreleri: kesmeden sarılsın */
.pdf-export-mode .reels-tags-cell {
  max-width: 120px !important;
  white-space: normal !important;
}
.pdf-export-mode .reels-tags-cell > div {
  flex-wrap: wrap !important;
  gap: 2px !important;
}
.pdf-export-mode .reels-tags-cell span {
  font-size: 9px !important;
  padding: 1px 4px !important;
}

/* ─── Schedule Page ─────────────────────────── */
.planned-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #f1f5f9;
  color: #64748b;
}
.badge-active { background: #dcfce7; color: #166534; }

/* ─── Competitor Module Styles ──────────────── */

/* Competitor analysis table — no scroll, wrapping headers */
.comp-analysis-table { width: 100%; table-layout: fixed; }
.comp-analysis-table th {
  white-space: normal !important;
  word-break: break-word;
  font-size: 11px;
  padding: 10px 8px;
  line-height: 1.3;
}
.comp-analysis-table td {
  white-space: normal !important;
  word-break: break-word;
  padding: 10px 8px;
  font-size: 13px;
}
.comp-analysis-table th:first-child,
.comp-analysis-table td:first-child { width: 170px; max-width: 170px; overflow: hidden; }
.comp-analysis-table td:first-child > div { min-width: 0; overflow: hidden; }
.comp-analysis-table td:nth-child(2),
.comp-analysis-table td:nth-child(3) { width: 80px; }
.comp-analysis-table td:last-child { width: 90px; }
.comp-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* Header controls: account select + username input + add button inline */
.comp-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.comp-header-controls .select-input {
  min-width: 160px;
}

/* Warning text below header card */
.comp-biz-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #3b82f6;
  padding: 7px 14px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
}
.comp-biz-warning strong {
  color: #1d4ed8;
  font-weight: 700;
}
.comp-biz-warning svg {
  flex-shrink: 0;
  color: #3b82f6;
}

/* Competitor list row styles */
.comp-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  vertical-align: middle;
  margin-right: 10px;
}
.comp-row-user {
  display: inline-flex;
  align-items: center;
}
.comp-row-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}
.comp-row-fullname {
  font-size: 11px;
  color: var(--text-muted);
}
.competitor-disclaimer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(59, 130, 246, 0.05);
  border-left: 4px solid var(--accent-blue);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.5;
}
.competitor-disclaimer span {
  font-size: 18px;
}
.conf-badge {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}
.conf-high { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.conf-medium { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.conf-low { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.conf-none { background: var(--bg-input); color: var(--text-muted); }

/* Güven noktaları */
.conf-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
}
.conf-dot-green  { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.conf-dot-yellow { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.conf-dot-red    { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.conf-dot-purple { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.18); }

/* Güven legend satırı */
.conf-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 0;
  margin-bottom: 12px;
  width: 100%;
}
.conf-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.competitor-insights-card {
  background: rgba(139, 92, 246, 0.04);
  border: 1px dashed var(--accent-purple);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.competitor-insights-card h4 {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-purple);
}
.competitor-insights-card ul {
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.nav-loading-indicator {
  display: inline-block;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
  animation: navPulse 1.2s infinite ease-in-out;
  background: currentColor;
}

@keyframes navPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

.delete-card-btn:hover {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444 !important;
  transform: scale(1.1);
}

/* ─── Orta ekran responsive (1024-1280px — 14" MacBook vb.) ─────── */
@media (max-width: 1280px) {
  .view { padding: 24px 20px; }

  /* Input/select min-width küçült */
  .select-input, .date-input { min-width: 140px; }

  /* Rapor kontrol satırı boşluğunu azalt */
  .report-controls { gap: 12px; padding: 16px 20px; }


  /* Rakip analizi başlık satırı: sağdaki kontroller taşarsa alt satıra geçsin */
  .page-actions-row { flex-wrap: wrap; gap: 12px; }
  .page-actions-row > div[style*="display:flex"],
  .page-actions-row > div[style*="display: flex"] {
    flex-wrap: wrap;
  }

  /* Stats grid sütun sayısını azalt */
  .stats-grid { grid-template-columns: repeat(3, 1fr); }

  /* Charts yan yana daha dar */
  .charts-row { gap: 16px; }
}

@media (max-width: 1100px) {
  /* Sidebar+içerik sıkıştığında input'lar daha da küçülsün */
  .select-input, .date-input { min-width: 120px; }

  /* Stats 2 sütuna düş */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Özel gridler de 1100px'de küçülsün */
  #engagement-stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
  #reels-totals-grid { grid-template-columns: repeat(2, 1fr) !important; }
  #reels-averages-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Charts alt alta */
  .charts-row { grid-template-columns: 1fr; }

  /* Rapor kontrolleri alt alta */
  .report-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .report-controls .btn-generate { margin-left: 0 !important; }

  /* Reels sticky kontrol */
  .reels-controls-sticky { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}

/* ─── Modern Competitor Redesign ─── */
.view-header-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}
.view-header-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.view-header-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}
.control-group-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Rapor/Reels view-header içindeki kontroller */
.report-controls-inline {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.control-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.select-wrapper {
  position: relative;
  min-width: 200px;
}
.competitor-main-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
}
.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-prefix {
  position: absolute;
  left: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.input-with-prefix .form-input {
  padding-left: 32px !important;
}
.modern-info-box {
  background: rgba(139, 92, 246, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, 0.05);
  color: var(--accent-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.empty-state-container h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state-container p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 340px;
  margin: 0;
  line-height: 1.5;
}
.avatar-gradient-ring {
  padding: 3px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.avatar-gradient-ring img {
  border: 2px solid var(--bg-card) !important;
  margin-bottom: 0 !important;
}
.comp-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px !important;
  padding: 6px 12px !important;
  height: 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.comp-card-btn svg {
  margin-right: 0 !important;
}
.comp-delete-btn {
  background: rgba(239, 68, 68, 0.06) !important;
  border: 1px solid rgba(239, 68, 68, 0.1) !important;
  color: var(--accent-red) !important;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.comp-delete-btn:hover {
  background: var(--accent-red) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
@media (max-width: 1024px) {
  .competitor-main-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .view-header-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .control-group-row,
  .report-controls-inline {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .report-controls-inline .btn { width: 100%; }
}

/* ─── Sidebar Footer ────────────────────────── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.dp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.dp-link:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent-purple);
}

.dp-version {
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-input);
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.dp-link:hover .dp-version {
  background: var(--accent-purple);
  color: white;
}

/* ─── Dark Mode & Theme Toggle ────────────────────────── */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #94a3b8;
  transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 30px;
}

.theme-slider .thumb {
  position: absolute;
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.theme-slider .sun-icon {
  width: 14px;
  height: 14px;
  color: #f59e0b;
  transition: 0.3s;
}

.theme-slider .moon-icon {
  width: 14px;
  height: 14px;
  color: #ffffff;
  position: absolute;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.3s;
}

input:checked + .theme-slider {
  background-color: #3730a3; /* Indigo 800 */
}

input:checked + .theme-slider .thumb {
  transform: translateX(24px);
  background-color: #8b5cf6; /* Purple 500 */
  box-shadow: none;
}

input:checked + .theme-slider .sun-icon {
  opacity: 0;
  transform: translateY(-12px);
}

input:checked + .theme-slider .moon-icon {
  opacity: 1;
  transform: translateY(0);
}

:root[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-input: #334155;
  --border: #334155;
  --border-light: #475569;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-purple: #a78bfa;
  --accent-pink: #f472b6;
  --accent-orange: #fb923c;
  --accent-blue: #60a5fa;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  color-scheme: dark;
}

/* ─── Toggle Switch ────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border);
  transition: .4s;
  border-radius: 24px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-purple);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.modern-password-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.modern-password-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), 0 2px 4px rgba(0,0,0,0.02);
  background: var(--bg-card);
}

.modern-password-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* ─── Activity History ───────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.filter-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.filter-btn.active {
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.3);
  color: var(--accent-purple);
  font-weight: 600;
}
.filter-search {
  flex: 1;
  min-width: 160px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.filter-search:focus { border-color: var(--accent-purple); }

.timeline-group { margin-bottom: 28px; }
.timeline-date {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(226,232,240,0.5);
}
.timeline-item:last-child { border-bottom: none; }
.t-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.t-body { flex: 1; min-width: 0; }
.t-action {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.t-detail {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── History empty state ───────────────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  min-height: 300px;
}
.empty svg { opacity: 0.35; margin-bottom: 16px; }
.empty p { font-size: 15px; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   Guide / Tutorial Page  (gd-* prefix)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tab Bar ────────────────────────────────────────────────── */
.gd-tabs-wrap {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gd-tabs-wrap::-webkit-scrollbar { display: none; }
.gd-tabs {
  display: flex;
  gap: 2px;
  min-width: max-content;
}
.gd-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.gd-tab:hover { color: var(--text-primary); }
.gd-tab.gd-tab-active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.gd-tab svg { opacity: 0.7; }
.gd-tab.gd-tab-active svg { opacity: 1; }

/* ─── Topic header ───────────────────────────────────────────── */
.gd-topic-header {
  padding: 28px 24px 8px;
}
.gd-topic-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.gd-topic-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ─── Main panel ─────────────────────────────────────────────── */
.gd-panel {
  padding: 20px 24px 40px;
}
.gd-panel-inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .gd-panel-inner { grid-template-columns: 1fr; }
  .gd-step-list { display: flex; flex-wrap: wrap; gap: 8px; }
}

/* ─── Step list (left sidebar) ───────────────────────────────── */
.gd-step-list {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}
.gd-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.gd-step-item:last-child { border-bottom: none; }
.gd-step-item:hover { background: var(--bg-hover); }
.gd-step-item.gd-step-active { background: linear-gradient(90deg, rgba(124,58,237,0.08), transparent); }
.gd-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-input);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}
.gd-step-active .gd-step-num {
  background: var(--accent-primary);
  color: #fff;
}
.gd-step-done .gd-step-num {
  background: #10b981;
  color: #fff;
}
.gd-step-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 500;
}
.gd-step-active .gd-step-text { color: var(--text-primary); font-weight: 700; }

/* ─── Right panel ─────────────────────────────────────────────── */
.gd-panel-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Visual mockup ──────────────────────────────────────────── */
.gd-visual {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  min-height: 280px;
  position: relative;
}

/* ─── Step info ──────────────────────────────────────────────── */
.gd-step-info {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 22px;
}
.gd-step-badge {
  display: inline-block;
  background: rgba(124,58,237,0.1);
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.gd-step-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.gd-step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}
.gd-warn-banner {
  margin-top: 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  font-weight: 500;
  line-height: 1.5;
}
[data-theme="dark"] .gd-warn-banner { color: #f87171; }
.gd-tip-banner {
  margin-top: 12px;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #059669;
  font-weight: 500;
  line-height: 1.5;
}
[data-theme="dark"] .gd-tip-banner { color: #34d399; }

/* ─── Navigation ──────────────────────────────────────────────── */
.gd-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gd-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.gd-nav-btn:hover:not(:disabled) { background: var(--bg-hover); }
.gd-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.gd-nav-next {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.gd-nav-next:hover:not(:disabled) { opacity: 0.88; }
.gd-dots {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.gd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.gd-dot-active {
  background: var(--accent-primary);
  width: 22px;
  border-radius: 4px;
}

/* ─── Auto-advance bar ───────────────────────────────────────── */
.gd-auto-bar {
  height: 3px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.gd-auto-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #ec4899);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════════
   Mockup UI Components  (gdm-* prefix)
   ═══════════════════════════════════════════════════════════════ */

.gdm-wrap {
  display: flex;
  height: 280px;
  position: relative;
  font-family: inherit;
  overflow: hidden;
}
.gdm-wrap-browser {
  align-items: center;
  justify-content: center;
  background: #f0f4ff;
  padding: 16px;
}
[data-theme="dark"] .gdm-wrap-browser { background: #1a1a2e; }

/* ─── Mini sidebar ──────────────────────────────────────────── */
.gdm-sidebar {
  width: 110px;
  flex-shrink: 0;
  background: var(--bg-sidebar, #1e1b4b);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 6px;
  overflow: hidden;
}
.gdm-mock-logo {
  font-size: 16px;
  padding: 6px 8px 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.gdm-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 10.5px;
  color: rgba(255,255,255,0.55);
  cursor: default;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
}
.gdm-nav span { overflow: hidden; text-overflow: ellipsis; }
.gdm-active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 700;
}

/* ─── Main content area ───────────────────────────────────────── */
.gdm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  min-width: 0;
  overflow: hidden;
}
.gdm-blurred { filter: blur(2px); opacity: 0.5; }

.gdm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
  gap: 8px;
  flex-shrink: 0;
}
.gdm-pg-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.gdm-btn-group { display: flex; gap: 4px; }

.gdm-body {
  flex: 1;
  padding: 10px 12px;
  overflow: hidden;
}
.gdm-center-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 6px;
}
.gdm-empty-icon { font-size: 28px; opacity: 0.5; }
.gdm-hint-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Buttons ──────────────────────────────────────────────────── */
.gdm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: default;
  border: 1px solid var(--border-color);
  white-space: nowrap;
  flex-shrink: 0;
}
.gdm-btn-primary {
  background: var(--accent-primary, #7c3aed);
  color: #fff;
  border-color: transparent;
}
.gdm-btn-facebook {
  background: #1877f2;
  color: #fff;
  border-color: transparent;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  justify-content: center;
  width: 100%;
}
.gdm-fb-icon { font-weight: 900; font-size: 14px; }
.gdm-btn-sm { padding: 3px 8px; font-size: 10px; border-radius: 5px; }
.gdm-btn-pdf { background: #ef4444; color: #fff; border-color: transparent; }
.gdm-btn-excel { background: #16a34a; color: #fff; border-color: transparent; }
.gdm-btn-ppt { background: #ea580c; color: #fff; border-color: transparent; }
.gdm-btn-disabled { opacity: 0.5; }

/* ─── Highlight & pulse animation ─────────────────────────────── */
@keyframes gdm-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
  50%  { box-shadow: 0 0 0 5px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
}
@keyframes gdm-pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50%  { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
}
.gdm-hl {
  outline: 2px solid rgba(124,58,237,0.6);
  outline-offset: 1px;
}
.gdm-pulse { animation: gdm-pulse 1.6s ease-in-out infinite; }
.gdm-success-card .gdm-pulse { animation: gdm-pulse-green 1.6s ease-in-out infinite; }

/* ─── Form elements ───────────────────────────────────────────── */
.gdm-form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gdm-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gdm-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-primary);
}
.gdm-select-empty { color: var(--text-muted); }
.gdm-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-muted);
}
.gdm-input-filled { color: var(--text-primary); }
.gdm-input-pw { letter-spacing: 0.1em; }
.gdm-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.5;
  min-height: 60px;
}
.gdm-date-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.gdm-date-chip {
  padding: 3px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 10px;
  color: var(--text-secondary);
}

/* ─── Spinner ─────────────────────────────────────────────────── */
@keyframes gdm-spin { to { transform: rotate(360deg); } }
.gdm-spinner-large {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: gdm-spin 0.8s linear infinite;
}
.gdm-spinner-sm {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: gdm-spin 0.6s linear infinite;
  vertical-align: -1px;
}

/* ─── Progress bar ────────────────────────────────────────────── */
.gdm-progress-wrap {
  width: 100%;
  height: 5px;
  background: var(--bg-input);
  border-radius: 5px;
  overflow: hidden;
}
@keyframes gdm-progress { from { width: 0; } to { width: 100%; } }
.gdm-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent-primary), #ec4899); border-radius: 5px; }
.gdm-progress-anim { animation: gdm-progress 5s ease-in-out forwards; }

/* ─── Warning box ─────────────────────────────────────────────── */
.gdm-warn-box {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 10.5px;
  color: #dc2626;
  font-weight: 600;
  text-align: center;
  max-width: 200px;
}
[data-theme="dark"] .gdm-warn-box { color: #f87171; }

/* ─── Progress stages ─────────────────────────────────────────── */
.gdm-progress-stages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 180px;
}
.gdm-stage {
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gdm-stage-done { color: #10b981; }
.gdm-stage-active { color: var(--text-primary); font-weight: 700; background: var(--bg-hover); }

/* ─── Account card ────────────────────────────────────────────── */
.gdm-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}
.gdm-success-card {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.04);
}
.gdm-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.gdm-account-info { flex: 1; min-width: 0; }
.gdm-account-name { font-size: 11.5px; font-weight: 700; color: var(--text-primary); }
.gdm-account-sub  { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.gdm-account-actions { display: flex; gap: 4px; }

/* ─── Report preview ──────────────────────────────────────────── */
.gdm-report-preview {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  height: 160px;
  display: flex;
  flex-direction: column;
}
.gdm-report-cover {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.gdm-report-logo { font-size: 20px; }
.gdm-report-ttl { font-size: 12px; font-weight: 800; color: #fff; }
.gdm-report-sub { font-size: 10px; color: rgba(255,255,255,0.7); }
.gdm-report-stats {
  display: flex;
  padding: 8px 12px;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
}
.gdm-stat { text-align: center; flex: 1; }
.gdm-stat-num { font-size: 13px; font-weight: 800; color: var(--text-primary); }
.gdm-stat-lbl  { font-size: 9px; color: var(--text-muted); margin-top: 1px; }

/* ─── Schedule card ───────────────────────────────────────────── */
.gdm-schedule-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}
.gdm-schedule-icon { font-size: 22px; }
.gdm-schedule-info { flex: 1; }

/* ─── Modal overlay ───────────────────────────────────────────── */
.gdm-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  width: 220px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
.gdm-modal-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.gdm-modal-desc { font-size: 10.5px; color: var(--text-muted); line-height: 1.5; }

/* ─── Browser mockup ───────────────────────────────────────────── */
.gdm-browser {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 260px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.gdm-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
}
.gdm-browser-dots { display: flex; gap: 4px; }
.gdm-browser-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-color); }
.gdm-browser-dots span:nth-child(1) { background: #f87171; }
.gdm-browser-dots span:nth-child(2) { background: #fbbf24; }
.gdm-browser-dots span:nth-child(3) { background: #34d399; }
.gdm-browser-url {
  flex: 1;
  background: var(--card-bg);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 9.5px;
  color: var(--text-muted);
  text-align: center;
}
.gdm-browser-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.gdm-fb-logo {
  font-size: 22px;
  font-weight: 900;
  color: #1877f2;
  letter-spacing: -0.05em;
}
.gdm-fb-logo span { font-size: 16px; }
.gdm-fb-form { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.gdm-fb-note { font-size: 9px; color: var(--text-muted); text-align: center; line-height: 1.4; }

/* ─── Reels cards ─────────────────────────────────────────────── */
.gdm-reels-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.gdm-reels-list { display: flex; flex-direction: column; gap: 4px; }
.gdm-reel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.gdm-reel-top { border-color: rgba(236,72,153,0.3); background: rgba(236,72,153,0.04); }
.gdm-reel-thumb { font-size: 14px; }
.gdm-reel-info { flex: 1; font-size: 10px; color: var(--text-primary); }
.gdm-badge { font-size: 12px; }
.gdm-badge-green { }

/* ─── Competitor compare ───────────────────────────────────────── */
.gdm-compare-table { display: flex; flex-direction: column; gap: 1px; }
.gdm-compare-header { display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 10px; font-weight: 700; }
.gdm-compare-row { display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; font-size: 10px; }
.gdm-compare-col { padding: 6px 8px; color: var(--text-secondary); }
.gdm-compare-col-h { color: var(--text-muted); padding: 4px 8px; }
.gdm-compare-you { font-weight: 700; }
.gdm-text-green { color: #10b981; font-weight: 700; }

/* ─── Report rows ──────────────────────────────────────────────── */
.gdm-report-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}
.gdm-report-row span:nth-child(2) { flex: 1; }

/* ─── Color pickers ────────────────────────────────────────────── */
.gdm-color-row { display: flex; gap: 6px; flex-wrap: wrap; }
.gdm-color-chip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: default;
  border: 2px solid transparent;
}

/* ─── Upload box ────────────────────────────────────────────────── */
.gdm-upload-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 8px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}
.gdm-upload-lock { opacity: 0.5; }

/* ─── Frequency chips ──────────────────────────────────────────── */
.gdm-freq-row { display: flex; gap: 6px; }
.gdm-freq-chip {
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 10.5px;
  color: var(--text-secondary);
}
.gdm-freq-active {
  background: var(--accent-primary);
  color: #fff;
  border-color: transparent;
}

/* ─── Email chip ────────────────────────────────────────────────── */
.gdm-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(124,58,237,0.1);
  color: var(--accent-primary);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
}

/* ─── Click hints ──────────────────────────────────────────────── */
.gdm-click-hint {
  position: absolute;
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
  pointer-events: none;
  z-index: 20;
}
.gdm-click-hint::before {
  content: '→ ';
}
.gdm-click-sidebar { left: 116px; bottom: 20px; }
.gdm-click-top { right: 10px; top: 50px; }
.gdm-click-mid { right: 10px; top: 45%; }

/* ─── Success badge ──────────────────────────────────────────────── */
.gdm-success-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(16,185,129,0.4);
  z-index: 20;
}

/* ── Cover Edit Modal (cem) ── */
.cem-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cem-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: cem-in 0.22s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes cem-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.cem-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.cem-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(236,72,153,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #7c3aed);
  flex-shrink: 0;
}
.cem-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.cem-close:hover { color: var(--text-primary); background: var(--bg-hover, rgba(0,0,0,0.06)); }
.cem-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.cem-field { display: flex; flex-direction: column; gap: 6px; }
.cem-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; text-transform: uppercase; }
.cem-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}
.cem-input:focus {
  border-color: var(--accent, #7c3aed);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.cem-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}
.cem-btn-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cem-btn-cancel:hover { background: var(--bg-hover, rgba(0,0,0,0.05)); color: var(--text-primary); }
.cem-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-purple, linear-gradient(135deg,#7c3aed,#ec4899));
  border: none;
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.cem-btn-save:hover { opacity: 0.9; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════
   UI POLISH — Premium SaaS facelift
   ═══════════════════════════════════════════════════════ */

/* ── Sidebar refinements ─────────────────────────────── */

/* Sidebar shell */
.sidebar {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8FF 100%);
  border-right: 1px solid #ECEAF5;
  border-radius: 0 24px 24px 0;
  box-shadow: 4px 0 40px rgba(15, 23, 42, 0.06);
}

/* Logo / brand zone */
.sidebar-header {
  padding: 26px 22px 22px;
  border-bottom: 1px solid rgba(124,58,237,0.1);
}

.logo {
  gap: 12px;
}

/* Nav area */
.sidebar-nav {
  padding: 20px 14px;
  gap: 2px;
}

/* Section labels */
.nav-group-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #8A94A6;
  opacity: 1;
  margin: 22px 8px 8px;
  padding: 0;
}

/* Menu items */
.nav-btn {
  height: 44px;
  font-size: 14.5px;
  font-weight: 500;
  color: #334155;
  border-radius: 14px;
  padding: 0 14px;
  gap: 14px;
}

.nav-btn:hover {
  background: #F5F1FF;
  color: #6D28D9;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  color: #64748B;
  flex-shrink: 0;
  transition: color 0.2s;
}

.nav-btn:hover svg {
  color: #6D28D9;
}

/* Active item */
.nav-btn.active {
  background: linear-gradient(135deg, #F3E8FF 0%, #F8F5FF 100%);
  color: #7C3AED;
  font-weight: 700;
  border: 1px solid #DDD6FE;
}

.nav-btn.active svg {
  color: #7C3AED;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 14px 18px;
  border-top: none;
}

.dp-link {
  height: 48px;
  border-radius: 14px;
  border: 1px solid #E6E8F0;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  padding: 0 16px;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.dp-link:hover {
  background: rgba(124,58,237,0.04);
  border-color: rgba(124,58,237,0.2);
  color: #6D28D9;
}

.dp-version {
  font-size: 11.5px;
  color: #94A3B8;
  background: #F1F0F8;
  border-radius: 10px;
  padding: 2px 7px;
  font-weight: 500;
}

.dp-link:hover .dp-version {
  background: rgba(124,58,237,0.1);
  color: #7C3AED;
}

/* ── Dark mode: account name hardcoded color fix ─────── */
:root[data-theme="dark"] .account-card-header .account-name {
  color: var(--text-primary);
}

/* ── Dark mode: sidebar overrides ───────────────────── */
:root[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #1a2236 0%, #1e293b 100%);
  border-right: 1px solid #2d3a50;
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .sidebar-header {
  border-bottom: 1px solid rgba(167,139,250,0.15);
}

:root[data-theme="dark"] .nav-group-title {
  color: #64748B;
}

:root[data-theme="dark"] .nav-btn {
  color: #94a3b8;
}

:root[data-theme="dark"] .nav-btn:hover {
  background: rgba(167,139,250,0.1);
  color: #a78bfa;
}

:root[data-theme="dark"] .nav-btn:hover svg {
  color: #a78bfa;
}

:root[data-theme="dark"] .nav-btn.active {
  background: linear-gradient(135deg, rgba(167,139,250,0.18) 0%, rgba(139,92,246,0.12) 100%);
  color: #a78bfa;
  border-color: rgba(167,139,250,0.25);
}

:root[data-theme="dark"] .nav-btn.active svg {
  color: #a78bfa;
}

:root[data-theme="dark"] .nav-btn svg {
  color: #64748b;
}

:root[data-theme="dark"] .sidebar-footer {
  /* keep clean */
}

:root[data-theme="dark"] .dp-link {
  background: rgba(255,255,255,0.04);
  border-color: #2d3a50;
  color: #64748b;
  box-shadow: none;
}

:root[data-theme="dark"] .dp-link:hover {
  background: rgba(167,139,250,0.08);
  border-color: rgba(167,139,250,0.2);
  color: #a78bfa;
}

:root[data-theme="dark"] .dp-version {
  background: rgba(255,255,255,0.06);
  color: #475569;
}

:root[data-theme="dark"] .dp-link:hover .dp-version {
  background: rgba(167,139,250,0.15);
  color: #a78bfa;
}

/* ── Topbar refinements ──────────────────────────────── */
.topbar-actions { gap: 14px; }

/* Theme toggle pill */
.theme-toggle {
  width: 52px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  padding: 3px !important;
}
.theme-toggle .toggle-thumb {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
}

/* User avatar */
.user-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 2px solid rgba(255,255,255,0.25) !important;
}

/* ── Card polish ─────────────────────────────────────── */
.card, .info-card, .report-controls {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.card:hover, .info-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}

.quick-action-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.quick-action-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.09);
  border-color: #c4b5fd;
}

/* Dashboard recent panels */
.dashboard-recent-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Account card header gap ────────────────────────── */
.account-card-header { gap: 16px; }

.account-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.account-card-actions .btn {
  height: 40px;
  justify-content: center;
  font-size: 13px;
  padding: 0 12px;
}

/* ── Button refinements ──────────────────────────────── */
.btn {
  border-radius: 10px;
  font-weight: 600;
  gap: 7px;
}

.btn-generate {
  height: 44px;
  padding: 0 28px;
  font-size: 15px;
  box-shadow: 0 6px 14px rgba(109,40,217,0.22);
}
.btn-generate:hover {
  box-shadow: 0 8px 20px rgba(109,40,217,0.30);
}

/* ── Dashboard grid spacing ──────────────────────────── */
.view { padding: 28px 32px; }

.dashboard-accounts-grid {
  gap: 20px;
}

.dashboard-quick-actions {
  gap: 16px;
  margin-bottom: 28px;
}

/* ── Typography hierarchy ────────────────────────────── */
.view > h2,
.accounts-header h2,
.view-header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Section titles inside panels */
.panel-title,
.db-recent-title,
h3.panel-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ── Empty state (dashboard panels) ─────────────────── */
.db-empty {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.db-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #F3E8FF;
  color: #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-empty-icon svg { width: 18px; height: 18px; }

.db-empty p {
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 400;
  margin: 0;
}

/* ── Dashboard recent items ──────────────────────────── */
.db-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}

.db-recent-item:hover { background: rgba(139,92,246,0.05); }
.db-recent-item:last-child { border-bottom: none; }

/* ── Section header spacing ──────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* ── Scrollbar matches new palette ───────────────────── */
::-webkit-scrollbar-thumb { background: #e2e4ed; }
::-webkit-scrollbar-thumb:hover { background: #c9cdd8; }

/* ── Dark mode compensation ──────────────────────────── */
[data-theme="dark"] .nav-btn { color: #94a3b8; }
[data-theme="dark"] .nav-btn:hover { background: rgba(139,92,246,0.12); color: #c4b5fd; }
[data-theme="dark"] .nav-btn.active { background: rgba(139,92,246,0.18); color: #a78bfa; }
[data-theme="dark"] .card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .quick-action-card,
[data-theme="dark"] .report-controls,
[data-theme="dark"] .dashboard-recent-panel,
[data-theme="dark"] .db-side-card {
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .db-empty-icon { background: rgba(139,92,246,0.15); }
[data-theme="dark"] .db-recent-item:hover { background: rgba(139,92,246,0.08); }
[data-theme="dark"] .db-recent-item { border-bottom-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .btn-secondary {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: #e2e8f0;
}
[data-theme="dark"] .btn-secondary:hover {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.4);
  color: #c4b5fd;
}
[data-theme="dark"] .account-card { background: #1e293b; }
[data-theme="dark"] .view-header-card { background: #1e293b; border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .locked-action { background: rgba(255,255,255,0.06) !important; }
[data-theme="dark"] .loading-state { background: #1e293b; border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .ld-ghost-bar { background: rgba(255,255,255,0.1); }
