:root {
  --sd-bg0: #050810;
  --sd-bg1: #070b12;
  --sd-card: rgba(10, 14, 25, 0.72);
  --sd-border: rgba(124, 131, 152, 0.22);
  --sd-text: #f1f5f9;
  --sd-muted: #94a3b8;
  --sd-accent: #6366f1;
  --sd-accent2: #22d3ee;
  --sd-radius: 18px;
  --sd-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --sd-font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --sd-display: "Syne", var(--sd-font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--sd-font);
  color: var(--sd-text);
  background:
    radial-gradient(ellipse 80% 60% at 50% -5%,  rgba(99, 102, 241, 0.30), transparent 58%),
    radial-gradient(ellipse 65% 45% at 88% 28%,  rgba(34, 211, 238, 0.18), transparent 52%),
    radial-gradient(ellipse 50% 40% at 8%  75%,  rgba(91, 33,  182, 0.22), transparent 50%),
    linear-gradient(180deg, #060910 0%, #050810 100%);
  overflow: hidden;
}

/* ── Grid background ── */
.sd-login-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, transparent 80%);
}

/* ══════════════════════════════════════════
   SPLIT LAYOUT
══════════════════════════════════════════ */
.sd-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(480px, 42vw);
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   HERO — painel esquerdo
══════════════════════════════════════════ */
.sd-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(16px, 3.2vh, 40px) clamp(20px, 3vw, 48px);
  overflow: hidden;
}

/* Orbs decorativos */
.sd-hero::before,
.sd-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.sd-hero::before {
  width: 600px;
  height: 600px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
}
.sd-hero::after {
  width: 500px;
  height: 500px;
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
}

.sd-hero-inner {
  position: relative;
  z-index: 1;
  max-width: min(560px, 100%);
  width: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: sdHeroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.sd-hero-brand {
  margin-bottom: clamp(12px, 2.4vh, 32px);
  flex-shrink: 0;
}

.sd-hero-logo {
  width: clamp(140px, 22vmin, 200px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 48px rgba(34, 211, 238, 0.30));
}

.sd-hero-title {
  margin: 0 0 clamp(6px, 1.2vh, 14px);
  font-family: var(--sd-display);
  font-size: clamp(1.35rem, 2.8vmin + 0.6rem, 2.65rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--sd-text);
  flex-shrink: 0;
}

.sd-hero-accent {
  background: linear-gradient(110deg, var(--sd-accent2) 0%, #818cf8 60%, var(--sd-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sd-hero-lead {
  margin: 0 0 clamp(10px, 2vh, 28px);
  color: var(--sd-muted);
  font-size: clamp(0.82rem, 1.1vmin + 0.65rem, 1.02rem);
  line-height: 1.45;
  max-width: 480px;
  flex-shrink: 0;
}

/* Feature list */
.sd-feat-list {
  list-style: none;
  margin: 0 0 clamp(10px, 2vh, 28px);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1.2vh, 12px) clamp(10px, 1.5vw, 18px);
  flex: 1 1 auto;
  min-height: 0;
  align-content: center;
}

.sd-feat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: clamp(8px, 1.3vh, 12px) clamp(10px, 1.2vw, 14px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  animation: sdFeatIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sd-feat:nth-child(1) { animation-delay: 0.08s; }
.sd-feat:nth-child(2) { animation-delay: 0.13s; }
.sd-feat:nth-child(3) { animation-delay: 0.18s; }
.sd-feat:nth-child(4) { animation-delay: 0.23s; }
.sd-feat:nth-child(5) { animation-delay: 0.28s; }
.sd-feat:nth-child(6) { animation-delay: 0.33s; }

@keyframes sdFeatIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sd-feat:hover {
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-2px);
}

.sd-feat-icon {
  font-size: clamp(1rem, 2vmin, 1.28rem);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.sd-feat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sd-feat-body strong {
  font-size: clamp(0.75rem, 0.9vmin + 0.55rem, 0.86rem);
  font-weight: 700;
  color: var(--sd-text);
  line-height: 1.25;
}

.sd-feat-body span {
  font-size: clamp(0.68rem, 0.75vmin + 0.52rem, 0.76rem);
  color: var(--sd-muted);
  line-height: 1.35;
}

/* Stats row */
.sd-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: clamp(10px, 1.8vh, 16px) clamp(12px, 2vw, 20px);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sd-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.sd-hero-stat-num {
  font-family: var(--sd-display);
  font-size: clamp(1rem, 2.2vmin + 0.35rem, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(110deg, var(--sd-accent2) 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sd-hero-stat-lbl {
  font-size: clamp(0.62rem, 0.65vmin + 0.45rem, 0.72rem);
  color: var(--sd-muted);
  text-align: center;
}

.sd-hero-stat-sep {
  width: 1px;
  height: clamp(24px, 4vh, 34px);
  background: rgba(148, 163, 184, 0.18);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PANEL — painel direito (formulário)
══════════════════════════════════════════ */
.sd-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: clamp(20px, 3vh, 36px) clamp(24px, 3vw, 40px);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 8, 16, 0.55);
  backdrop-filter: blur(2px);
  overflow: hidden;
}

.sd-panel-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Logo em mobile (oculta em desktop) */
.sd-panel-brand {
  display: none;
  justify-content: center;
  margin-bottom: 4px;
}

.sd-panel-logo {
  width: 180px;
  max-width: 80vw;
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(34, 211, 238, 0.25));
}

/* ── Card do formulário ── */
.sd-login-card {
  width: 100%;
  padding: 30px 28px;
  border-radius: var(--sd-radius);
  background: rgba(9, 13, 24, 0.82);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow:
    var(--sd-shadow),
    0 0 0 1px rgba(99, 102, 241, 0.22),
    0 0 40px rgba(99, 102, 241, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  position: relative;
  animation: sdCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.1s;
}

@keyframes sdCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sd-login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--sd-radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.45) 0%, rgba(34,211,238,0.25) 50%, rgba(99,102,241,0.15) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sd-login-title {
  margin: 0 0 6px;
  font-family: var(--sd-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.sd-login-subtitle {
  margin: 0 0 18px;
  color: var(--sd-muted);
  text-align: center;
  font-size: 0.98rem;
}

.sd-login-form {
  display: grid;
  gap: 14px;
}

.sd-field {
  display: grid;
  gap: 8px;
}

.sd-field label {
  color: var(--sd-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.sd-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sd-text);
  padding: 13px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.2s;
}
.sd-input::placeholder {
  color: rgba(148, 163, 184, 0.55);
}
.sd-input:hover {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(255, 255, 255, 0.07);
}
.sd-input:focus {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.04);
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.14),
    0 0 16px rgba(34, 211, 238, 0.08);
}

.sd-login-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #07121b;
  background: linear-gradient(135deg, var(--sd-accent2) 0%, #60a5fa 55%, #818cf8 100%);
  box-shadow:
    0 12px 40px rgba(34, 211, 238, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.sd-login-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.25) 50%, transparent 65%);
  background-size: 200% 100%;
  background-position: 200% 0;
  transition: background-position 0.55s ease;
}
.sd-login-btn:hover::after {
  background-position: -50% 0;
}
.sd-login-btn:hover {
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.40), 0 4px 16px rgba(99, 102, 241, 0.25);
  filter: brightness(1.04);
}
.sd-login-btn:active {
  transform: scale(0.99);
  filter: brightness(0.97);
}
.sd-login-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sd-login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sd-login-link {
  color: rgba(148, 163, 184, 0.95);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.sd-login-link:hover {
  text-decoration: underline;
}

.sd-login-error {
  margin: 2px 0 0;
  min-height: 18px;
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
}

.sd-login-divider {
  height: 1px;
  margin: 18px 0 14px;
  background: rgba(148, 163, 184, 0.18);
}

.sd-login-bottom {
  margin: 0;
  color: var(--sd-muted);
  text-align: center;
  font-size: 0.95rem;
}

.sd-login-bottom a {
  color: var(--sd-accent2);
  font-weight: 800;
  text-decoration: none;
}

.sd-login-bottom a:hover {
  text-decoration: underline;
}

.sd-login-footer {
  color: rgba(148, 163, 184, 0.6);
  font-size: 0.82rem;
  text-align: center;
}

/* ── Modal redefinir senha ── */
.sd-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 16, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.sd-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.sd-modal {
  width: 100%;
  max-width: 420px;
  border-radius: var(--sd-radius);
  border: 1px solid var(--sd-border);
  background: rgba(12, 18, 32, 0.95);
  box-shadow: var(--sd-shadow);
  padding: 22px 24px 26px;
  position: relative;
}

.sd-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sd-modal-title {
  margin: 0;
  font-family: var(--sd-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sd-text);
}

.sd-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sd-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sd-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sd-text);
}

.sd-modal-lead {
  margin: 0 0 18px;
  color: var(--sd-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.sd-modal-error {
  min-height: 20px;
  margin: 0 0 10px;
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Toast (canto inferior direito) ── */
.sd-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: min(360px, calc(100vw - 40px));
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(10, 14, 25, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
  pointer-events: none;
}

.sd-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sd-toast-title {
  margin: 0 0 6px;
  font-family: var(--sd-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--sd-text);
}

.sd-toast-msg {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--sd-muted);
}

.sd-toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--sd-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.sd-toast-close:hover {
  color: var(--sd-text);
}

/* ── Página reset-password (requisitos) ── */
.sd-pw-req {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(0, 0, 0, 0.25);
}

.sd-pw-req-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sd-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sd-pw-req-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--sd-muted);
}

.sd-pw-req-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sd-pw-req-list li::before {
  content: "○";
  color: rgba(148, 163, 184, 0.5);
  font-size: 0.75rem;
}

.sd-pw-req-list li.is-ok {
  color: #6ee7b7;
}

.sd-pw-req-list li.is-ok::before {
  content: "✓";
  color: #34d399;
  font-weight: 800;
}

/* ══════════════════════════════════════════
   RESPONSIVO — tablet (≤ 900px): hero some, card centralizado
══════════════════════════════════════════ */
@media (max-width: 900px) {
  body {
    overflow: auto;
    height: auto;
    min-height: 100%;
  }

  .sd-split {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    max-height: none;
    overflow: visible;
  }

  .sd-hero {
    display: none;
  }

  .sd-panel {
    border-left: none;
    background: transparent;
    backdrop-filter: none;
    min-height: 100vh;
    padding: 32px 20px;
    overflow: visible;
  }

  .sd-panel-brand {
    display: flex;
  }
}

/* ══════════════════════════════════════════
   Desktop estreito: manter 2 colunas no grid de features (1 coluna deixava o hero demasiado alto)
══════════════════════════════════════════ */
@media (max-width: 1100px) and (min-width: 901px) {
  .sd-hero {
    padding: clamp(14px, 2.8vh, 32px) clamp(18px, 2.5vw, 36px);
  }

  .sd-feat-list {
    grid-template-columns: 1fr 1fr;
    gap: clamp(5px, 1vh, 10px) clamp(8px, 1.2vw, 14px);
  }
}
