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

/* ─── Tokens DieselControl ── */
:root {
  --gold:        #E8A400;
  --gold-dim:    #B07C00;
  --gold-lt:     rgba(232,164,0,.12);
  --green:       #43A047;
  --green-bright:#66BB6A;
  --green-dim:   #2E7D32;
  --green-border:rgba(67,160,71,.25);
  --red:         #EF5350;
  --bg-0:        #080D08;
  --bg-1:        #0D130D;
  --bg-2:        #121A12;
  --bg-3:        #1A241A;
  --text:        #EDF2ED;
  --text-dim:    #7A9A7A;
  --text-muted:  #4A664A;
  --border:      rgba(67,160,71,.15);
}

/* ── Body ── */
body {
  font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Wrapper externo ── */
.login-wrapper {
  width: 100%;
  max-width: 780px;
  animation: fadeUp .4s cubic-bezier(.16,1,.3,1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ── Tarjeta contenedora (split) ── */
.login-card {
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.7), 0 4px 16px rgba(0,0,0,.5);
  border: 1px solid var(--border);
  min-height: 520px;
}

/* ══════════════════════════════════════
   PANEL IZQUIERDO — DieselControl dark
══════════════════════════════════════ */
.login-left {
  width: 270px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #060C06 0%, #0A130A 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

/* Grid de circuito */
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(67,160,71,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67,160,71,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

/* Orb decorativo */
.login-left::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,164,0,.14), transparent 70%);
  top: -80px; right: -60px;
  filter: blur(40px);
  pointer-events: none;
}

.left-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.75rem;
  text-align: center;
}

/* Logo imagen */
.login-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.login-logo-img {
  width: auto;
  height: 56px;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* Fallback text (si imagen no carga) */
.logo-box {
  width: 86px; height: 86px;
  border-radius: 16px;
  background: rgba(232,164,0,.08);
  border: 1.5px solid rgba(232,164,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 24px rgba(232,164,0,.12);
}
.logo-box span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--gold);
  letter-spacing: 2px;
  line-height: 1;
}

/* Nombre de marca */
.brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 8px;
}
.brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

/* Badge pill */
.left-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(67,160,71,.1);
  border: 1px solid rgba(67,160,71,.3);
  border-radius: 999px;
  padding: 5px 14px;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}
.badge-txt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--green-bright);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Gauge decorativo — recoloreado */
.gauge-deco {
  margin-top: 2rem;
  opacity: .12;
  filter: hue-rotate(20deg);
}

/* ══════════════════════════════════════
   PANEL DERECHO — formulario dark
══════════════════════════════════════ */
.login-right {
  flex: 1;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.75rem 2.5rem;
}

.right-header { margin-bottom: 1.75rem; }

.right-welcome {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 3px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.right-sub {
  font-size: 13px;
  color: var(--text-dim);
}

/* Alerta de error */
.alerta-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239,83,80,.08);
  border: 1px solid rgba(239,83,80,.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.alerta-error svg { flex-shrink: 0; color: var(--red); }

/* Campos */
.campo { margin-bottom: 1rem; }

.campo label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 7px;
}

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

.input-wrap > svg {
  position: absolute;
  left: 12px;
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
  transition: color .15s;
}
.input-wrap:focus-within > svg { color: var(--gold); }

.input-wrap input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-2);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-wrap input::placeholder { color: var(--text-muted); }
.input-wrap input:hover:not(:focus) { border-color: rgba(67,160,71,.3); }
.input-wrap input:focus {
  border-color: var(--gold);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(232,164,0,.12);
}

/* Botón ojo contraseña */
.toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color .15s;
}
.toggle-pass:hover { color: var(--gold); }
.toggle-pass svg { width: 15px; height: 15px; }

/* Fila extras */
.row-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.check-label input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.link-olvide {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  transition: color .15s;
}
.link-olvide:hover { color: var(--gold-dim); }

/* Botón principal */
.btn-login {
  width: 100%;
  padding: 13px 20px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.btn-login svg { width: 16px; height: 16px; transition: transform .2s; }
.btn-login:hover {
  background: var(--green-bright);
  box-shadow: 0 6px 24px rgba(67,160,71,.35);
  transform: translateY(-1px);
}
.btn-login:hover svg { transform: translateX(4px); }
.btn-login:active { transform: translateY(0); box-shadow: none; }

/* Footer del formulario */
.right-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.right-footer svg { width: 11px; height: 11px; color: var(--text-muted); flex-shrink: 0; }
.right-footer span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 600px) {
  body { padding: 0; align-items: flex-end; }

  .login-card {
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    min-height: auto;
  }

  .login-left {
    width: 100%;
    padding: 2rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .left-inner {
    flex-direction: row;
    gap: 1rem;
    text-align: left;
    padding: 0;
  }

  .login-logo-wrap { margin-bottom: 0; flex-shrink: 0; }
  .login-logo-img { height: 38px; max-width: 120px; }
  .logo-box { width: 56px; height: 56px; margin-bottom: 0; flex-shrink: 0; }
  .logo-box span { font-size: 24px; }
  .brand-name { font-size: 18px; }
  .brand-sub { display: none; }
  .left-badge { display: none; }
  .gauge-deco { display: none; }

  .login-right { padding: 1.75rem 1.5rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .login-wrapper { animation: none; }
  .badge-dot { animation: none; }
  * { transition-duration: .01ms !important; }
}
