/* ================================================================
   Sales On Top — Auth Styles
   Coherente con el dark theme de la landing page (index.html)
   ================================================================ */

/* Google Font — Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

:root {
  --bg: #0b0c10;
  --card: #11131a;
  --card2: #15182200;
  --text: #e9ecf1;
  --muted: #a8b0c0;
  --line: #242a3a;
  --brand: #d16502;
  --brand-glow: rgba(209, 101, 2, 0.30);
  --brand-hover: #e87515;
  --ok: #22c55e;
  --error: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(1100px 700px at 10% -10%, rgba(209, 101, 2, .18), transparent 60%),
    radial-gradient(800px 600px at 90% 5%, rgba(209, 101, 2, .10), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(209, 101, 2, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-hover);
}

/* ── Layout ────────────────────────────────────────────── */
.login-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
  gap: 20px;
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Logo ──────────────────────────────────────────────── */
.login-brand {
  display: flex;
  justify-content: center;
  width: 130%;
  margin-bottom: 8px;
}

.login-logo {
  height: auto;
  width: 85%;
  max-width: 320px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(209, 101, 2, .30));
  transition: filter 0.2s ease;
}

.login-logo:hover {
  filter: drop-shadow(0 0 20px rgba(209, 101, 2, .50));
}

/* ── Card ──────────────────────────────────────────────── */
.login-card {
  width: 100%;
  background: linear-gradient(160deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .02) 100%);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--radius);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(209, 101, 2, .06) inset;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

/* ── Header ────────────────────────────────────────────── */
.login-header {
  padding: 24px 44px 0;
  text-align: center;
}

.login-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--text);
}

.login-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* ── Alert ─────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 44px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  animation: slideIn 0.25s ease both;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.30);
  color: #86efac;
}

/* ── Form ──────────────────────────────────────────────── */
form {
  display: grid;
  gap: 14px;
  padding: 20px 44px 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.field-input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
  color: rgba(168, 176, 192, 0.45);
}

.field-input:focus {
  border-color: rgba(209, 101, 2, 0.60);
  box-shadow: 0 0 0 3px rgba(209, 101, 2, 0.12);
  background: rgba(255, 255, 255, .06);
}

.field-input:focus+.field-icon,
.field-wrap:focus-within .field-icon {
  color: var(--brand);
}

/* Password toggle button */
.toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.toggle-pwd:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

/* Ocultar el span de ojo cerrado por defecto */
.eye-hide {
  display: none;
}



/* ── Submit Button ──────────────────────────────────────── */
.btn-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #e87515);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 8px 28px rgba(209, 101, 2, 0.35),
    0 2px 0 rgba(255, 255, 255, .10) inset;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.btn-login:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(209, 101, 2, 0.45), 0 2px 0 rgba(255, 255, 255, .10) inset;
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinner */
.btn-login-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .30);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
}

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

/* ── Footer de la card ──────────────────────────────────── */
.login-footer {
  padding: 0 44px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 16px;
  margin-top: -8px;
}

.login-footer a {
  font-weight: 700;
}

/* ── Copyright ──────────────────────────────────────────── */
.login-copy {
  font-size: 12px;
  color: rgba(168, 176, 192, 0.45);
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .login-wrap {
    gap: 16px;
  }

  .login-card {
    border-radius: 16px;
  }

  .login-header {
    padding: 22px 20px 0;
  }

  form {
    padding: 20px 20px 24px;
  }

  .alert {
    margin: 16px 20px 0;
  }

  .login-footer {
    padding: 14px 20px 18px;
  }
}