@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   Scouthook — main.css
   Premium “Ink on Paper” design system + components
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Premium — Ink on Paper */
  --bg-app: #F9FAFB;
  --bg-surface: #FFFFFF;
  --text-heading: #09090B;
  --text-body: #000000;
  --text-muted: #71717A;
  --border: #E4E4E7;
  --accent: #10B981;
  /* Primary brand — deep teal (CTAs, hero, focus; distinct from --accent for scores) */
  --brand: #0F766E;
  --brand-hover: #115E59;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

  /* Legacy aliases — backgrounds */
  --bg-page: var(--bg-app);
  --bg-card: var(--bg-surface);
  --bg-nav: var(--bg-surface);
  --bg-toggle-bar: #FAFAFA;
  --bg-suggestion: #FFFBEB;
  --bg-pill: #F4F4F5;
  --bg-pill-hover: #E4E4E7;
  --bg-empty-left: #FAFAFA;
  --bg-preview: #F9FAFB;
  --bg-incomplete-profile: #FEF3C7;
  --bg-archetype-badge: #F4F4F5;
  --bg-slide-over: var(--bg-surface);
  --bg-overlay: rgba(9, 9, 11, 0.45);
  --bg-subtle: #FAFAFA;

  /* Legacy aliases — text */
  --text-primary: var(--text-body);
  --text-secondary: #52525B;
  --text-tertiary: var(--text-muted);
  --text-teal: var(--text-heading);
  --text-suggestion: #92400E;
  --text-incomplete-profile: #92400E;
  --text-danger: #DC2626;
  --text-amber: #D97706;

  /* Primary chrome — maps to brand teal */
  --teal: var(--brand);
  --teal-hover: var(--brand-hover);
  --teal-disabled: #94A3B8;

  /* Score / quality */
  --score-pass: var(--accent);
  --score-borderline: #D97706;
  --score-fail: #DC2626;

  /* Borders */
  --border-divider: #F4F4F5;
  --border-light: #E4E4E7;
  --border-suggestion: #FCD34D;
  --border-incomplete-profile: #FCD34D;
  --border-empty-scouthook: var(--accent);
  --border-published: var(--accent);

  /* Typography — sans only (Inter) */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: var(--font-sans);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-slide-over: -4px 0 24px rgba(0, 0, 0, 0.08);
  --shadow-modal: var(--shadow-md);

  --color-white: #FFFFFF;
  --bg-pill-fail: #FEF2F2;
  --border-pill-fail: #FECACA;
  --bg-pill-pass: #ECFDF5;
  --bg-pill-borderline: #FFFBEB;

  --sidebar-active-bg: #F4F4F5;
}

/* ── Reset ──────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[hidden] { display: none !important; }

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

/* Post / insight body (readability) — weight 450 approximated via 500 for Inter */
.text-post,
.text-insight {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-body);
}

/* Metadata: labels, timestamps, small caps */
.text-meta {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Page titles — consistent across all pages */
.page-title-h1,
.drafts-title,
.published-title,
.schedule-title,
.vault-title,
.media-title,
.brand-heading,
.profile-heading,
.help-heading {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin: 0 0 var(--space-1);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ── Shell layout ───────────────────────────────────────────── */
body {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
#sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  padding: var(--space-6) 0;
}

.sidebar-logo {
  font-size: 18px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-heading);
  text-decoration: none;
  padding: 0 var(--space-6) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: block;
}

.sidebar-logo span {
  color: var(--text-heading);
  opacity: 0.85;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-3);
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-link:hover {
  background: var(--bg-pill);
  color: var(--text-heading);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--text-heading);
  font-weight: 600;
}

.sidebar-cta {
  padding: var(--space-3) var(--space-3) var(--space-2);
}

.sidebar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px var(--space-3);
  background: var(--teal);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s ease;
}

.sidebar-cta-btn:hover {
  background: var(--teal-hover);
}

.sidebar-bottom {
  padding: var(--space-3);
  border-top: 1px solid var(--border);
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  margin-bottom: var(--space-5);
}

.account-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-secondary);
  transition: background 0.12s ease, color 0.12s ease;
}

.account-tab:hover {
  background: var(--bg-pill);
  color: var(--text-heading);
}

.account-tab.active {
  background: var(--sidebar-active-bg);
  color: var(--text-heading);
}

.sidebar-accordion {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-accordion-summary::-webkit-details-marker {
  display: none;
}

.sidebar-accordion[open] .sidebar-accordion-chevron {
  transform: rotate(180deg);
}

.sidebar-accordion-chevron {
  transition: transform 0.15s ease;
  opacity: 0.7;
}

.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.sidebar-group-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: var(--space-1) var(--space-3) var(--space-2);
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-sublink:hover {
  background: var(--bg-pill);
  color: var(--text-heading);
}

.sidebar-sublink.active {
  background: var(--sidebar-active-bg);
  color: var(--text-heading);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   Executive Dark Sidebar — all rules scoped to #sidebar
   Main content area is completely unaffected.
   ══════════════════════════════════════════════════════════════ */

#sidebar {
  background: linear-gradient(180deg, #09090B 0%, #161618 100%);
  border-right: none;
}

/* Logo — image-based */
#sidebar .sidebar-logo {
  display: flex;
  align-items: center;
  padding: 0 24px 20px;
  border-bottom-color: #18181B;
}

.sidebar-logo-img {
  height: 34px;
  width: auto;
  display: block;
}

/* Icons inside nav links */
#sidebar .sidebar-link svg,
#sidebar .sidebar-sublink svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

#sidebar .sidebar-link:hover svg,
#sidebar .sidebar-link.active svg,
#sidebar .sidebar-sublink:hover svg,
#sidebar .sidebar-sublink.active svg {
  opacity: 1;
}

/* CTA button svg — never dimmed */
#sidebar .sidebar-cta-btn svg {
  opacity: 1;
  flex-shrink: 0;
}

/* CTA — Tactile Teal */
#sidebar .sidebar-cta {
  padding: 12px 12px 8px;
}

#sidebar .sidebar-cta-btn {
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  border: 1px solid #115E59;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 4px 12px rgba(20, 184, 166, 0.2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  gap: 6px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #FFFFFF;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

#sidebar .sidebar-cta-btn:hover {
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  opacity: 0.9;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 6px 16px rgba(20, 184, 166, 0.3);
}

/* Nav links */
#sidebar .sidebar-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #A1A1AA;
  padding: 6px 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

#sidebar .sidebar-link:hover {
  background: #18181B;
  color: #FFFFFF;
}

#sidebar .sidebar-link.active {
  background: #18181B;
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 6px;
}

#sidebar .sidebar-bottom {
  border-top-color: #18181B;
}

#sidebar .sidebar-accordion-summary {
  color: #52525B;
}

#sidebar .sidebar-accordion-summary:hover {
  background: #18181B;
  color: #A1A1AA;
}

#sidebar .sidebar-group-label {
  color: #52525B;
}

#sidebar .sidebar-sublink {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #A1A1AA;
  padding: 10px 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

#sidebar .sidebar-sublink:hover {
  background: #18181B;
  color: #FFFFFF;
}

#sidebar .sidebar-sublink.active {
  background: #18181B;
  color: #FFFFFF;
  font-weight: 600;
}

#sidebar .sidebar-linkedin {
  border-top-color: #18181B;
}

#sidebar .nav-linkedin-btn {
  border-color: #27272A;
  color: #A1A1AA;
  background: transparent;
}

#sidebar .nav-linkedin-btn:hover {
  background: #18181B;
  color: #FFFFFF;
}

#sidebar .nav-linkedin-name {
  color: #FFFFFF;
}

#sidebar .nav-linkedin-initials {
  background: #27272A;
  color: #A1A1AA;
}

/* Profile section */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid #18181B;
}

.sidebar-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #27272A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #A1A1AA;
  flex-shrink: 0;
  letter-spacing: 0;
}

.sidebar-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sidebar-profile-name {
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-badge {
  color: #52525B;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  #sidebar {
    border-bottom: 1px solid #18181B;
  }
}

/* ── Main content wrapper ───────────────────────────────────── */
#main-content {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── App footer (legal) ───────────────────────────────────── */
.app-footer {
  margin-top: auto;
  padding: var(--space-8) var(--space-8) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-app);
}

.app-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  text-align: center;
}

.app-footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.app-footer-inner a:hover {
  color: var(--text-heading);
}

.app-footer-sep {
  margin: 0 var(--space-2);
  opacity: 0.5;
}

.app-footer-legal {
  margin: var(--space-3) 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Layout ─────────────────────────────────────────────────── */
#app {
  max-width: 1350px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8);
  display: flex;
  gap: var(--space-12);
  align-items: flex-start;
}

/* ── LinkedIn button / chip (in sidebar) ───────────────────── */
.sidebar-linkedin {
  padding: 12px 12px 16px;
  border-top: 1px solid var(--border);
}

.nav-linkedin-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease;
}

.nav-linkedin-btn:hover {
  background: var(--sidebar-active-bg);
}

.nav-linkedin-connected {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font-sans);
}

.nav-linkedin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-linkedin-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-archetype-badge);
  color: var(--text-teal);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-linkedin-name {
  color: var(--text-primary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Left Panel ─────────────────────────────────────────────── */
#left-panel {
  width: 360px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  align-self: flex-start;
  position: sticky;
  top: 68px;
  box-shadow: var(--shadow-sm);
}

/* ── Idea prompt header ─────────────────────────────────────── */
.idea-prompt-header {
  margin-bottom: var(--space-5);
}

.idea-prompt-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.idea-prompt-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.55;
  margin-top: 6px;
}

/* ── Voice Profile Indicator ────────────────────────────────── */
#voice-indicator-area {
  display: contents;
}

.voice-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0;
}

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

.voice-indicator-dot--green { background: #22C55E; }
.voice-indicator-dot--red   { background: #EF4444; }

.voice-indicator .edit-link {
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.voice-indicator .edit-link:hover {
  color: var(--text-secondary);
  border-bottom-color: var(--text-tertiary);
}

/* ── Section Labels ─────────────────────────────────────────── */
.field-label {
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
  color: #111;
  margin-bottom: var(--space-2);
  display: block;
}

/* ── Form Inputs ────────────────────────────────────────────── */
.field-input,
.field-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.65;
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--bg-surface);
  outline: none;
  transition: border-color 0.15s ease;
}

.field-input {
  height: 40px;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--text-tertiary);
  font-weight: 300;
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--brand);
}

.field-input.error,
.field-textarea.error {
  border-color: var(--score-fail);
}

.field-group {
  margin-bottom: var(--space-4);
}

.field-error {
  font-size: 12px;
  color: var(--score-fail);
  margin-top: var(--space-1);
  display: none;
}

.field-error.visible {
  display: block;
}

/* ── Idea textarea ──────────────────────────────────────────── */
#idea-input {
  min-height: 220px;
  height: auto;
  resize: none;
  font-size: 15px;
  line-height: 1.6;
}

.content-nudge {
  margin-top: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Recipe fields ──────────────────────────────────────────── */
#recipe-fields {
  display: none;
}

#recipe-fields.visible {
  display: block;
}

#idea-fields {
  display: block;
}

#idea-fields.hidden {
  display: none;
}

#recipe-lesson {
  height: 80px;
  resize: none;
}

/* ── Generate Button ────────────────────────────────────────── */
#generate-btn {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  margin-top: var(--space-5);
  transition: background 0.2s ease;
}

#generate-btn:hover:not(:disabled) {
  background: var(--teal-hover);
}

#generate-btn:disabled {
  background: var(--teal-disabled);
  cursor: not-allowed;
}

/* ── Right Panel ────────────────────────────────────────────── */
#right-panel {
  flex: 1;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 52px - var(--space-10) * 2);
}

/* Scheduled post — pause before editing */
.schedule-lock-banner {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-pill);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-body);
}

.schedule-lock-banner.hidden {
  display: none;
}

.schedule-lock-banner-text {
  margin: 0;
  flex: 1;
  min-width: 200px;
  line-height: 1.5;
}

.schedule-lock-banner-msg {
  margin: 0;
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
}

.schedule-pause-btn {
  flex-shrink: 0;
  height: 36px;
}

#post-textarea[readonly] {
  cursor: not-allowed;
  opacity: 0.92;
}

/* ── Toggle Bar (Edit / Preview) ────────────────────────────── */
#toggle-bar {
  height: 44px;
  flex-shrink: 0;
  background: var(--bg-toggle-bar);
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  align-items: stretch;
  padding: 0 var(--space-6);
}

.view-tab {
  font-size: 13px;
  font-family: var(--font-sans);
  padding: 0 var(--space-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  color: var(--text-tertiary);
  font-weight: 400;
}

.view-tab.active {
  border-bottom-color: var(--text-heading);
  font-weight: 600;
  color: var(--text-heading);
}

/* ── Input tab bar (shared: generate, vault, ideas) ─────────── */
.input-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.input-tab {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px var(--space-4);
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.input-tab:hover  { color: var(--text-secondary); }
.input-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── Page-level tab bar (Idea Vault: centered, prominent) ─────── */
.page-tab-bar {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0 var(--space-8);
  gap: var(--space-4);
}
.page-tab {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 14px var(--space-6);
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: -0.01em;
  transition: color 0.15s, border-color 0.15s;
}
.page-tab:hover  { color: var(--text-heading); }
.page-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.word-count {
  margin-left: auto;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Score Bar ──────────────────────────────────────────────── */
#score-bar {
  display: none;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

#score-bar.visible {
  display: flex;
}

.score-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

#score-number {
  font-size: 56px;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

#score-number.pass  { color: var(--score-pass); }
#score-number.borderline { color: var(--score-borderline); }
#score-number.fail  { color: var(--score-fail); }

.score-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.force-returned-pill {
  display: inline-block;
  font-size: 10px;
  background: var(--bg-pill-fail);
  color: var(--score-fail);
  border: 1px solid var(--border-pill-fail);
  border-radius: var(--radius-pill);
  padding: 2px var(--space-2);
  margin-top: var(--space-1);
}

.score-right {
  flex: 1;
  min-width: 0;
}

.score-top-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.funnel-type-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.funnel-type-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.archetype-badge {
  background: var(--bg-pill);
  color: var(--text-heading);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
}

.confidence-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.passfail-pill {
  font-size: 11px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  margin-left: auto;
}

.passfail-pill.pass {
  background: var(--bg-pill-pass);
  color: var(--text-teal);
}

.passfail-pill.fail {
  background: var(--bg-pill-fail);
  color: var(--score-fail);
}

.passfail-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg-pill);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
}

.passfail-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #18181B;
  color: #F4F4F5;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  padding: 8px 11px;
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  z-index: 200;
  pointer-events: none;
  white-space: normal;
}

/* Arrow pointing down toward the ? circle */
.passfail-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 6px;
  border: 5px solid transparent;
  border-top-color: #18181B;
}

.passfail-help:hover .passfail-tooltip {
  display: block;
}

.suggestions-toggle {
  font-size: 12px;
  color: var(--teal);
  cursor: pointer;
  margin-top: var(--space-2);
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  display: none;
}

.suggestions-toggle.visible {
  display: inline-block;
}

.suggestions-list {
  display: none;
  margin-top: var(--space-2);
}

.suggestions-list.visible {
  display: block;
}

.suggestion-item {
  background: var(--bg-suggestion);
  border-left: 2px solid var(--border-suggestion);
  padding: var(--space-2) var(--space-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--text-suggestion);
  line-height: 1.6;
  margin-top: var(--space-2);
}

/* ── Alternative Strip ──────────────────────────────────────── */
#alternative-strip {
  display: none;
  padding: var(--space-2) var(--space-6);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-divider);
  font-size: 13px;
  color: var(--text-secondary);
}

#alternative-strip.visible {
  display: block;
}

#alternative-strip a {
  color: var(--teal);
  cursor: pointer;
  text-decoration: none;
}

/* ── Hook B Strip ───────────────────────────────────────────── */
#hook-b-strip {
  display: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  gap: var(--space-2);
  align-items: baseline;
  flex-wrap: wrap;
}

#hook-b-strip.visible {
  display: flex;
}

.hook-b-label {
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  flex-shrink: 0;
}

#hook-b-text {
  flex: 1;
  font-style: italic;
}

#hook-b-strip a {
  color: var(--teal);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── CTA Alternatives Strip ─────────────────────────────────── */
#cta-strip {
  display: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  gap: var(--space-2);
  align-items: flex-start;
  flex-wrap: wrap;
}

#cta-strip.visible {
  display: flex;
}

#cta-chips {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.cta-chip {
  display: block;
  color: var(--teal);
  cursor: pointer;
  text-decoration: none;
  font-style: italic;
  line-height: 1.4;
}

.cta-chip:hover {
  text-decoration: underline;
}

/* ── Post Surface ───────────────────────────────────────────── */
#post-surface {
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: var(--space-6);
}

/* Empty state */
.empty-state {
  display: block;
}

.empty-state.hidden {
  display: none;
}

.empty-state-heading {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* Skeleton */
.skeleton-state {
  display: none;
}

.skeleton-state.visible {
  display: block;
}

.skeleton-line {
  height: 14px;
  background: var(--border-divider);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}

/* Post textarea */
#post-textarea {
  display: none;
  width: 100%;
  min-height: 300px;
  height: auto;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  font-family: var(--font-sans);
  color: var(--text-body);
  padding: 0;
}

#post-textarea.visible {
  display: block;
}

#post-textarea.published {
  border-left: 3px solid var(--border-published);
  padding-left: var(--space-4);
}

/* Error state */
.post-error-state {
  display: none;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  padding-top: var(--space-12);
}

.post-error-state.visible {
  display: block;
}

.post-error-state a {
  color: var(--teal);
  cursor: pointer;
}

/* ── LinkedIn Preview ───────────────────────────────────────── */
#linkedin-preview {
  display: none;
}

#linkedin-preview.visible {
  display: block;
  min-height: 300px;
}

#right-panel.preview-mode #post-surface {
  background: var(--bg-preview);
}

#post-edit-area {
  padding: var(--space-5);
}

.linkedin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.linkedin-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.linkedin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.linkedin-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-archetype-badge);
  color: var(--text-teal);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.linkedin-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.linkedin-headline {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.linkedin-timestamp {
  font-size: 13px;
  color: var(--text-tertiary);
}

.linkedin-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.linkedin-see-more {
  color: var(--teal);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}

.linkedin-engagement {
  display: flex;
  gap: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  margin-top: var(--space-4);
}

.linkedin-action {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
}

.linkedin-action svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Action Bar ─────────────────────────────────────────────── */
#action-bar {
  height: 56px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  gap: var(--space-2);
}

.action-bar-error {
  font-size: 12px;
  color: var(--score-fail);
  padding: var(--space-2) var(--space-5);
  display: none;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}

.action-bar-error.visible {
  display: block;
}

.back-to-idea-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 0 0 var(--space-4) 0;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
}
.back-to-idea-btn:hover { color: var(--brand); }

.regenerate-btn-left {
  width: 100%;
  margin-top: var(--space-5);
  padding: 10px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s;
}
.regenerate-btn-left:hover { background: var(--bg-hover); }
.regenerate-btn-left:disabled { opacity: 0.5; cursor: not-allowed; }
.regenerate-btn-left.undo-mode { color: var(--teal); }

.action-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 var(--space-2);
  flex-shrink: 0;
}

.pill-btn {
  background: var(--bg-pill);
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s ease;
}

.pill-btn:hover:not(.disabled) {
  background: var(--bg-pill-hover);
}

.pill-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Asset action buttons (Canva-style square icon cards) ───── */
.asset-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 8px;
  min-width: 54px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.asset-action-btn:hover:not(.disabled) {
  background: var(--bg-pill);
  border-color: var(--teal);
  color: var(--teal);
}

.asset-action-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.asset-action-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.asset-action-btn:hover:not(.disabled) .asset-action-label {
  color: var(--teal);
}

.asset-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--space-5);
  background: var(--bg-archetype-badge);
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
.asset-chip.hidden { display: none; }
.asset-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--text-secondary);
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
}
.asset-chip-remove:hover { background: var(--border); }

/* ── LinkedIn preview asset attachment ─────────────────────── */
.preview-asset {
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.preview-asset.hidden { display: none; }
.preview-asset img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}
.preview-asset-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  pointer-events: none;
}

/* ── Preview mode — hide editing chrome ─────────────────────── */
#right-panel.preview-mode #post-edit-area {
  display: none !important;
}


.action-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  margin-left: auto;
}

/* Auto-save passive indicator — sits in place of the old Save Draft button */
.autosave-indicator {
  display: inline-flex;
  align-items: center;
  height: 32px;
  min-width: 72px;
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--text-tertiary);
  transition: color 0.2s ease, opacity 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.autosave-indicator--saving {
  color: var(--text-tertiary);
}

.autosave-indicator--saved {
  color: var(--accent);
}

.autosave-stamp {
  font-size: 11px;
  color: var(--text-muted);
  padding: var(--space-2) 0 var(--space-1);
  text-align: right;
  user-select: none;
  pointer-events: none;
}

/* Primary / secondary buttons (premium chrome) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 var(--space-5);
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  border: 1px solid #115E59;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 2px 8px rgba(20, 184, 166, 0.15);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 4px 12px rgba(20, 184, 166, 0.25);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 var(--space-5);
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  color: var(--text-heading);
  border-color: #A1A1AA;
  background: var(--bg-pill);
}

.btn-outlined {
  height: 32px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-outlined:hover:not(:disabled) {
  background: var(--bg-pill);
  border-color: #A1A1AA;
  color: var(--text-heading);
}

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

.btn-outlined-teal {
  height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-outlined-teal:hover {
  background: var(--bg-pill);
  color: var(--text-heading);
  border-color: #A1A1AA;
}

#schedule-btn {
  height: 40px;
  padding: 0 var(--space-5);
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  border: 1px solid #115E59;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 2px 8px rgba(20, 184, 166, 0.15);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

#schedule-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 4px 12px rgba(20, 184, 166, 0.25);
}

#schedule-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.post-publish-state {
  display: none;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.post-publish-state.visible {
  display: flex;
}

.published-text {
  font-size: 13px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Schedule Modal ─────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 200;
  display: none;
}

.overlay.visible {
  display: block;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 460px;
  padding: var(--space-8);
  box-shadow: var(--shadow-modal);
  display: none;
}

.modal.visible {
  display: block;
}

.modal-heading {
  font-size: 18px;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: var(--space-6);
}

.modal-field {
  margin-bottom: var(--space-4);
}

.modal-field:last-of-type {
  margin-bottom: var(--space-6);
}

/* Schedule consent copy */
.schedule-consent-note {
  margin: -8px 0 var(--space-5);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-body);
  opacity: .92;
}

/* Schedule presets */
.schedule-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.schedule-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.schedule-preset-btn {
  padding: 9px var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-app);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-body);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.schedule-preset-btn:hover {
  border-color: var(--teal);
  background: var(--bg-pill);
}

.schedule-preset-btn.active {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--color-white);
  font-weight: 600;
}

.schedule-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.schedule-divider::before,
.schedule-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.schedule-divider span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.schedule-custom-row {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.schedule-tz-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.btn-teal-filled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 40px;
  padding: 0 var(--space-5);
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  border: 1px solid #115E59;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 2px 8px rgba(20, 184, 166, 0.15);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-teal-filled:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 4px 12px rgba(20, 184, 166, 0.25);
}

.btn-teal-filled:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal-error {
  font-size: 12px;
  color: var(--score-fail);
  margin-top: var(--space-3);
  display: none;
}

.modal-error.visible {
  display: block;
}

/* Free-plan publish-only modal */
.modal--publish-only .schedule-consent-note,
.modal--publish-only .schedule-section-label,
.modal--publish-only .schedule-presets,
.modal--publish-only .schedule-divider,
.modal--publish-only .schedule-custom-row,
.modal--publish-only .schedule-tz-label,
.modal--publish-only #schedule-confirm-btn { display: none; }

.modal--publish-only .free-upgrade-note { display: block; }

.free-upgrade-note {
  display: none;
  font-size: 13px;
  color: var(--text-muted);
  margin: -4px 0 var(--space-5);
}

.free-upgrade-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.free-upgrade-link:hover { text-decoration: underline; }

/* ── Slide-over ─────────────────────────────────────────────── */
.slide-over {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 480px;
  z-index: 300;
  background: var(--bg-slide-over);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-slide-over);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms ease;
}

.slide-over.open {
  transform: translateX(0);
}

.slide-over-header {
  height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  justify-content: space-between;
  flex-shrink: 0;
}

.slide-over-type-label {
  font-size: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.slide-over-close {
  font-size: 18px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: var(--space-1);
}

.slide-over-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

.slide-over-skeleton {
  height: 200px;
  background: var(--border-divider);
  border-radius: var(--radius-md);
}

.slide-over-image {
  width: 100%;
  border-radius: var(--radius-md);
}

.slide-over-footer {
  height: 64px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-3);
  flex-shrink: 0;
}

.slide-over-discard {
  font-size: 13px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

.slide-over-discard:hover {
  color: var(--text-primary);
}

/* Swipe handle (mobile) */
.slide-over-handle {
  display: none;
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

/* ── Slide numbers for carousel ─────────────────────────────── */
.carousel-slide {
  margin-bottom: var(--space-4);
}

.carousel-slide-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
  font-family: var(--font-sans);
}

/* ── Slide-over image editor ────────────────────────────────── */
.so-editor-form {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) 0 var(--space-4);
}

.so-field-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}

.so-quote-textarea {
  min-height: 96px;
  resize: vertical;
  font-size: 15px;
}

.so-body-textarea {
  min-height: 72px;
  resize: vertical;
  font-size: 14px;
}

.so-char-counter,
.so-word-counter {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: var(--space-1);
  font-family: var(--font-sans);
}

.so-char-counter--full {
  color: var(--score-fail);
  font-weight: 600;
}

.so-wc-warn {
  color: var(--score-fail);
  font-weight: 600;
}

.so-slide-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--bg-subtle, #FAFAFA);
}

.so-slide-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.so-slide-num {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.so-slide-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

.so-slide-badge--title   { background: #EFF6FF; color: #1D4ED8; }
.so-slide-badge--content { background: var(--bg-pill, #F4F4F5); color: var(--text-secondary, #52525B); }
.so-slide-badge--closing { background: #F0FDF4; color: #15803D; }

.so-extract-error {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-8) 16px;
  line-height: 1.5;
}

.so-regen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.so-regen-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.so-regen-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
}

.so-regen-btn:hover {
  text-decoration: underline;
}

.so-hl-input {
  font-size: 14px;
}

/* ── Brand Settings Page ────────────────────────────────────── */
.brand-page {
  padding: var(--space-8);
}

.brand-page-header {
  margin-bottom: var(--space-8);
}

.brand-subheading {
  font-size: 15px;
  color: var(--text-secondary);
}

.brand-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-8);
  align-items: start;
}

.brand-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.brand-field {
  margin-bottom: var(--space-6);
}

.brand-color-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.brand-color-swatch {
  width: 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-hex-input {
  width: 120px;
  font-family: monospace;
  text-transform: uppercase;
}

/* Logo row */
.brand-logo-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.brand-logo-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-app);
}

.brand-logo-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.brand-logo-btns {
  display: flex;
  gap: var(--space-2);
}

.brand-logo-uploading {
  font-size: 12px;
  color: var(--text-muted);
}

.brand-logo-clear-btn {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
}

.brand-logo-clear-btn:hover {
  color: var(--text-body);
}

/* Save row */
.brand-save-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.brand-save-btn {
  height: 40px;
  padding: 0 var(--space-6);
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  border: 1px solid #115E59;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 2px 8px rgba(20, 184, 166, 0.15);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.brand-save-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 4px 12px rgba(20, 184, 166, 0.25);
}

.brand-save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.brand-save-status {
  font-size: 13px;
  color: var(--text-secondary);
}

.brand-save-status.error {
  color: var(--score-fail, #E53E3E);
}

/* ── Live preview card ──────────────────────────────────────── */
.brand-preview-card {
  position: sticky;
  top: var(--space-8);
}

.brand-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.brand-preview-visual {
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  transition: background 0.2s ease;
}

.brand-preview-accent-bar {
  height: 3px;
  width: 48px;
  border-radius: 2px;
  margin-bottom: var(--space-5);
  transition: background 0.2s ease;
}

.brand-preview-quote {
  font-size: 14px;
  line-height: 1.6;
  font-family: var(--font-sans);
  font-style: italic;
  flex: 1;
  transition: color 0.2s ease;
}

.brand-preview-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.12);
}

.brand-preview-logo-img {
  height: 48px;
  max-width: 200px;
  object-fit: contain;
}

.brand-preview-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ── Media picker modal ─────────────────────────────────────── */
.brand-media-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.brand-media-overlay.visible {
  display: flex;
}

.brand-media-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: calc(100vw - 48px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 501;
}

.brand-media-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-media-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
  font-family: var(--font-sans);
}

.brand-media-modal-hint {
  font-size: 13px;
  color: var(--text-secondary);
  padding: var(--space-4) var(--space-6) 0;
  flex-shrink: 0;
}

.brand-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6) var(--space-6);
  overflow-y: auto;
}

.brand-media-tile {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-app);
  padding: 0;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.brand-media-tile:hover {
  border-color: var(--teal);
  transform: scale(1.03);
}

.brand-media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-media-empty {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-muted);
  padding: var(--space-6) 0;
}

.brand-media-empty a {
  color: var(--teal);
  text-decoration: none;
}

/* ── Profile Page ───────────────────────────────────────────── */
.profile-page {
  padding: var(--space-8);
}

.profile-subheading {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.profile-card + .profile-card {
  margin-top: var(--space-5);
}
.profile-card--danger {
  border-color: rgba(220, 38, 38, 0.25);
}
.profile-label--danger {
  color: var(--score-fail, #dc2626);
}
.btn-danger-outline {
  padding: 6px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.5);
  background: transparent;
  color: var(--score-fail, #dc2626);
  cursor: pointer;
  font-weight: 600;
}

.profile-field {
  margin-bottom: var(--space-4);
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--border-divider);
  margin: var(--space-6) 0;
}

.field-helper {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.profile-textarea-sm {
  height: 80px;
  resize: vertical;
}

.profile-textarea-lg {
  height: 160px;
  resize: vertical;
}

#save-profile-btn {
  margin-top: var(--space-5);
  height: 44px;
  padding: 0 var(--space-8);
  background: linear-gradient(180deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  border: 1px solid #115E59;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 2px 8px rgba(20, 184, 166, 0.15);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

#save-profile-btn:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: inset 0 1px 0 0 #5EEAD4, 0 4px 12px rgba(20, 184, 166, 0.25);
}

#save-profile-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.profile-save-error {
  font-size: 13px;
  color: var(--score-fail);
  margin-top: var(--space-3);
  display: none;
}

.profile-save-error.visible {
  display: block;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  #sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0 var(--space-4);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-logo {
    padding: var(--space-4) var(--space-4) var(--space-4) 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    margin-right: var(--space-4);
    flex-shrink: 0;
  }

  .sidebar-nav {
    flex-direction: row;
    padding: var(--space-2) 0;
    gap: var(--space-1);
    flex: 1;
    overflow-x: auto;
  }

  .sidebar-bottom {
    border-top: none;
    border-left: 1px solid var(--border);
    padding: var(--space-2) 0 var(--space-2) var(--space-4);
    flex-shrink: 0;
  }

  #main-content {
    margin-left: 0;
  }


  #app {
    flex-direction: column;
    gap: var(--space-6);
    padding: var(--space-5);
  }

  #left-panel {
    width: 100%;
    position: static;
  }

  #right-panel {
    width: 100%;
  }

  .modal {
    width: calc(100% - 32px);
  }

  .slide-over {
    width: 100%;
    height: 85vh;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
    transform: translateY(100%);
    transition: transform 280ms ease;
  }

  .slide-over.open {
    transform: translateY(0);
  }

  .slide-over-handle {
    display: block;
  }


  .profile-page {
    padding: var(--space-5);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }

  .hero-right {
    width: 100%;
  }

  .hero-btn {
    width: 100%;
  }
}

/* ── Dashboard Page ─────────────────────────────────────────── */
.dashboard-page {
  padding: var(--space-8);
}

/* ── Hero Banner ────────────────────────────────────────────── */
.hero-banner {
  background: var(--teal);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── LinkedIn token expiry banner ───────────────────────────── */
.linkedin-expiry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: #fff8e1;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: #92400e;
}

.linkedin-expiry-banner[hidden] {
  display: none;
}

.linkedin-expiry-banner a {
  color: #92400e;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.hero-left {
  flex: 1;
}

.hero-heading {
  font-size: 24px;
  font-family: var(--font-sans);
  color: var(--color-white);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-subheading {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  margin-top: var(--space-2);
  font-family: var(--font-sans);
}

.hero-right {
  flex-shrink: 0;
  margin-left: var(--space-8);
}

.hero-btn {
  height: 44px;
  padding: 0 var(--space-6);
  background: var(--color-white);
  color: var(--teal);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* ── Onboarding Checklist ───────────────────────────────────── */
.onboarding-checklist {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  overflow: hidden;
  max-height: 600px;
  transition: max-height 400ms ease, opacity 350ms ease, padding 350ms ease, margin 350ms ease;
}

.onboarding-checklist.collapsing {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.checklist-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.checklist-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.checklist-progress-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.checklist-bar-wrap {
  flex: 1;
  max-width: 140px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.checklist-bar {
  height: 100%;
  background: var(--brand);
  border-radius: var(--radius-pill);
  transition: width 600ms ease;
}

.checklist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-divider);
}

.checklist-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.checklist-item:first-child {
  padding-top: 0;
}

.checklist-tick {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: transparent;
  transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}

.checklist-item.done .checklist-tick {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.checklist-label {
  font-size: 15px;
  color: var(--text-heading);
  font-family: var(--font-sans);
}

.checklist-item.done .checklist-label {
  color: var(--text-secondary);
  text-decoration: line-through;
}

.checklist-link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  margin-left: var(--space-3);
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, transform 120ms ease;
}

.checklist-link:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ── Vault Hero Section ─────────────────────────────────────── */
.vault-hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-4);
}

.vault-hero-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.vault-hero-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  font-family: var(--font-sans);
}

.vault-hero-count {
  font-size: 13px;
  color: var(--teal);
  font-weight: 500;
  font-family: var(--font-sans);
}

.vault-hero-right {
  flex-shrink: 0;
}

.vault-hero-btn {
  height: 36px;
  padding: 0 var(--space-4);
  background: var(--teal);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease;
}

.vault-hero-btn:hover {
  background: var(--teal-hover);
}

/* ── Stat Grid ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.stat-value {
  font-size: 32px;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-heading);
  margin-top: var(--space-2);
  line-height: 1.1;
}

.stat-value.pass        { color: var(--score-pass); }
.stat-value.borderline  { color: var(--score-borderline); }
.stat-value.fail        { color: var(--score-fail); }

.stat-value-text {
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 500;
  margin-top: var(--space-2);
  line-height: 1.2;
}

.stat-value-text.connected    { color: var(--accent); }
.stat-value-text.disconnected { color: var(--text-tertiary); }

.stat-sublabel {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
  font-family: var(--font-sans);
}

.stat-sublabel a {
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 600;
}

/* ── Content Grid ───────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.posts-card,
.scheduled-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.posts-card:hover,
.scheduled-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #D4D4D8;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

.card-view-all {
  font-size: 13px;
  color: var(--text-heading);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ── Post Row ───────────────────────────────────────────────── */
.post-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-divider);
}

.post-row:last-child {
  border-bottom: none;
}

.post-row-left {
  flex: 1;
  min-width: 0;
  margin-right: var(--space-3);
}

.post-row-title {
  font-size: 14px;
  color: var(--text-heading);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
  font-family: var(--font-sans);
}

.post-row-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  font-family: var(--font-sans);
}

.post-row-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* ── Score Badge ────────────────────────────────────────────── */
.score-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
}

.score-badge.pass {
  background: var(--bg-pill-pass);
  color: var(--score-pass);
}

.score-badge.borderline {
  background: var(--bg-pill-borderline);
  color: var(--score-borderline);
}

.score-badge.fail {
  background: var(--bg-pill-fail);
  color: var(--score-fail);
}

.score-badge.none {
  background: var(--bg-pill);
  color: var(--text-tertiary);
}

/* ── Status Pill ────────────────────────────────────────────── */
.status-pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px var(--space-2);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
}

.status-pill.draft {
  background: var(--bg-pill);
  color: var(--text-secondary);
}

.status-pill.scheduled {
  background: var(--bg-archetype-badge);
  color: var(--text-teal);
}

.status-pill.published {
  background: var(--bg-pill-pass);
  color: var(--score-pass);
}

/* ── Card Empty State ───────────────────────────────────────── */
.card-empty-state {
  text-align: center;
  padding: var(--space-8) 0;
  font-size: 15px;
  color: var(--text-heading);
  font-family: var(--font-sans);
}

.card-empty-state a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.card-empty-state a:hover {
  text-decoration: underline;
}

/* ── Coming Soon (stub pages) ───────────────────────────────── */
.coming-soon-page {
  max-width: 640px;
  margin: var(--space-12) auto;
  padding: 0 var(--space-8);
  text-align: center;
}

.coming-soon-heading {
  font-size: 28px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.coming-soon-text {
  font-size: 15px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

/* ── Publish banner ─────────────────────────────────────────── */
.publish-banner {
  background: #ECFDF5;
  color: var(--text-heading);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: var(--space-3) var(--space-8);
  border-bottom: 1px solid var(--border);
}

.publish-banner.hidden {
  display: none;
}

/* ── Drafts Page ────────────────────────────────────────────── */
.drafts-page {
  padding: var(--space-8);
}

.drafts-header {
  margin-bottom: var(--space-8);
}

.drafts-sub {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: var(--space-2);
  font-family: var(--font-sans);
}

.drafts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.draft-card-wrap {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 280px;
}

.draft-card-wrap:hover {
  border-color: #D4D4D8;
  box-shadow: var(--shadow-md);
}

.draft-card {
  background: var(--bg-surface);
  border: none;
  border-radius: 0;
  padding: var(--space-8);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-decoration: none;
  box-shadow: none;
  flex: 1;
  min-height: 0;
}

.draft-delete-btn {
  flex-shrink: 0;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-muted);
  background: var(--bg-surface);
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.draft-delete-btn:hover:not(:disabled) {
  color: var(--score-fail);
  background: var(--bg-pill-fail);
}

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

.draft-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.draft-archetype {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  font-family: var(--font-sans);
  color: var(--text-heading);
  background: var(--bg-pill);
  padding: 4px var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.draft-score {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.draft-score.elite {
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.4);
  background: var(--bg-pill-pass);
}

.draft-score.mid {
  color: var(--text-heading);
}

.draft-score.fail {
  color: var(--score-fail);
  border-color: var(--border-pill-fail);
  background: var(--bg-pill-fail);
}

.draft-score.empty {
  color: var(--text-muted);
  font-weight: 600;
  border-style: dashed;
}

.draft-preview {
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.draft-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: var(--space-3) var(--space-4);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--color-white);
  background: var(--brand);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.2s ease;
}

.draft-cta:hover {
  background: var(--brand-hover);
  color: var(--color-white);
}

/* Drafts empty state */
.drafts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) 0;
  gap: var(--space-4);
}

.drafts-empty-sub {
  font-size: 14px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

/* ── Draft list rows ─────────────────────────────────────────── */
#drafts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.draft-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--border);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.draft-row:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--teal);
}

.draft-row-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.draft-row-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.draft-row-hook {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  font-family: var(--font-sans);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draft-row-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.draft-row-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.draft-row-delete:hover {
  color: var(--text-danger);
  background: var(--bg-pill-fail);
}

.draft-quality-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.draft-quality-pill.good   { background: var(--bg-pill-pass);      color: #065F46; }
.draft-quality-pill.mid    { background: var(--bg-pill-borderline); color: #92400E; }
.draft-quality-pill.low    { background: var(--bg-pill);            color: var(--text-muted); }

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

/* ─────────────────────────────────────────────────────────────────────────────
   Published page — ledger list view
───────────────────────────────────────────────────────────────────────────── */

.published-page {
  padding: var(--space-8);
}

.published-header {
  margin-bottom: var(--space-6);
}

.published-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Stats strip removed */

/* ── Post cards ──────────────────────────────────────────────── */
#published-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.pub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--teal);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pub-card:hover {
  box-shadow: var(--shadow-md);
}

/* Card inner layout: info left, actions right */
.pub-card-main {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

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

.pub-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.pub-card-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pub-archetype-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-teal);
  background: var(--bg-archetype-badge);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  white-space: nowrap;
}

.pub-asset-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  white-space: nowrap;
}

.pub-card-hook {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  font-family: var(--font-sans);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right side: view button */
.pub-card-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pub-no-link {
  font-size: 12px;
  color: var(--text-muted);
}

/* View on LinkedIn button */
.pub-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  background: var(--bg-archetype-badge);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.pub-view-btn:hover {
  background: color-mix(in srgb, var(--teal) 12%, transparent);
  border-color: color-mix(in srgb, var(--teal) 50%, transparent);
  text-decoration: none;
}

/* Empty state */
.published-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) 0;
  gap: var(--space-3);
  color: var(--text-muted);
  text-align: center;
}

.published-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.published-empty-msg {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  max-width: 320px;
}

.published-empty-cta {
  margin-top: var(--space-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.published-empty-cta:hover {
  text-decoration: underline;
}

.sh-toast-container {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  z-index: 999;
  pointer-events: none;
}

.sh-toast {
  pointer-events: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-slide-over);
  white-space: nowrap;
  max-width: min(560px, calc(100vw - 24px));
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(calc(100% + 18px));
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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

.sh-toast--success {
  background: var(--bg-pill-pass);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--score-pass);
}

.sh-toast--error {
  background: var(--bg-pill-fail);
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--score-fail);
}

.sh-toast--info {
  background: var(--bg-pill);
  border-color: var(--border);
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .sh-toast-container {
    left: 50%;
    right: auto;
    bottom: var(--space-4);
    transform: translateX(-50%);
  }
  .sh-toast {
    white-space: normal;
  }
}


/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .published-col-headers { display: none; }

  .published-row {
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-4) 0;
  }

}

/* ===========================================================================
   Schedule page — Editorial Agenda (per-day cards + timeline)
   =========================================================================== */

/* ── Schedule page — Apple Calendar list-view ──────────────────── */
.schedule-page {
  padding: 28px 32px 36px;
}

.schedule-header {
  margin-bottom: 22px;
}

.schedule-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Stream — flex column, gap between individual day cards */
#schedule-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Individual day card — left date gutter + right content ───── */
.sched-day-group {
  display: grid;
  grid-template-columns: 80px 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sched-day-group--today { border-color: rgba(15, 118, 110, 0.35); }
.sched-day-group--empty { opacity: 0.68; }

/* ── Left date gutter — contrasting column ────────────────────── */
.sched-day-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 22px 0;
  background: var(--bg-app, #F9FAFB);
  border-right: 1px solid var(--border);
}

.sched-day-group--today .sched-day-aside {
  background: rgba(15, 118, 110, 0.07);
  border-right-color: rgba(15, 118, 110, 0.2);
}

.sched-dp-wday {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  line-height: 1;
}

.sched-dp-num {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}

.sched-dp-month {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  line-height: 1;
}

/* Today — teal tint + filled circle */
.sched-day-group--today .sched-dp-wday  { color: var(--teal); }
.sched-day-group--today .sched-dp-month { color: var(--teal); }
.sched-day-group--today .sched-dp-num {
  background: var(--teal);
  color: #fff;
  font-size: 18px;
}

/* ── Right content column ─────────────────────────────────────── */
.sched-day-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Empty day — centred hint text */
.sched-empty-hint {
  padding: 0 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  align-self: center;
  margin: 0;
}

/* ── Events — row of fixed-width post cards ───────────────────── */
.sched-events {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 14px;
  flex-wrap: wrap;
}

/* Each post is a fixed-width card (may be an <a> when editable) */
.sched-event {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.sched-event:hover {
  box-shadow: var(--shadow-md);
  border-color: #D4D4D8;
}

/* Time — dark tag at the top, fits its content */
.sched-evt-time-badge {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: var(--text-heading, #09090B);
  padding: 4px 10px;
  border-radius: 0 0 8px 0;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Content area below the time tag */
.sched-evt-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.sched-evt-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sched-evt-hook {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-evt-second {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges — shared selectors kept intact */
.sched-archetype-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-teal);
  background: var(--bg-archetype-badge);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  white-space: nowrap;
}

/* Funnel category badges (Reach / Trust / Convert) — shared across drafts, scheduled, published */
.funnel-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  white-space: nowrap;
}
.funnel-badge.reach   { background: #EEF2FF; color: #4338CA; }
.funnel-badge.trust   { background: #F0FDF4; color: #166534; }
.funnel-badge.convert { background: #ECFDF5; color: #065F46; }

.sched-action-edit {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal);
  margin-top: 2px;
  transition: color 0.15s ease;
  align-self: flex-start;
}
.sched-action-edit:hover { text-decoration: underline; }

/* ── "Coming up" section divider ─────────────────────────────── */
.sched-section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 8px 0 0;
}

.sched-section-divider::before,
.sched-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sched-section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── "Failed to Publish" section ─────────────────────────────── */
.sched-section-divider--failed::before,
.sched-section-divider--failed::after { background: #fecaca; }

.sched-section-label--failed { color: #dc2626; }

.sched-failed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.sched-failed-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-left: 3px solid #dc2626;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sched-failed-row:hover { background: #fef2f2; border-color: #f87171; }

.sched-failed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sched-failed-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.sched-failed-when {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
}

.sched-failed-hook {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.sched-failed-reason {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #b91c1c;
}

@media (max-width: 768px) {
  .schedule-page { padding: 16px; }
  .sched-day-group { grid-template-columns: 64px 1fr; }
  .sched-day-aside { padding: 16px 0; }
  .sched-dp-num { font-size: 20px; width: 34px; height: 34px; }
  .sched-events { flex-direction: column; }
  .sched-event { border-right: none; border-bottom: 1px solid var(--border); }
  .sched-event:last-child { border-bottom: none; }
  .sched-evt-body { padding: 10px 12px 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   Media Library — page, grid, cards, upload zone, drawer
   ═══════════════════════════════════════════════════════════════ */

/* ── Page layout ────────────────────────────────────────────── */
.media-page {
  padding: var(--space-8);
  max-width: 1200px;
}

.media-page-header {
  margin-bottom: var(--space-6);
}

.media-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── 4-column responsive grid ───────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  align-items: start;
}

@media (max-width: 1100px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .media-grid { grid-template-columns: 1fr; } }

/* ── Upload zone ────────────────────────────────────────────── */
.media-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, #FAFAFA);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
  aspect-ratio: 1 / 1;
  user-select: none;
}

.media-upload-zone:hover,
.media-upload-zone.dragover {
  border-color: var(--teal, #0F766E);
  background: var(--bg-archetype-badge);
}

.media-upload-zone.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.media-upload-zone input[type="file"] {
  display: none;
}

.upload-zone-icon {
  color: var(--text-tertiary);
}

.upload-zone-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.upload-zone-link {
  color: var(--teal, #0F766E);
  font-weight: 500;
}

.upload-zone-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 0;
}

.upload-progress {
  font-size: 12px;
  color: var(--teal, #0F766E);
  font-weight: 500;
}

/* ── Media card ─────────────────────────────────────────────── */
.media-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.media-card:hover {
  box-shadow: var(--shadow-sm);
}

.media-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-archetype-badge);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-pdf-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
}

/* Hover action buttons */
.media-card-actions {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.media-card:hover .media-card-actions,
.media-card:focus-within .media-card-actions {
  opacity: 1;
}

.media-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease;
  flex-shrink: 0;
}

.media-action-btn:hover {
  background: #fff;
}

.media-action-btn.delete-btn:hover {
  background: #FEF2F2;
  color: #DC2626;
}

/* Card info row */
.media-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  gap: var(--space-2);
}

.media-filename {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.media-format-tag {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  color: var(--text-teal);
  background: var(--bg-archetype-badge);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Empty + toast */
.media-empty {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-6);
}

/* ── Media drawer (in generate.html) ────────────────────────── */
.media-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 560px;
  z-index: 300;
  background: var(--bg-slide-over);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-slide-over);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms ease;
}

.media-drawer.open {
  transform: translateX(0);
}

.media-drawer-header {
  height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  justify-content: space-between;
  flex-shrink: 0;
}

.media-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Compact upload zone inside drawer */
.media-upload-zone--compact {
  aspect-ratio: unset;
  padding: var(--space-4);
  flex-direction: row;
  gap: var(--space-3);
  justify-content: flex-start;
}

.media-upload-zone--compact .upload-zone-text {
  text-align: left;
}

.media-upload-zone--compact .upload-zone-sub {
  display: none;
}

/* 3-column grid inside drawer */
.media-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

/* Selected state when clicking a card inside drawer */
.media-drawer-grid .media-card.selected {
  outline: 2px solid var(--teal, #0F766E);
  outline-offset: 2px;
}

.media-drawer-error {
  font-size: 13px;
  color: var(--text-danger);
}

/* ── Page header row (title + actions) ───────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: nowrap;
}

.page-header-content { flex: 1; min-width: 0; }

.page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding-top: 4px;
}

.page-header-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.page-header-help:hover {
  color: var(--text-body);
  background: var(--bg-subtle);
}

.page-header-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.page-header-upgrade:hover {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}

@media (max-width: 640px) {
  .page-header-actions { display: none; }
}

/* ── Signed-in account bar (bottom-right) + sidebar account foot ─────────── */
.app-user-bar {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 280;
  max-width: min(320px, calc(100vw - var(--space-6) * 2));
  padding: var(--space-4) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  font-family: var(--font-sans);
}

.app-user-bar-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.app-user-bar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-user-bar-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-user-bar-avatar-fallback {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.app-user-bar-kicker {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.app-user-bar-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}

.app-user-bar-email {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  word-break: break-all;
}

.app-user-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-divider);
  font-size: 12px;
}

.app-user-bar-link {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.app-user-bar-link:hover {
  text-decoration: underline;
}

.app-user-bar-sep {
  color: var(--text-muted);
  user-select: none;
}

.app-user-bar-logout {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-user-bar-logout:hover {
  color: var(--text-heading);
}

#sidebar #sidebar-account-slot {
  margin-top: 10px;
  padding: 12px 12px 10px;
  border-top: 1px solid #18181B;
}

.sidebar-account-foot-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-account-foot-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #52525B;
}

.sidebar-account-foot-name {
  font-size: 12px;
  font-weight: 500;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account-foot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-account-foot-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #27272A;
  color: #A1A1AA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
}

.sidebar-account-foot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-account-foot-email {
  font-size: 11px;
  font-weight: 500;
  color: #A1A1AA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account-foot-link {
  font-size: 12px;
  font-weight: 500;
  color: #A1A1AA;
  text-decoration: none;
  padding: 4px 0 0;
}

.sidebar-account-foot-link:hover {
  color: #FFFFFF;
}

.sidebar-account-foot-logout {
  margin-top: 4px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #27272A;
  background: transparent;
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-account-foot-logout:hover {
  background: #18181B;
  color: #FFFFFF;
  border-color: #3F3F46;
}

.sidebar-upgrade-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: rgba(20, 184, 166, 0.08);
  color: #2DD4BF;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  box-sizing: border-box;
}
.sidebar-upgrade-btn:hover {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.38);
}
.sidebar-onboarding-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: rgba(99, 102, 241, 0.08);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-onboarding-btn:hover {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.38);
}

@media (max-width: 768px) {
  .app-user-bar {
    right: var(--space-4);
    bottom: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}

/* ── Content Intelligence card ──────────────────────────────── */
.ci-card .card-header {
  margin-bottom: var(--space-4);
}

.ci-tag-count {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

.ci-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ci-insight {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-divider);
  border-radius: 8px;
}

.ci-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  min-width: 120px;
  flex-shrink: 0;
}

.ci-value {
  font-size: 14px;
  color: var(--text-heading);
  font-weight: 500;
  font-family: var(--font-sans);
}

.ci-locked {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  color: var(--text-tertiary);
  padding: var(--space-3) 0;
}
.ci-locked svg { flex-shrink: 0; margin-top: 2px; }
.ci-locked strong { display: block; font-size: 13px; color: var(--text-heading); margin-bottom: 4px; }
.ci-locked p { font-size: 13px; margin: 0 0 10px; }
.ci-upgrade-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand, #0F766E);
  background: none;
  border: 1px solid var(--brand, #0F766E);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ci-upgrade-btn:hover { background: var(--brand, #0F766E); color: #fff; }

/* ── Performance nudge card ─────────────────────────────────── */
.perf-nudge-card .card-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: var(--space-4);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

.perf-nudge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-divider);
}

.perf-nudge-row:last-child {
  border-bottom: none;
}

.perf-nudge-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perf-nudge-hook {
  font-size: 14px;
  color: var(--text-heading);
  font-weight: 500;
  font-family: var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perf-nudge-date {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

.perf-nudge-btns {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.perf-btn {
  background: none;
  border: 1px solid var(--border-divider);
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}

.perf-btn:hover {
  background: var(--bg-card-hover, var(--bg-card));
  border-color: var(--teal-600, #0d9488);
}

.perf-nudge-done {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  padding: var(--space-3) 0;
}

/* ===========================================================================
   Content Vault page
   =========================================================================== */

.vault-page {
  padding: var(--space-8);
}

.vault-header {
  margin-bottom: var(--space-6);
}

.vault-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Two-column layout ───────────────────────────────────────── */
.vault-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* ── Upload panel (left column) ─────────────────────────────── */
.vault-upload-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.vault-col-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}

.vault-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-5);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.vault-dropzone:hover,
.vault-dropzone.dragging {
  border-color: var(--brand);
  background: rgba(15,118,110,0.04);
}

.vault-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.vault-dropzone-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.vault-dropzone-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-body);
  margin: 0;
}

.vault-dropzone-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.vault-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.vault-divider::before,
.vault-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.vault-url-row {
  display: flex;
  gap: var(--space-2);
}

.vault-url-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 10px var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-body);
  background: var(--bg-surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.vault-url-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.vault-url-input::placeholder { color: var(--text-muted); }

.vault-upload-status {
  font-size: 0.8125rem;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  display: none;
  line-height: 1.5;
}

.vault-upload-status.info  { background: #EFF6FF; color: #1D4ED8; display: block; }
.vault-upload-status.error { background: #FEF2F2; color: #DC2626; display: block; }
.vault-upload-status.ok    { background: #ECFDF5; color: #065F46; display: block; }

/* ── Documents panel (right column) ─────────────────────────── */
.vault-docs-col {
  min-width: 0;
}

.vault-doc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.vault-doc-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}

.vault-doc-card:hover { box-shadow: var(--shadow-md); }

.vault-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.vault-doc-body { flex: 1; min-width: 0; }

.vault-doc-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}

.vault-doc-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}

.vault-doc-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.vault-doc-delete:hover {
  color: var(--text-danger);
  background: var(--bg-pill-fail);
}

/* ── Status badge ────────────────────────────────────────────── */
.vault-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vault-status-badge.pending  { background: var(--bg-pill);      color: var(--text-muted); }
.vault-status-badge.indexing { background: #EFF6FF;             color: #1D4ED8; }
.vault-status-badge.ready    { background: var(--bg-pill-pass); color: #065F46; }
.vault-status-badge.error    { background: var(--bg-pill-fail); color: var(--text-danger); }

.vault-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.vault-status-badge.indexing .vault-status-dot {
  animation: vault-pulse 1.2s ease-in-out infinite;
}

@keyframes vault-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Empty state ─────────────────────────────────────────────── */
.vault-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
}

.vault-empty-icon { color: var(--text-muted); margin-bottom: var(--space-3); }

.vault-empty-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 var(--space-1);
}

.vault-empty-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .vault-page    { padding: var(--space-5); }
  .vault-layout  { grid-template-columns: 1fr; }
}

/* ── Voice profile card (dashboard) ─────────────────────────── */
.voice-profile-card .card-header {
  margin-bottom: 14px;
}

.vp-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vp-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vp-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-subtle, #f4f4f5);
  border-radius: 100px;
  overflow: hidden;
}

.vp-bar-fill {
  height: 100%;
  background: var(--brand, #0d7a5f);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.vp-bar-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 28px;
  text-align: right;
}

.vp-card-next {
  font-size: 13px;
  color: var(--text-body);
  margin: 0;
  line-height: 1.5;
}

.vp-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand, #0d7a5f);
  text-decoration: none;
  align-self: flex-start;
}

.vp-card-cta:hover { text-decoration: underline; }
