@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  --ink:        #070D16;
  --ink-2:      #0B1422;
  --ink-3:      #101D30;
  --ink-4:      #172540;
  --ink-5:      #1E3050;
  --teal:       #D4A017;
  --teal-dim:   #A07010;
  --teal-glow:  rgba(212,160,23,0.12);
  --teal-faint: rgba(212,160,23,0.06);
  --slate:      #7A95AF;
  --slate-dim:  #3D5A74;
  --white:      #EDF2F7;
  --white-dim:  #B8CCE0;
  --border:     rgba(120,160,200,0.1);
  --border-md:  rgba(120,160,200,0.2);
  --border-hi:  rgba(212,160,23,0.3);
  --green:      #D4A017;
  --red:        #FF5C5C;
  --redbg:      rgba(255,92,92,0.08);
  --greenbg:    rgba(0,201,167,0.08);
  --radius:     16px;
  --radius-sm:  10px;
  --radius-xs:  7px;
}

html, body {
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── FUNDO ── */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

/* grade de pontos */
.page::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(120,160,200,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* glow teal canto superior direito */
.page::after {
  content: '';
  position: fixed;
  top: -300px; right: -300px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,201,167,0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* ── CARD ── */
.card {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 52px;
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: riseIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

/* linha teal no topo */
.card::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-dim), transparent);
  border-radius: 1px;
}

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.logo-mark {
  width: 44px; height: 44px;
  background: var(--teal-faint);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 20px; height: 20px;
  fill: var(--teal);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--white);
  line-height: 1;
}

.logo-name span { color: var(--teal); }

.logo-tag {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--slate);
  font-family: 'DM Mono', monospace;
}

/* ── HEADING ── */
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.2;
}

.card-sub {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ── FORM ── */
.field { margin-bottom: 20px; }

label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--slate-dim);
  pointer-events: none;
  display: flex; align-items: center;
}

.input-icon svg {
  width: 15px; height: 15px;
  fill: var(--slate-dim);
}

input[type=email],
input[type=password],
input[type=text] {
  width: 100%;
  background: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px 13px 42px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

input::placeholder { color: var(--slate-dim); }

input:focus {
  border-color: var(--teal-dim);
  background: var(--ink-4);
}

/* toggle senha */
.toggle-pw {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--slate-dim); cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 11px; padding: 4px 6px;
  transition: color 0.2s; letter-spacing: 0.3px;
}
.toggle-pw:hover { color: var(--teal); }

/* ── BOTÕES ── */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  border: none; text-decoration: none;
  letter-spacing: 0.1px;
}

.btn-primary {
  background: var(--teal);
  color: var(--ink);
}
.btn-primary:hover {
  background: #00D9B5;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,201,167,0.25);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--border);
  margin-top: 10px;
  font-size: 14px;
}
.btn-ghost:hover { border-color: var(--border-md); color: var(--white-dim); }

/* ── ALERTS ── */
.alert {
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  font-size: 13px; line-height: 1.5;
  margin-bottom: 20px;
  display: none;
  border: 1px solid;
}
.alert-error   { background: var(--redbg);   border-color: rgba(255,92,92,0.25);   color: #FF8080; }
.alert-success { background: var(--greenbg); border-color: rgba(0,201,167,0.25);   color: var(--teal); }

/* ── LINK ── */
.link-row {
  text-align: center; margin-top: 8px;
  font-size: 13px; color: var(--slate);
}
.link-row a {
  color: var(--teal); text-decoration: none; font-weight: 500;
  transition: color 0.2s;
}
.link-row a:hover { color: #00D9B5; }

.forgot-link {
  font-size: 12px; color: var(--slate-dim);
  text-decoration: none; transition: color 0.2s;
  font-family: 'DM Mono', monospace; letter-spacing: 0.2px;
}
.forgot-link:hover { color: var(--teal); }

/* ── FOOTER CARD ── */
.card-foot {
  text-align: center; margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--slate-dim);
  font-family: 'DM Mono', monospace;
}

/* ── SPINNER ── */
.spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(7,13,22,0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: rot 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* ── STRENGTH BAR ── */
.strength-wrap { margin-top: 8px; }
.strength-track {
  height: 2px; background: var(--ink-5);
  border-radius: 2px; overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: 2px;
  transition: all 0.35s; width: 0;
}
.strength-label {
  font-size: 11px; color: var(--slate-dim);
  margin-top: 5px; font-family: 'DM Mono', monospace;
  letter-spacing: 0.3px;
}

/* ── ANIMAÇÃO ── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
