/* ══════════════════════════════════════
   SIIGAT — Login Styles
   ══════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variáveis de design ── */
:root {
  --navy-900: #0d2240;
  --navy-800: #1a3a6b;
  --navy-700: #1e4d8c;
  --navy-600: #2563a8;
  --navy-400: #4a80c4;
  --navy-100: #dce8f7;
  --green-600: #2da53e;
  --green-500: #3cb54a;
  --green-400: #5eca6a;
  --green-100: #d4f0d8;
  --white:     #ffffff;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-400:  #94a3b8;
  --gray-600:  #475569;
  --gray-900:  #0f172a;
  --shadow-xl: 0 20px 25px rgba(0,0,0,.12), 0 8px 10px rgba(0,0,0,.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* ── Base ── */
html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}

.login-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  align-items: center;
  justify-content: center;
  /* fundo gradiente no lugar do carrossel */
  background: linear-gradient(135deg, #0d2240 0%, #1a3a6b 50%, #1e4d8c 100%);
}
/* ══════════════════════════════════════
   CAROUSEL
   ══════════════════════════════════════ */

.carousel-panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--navy-900);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .7s cubic-bezier(.77,0,.18,1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 44px;
}

/* Gradientes por slide */
.carousel-slide:nth-child(1) { background: linear-gradient(135deg,#0d2240 0%,#1a3a6b 50%,#1e4d8c 100%); }
.carousel-slide:nth-child(2) { background: linear-gradient(135deg,#1a3a6b 0%,#0d2240 40%,#163358 100%); }
.carousel-slide:nth-child(3) { background: linear-gradient(135deg,#163358 0%,#1e4d8c 50%,#0d2240 100%); }
.carousel-slide:nth-child(4) { background: linear-gradient(135deg,#0d2240 0%,#163358 50%,#1a3a6b 100%); }

/* Círculos decorativos */
.carousel-slide::before,
.carousel-slide::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: .05;
  background: white;
  pointer-events: none;
}
.carousel-slide::before { width: 420px; height: 420px; top: -110px; right: -110px; }
.carousel-slide::after  { width: 260px; height: 260px; bottom: -70px; left: -70px; }

/* Ícone central */
.slide-icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.slide-icon-wrap svg { width: 46px; height: 46px; }

/* Tag */
.slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(60,181,74,.15);
  border: 1px solid rgba(60,181,74,.35);
  color: var(--green-400);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.slide-tag svg { width: 10px; height: 10px; }

/* Textos */
.slide-heading {
  color: var(--white);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  margin-bottom: 12px;
  max-width: 420px;
}

.slide-body {
  color: rgba(255,255,255,.62);
  font-size: 13.5px;
  line-height: 1.65;
  text-align: center;
  max-width: 390px;
}

/* Cards de estatísticas */
.slide-stat-row {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  backdrop-filter: blur(6px);
  flex: 1;
}
.stat-card .value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.stat-card .label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .35s ease;
  border: none;
  padding: 0;
}
.dot.active { width: 24px; background: var(--green-500); }

/* Setas */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.carousel-btn:hover { background: rgba(255,255,255,.2); }
.carousel-btn.prev  { left: 14px; }
.carousel-btn.next  { right: 14px; }

/* Barra de progresso */
.carousel-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.1);
}
.carousel-progress-bar {
  height: 100%;
  background: var(--green-500);
  width: 0%;
}

/* ══════════════════════════════════════
   LOGIN PANEL
   ══════════════════════════════════════ */

.login-panel {
  width: 460px;
  max-width: 92vw;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 28px;
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  /* sem height fixo — cresce com o conteúdo */
  overflow: visible;
}

/* Barra colorida no topo */
.login-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy-800), var(--green-500));
}

/* Logo */
.login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}
.login-logo-wrap img {
  width: 170px;
  height: auto;
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-400);
  text-align: center;
  line-height: 1.5;
}

/* Títulos do form */
.login-form-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 2px;
  align-self: flex-start;
}
.login-form-desc {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 18px;
  align-self: flex-start;
}

/* Grupos de campo */
.form-group {
  width: 100%;
  margin-bottom: 14px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  letter-spacing: .02em;
}
.form-label svg { width: 13px; height: 13px; color: var(--navy-700); }

.input-wrap { position: relative; }

.input-wrap .input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.input-wrap .input-icon svg { width: 16px; height: 16px; }

/* Inputs */
.form-input {
  width: 100%;
  height: 42px;
  padding: 0 5px 0 20px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--gray-900);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.form-input::placeholder { color: var(--gray-400); }
.form-input:focus {
  border-color: var(--navy-700);
  background: white;
  box-shadow: 0 0 0 3px rgba(26,58,107,.1);
}

/* Select */
.form-input.select-input {
  appearance: none;
  cursor: pointer;
}
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--gray-400);
}
.select-arrow svg { width: 15px; height: 15px; }

/* Toggle senha */
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color .2s;
}
.toggle-pw:hover { color: var(--navy-700); }
.toggle-pw svg   { width: 16px; height: 16px; }

/* Divisor */
.form-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px;
}
.form-divider span { font-size: 11px; color: var(--gray-400); white-space: nowrap; }
.form-divider::before,
.form-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* Botão primário */
.btn-primary {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
  box-shadow: 0 4px 14px rgba(26,58,107,.35);
  letter-spacing: .02em;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.08));
  opacity: 0;
  transition: opacity .2s;
}
.btn-primary:hover         { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,58,107,.4); filter: brightness(1.08); }
.btn-primary:hover::after  { opacity: 1; }
.btn-primary:active        { transform: translateY(0); }
.btn-primary svg           { width: 17px; height: 17px; }

/* Botão secundário */
.btn-secondary {
  width: 100%;
  height: 40px;
  background: transparent;
  color: var(--navy-700);
  border: 1.5px solid var(--navy-100);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all .2s;
}
.btn-secondary:hover { background: var(--navy-100); border-color: var(--navy-400); }
.btn-secondary svg   { width: 15px; height: 15px; }

/* Badge de segurança */
.security-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--green-600);
  font-weight: 500;
  margin-top: 14px;
}
.security-badge svg { width: 12px; height: 12px; }

/* Footer */
.login-footer {
  position: absolute;
  bottom: 14px;
  font-size: 10.5px;
  color: var(--gray-400);
  text-align: center;
}

/* ══════════════════════════════════════
   ANIMAÇÕES
   ══════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo-wrap            { animation: fadeUp .5s ease both .05s; }
.login-form-title           { animation: fadeUp .5s ease both .10s; }
.login-form-desc            { animation: fadeUp .5s ease both .14s; }
.form-group:nth-child(1)    { animation: fadeUp .5s ease both .18s; }
.form-group:nth-child(2)    { animation: fadeUp .5s ease both .22s; }
.form-group:nth-child(3)    { animation: fadeUp .5s ease both .26s; }
.btn-primary                { animation: fadeUp .5s ease both .32s; }
.btn-secondary              { animation: fadeUp .5s ease both .36s; }
.security-badge             { animation: fadeUp .5s ease both .40s; }

/* ══════════════════════════════════════
   RESPONSIVO
   ══════════════════════════════════════ */

@media (max-width: 860px) {
  .login-panel {
    width: 94vw;
    padding: 32px 28px 24px;
  }
}

/* ══════════════════════════════════════
   MODAL
   ══════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,34,64,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 400px;
  max-width: 92vw;
  transform: scale(.95) translateY(10px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--shadow-xl);
  position: relative;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none; border: none;
  cursor: pointer; color: var(--gray-400);
  display: flex; align-items: center;
  transition: color .2s;
}
.modal-close:hover { color: var(--gray-900); }
.modal-close svg   { width: 19px; height: 19px; }

.modal-icon {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--navy-100);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.modal-icon svg { width: 24px; height: 24px; color: var(--navy-800); }

.modal-title { font-size: 17px; font-weight: 700; color: var(--navy-800); margin-bottom: 5px; }
.modal-desc  { font-size: 12.5px; color: var(--gray-400); margin-bottom: 20px; line-height: 1.6; }

/* ══════════════════════════════════════
   TOAST
   ══════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--navy-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-xl);
  transform: translateY(70px);
  opacity: 0;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  z-index: 200;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); flex-shrink: 0; }