/* ════════════════════════════════════════════════════════════
   DIPRO — Login Shared Styles (staff + cliente)
   Standalone: does NOT depend on dipro.css
   ════════════════════════════════════════════════════════════ */

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

:root {
  --lp-navy:       #0F2240;
  --lp-navy-mid:   #1A3A5C;
  --lp-verde:      #2E7D32;
  --lp-verde-lt:   #43A047;
  --lp-verde-dark: #1B5E20;
  --lp-verde-pale: #E8F5E9;
  --lp-text:       #1A1A2E;
  --lp-muted:      #6B7280;
  --lp-border:     #E5E7EB;
  --lp-danger:     #C62828;
  --lp-bg:         #F8FAFC;
}

html, body {
  height: 100%;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 16px;
}

body {
  display: flex;
  min-height: 100vh;
  background: var(--lp-navy);
}

/* ── Layout: panel brand (izq) + panel form (der) ── */
.lp-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 44%;
  min-height: 100vh;
  padding: 3rem 3.5rem;
  background: linear-gradient(160deg, #0F2240 0%, #1A3A5C 58%, #1B5E20 100%);
  position: relative;
  overflow: hidden;
}

/* Anillos decorativos */
.lp-brand::before,
.lp-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .06);
  pointer-events: none;
}
.lp-brand::before { width: 520px; height: 520px; top: -130px; left: -130px; }
.lp-brand::after  { width: 340px; height: 340px; bottom: 50px; right: -90px; }

.lp-brand-deco {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(46, 125, 50, .18);
  bottom: -65px;
  left: -45px;
  pointer-events: none;
}

/* Logo */
.lp-brand-logo {
  position: relative;
  z-index: 1;
}
.lp-brand-logo img {
  height: 42px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

/* Cuerpo brand */
.lp-brand-body {
  position: relative;
  z-index: 1;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(46, 125, 50, .28);
  border: 1px solid rgba(67, 160, 71, .38);
  color: #A5D6A7;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .32rem .78rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.lp-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 2.35rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1rem;
}
.lp-title span { color: #81C784; }

.lp-desc {
  color: rgba(255, 255, 255, .58);
  font-size: .98rem;
  line-height: 1.65;
  max-width: 340px;
}

.lp-features {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.lp-features li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: rgba(255, 255, 255, .72);
  font-size: .88rem;
}
.lp-features li .lp-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: rgba(46, 125, 50, .32);
  border-radius: 50%;
}

/* Footer brand */
.lp-brand-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .28);
  font-size: .73rem;
}

/* ── Panel form (derecho) ── */
.lp-form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: var(--lp-bg);
}

.lp-card {
  width: 100%;
  max-width: 420px;
}

/* Header del form */
.lp-header {
  margin-bottom: 2.25rem;
}
.lp-header h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--lp-text);
  margin-bottom: .35rem;
}
.lp-header p {
  color: var(--lp-muted);
  font-size: .93rem;
}

/* ── Campos ── */
.lp-field {
  margin-bottom: 1.25rem;
}
.lp-field label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--lp-text);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .48rem;
}
.lp-input-wrap {
  position: relative;
}
.lp-input-wrap .lp-input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lp-muted);
  pointer-events: none;
  display: flex;
}
.lp-input-wrap input {
  width: 100%;
  padding: .82rem 1rem .82rem 2.65rem;
  border: 1.5px solid var(--lp-border);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--lp-text);
  background: #fff;
  outline: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.lp-input-wrap input:focus {
  border-color: var(--lp-verde-lt);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, .15);
}
.lp-input-wrap input::placeholder { color: #B0BEC5; }
.lp-input-wrap input.is-invalid   { border-color: var(--lp-danger); }
.lp-input-wrap input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .15);
}

/* Toggle contraseña */
.lp-toggle-pw {
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--lp-muted);
  padding: .25rem;
  line-height: 0;
  transition: color .2s;
}
.lp-toggle-pw:hover { color: var(--lp-verde); }

/* ── Error ── */
.lp-error {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--lp-danger);
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .88rem;
  margin-bottom: 1.5rem;
  animation: lp-shake .3s ease;
}
.lp-error svg { flex-shrink: 0; margin-top: 1px; }

@keyframes lp-shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

/* ── Botón principal ── */
.lp-btn {
  display: block;
  width: 100%;
  padding: .9rem 1rem;
  background: linear-gradient(135deg, var(--lp-verde) 0%, var(--lp-verde-lt) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(46, 125, 50, .35);
  margin-top: .35rem;
  position: relative;
  overflow: hidden;
}
.lp-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, .14), transparent);
  pointer-events: none;
}
.lp-btn:hover  {
  opacity: .93;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, .42);
}
.lp-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(46, 125, 50, .28);
}
.lp-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* ── Separador + enlace inferior ── */
.lp-divider {
  border: none;
  border-top: 1px solid var(--lp-border);
  margin: 1.75rem 0 1.1rem;
}

.lp-foot {
  text-align: center;
  font-size: .82rem;
}
.lp-foot p { color: var(--lp-muted); margin-bottom: .4rem; }
.lp-foot a {
  color: var(--lp-muted);
  text-decoration: none;
  transition: color .2s;
}
.lp-foot a:hover { color: var(--lp-verde); }
.lp-foot a.lp-link-green {
  font-weight: 700;
  color: var(--lp-verde);
  font-size: .88rem;
}
.lp-foot a.lp-link-green:hover { color: var(--lp-verde-lt); }

.lp-copy {
  margin-top: 1.6rem;
  text-align: center;
  font-size: .76rem;
  color: #C0C9D4;
}

/* ── Lockout panel ── */
.lp-lockout {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.5rem;
  animation: lp-shake .35s ease;
}
.lp-lockout-ico { color: #DC2626; flex-shrink: 0; margin-top: 1px; }
.lp-lockout-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .92rem;
  color: #7F1D1D;
  margin-bottom: .2rem;
}
.lp-lockout-msg  { font-size: .82rem; color: #B91C1C; line-height: 1.5; }
.lp-lockout-timer {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: #DC2626;
  letter-spacing: .06em;
  margin-top: .4rem;
  line-height: 1;
}

/* ── Attempts warning ── */
.lp-warning {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 9px;
  padding: .7rem .95rem;
  margin-bottom: 1.25rem;
  font-size: .84rem;
  color: #78350F;
  line-height: 1.45;
}
.lp-warning svg { color: #D97706; flex-shrink: 0; }
.lp-warning strong { font-weight: 700; color: #92400E; }

/* Disabled state when locked */
.lp-form-locked input,
.lp-form-locked .lp-toggle-pw {
  opacity: .42;
  cursor: not-allowed;
  pointer-events: none;
}
.lp-form-locked .lp-btn {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: #9CA3AF;
}

/* ── Responsive ── */
@media (max-width: 820px) {
  .lp-brand {
    width: 100%;
    min-height: auto;
    padding: 2rem 1.75rem 2.5rem;
  }
  .lp-title      { font-size: 1.75rem; }
  .lp-features   { display: none; }
  .lp-brand-footer { display: none; }

  body { flex-direction: column; }
  .lp-form { padding: 2rem 1.25rem 3rem; }
}

@media (max-width: 480px) {
  .lp-title { font-size: 1.45rem; }
  .lp-card  { max-width: 100%; }
}
