/* ========================================
   MEDRESTITUI - CSS Principal
   ======================================== */

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

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --green-500: #22c55e;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 40px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
}
.logo-icon { font-size: 26px; color: var(--blue-600); }
.logo-text strong { color: var(--blue-600); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  transition: all .2s;
}
.nav-links a:hover { background: var(--blue-50); color: var(--blue-700); }
.btn-nav {
  background: var(--blue-600) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}
.btn-nav:hover { background: var(--blue-700) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3) !important; }

.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ---- HERO ---- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 24px;
}

.hero-content { color: var(--white); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--white);
}

.highlight {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: #cbd5e1;
  margin-bottom: 24px;
  max-width: 480px;
}

.hero-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.hero-benefits li { color: #93c5fd; font-size: 15px; font-weight: 500; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  transition: all .25s;
  box-shadow: 0 4px 15px rgba(37,99,235,.35);
  border: none;
  cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37,99,235,.45); }
.btn-primary.btn-large { font-size: 18px; padding: 18px 36px; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--blue-600);
  border: 2px solid var(--blue-600);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.btn-outline:hover { background: var(--blue-600); color: var(--white); }

/* ---- FORM CARD ---- */
.hero-form-wrap { position: relative; }

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.form-card-header {
  background: var(--blue-600);
  padding: 24px 28px;
  color: var(--white);
}
.form-card-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.form-card-header p { color: #bfdbfe; font-size: 14px; }

.cadastro-form { padding: 28px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* UPLOAD */
.upload-area {
  position: relative;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--gray-50);
}
.upload-area:hover { border-color: var(--blue-500); background: var(--blue-50); }
.file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-icon { font-size: 28px; }
.upload-placeholder p { font-size: 14px; color: var(--gray-700); margin: 4px 0; }
.upload-placeholder small { color: var(--gray-400); font-size: 12px; }
.upload-selected p { font-size: 14px; color: var(--blue-700); font-weight: 600; margin: 4px 0; }

.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 6px; }
.form-hint a { color: var(--blue-600); text-decoration: underline; }

.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 15px rgba(37,99,235,.3);
  font-family: inherit;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.4); }

.form-privacy { text-align: center; font-size: 12px; color: var(--gray-400); margin-top: 12px; }

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin: 0 28px 16px;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---- STATS ---- */
.stats-section {
  background: var(--gray-50);
  padding: 50px 0;
  border-bottom: 1px solid var(--gray-200);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-number { font-size: 36px; font-weight: 800; color: var(--blue-600); }
.stat-label { font-size: 14px; color: var(--gray-600); margin-top: 4px; }

/* ---- SECTION STYLES ---- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.section-header p { font-size: 17px; color: var(--gray-600); max-width: 550px; margin: 0 auto; }

/* ---- COMO FUNCIONA ---- */
.como-section { padding: 80px 0; }
.steps-grid {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  flex: 1;
  max-width: 280px;
  box-shadow: var(--shadow-md);
  transition: transform .3s, box-shadow .3s;
  position: relative;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-icon { font-size: 42px; margin-bottom: 14px; }
.step-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.step-card p { color: var(--gray-600); font-size: 14px; }
.step-arrow { font-size: 28px; color: var(--blue-400, #60a5fa); padding: 0 16px; flex-shrink: 0; }

/* ---- TESTIMONIALS ---- */
.testimonials-section { background: var(--blue-50); padding: 80px 0; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.stars { color: #f59e0b; font-size: 18px; margin-bottom: 12px; }
.testimonial-card p { color: var(--gray-600); font-size: 15px; font-style: italic; line-height: 1.7; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px; height: 44px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: 14px; }
.testimonial-author span { font-size: 12px; color: var(--gray-400); }

/* ---- CTA ---- */
.cta-section {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  padding: 80px 0;
  text-align: center;
  color: var(--white);
}
.cta-section h2 { font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 18px; color: #bfdbfe; margin-bottom: 32px; }
.cta-section .btn-primary { background: var(--white); color: var(--blue-700) !important; }
.cta-section .btn-primary:hover { background: var(--blue-50); }

/* ---- PAGE HERO ---- */
.page-hero {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  padding: 60px 0;
  text-align: center;
  color: var(--white);
}
.page-hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.page-hero p { font-size: 18px; color: #bfdbfe; }

/* ---- PROCESSO ---- */
.processo-section { padding: 80px 0; }
.processo-steps { display: flex; flex-direction: column; gap: 0; }
.processo-step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding: 50px 0;
  border-bottom: 1px solid var(--gray-200);
}
.processo-step:last-child { border-bottom: none; }
.processo-number {
  font-size: 72px;
  font-weight: 900;
  color: var(--blue-100);
  line-height: 1;
  text-align: center;
}
.processo-icon { font-size: 48px; margin-bottom: 16px; }
.processo-step-content h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.processo-step-content > p { font-size: 16px; color: var(--gray-600); margin-bottom: 20px; }
.processo-connector { height: 0; }
.processo-details {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.processo-details h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--gray-700); }
.processo-details ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.processo-details li { font-size: 14px; color: var(--gray-600); }
.processo-tip {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  padding: 14px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--blue-800);
}

/* ---- FAQ ---- */
.faq-section { background: var(--gray-50); padding: 80px 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background .2s;
}
.faq-question:hover { background: var(--blue-50); }
.faq-arrow { transition: transform .3s; color: var(--blue-600); }
.faq-answer { display: none; padding: 0 24px 20px; color: var(--gray-600); line-height: 1.7; }
.faq-answer.open { display: block; }
.faq-answer a { color: var(--blue-600); text-decoration: underline; }

/* ---- VIDEOS ---- */
.videos-section { padding: 80px 0; }
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-info { padding: 20px; }
.video-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.video-info p { font-size: 14px; color: var(--gray-600); }
.videos-note { text-align: center; margin-top: 20px; font-size: 13px; color: var(--gray-400); }
.videos-note code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ---- SUCESSO ---- */
.sucesso-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 60px 24px; }
.sucesso-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 60px 48px;
  text-align: center;
  max-width: 600px;
  width: 100%;
}
.sucesso-icon { font-size: 72px; margin-bottom: 20px; }
.sucesso-card h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.sucesso-name { font-size: 18px; margin-bottom: 16px; color: var(--blue-700); }
.sucesso-card p { color: var(--gray-600); margin-bottom: 8px; }
.sucesso-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 32px 0;
}
.suc-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.suc-step span {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  background: var(--gray-200); color: var(--gray-600);
}
.suc-step p { font-size: 12px; color: var(--gray-400); }
.suc-done span { background: var(--green-500); color: var(--white); }
.suc-active span { background: var(--blue-600); color: var(--white); }
.suc-arrow { font-size: 20px; color: var(--gray-400); }
.sucesso-actions { display: flex; gap: 16px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }

/* ---- FOOTER ---- */
.footer { background: #0f172a; color: #94a3b8; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-top: 16px; color: #64748b; }
.footer-links h4 { color: var(--white); font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #64748b; font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
}

/* ---- ADMIN ---- */
.admin-body { background: #f1f5f9; min-height: 100vh; }
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: #0f172a;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
}
.admin-sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid #1e293b;
  display: flex; align-items: center; gap: 10px;
}
.admin-nav { padding: 16px 0; flex: 1; }
.admin-nav-item {
  display: block;
  padding: 12px 20px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.admin-nav-item:hover, .admin-nav-item.active { background: #1e293b; color: var(--white); }
.nav-logout { margin-top: auto; color: #f87171 !important; }
.nav-logout:hover { background: #2d1515 !important; }

.admin-main { margin-left: 240px; padding: 32px; flex: 1; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-topbar h1 { font-size: 26px; font-weight: 800; color: var(--dark); }
.admin-user { font-size: 14px; color: var(--gray-600); background: var(--white); padding: 8px 16px; border-radius: 20px; }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.admin-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid transparent;
}
.stat-blue { border-left-color: #3b82f6; }
.stat-green { border-left-color: #22c55e; }
.stat-purple { border-left-color: #a855f7; }
.stat-orange { border-left-color: #f97316; }
.admin-stat-card .stat-value { font-size: 36px; font-weight: 800; color: var(--dark); }
.admin-stat-card .stat-label { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-card-header h2 { font-size: 18px; font-weight: 700; }

.admin-filter-form {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--gray-50);
}
.admin-search {
  flex: 1; min-width: 220px;
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.admin-search:focus { border-color: var(--blue-500); }
.admin-select {
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--white);
}
.btn-filter {
  padding: 9px 20px;
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-clear {
  padding: 9px 16px;
  background: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}
.btn-download {
  background: #16a34a;
  color: var(--white);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.btn-outline-sm {
  background: transparent;
  color: var(--blue-600);
  border: 1px solid var(--blue-600);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
  white-space: nowrap;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--blue-50); }

.badge { background: var(--gray-100); color: var(--gray-600); padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-uf { background: var(--blue-100); color: var(--blue-800); padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.badge-cnis { background: #dcfce7; color: #166534; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-nocnis { color: var(--gray-400); }
.badge-afiliado { background: #fef3c7; color: #92400e; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

.link-whatsapp { color: #16a34a; font-weight: 500; }
.link-email { color: var(--blue-600); }

.btn-delete-small {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.btn-delete-small:hover { background: #fee2e2; }

.pagination {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.page-btn {
  background: var(--blue-600);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.page-info { font-size: 14px; color: var(--gray-400); }

/* AFILIADOS RANKING */
.afiliados-ranking { padding: 20px 24px; }
.ranking-item { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ranking-pos { font-size: 13px; font-weight: 700; color: var(--gray-400); width: 24px; text-align: center; }
.ranking-name { font-size: 14px; font-weight: 600; width: 150px; }
.ranking-bar-wrap { flex: 1; height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.ranking-bar { height: 100%; background: linear-gradient(to right, #3b82f6, #1d4ed8); border-radius: 4px; transition: width .5s; }
.ranking-total { font-size: 13px; color: var(--gray-600); font-weight: 600; width: 100px; text-align: right; }

/* ADMIN LOGIN */
.admin-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f1f5f9; }
.admin-login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 48px;
  width: 100%;
  max-width: 420px;
}
.admin-login-header { text-align: center; margin-bottom: 32px; }
.admin-login-header p { color: var(--gray-400); font-size: 14px; margin-top: 8px; }
.admin-login-form .form-group { margin-bottom: 20px; }
.admin-login-form .btn-submit { margin-top: 8px; }

/* AFILIADOS FORM */
.afiliado-form { padding: 20px 24px; }
.afiliado-form .form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }

/* LINK COPY */
.link-copy-wrap { display: flex; gap: 6px; }
.link-input {
  flex: 1; padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-600);
  background: var(--gray-50);
}
.btn-copy {
  padding: 6px 12px;
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.slug-badge {
  background: var(--gray-100);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--blue-800);
}

/* ── MODAL CNIS ── */
.link-cnis-modal {
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.modal-open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover { background: var(--gray-200); }
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}
.modal-steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-steps > li {
  font-size: 14px;
  color: var(--dark);
}
.modal-steps > li strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-700);
  margin-bottom: 6px;
}
.modal-steps ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: disc;
}
.modal-steps ul li {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ── STATUS SELECT (admin dashboard) ── */
.status-select {
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
.status-select.status-novo       { background-color:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.status-select.status-em_analise { background-color:#fffbeb; color:#b45309; border-color:#fde68a; }
.status-select.status-em_processo{ background-color:#fdf4ff; color:#7c3aed; border-color:#e9d5ff; }
.status-select.status-aprovado   { background-color:#f0fdf4; color:#16a34a; border-color:#bbf7d0; }
.status-select.status-reprovado  { background-color:#fef2f2; color:#dc2626; border-color:#fecaca; }

/* ── STATUS BADGE (portal afiliado) ── */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge-novo        { background:#eff6ff; color:#1d4ed8; }
.status-badge-em_analise  { background:#fffbeb; color:#b45309; }
.status-badge-em_processo { background:#fdf4ff; color:#7c3aed; }
.status-badge-aprovado    { background:#f0fdf4; color:#16a34a; }
.status-badge-reprovado   { background:#fef2f2; color:#dc2626; }

/* ── PORTAL AFILIADO ── */
.af-link-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  color: white;
}
.af-link-label { font-size: 14px; font-weight: 600; opacity: .9; }
.af-link-input { background: rgba(255,255,255,.15); color: white; border-color: rgba(255,255,255,.3); font-size: 13px; }
.af-link-input::placeholder { color: rgba(255,255,255,.5); }

.badge-sem-senha {
  display: inline-block;
  padding: 4px 10px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-portal-sm {
  display: inline-block;
  padding: 5px 12px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 8px 0; }
  .processo-step { grid-template-columns: 1fr; }
  .processo-number { font-size: 48px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { width: 60px; }
  .admin-sidebar-header span:last-child { display: none; }
  .admin-nav-item { padding: 12px; font-size: 18px; }
  .admin-main { margin-left: 60px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 16px; z-index: 99; }
  .nav-links.open { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .sucesso-card { padding: 32px 24px; }
  .sucesso-steps { flex-direction: column; }
  .suc-arrow { transform: rotate(90deg); }
}
