@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --navy: #1a2332;
  --navy-deep: #0f1721;
  --navy-light: #243044;
  --gold: #d4a853;
  --gold-light: #e8c882;
  --gold-dim: #a68438;
  --gold-faint: rgba(212, 168, 83, 0.12);
  --cream: #f5f0e8;
  --cream-dark: #e8e0d2;
  --parchment: #faf6ee;
  --ink: #1c1c1c;
  --ink-light: #4a4a4a;
  --ink-faint: #7a7a7a;
  --green: #3d6b5e;
  --green-light: #4d8b74;
  --border: #d6cfc3;
  --border-light: #e8e0d2;
  --danger: #c0392b;
  --danger-light: rgba(192, 57, 43, 0.1);
  --success: #27ae60;
  --success-light: rgba(39, 174, 96, 0.1);
  --warning: #d4a853;
  --twitter: #1da1f2;
  --facebook: #1877f2;
  --instagram: #e4405f;
  --linkedin: #0a66c2;
  --threads: #1c1c1c;
  --tiktok: #ff0050;
  --youtube: #ff0000;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  height: 100vh;
  overflow: hidden;
}

.serif { font-family: 'Playfair Display', Georgia, serif; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ===== LANDING PAGE ===== */
#landing-page {
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100vw;
  background: var(--cream);
}

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

/* Landing Nav */
.landing-nav {
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.landing-nav-links { display: flex; gap: 32px; align-items: center; }
.landing-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}
.landing-nav-links a:hover { color: var(--ink); }
.landing-nav-cta {
  background: var(--navy);
  color: var(--cream) !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.landing-nav-cta:hover { background: var(--navy-deep) !important; }

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  overflow: hidden;
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.12;
  color: var(--navy);
  margin-bottom: 24px;
  letter-spacing: -1px;
}
.hero h1 em { color: var(--gold-dim); font-style: italic; }

.hero p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-light);
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 16px; align-items: center; }

.btn-primary-landing {
  background: var(--navy);
  color: var(--cream);
  padding: 16px 36px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  border: 2px solid var(--navy);
  white-space: nowrap;
}
.btn-primary-landing:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

.btn-secondary-landing {
  color: var(--ink);
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: all 0.2s;
}
.btn-secondary-landing:hover { color: var(--gold-dim); }

/* Hero Card */
.hero-right { position: relative; }
.hero-card {
  background: var(--navy);
  border-radius: 12px;
  padding: 28px;
  color: var(--cream);
  box-shadow: 0 24px 80px rgba(26,35,50,0.2);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.card-header-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}
.card-dots { display: flex; gap: 6px; }
.card-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.card-dots span:first-child { background: var(--gold); }
.card-chat-bubble {
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245,240,232,0.8);
}
.card-chat-user {
  background: rgba(212,168,83,0.12);
  border: 1px solid rgba(212,168,83,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--gold-light);
  text-align: right;
}
.card-drafts-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245,240,232,0.4);
  margin-bottom: 10px;
}
.card-draft-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  margin-bottom: 6px;
}
.card-platform-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}
.badge-x { background: rgba(255,255,255,0.12); color: #fff; }
.badge-fb { background: rgba(66,103,178,0.3); color: #8ba6d4; }
.badge-ig { background: rgba(225,48,108,0.2); color: #e8839e; }
.badge-li { background: rgba(10,102,194,0.25); color: #7ab3e0; }
.card-draft-text {
  font-size: 11px;
  color: rgba(245,240,232,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-accent-line {
  position: absolute;
  top: -20px; left: -20px;
  width: 60px; height: 60px;
  border-left: 2px solid var(--gold);
  border-top: 2px solid var(--gold);
  opacity: 0.4;
}

/* Landing Sections */
.divider { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.divider-line { border: none; height: 1px; background: linear-gradient(to right, transparent, var(--cream-dark), transparent); }

.how-section { max-width: 1200px; margin: 0 auto; padding: 100px 48px; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.steps-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.step {
  position: relative;
  padding: 36px;
  background: var(--parchment);
  border: 1px solid var(--cream-dark);
  border-radius: 10px;
  transition: all 0.3s;
}
.step:hover { border-color: var(--gold); box-shadow: 0 8px 32px rgba(212,168,83,0.1); }
.step-num {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--cream-dark);
  position: absolute;
  top: 20px; right: 24px;
  line-height: 1;
}
.step h3 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.step p { font-size: 15px; line-height: 1.7; color: var(--ink-light); }

.features-strip { background: var(--navy); padding: 80px 48px; color: var(--cream); }
.features-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 40px; }
.feature-icon {
  width: 40px; height: 40px;
  border: 1px solid rgba(212,168,83,0.3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}
.feature-item h4 { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; color: var(--cream); margin-bottom: 8px; }
.feature-item p { font-size: 14px; line-height: 1.7; color: rgba(245,240,232,0.55); }

.quote-section { max-width: 800px; margin: 0 auto; padding: 100px 48px; text-align: center; }
.quote-mark { font-family: 'Playfair Display', serif; font-size: 80px; color: var(--gold); line-height: 0.5; margin-bottom: 24px; opacity: 0.4; }
.quote-text { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 400; font-style: italic; color: var(--navy); line-height: 1.5; margin-bottom: 20px; }
.quote-attr { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-dim); }

.usecases-section { max-width: 1200px; margin: 0 auto; padding: 0 48px 100px; }
.usecases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 64px; }
.usecase-card {
  background: var(--parchment);
  border: 1px solid var(--cream-dark);
  border-radius: 10px;
  padding: 36px;
  transition: all 0.3s;
}
.usecase-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(26,35,50,0.08); }
.usecase-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(61,107,94,0.08);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 14px;
}
.usecase-card h3 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.usecase-card p { font-size: 15px; line-height: 1.7; color: var(--ink-light); }

.cta-section {
  background: var(--navy);
  padding: 100px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center top, rgba(212,168,83,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.cta-inner { position: relative; max-width: 600px; margin: 0 auto; }
.cta-section h2 { font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 700; color: var(--cream); margin-bottom: 16px; letter-spacing: -0.5px; }
.cta-section p { font-size: 17px; line-height: 1.7; color: rgba(245,240,232,0.55); margin-bottom: 36px; }
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 16px 40px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}
.btn-gold:hover { background: var(--gold-light); }
.cta-sub { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(245,240,232,0.3); margin-top: 14px; }

.landing-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--cream-dark);
}
.footer-left { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; color: var(--navy); }
.footer-right { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.5px; }

/* Landing Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-left { animation: fadeUp 0.8s ease-out; }
.hero-right { animation: fadeUp 0.8s ease-out 0.2s both; }
.step { animation: fadeUp 0.6s ease-out both; }
.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }

/* Landing Responsive */
@media (max-width: 900px) {
  .landing-nav { padding: 20px 24px; }
  .hero { grid-template-columns: 1fr; padding: 40px 24px 60px; gap: 40px; }
  .hero h1 { font-size: 36px; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-inner { grid-template-columns: 1fr 1fr; }
  .usecases-grid { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .landing-nav-links a:not(.landing-nav-cta) { display: none; }
}


/* ===== LOGIN ===== */
.screen { height: 100vh; }

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

.login-container {
  background: var(--parchment);
  padding: 48px;
  border-radius: 16px;
  border: 1px solid var(--cream-dark);
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 16px 64px rgba(26,35,50,0.08);
}

.login-logo {
  margin-bottom: 32px;
}

.login-logo-mark {
  width: 56px;
  height: 56px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
}

.login-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
}

.login-subtitle {
  color: var(--ink-faint);
  font-size: 14px;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

#login-form input {
  width: 100%;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

#login-form input:focus {
  border-color: var(--gold);
}

#login-form button {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

#login-form button:hover {
  background: var(--navy-deep);
}

#login-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-message {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-light);
}

.login-message.success { color: var(--success); }
.login-message.error { color: var(--danger); }

.login-back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.2s;
}
.login-back-link:hover { color: var(--gold-dim); }


/* ===== APP LAYOUT ===== */
#app {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-mark {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  padding: 12px;
  flex: 1;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  color: rgba(245,240,232,0.5);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--cream);
}

.nav-btn.active {
  background: var(--gold);
  color: var(--navy);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
  font-size: 13px;
  color: rgba(245,240,232,0.5);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}

.logout-btn {
  width: 100%;
  padding: 8px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: rgba(245,240,232,0.5);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  border-color: var(--danger);
  color: #e74c3c;
}

/* Content */
.content {
  flex: 1;
  overflow: hidden;
  display: flex;
  background: var(--cream);
}

.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  flex-direction: column;
}

.view.active {
  display: flex;
}

/* ===== CHAT ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: var(--parchment);
}

.chat-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--cream);
}

.message {
  max-width: 80%;
  animation: fadeIn 0.3s ease;
}

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

.message.user { align-self: flex-end; }
.message.assistant { align-self: flex-start; }

.message-content {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.message.user .message-content {
  background: var(--navy);
  color: var(--cream);
  border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
  background: var(--parchment);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.message-content p { margin-bottom: 8px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content ul { margin: 8px 0; padding-left: 20px; }
.message-content li { margin-bottom: 4px; }
.message-content code {
  background: var(--gold-faint);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}

/* Draft preview in chat */
.draft-preview {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.draft-preview-header {
  padding: 10px 14px;
  background: var(--navy);
  color: var(--cream);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.draft-preview-media {
  padding: 6px 14px;
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  font-size: 12px;
  font-weight: 600;
  border-top: 1px solid var(--border);
}

.draft-platform {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.draft-platform-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.draft-platform-content {
  color: var(--ink);
  white-space: pre-wrap;
}

.approve-draft-btn {
  padding: 6px 16px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.approve-draft-btn:hover { background: var(--gold-light); }
.approve-draft-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Chat input */
.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  background: var(--parchment);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

#chat-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  resize: none;
  outline: none;
  max-height: 120px;
  transition: border-color 0.2s;
}

#chat-input:focus { border-color: var(--gold); }

#chat-send-btn {
  padding: 10px 14px;
  background: var(--navy);
  border: none;
  border-radius: 10px;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

#chat-send-btn:hover { background: var(--navy-deep); }
#chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Typing indicator */
.typing-indicator { display: flex; gap: 4px; padding: 16px; }
.typing-indicator span {
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: typing 1.4s infinite;
  opacity: 0.4;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ===== VIEW HEADER ===== */
.view-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: var(--parchment);
}

.view-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
}

/* ===== BUTTONS ===== */
.btn-primary {
  padding: 8px 20px;
  background: var(--navy);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--navy-deep); }

.btn-secondary {
  padding: 8px 20px;
  background: none;
  color: var(--ink-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--ink); }

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

.btn-danger {
  padding: 6px 12px;
  background: none;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-success {
  padding: 6px 12px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-success:hover { background: var(--gold-light); }

/* ===== KNOWLEDGE BASE ===== */
.kb-list {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.kb-card {
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}
.kb-card:hover { border-color: var(--gold); }

.kb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.kb-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

.kb-card-meta { display: flex; gap: 8px; align-items: center; }

.kb-category {
  padding: 3px 10px;
  background: var(--gold-faint);
  color: var(--gold-dim);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
}

.kb-source-type {
  padding: 3px 10px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.kb-card-content {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
  max-height: 80px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.kb-card-content::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(transparent, var(--parchment));
}

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

.kb-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-faint);
}
.kb-empty svg { margin-bottom: 16px; opacity: 0.5; }
.kb-empty h3 { margin-bottom: 8px; color: var(--ink-light); font-family: 'Playfair Display', serif; }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 50, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(26,35,50,0.15);
}

.modal-wide { max-width: 720px; }

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

.modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--ink); }

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

/* ===== FORM ===== */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

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

.form-group select { cursor: pointer; }

/* ===== DRAFTS ===== */
.drafts-filter { display: flex; gap: 4px; }

.filter-btn {
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-faint);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.buffer-notice {
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: var(--gold-faint);
  border: 1px solid rgba(212,168,83,0.3);
  border-radius: 8px;
  color: var(--gold-dim);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.drafts-bulk-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--parchment);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.draft-select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-light);
  cursor: pointer;
  margin-right: 8px;
}
.draft-select-all-label input { accent-color: var(--gold); cursor: pointer; }

.draft-card-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.draft-card-checkbox input {
  width: 16px; height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

.drafts-list {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.draft-card {
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.draft-card:hover { border-color: var(--gold); }
.draft-card.approved { border-color: rgba(39, 174, 96, 0.3); }

.draft-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}
.draft-card-header .platform-badge { margin-bottom: 0; flex-shrink: 0; }

.draft-card-username {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.draft-card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  flex: 1;
}

.draft-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.draft-status.pending { background: var(--gold-faint); color: var(--gold-dim); }
.draft-status.approved { background: var(--success-light); color: var(--success); }
.draft-status.posted { background: rgba(26,35,50,0.08); color: var(--navy); }
.draft-status.scheduled { background: rgba(10,102,194,0.1); color: #0a66c2; }
.draft-status.failed { background: var(--danger-light); color: var(--danger); }
.draft-status.queued { background: rgba(10,102,194,0.1); color: #0a66c2; }

.draft-card-body { padding: 16px 20px; }
.draft-card-body p {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Draft card media */
.draft-card-media {
  margin-top: 8px;
}
.draft-card-thumb {
  max-width: 200px;
  max-height: 120px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  object-fit: cover;
}
.draft-media-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.draft-media-tag.video {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

/* Draft modal media preview */
.draft-media-preview-inner {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}
.draft-media-preview-inner img {
  max-width: 280px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  object-fit: cover;
}
.draft-media-video-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: #a855f7;
  font-size: 13px;
  font-weight: 500;
}
.draft-media-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.draft-media-remove:hover { opacity: 0.8; }
.draft-media-upload-btn {
  cursor: pointer;
}
.draft-media-upload-btn .btn-secondary {
  cursor: pointer;
}

.draft-card-platforms { padding: 16px 20px; }
.draft-card-platform { margin-bottom: 12px; }
.draft-card-platform:last-child { margin-bottom: 0; }

.platform-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.platform-badge.twitter { background: var(--twitter); color: white; }
.platform-badge.facebook { background: var(--facebook); color: white; }
.platform-badge.instagram { background: var(--instagram); color: white; }
.platform-badge.linkedin { background: var(--linkedin); color: white; }
.platform-badge.threads { background: var(--threads); color: white; }
.platform-badge.tiktok { background: var(--tiktok); color: white; }
.platform-badge.youtube { background: var(--youtube); color: white; }

.draft-card-platform p {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
  white-space: pre-wrap;
}

.draft-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.draft-card-schedule {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
}

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

.drafts-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-faint);
}
.drafts-empty h3 {
  margin-bottom: 8px;
  color: var(--ink-light);
  font-family: 'Playfair Display', serif;
}

/* Platform Editors in Modal */
.platform-editors { display: grid; gap: 12px; }
.platform-editor label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 6px;
}
.platform-editor textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}
.platform-editor textarea:focus { border-color: var(--gold); }

.char-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-faint);
}
.char-count.over { color: var(--danger); font-weight: 600; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ===== CALENDAR ===== */
.calendar-desc {
  padding: 16px 24px 0;
  font-size: 13px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.calendar-grid {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.calendar-day {
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.calendar-day:hover { border-color: var(--gold); }

.calendar-day-name {
  padding: 12px 20px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  background: var(--cream);
  border-bottom: 1px solid var(--border-light);
}

.calendar-day-slots {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.calendar-slot.disabled { opacity: 0.4; }

.calendar-slot-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-light);
  flex: 1;
}
.calendar-slot-time.clickable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.calendar-slot-time.clickable:hover { color: var(--gold-dim); }

.day-checkboxes { display: flex; flex-wrap: wrap; gap: 12px; }
.day-checkboxes label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-light);
  cursor: pointer;
}
.day-checkboxes input { accent-color: var(--gold); cursor: pointer; }

.view-header-actions { display: flex; gap: 8px; }

/* ===== CONNECTED ACCOUNTS ===== */
.accounts-container {
  padding: 24px;
  display: grid;
  gap: 32px;
}

.accounts-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--navy);
}

.accounts-list { display: grid; gap: 12px; }

.account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.account-card:hover { border-color: var(--gold); }

.account-platform-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: white; flex-shrink: 0;
}

.account-info { flex: 1; }
.account-username { font-weight: 600; font-size: 15px; color: var(--navy); }
.account-platform-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: capitalize;
}

.accounts-empty {
  text-align: center;
  padding: 40px;
  color: var(--ink-faint);
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.connect-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--parchment);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.connect-btn:hover { border-color: var(--gold); background: var(--gold-faint); }

.connect-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white; flex-shrink: 0;
}
.connect-btn.twitter .connect-icon { background: var(--twitter); }
.connect-btn.facebook .connect-icon { background: var(--facebook); }
.connect-btn.instagram .connect-icon { background: var(--instagram); }
.connect-btn.linkedin .connect-icon { background: var(--linkedin); }
.connect-btn.threads .connect-icon { background: var(--threads); }
.connect-btn.tiktok .connect-icon { background: var(--tiktok); }
.connect-btn.youtube .connect-icon { background: var(--youtube); }

/* ===== ADMIN ===== */
.admin-container {
  padding: 24px;
  display: grid;
  gap: 24px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--gold); }

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-dim);
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--navy);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}

.admin-table th {
  background: var(--cream);
  color: var(--ink-faint);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-table td { color: var(--ink); }
.admin-table tr:last-child td { border-bottom: none; }

.admin-empty {
  padding: 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 14px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: white;
  z-index: 200;
  animation: slideUp 0.3s ease, fadeOut 0.3s ease 3.7s;
  animation-fill-mode: forwards;
  box-shadow: 0 8px 32px rgba(26,35,50,0.15);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

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

/* ===== CLIENT SWITCHER ===== */
.client-switcher {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-select {
  flex: 1;
  padding: 8px 10px;
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f0e8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.client-select:focus {
  outline: none;
  border-color: var(--gold);
}

.client-select option {
  background: var(--navy);
  color: var(--cream);
}

.btn-new-client {
  width: 30px;
  height: 30px;
  background: var(--gold);
  border: none;
  border-radius: 6px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-new-client:hover {
  background: var(--gold-light);
}

.active-client-banner {
  padding: 8px 16px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.3px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ===== ADMIN CLIENT CARDS ===== */
.admin-client-card {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

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

.admin-client-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.admin-client-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.admin-client-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-client-actions {
  display: flex;
  gap: 8px;
}

/* ===== MEMBERS LIST ===== */
.members-list {
  margin-bottom: 16px;
}

.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.member-card:last-child {
  border-bottom: none;
}

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

.member-email {
  font-size: 14px;
  color: var(--ink);
}

.member-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.member-role.admin {
  background: var(--gold-faint);
  color: var(--gold-dim);
}

.member-role.member {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
}

.invite-form {
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.invite-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.invite-row input {
  flex: 1;
}

.invite-row select {
  width: 100px;
}

.pending-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.pending-invite-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dim);
  background: var(--gold-faint);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ===== CONTENT PREFERENCES ===== */
.content-prefs-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.content-prefs-panel h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prefs-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.pref-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pref-group label {
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 500;
}

.pref-group select, .pref-group input {
  padding: 8px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
}

.pref-group-wide {
  flex: 1;
  min-width: 200px;
}

.pref-group-wide input {
  width: 100%;
}

/* ===== PLATFORM INSTRUCTIONS ===== */
.platform-instructions-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  margin-bottom: 20px;
}

.platform-instructions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
}

.platform-instructions-header:hover {
  background: rgba(212, 168, 83, 0.03);
}

.platform-instructions-header h3 {
  margin: 0;
  font-size: 14px;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toggle-arrow {
  color: var(--ink-faint);
  font-size: 12px;
  transition: transform 0.2s;
}

.toggle-arrow.open {
  transform: rotate(90deg);
}

.platform-instructions-body {
  padding: 0 20px 20px;
}

.platform-instructions-desc {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.platform-instruction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.platform-instruction-item label {
  display: block;
  margin-bottom: 6px;
}

.platform-instruction-item textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.platform-instruction-item textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}

@media (max-width: 768px) {
  .platform-instruction-grid { grid-template-columns: 1fr; }
}

/* ===== CHAT ATTACHMENTS ===== */
.btn-attach {
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-attach:hover {
  color: var(--gold-dim);
  background: var(--gold-faint);
}

.chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 4px;
  background: var(--gold-faint);
  border-radius: 6px;
  font-size: 13px;
  color: var(--gold-dim);
}

.chat-attachment-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-remove {
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  flex-shrink: 0;
}

.chat-attachment-remove:hover {
  color: var(--danger);
}

/* ===== VIDEO CLIPPER ===== */
.clipper-section { margin-bottom: 24px; }

.clipper-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.clipper-url-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}
.clipper-url-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.clipper-or {
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
}

.clipper-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.clipper-file-name {
  font-size: 13px;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clipper-progress {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  margin-bottom: 20px;
}

.clipper-progress-bar {
  height: 6px;
  background: var(--bg-main);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.clipper-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
  animation: clipper-pulse 1.5s ease-in-out infinite;
}

@keyframes clipper-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.clipper-progress-text {
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}

.clipper-workspace {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

.clipper-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.clipper-workspace-header h3 {
  font-size: 16px;
  color: var(--gold);
  margin: 0;
}

.clipper-duration-badge {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--gold-faint);
  color: var(--gold-dim);
  border-radius: 20px;
  font-weight: 600;
}

.clipper-suggestions {
  margin-bottom: 20px;
}

.clipper-suggestions h4 {
  font-size: 13px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

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

.clipper-suggestion-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.clipper-suggestion-card:hover {
  border-color: var(--gold-dim);
}

.clipper-suggestion-info { flex: 1; min-width: 0; }

.clipper-suggestion-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.clipper-suggestion-reason {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.4;
  margin-bottom: 4px;
}

.clipper-suggestion-excerpt {
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
  border-left: 2px solid var(--gold-dim);
  padding-left: 8px;
  margin-top: 6px;
}

.clipper-suggestion-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.clipper-virality-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.clipper-virality-badge.high { background: rgba(39,174,96,0.15); color: #27ae60; }
.clipper-virality-badge.medium { background: rgba(240,173,78,0.15); color: #f0ad4e; }
.clipper-virality-badge.low { background: rgba(122,139,163,0.15); color: var(--ink-faint); }

.clipper-time-badge {
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.clipper-transcript-section {
  margin-bottom: 16px;
}

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

.clipper-transcript-header h4 {
  font-size: 13px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.clipper-transcript {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.7;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}

.clipper-manual {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.clipper-manual h4 {
  font-size: 13px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.clipper-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
  margin-bottom: 12px;
}

.clipper-time-group label {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.clipper-time-group input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
}
.clipper-time-group input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.clipper-library-section {
  margin-top: 8px;
}

.clipper-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.clipper-library-header h3 {
  font-size: 16px;
  color: var(--gold);
  margin: 0;
}

.clipper-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.clipper-clip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.clipper-clip-card:hover { border-color: var(--gold-dim); }

.clipper-clip-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-main);
  object-fit: cover;
  display: block;
}

.clipper-clip-body {
  padding: 12px 14px;
}

.clipper-clip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clipper-clip-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.clipper-clip-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.clipper-clip-actions a,
.clipper-clip-actions button {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

.clipper-clip-actions a {
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--ink);
}
.clipper-clip-actions a:hover { border-color: var(--gold-dim); }

.clipper-draft-suggest {
  margin-bottom: 14px;
}

.clipper-kb-option {
  margin-bottom: 14px;
  padding: 8px 12px;
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.clipper-kb-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--ink-light);
  cursor: pointer;
}

.clipper-kb-checkbox-label input[type="checkbox"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

/* KB Client Updates section */
.kb-updates-section {
  margin-top: 16px;
}

.kb-updates-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--ink-faint);
  margin: -8px 0 12px 0;
  padding: 0 4px;
}

.kb-update-card {
  border-left: 3px solid var(--gold);
}

.kb-update-preview {
  padding: 0 16px 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.4;
}

.kb-update-full .kb-card-content {
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .clipper-time-row { grid-template-columns: 1fr 1fr; }
  .clipper-library { grid-template-columns: 1fr; }
}

/* ===== TWITTER FEED ===== */
.feed-container {
  max-width: 640px;
  margin: 0 auto;
}

.feed-config {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.feed-url-row {
  display: flex;
  gap: 8px;
}

.feed-url-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}

.feed-url-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.feed-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.feed-account-select {
  flex: 1;
  max-width: 300px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
}

.feed-empty, .feed-loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-faint);
}

.feed-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed-tweet-embed {
  overflow: hidden;
}

.feed-tweet-embed > * {
  transform: scale(0.75);
  transform-origin: top center;
}

.feed-tweet-embed .twitter-tweet {
  margin: 0 auto !important;
}

/* Fallback card when embed fails */
.feed-tweet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
}

.feed-tweet-author {
  font-weight: 600;
  color: var(--gold-dim);
  margin-bottom: 8px;
  font-size: 14px;
}

.feed-tweet-text {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-tweet-link {
  font-size: 13px;
  color: var(--gold-dim);
  text-decoration: none;
}

.feed-tweet-link:hover {
  text-decoration: underline;
}

.feed-response-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-response-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.feed-response-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

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

.btn-twitter {
  background: #1da1f2;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

.btn-twitter:hover {
  background: #1a91da;
}

.btn-twitter:disabled, .btn-success:disabled, .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== MOBILE ELEMENTS (hidden on desktop) ===== */
.mobile-menu-btn,
.sidebar-backdrop,
.sidebar-close-btn {
  display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Hamburger button */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: var(--navy);
    color: var(--cream);
    border: none;
    border-radius: 8px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .mobile-menu-btn.hidden { display: none; }

  /* Backdrop */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1099;
  }
  .sidebar-backdrop.active { display: block; }

  /* Sidebar: hidden offscreen by default, slides in as overlay */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 1100;
    transition: left 0.25s ease;
    overflow-y: auto;
  }
  .sidebar.open { left: 0; }

  /* Close button inside sidebar */
  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(245,240,232,0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
  .sidebar-close-btn:hover { color: var(--cream); }

  /* Sidebar items: show full text */
  .sidebar-logo span { display: inline; }
  .nav-btn { justify-content: flex-start; }
  .user-info { display: block; }

  /* Client switcher full width */
  .client-switcher { padding: 12px; }
  .client-select { width: 100%; }

  /* Content: full width */
  .content { width: 100%; }

  /* Chat header */
  .chat-header { padding: 12px 16px; padding-left: 52px; }
  .chat-header h2 { font-size: 15px; }

  /* Chat messages */
  .chat-messages { padding: 16px 12px; }
  .message { max-width: 95%; }

  /* Chat input: mobile-friendly tap targets */
  .chat-input-area { padding: 10px 12px; }
  .chat-input-row { gap: 6px; }
  .btn-attach { min-width: 44px; min-height: 44px; padding: 10px; }
  #chat-send-btn { min-width: 44px; min-height: 44px; padding: 10px; }
  #chat-input { padding: 10px 12px; font-size: 16px; }

  /* View headers */
  .view-header { padding: 14px 16px; padding-left: 52px; flex-wrap: wrap; gap: 8px; }
  .view-header h2 { font-size: 16px; }
  .view-header-actions { display: flex; gap: 6px; }
  .view-header-actions .btn-secondary,
  .view-header-actions .btn-primary { font-size: 12px; padding: 6px 10px; }

  /* Drafts filter buttons */
  .drafts-filter { flex-wrap: wrap; gap: 4px; }
  .filter-btn { font-size: 12px; padding: 4px 8px; }

  /* Knowledge base prefs */
  .content-prefs-panel { padding: 12px; }
  .prefs-row { flex-direction: column; gap: 8px; }

  /* Platform instructions */
  .platform-instruction-grid { grid-template-columns: 1fr; }

  /* Calendar grid */
  .calendar-grid { overflow-x: auto; }

  /* Clipper */
  .clipper-input-row { flex-direction: column; gap: 8px; }
  .clipper-url-input { width: 100%; }
  .clipper-time-row { flex-direction: column; gap: 8px; }

  /* Connect grid */
  .connect-grid { grid-template-columns: 1fr 1fr; }

  /* Modals */
  .modal-content { width: 95%; max-width: none; margin: 16px; }
  .modal-wide { width: 95%; }

  /* Feed */
  .feed-actions { flex-wrap: wrap; gap: 6px; }

  /* Admin */
  .admin-stats { grid-template-columns: 1fr 1fr; }

  /* News */
  .news-add-form { flex-direction: column; }
}

/* ===== News Monitor ===== */
.news-add-section h3,
.news-articles-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.news-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.news-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--parchment);
  color: var(--ink);
  flex: 1;
  min-width: 180px;
}

.news-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--parchment);
  color: var(--ink);
}

.news-sources-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 14px;
}

.news-source-item .source-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.news-source-item .source-name {
  font-weight: 600;
  color: var(--ink);
}

.news-source-item .source-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
}

.news-source-item .source-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.news-source-item .source-actions button {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink-light);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.news-source-item .source-actions button:hover {
  background: var(--cream-dark);
}

.news-source-item .source-actions button.source-delete:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.news-source-item.inactive {
  opacity: 0.5;
}

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

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

.news-last-fetched {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
}

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

.news-empty {
  color: var(--ink-faint);
  font-size: 14px;
  font-style: italic;
  padding: 20px 0;
}

.news-article-item {
  padding: 12px 16px;
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.news-article-item a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}

.news-article-item a:hover {
  color: var(--gold-dim);
  text-decoration: underline;
}

.news-article-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.news-article-summary {
  font-size: 13px;
  color: var(--ink-light);
  margin-top: 6px;
  line-height: 1.5;
}

/* ===== Blog Writer ===== */
.blog-section {
  padding: 0 24px;
  margin-bottom: 8px;
}

.blog-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.blog-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 20px 24px;
}

.blog-config-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.blog-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-form-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-faint);
}

.blog-input, .blog-select, .blog-textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--parchment);
  color: var(--ink);
}

.blog-textarea {
  resize: vertical;
  min-height: 48px;
}

.blog-generate-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.blog-context-summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
}

.blog-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--ink-light);
}

.blog-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: blog-spin 0.8s linear infinite;
}

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

.blog-empty {
  color: var(--ink-faint);
  font-size: 14px;
  font-style: italic;
  padding: 20px 0;
}

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

.blog-draft-card {
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.blog-draft-card:hover {
  border-color: var(--gold);
}

.blog-draft-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.blog-draft-header:hover {
  background: var(--cream);
}

.blog-draft-expand {
  font-size: 12px;
  color: var(--ink-faint);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.blog-draft-card.expanded .blog-draft-expand {
  transform: rotate(90deg);
}

.blog-draft-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.blog-draft-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
}

.blog-draft-words {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
}

.blog-draft-sources {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
}

.blog-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
}

.blog-status.draft {
  color: var(--gold-dim);
  background: var(--gold-faint);
  border: 1px solid var(--gold-dim);
}

.blog-status.approved {
  color: var(--success);
  background: var(--success-light);
  border: 1px solid var(--success);
}

.blog-status.published {
  color: var(--cream);
  background: var(--navy-light);
  border: 1px solid var(--navy-light);
}

.blog-draft-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border-light);
}

.blog-draft-card.expanded .blog-draft-body {
  display: block;
}

.blog-draft-actions {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.blog-draft-actions button {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink-light);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.blog-draft-actions button:hover {
  background: var(--cream-dark);
}

.blog-draft-actions .blog-btn-approve {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.blog-draft-actions .blog-btn-approve:hover {
  background: var(--green-light);
}

.blog-draft-actions .blog-btn-delete {
  color: var(--danger);
  border-color: var(--danger);
}

.blog-draft-actions .blog-btn-delete:hover {
  background: var(--danger-light);
}

.blog-draft-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.blog-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--gold-faint);
  color: var(--gold-dim);
  border: 1px solid rgba(212, 168, 83, 0.25);
}

.blog-meta-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
  margin: 8px 0;
  padding: 8px 12px;
  background: var(--cream);
  border-radius: 4px;
  border-left: 3px solid var(--gold);
}

.blog-content-rendered {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  padding: 16px 0;
}

.blog-content-rendered h1,
.blog-content-rendered h2,
.blog-content-rendered h3,
.blog-content-rendered h4 {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  margin: 20px 0 8px;
}

.blog-content-rendered h2 { font-size: 20px; }
.blog-content-rendered h3 { font-size: 17px; }
.blog-content-rendered p { margin-bottom: 12px; }
.blog-content-rendered a { color: var(--gold-dim); text-decoration: underline; }
.blog-content-rendered a:hover { color: var(--gold); }
.blog-content-rendered ul, .blog-content-rendered ol { padding-left: 24px; margin-bottom: 12px; }
.blog-content-rendered li { margin-bottom: 4px; }
.blog-content-rendered blockquote {
  border-left: 3px solid var(--gold);
  padding: 8px 16px;
  margin: 12px 0;
  color: var(--ink-light);
  background: var(--cream);
  border-radius: 0 4px 4px 0;
}

.blog-edit-area {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  background: var(--parchment);
  color: var(--ink);
  resize: vertical;
}

.blog-links-section {
  margin-top: 16px;
  padding: 12px;
  background: var(--cream);
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.blog-links-section h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dim);
  margin-bottom: 8px;
}

.blog-link-item {
  font-size: 13px;
  padding: 4px 0;
  color: var(--ink-light);
}

.blog-link-item a {
  color: var(--gold-dim);
  text-decoration: none;
}

.blog-link-item a:hover {
  text-decoration: underline;
}

.blog-link-context {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  margin-left: 8px;
}

.blog-similar-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  padding: 2px 8px;
  border-radius: 4px;
}

.blog-eval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.blog-eval-toggle-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
}

.blog-evaluation-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-eval-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13px;
}

.blog-eval-item.skipped {
  opacity: 0.45;
}

.blog-eval-score {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  min-width: 28px;
  text-align: center;
}

.blog-eval-score.high { color: var(--success); }
.blog-eval-score.mid { color: var(--gold-dim); }
.blog-eval-score.low { color: var(--danger); }

.blog-eval-title {
  flex: 1;
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-eval-reasoning {
  font-size: 11px;
  color: var(--ink-faint);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-eval-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.blog-eval-badge.skip {
  color: var(--danger);
  background: var(--danger-light);
}

.blog-eval-badge.use {
  color: var(--success);
  background: var(--success-light);
}

.blog-eval-scores-detail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

/* ===== NEWSLETTER ===== */

.nl-section {
  padding: 0 24px;
  margin-bottom: 8px;
}

.nl-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.nl-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 20px 24px;
}

.nl-config-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nl-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.nl-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nl-form-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-faint);
}

.nl-input, .nl-select, .nl-textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--parchment);
  color: var(--ink);
}

.nl-textarea {
  resize: vertical;
  min-height: 48px;
}

.nl-slider {
  width: 100%;
  accent-color: var(--gold);
}

.nl-pct-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-light);
  text-align: center;
}

.nl-mix-sliders {
  background: var(--cream);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
}

.nl-mix-total {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  margin-top: 4px;
}

.nl-mix-total.warning {
  color: var(--danger);
}

.nl-mix-total.ok {
  color: var(--success);
}

.nl-generate-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.nl-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--ink-light);
}

.nl-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: blog-spin 0.8s linear infinite;
}

.nl-empty {
  color: var(--ink-faint);
  font-size: 14px;
  font-style: italic;
  padding: 20px 0;
}

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

.nl-draft-card {
  background: var(--parchment);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.nl-draft-card:hover {
  border-color: var(--gold);
}

.nl-draft-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.nl-draft-header:hover {
  background: var(--cream);
}

.nl-draft-expand {
  font-size: 12px;
  color: var(--ink-faint);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nl-draft-card.expanded .nl-draft-expand {
  transform: rotate(90deg);
}

.nl-draft-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.nl-draft-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-faint);
}

.nl-draft-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
}

.nl-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
}

.nl-status.draft {
  color: var(--gold-dim);
  background: var(--gold-faint);
  border: 1px solid var(--gold-dim);
}

.nl-status.approved {
  color: var(--success);
  background: var(--success-light);
  border: 1px solid var(--success);
}

.nl-draft-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

.nl-draft-card.expanded .nl-draft-body {
  display: block;
}

.nl-draft-preview {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 12px;
  max-height: 500px;
  overflow-y: auto;
}

.nl-draft-preview iframe {
  width: 100%;
  border: none;
  min-height: 400px;
}

.nl-draft-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.nl-draft-actions .btn-sm {
  font-size: 12px;
  padding: 4px 12px;
}

/* Content Inbox */
.inbox-count-badge {
  font-size: 12px;
  font-weight: 600;
  background: var(--gold-faint);
  color: var(--gold);
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 8px;
}

.inbox-quick-add {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.inbox-type-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.inbox-type-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink-light);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.inbox-type-btn:hover { border-color: var(--gold); }
.inbox-type-btn.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 600;
}

.inbox-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  min-height: 60px;
}
.inbox-textarea:focus { outline: none; border-color: var(--gold); }

.inbox-url-row {
  margin-top: 8px;
}

.inbox-url-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}
.inbox-url-input:focus { outline: none; border-color: var(--gold); }

.inbox-options-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.inbox-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}

.inbox-date-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}

.inbox-priority-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}
.inbox-priority-btn.high {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.inbox-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-faint);
  transition: all 0.15s;
}
.inbox-file-label:hover { border-color: var(--gold); color: var(--gold); }

.inbox-file-name {
  font-size: 12px;
  color: var(--ink-faint);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-add-btn {
  margin-left: auto;
}

/* Inbox Items */
.inbox-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inbox-item {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.inbox-item:hover { border-color: var(--gold-dim); }
.inbox-item-inactive { opacity: 0.55; }

.inbox-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inbox-item-icon {
  flex-shrink: 0;
  color: var(--gold-dim);
  display: flex;
}

.inbox-item-preview {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.inbox-item-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.inbox-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.inbox-badge-high { background: var(--danger-light); color: var(--danger); }
.inbox-badge-usein { background: var(--gold-faint); color: var(--gold-dim); }
.inbox-badge-used { background: var(--success-light); color: var(--success); }
.inbox-badge-expired { background: rgba(122,122,122,0.12); color: var(--ink-faint); }
.inbox-badge-dismissed { background: rgba(122,122,122,0.12); color: var(--ink-faint); }

.inbox-deadline {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.inbox-deadline-ok { background: var(--success-light); color: var(--success); }
.inbox-deadline-soon { background: rgba(212, 168, 83, 0.15); color: var(--gold-dim); }
.inbox-deadline-overdue { background: var(--danger-light); color: var(--danger); }

.inbox-item-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.inbox-item-content {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.inbox-item-url {
  display: block;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 8px;
  word-break: break-all;
}

.inbox-item-media {
  max-width: 320px;
  max-height: 200px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.inbox-item-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.inbox-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Expired section toggle */
.inbox-expired-section {
  margin-top: 20px;
}

.inbox-expired-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 8px;
}
.inbox-expired-toggle:hover { color: var(--ink); }

/* Save to Inbox button (news/feed) */
.btn-inbox-save {
  padding: 3px 10px;
  border: 1px solid var(--gold-dim);
  border-radius: 5px;
  background: var(--gold-faint);
  color: var(--gold-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-inbox-save:hover {
  background: var(--gold);
  color: var(--navy);
}

.news-article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-article-top a {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .nl-form-row { flex-direction: column; }
  .nl-generate-row { flex-direction: column; align-items: stretch; }
  .nl-draft-header { flex-wrap: wrap; }
  .nl-draft-meta { flex-wrap: wrap; }
  .blog-form-row { flex-direction: column; }
  .blog-generate-row { flex-direction: column; align-items: stretch; }
  .blog-draft-header { flex-wrap: wrap; }
  .blog-draft-meta { flex-wrap: wrap; }
  .blog-eval-reasoning { display: none; }
  .blog-eval-scores-detail { display: none; }
  .inbox-options-row { flex-direction: column; align-items: stretch; }
  .inbox-type-btns { flex-wrap: wrap; }
  .inbox-item-badges { flex-wrap: wrap; }
  .reel-scout-player { height: 220px; }
  .reel-scout-card { padding: 14px; }
  .reel-scout-card-actions { flex-wrap: wrap; }
}

/* ===== REEL SCOUT ===== */

.reel-scout-input {
  margin-bottom: 24px;
}

.reel-scout-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.reel-scout-input-row input {
  flex: 1;
}

.reel-scout-helper {
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.4;
}

.reel-scout-loading {
  margin-bottom: 24px;
}

.reel-scout-progress-anim {
  transition: width 1s ease;
}

.reel-scout-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.reel-scout-video-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 16px;
}

.reel-scout-player-wrap {
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.reel-scout-player {
  width: 100%;
  height: 400px;
  display: block;
}

.reel-scout-clips {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.reel-scout-card {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  transition: border-color 0.15s;
}

.reel-scout-card:hover {
  border-color: var(--gold-dim);
}

.reel-scout-card-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.reel-scout-score {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.reel-scout-score-high {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
}

.reel-scout-score-medium {
  background: rgba(240, 173, 78, 0.15);
  color: #d4942a;
}

.reel-scout-score-low {
  background: rgba(122, 139, 163, 0.15);
  color: var(--ink-faint);
}

.reel-scout-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--gold-faint);
  color: var(--gold-dim);
  white-space: nowrap;
}

.reel-scout-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.reel-scout-card-time {
  font-size: 13px;
  color: var(--gold-dim);
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.reel-scout-card-hook {
  font-size: 14px;
  color: var(--ink-light);
  margin-bottom: 6px;
  line-height: 1.4;
}

.reel-scout-card-why {
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.4;
  margin-bottom: 10px;
}

.reel-scout-card-excerpt {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-faint);
}

.reel-scout-card-excerpt summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-light);
  margin-bottom: 4px;
}

.reel-scout-card-excerpt p {
  border-left: 2px solid var(--gold-dim);
  padding-left: 10px;
  font-style: italic;
  line-height: 1.5;
  margin-top: 6px;
}

.reel-scout-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reel-scout-history-section {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.reel-scout-history-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 12px;
}

.reel-scout-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reel-scout-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  gap: 12px;
}

.reel-scout-history-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reel-scout-history-info:hover strong {
  color: var(--gold-dim);
}

.reel-scout-history-info strong {
  font-size: 14px;
  color: var(--ink);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-scout-history-info .text-muted {
  font-size: 12px;
  color: var(--ink-faint);
}
