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

:root {
  --bg:        #0a0c10;
  --surface:   #13161d;
  --border:    #1e2330;
  --gold:      #E8A020;
  --gold-dim:  #b37a18;
  --text:      #e8eaf0;
  --muted:     #6b7280;
  --error:     #e05252;
}


body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Fundo sutil com grade */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(#b37a1817 1px, transparent 1px),
    linear-gradient(90deg, #b37a1817 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
}

/* Linha dourada no topo */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 40px; right: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 0 0 2px 2px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #0a0c10;
  flex-shrink: 0;
}

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

.logo-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

input::placeholder { color: var(--muted); }

input:focus {
  border-color: var(--gold);
}

.error-box {
  display: none;
  background: rgba(224, 82, 82, 0.08);
  border: 1px solid rgba(224, 82, 82, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--error);
  margin-bottom: 18px;
  line-height: 1.5;
}

.error-box.visible { display: block; }

button[type="submit"] {
  width: 100%;
  background: var(--gold);
  color: #0a0c10;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, opacity 0.2s;
  margin-top: 8px;
}

button[type="submit"]:hover { background: #f0b030; }
button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10,12,16,0.3);
  border-top-color: #0a0c10;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

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

button[type="submit"].loading .btn-label { display: none; }
button[type="submit"].loading .spinner { display: block; }

/* Estilos para o botão de mostrar/ocultar senha */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 45px; /* Adiciona espaço para o ícone */
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 15px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--muted);
}
