/* LiciPal — login.css */

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--color-bg);
}

.login-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Floating language toggle ─────────────────────────────── */
.lang-float {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
}

/* ── Left brand panel ─────────────────────────────────────── */
.login-brand {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #4338ca 0%, #312e81 60%, #1e1b4b 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 8%;
  color: #fff;
  gap: 0;
}

/* Dot-grid overlay */
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.13) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* All direct children above the overlay */
.login-brand > * { position: relative; z-index: 1; }

/* ── Logo lockup ──────────────────────────────────────────── */
.login-brand__logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.brand-logomark {
  width: 68px;
  height: 68px;
  display: block;
  flex-shrink: 0;
  border-radius: 17px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.28), 0 0 0 6px rgba(255,255,255,0.07);
}

.login-brand__name {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}
.login-brand__name strong { color: #c4b5fd; font-weight: 900; }

/* ── Heading block ────────────────────────────────────────── */
.login-brand__heading {
  margin-bottom: 1.5rem;
}
.login-brand__heading h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 0.65rem;
}
.login-brand__accent { color: #c4b5fd; }
.login-brand__heading p {
  font-size: 1rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.5;
}

/* ── SVG illustration ─────────────────────────────────────── */
.login-brand__preview {
  width: 100%;
  margin-bottom: 1.5rem;
}
.login-brand__preview svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.25));
}

/* ── Feature chips ────────────────────────────────────────── */
.login-brand__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Decorative background text ───────────────────────────── */
.login-brand__deco {
  position: absolute;
  bottom: -0.12em;
  left: -0.04em;
  font-size: clamp(5rem, 11vw, 9.5rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.08);
  letter-spacing: -0.04em;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

/* ── Right form box ───────────────────────────────────────── */
.login-box {
  flex: 0 0 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.5rem;
  background: var(--color-surface);
  box-shadow: -4px 0 32px rgba(0,0,0,.06);
}
.login-box__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.login-box__subtitle {
  color: var(--color-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ── Form elements ────────────────────────────────────────── */
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}
.form-group input {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.form-group input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.form-group input.is-invalid { border-color: #ef4444; }
.form-group input.is-error   { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.10); }

.form-error { font-size: 0.8rem; color: #ef4444; min-height: 1rem; }

.form-alert {
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: #dc2626;
  font-size: 0.88rem;
  display: none;
}
.form-alert.visible { display: block; }
.form-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }

/* ── Input with icon ──────────────────────────────────────── */
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 2.75rem; }
.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--color-muted);
  line-height: 1;
  padding: 0;
}
.toggle-password:hover { color: var(--color-text); }
.toggle-password.is-active { color: var(--color-primary); }
.toggle-password svg { width: 18px; height: 18px; }

/* ── Form options row ─────────────────────────────────────── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--color-muted);
}
.forgot-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: color var(--transition);
  cursor: pointer;
}
.forgot-link:hover { color: var(--color-primary-dark); }

/* ── No-account note ──────────────────────────────────────── */
.login-box__note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

/* ── Login messages ───────────────────────────────────────── */
.login-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-align: center;
}
.login-message.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.login-message.success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }

/* ── Forgot password modal ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: modal-fade-in 0.15s ease;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  background: var(--color-surface);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2rem 2.25rem 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  position: relative;
  animation: modal-slide-in 0.18s ease;
}
@keyframes modal-slide-in {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--color-text); background: var(--color-bg); }
.modal-box h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}
.modal-subtitle {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-wrapper { flex-direction: column; }
  .login-brand { padding: 2.5rem 5%; }
  .login-brand__heading,
  .login-brand__preview,
  .login-brand__chips { display: none; }
  .login-box { flex: none; width: 100%; padding: 2rem 5%; box-shadow: none; }
  .lang-float { top: 0.75rem; right: 0.75rem; }
}

/* ── Rebrand: brillo violeta en el panel de marca ── */
.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 420px at 85% 12%, rgba(139, 92, 246, .35) 0%, transparent 70%),
    radial-gradient(520px 380px at 8% 95%, rgba(99, 102, 241, .3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Botones (login no carga app.css) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: 0 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .28);
}

.btn--primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, .38);
}

.btn--primary:active { transform: none; }

.btn--secondary {
  background: #ffffff;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--secondary:hover { background: var(--color-bg); }

.btn--full { width: 100%; }
