/* ============================================
   OpenClaw Dashboard – Apple-Inspired Design
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Apple Dark Mode Colors */
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --bg-card: #1c1c1e;
  --bg-card-hover: #2c2c2e;
  --bg-tertiary: #3a3a3c;
  --bg-input: #2c2c2e;

  --text: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-tertiary: rgba(235, 235, 245, 0.3);

  --separator: rgba(84, 84, 88, 0.65);
  --separator-light: rgba(84, 84, 88, 0.36);

  /* Apple System Colors */
  --accent: #0a84ff;
  --system-red: #ff453a;
  --system-orange: #ff9f0a;
  --system-yellow: #ffd60a;
  --system-green: #30d158;
  --system-teal: #64d2ff;
  --system-pink: #ff375f;
  --system-purple: #bf5af2;
  --system-indigo: #5e5ce6;

  /* Type Colors */
  --breaking: var(--system-red);
  --briefing: var(--accent);
  --research: var(--system-orange);
  --competitor: var(--system-pink);
  --script: var(--system-teal);
  --advisor: var(--system-purple);
  --task: var(--system-green);
  --note: var(--text-tertiary);
  --analytics: #64d2ff;

  /* Typography */
  --font: -apple-system, 'SF Pro Display', 'SF Pro Text', BlinkMacSystemFont, system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --line-height: 1.47;
  --letter-spacing: -0.022em;

  /* Layout */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100dvh;
}

.screen { height: 100dvh; }
.hidden { display: none !important; }

/* ============================================
   LOGIN SCREEN – iOS Passcode Style
   ============================================ */

#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-container {
  text-align: center;
  padding: 20px;
  width: 100%;
  max-width: 320px;
}

.login-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.9;
}

.login-container h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.login-container > p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--text-secondary);
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--text);
  border-color: var(--text);
  transform: scale(1.1);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 270px;
  margin: 0 auto;
  user-select: none;
}

.pin-pad button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 300;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: background 0.1s ease;
  -webkit-appearance: none;
}

.pin-pad button:active {
  background: var(--bg-tertiary);
}

.pin-empty {
  visibility: hidden;
}

.pin-delete {
  background: transparent !important;
  font-size: 1.3rem !important;
  color: var(--text-secondary) !important;
}

.pin-delete:active {
  background: transparent !important;
  opacity: 0.5;
}

.error {
  color: var(--system-red);
  font-size: var(--text-sm);
  margin-top: 20px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

#dashboard {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--bg);
}

/* --- Header --- */
header {
  padding: calc(var(--safe-top) + 16px) 20px 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}

header h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.header-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

.header-stats {
  display: none;
}

.badge {
  display: none;
}

/* --- Tab Navigation – Pill Style --- */
.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 49;
  border-bottom: 0.5px solid var(--separator-light);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  min-height: 34px;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  position: relative;
}

.tab:active {
  transform: scale(0.96);
}

.tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-weight: 600;
}

.tab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--system-red);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.tab-badge:empty {
  display: none;
}

/* --- Main Content --- */
main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(var(--safe-bottom) + 16px);
}

.pull-hint {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  padding: 8px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* ============================================
   ENTRY CARDS
   ============================================ */

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
  border-left: 3px solid transparent;
}

.entry-card:active {
  background: var(--bg-card-hover);
  transform: scale(0.98);
}

/* Unread indicator – blue dot */
.entry-card.unread::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

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

.type-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0;
  background: none;
  border: none;
}

.type-badge.type-breaking { color: var(--breaking); }
.type-badge.type-briefing { color: var(--briefing); }
.type-badge.type-research { color: var(--research); }
.type-badge.type-competitor { color: var(--competitor); }
.type-badge.type-script { color: var(--script); }
.type-badge.type-advisor { color: var(--advisor); }
.type-badge.type-task { color: var(--task); }
.type-badge.type-note { color: var(--note); }
.type-badge.type-analytics { color: var(--analytics); }
.type-badge.type-competitor-script { color: var(--competitor); }

.entry-time {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.entry-title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--text);
}

.entry-preview {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Type accent borders */
.entry-card.type-breaking { border-left-color: var(--breaking); }
.entry-card.type-briefing { border-left-color: var(--briefing); }
.entry-card.type-research { border-left-color: var(--research); }
.entry-card.type-competitor { border-left-color: var(--competitor); }
.entry-card.type-script { border-left-color: var(--script); }
.entry-card.type-advisor { border-left-color: var(--advisor); }
.entry-card.type-task { border-left-color: var(--task); }
.entry-card.type-note { border-left-color: var(--note); }
.entry-card.type-analytics { border-left-color: var(--analytics); }
.entry-card.type-competitor-script { border-left-color: var(--competitor); }

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: var(--text-base);
  color: var(--text-tertiary);
}

/* ============================================
   ACTIVITY
   ============================================ */

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.activity-dot.ok { background: var(--system-green); }
.activity-dot.error { background: var(--system-red); }
.activity-dot.warn { background: var(--system-orange); }

.activity-info { flex: 1; }

.activity-desc {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.4;
}

.activity-time {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ============================================
   DETAIL MODAL
   ============================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(30%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 20px 12px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 10;
  border-bottom: 0.5px solid var(--separator-light);
}

.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-size: var(--text-lg);
  font-weight: 400;
  cursor: pointer;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-btn:active {
  opacity: 0.5;
}

.modal-content {
  padding: 24px 20px calc(var(--safe-bottom) + 40px);
}

.modal-content h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.modal-content time {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--separator-light);
}

/* --- Markdown Body --- */
.modal-body {
  font-size: var(--text-base);
  line-height: 1.65;
  color: rgba(235, 235, 245, 0.85);
}

.modal-body p {
  margin-bottom: 16px;
}

.modal-body h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text);
}

.modal-body h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 32px 0 10px;
  color: var(--text);
}

.modal-body h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text);
}

.modal-body strong {
  font-weight: 600;
  color: var(--text);
}

.modal-body em {
  font-style: italic;
  color: var(--text-secondary);
}

.modal-body code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: var(--text-sm);
  font-family: 'SF Mono', 'Menlo', monospace;
}

.modal-body blockquote {
  border-left: 3px solid var(--bg-tertiary);
  padding: 0 0 0 16px;
  margin: 16px 0;
  color: var(--text-secondary);
}

.modal-body ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.modal-body li {
  padding: 4px 0 4px 16px;
  position: relative;
}

.modal-body li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}

.modal-body a {
  color: var(--accent);
  text-decoration: none;
}

.modal-body a:active {
  opacity: 0.6;
}


}

/* ============================================
   SCRIPT ACTION BUTTONS (Voice + Cover)
   ============================================ */

.script-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--separator-light);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  white-space: nowrap;
}

.action-btn:active:not(:disabled) {
  transform: scale(0.98);
  opacity: 0.9;
}

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

.voice-btn { background: var(--system-teal); color: #000; }
.voice-btn.voice-loading { background: var(--bg-tertiary); color: var(--text-secondary); animation: actionPulse 1.5s ease-in-out infinite; }
.voice-btn.voice-done { background: var(--system-green); color: #000; }
.voice-btn.voice-error { background: var(--system-red); color: #fff; }

.cover-btn { background: var(--system-purple); color: #fff; }
.cover-btn.cover-loading { background: var(--bg-tertiary); color: var(--text-secondary); animation: actionPulse 1.5s ease-in-out infinite; }
.cover-btn.cover-done { background: var(--system-green); color: #000; }
.cover-btn.cover-error { background: var(--system-red); color: #fff; }

@keyframes actionPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */

.download-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 0.5px solid var(--separator-light);
}

.download-section h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease, transform 0.1s ease;
}

.download-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.98);
}

.download-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.download-name {
  font-size: var(--text-base);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-btn:hover {
  background: var(--bg-card-hover);
}

/* ============================================
   DESKTOP / TABLET
   ============================================ */

@media (min-width: 768px) {
  header {
    padding-left: 32px;
    padding-right: 32px;
  }

  .tabs {
    padding-left: 32px;
    padding-right: 32px;
  }

  main {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 32px calc(var(--safe-bottom) + 40px);
  }

  .entry-card:hover {
    background: var(--bg-card-hover);
  }

  .login-container {
    max-width: 360px;
  }

  .pin-pad button:hover {
    background: var(--bg-tertiary);
  }
}

@media (min-width: 1024px) {
  main {
    max-width: 800px;
  }

  .modal-content {
    max-width: 740px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.tabs {
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.tab {
  scroll-snap-align: start;
}

::selection {
  background: rgba(10, 132, 255, 0.3);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   ANALYTICS DASHBOARD – Visual Design
   ============================================ */

.analytics-dash {
  padding: 0;
  max-width: 100%;
}

/* Platform Header */
.analytics-platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.platform-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.platform-icon-box.youtube { background: rgba(255,0,0,0.15); }
.platform-icon-box.instagram { background: rgba(225,48,108,0.15); }
.platform-icon-box.tiktok { background: rgba(0,242,234,0.15); }

.platform-info {
  flex: 1;
}

.platform-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.platform-channel {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.platform-date {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* Channel Overview Stats */
.channel-overview {
  display: flex;
  gap: 0;
  padding: 14px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.channel-stat {
  flex: 1;
  text-align: center;
  position: relative;
}

.channel-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(255,255,255,0.08);
}

.channel-stat-value {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.channel-stat-change {
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

.channel-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* KPI Metric Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.metric-card {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.06);
}

.metric-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.trend-up { color: #30D158; }
.trend-down { color: #FF453A; }

.sparkline-svg {
  display: block;
  margin-top: 8px;
  width: 100%;
  height: 28px;
}

/* Section Titles */
.analytics-section-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Daily Trend Bars */
.daily-trend {
  margin-bottom: 24px;
}

.daily-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
  padding: 0 2px;
}

.daily-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.daily-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
  opacity: 0.8;
  position: relative;
}

.daily-bar:hover {
  opacity: 1;
}

.daily-bar-value {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.daily-bar-label {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}

/* Video Performance Bars */
.video-performance {
  margin-bottom: 24px;
}

.video-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.video-bar-title {
  flex: 0 0 120px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.video-bar-track {
  flex: 1;
  height: 22px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
}

.video-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-width: 4px;
}

.video-bar-views {
  flex: 0 0 52px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.video-bar-retention {
  flex: 0 0 44px;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.retention-good { color: #30D158; }
.retention-ok { color: #FFD60A; }
.retention-bad { color: #FF453A; }

/* Video Detail Table */
.analytics-table-container {
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.analytics-table th {
  text-align: left;
  padding: 8px 8px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.analytics-table td {
  padding: 10px 8px;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-variant-numeric: tabular-nums;
}

.analytics-table .td-title {
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,0.85);
}

.val-good { color: #30D158; font-weight: 600; }
.val-ok { color: #FFD60A; font-weight: 600; }
.val-bad { color: #FF453A; font-weight: 600; }

/* Comments Section */
.comments-section {
  margin-bottom: 24px;
}

.comment-summary {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
}

.comment-card {
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

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

.sentiment-positive { background: #30D158; }
.sentiment-neutral { background: #8E8E93; }
.sentiment-negative { background: #FF453A; }

.comment-likes {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

.comment-text {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comment-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin-top: 6px;
}

/* Analysis & Recommendations */
.analysis-section {
  padding: 16px 18px;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px;
}

.analysis-section .analytics-section-title {
  margin-bottom: 10px;
}

.analysis-text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.recommendation-icon {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}

.recommendation-text {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.45;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric-card {
    padding: 12px 14px;
  }

  .metric-value {
    font-size: 22px;
  }

  .metric-label {
    font-size: 10px;
  }

  .channel-overview {
    gap: 0;
  }

  .channel-stat-value {
    font-size: 15px;
  }

  .video-bar-title {
    flex: 0 0 90px;
    font-size: 11px;
  }

  .video-bar-views {
    flex: 0 0 44px;
    font-size: 11px;
  }

  .analytics-table {
    font-size: 11px;
  }

  .analytics-table .td-title {
    max-width: 90px;
  }

  .daily-bars {
    height: 60px;
  }
}


/* --- Script Edit --- */
.script-edit-textarea {
  width: 100%;
  min-height: 300px;
  background: var(--bg-secondary, #1c1c1e);
  color: var(--text, #ffffff);
  border: 1px solid var(--separator-light, rgba(84, 84, 88, 0.36));
  border-radius: var(--radius, 12px);
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 12px;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.2s ease;
}

.script-edit-textarea:focus {
  border-color: var(--accent, #0a84ff);
}

.edit-btn {
  background: var(--bg-tertiary, #2c2c2e) !important;
  color: var(--text, #ffffff) !important;
}

.edit-btn.edit-active {
  background: var(--system-orange, #ff9f0a) !important;
  color: #000 !important;
}

.save-btn {
  background: var(--system-green, #30d158) !important;
  color: #000 !important;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius, 12px);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-btn:disabled {
  background: var(--bg-tertiary, #2c2c2e) !important;
  color: var(--text-secondary, #8e8e93) !important;
}


/* ============================================
   SKRIPT ERSTELLEN BUTTON (Konkurrenz-Tab)
   ============================================ */

.create-script-btn {
  background: linear-gradient(135deg, #30D158, #28B84E) !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
}

.create-script-btn:active {
  transform: scale(0.96);
}

.create-script-loading {
  background: #3A3A3C !important;
  color: #8E8E93 !important;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.create-script-done {
  background: #1C3A1C !important;
  color: #30D158 !important;
}

.create-script-error {
  background: #3A1C1C !important;
  color: #FF453A !important;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ============================================
   MULTI-PLATFORM ANALYTICS DASHBOARD (v3)
   ============================================ */

.multi-platform {
  padding: 0;
}

/* Header */
.mp-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid #2C2C2E;
}

.mp-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.mp-date {
  font-size: 13px;
  color: #8E8E93;
  margin-top: 4px;
}

/* Platform Cards Grid */
.mp-platforms-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.mp-platform-card {
  background: #1C1C1E;
  border-radius: 12px;
  padding: 16px;
  border-top: 3px solid #0A84FF;
}

.mp-platform-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mp-platform-icon {
  font-size: 18px;
}

.mp-platform-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* KPI Row */
.mp-kpi-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mp-kpi {
  flex: 1;
  min-width: 60px;
  text-align: center;
  background: #2C2C2E;
  border-radius: 8px;
  padding: 8px 4px;
}

.mp-kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.mp-kpi-label {
  font-size: 11px;
  color: #8E8E93;
  margin-top: 2px;
}

/* Best Video */
.mp-best-video {
  background: #2C2C2E;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
}

.mp-best-label {
  font-size: 12px;
  font-weight: 600;
  color: #FFD60A;
  margin-bottom: 6px;
}

.mp-best-hook {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.mp-best-stats {
  font-size: 12px;
  color: #8E8E93;
  margin-top: 4px;
}

.mp-best-why {
  font-size: 12px;
  color: #98989D;
  margin-top: 6px;
  line-height: 1.4;
  font-style: italic;
}

.mp-note {
  font-size: 12px;
  color: #8E8E93;
  margin-top: 8px;
  padding: 8px;
  background: #2C2C2E;
  border-radius: 6px;
}

/* Sections */
.mp-section {
  padding: 16px;
  border-top: 1px solid #2C2C2E;
}

.mp-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

/* Hook Ranking */
.mp-hook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-hook-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #1C1C1E;
  border-radius: 10px;
  padding: 12px;
}

.mp-hook-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2C2C2E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mp-hook-item:first-child .mp-hook-rank {
  background: #FFD60A;
  color: #000;
}

.mp-hook-content {
  flex: 1;
  min-width: 0;
}

.mp-hook-text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.mp-hook-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #8E8E93;
}

.mp-hook-platform {
  font-weight: 600;
}

.mp-hook-views {
  color: #fff;
  font-weight: 600;
}

.mp-hook-engagement {
  color: #30D158;
}

.mp-hook-retention {
  color: #FFD60A;
}

/* Cross-Platform Insights */
.mp-insights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-insight-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: #D1D1D6;
  line-height: 1.4;
}

.mp-insight-icon {
  color: #0A84FF;
  font-weight: 700;
  flex-shrink: 0;
}

/* Analysis */
.mp-analysis-text {
  font-size: 14px;
  color: #D1D1D6;
  line-height: 1.6;
}

/* Recommendations */
.mp-recommendations {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-rec-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #1C1C1E;
  border-radius: 8px;
  padding: 10px 12px;
}

.mp-rec-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #30D158;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.mp-rec-text {
  font-size: 13px;
  color: #D1D1D6;
  line-height: 1.4;
}


/* ============================================
   TAGESPLAN DASHBOARD – Interactive Daily Plan
   ============================================ */

.tp-dashboard {
  padding: 0;
  max-width: 100%;
}

/* Header with Streak */
.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(48, 209, 88, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(48, 209, 88, 0.15);
}

.tp-streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.15), rgba(255, 69, 58, 0.1));
  border: 1px solid rgba(255, 149, 0, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  width: fit-content;
}

.tp-streak-fire {
  font-size: 16px;
  animation: tp-fire-pulse 1.5s ease-in-out infinite;
}

@keyframes tp-fire-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.tp-streak-num {
  font-size: 18px;
  font-weight: 800;
  color: #FF9500;
  letter-spacing: -0.5px;
}

.tp-streak-label {
  font-size: 12px;
  font-weight: 600;
  color: #FF9500;
  opacity: 0.8;
}

.tp-date {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.tp-week {
  font-size: 13px;
  color: #8E8E93;
  margin-top: 2px;
}

/* Progress Circle */
.tp-progress-circle {
  position: relative;
  width: 52px;
  height: 52px;
}

.tp-progress-circle svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.tp-circle-bg {
  fill: none;
  stroke: #2C2C2E;
  stroke-width: 3;
}

.tp-circle-fill {
  fill: none;
  stroke: #30D158;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}

.tp-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 700;
  color: #30D158;
}

/* Focus Topic Card */
.tp-focus-card {
  background: #1C1C1E;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid #FFD60A;
}

.tp-focus-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #FFD60A;
  margin-bottom: 8px;
}

.tp-focus-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.tp-focus-why {
  font-size: 13px;
  color: #8E8E93;
  line-height: 1.4;
  margin-bottom: 12px;
}

.tp-focus-hook {
  background: rgba(255, 214, 10, 0.08);
  border-radius: 10px;
  padding: 12px;
}

.tp-hook-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #FFD60A;
  margin-bottom: 4px;
}

.tp-hook-text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  font-style: italic;
}

.tp-alt-hook {
  margin-top: 8px;
  cursor: pointer;
}

.tp-alt-toggle {
  font-size: 12px;
  color: #8E8E93;
  transition: color 0.2s;
}

.tp-alt-hook:hover .tp-alt-toggle { color: #D1D1D6; }

.tp-alt-content {
  display: none;
  font-size: 13px;
  color: #D1D1D6;
  font-style: italic;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.tp-alt-hook.expanded .tp-alt-content { display: block; }
.tp-alt-hook.expanded .tp-alt-toggle { color: #FFD60A; }

/* Checklist Cards */
.tp-checklist-card {
  background: #1C1C1E;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 4px solid #3A3A3C;
  transition: opacity 0.3s ease;
}

.tp-checklist-card.tp-prio-must { border-left-color: #FF453A; }
.tp-checklist-card.tp-prio-should { border-left-color: #FFD60A; }
.tp-checklist-card.tp-list-done { opacity: 0.6; }
.tp-checklist-card.tp-list-done .tp-cl-header { opacity: 0.7; }

.tp-cl-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tp-cl-icon { font-size: 16px; }

.tp-cl-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  letter-spacing: 0.5px;
}

.tp-prio-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
}

.tp-badge-must {
  background: rgba(255, 69, 58, 0.2);
  color: #FF453A;
}

.tp-cl-count {
  font-size: 12px;
  font-weight: 600;
  color: #8E8E93;
}

/* Checklist Progress Bar */
.tp-cl-progress {
  height: 3px;
  background: #2C2C2E;
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}

.tp-cl-progress-fill {
  height: 100%;
  background: #30D158;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Check Items */
.tp-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tp-check-item:first-of-type { border-top: none; }
.tp-check-item:active { opacity: 0.7; }

.tp-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #3A3A3C;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: transparent;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.tp-item-checked .tp-checkbox {
  background: #30D158;
  border-color: #30D158;
  color: #fff;
  animation: tp-check-bounce 0.3s ease;
}

@keyframes tp-check-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.tp-item-content { flex: 1; min-width: 0; }

.tp-item-text {
  font-size: 15px;
  color: #fff;
  line-height: 1.35;
  transition: all 0.2s ease;
}

.tp-item-checked .tp-item-text {
  text-decoration: line-through;
  color: #636366;
}

.tp-item-hint {
  font-size: 12px;
  color: #636366;
  margin-top: 2px;
}

.tp-item-checked .tp-item-hint { opacity: 0.5; }

/* Coach Card (replaces old Tip Card) */
.tp-coach-card {
  background: linear-gradient(135deg, #1C1C1E, #1a1a2e);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 1px solid rgba(94, 92, 230, 0.2);
  transition: border-color 0.2s;
}

.tp-coach-card:hover { border-color: rgba(94, 92, 230, 0.35); }

.tp-coach-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-coach-avatar { font-size: 20px; }

.tp-coach-name {
  font-size: 14px;
  font-weight: 700;
  color: #BF5AF2;
  flex: 1;
}

.tp-coach-arrow {
  font-size: 10px;
  color: #636366;
  transition: transform 0.2s ease;
}

.tp-coach-card.expanded .tp-coach-arrow { transform: rotate(90deg); }

.tp-coach-preview {
  font-size: 13px;
  color: #8E8E93;
  margin-top: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-coach-card.expanded .tp-coach-preview { display: none; }

.tp-coach-expanded {
  display: none;
  margin-top: 12px;
}

.tp-coach-card.expanded .tp-coach-expanded { display: block; }

.tp-coach-section {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}

.tp-coach-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #8E8E93;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tp-coach-section-text {
  font-size: 13px;
  color: #D1D1D6;
  line-height: 1.45;
}

.tp-coach-competitor {
  background: rgba(94, 92, 230, 0.08);
  border: 1px solid rgba(94, 92, 230, 0.15);
}

.tp-coach-competitor .tp-coach-section-label { color: #BF5AF2; }

.tp-coach-warning {
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.2);
}

.tp-coach-warning .tp-coach-section-label { color: #FF9F0A; }

/* Section Label */
.tp-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8E8E93;
  margin-bottom: 10px;
}

/* Week Progress Card */
.tp-week-card {
  background: #1C1C1E;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.tp-week-videos { margin-bottom: 12px; }

.tp-week-videos-bar {
  height: 8px;
  background: #2C2C2E;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.tp-week-videos-fill {
  height: 100%;
  background: linear-gradient(90deg, #30D158, #34C759);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.tp-week-videos-text {
  font-size: 13px;
  font-weight: 600;
  color: #D1D1D6;
}

.tp-week-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.tp-stat-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2C2C2E;
  border-radius: 10px;
  padding: 10px 12px;
}

.tp-stat-icon { font-size: 16px; opacity: 0.7; }

.tp-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.tp-stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

.tp-up { color: #30D158; }
.tp-down { color: #FF453A; }

.tp-week-goal {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.3;
}

.tp-on-track {
  background: rgba(48, 209, 88, 0.1);
  color: #30D158;
}

.tp-off-track {
  background: rgba(255, 159, 10, 0.1);
  color: #FF9F0A;
}

/* Month Goal Card */
.tp-month-card {
  background: #1C1C1E;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.tp-month-goal-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.tp-month-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.tp-month-bar {
  flex: 1;
  height: 10px;
  background: #2C2C2E;
  border-radius: 5px;
  overflow: hidden;
}

.tp-month-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5E5CE6, #BF5AF2);
  border-radius: 5px;
  transition: width 0.6s ease;
}

.tp-month-pct {
  font-size: 16px;
  font-weight: 800;
  color: #BF5AF2;
  min-width: 42px;
  text-align: right;
}

.tp-month-numbers {
  font-size: 12px;
  color: #8E8E93;
  margin-bottom: 12px;
}

/* Revenue Tracker */
.tp-revenue-card {
  background: rgba(48, 209, 88, 0.06);
  border: 1px solid rgba(48, 209, 88, 0.12);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.tp-revenue-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tp-revenue-icon { font-size: 16px; }

.tp-revenue-label {
  font-size: 13px;
  font-weight: 700;
  color: #30D158;
  flex: 1;
}

.tp-revenue-amount {
  font-size: 14px;
  font-weight: 800;
  color: #30D158;
}

.tp-revenue-bar {
  height: 6px;
  background: #2C2C2E;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.tp-revenue-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #30D158, #34C759);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.tp-revenue-sources {
  font-size: 11px;
  color: #636366;
  line-height: 1.3;
}

/* Milestone Card */
.tp-milestone-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(94, 92, 230, 0.08), rgba(191, 90, 242, 0.06));
  border: 1px solid rgba(94, 92, 230, 0.15);
  border-radius: 10px;
}

.tp-milestone-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.tp-milestone-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8E8E93;
  margin-bottom: 2px;
}

.tp-milestone-value {
  font-size: 13px;
  font-weight: 600;
  color: #BF5AF2;
  line-height: 1.35;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .tp-focus-title { font-size: 16px; }
  .tp-stat-item { padding: 8px 10px; }
  .tp-stat-value { font-size: 14px; }
  .tp-week-stats { gap: 8px; }
  .tp-streak-badge { padding: 3px 10px; }
  .tp-streak-num { font-size: 16px; }
}



/* ============================================
   SCRIPT WORKFLOW STATUS
   ============================================ */

/* Workflow step indicators on entry card */
.script-workflow {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  margin-right: 8px;
}

.wf-step {
  font-size: 14px;
  opacity: 0.3;
  transition: all 0.2s ease;
}

.wf-step.wf-done {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(48, 209, 88, 0.5));
}

/* Done script card dimming */
.entry-card.script-done {
  opacity: 0.45;
}

.entry-card.script-done .entry-title {
  text-decoration: line-through;
  text-decoration-color: #636366;
}

/* "Erledigt" toggle button */
.done-btn {
  background: #2C2C2E !important;
  color: #8E8E93 !important;
  border: 1px solid #3A3A3C !important;
}

.done-btn.done-active {
  background: #30D158 !important;
  color: #000 !important;
  border: 1px solid #30D158 !important;
}

/* Create-script button on non-script entries */
.create-script-btn {
  background: #5E5CE6;
  color: #fff;
}

.create-script-btn:active:not(:disabled) {
  background: #4B49B6;
}

.create-script-loading {
  background: #3A3A3C !important;
  color: #8E8E93 !important;
  animation: actionPulse 1.5s infinite;
}

.create-script-done {
  background: #30D158 !important;
  color: #000 !important;
}

.create-script-error {
  background: #FF453A !important;
}


/* ============================================
   INLINE SCRIPT BUTTONS
   ============================================ */

.inline-script-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #5E5CE6;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  padding: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.inline-script-btn:hover:not(:disabled) {
  background: #7B79F0;
  transform: scale(1.1);
}

.inline-script-btn:active:not(:disabled) {
  background: #4B49B6;
  transform: scale(0.95);
}

.inline-script-btn.inline-script-loading {
  background: #3A3A3C;
  color: #8E8E93;
  cursor: wait;
  animation: actionPulse 1.5s infinite;
}

.inline-script-btn.inline-script-done {
  background: #30D158;
  color: #000;
  cursor: default;
}

.inline-script-btn.inline-script-error {
  background: #FF453A;
  color: #fff;
}

/* ============================================
   SCRIPT STATUS BADGE (auf Cards)
   ============================================ */

.script-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 8px;
}

.script-status-badge.status-done {
  background: rgba(48, 209, 88, 0.15);
  color: #30D158;
}
/* Kein Interesse / Dismissed Scripts */
.entry-card.script-dismissed {
  opacity: 0.4;
}

.entry-card.script-dismissed:hover {
  opacity: 0.6;
}

.entry-card.script-dismissed .entry-title {
  text-decoration: line-through;
  text-decoration-color: #636366;
}

.script-status-badge.status-dismissed {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.dismiss-script-btn {
  background: rgba(107,114,128,0.15) !important;
  color: #9ca3af !important;
}

.dismiss-script-btn:hover {
  background: rgba(107,114,128,0.25) !important;
}


/* ============================================
   SCRIPT PROGRESS BAR (auf Cards)
   ============================================ */

.script-progress-bar {
  height: 3px;
  background: #2C2C2E;
  border-radius: 2px;
  margin: 4px 0 2px 0;
  overflow: hidden;
}

.script-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5E5CE6, #30D158);
  border-radius: 2px;
  transition: width 0.3s ease;
}


/* ============================================
   SCRIPT STATS HEADER + COLLAPSIBLE DONE
   ============================================ */

.script-stats-header {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.script-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 500;
}

.script-stat { color: var(--text-secondary); }
.script-stat-num { color: var(--text); font-weight: 700; }
.script-stat-sep { color: var(--text-tertiary); font-size: 0.7em; }
.script-stat-fire { color: var(--system-orange); font-weight: 600; }

/* Recent Done Chips */
.script-recent-done { margin-top: 12px; }

.script-recent-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  font-weight: 600;
}

.script-recent-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.script-recent-scroll::-webkit-scrollbar { display: none; }

.script-recent-chip {
  flex-shrink: 0;
  background: rgba(48, 209, 88, 0.08);
  border: 1px solid rgba(48, 209, 88, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s ease;
}
.script-recent-chip:active { background: rgba(48, 209, 88, 0.15); }

.script-recent-check {
  color: var(--system-green);
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 1px;
}

.script-recent-chip-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.script-recent-chip-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Collapsible Done Section */
.script-done-section { margin-top: 16px; }

.script-done-toggle {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--system-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
}
.script-done-toggle:active { background: var(--bg-card-hover); }

.script-done-arrow {
  transition: transform 0.25s ease;
  font-size: 10px;
  opacity: 0.6;
}

.script-done-section.expanded .script-done-arrow {
  transform: rotate(90deg);
}

.script-done-list {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.script-done-section.expanded .script-done-list {
  display: flex;
}


/* ============================================
   COMBINED COMPETITOR VIEW
   ============================================ */

.url-analyze-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.url-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-sm);
}
.url-input::placeholder { color: var(--text-tertiary); }
.url-input:focus { outline: none; border-color: var(--accent); }

.url-analyze-btn {
  background: var(--system-pink);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: var(--text-base);
  cursor: pointer;
  white-space: nowrap;
  min-width: 44px;
  transition: opacity 0.15s ease;
}
.url-analyze-btn:disabled { opacity: 0.6; }

.competitor-section { margin-bottom: 28px; }

.competitor-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 12px;
}
.competitor-section-header .section-icon {
  font-size: 18px;
  line-height: 1;
}
.competitor-section-header .section-count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Strategy cards: purple left accent */
.comp-card-strategy { border-left: 3px solid var(--system-purple); }
/* Trend cards: teal left accent */
.comp-card-trend { border-left: 3px solid var(--system-teal); }

/* Type badges for competitor types */
.type-badge.type-competitor {
  background: var(--system-purple);
  color: #fff;
}
.type-badge.type-competitor-script {
  background: var(--system-teal);
  color: #fff;
}

.competitor-show-more {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  margin: 8px 0;
  transition: background 0.15s ease, color 0.15s ease;
  border: 1px solid var(--separator);
}
.competitor-show-more:active { background: var(--bg-card-hover); color: var(--text); }

.competitor-more-list {
  display: none;
}


/* ============================================
   TAGESPLAN V3: Video Ideas + Weekly Goals
   ============================================ */

.tp-script-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: var(--system-indigo);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.tp-script-btn:active { opacity: 0.7; }

.tp-ideas-section { margin-bottom: 16px; }

.tp-idea-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  border-left: 3px solid var(--system-teal);
}

.tp-idea-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tp-idea-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text);
}

.tp-idea-title {
  font-size: var(--text-base);
  font-weight: 600;
  flex: 1;
  color: var(--text);
}

.tp-idea-hook {
  font-size: var(--text-sm);
  color: var(--system-yellow);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.4;
}

.tp-idea-source {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}

.tp-weekly-goals {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.tp-wg-count {
  float: right;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.tp-wg-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin: 8px 0 12px;
  overflow: hidden;
}

.tp-wg-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--system-purple), var(--system-green));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.tp-goal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 0.5px solid var(--separator-light);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tp-goal-item:first-of-type { border-top: none; }

.tp-goal-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.tp-goal-checked .tp-goal-checkbox {
  background: var(--system-green);
  border-color: var(--system-green);
  color: #000;
}

.tp-goal-checked .tp-goal-text {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

.tp-goal-content { flex: 1; }

.tp-goal-text {
  font-size: var(--text-base);
  line-height: 1.4;
  color: var(--text);
}

.tp-goal-deadline {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}


/* Analyze URL Status */
.analyze-status { margin-bottom: 12px; display: none; }
.analyze-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--bg-elevated); color: var(--text-secondary);
  font-size: var(--text-sm);
  border: 1px solid var(--separator);
  animation: analyzePulse 2s ease infinite;
}
.analyze-done {
  padding: 12px 16px; border-radius: var(--radius);
  background: rgba(48,209,88,0.1); color: var(--system-green);
  font-size: var(--text-sm); font-weight: 500;
}
.analyze-error {
  padding: 12px 16px; border-radius: var(--radius);
  background: rgba(255,69,58,0.1); color: var(--system-red);
  font-size: var(--text-sm); font-weight: 500;
}
.analyze-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--separator);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes analyzePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empfohlen Badge */
.empfohlen-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFD60A, #FF9F0A);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* Shawns Empfehlung section styling */
.modal-body h2 { margin-top: 24px; }
.modal-body h3 { margin-top: 16px; }


/* === X/Twitter Post Styles === */
.x-stats-header {
  padding: 12px 16px;
  margin-bottom: 12px;
}
.x-stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #999;
}
.x-stat-num {
  font-weight: 700;
  color: #1d9bf0;
}
.x-stat-sep { color: #444; }
.x-stat-fire { color: #1d9bf0; }

.x-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

.x-card {
  background: #111;
  border: 1px solid #222;
  border-left: 3px solid #1d9bf0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: all 0.2s;
}
.x-card:hover { border-color: #1d9bf0; }
.x-card-posted {
  opacity: 0.5;
  border-left-color: #4caf50;
}
.x-card-posted:hover { opacity: 0.8; }

.x-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.x-type-badge {
  background: #1d9bf015;
  color: #1d9bf0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.x-source-label {
  font-size: 11px;
  color: #888;
}
.x-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}
.x-status-draft {
  background: #ff980015;
  color: #ff9800;
}
.x-status-posted {
  background: #4caf5015;
  color: #4caf50;
}
.x-card-time {
  font-size: 11px;
  color: #555;
}

.x-tweet {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 6px;
  position: relative;
}
.x-tweet-hook {
  border-left: 2px solid #1d9bf0;
}
.x-tweet-num {
  font-size: 10px;
  color: #555;
  margin-bottom: 4px;
}
.x-tweet-text {
  font-size: 14px;
  line-height: 1.45;
  color: #e7e9ea;
  white-space: pre-wrap;
}
.x-tweet-chars {
  font-size: 10px;
  color: #444;
  text-align: right;
  margin-top: 6px;
}
.x-char-warn { color: #f44336 !important; }
.x-tweet-link {
  font-size: 11px;
  color: #1d9bf0;
  margin-top: 4px;
}

.x-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #1a1a1a;
}
.x-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.x-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.x-btn-post {
  background: #1d9bf0;
  color: #fff;
  font-weight: 600;
}
.x-btn-post:hover { background: #1a8cd8; }
.x-btn-edit {
  background: #222;
  color: #ccc;
}
.x-btn-edit:hover { background: #333; }
.x-btn-reject {
  background: transparent;
  color: #666;
  margin-left: auto;
}
.x-btn-reject:hover { color: #f44336; }
.x-btn-save {
  background: #1d9bf0;
  color: #fff;
  font-weight: 600;
}
.x-btn-cancel {
  background: #333;
  color: #ccc;
}

/* Done section (collapsible) */
.x-done-section { margin-top: 16px; }
.x-done-toggle {
  font-size: 13px;
  color: #666;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}
.x-done-toggle:hover { color: #999; }
.x-done-arrow { display: inline-block; transition: transform 0.2s; }
.x-done-section.expanded .x-done-arrow { transform: rotate(90deg); }
.x-done-list { display: none; }
.x-done-section.expanded .x-done-list { display: block; }

/* Edit overlay */
.x-edit-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.x-edit-modal {
  background: #111;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}
.x-edit-modal h3 {
  margin: 0 0 16px 0;
  color: #1d9bf0;
  font-size: 16px;
}
.x-edit-tweet {
  margin-bottom: 12px;
}
.x-edit-tweet label {
  font-size: 12px;
  color: #888;
  display: block;
  margin-bottom: 4px;
}
.x-edit-textarea {
  width: 100%;
  min-height: 80px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e7e9ea;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.x-edit-textarea:focus {
  border-color: #1d9bf0;
  outline: none;
}
.x-edit-chars {
  text-align: right;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.x-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Toast */
.x-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 2000;
}
.x-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* X button in script modal */
.action-btn.x-post-btn {
  background: #1d9bf015;
  color: #1d9bf0;
  border: 1px solid #1d9bf033;
}
.action-btn.x-post-btn:hover {
  background: #1d9bf025;
}


/* ============================================
   VIRAL VIDEO CARDS (Entry-Liste)
   ============================================ */

.viral-video-card {
  border-left: 2px solid var(--system-orange);
}

.type-badge.type-viral-video {
  background: var(--system-orange);
  color: #fff;
}

.viral-card-videos {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.viral-mini-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 13px;
  position: relative;
}

.viral-mini-platform {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  min-width: 72px;
  flex-shrink: 0;
}

.viral-platform-icon { font-size: 14px; }
.viral-platform-label { font-size: 11px; opacity: 0.7; }

.viral-mini-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.viral-creator {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.viral-views {
  color: var(--system-orange);
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.viral-mini-hook {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.viral-relevance-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.viral-relevance-high {
  background: var(--system-green);
  box-shadow: 0 0 4px var(--system-green);
}

.viral-more {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  padding-top: 4px;
}

/* ============================================
   VIRAL VIDEO MODAL
   ============================================ */

.viral-stats-header {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.viral-summary {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.viral-summary p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 0 0;
}

.viral-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.35);
}

.viral-video-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.viral-video-modal-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  transition: background 0.2s;
}

.viral-video-modal-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.viral-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  margin-bottom: 10px;
}

.viral-modal-platform {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.viral-modal-creator {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.viral-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  line-height: 1.3;
}

.viral-modal-hook {
  font-size: 14px;
  color: var(--system-orange);
  font-style: italic;
  padding: 8px 12px;
  background: rgba(255, 149, 0, 0.06);
  border-radius: 8px;
  border-left: 2px solid var(--system-orange);
  margin-bottom: 10px;
  line-height: 1.4;
}

.viral-modal-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.viral-metric {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

.viral-metric-icon { font-size: 12px; }

.viral-modal-ratings {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.viral-rating {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}

.viral-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin: 0 1px;
}

.viral-dot-filled { background: var(--system-orange); }
.viral-dot-empty { background: rgba(255, 255, 255, 0.12); }

.viral-format-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
}

.viral-modal-takeaway {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
  margin-bottom: 6px;
}

.viral-takeaway-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.viral-modal-learning {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(52, 199, 89, 0.06);
  border-left: 2px solid var(--system-green);
  border-radius: 8px;
  margin-bottom: 10px;
}

.viral-learning-label {
  font-weight: 600;
  color: var(--system-green);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 4px;
}

.viral-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--system-blue, #0a84ff);
  text-decoration: none;
  padding: 6px 0;
  transition: opacity 0.2s;
}

.viral-modal-link:hover { opacity: 0.7; }

.viral-script-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
  margin-left: 12px;
}

.viral-script-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.viral-recommendations {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.viral-rec-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.viral-rec-list li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
  padding: 6px 0 6px 16px;
  position: relative;
}

.viral-rec-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--system-orange);
}

/* === INSIGHTS TAB === */

.ins-empty { text-align: center; color: #888; padding: 40px 20px; font-size: 14px; }

/* Card */
.ins-card { background: var(--card-bg, #1a1a2e); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; border: 1px solid rgba(255,255,255,0.06); transition: transform 0.15s; }
.ins-card:active { transform: scale(0.98); }
.ins-card.unread { border-left: 3px solid #4ade80; }
.ins-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ins-card-date { color: #888; font-size: 12px; }
.ins-card-title { font-weight: 600; font-size: 15px; color: #e0e0e0; margin-bottom: 6px; }
.ins-card-verdict { color: #999; font-size: 13px; margin-top: 8px; line-height: 1.4; }

/* Rating Dots */
.ins-rating, .ins-rating-lg { display: flex; gap: 3px; }
.ins-dot { width: 8px; height: 8px; border-radius: 50%; background: #333; }
.ins-dot-filled { background: #f59e0b; }
.ins-rating-lg .ins-dot { width: 10px; height: 10px; }

/* Verdict Badges */
.ins-verdict { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.ins-v-hit { background: rgba(74,222,128,0.15); color: #4ade80; }
.ins-v-miss { background: rgba(239,68,68,0.15); color: #ef4444; }
.ins-v-partial { background: rgba(245,158,11,0.15); color: #f59e0b; }
.ins-v-own { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* Topic Badge */
.ins-topic-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(99,102,241,0.15); color: #818cf8; display: inline-block; margin-right: 6px; }
.ins-hook-type-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(245,158,11,0.12); color: #fbbf24; display: inline-block; }

/* Platform Bars (Card) */
.ins-platform-bars { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ins-pbar { display: flex; align-items: center; gap: 6px; }
.ins-pbar-label { font-size: 11px; color: #888; width: 20px; text-align: right; font-weight: 600; }
.ins-pbar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.ins-pbar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.ins-pbar-tt { background: #ff0050; }
.ins-pbar-ig { background: #c13584; }
.ins-pbar-yt { background: #ff0000; }
.ins-pbar-val { font-size: 12px; color: #ccc; width: 40px; text-align: right; font-weight: 500; }

/* Trend Arrows */
.ins-trend-up { color: #4ade80; font-size: 12px; font-weight: 600; }
.ins-trend-down { color: #ef4444; font-size: 12px; font-weight: 600; }
.ins-trend-stable { color: #94a3b8; font-size: 12px; font-weight: 600; }

/* === INSIGHTS DETAIL VIEW === */
.ins-dash { padding-bottom: 40px; }
.ins-section-title { font-size: 13px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin: 24px 0 12px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.06); }

/* Header */
.ins-header { margin-bottom: 8px; }
.ins-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ins-date { color: #888; font-size: 13px; }
.ins-video-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.ins-header-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.ins-suggestion-note { font-size: 13px; color: #888; font-style: italic; margin-top: 6px; padding: 8px 12px; background: rgba(255,255,255,0.03); border-radius: 8px; border-left: 3px solid #818cf8; }

/* Platform Grid */
.ins-platform-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ins-plat-col { background: rgba(255,255,255,0.03); border-radius: 10px; padding: 12px; text-align: center; }
.ins-plat-header { font-size: 13px; font-weight: 700; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px solid; }
.ins-plat-metric { margin: 6px 0; }
.ins-plat-val { font-size: 16px; font-weight: 700; color: #fff; display: block; }
.ins-plat-label { font-size: 11px; color: #888; }
.ins-plat-gain { }
.ins-plat-gain .ins-plat-val { color: #4ade80; }
.ins-plat-vs { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; margin-top: 8px; display: inline-block; }
.ins-vs-pos { background: rgba(74,222,128,0.12); color: #4ade80; }
.ins-vs-neg { background: rgba(239,68,68,0.12); color: #ef4444; }
.ins-source-badge { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.08); color: #888; text-transform: uppercase; letter-spacing: 0.3px; vertical-align: middle; margin-left: 4px; }
.ins-source-video { background: rgba(74,222,128,0.12); color: #4ade80; }
.ins-plat-note { font-size: 10px; color: #666; font-style: italic; margin-top: 8px; line-height: 1.3; }
.ins-plat-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 8px 0; }

/* Hook Section */
.ins-hook-section { background: rgba(255,255,255,0.02); border-radius: 10px; padding: 14px; }
.ins-hook-quote { font-size: 15px; font-style: italic; color: #e0e0e0; border-left: 3px solid #f59e0b; padding-left: 12px; margin-bottom: 10px; line-height: 1.5; }
.ins-hook-comparison { font-size: 13px; color: #999; line-height: 1.5; margin-bottom: 12px; }
.ins-hook-ranking-title { font-size: 12px; font-weight: 600; color: #94a3b8; margin-bottom: 8px; }
.ins-hook-rank-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.ins-hook-rank-num { font-size: 12px; font-weight: 700; color: #f59e0b; min-width: 24px; }
.ins-hook-rank-text { font-size: 13px; color: #ccc; flex: 1; font-style: italic; }
.ins-hook-rank-meta { font-size: 11px; color: #888; white-space: nowrap; }

/* Topics */
.ins-topics { background: rgba(255,255,255,0.02); border-radius: 10px; padding: 10px 14px; }
.ins-topic-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.ins-topic-row:last-child { border-bottom: none; }
.ins-topic-name { flex: 1; font-size: 14px; color: #e0e0e0; font-weight: 500; }
.ins-topic-views { font-size: 13px; color: #888; }

/* Platform Comparison */
.ins-pc-summary { font-size: 13px; color: #999; line-height: 1.5; margin-bottom: 12px; }
.ins-pc-trends { background: rgba(255,255,255,0.02); border-radius: 10px; padding: 10px 14px; }
.ins-pc-trend-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.ins-pc-trend-row:last-child { border-bottom: none; }
.ins-pc-plat { font-size: 13px; color: #e0e0e0; font-weight: 600; min-width: 80px; }
.ins-pc-avg { font-size: 13px; color: #888; flex: 1; }

/* Trends */
.ins-trends-section { background: rgba(255,255,255,0.02); border-radius: 10px; padding: 14px; }
.ins-streak { font-size: 16px; font-weight: 700; color: #f59e0b; margin-bottom: 12px; }
.ins-trend-group { margin-bottom: 10px; }
.ins-trend-item { font-size: 13px; padding: 6px 0; color: #ccc; line-height: 1.4; }
.ins-trend-good { }
.ins-trend-bad { }
.ins-actions { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); }
.ins-action-item { font-size: 13px; color: #e0e0e0; padding: 6px 0; line-height: 1.4; font-weight: 500; }

/* Shawn Verdict */
.ins-shawn-verdict { background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.08)); border: 1px solid rgba(99,102,241,0.2); border-radius: 12px; padding: 16px; margin-top: 20px; }
.ins-shawn-title { font-size: 14px; font-weight: 700; color: #818cf8; margin-bottom: 8px; }
.ins-shawn-text { font-size: 14px; color: #ccc; line-height: 1.5; margin-bottom: 10px; }
.ins-shawn-tomorrow { font-size: 14px; color: #4ade80; font-weight: 500; line-height: 1.5; padding: 8px 12px; background: rgba(74,222,128,0.08); border-radius: 8px; }

/* ═══════════════════════════════════════════════════════════════════
   VIDEO PRODUCTION SECTION
   ═══════════════════════════════════════════════════════════════════ */

.video-section {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.video-section-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Upload Row ── */
.video-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.video-upload-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  color: #a5b4fc;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.video-upload-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}

.video-asset-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.avatar-tag {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.broll-tag {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.video-asset-delete {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  margin-left: 4px;
}

.video-asset-delete:hover {
  color: #ef4444;
}

/* ── Instruction Area ── */
.video-instruction-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-instruction-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.video-instruction-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
}

.video-instruction-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.video-render-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  font-size: 14px !important;
  align-self: flex-start;
}

.video-render-btn:hover:not(.disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.video-render-btn.disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* ── Video Result ── */
.video-result {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-player {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.video-download-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: #4ade80;
  font-size: 13px;
  text-decoration: none;
  align-self: flex-start;
}

.video-download-btn:hover {
  background: rgba(34, 197, 94, 0.25);
}

/* ── Feedback ── */
.video-feedback-history {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.feedback-entry {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-time {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

.video-feedback-area {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.video-feedback-input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
}

.video-feedback-input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.5);
}

.video-feedback-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.video-feedback-btn {
  background: rgba(251, 191, 36, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  color: #fbbf24 !important;
  white-space: nowrap;
}

/* Quick-Nav for Konkurrenz tab */
.competitor-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.competitor-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: all 0.2s;
  cursor: pointer;
}

.competitor-nav-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* === Suggestions (Vorschlaege) Tab === */
.sug-stats { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sug-stat { font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 8px; }
.sug-stat-pending { background: rgba(59,130,246,0.15); color: #60a5fa; }
.sug-stat-done { background: rgba(16,185,129,0.15); color: #34d399; }
.sug-stat-dismissed { background: rgba(107,114,128,0.15); color: #9ca3af; }

.sug-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sug-filter-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #9ca3af; padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.sug-filter-btn:hover { background: rgba(255,255,255,0.1); color: #e5e7eb; }
.sug-filter-active { background: rgba(59,130,246,0.2); border-color: #3b82f6; color: #60a5fa; }

.sug-empty { text-align: center; color: #6b7280; padding: 40px 20px; font-size: 14px; }

.sug-card { cursor: pointer; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px; margin-bottom: 12px; transition: all 0.2s; }
.sug-card:hover { border-color: rgba(59,130,246,0.3); }
.sug-card-done { opacity: 0.6; }
.sug-card-dismissed { opacity: 0.4; }

.sug-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.sug-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sug-card-date { font-size: 12px; color: #6b7280; }

.sug-prio { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.sug-prio-high { background: rgba(239,68,68,0.2); color: #f87171; }
.sug-prio-medium { background: rgba(245,158,11,0.2); color: #fbbf24; }
.sug-prio-low { background: rgba(107,114,128,0.2); color: #9ca3af; }

.sug-cat { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; color: #fff; }
.sug-source { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,0.08); color: #9ca3af; }

.sug-card-title { font-size: 16px; font-weight: 600; color: #f3f4f6; margin-bottom: 6px; line-height: 1.3; }
.sug-title-done { text-decoration: line-through; color: #6b7280; }

.sug-card-desc { font-size: 13px; color: #9ca3af; line-height: 1.5; margin-bottom: 10px; }

.sug-draft-toggle { font-size: 12px; color: #60a5fa; cursor: pointer; margin-bottom: 6px; }
.sug-draft-toggle:hover { text-decoration: underline; }
.sug-draft { display: none; font-size: 13px; color: #d1d5db; background: rgba(0,0,0,0.3); padding: 12px; border-radius: 8px; margin-bottom: 10px; white-space: pre-wrap; line-height: 1.5; border-left: 3px solid #8b5cf6; }
.sug-draft-visible { display: block; }

.sug-done-info { font-size: 12px; color: #6b7280; margin-bottom: 8px; font-style: italic; }

.sug-actions { display: flex; gap: 8px; margin-top: 8px; }
.sug-btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.sug-btn-done { background: rgba(16,185,129,0.2); color: #34d399; }
.sug-btn-done:hover { background: rgba(16,185,129,0.35); }
.sug-btn-dismiss { background: rgba(107,114,128,0.15); color: #9ca3af; }
.sug-btn-dismiss:hover { background: rgba(107,114,128,0.3); }
.sug-btn-reopen { background: rgba(59,130,246,0.15); color: #60a5fa; font-size: 12px; padding: 6px 12px; }
.sug-btn-reopen:hover { background: rgba(59,130,246,0.3); }

/* === Suggestions Section in Scripts Tab === */
.sug-section { margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 16px; }
.sug-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sug-section-title { font-size: 15px; font-weight: 600; color: #e5e7eb; }
.sug-section-count { font-size: 12px; color: #60a5fa; background: rgba(59,130,246,0.15); padding: 3px 10px; border-radius: 12px; }

.sug-has-script { font-size: 12px; color: #8b5cf6; margin-top: 6px; }

.sug-done-summary { font-size: 13px; color: #6b7280; cursor: pointer; padding: 8px 0; margin-top: 4px; }
.sug-done-summary:hover { color: #9ca3af; }
.sug-done-arrow { display: inline-block; font-size: 10px; transition: transform 0.2s; margin-right: 6px; }
.sug-done-arrow.rotated { transform: rotate(90deg); }
.sug-done-list-collapsed { display: none; }
.sug-done-list-visible { display: block; }

/* === Suggestion Modal === */
.sug-modal { padding: 4px 0; }
.sug-modal-badges { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sug-modal-section { margin-bottom: 20px; }
.sug-modal-label { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.sug-modal-text { font-size: 14px; color: #d1d5db; line-height: 1.6; }
.sug-modal-script { font-size: 14px; color: #e5e7eb; background: rgba(0,0,0,0.3); padding: 16px; border-radius: 10px; line-height: 1.7; border-left: 3px solid #8b5cf6; white-space: pre-wrap; }
.sug-modal-meta { font-size: 12px; color: #6b7280; margin-bottom: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.sug-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sug-modal-btn { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.sug-modal-btn-done { background: rgba(16,185,129,0.2); color: #34d399; }
.sug-modal-btn-done:hover { background: rgba(16,185,129,0.35); }
.sug-modal-btn-dismiss { background: rgba(107,114,128,0.15); color: #9ca3af; }
.sug-modal-btn-dismiss:hover { background: rgba(107,114,128,0.3); }
.sug-modal-btn-reopen { background: rgba(59,130,246,0.15); color: #60a5fa; }
.sug-modal-btn-reopen:hover { background: rgba(59,130,246,0.3); }

/* ── Script AI Feedback Section ────────────────────────── */
.script-feedback-section {
  margin-top: 20px;
  padding: 16px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
}

.script-feedback-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #a78bfa;
}

.script-feedback-area {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.script-feedback-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
  min-height: 60px;
}

.script-feedback-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
}

.script-feedback-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.script-feedback-btn {
  background: rgba(139, 92, 246, 0.15) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  color: #a78bfa !important;
  white-space: nowrap;
  padding: 10px 16px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.2s;
}

.script-feedback-btn:hover {
  background: rgba(139, 92, 246, 0.25) !important;
}

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

.script-feedback-history {
  margin-bottom: 12px;
}

.script-feedback-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.script-feedback-item .feedback-time {
  color: #a78bfa;
  font-weight: 600;
  margin-right: 6px;
}

.script-feedback-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  color: #a78bfa;
  font-size: 13px;
  margin-top: 10px;
}

.script-feedback-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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