/* ============================
   PATRIMÔNIO ESCRITURAÇÃO
   CSS Global
   ============================ */

:root {
  --primary: #1a5632;
  --primary-light: #2d8a4e;
  --primary-dark: #0f3a20;
  --primary-50: #f0f9f4;
  --primary-100: #d4eddf;
  --accent: #c9992d;
  --accent-light: #f5e6b8;
  --danger: #dc3545;
  --danger-light: #f8d7da;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --whatsapp: #25d366;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #111827;
  --border: #e5e7eb;
  --border-dark: #d1d5db;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

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

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* ====== NAVBAR ====== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-icon { font-size: 1.5rem; }
.logo-highlight { color: var(--primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.nav-links a:hover { color: var(--primary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
  color: white;
}

.btn-outline {
  border-color: var(--border-dark);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.btn-outline-light {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline-light:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: white;
}
.btn-whatsapp:hover {
  background: #20bd5a;
  color: white;
}

.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #c82333;
  color: white;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ====== HERO ====== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #f8faf9 0%, #e8f5e9 50%, #f0f9f4 100%);
  overflow: hidden;
}
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}
.shape-1 {
  width: 600px; height: 600px;
  background: var(--primary);
  top: -200px; right: -100px;
}
.shape-2 {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -100px; left: -100px;
}
.shape-3 {
  width: 200px; height: 200px;
  background: var(--primary-light);
  top: 40%; left: 30%;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: var(--primary-100);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 30px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}
.hero-card-header {
  background: var(--bg-dark);
  padding: 12px 16px;
  display: flex;
  gap: 6px;
}
.hero-card-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.hero-card-dot.green { background: #10b981; }
.hero-card-dot.yellow { background: #f59e0b; }
.hero-card-dot.red { background: #ef4444; }
.hero-card-body { padding: 24px; }
.hero-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.hero-card-item:last-child { border-bottom: none; }
.hero-card-item.done { color: var(--text); }
.hero-card-item.done .check {
  color: var(--success);
  font-weight: bold;
  font-size: 1.1rem;
}
.hero-card-item.active {
  color: var(--primary);
  font-weight: 600;
}
.pulse {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(26,86,50,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(26,86,50,0); }
  100% { box-shadow: 0 0 0 0 rgba(26,86,50,0); }
}
.pending { color: var(--text-light); }
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-arrow {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--primary);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ====== SECTIONS ====== */
.section { padding: 80px 0; }
.section-light { background: var(--bg); }
.section-dark { background: var(--bg-dark); color: white; }
.section-accent {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
}
.section-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 80px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--primary-100);
  color: var(--primary);
  margin-bottom: 12px;
}
.section-tag.light {
  background: rgba(255,255,255,0.15);
  color: white;
}
.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.section-subtitle.light { color: rgba(255,255,255,0.8); }

/* Problems */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.problem-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
}
.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--danger);
}
.problem-icon { font-size: 2.5rem; margin-bottom: 16px; }
.problem-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.problem-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.service-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: var(--transition);
  position: relative;
}
.service-card.featured {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}
.service-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.15);
}
.service-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light);
  color: white;
  margin-bottom: 16px;
}
.service-badge.accent {
  background: var(--accent);
}
.service-icon { font-size: 2.5rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.service-card p { font-size: 0.9rem; opacity: 0.85; margin-bottom: 16px; }
.service-list {
  list-style: none;
  margin-bottom: 20px;
}
.service-list li {
  padding: 6px 0;
  font-size: 0.88rem;
  opacity: 0.9;
  padding-left: 20px;
  position: relative;
}
.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--whatsapp);
  font-weight: bold;
}
.service-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.price-label { font-size: 0.85rem; opacity: 0.7; }
.price-value { font-size: 1.8rem; font-weight: 800; }
.price-value.small { font-size: 1.2rem; }
.service-delivery {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Steps */
.steps-container {
  max-width: 700px;
  margin: 0 auto;
}
.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.step-number {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
}
.step-content {
  flex: 1;
  padding-bottom: 10px;
}
.step-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
}
.step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.step-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}
.step-connector {
  width: 2px;
  height: 30px;
  background: var(--primary-100);
  margin-left: 23px;
}

/* Value Grid */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.value-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.value-card:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.value-icon { font-size: 2rem; margin-bottom: 12px; }
.value-card h3 { font-size: 1rem; margin-bottom: 8px; }
.value-card p { font-size: 0.88rem; opacity: 0.85; }

/* Documents Grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.doc-item:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}
.doc-icon { font-size: 1.5rem; }

/* ── CARROSSEL DE DEPOIMENTOS ─────────────────────────────── */
.testimonials-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2.5rem;
}
.carousel-track-wrapper {
  overflow: hidden;
  flex: 1;
}
.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.testimonial-card {
  /* largura definida por JS com base no wrapper */
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
  transition: box-shadow 0.25s, transform 0.25s;
}
.testimonial-card:hover {
  box-shadow: 0 8px 32px rgba(26,86,50,.12);
  transform: translateY(-3px);
}
.testimonial-stars {
  color: #f5a623;
  font-size: 1.1rem;
  letter-spacing: 2px;
}
.testimonial-text {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}
.testimonial-author span {
  font-size: 0.82rem;
  color: var(--text-muted, #9ca3af);
}
.carousel-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  line-height: 1;
  user-select: none;
}
.carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,86,50,.25);
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1.5rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}
@media (max-width: 600px) {
  .testimonials-carousel { gap: 6px; }
  .testimonial-card { padding: 1.5rem; }
  .carousel-btn { width: 36px; height: 36px; font-size: 1.3rem; }
}

/* FAQ */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  background: white;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: var(--transition);
}
.faq-question:hover { background: var(--bg-light); }
.faq-arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer p {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA */
.section-cta h2 { font-size: 2rem; margin-bottom: 12px; }
.section-cta p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.contact-card {
  text-align: center;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: white;
  transition: var(--transition);
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.contact-icon { font-size: 2.5rem; margin-bottom: 12px; }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { margin-bottom: 16px; color: var(--text-muted); font-size: 0.9rem; }

/* Footer */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  opacity: 0.7;
  max-width: 350px;
}
.footer-links h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: var(--transition);
  animation: float 3s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ====== AUTH PAGES ====== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f9f4, #e8f5e9);
}
.auth-container {
  width: 100%;
  max-width: 440px;
  padding: 20px;
}
.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}
.auth-card h2 {
  text-align: center;
  margin-bottom: 4px;
  font-size: 1.5rem;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.auth-form { margin-top: 20px; }
.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-footer p { margin: 8px 0; }

/* ====== FORMS ====== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,50,0.1);
}
.form-control::placeholder { color: var(--text-light); }
.form-control-sm { padding: 6px 10px; font-size: 0.8rem; }
.form-control-file {
  width: 100%;
  padding: 8px;
  font-size: 0.88rem;
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius);
  background: var(--bg-light);
  cursor: pointer;
}
.form-control-file:hover { border-color: var(--primary); }
textarea.form-control { resize: vertical; }
select.form-control { cursor: pointer; }
.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
}

/* Alerts */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.alert-success {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid var(--success);
}

/* ====== APP LAYOUT ====== */
.app-body { background: var(--bg-light); }
.app-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-nav {
  background: var(--bg-dark);
  color: white;
}
.admin-nav .logo { color: white; }
.admin-nav .logo:hover { color: white; }
.admin-nav .nav-user { color: rgba(255,255,255,0.7); }
.admin-nav .btn-outline {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
}
.admin-nav .btn-outline:hover {
  border-color: white;
  color: white;
  background: rgba(255,255,255,0.1);
}
.admin-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}
.admin-menu a {
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}
.admin-menu a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-user { font-size: 0.88rem; color: var(--text-muted); }

.app-main { padding: 30px 0 60px; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header h1 { font-size: 1.6rem; margin-top: 8px; }

/* ====== CARDS ====== */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-success { border-color: var(--success); background: var(--success-light); }
.card-actions { border-color: var(--primary); border-width: 2px; }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 { font-size: 1rem; margin: 0; }
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-light);
}

/* ====== STEPPER ====== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  padding: 20px 0;
}
.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.stepper-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}
.stepper-item.active .stepper-circle {
  background: var(--primary);
  color: white;
}
.stepper-item.completed .stepper-circle {
  background: var(--success);
  color: white;
}
.stepper-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stepper-item.active span { color: var(--primary); font-weight: 700; }
.stepper-item.completed span { color: var(--success); }
.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 24px;
  max-width: 80px;
}

/* Form Steps */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Document Upload */
.document-upload-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.document-upload-item:last-child { border-bottom: none; }
.btn-remove-doc {
  align-self: center;
  margin-top: 20px;
}

/* ====== REQUESTS GRID ====== */
.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.request-card {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  color: var(--text);
}
.request-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  color: var(--text);
}
.request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.protocol { font-weight: 700; font-size: 0.9rem; }
.request-address {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.request-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-light);
}
.request-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge.large { font-size: 0.9rem; padding: 8px 18px; }
.status-badge.small { font-size: 0.72rem; padding: 3px 8px; }
.status-pending { background: var(--warning-light); color: #92400e; }
.status-docs_received { background: var(--info-light); color: #1e40af; }
.status-analyzing { background: #ede9fe; color: #5b21b6; }
.status-pending_docs { background: var(--danger-light); color: var(--danger); }
.status-report_ready { background: var(--success-light); color: #065f46; }
.status-delivered { background: var(--success-light); color: #065f46; }
.status-legal_referral { background: #fef3c7; color: #92400e; }
.status-completed { background: var(--primary-100); color: var(--primary); }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.payment-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}
.payment-pending { background: var(--warning-light); color: #92400e; }
.payment-confirmed { background: var(--success-light); color: #065f46; }
.payment-refunded { background: var(--danger-light); color: var(--danger); }

/* ====== DETAIL LAYOUT ====== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}
.detail-main { min-width: 0; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border-dark);
  border: 2px solid white;
}
.timeline-item.current .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline-date { font-size: 0.78rem; color: var(--text-light); }
.timeline-content p { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }

/* Info list */
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-item label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 600;
}
.info-item span { font-size: 0.9rem; }

/* Info box */
.info-box {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.9rem;
}
.info-box.success {
  background: var(--success-light);
  border-color: var(--success);
}
.info-box ol { padding-left: 20px; }
.info-box li { margin-bottom: 8px; font-size: 0.88rem; }

/* Review */
.review-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.review-section:last-of-type { border-bottom: none; }
.review-section h4 { margin-bottom: 12px; }
.review-grid { display: flex; flex-direction: column; gap: 8px; }
.review-item { font-size: 0.9rem; }

/* Doc items in tracking */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.doc-item-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-light);
  border-radius: var(--radius);
  flex-wrap: wrap;
  gap: 8px;
}
.doc-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.doc-type-badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--primary-100);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
}
.doc-type-badge.small { font-size: 0.7rem; }
.doc-name { font-size: 0.88rem; }
.doc-size { font-size: 0.78rem; color: var(--text-light); }
.doc-status { font-size: 0.82rem; font-weight: 600; }
.doc-status-uploaded { color: var(--warning); }
.doc-status-approved { color: var(--success); }
.doc-status-rejected { color: var(--danger); }
.doc-status-pending_reupload { color: var(--danger); }
.doc-comment {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Admin doc items */
.doc-admin-item {
  padding: 12px;
  background: var(--bg-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.doc-admin-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.doc-link {
  font-weight: 600;
  color: var(--primary);
}
.doc-admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Payment Status */
.payment-status {
  text-align: center;
  padding: 10px 0;
}

/* Notifications */
.notifications-bar {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}
.notifications-bar h3 { font-size: 0.95rem; margin-bottom: 12px; }
.notification-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.notification-item:last-child { border-bottom: none; }
.notification-content strong { display: block; font-size: 0.88rem; }
.notification-content p { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.notification-content small { font-size: 0.75rem; color: var(--text-light); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-lg);
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* ====== STATS GRID ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.stat-card-icon.blue { background: var(--info-light); }
.stat-card-icon.orange { background: var(--warning-light); }
.stat-card-icon.purple { background: #ede9fe; }
.stat-card-icon.red { background: var(--danger-light); }
.stat-card-icon.green { background: var(--success-light); }
.stat-card-icon.teal { background: var(--primary-100); }
.stat-card-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ====== TABLE ====== */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-light);
}
.table tr:hover { background: var(--bg-light); }
.truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-link { color: var(--whatsapp); font-weight: 600; }
.wa-link:hover { color: #20bd5a; }

/* Filter form */
.filter-form .form-row {
  align-items: flex-end;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-muted { background: var(--bg-light); color: var(--text-muted); }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero h1 { font-size: 2rem; }
  .hero-description { margin: 0 auto 24px; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; gap: 24px; }
  .hero-visual { order: -1; }
  .hero-card { max-width: 320px; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 12px;
  }
  .nav-links.open { display: flex; }

  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stepper { flex-wrap: wrap; gap: 8px; }
  .stepper-line { display: none; }
  .requests-grid { grid-template-columns: 1fr; }

  .admin-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .admin-menu.open { display: flex; }

  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero { padding: 90px 0 40px; }
  .hero h1 { font-size: 1.7rem; }
  .section { padding: 50px 0; }
  .section-header h2 { font-size: 1.6rem; }
  .btn-lg { padding: 12px 20px; font-size: 0.9rem; }
  .auth-card { padding: 24px; }
}
