/* ============================================
   DIGICARD - LOGIN TEMATIZADO
   Sistema de temas: Outubro Rosa, Novembro Azul, Natal
   ============================================ */

/* ============================================
   VARIÁVEIS GLOBAIS E TEMA PADRÃO
   ============================================ */
:root {
  /* Cores do tema padrão */
  --color-primary: #d24d9a;
  --color-primary-dark: #b43f83;
  --color-primary-light: #e884be;
  --color-background: #f9f6f8;
  --color-panel: #ffffff;
  --color-text: #2a1f2d;
  --color-text-light: #6f6575;
  --color-border: rgba(210, 77, 154, 0.2);
  --color-input-border: rgba(101, 58, 91, 0.18);
  --color-shadow: rgba(24, 18, 30, 0.1);

  /* Gradientes do hero */
  --hero-gradient-1: #ffd6ed;
  --hero-gradient-2: #f5e3ff;
  --hero-gradient-3: #ffe8f7;

  /* Tamanhos e espaçamentos */
  --max-width: 1400px;
  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 10px;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-base: 0 10px 40px -10px var(--color-shadow);
  --shadow-hover: 0 20px 60px -15px var(--color-shadow);
}

/* ============================================
   TEMA OUTUBRO ROSA
   ============================================ */
.theme-outubro-rosa {
  --color-primary: #e84393;
  --color-primary-dark: #d63384;
  --color-primary-light: #ff7eb3;
  --color-background: #fff5fa;
  --hero-gradient-1: #ffc9e3;
  --hero-gradient-2: #ffe0f0;
  --hero-gradient-3: #ffd1e8;
  --particle-color: rgba(232, 67, 147, 0.3);
}

/* ============================================
   TEMA NOVEMBRO AZUL
   ============================================ */
.theme-novembro-azul {
  --color-primary: #2e86de;
  --color-primary-dark: #1e5faf;
  --color-primary-light: #54a0ff;
  --color-background: #f0f7ff;
  --hero-gradient-1: #a8daff;
  --hero-gradient-2: #cfe9ff;
  --hero-gradient-3: #b8e0ff;
  --particle-color: rgba(46, 134, 222, 0.3);
}

/* ============================================
   TEMA NATAL
   ============================================ */
.theme-natal {
  --color-primary: #c92a2a;
  --color-primary-dark: #a61e1e;
  --color-primary-light: #ff6b6b;
  --color-background: #fff8f5;
  --hero-gradient-1: #ffd4d4;
  --hero-gradient-2: #ffe8e8;
  --hero-gradient-3: #ffdcdc;
  --particle-color: rgba(201, 42, 42, 0.3);
}

.theme-natal::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(201, 42, 42, 0.08) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   RESET E BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.5s ease;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

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

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

a:hover,
a:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ============================================
   PARTÍCULAS DE FUNDO ANIMADAS
   ============================================ */
.background-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--particle-color, rgba(210, 77, 154, 0.3));
  border-radius: 50%;
  animation: float 5s infinite ease-in-out;
  opacity: 0;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  50% {
    transform: translateY(-100px) translateX(50px) scale(1.5);
    opacity: 0.6;
  }
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}

/* ============================================
   HERO - LADO ESQUERDO
   ============================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: linear-gradient(
    135deg,
    var(--hero-gradient-1) 0%,
    var(--hero-gradient-2) 50%,
    var(--hero-gradient-3) 100%
  );
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  animation: rotate 20s linear infinite;
}

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

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 500px;
}

.hero__decoration {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morphing 8s ease-in-out infinite;
  box-shadow: 0 20px 60px -20px var(--color-primary);
}

@keyframes morphing {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(0deg) scale(1);
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    transform: rotate(180deg) scale(1.1);
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
}

.hero__emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero__title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text);
  font-weight: 500;
  opacity: 0.8;
}

/* ============================================
   PAINEL - LADO DIREITO
   ============================================ */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--color-background);
  overflow-y: auto;
}

.panel__container {
  width: 100%;
  max-width: 520px;
  animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.panel__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.panel__logo {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.panel__badge {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px -5px var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.panel__header {
  text-align: center;
  margin-bottom: 32px;
}

.panel__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.panel__subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* ============================================
   ALERTAS E MENSAGENS
   ============================================ */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-medium);
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

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

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 8px;
}

.alert--error {
  background: #fff1f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
}

.alert--success {
  background: #f0fff4;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

.alert--warning {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #d48806;
}

/* ============================================
   FORMULÁRIO DE LOGIN
   ============================================ */
.login-form {
  background: var(--color-panel);
  border-radius: var(--radius-large);
  padding: 36px;
  box-shadow: var(--shadow-base);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  transition: box-shadow var(--transition-base);
}

.login-form:hover {
  box-shadow: var(--shadow-hover);
}

.input-group {
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px;
  padding-right: 48px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--color-input-border);
  border-radius: var(--radius-small);
  background: #fafafa;
  color: var(--color-text);
  transition: all var(--transition-base);
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--color-primary), 0.1);
  transform: translateY(-1px);
}

.input-wrapper input::placeholder {
  color: var(--color-text-light);
  opacity: 0.6;
}

/* Ícone de email */
.input-icon {
  position: absolute;
  right: 16px;
  width: 20px;
  height: 20px;
  opacity: 0.4;
  pointer-events: none;
}

.input-icon--email {
  background: var(--color-text-light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Toggle de senha */
.toggle-password {
  position: absolute;
  right: 2px;
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--color-text-light);
  transition: all var(--transition-base);
  border-radius: var(--radius-small);
}

.toggle-password:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-primary);
}

.toggle-password.is-active {
  color: var(--color-primary);
}

.toggle-password__icon {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat;
}

.toggle-password.is-active .toggle-password__icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

/* Opções do formulário */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

/* Checkbox customizado */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-input-border);
  border-radius: 5px;
  background: #fafafa;
  position: relative;
  transition: all var(--transition-base);
}

.checkbox-wrapper input:checked + .checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.link--forgot {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn--primary {
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  box-shadow: 0 10px 30px -10px var(--color-primary);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -10px var(--color-primary);
}

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

.btn--primary.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn--primary.is-loading .btn__icon {
  animation: spin 1s linear infinite;
}

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

.btn__text,
.btn__icon {
  position: relative;
  z-index: 1;
}

.btn__icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Botão WhatsApp */
.btn--whatsapp {
  width: 100%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.5);
  margin-bottom: 12px;
}

.btn--whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -10px rgba(37, 211, 102, 0.6);
}

.btn__whatsapp-icon {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

/* ============================================
   SEÇÃO DE SUPORTE
   ============================================ */
.support {
  text-align: center;
  margin-bottom: 32px;
}

.support__note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ============================================
   SERVIÇOS
   ============================================ */
.services {
  background: var(--color-panel);
  border-radius: var(--radius-large);
  padding: 32px;
  box-shadow: var(--shadow-base);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 32px;
}

.services__header {
  text-align: center;
  margin-bottom: 28px;
}

.services__header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.services__header p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin: 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.service-card {
  background: #fafafa;
  border-radius: var(--radius-medium);
  padding: 24px;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  cursor: default;
}

.service-card:hover {
  border-color: var(--color-primary);
  background: white;
  transform: translateY(-4px);
  box-shadow: 0 15px 40px -15px var(--color-primary);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-medium);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  opacity: 0.9;
}

.service-card:hover .service-card__icon {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
}

.service-card__icon::before {
  content: '✨';
  font-size: 1.8rem;
}

.service-card__icon--leaders {
  background: linear-gradient(135deg, #d24d9a, #b43f83);
}

.service-card__icon--leaders::before {
  content: '👑';
}

.service-card__icon--consultoras {
  background: linear-gradient(135deg, #e86f3c, #d35420);
}

.service-card__icon--consultoras::before {
  content: '📣';
}

.service-card__icon--digion {
  background: linear-gradient(135deg, #8f4da6, #6d3884);
}

.service-card__icon--digion::before {
  content: '⚡';
}

.service-card__icon--conteudos {
  background: linear-gradient(135deg, #f4a329, #d18b1a);
}

.service-card__icon--conteudos::before {
  content: '📚';
}

.service-card__icon--assessoria {
  background: linear-gradient(135deg, #0b9e8d, #087f71);
}

.service-card__icon--assessoria::before {
  content: '🎯';
}

.service-card__icon--app {
  background: linear-gradient(135deg, #4d9ad2, #3378a8);
}

.service-card__icon--app::before {
  content: '📱';
}

.service-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   RODAPÉ
   ============================================ */
.panel__footer {
  text-align: center;
  padding: 20px 0;
}

.panel__footer p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 1024px) {
  .page {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 300px;
    padding: 40px 20px;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .panel {
    padding: 40px 20px;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 250px;
    padding: 30px 20px;
  }

  .hero__decoration {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .panel__logo {
    width: 140px;
  }

  .panel__title {
    font-size: 1.6rem;
  }

  .login-form,
  .services {
    padding: 24px;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero {
    display: none;
  }

  .panel {
    padding: 24px 16px;
  }

  .panel__container {
    max-width: 100%;
  }

  .login-form {
    padding: 20px;
    border-radius: var(--radius-medium);
  }

  .services {
    padding: 20px;
  }

  .btn {
    padding: 12px 20px;
  }
}
