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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  /* fundo predominante azul */
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  pointer-events: none;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  position: relative;
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  text-align: center;
}

.auth-header .auth-logo {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  object-fit: contain;
}

.auth-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  letter-spacing: -0.025em;
}

.card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.card-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
}

.card-header p {
  color: #4a5568;
  font-size: 1rem;
  margin-bottom: 0;
  opacity: 0.8;
}


.tabs {
  padding: 2rem;
}

.tabs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: rgba(247, 250, 252, 0.8);
  border-radius: 12px;
  padding: 0.375rem;
  margin-bottom: 2rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.tab-trigger {
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tab-trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-trigger span {
  position: relative;
  z-index: 1;
}

.tab-trigger.active {
  background: #ffffff;
  color: #0b2447; /* texto escuro porém gentil */
  box-shadow: 
    0 6px 18px rgba(11,36,71,0.06),
    0 1px 3px rgba(11,36,71,0.08);
  transform: translateY(-1px);
}

.tab-trigger.active::before {
  opacity: 0.1;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group select {
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 
    0 0 0 3px rgba(21,101,216,0.12),
    0 6px 18px rgba(11,36,71,0.06);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: var(--white);
  box-shadow: 
    0 6px 20px rgba(21,101,216,0.25),
    0 2px 6px rgba(11,36,71,0.08);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(21,101,216,0.28),
    0 6px 18px rgba(11,36,71,0.12);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.loader {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Card body spacing */
.card-body {
  padding: 0.5rem 1.25rem;
}

/* Secondary button variant used in auth flows */
.btn-secondary {
  /* Variante secundária com acento amarelo suave */
  background: linear-gradient(135deg, rgba(255,250,235,1) 0%, rgba(255,244,204,1) 100%);
  color: var(--accent-700);
  border: 1px solid rgba(255,199,44,0.18);
  box-shadow: 0 2px 6px rgba(11,36,71,0.04);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255,248,230,1) 0%, rgba(255,240,180,1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(11,36,71,0.06);
}

.forgot-password {
  margin-top: 1.5rem;
  text-align: center;
}

.forgot-link {
  color: var(--primary-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
  display: inline-block;
}

.forgot-link:hover {
  color: var(--primary-700);
  text-decoration: none;
  background: rgba(21,101,216,0.08);
  transform: translateY(-1px);
}

.forgot-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Mensagens de feedback */
#loginMessage,
#responseMessage {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

#loginMessage.success,
#responseMessage.success {
  background: linear-gradient(135deg, rgba(237,249,237,1) 0%, rgba(211,245,224,1) 100%);
  color: #0b5f3a;
  border: 1px solid rgba(134,239,172,0.5);
}

#loginMessage.error,
#responseMessage.error {
  background: linear-gradient(135deg, rgba(255,243,243,1) 0%, rgba(255,230,230,1) 100%);
  color: #8b1f1f;
  border: 1px solid rgba(252,165,165,0.4);
}

/* Responsividade */
@media (max-width: 640px) {
  .auth-container {
    padding: 1rem;
  }
  
  .auth-card {
    max-width: 100%;
  }
  
  .auth-header h1 {
    font-size: 2rem;
  }
  
  .card-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .tabs {
    padding: 1.5rem;
  }
  
  .card-header h2 {
    font-size: 1.5rem;
  }
}

/* Animações de entrada */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilo para select */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Estilos específicos para páginas simples (forgot, reset) */
.single-form .tabs {
  padding: 2rem;
}

.single-form .card-header h2 {
  margin-bottom: 0.75rem;
}

.single-form .form {
  gap: 1.5rem;
}

/* Estilo para links de ação secundária */
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  background: rgba(248, 250, 252, 0.8);
  color: #475569;
  text-decoration: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(226, 232, 240, 0.8);
  margin-top: 0.5rem;
}

.action-link:hover {
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

:root {
  /* Paleta principal: branco, azul (predominante) e amarelo (acento) */
  --white: #ffffff;
  --primary-600: #1565d8; /* azul predominante */
  --primary-700: #0d47a1; /* azul mais escuro */
  --accent-500: #ffca28; /* amarelo vibrante para acentos */
  --accent-700: #b28700; /* amarelo escuro para textos/bordas */
  --accent-soft: rgba(255,202,40,0.12);
}

/* ========================================
   BOTÃO DE ACESSO ADMIN
   ======================================== */
.admin-access-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(21, 101, 216, 0.2);
  backdrop-filter: blur(10px);
}

.admin-access-btn:hover {
  background: var(--primary-600);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 20px rgba(21, 101, 216, 0.3);
}

.admin-access-btn:hover svg {
  stroke: white;
}

.admin-access-btn svg {
  stroke: var(--primary-600);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-access-btn:active {
  transform: scale(0.95);
}

/* ========================================
   MODAL DE SENHA
   ======================================== */
.password-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-modal-content h3 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-600);
  font-size: 1.5rem;
  font-weight: 700;
}

.password-modal-content p {
  margin: 0 0 1.5rem 0;
  color: #64748b;
  font-size: 0.95rem;
}

.password-modal-content input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(21, 101, 216, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1rem;
  background: rgba(241, 245, 249, 0.5);
}

.password-modal-content input:focus {
  outline: none;
  border-color: var(--primary-600);
  background: white;
  box-shadow: 0 0 0 4px rgba(21, 101, 216, 0.1);
}

.password-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.password-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ========================================
   MODAL DE CADASTRO
   ======================================== */
.signup-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.signup-modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-modal-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(100, 116, 139, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-modal-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  transform: rotate(90deg);
}

.close-modal-btn:hover svg {
  stroke: #dc2626;
}

.close-modal-btn svg {
  stroke: #64748b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-title {
  margin: 0 0 0.5rem 0;
  color: var(--primary-600);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-subtitle {
  margin: 0 0 1.5rem 0;
  color: #64748b;
  font-size: 0.95rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
