/* ═══════════════════════════════════════════════════════════════════
   SocialOS — App Stylesheet (v2 redesign)
   "Aurora console" — deep-space dark, indigo→violet aurora accents,
   glass surfaces, one adaptive layout: bottom tab bar on mobile,
   fixed sidebar on desktop. No frameworks, no CDN dependencies.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design tokens ────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg-primary:   #06060B;
  --bg-surface:   #0D0D16;
  --bg-card:      #12121E;
  --bg-elevated:  #1A1A2C;
  --bg-border:    rgba(148, 156, 255, 0.12);
  --bg-border-strong: rgba(148, 156, 255, 0.24);

  /* Accents */
  --accent:        #6E7BFF;
  --accent-hover:  #5865F2;
  --accent-2:      #A855F7;
  --accent-3:      #22D3EE;
  --grad-accent:   linear-gradient(135deg, #6E7BFF 0%, #A855F7 100%);
  --grad-aurora:   linear-gradient(120deg, #6E7BFF 0%, #A855F7 45%, #22D3EE 100%);
  --success:       #34D399;
  --warning:       #FBBF24;
  --danger:        #F87171;

  /* Text */
  --text-primary:   #EEF0FF;
  --text-secondary: #9297B8;
  --text-faint:     #5C6080;

  /* Platform colors */
  --linkedin:  #0A66C2;
  --facebook:  #1877F2;
  --instagram: linear-gradient(45deg, #E1306C, #833AB4);
  --reddit:    #FF4500;

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows / glows */
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 16px 40px rgba(0, 0, 0, 0.55);
  --glow-accent: 0 0 24px rgba(110, 123, 255, 0.35);

  /* Layout */
  --nav-height: 64px;
  --sidebar-width: 236px;
  --content-max: 1080px;

  /* Safe areas */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ────────────────────────────────────────────────────────── */

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

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

img { max-width: 100%; height: auto; }

::selection { background: rgba(110, 123, 255, 0.35); }

/* Slim, theme-matched scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--bg-elevated) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── App shell ────────────────────────────────────────────────────── */

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.screen {
  display: none;
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  padding-bottom: calc(var(--nav-height) + var(--space-lg) + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: block;
  animation: screen-in 0.28s ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Every screen holds exactly one content div — center it */
.screen > div {
  max-width: 640px;
  margin: 0 auto;
}

/* Full-bleed screens (landing) manage their own width */
.screen-full { padding: 0; }
.screen-full > div { max-width: none; }

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION — bottom glass bar (mobile) / fixed sidebar (desktop)
   ═══════════════════════════════════════════════════════════════════ */

#main-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 18, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--bg-border);
  padding-bottom: var(--safe-bottom);
}

.nav-brand { display: none; }

.nav-tabs {
  display: flex;
  width: 100%;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 0 8px;
  color: var(--text-secondary);
  font-size: 0.625rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s;
  border: none;
  background: transparent;
  position: relative;
  min-height: var(--nav-height);
}

.nav-tab-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
}

.nav-tab-icon svg { width: 100%; height: 100%; }

.nav-tab.active { color: var(--text-primary); }

.nav-tab.active .nav-tab-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(110, 123, 255, 0.6));
}

/* Active indicator: bar above the icon on mobile */
.nav-tab::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-accent);
  transition: transform 0.25s ease;
}

.nav-tab.active::after { transform: translateX(-50%) scaleX(1); }

.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 20px);
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--bg-primary);
}

/* ── Desktop: sidebar ──────────────────────────────────────────────── */

@media (min-width: 1024px) {
  #main-nav {
    top: 0;
    right: auto;
    width: var(--sidebar-width);
    border-top: none;
    border-right: 1px solid var(--bg-border);
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-xl);
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
  }

  .nav-brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: var(--glow-accent);
  }

  .nav-brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
  }

  .nav-brand-name em {
    font-style: normal;
    background: var(--grad-aurora);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .nav-tabs {
    flex-direction: column;
    gap: 4px;
  }

  .nav-tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 12px;
    min-height: 0;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: color 0.2s, background 0.2s;
  }

  .nav-tab:hover { color: var(--text-primary); background: rgba(148, 156, 255, 0.06); }

  .nav-tab.active {
    background: rgba(110, 123, 255, 0.12);
    color: var(--text-primary);
  }

  .nav-tab::after {
    top: 50%;
    left: 0;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 22px;
  }

  .nav-tab.active::after { transform: translateY(-50%) scaleY(1); }

  .nav-badge {
    position: static;
    margin-left: auto;
    box-shadow: none;
  }

  /* Push screens right of the sidebar when it's visible */
  body.nav-visible .screen {
    margin-left: var(--sidebar-width);
    padding: var(--space-2xl) var(--space-xl);
  }

  body.nav-visible .screen > div { max-width: var(--content-max); }
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════════ */

.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* Aurora backdrop: drifting glow orbs + faint grid */
.landing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 156, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 156, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

.landing-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  animation: orb-drift 16s ease-in-out infinite alternate;
}

.landing-orb-1 {
  width: 480px; height: 480px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, #6E7BFF 0%, transparent 70%);
}

.landing-orb-2 {
  width: 420px; height: 420px;
  top: 10%; right: -140px;
  background: radial-gradient(circle, #A855F7 0%, transparent 70%);
  animation-delay: -6s;
}

.landing-orb-3 {
  width: 360px; height: 360px;
  top: 46%; left: 30%;
  background: radial-gradient(circle, #22D3EE 0%, transparent 70%);
  opacity: 0.22;
  animation-delay: -11s;
}

@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(48px, 36px) scale(1.12); }
}

.landing-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-2xl);
}

/* Top bar */
.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.landing-logo .nav-brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: var(--glow-accent);
}

.landing-logo em {
  font-style: normal;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Hero */
.landing-hero {
  padding: clamp(48px, 10vh, 120px) 0 clamp(40px, 8vh, 96px);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-border-strong);
  background: rgba(110, 123, 255, 0.08);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
}

.hero-title .grad {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto var(--space-xl);
  color: var(--text-secondary);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.btn-hero {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  box-shadow: var(--glow-accent), 0 8px 24px rgba(110, 123, 255, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--bg-border-strong);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(110, 123, 255, 0.08); }

.hero-note {
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* Platform strip */
.landing-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-bottom: clamp(40px, 8vh, 88px);
}

.landing-platforms .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  width: 100%;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.platform-pill .platform-dot { margin: 0; }

/* Section scaffolding */
.landing-section { padding: clamp(40px, 7vh, 80px) 0; }

.landing-kicker {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.landing-h2 {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.landing-section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--bg-border-strong);
  box-shadow: var(--shadow-elevated);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 123, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(110, 123, 255, 0.12);
  color: var(--accent);
  margin-bottom: var(--space-md);
}

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

.feature-card h3 { margin-bottom: var(--space-xs); font-size: 1.05rem; }

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.step-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  box-shadow: var(--glow-accent);
}

.step-card h3 { margin-bottom: var(--space-xs); }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* Final CTA */
.landing-cta {
  text-align: center;
  padding: clamp(48px, 9vh, 96px) var(--space-lg);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 120% at 50% -20%, rgba(110, 123, 255, 0.18), transparent),
    var(--bg-card);
  margin-bottom: var(--space-2xl);
}

.landing-cta h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.landing-cta p { color: var(--text-secondary); margin-bottom: var(--space-lg); }

.landing-footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.8125rem;
  padding-bottom: var(--space-xl);
}

@media (min-width: 700px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════
   CORE COMPONENTS
   ═══════════════════════════════════════════════════════════════════ */

/* ── Cards ─────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s, border-color 0.2s;
  min-height: 44px;
  min-width: 44px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(110, 123, 255, 0.3);
}
.btn-primary:hover { box-shadow: var(--glow-accent); filter: brightness(1.08); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--bg-border);
}
.btn-secondary:hover { border-color: var(--bg-border-strong); }

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

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

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.4);
}
.btn-danger:hover { border-color: var(--danger); background: rgba(248, 113, 113, 0.08); }

.btn-google {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15);
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}
.btn-google:active {
  background: #f1f3f4;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15);
}
.btn-google svg { flex-shrink: 0; }

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.75rem;
  min-height: 32px;
}

.btn-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ── Inputs ────────────────────────────────────────────────────────── */

.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.18);
}

.input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

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

.post-textarea {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239297B8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.input-row {
  display: flex;
  gap: var(--space-sm);
}

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

/* ── Chips ─────────────────────────────────────────────────────────── */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 36px;
  font-family: var(--font-body);
  text-transform: capitalize;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.chip.selected {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(110, 123, 255, 0.3);
}

.chip-sm {
  padding: 5px 12px;
  font-size: 0.75rem;
  min-height: 28px;
}

/* ── Radio cards ───────────────────────────────────────────────────── */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.radio-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.radio-card.selected,
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(110, 123, 255, 0.08);
}

.radio-card input { display: none; }

.radio-label {
  font-weight: 600;
  margin-bottom: 2px;
}

.radio-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ── Toggle rows ───────────────────────────────────────────────────── */

.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  cursor: pointer;
  font-size: 0.9375rem;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════
   ONBOARDING
   ═══════════════════════════════════════════════════════════════════ */

#screen-onboarding {
  display: none;
  padding: var(--space-lg) var(--space-md);
  padding-bottom: var(--space-xl);
}

#screen-onboarding.active { display: flex; flex-direction: column; }

#screen-onboarding > div {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.ob-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-xl);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.ob-brand .nav-brand-mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: contain;
}

.onboarding-progress {
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 3px;
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--grad-aurora);
  border-radius: 3px;
  transition: width 0.35s ease;
}

.onboarding-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

#onboarding-content h2 {
  margin-bottom: var(--space-sm);
  font-size: 1.6rem;
}

.onboarding-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: 0.9375rem;
}

.onboarding-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
  gap: var(--space-md);
}

.info-box {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.info-box code {
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.test-result {
  margin-top: var(--space-sm);
  font-size: 0.8125rem;
  min-height: 20px;
}

.test-result.success { color: var(--success); }
.test-result.error   { color: var(--danger); }

.completion-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.summary-item .check {
  color: var(--success);
  font-weight: bold;
}

.summary-item .check.pending {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════ */

.dash-header {
  margin-bottom: var(--space-lg);
}

.dash-header h1 {
  margin-bottom: var(--space-xs);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
}

.dash-header .grad {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dash-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.dash-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.dash-card:hover {
  border-color: var(--bg-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.dash-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-glow, var(--grad-accent));
  opacity: 0.7;
}

.card-pending  { --card-glow: linear-gradient(90deg, #FBBF24, #F59E0B); }
.card-content  { --card-glow: linear-gradient(90deg, #6E7BFF, #22D3EE); }
.card-projects { --card-glow: linear-gradient(90deg, #A855F7, #6E7BFF); }
.card-tasks    { --card-glow: linear-gradient(90deg, #34D399, #22D3EE); }

.dash-card-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.card-pending .dash-card-number  { color: var(--warning); }
.card-content .dash-card-number  { color: var(--accent); }
.card-projects .dash-card-number { color: var(--accent-2); }
.card-tasks .dash-card-number    { color: var(--success); }

.dash-card-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Two-column dashboard body on desktop */
.dash-columns { display: block; }

@media (min-width: 1024px) {
  .dash-cards { grid-template-columns: repeat(4, 1fr); }

  .dash-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-md);
    align-items: start;
  }
}

.next-post-card .card-header { margin-bottom: var(--space-sm); }

.post-preview {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.quick-actions h3 { margin-bottom: var(--space-md); }

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .action-grid { grid-template-columns: repeat(3, 1fr); }
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  min-height: 44px;
  font-family: var(--font-body);
}

.action-btn:hover {
  border-color: var(--accent);
  background: rgba(110, 123, 255, 0.06);
  transform: translateY(-1px);
}

.action-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.action-icon svg { width: 100%; height: 100%; }

.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-secondary);
}

.empty-state h2, .empty-state h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

/* ── Platform badges ───────────────────────────────────────────────── */

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.platform-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   APPROVALS
   ═══════════════════════════════════════════════════════════════════ */

.screen-title {
  margin-bottom: var(--space-md);
}

.approval-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 1024px) {
  .approval-list { max-width: 720px; }
}

.approval-card .post-text,
.engagement-card .post-text {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-primary);
  padding: var(--space-md);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

.alt-selector {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.alt-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.alt-btn.active {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
}

/* ── Approvals tabs / Engagement ───────────────────────────────────── */

.tab-bar,
.subtab-bar {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  overflow-x: auto;
}

.tab-btn,
.subtab-btn {
  flex: 1;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.subtab-btn {
  font-size: 0.78rem;
  padding: 8px 12px;
}

.tab-btn.active,
.subtab-btn.active {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
}

@media (min-width: 1024px) {
  .tab-btn, .subtab-btn { flex: 0 0 auto; padding-inline: 24px; }
}

.tab-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
}

.engagement-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.engagement-card .card-header {
  flex-wrap: wrap;
}

.card-actions .btn-success {
  margin-left: auto;
}

/* ── Edit view ─────────────────────────────────────────────────────── */

.edit-view, .publish-flow, .detail-view, .add-content-view {
  max-width: 640px;
}

.edit-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.edit-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ── Publish flow ──────────────────────────────────────────────────── */

.publish-flow {
  text-align: center;
  padding-top: var(--space-xl);
}

.publish-flow h2 {
  color: var(--success);
  margin-bottom: var(--space-sm);
}

.post-preview-box {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 250px;
  overflow-y: auto;
  margin: var(--space-md) 0;
}

/* ═══════════════════════════════════════════════════════════════════
   CONTENT LIBRARY
   ═══════════════════════════════════════════════════════════════════ */

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Row of media source buttons (device, Drive, Photos, URL, note) */
.source-bar {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  padding-bottom: 2px;
}

.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.source-btn:hover {
  border-color: var(--accent);
  background: rgba(110, 123, 255, 0.08);
}

.source-btn svg { width: 16px; height: 16px; color: var(--accent); }

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.content-card {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.content-card:hover {
  border-color: var(--bg-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

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

.content-thumb {
  position: relative;
  width: calc(100% + var(--space-md) * 2);
  margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) var(--space-sm);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  background: var(--bg-surface);
}

.content-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.content-card:hover .content-thumb img { transform: scale(1.04); }

.face-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(6, 6, 11, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-full);
  padding: 2px 6px;
  font-size: 0.8125rem;
}

.detail-thumb {
  width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-sm) 0;
  display: block;
}

.face-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--warning);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.8125rem;
  margin-bottom: var(--space-md);
}

.content-title { margin-bottom: var(--space-xs); }

.content-desc {
  font-size: 0.8125rem;
  margin-bottom: var(--space-sm);
}

.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-sm);
}

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

.content-platforms {
  display: flex;
  gap: 4px;
}

.rating-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rating-high   { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.rating-medium { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.rating-low    { background: rgba(146, 151, 184, 0.15); color: var(--text-secondary); }
.rating-skip   { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

.source-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

/* ── Content detail ────────────────────────────────────────────────── */

.detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  flex-wrap: wrap;
}

.detail-section {
  margin-bottom: var(--space-md);
}

.detail-section h4 {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section li {
  padding: var(--space-xs) 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.detail-section li::before {
  content: '→ ';
  color: var(--accent);
}

.content-platforms-detail {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.detail-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════════════
   CALENDAR
   ═══════════════════════════════════════════════════════════════════ */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.cal-month {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.calendar-grid {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bg-border);
}

.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-surface);
}

.cal-day-name {
  text-align: center;
  padding: var(--space-sm);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--bg-border);
}

.cal-day {
  padding: var(--space-sm);
  min-height: 60px;
  position: relative;
}

@media (min-width: 1024px) {
  .cal-day { min-height: 84px; }
}

.cal-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cal-day.today .cal-date {
  color: var(--accent);
  font-weight: 700;
}

.cal-day.has-posts {
  background: rgba(110, 123, 255, 0.05);
}

.cal-slot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  display: inline-block;
  margin-right: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════════════ */

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (min-width: 1024px) {
  #settings-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    align-items: start;
  }
  #settings-content > .screen-title { grid-column: 1 / -1; margin-bottom: 0; }
  .settings-section { margin-bottom: 0; }
}

.settings-section h3 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--bg-border);
}

.connection-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.connection-status.connected {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.connection-status.disconnected {
  background: rgba(146, 151, 184, 0.15);
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════
   OVERLAYS
   ═══════════════════════════════════════════════════════════════════ */

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

#toast-container {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
  width: calc(100% - var(--space-lg) * 2);
  max-width: 400px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-elevated);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-info    { background: rgba(18, 18, 30, 0.92); color: var(--text-primary); border: 1px solid var(--bg-border-strong); }
.toast-success { background: rgba(52, 211, 153, 0.14); color: var(--success); border: 1px solid var(--success); }
.toast-error   { background: rgba(248, 113, 113, 0.14); color: var(--danger); border: 1px solid var(--danger); }
.toast-warning { background: rgba(251, 191, 36, 0.14); color: var(--warning); border: 1px solid var(--warning); }

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

#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 11, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  flex-direction: column;
  gap: var(--space-md);
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-message {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── Bottom sheet ──────────────────────────────────────────────────── */

#bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.3s;
}

#bottom-sheet.open {
  background: rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

#bottom-sheet-content {
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--bg-border-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#bottom-sheet.open #bottom-sheet-content {
  transform: translateY(0);
}

/* Desktop: bottom sheet becomes a centered modal */
@media (min-width: 1024px) {
  #bottom-sheet { align-items: center; }

  #bottom-sheet-content {
    max-width: 440px;
    border: 1px solid var(--bg-border-strong);
    border-radius: var(--radius-lg);
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: var(--shadow-elevated);
  }

  #bottom-sheet.open #bottom-sheet-content {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ── Feedback FAB (persistent entry point, self-healing loop) ───────── */

.feedback-fab {
  position: fixed;
  right: var(--space-md);
  bottom: calc(var(--space-md) + var(--safe-bottom));
  z-index: 150;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: var(--grad-accent);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-elevated);
  transition: transform 0.2s;
}

.feedback-fab:hover { transform: scale(1.06); }

.feedback-fab svg { width: 22px; height: 22px; }

/* Sit above the mobile bottom nav when it's visible */
body.nav-visible .feedback-fab {
  bottom: calc(var(--nav-height) + var(--space-md) + var(--safe-bottom));
}

/* Desktop: nav is a left sidebar, not a bottom bar — no offset needed */
@media (min-width: 1024px) {
  body.nav-visible .feedback-fab {
    bottom: var(--space-md);
  }
}

.sheet-actions .btn {
  flex: 1;
}

/* ── Text utilities ────────────────────────────────────────────────── */

.text-secondary { color: var(--text-secondary); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════
   PROJECTS / PROGRAM MANAGER
   ═══════════════════════════════════════════════════════════════════ */

.duesoon-card { margin-top: var(--space-md); }
.duesoon-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid var(--bg-border);
  font-size: 0.85rem;
}
.duesoon-row:last-of-type { border-bottom: none; }
.duesoon-title { font-weight: 500; }

.project-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 1024px) {
  .project-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  .project-list .card { margin-bottom: 0; }
}

.project-card { cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.project-card:hover {
  border-color: var(--bg-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}
.project-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.project-name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1rem;
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  background: var(--text-secondary);
}
.priority-high { background: var(--danger); box-shadow: 0 0 8px rgba(248, 113, 113, 0.6); }
.priority-normal { background: var(--accent); }
.priority-low { background: var(--text-secondary); }

.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  white-space: nowrap;
}
.status-active { background: rgba(52, 211, 153, 0.18); color: var(--success); }
.status-on_hold { background: rgba(251, 191, 36, 0.18); color: var(--warning); }
.status-completed { background: rgba(110, 123, 255, 0.18); color: var(--accent); }
.status-archived { background: var(--bg-elevated); color: var(--text-secondary); }

.progress-track {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--grad-aurora);
  border-radius: var(--radius-full);
  transition: width 0.3s;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.project-detail-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}
.project-detail-head h2 { flex: 1; }

.task-board,
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-row,
.milestone-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
}
.task-done .task-title { text-decoration: line-through; opacity: 0.6; }
.task-blocked { border-color: rgba(248, 113, 113, 0.5); }
.milestone-reached { border-color: rgba(52, 211, 153, 0.5); }

.task-check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-border-strong);
  background: transparent;
  color: var(--success);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.task-done .task-check { border-color: var(--success); background: rgba(52, 211, 153, 0.2); }
.task-in_progress .task-check { border-color: var(--accent); }

.task-body,
.milestone-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-title,
.milestone-title { font-size: 0.9rem; }
.task-sub { font-size: 0.72rem; color: var(--text-secondary); display: flex; gap: 4px; flex-wrap: wrap; }
.task-status-label { color: var(--text-primary); opacity: 0.7; }

.btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-elevated); }

.input-date { max-width: 150px; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — tablet width bump for mid-size layouts
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
  .content-grid { grid-template-columns: 1fr 1fr; }

  .screen { padding: var(--space-lg) var(--space-xl); }
  .screen-full { padding: 0; }
  .screen > div { max-width: 768px; }
  .screen-full > div { max-width: none; }
}

@media (min-width: 1024px) {
  .content-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid .card { margin-bottom: 0; }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Content Security — no inline styles for sensitive elements ────── */

/* CSP meta tag in index.html restricts inline scripts.
   All interactive styles are class-driven, not inline. */
