/* ====================== 1. RESET & BASE ====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ====================== 2. HEADER & NAVEGAÇÃO ====================== */
header {
  background: #020617;
  padding: 20px 0;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(90deg, #60a5fa, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

nav a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: #60a5fa;
}

/* --- Identificação do Usuário no Dashboard (REVISADO) --- */
.user-controls {
  display: flex;
  align-items: center;
  gap: 15px; /* Espaço entre o texto, a foto e o botão */
}

.user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Alinha o nome e o badge à direita, encostados na foto */
  line-height: 1.4;
}

#userName {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
  white-space: nowrap; /* Impede que o nome "esmague" a foto */
}

#userPhoto {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px; /* Garante que a foto mantenha o tamanho mesmo com nomes longos */
  border-radius: 50%;
  border: 2px solid #334155;
  object-fit: cover;
  background-color: #1e293b; /* Cor de fundo enquanto a foto carrega */
  transition: transform 0.2s;
}

#userPhoto:hover {
  transform: scale(1.1);
  border-color: #6366f1;
}


/* ====================== 3. BOTÕES & MICRO-INTERAÇÕES ====================== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #e2e8f0;
  border: 2px solid #475569;
}

.btn-secondary:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

/* Efeito de Brilho Suave (Premium) */
.btn-premium {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: white;
}

.btn-premium::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 25%;
  height: 200%;
  background: rgba(255, 255, 255, 0.4);
  transform: rotate(30deg);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { left: -60%; }
  15% { left: 120%; }
  100% { left: 120%; }
}

/* Botão Social Google */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
  cursor: pointer;
  transition: 0.3s;
}

.btn-social.google:hover {
  background: #ffffff;
  color: #111827;
}

/* Botão de Suporte/Contato */
.btn-support {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.btn-support:hover {
  background: #60a5fa;
  color: #ffffff;
  transform: translateY(-2px);
}

/* No Footer para o e-mail */
.contact-mail {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
}

/* No Footer para o e-mail */
.contact-mail {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
}

/* ====================== 3.1 HISTÓRICO (TEMA DARK LEXOS) ====================== */
.history-card {
    background: #1e293b; /* Fundo igual aos cards do dashboard */
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
    overflow: hidden;
}

.history-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a; /* Fundo um pouco mais escuro para destaque */
    border-bottom: 1px solid #334155;
}

.header-info h3 {
    margin: 0;
    color: #ffffff; /* Texto branco */
    font-size: 1.25rem;
}

.badge {
    background: #334155;
    color: #94a3b8;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
}

#search-history {
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.history-table th {
    background: rgba(15, 23, 42, 0.5);
    padding: 15px 20px;
    font-size: 0.75rem;
    color: #60a5fa; /* Azul destaque para os títulos */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Status Badges com Brilho (Glow) */
.status.concluido { 
    background: rgba(34, 197, 94, 0.1); 
    color: #4ade80; 
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.processando { 
    background: rgba(245, 158, 11, 0.1); 
    color: #fbbf24; 
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Botão de Abrir Relatório */
.btn-open {
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-open:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}


/* ====================== 4. HERO SECTION ====================== */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.hero h2 {
  font-size: 52px;
  line-height: 1.2;
  margin-bottom: 24px;
  font-weight: 800;
}

.highlight {
  background: linear-gradient(90deg, #60a5fa, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 20px;
  color: #94a3b8;
  max-width: 750px;
  margin: 0 auto 40px;
}

/* ====================== 5. CARDS & GRID ====================== */
.dashboard-section, .pricing, .apps, .about {
  padding: 80px 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: #1e293b;
  padding: 40px 30px;
  border-radius: 20px;
  border: 1px solid #334155;
  transition: 0.4s;
  position: relative;
  text-align: center;
}

.card:hover {
  transform: translateY(-8px);
  border-color: #60a5fa;
}

/* Card Premium / Destaque */
.card.destaque {
  border: 2px solid #f59e0b;
  background: rgba(30, 41, 69, 0.9);
}

.plan-header {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #334155;
}

.price {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
}

.price span {
  font-size: 16px;
  color: #94a3b8;
}

.card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 30px;
}

.card ul li {
  margin-bottom: 12px;
  font-size: 14px;
  color: #cbd5e1;
}

.popular-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #3b82f6;
  color: white;
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Badge de Segurança Premium */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid #22c55e;
  padding: 12px 24px;
  border-radius: 50px;
  margin-top: 30px;
}

.trust-badge span {
  color: #22c55e;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trust-icon {
  width: 20px;
  height: 20px;
  fill: #22c55e;
}


/* ====================== 6a. BADGES DE STATUS (DASHBOARD) ====================== */
.badge-free {
  background: #22c55e; /* VERDE DESTAQUE */
  color: #fff;
  padding: 4px 12px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 10px;
}

.badge-pro {
  background: #3b82f6; /* AZUL PRO */
  color: #fff;
  padding: 4px 12px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 10px;
}

.badge-premium {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: white;
  padding: 4px 12px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 10px;
}

/* ====================== 7. ALERTAS & DIVISORES ====================== */
.alert-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid #3b82f6;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 40px;
  text-align: left;
}

.divider {
  margin: 28px 0;
  position: relative;
  text-align: center;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #334155;
}

.divider span {
  background: #172033;
  padding: 0 20px;
  color: #64748b;
  position: relative;
}

/* ====================== 8. LOGIN CARD (CORREÇÃO DE BOTÕES) ====================== */
.login-card {
  background: #172033;
  max-width: 440px;
  width: 100%;
  padding: 48px 40px;
  border-radius: 20px;
  border: 1px solid #334155;
  text-align: center;
  margin: 50px auto;
}

/* SR DEV: Correção técnica para evitar quebra dos botões no formulário */
.login-card form .btn,
.login-card #signupBtn {
  width: 100%;
  display: block;
  margin-top: 15px;
}

.input-group {
  text-align: left;
  margin-bottom: 22px;
}

.input-group input {
  width: 100%;
  padding: 14px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  color: white;
  font-size: 16px;
}


/* ====================== 9. FOOTER UNIFICADO ====================== */
footer {
  background: #050a14;
  padding: 60px 0 40px;
  border-top: 1px solid #1e293b;
  text-align: center;
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.footer-links a {
  color: #8a8d91;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.footer-links a:hover {
  color: #60a5fa; /* Usando o azul padrão do LexOS */
}

/* Ajuste de selo para mobile */
@media (max-width: 480px) {
  .trust-badge {
    padding: 10px 16px;
    font-size: 12px;
  }
  .trust-badge span {
    font-size: 11px;
  }
}


/* ====================== 10. RESPONSIVIDADE ====================== */
@media (max-width: 768px) {
  .header-flex {
    flex-direction: column;
    text-align: center;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .user-controls {
    flex-direction: column;
    gap: 10px;
  }
  .hero h2 {
    font-size: 32px;
  }
}

/* ====================== 11. MODAL (VISUALIZAÇÃO) ====================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.95); /* Backdrop escuro profundo */
    display: none; /* Escondido por padrão */
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 16px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap; /* Mantém as quebras de linha da IA */
}

.btn-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 30px;
    cursor: pointer;
}

/* Badges de Identificação de Plano */
.badge-free {
  background: #64748b; /* Cinza ardósia */
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.badge-pro {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); /* Indigo */
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.badge-premium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); /* Âmbar/Dourado */
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Container de Controles do Usuário */
.user-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Alinha o texto à direita, encostado na foto */
}

#userPhoto {
  transition: transform 0.3s ease;
  border: 2px solid #334155;
}

#userPhoto:hover {
  transform: scale(1.1);
  border-color: #6366f1;
}

/* Tabela de Histórico */
.history-table tr {
  border-bottom: 1px solid #334155;
  transition: background 0.2s ease;
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.history-table td {
  padding: 15px;
  font-size: 0.9rem;
}

/* Status dentro da tabela */
.status-concluido { color: #22c55e; font-weight: 600; }
.status-pendente { color: #f59e0b; font-weight: 600; }

/* Botões de Ação na Tabela */
.btn-action {
  background: transparent;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-action:hover {
  background: #334155;
  border-color: #94a3b8;
}


/* ====================== 7. MODAL DE VISUALIZAÇÃO ====================== */
.modal-overlay {
    display: none; /* Escondido por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Fundo escurecido */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 16px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap; /* Essencial para manter a formatação da IA */
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close:hover { color: #f8fafc; }

