/* ============================================================
   NFPainel - Pages.css
   Páginas Legais (Privacidade, Termos, LGPD, Trocas)
   ============================================================ */

.legal-page {
  min-height: 100vh;
  background: var(--bg-secondary);
}

/* Hero das páginas legais */
.page-hero {
  background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark));
  padding: 120px 0 60px;
  text-align: center;
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.page-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Layout das páginas */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  align-items: start;
}

/* Sidebar / Índice */
.page-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.sidebar-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
  border-left-color: var(--primary);
}

.sidebar-link .material-icons-outlined { font-size: 16px; }

/* Conteúdo principal */
.page-content {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Seções do conteúdo */
.content-section {
  scroll-margin-top: calc(var(--nav-height) + 24px);
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-light);
}

.content-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.content-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-number {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.content-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-section p:last-child { margin-bottom: 0; }

.content-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

/* Listas */
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  padding-left: 4px;
}

.legal-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-list li .material-icons-outlined {
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.legal-list.danger li .material-icons-outlined { color: var(--danger); }
.legal-list.warning li .material-icons-outlined { color: var(--warning); }

/* Alertas / Highlights */
.legal-alert {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin: 20px 0;
  border: 1px solid;
}

.legal-alert.info {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1E40AF;
}

.legal-alert.success {
  background: var(--primary-ultra-light);
  border-color: var(--primary-light);
  color: var(--primary-darker);
}

.legal-alert.warning {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

.legal-alert.danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}

.legal-alert .material-icons-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.legal-alert-content {
  font-size: 14px;
  line-height: 1.6;
}

.legal-alert-content strong { display: block; margin-bottom: 4px; }

/* Tabelas legais */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.legal-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.legal-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
}

.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:hover td { background: var(--bg-secondary); }

/* Contact Box */
.contact-box {
  background: linear-gradient(135deg, var(--primary-ultra-light), #F0FDF4);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin: 24px 0;
  text-align: center;
}

.contact-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-darker);
  margin-bottom: 8px !important;
}

.contact-box p {
  color: var(--primary-dark);
  margin-bottom: 20px !important;
}

.contact-box-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* LGPD Form */
.lgpd-form {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border);
  margin: 24px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label span { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control { cursor: pointer; }

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-checkbox input { 
  width: 18px; 
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-submit {
  margin-top: 24px;
  text-align: center;
}

/* Step timeline */
.timeline {
  position: relative;
  padding-left: 32px;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.timeline-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-item p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0 !important;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.active { background: var(--primary-ultra-light); color: var(--primary-dark); }
.status-badge.inactive { background: #FEF2F2; color: #991B1B; }
.status-badge.pending { background: #FFFBEB; color: #92400E; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }

/* Related pages */
.related-pages {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border-light);
}

.related-pages h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.related-card:hover {
  background: var(--primary-ultra-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.related-card .material-icons-outlined { color: var(--primary); font-size: 18px; }

/* Responsive páginas */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  
  .page-sidebar {
    position: static;
  }
  
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sidebar-link {
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .sidebar-link:hover, .sidebar-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }
}

@media (max-width: 600px) {
  .page-content { padding: 24px 20px; }
  .lgpd-form { padding: 20px 16px; }
  .contact-box { padding: 20px 16px; }
  .content-section h2 { font-size: 19px; }
}