/* ═══════════════════════════════════════════════
   JetBox Courier — Login de Cliente
   Adaptación del diseño split-panel moderno
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,500;0,9..40,700;1,9..40,400&family=Sora:wght@400;600;700&display=swap');

:root {
  --bg: #0f172a;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --brand-orange-light: #fbbf24;
  --brand-orange: #f59e0b;
  --brand-orange-dark: #ea580c;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-light: rgba(234,88,12,0.10);
  --orange: #f97316;
  --red: #ef4444;
  --border: #e2e8f0;
  --radius: 24px;
  --radius-sm: 12px;
  --shadow-lg: 0 25px 60px rgba(0,0,0,0.28);
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 55% at 18% 20%, rgba(0,75,96,0.75), transparent 70%),
    radial-gradient(ellipse 65% 55% at 82% 80%, rgba(23,23,23,0.85), transparent 70%),
    radial-gradient(ellipse 50% 40% at 60% 40%, rgba(0,75,96,0.35), transparent 65%),
    linear-gradient(135deg, #004b60 0%, #0a1a22 55%, #0f0f10 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-x: hidden;
  position: relative;
}
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
body::before {
  width: 520px; height: 520px;
  left: -12%; top: -8%;
  background: radial-gradient(circle, rgba(0,75,96,0.55), transparent 65%);
}
body::after {
  width: 620px; height: 620px;
  right: -14%; bottom: -12%;
  background: radial-gradient(circle, rgba(30,30,30,0.65), transparent 65%);
}
.login-card { position: relative; z-index: 2; }

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}

/* ═══ CARD ═══ */
.login-card {
  width: 100%;
  max-width: 1040px;
  min-height: 620px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
}

/* ═══ PANEL IZQUIERDO (imagen) ═══ */
.login-visual {
  flex: 1 1 50%;
  position: relative;
  overflow: hidden;
  background: #0f172a;
  min-height: 620px;
}
.login-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.login-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.18) 0%, rgba(15,23,42,0.55) 100%);
}
.login-back {
  position: absolute;
  top: 22px; left: 22px;
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: background 0.18s;
  cursor: pointer;
}
.login-back:hover { background: rgba(0,0,0,0.45); }
.login-back .material-symbols-outlined { font-size: 22px; }

.login-visual-brand {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 36px 34px;
  z-index: 2;
  color: #fff;
}
.login-visual-brand img {
  max-width: 140px;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.35));
}
.login-visual-brand h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.login-visual-brand p {
  font-size: 0.95rem;
  opacity: 0.88;
  max-width: 360px;
}

/* ═══ PANEL DERECHO (formulario) ═══ */
.login-form-wrap {
  flex: 1 1 50%;
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.login-form-wrap h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 30px;
}
.login-subtitle a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.login-subtitle a:hover { text-decoration: underline; }

.login-form .field {
  margin-bottom: 18px;
}
.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.login-input-wrap {
  position: relative;
}
.login-input-wrap > .material-symbols-outlined.field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
  pointer-events: none;
}
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: all 0.18s;
}
.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.12);
}
.login-form input::placeholder { color: var(--text-muted); }

.toggle-pass {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.toggle-pass:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.toggle-pass .material-symbols-outlined { font-size: 20px; }

/* Row: forgot password */
.login-extras {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 18px;
}
.login-extras a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.login-extras a:hover { color: var(--accent); }

/* Botón principal */
.btn-login {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--text);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover { background: #1f2937; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,23,42,0.22); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Error box */
.login-error {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.08);
  border-left: 3px solid var(--red);
  color: #b91c1c;
  font-size: 0.88rem;
}
.login-error.show { display: block; }

/* Footer del formulario */
.login-footer {
  margin-top: 26px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.login-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }

/* ═══ MODAL recuperar contraseña ═══ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.modal-content input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.18s;
}
.modal-content input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.12);
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.btn-ghost, .btn-primary {
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: #f1f5f9; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
  .login-card { min-height: unset; }
  .login-visual { display: none; }
  .login-form-wrap { padding: 36px 28px; }
}
@media (max-width: 500px) {
  body { padding: 0; }
  .login-card { border-radius: 0; min-height: 100vh; box-shadow: none; }
  .login-form-wrap { padding: 28px 20px; justify-content: flex-start; padding-top: 48px; }
  .login-form-wrap h1 { font-size: 1.55rem; }
}
