/* ============================================================
   PAGES.CSS — Estilos específicos por página
   ============================================================ */

/* ──────────────────────────────────────────
   LANDING PAGE
   ────────────────────────────────────────── */

/* Header */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  padding: 0 var(--s8);
  height: 68px;
  display: flex;
  align-items: center;
}

.lp-header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s8);
}

.lp-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  flex-shrink: 0;
}

.lp-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--c-primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
}

.lp-logo-icon svg { width: 20px; height: 20px; color: white; }

.lp-logo-name {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--c-text);
  letter-spacing: -0.04em;
}

.lp-nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
  flex: 1;
  justify-content: center;
}

.lp-nav a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-text-secondary);
  text-decoration: none;
  transition: color var(--t-fast);
}

.lp-nav a:hover { color: var(--c-text); }

.lp-header-cta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-shrink: 0;
}

/* Hero Section */
.lp-hero {
  padding: var(--s20) var(--s8) var(--s16);
  background: linear-gradient(180deg, #F0FDFA 0%, #F8FAFC 100%);
  position: relative;
  overflow: hidden;
}

.lp-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15,118,110,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.lp-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
  align-items: center;
}

.lp-hero-content {
  max-width: 560px;
}

.lp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--c-primary-bg);
  border: 1px solid var(--c-primary-border);
  color: var(--c-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--s5);
}

.lp-hero-badge svg { width: 14px; height: 14px; }

.lp-hero-title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--c-text);
  margin-bottom: var(--s6);
}

.lp-hero-title .highlight {
  color: var(--c-primary);
  position: relative;
}

.lp-hero-subtitle {
  font-size: var(--text-lg);
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s8);
  max-width: 480px;
}

.lp-hero-actions {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
}

.lp-hero-social-proof {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s8);
  padding-top: var(--s8);
  border-top: 1px solid var(--c-border);
}

.lp-hero-avatars {
  display: flex;
}

.lp-hero-avatars .avatar {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
  border: 2px solid white;
  margin-left: -8px;
}

.lp-hero-avatars .avatar:first-child { margin-left: 0; }

.lp-hero-social-text {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
}

.lp-hero-social-text strong {
  color: var(--c-text);
  font-weight: 700;
}

/* Hero Mockup */
.lp-hero-mockup {
  position: relative;
}

.lp-doc-mockup {
  background: white;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--c-border);
  transform: rotate(2deg);
  transition: transform var(--t-slow);
}

.lp-doc-mockup:hover {
  transform: rotate(0deg) scale(1.02);
}

.lp-doc-mockup-header {
  padding: var(--s5) var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s4);
  border-bottom: 1px solid var(--c-border);
}

.lp-doc-logo-circle {
  width: 44px;
  height: 44px;
  background: var(--c-primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: var(--text-sm);
}

.lp-doc-company {
  flex: 1;
}

.lp-doc-company-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--c-text);
}

.lp-doc-company-type {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.lp-doc-num {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  text-align: right;
  font-weight: 600;
}

.lp-doc-banner {
  height: 5px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-light));
}

.lp-doc-body {
  padding: var(--s5) var(--s6);
}

.lp-doc-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--s3);
}

.lp-doc-client-label {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s2);
}

.lp-doc-client-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--c-text);
  margin-bottom: var(--s5);
}

.lp-doc-items {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s5);
}

.lp-doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s3) var(--s4);
  background: var(--c-bg);
  border-radius: var(--r-md);
  font-size: var(--text-xs);
}

.lp-doc-item-name { font-weight: 600; color: var(--c-text); }
.lp-doc-item-qty  { color: var(--c-text-muted); }
.lp-doc-item-price { font-weight: 700; color: var(--c-text); }

.lp-doc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s4) var(--s4);
  background: var(--c-primary-bg);
  border-radius: var(--r-md);
  margin-bottom: var(--s4);
  border: 1px solid var(--c-primary-border);
}

.lp-doc-total-label { font-weight: 700; color: var(--c-primary); font-size: var(--text-sm); }
.lp-doc-total-value { font-weight: 900; color: var(--c-primary); font-size: var(--text-xl); letter-spacing: -0.04em; }

.lp-doc-floating-badge {
  position: absolute;
  top: -16px;
  right: -16px;
  background: var(--c-success);
  color: white;
  border-radius: var(--r-2xl);
  padding: var(--s3) var(--s4);
  font-size: var(--text-xs);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--s2);
  animation: float 3s ease-in-out infinite;
}

.lp-doc-floating-badge-2 {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  padding: var(--s3) var(--s4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--c-text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--s2);
  animation: float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Sections common */
.lp-section {
  padding: var(--s20) var(--s8);
}

.lp-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.lp-section-header {
  text-align: center;
  margin-bottom: var(--s16);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.lp-section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--c-primary-bg);
  border: 1px solid var(--c-primary-border);
  color: var(--c-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--s1) var(--s4);
  border-radius: var(--r-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--s4);
}

.lp-section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--c-text);
  margin-bottom: var(--s4);
}

.lp-section-subtitle {
  font-size: var(--text-lg);
  color: var(--c-text-secondary);
  line-height: 1.7;
}

/* Before/After */
.lp-before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--s6);
  align-items: start;
}

.lp-before-card {
  background: #FEF2F2;
  border: 1.5px solid var(--c-danger-border);
  border-radius: var(--r-xl);
  padding: var(--s6);
}

.lp-after-card {
  background: var(--c-primary-bg);
  border: 1.5px solid var(--c-primary-border);
  border-radius: var(--r-xl);
  padding: var(--s6);
}

.lp-ba-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s4);
}

.lp-before-card .lp-ba-label { color: var(--c-danger); }
.lp-after-card .lp-ba-label  { color: var(--c-primary); }

.lp-ba-items {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.lp-ba-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
}

.lp-ba-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.lp-before-card .lp-ba-item svg { color: var(--c-danger); }
.lp-after-card .lp-ba-item svg { color: var(--c-success); }

.lp-vs {
  width: 48px;
  height: 48px;
  background: var(--c-bg-alt);
  border: 1.5px solid var(--c-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  flex-shrink: 0;
  align-self: center;
}

/* Features grid */
.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s5);
}

.lp-feature-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s6);
  transition: all var(--t-base);
}

.lp-feature-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.lp-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s4);
}

.lp-feature-icon svg { width: 24px; height: 24px; }

.lp-feature-title {
  font-weight: 700;
  color: var(--c-text);
  font-size: var(--text-base);
  margin-bottom: var(--s2);
}

.lp-feature-desc {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* Nichos */
.lp-niches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--s4);
}

.lp-niche-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s5);
  text-align: center;
  transition: all var(--t-base);
  cursor: pointer;
}

.lp-niche-card:hover {
  border-color: var(--c-primary);
  background: var(--c-primary-bg);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.lp-niche-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s3);
  font-size: 1.75rem;
}

.lp-niche-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-text);
}

/* How it works */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s6);
  position: relative;
}

.lp-step-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
}

.lp-step-num {
  width: 56px;
  height: 56px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: var(--text-lg);
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}

.lp-step-title {
  font-weight: 700;
  color: var(--c-text);
  font-size: var(--text-sm);
}

.lp-step-desc {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* Pricing */
.lp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  align-items: start;
}

/* FAQ */
.lp-faq-grid {
  max-width: 800px;
  margin: 0 auto;
}

/* Footer */
.lp-footer {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: var(--s16) var(--s8) var(--s8);
}

.lp-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.lp-footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s12);
  margin-bottom: var(--s12);
}

.lp-footer-brand-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(148,163,184,0.8);
  margin-top: var(--s4);
  max-width: 280px;
}

.lp-footer-col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148,163,184,0.6);
  margin-bottom: var(--s4);
}

.lp-footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.lp-footer-links a {
  font-size: var(--text-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color var(--t-fast);
}

.lp-footer-links a:hover { color: white; }

.lp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}

.lp-footer-copyright {
  font-size: var(--text-xs);
  color: rgba(148,163,184,0.6);
}

.lp-footer-socials {
  display: flex;
  gap: var(--s3);
}

.lp-footer-social-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text);
  transition: all var(--t-fast);
  cursor: pointer;
  text-decoration: none;
}

.lp-footer-social-btn:hover {
  background: rgba(255,255,255,0.16);
  color: white;
}

.lp-footer-social-btn svg { width: 16px; height: 16px; }

/* ──────────────────────────────────────────
   AUTH PAGES
   ────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: linear-gradient(135deg, #0C1829 0%, #0F3D38 100%);
  padding: var(--s12);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15,118,110,0.2) 0%, transparent 70%);
}

.auth-left-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  margin-bottom: var(--s12);
}

.auth-left-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-left-title {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: white;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--s5);
}

.auth-left-title .highlight { color: var(--c-primary-light); }

.auth-left-desc {
  font-size: var(--text-base);
  color: rgba(148,163,184,0.9);
  line-height: 1.7;
  margin-bottom: var(--s8);
}

.auth-perks {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.auth-perk {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--text-sm);
  color: rgba(203,213,225,0.9);
}

.auth-perk-icon {
  width: 36px;
  height: 36px;
  background: rgba(15,118,110,0.3);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary-light);
  flex-shrink: 0;
}

.auth-perk-icon svg { width: 18px; height: 18px; }

.auth-right {
  padding: var(--s12) var(--s10);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

.auth-form-wrapper {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auth-form-title {
  font-size: var(--text-3xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: var(--s2);
}

.auth-form-subtitle {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--s8);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin: var(--s4) 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.auth-divider-text {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  font-weight: 600;
}

.auth-footer {
  margin-top: var(--s6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}

.auth-footer a {
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ──────────────────────────────────────────
   ONBOARDING
   ────────────────────────────────────────── */
.onboarding-layout {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--c-primary-bg) 0%, var(--c-bg) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s8);
}

.onboarding-header {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s10);
}

.onboarding-progress {
  width: 100%;
  max-width: 720px;
  margin-bottom: var(--s8);
}

.onboarding-card {
  background: white;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 720px;
  overflow: hidden;
}

.onboarding-card-header {
  padding: var(--s8) var(--s10) var(--s6);
  border-bottom: 1px solid var(--c-border);
}

.onboarding-card-body {
  padding: var(--s8) var(--s10);
}

.onboarding-card-footer {
  padding: var(--s5) var(--s10);
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ──────────────────────────────────────────
   DASHBOARD METRICS GRID
   ────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s5);
  margin-bottom: var(--s8);
}

/* ──────────────────────────────────────────
   DOCUMENTOS HUB
   ────────────────────────────────────────── */
.documents-page {
  display: grid;
  gap: var(--s6);
}

.document-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.document-hub-card {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-width: 0;
  padding: var(--s5);
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
}

.document-hub-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  flex-shrink: 0;
}

.document-hub-icon svg,
.document-hub-icon [data-lucide] {
  width: 21px;
  height: 21px;
}

.document-hub-icon-quotes { background: var(--c-primary-bg); color: var(--c-primary); }
.document-hub-icon-os { background: var(--c-danger-bg); color: #E91E63; }
.document-hub-icon-receipts { background: #F3E8FF; color: #9333EA; }

.document-hub-content {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.document-hub-content strong {
  color: var(--c-text);
  font-size: var(--text-sm);
}

.document-hub-content small {
  color: var(--c-text-muted);
  font-size: var(--text-xs);
}

.document-hub-card > svg,
.document-hub-card > [data-lucide] {
  width: 18px;
  height: 18px;
  color: var(--c-text-muted);
}

.document-section {
  display: grid;
  gap: var(--s3);
}

.document-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.document-section-header h2 {
  margin: 0;
  color: var(--c-text);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.document-section-header p {
  margin: var(--s1) 0 0;
  color: var(--c-text-muted);
  font-size: var(--text-sm);
}

.document-list-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.document-list-card {
  display: grid;
  gap: var(--s3);
  padding: var(--s4);
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
}

.document-list-card-footer {
  align-items: flex-start;
}

.document-list-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ──────────────────────────────────────────
   ORCAMENTO NOVO - Two Column Layout
   ────────────────────────────────────────── */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: var(--s6);
  align-items: start;
  min-height: 0;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  min-width: 0;
}

.editor-section {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.editor-section-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  background: white;
  transition: background var(--t-fast);
  user-select: none;
}

.editor-section-header:hover {
  background: var(--c-bg);
}

.editor-section-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.editor-section-icon svg { width: 16px; height: 16px; }

.editor-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-text);
  flex: 1;
}

.editor-section-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-text-muted);
}

.editor-section-body {
  padding: var(--s5);
}

.editor-section.collapsed .editor-section-body {
  display: none;
}

.editor-preview-sticky {
  position: sticky;
  top: calc(var(--topbar-height) + var(--s4));
}

.editor-preview-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.editor-preview-header {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-preview-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-text);
}

.editor-preview-body {
  padding: var(--s4);
  max-height: 70vh;
  overflow-y: auto;
}

/* Bottom bar fixo */
.editor-bottom-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--c-border);
  padding: var(--s4) var(--s8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  flex-wrap: wrap;
}

.editor-bottom-left {
  display: flex;
  align-items: center;
  gap: var(--s4);
}

.editor-total-label {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}

.editor-total-value {
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--c-primary);
  letter-spacing: -0.04em;
}

.editor-bottom-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

/* ──────────────────────────────────────────
   GESTÃO - CHARTS
   ────────────────────────────────────────── */
.chart-placeholder {
  background: var(--c-bg);
  border-radius: var(--r-lg);
  height: 200px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  overflow: hidden;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  gap: var(--s3);
  min-height: 0;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s3);
  color: var(--c-text-muted);
  font-size: var(--text-xs);
  text-align: center;
}

.chart-bar {
  flex: 1;
  background: var(--c-primary);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  opacity: 0.7;
  transition: opacity var(--t-fast), transform var(--t-fast);
  max-width: none;
  position: relative;
}

.chart-bar:hover {
  opacity: 1;
  transform: scaleY(1.02);
  transform-origin: bottom;
}

.chart-bar::before {
  display: none;
}

.chart-donut {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.chart-donut svg {
  transform: rotate(-90deg);
}

.chart-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ──────────────────────────────────────────
   CLIENTE DETALHE
   ────────────────────────────────────────── */
.client-detail-header {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s8);
  display: flex;
  align-items: center;
  gap: var(--s6);
  margin-bottom: var(--s6);
  box-shadow: var(--shadow-sm);
}

.client-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  padding-top: var(--s6);
  border-top: 1px solid var(--c-border);
  margin-top: var(--s4);
  width: 100%;
}

.client-stat {
  text-align: center;
}

.client-stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.04em;
}

.client-stat-label {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  font-weight: 600;
}

/* ──────────────────────────────────────────
   MODELOS PAGE
   ────────────────────────────────────────── */
.modelo-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.modelo-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Linha superior: ícone + nome/badges lado a lado */
.modelo-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}

.modelo-card-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--c-primary-bg);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modelo-card-icon svg {
  width: 18px;
  height: 18px;
}

.modelo-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modelo-card-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
  margin: 0;
}

.modelo-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}

/* Corpo */
.modelo-card-desc {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  margin: 0;
}

/* Metadados */
.modelo-card-stats {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-xs);
  color: var(--c-text-secondary);
  font-weight: 500;
}

/* Rodapé de ações */
.modelo-card-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  padding-top: var(--s3);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

/* Legacy/unused – mantidos para compatibilidade */
.modelo-card-preview { display: none; }
.modelo-card-body    { padding: 0; }
.modelo-card-tags    { display: flex; flex-wrap: wrap; gap: var(--s2); }
.modelo-tag {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--c-text-muted);
}

.modelo-card-thumb { min-height: 0; }

.template-suggestions {
  display: grid;
  gap: 6px;
  margin-top: var(--s2);
}

.template-suggestions span {
  color: var(--c-text-muted);
  font-size: var(--text-xs);
  line-height: 1.35;
}

.template-suggestions span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--c-primary);
}

[data-theme="dark"] .modelo-card {
  background: #111c2f;
  border-color: #273449;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .modelo-card:hover {
  border-color: #14b8a6;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .modelo-card-name {
  color: #e2e8f0;
}

[data-theme="dark"] .modelo-card-desc {
  color: #94a3b8;
}

[data-theme="dark"] .modelo-card-stats {
  color: #cbd5e1;
}

[data-theme="dark"] .modelo-card-actions {
  border-top-color: #273449;
}

[data-theme="dark"] .modelo-card-icon {
  background: rgba(20, 184, 166, 0.14);
  color: #2dd4bf;
}

/* ──────────────────────────────────────────
   CATÁLOGO
   ────────────────────────────────────────── */
.catalog-filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s5);
}

.catalog-filter-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0;
}

.catalog-filter-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  align-items: center;
  gap: var(--s2);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s5);
}

.catalog-card,
.catalog-item-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.catalog-card:hover,
.catalog-item-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Linha superior: ícone + nome/categoria lado a lado */
.catalog-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}

.catalog-card-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--c-primary-bg);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-card-icon svg,
.catalog-card-icon [data-lucide] {
  width: 18px;
  height: 18px;
}

.catalog-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalog-card-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}

/* Corpo */
.catalog-card-desc {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  margin: 0;
}

/* Preço */
.catalog-card-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--s1);
}

.catalog-card-price {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.04em;
}

.catalog-card-unit {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  font-weight: 500;
}

/* Rodapé de ações */
.catalog-card-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  padding-top: var(--s3);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

[data-theme="dark"] .catalog-card,
[data-theme="dark"] .catalog-item-card {
  background: #111c2f;
  border-color: #273449;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .catalog-card:hover,
[data-theme="dark"] .catalog-item-card:hover {
  border-color: #2f5e75;
  background: #0f1a2d;
}

[data-theme="dark"] .catalog-card-name {
  color: #e2e8f0;
}

[data-theme="dark"] .catalog-card-desc,
[data-theme="dark"] .catalog-card-unit {
  color: #94a3b8;
}

[data-theme="dark"] .catalog-card-actions {
  border-top-color: #273449;
}

/* ──────────────────────────────────────────
   VISUALIZAR DOCUMENTO (client view)
   ────────────────────────────────────────── */
.doc-view-layout {
  min-height: 100vh;
  background: var(--c-bg-alt);
  padding: var(--s8);
}

.doc-view-topbar {
  max-width: 780px;
  margin: 0 auto var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}

.doc-view-actions {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}

.doc-a4 {
  max-width: 780px;
  margin: 0 auto;
  background: white;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.doc-a4-header {
  padding: var(--s10) var(--s12);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s8);
}

.doc-a4-body {
  padding: 0 var(--s12) var(--s10);
}

.doc-a4-section {
  padding: var(--s6) 0;
  border-bottom: 1px solid var(--c-border);
}

.doc-a4-section:last-child { border-bottom: none; }

/* Client accept bar */
.doc-accept-bar {
  max-width: 780px;
  margin: var(--s6) auto 0;
  background: white;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--s6) var(--s8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  border: 1px solid var(--c-border);
  flex-wrap: wrap;
}

/* ──────────────────────────────────────────
   MINHA EMPRESA & CONFIG
   ────────────────────────────────────────── */
.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s6);
  align-items: start;
}

.settings-nav {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--topbar-height) + var(--s4));
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  color: var(--c-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  border-bottom: 1px solid var(--c-border);
}

.settings-nav-item:last-child { border-bottom: none; }

.settings-nav-item:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.settings-nav-item.active {
  background: var(--c-primary-bg);
  color: var(--c-primary);
  font-weight: 600;
}

.settings-nav-item svg, .settings-nav-item [data-lucide] {
  width: 15px; height: 15px; flex-shrink: 0;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

/* ──────────────────────────────────────────
   HELP PAGE
   ────────────────────────────────────────── */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s5);
}

.help-item-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s6);
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  display: flex;
  gap: var(--s4);
  box-shadow: var(--shadow-xs);
}

.help-item-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.help-item-icon {
  width: 44px;
  height: 44px;
  background: var(--c-primary-bg);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  flex-shrink: 0;
}

.help-item-icon svg { width: 22px; height: 22px; }

.help-item-title {
  font-weight: 700;
  color: var(--c-text);
  font-size: var(--text-sm);
  margin-bottom: var(--s1);
}

.help-item-desc {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .recibos-mobile-card {
    padding: .6rem .7rem;
    gap: .4rem;
    min-height: auto;
  }

  .recibos-mobile-card .mobile-card-header {
    margin-bottom: 0;
    min-height: 0;
    justify-content: flex-end;
  }

  .recibos-mobile-card .mobile-card-body {
    gap: .2rem;
    padding-top: 0;
    padding-bottom: 0;
  }

  .recibos-mobile-card .mobile-card-footer {
    padding-top: .35rem;
    margin-top: .2rem;
  }

  .recibos-mobile-card .action-btns .btn {
    min-height: 30px;
    padding: .25rem .45rem;
  }
}
