/* Gerador de Recibo — tema próprio (Stripe/Linear-inspired, sem Bootstrap) */
:root {
  --bg: #ffffff;
  --bg-muted: #f5f7fa;
  --text: #0f172a;
  --text-secondary: #64748b;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: rgba(37, 99, 235, 0.08);
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 0 1px rgba(37, 99, 235, 0.12), 0 20px 50px rgba(37, 99, 235, 0.12);
  --gradient-hero: linear-gradient(135deg, #f0f4ff 0%, #f5f7fa 45%, #eef2ff 100%);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --error: #dc2626;
  --success: #059669;
  --surface-elevated: #ffffff;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-muted: #1e293b;
    --surface-elevated: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --brand-soft: rgba(96, 165, 250, 0.15);
    --gradient-hero: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #172554 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 0 1px rgba(96, 165, 250, 0.2), 0 20px 50px rgba(37, 99, 235, 0.15);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.35);
  }
  .site-header {
    background: rgba(15, 23, 42, 0.9);
  }
  .card,
  .price-card,
  .admin-table {
    background: var(--surface-elevated);
  }
  .site-footer {
    background: #020617;
  }
}

@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;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  color: var(--brand-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}
.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.site-logo span {
  color: var(--brand);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}
.site-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.site-nav a:hover {
  color: var(--text);
  background: var(--bg-muted);
}
.site-nav__cta {
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn--primary {
  background: linear-gradient(180deg, #3b82f6 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #60a5fa 0%, var(--brand-hover) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  background: var(--bg-muted);
  border-color: #cbd5e1;
}
.btn--sm {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.hero {
  position: relative;
  padding: 88px 0 96px;
  background: var(--gradient-hero);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55%;
  max-width: 520px;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }
}
.hero__badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 20px;
  color: var(--text);
}
.hero__lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 36rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__visual {
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--border);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 24px;
}

.section {
  padding: 80px 0;
}
.section--muted {
  background: var(--bg-muted);
}
.section__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 12px;
}
.section__subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.0625rem;
}

.grid-3 {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.card:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
}
.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.steps {
  display: grid;
  gap: 32px;
}
@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step {
  text-align: center;
  padding: 16px;
}
.step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
}
.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.pricing-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}
@media (min-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.price-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.2s ease;
}
.price-card--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-glow);
  transform: scale(1.02);
  z-index: 1;
}
.price-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
}
.price-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.price-card .price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 16px 0;
}
.price-card .price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.price-card li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.faq {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
}
.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.site-footer {
  background: var(--text);
  color: #94a3b8;
  padding: 48px 0 32px;
  margin-top: 80px;
}
.site-footer a {
  color: #cbd5e1;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer__grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.site-footer h4 {
  color: #fff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 10px;
}

/* Forms — floating label */
.field {
  position: relative;
  margin-bottom: 20px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 18px 14px 8px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field label {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 1rem;
  color: var(--text-secondary);
  pointer-events: none;
  transition: transform 0.2s ease, font-size 0.2s ease, top 0.2s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px);
  font-size: 0.75rem;
  color: var(--brand);
  top: 6px;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.9375rem;
}
.alert--error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}
.alert--success {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

/* App shell */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-muted);
}
.app-top {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.app-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.app-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.app-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
}
.app-nav a:hover,
.app-nav a.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}
.app-main {
  flex: 1;
  padding: 32px 0 64px;
}

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}
.admin-sidebar {
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 16px;
}
.admin-sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 0.875rem;
  margin-bottom: 4px;
}
.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-content {
  padding: 32px;
  background: var(--bg-muted);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.875rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: var(--bg-muted);
  font-weight: 600;
}

/* Utilities */
.text-center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.prose {
  max-width: 720px;
}
.prose p {
  color: var(--text-secondary);
  margin: 0 0 1em;
}

/* Loading */
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tool-panel {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 640px;
  margin: 0 auto;
}

/* —— Form system (marketing, app, admin) —— */
.form-page {
  padding: var(--space-6) 0 var(--space-6);
}
.form-page--auth {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: stretch;
}
.auth-layout {
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: stretch;
}
@media (min-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr 1fr;
    min-height: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-top: 24px;
    margin-bottom: 48px;
    padding: 0;
  }
  .auth-layout__form {
    background: var(--bg);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .auth-layout__aside {
    background: linear-gradient(160deg, var(--brand) 0%, #1e40af 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
@media (max-width: 899px) {
  .auth-layout__aside {
    order: -1;
    background: var(--brand-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
  }
  .auth-layout__form .card {
    box-shadow: none;
    border: 1px solid var(--border);
  }
}
.auth-aside__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 var(--space-4);
  line-height: 1.2;
}
.auth-aside__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9375rem;
  opacity: 0.95;
}
.auth-aside__list li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
}
.auth-aside__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}
@media (max-width: 899px) {
  .auth-aside__title {
    color: var(--text);
  }
  .auth-aside__list {
    color: var(--text-secondary);
  }
  .auth-aside__list li::before {
    background: var(--brand);
  }
}

.admin-form-card {
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
@media (prefers-color-scheme: dark) {
  .admin-form-card {
    background: var(--surface-elevated);
  }
}
.form-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.form-section__title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}

.field.field--stacked label {
  position: static;
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: auto;
}
.field.field--stacked input,
.field.field--stacked textarea,
.field.field--stacked select {
  padding: 12px 14px;
}
.field.field--invalid input,
.field.field--invalid textarea,
.field.field--invalid select {
  border-color: var(--error);
}
.field-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 6px 0 0;
  line-height: 1.4;
}
.field-error {
  font-size: 0.8125rem;
  color: var(--error);
  margin: 6px 0 0;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--space-3);
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.checkbox-field label {
  position: static;
  font-size: 0.9375rem;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}

.password-field__wrap {
  position: relative;
}
.password-field__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.password-field__toggle:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
.password-field__wrap .field input {
  padding-right: 72px;
}

.pw-strength {
  height: 4px;
  border-radius: 999px;
  background: var(--bg-muted);
  margin-top: 8px;
  overflow: hidden;
}
.pw-strength__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}
.pw-strength__bar.is-1 {
  width: 33%;
  background: var(--error);
}
.pw-strength__bar.is-2 {
  width: 66%;
  background: #d97706;
}
.pw-strength__bar.is-3 {
  width: 100%;
  background: var(--success);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.form-actions .btn--block {
  width: 100%;
}

/* Nav dropdowns */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown__toggle:hover,
.nav-dropdown.is-open .nav-dropdown__toggle {
  color: var(--text);
  background: var(--bg-muted);
}
.nav-dropdown__toggle .caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.nav-dropdown.is-open .nav-dropdown__toggle .caret {
  transform: rotate(180deg);
}
.nav-dropdown__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-width: min(320px, 92vw);
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 100;
  pointer-events: none;
}
.nav-dropdown.is-open .nav-dropdown__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown__panel a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-dropdown__panel a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.nav-dropdown__footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}
.nav-dropdown__footer a {
  font-weight: 600;
  color: var(--brand);
}

/* FAQ accordion */
.faq-accordion {
  max-width: 720px;
  margin: 0 auto;
}
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-item:first-child {
  border-top: 1px solid var(--border);
}
.accordion-trigger,
details.accordion-item > summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.accordion-trigger::-webkit-details-marker,
details.accordion-item > summary::-webkit-details-marker {
  display: none;
}
details.accordion-item > summary::marker {
  content: "";
}
.accordion-trigger .accordion-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.accordion-item[open] .accordion-trigger .accordion-icon,
details.accordion-item[open] summary .accordion-icon {
  transform: rotate(45deg);
}
.accordion-panel {
  padding: 0 0 var(--space-4);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Stats / social proof */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  justify-content: center;
  margin-top: var(--space-5);
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.stat-pill strong {
  display: block;
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}
.stat-pill svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Icon card (SVG) */
.card__icon-svg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.card__icon-svg svg {
  width: 24px;
  height: 24px;
}

/* Hero mockup */
.hero-mockup {
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff 0%, var(--bg-muted) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  padding: var(--space-4);
  min-height: 300px;
  position: relative;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .hero-mockup {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  }
}
.hero-mockup__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.hero-mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
}
.hero-mockup__dot:nth-child(1) {
  background: #f87171;
}
.hero-mockup__dot:nth-child(2) {
  background: #fbbf24;
}
.hero-mockup__dot:nth-child(3) {
  background: #34d399;
}
.hero-mockup__title {
  flex: 1;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.hero-mockup__body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-3);
  align-items: start;
}
@media (max-width: 500px) {
  .hero-mockup__body {
    grid-template-columns: 1fr;
  }
}
.hero-mockup__sidebar {
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  min-height: 160px;
}
.hero-mockup__sidebar span {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  margin-bottom: 10px;
  width: 70%;
}
.hero-mockup__sidebar span:nth-child(2) {
  width: 90%;
}
.hero-mockup__sidebar span:nth-child(3) {
  width: 55%;
}
.hero-mockup__main {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  min-height: 200px;
}
@media (prefers-color-scheme: dark) {
  .hero-mockup__main {
    background: #0f172a;
  }
}
.hero-mockup__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.hero-mockup__row:last-child {
  border-bottom: none;
}
.hero-mockup__badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.6875rem;
}

/* SEO landing layout */
.seo-landing {
  padding: var(--space-5) 0 var(--space-6);
}
.seo-landing__hero {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.seo-landing__hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 var(--space-3);
  line-height: 1.2;
}
.seo-landing__lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 42rem;
}
.seo-landing__grid {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 960px) {
  .seo-landing__grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--space-6);
  }
}
.seo-landing__content.prose {
  max-width: none;
}
.seo-sidebar {
  position: sticky;
  top: 88px;
}
.seo-toc {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.seo-toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}
.seo-toc a {
  display: block;
  font-size: 0.875rem;
  padding: 6px 0;
  color: var(--text-secondary);
  border-bottom: none;
}
.seo-toc a:hover {
  color: var(--brand);
}
.receipt-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
@media (prefers-color-scheme: dark) {
  .receipt-preview {
    background: #0f172a;
  }
}
.receipt-preview__line {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 3px;
  margin-bottom: 8px;
}
.receipt-preview__line--short {
  width: 45%;
}
.receipt-preview__amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: var(--space-3) 0;
}
.seo-cta-bar {
  display: none;
}
@media (max-width: 959px) {
  .seo-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-3) var(--space-4);
    padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    gap: var(--space-3);
    z-index: 40;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
  }
  .seo-cta-bar .btn {
    flex: 1;
    justify-content: center;
  }
  .seo-landing {
    padding-bottom: 88px;
  }
}
@media (prefers-color-scheme: dark) and (max-width: 959px) {
  .seo-cta-bar {
    background: rgba(15, 23, 42, 0.95);
  }
}

/* App: receipt form sections */
.receipt-form .form-section {
  border-bottom: none;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}
.receipt-form .form-section__title {
  color: var(--text);
  font-size: 0.9375rem;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: var(--space-3);
}

/* Progress & chips (dashboard) */
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.progress-bar {
  height: 10px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-hover), var(--brand));
  transition: width 0.35s ease;
}
.progress-bar__fill--success {
  background: linear-gradient(90deg, #059669, #10b981);
}
.progress-bar__fill--warn {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}
.progress-bar__fill--danger {
  background: linear-gradient(90deg, #dc2626, #f87171);
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.chip__icon {
  font-size: 1rem;
  line-height: 1;
}

.dashboard-card h3 {
  margin: 0 0 var(--space-3);
  font-size: 1.0625rem;
}

/* Admin tables */
.admin-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.8);
}
@media (prefers-color-scheme: dark) {
  .admin-table tbody tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.5);
  }
}
.admin-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
