/* css/login.css
   Adaptado desde tu referencia "assets/css/login.css"
   para el HTML nuevo: .page, .login-card, .brand__, .input, .btn, .eye
*/

:root{
  --sodi-blue-1: #005579;
  --sodi-blue-2: #001f4d;
  --sodi-yellow: #FBA600;

  --muted: rgba(255,255,255,.78);
  --border: rgba(255,255,255,.18);

  --r-md: 14px;
  --r-lg: 22px;

  --shadow-lg: 0 28px 70px rgba(0,0,0,.35);
}

*{ box-sizing: border-box; }
html, body {
  height: 100%;
  overscroll-behavior-y: auto;
}

html{
  margin: 0;
  background:
    linear-gradient(135deg, rgba(0,31,77,.92), rgba(0,85,121,.78)),
    url("../images/bg_general.png") no-repeat center center fixed;
  background-size: cover;
  background-color: #001f4d;
}

body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: #fff;
  background: transparent;
}

/* ====== FONDO (antes era body). Ahora es .page ====== */
.page{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px;
  background: transparent;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

@supports (height: 100dvh){
  .page{
    min-height: 100dvh;
  }
}
@supports (height: 100svh){
  .page{
    min-height: 100svh;
  }
}

.page.keyboard-open{
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ====== CARD (igual a tu referencia) ====== */
.login-card{
  width: 100%;
  max-width: 520px;
  max-height: calc(100svh - 24px);
  padding: 34px 34px 28px;
  border-radius: var(--r-lg);

  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.08));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  text-align:center;
  animation: fadeUp .6s ease forwards;

  position: relative;
  overflow: auto;
}

/* brillo interno suave (para que se parezca mas a la captura) */
.login-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(520px 260px at 35% 18%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(620px 320px at 70% 90%, rgba(255,255,255,.06), transparent 60%);
  pointer-events:none;
}
.login-card > *{ position: relative; z-index: 1; }

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ====== BRAND (equivalente a login-logo/title/sub) ====== */
.brand{
  text-align: center;
  margin-bottom: 18px;
}

.brand__logo{
  width: 160px; /* como tu referencia */
  max-width: 70%;
  height: auto;
  display:block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.30));
}

.brand__name{
  font-weight: 900;
  font-size: 44px;
  letter-spacing: 3px;
  margin: 4px 0 8px;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0,0,0,.30);
}

.brand__subtitle{
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .6px;
}

/* ====== FORM ====== */
.form{ margin-top: 10px; }
.field{ margin-bottom: 12px; }

/* ====== INPUTS (equivalente a .login-input) ====== */
.input{
  width: 100%;
  height: 46px;
  font-size: 15px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.22);

  background: rgba(255,255,255,.10);
  color: #fff;

  outline: none;
  padding: 0 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input::placeholder{
  color: rgba(255,255,255,.68);
  font-weight: 700;
}

.input:focus{
  border-color: rgba(251,166,0,.70);
  box-shadow: 0 0 0 4px rgba(251,166,0,.20);
  background: rgba(255,255,255,.14);
}

.input.error{
  border-color: rgba(255,70,70,.70);
  box-shadow: 0 0 0 4px rgba(255,70,70,.20);
}

/* ====== PASSWORD con icono (tu HTML usa .field--password + .eye) ====== */
.field--password{
  position: relative;
  width: 100%;
}

.field--password .input{
  padding-right: 46px; /* espacio para el ojo */
}

.eye{
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}

.eye:hover{
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.95);
  transform: translateY(-50%) scale(1.03);
}

/* ====== BOTON (equivalente a .login-btn) ====== */
.btn{
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;

  font-family: "Inter", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: .6px;
  font-size: 15px;

  background: linear-gradient(135deg, var(--sodi-yellow), #ffd36a);
  color: #1c1405;

  box-shadow: 0 16px 34px rgba(251,166,0,.22);
  transition: transform .08s ease, filter .12s ease, box-shadow .12s ease;
}

.btn:hover{
  filter: brightness(1.02);
  box-shadow: 0 20px 45px rgba(251,166,0,.26);
}

.btn:active{
  transform: scale(.99);
}

/* ====== ALERTA (por si la agregas despues) ====== */
.login-alert{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 70, 70, .35);
  background: rgba(255, 70, 70, .16);
  color: #ffe9e9;
  font-weight: 900;
  font-size: 13px;
  text-align: center;
}

/* ==========================================================
   COMPATIBILIDAD EXTRA (si vuelves al JS anterior)
   password-wrapper + pass-toggle + caps-hint
   (no afecta si no existe en el HTML)
========================================================== */
.password-wrapper{ position: relative; width: 100%; }
.password-wrapper .input{ padding-right: 46px; }

.pass-toggle{
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pass-toggle-img{
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: .78;
  transition: opacity .15s ease, transform .15s ease, filter .15s ease;
}

.pass-toggle:hover .pass-toggle-img{
  opacity: 1;
  transform: scale(1.06);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.25));
}

.caps-hint{
  margin: -4px 0 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255, 210, 120, .95);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px){
  .page{
    padding: 20px 12px;
    background-attachment: scroll;
  }
  .login-card{
    max-width: 470px;
    padding: 28px 22px 22px;
  }
  .brand__logo{ width: 138px; }
  .brand__name{ font-size: 36px; letter-spacing: 2px; }
}

@media (max-width: 480px){
  .page{
    padding: 12px 10px;
    align-items: center;
  }
  .login-card{
    max-width: 420px;
    padding: 20px 14px 16px;
    border-radius: 18px;
  }
  .brand{ margin-bottom: 10px; }
  .brand__name{ font-size: 30px; letter-spacing: 1.2px; margin: 2px 0 5px; }
  .brand__logo{ width: 106px; margin-bottom: 6px; }
  .brand__subtitle{ margin: 0 0 10px; font-size: 11.5px; letter-spacing: .35px; }
  .form{ margin-top: 6px; }
  .field{ margin-bottom: 10px; }
  .input{ height: 42px; font-size: 16px; }
  .btn{ height: 46px; }
  .eye{
    width: 32px;
    height: 32px;
    right: 10px;
  }
}

@media (max-width: 360px){
  .page{ padding: 10px 8px; }
  .login-card{ padding: 16px 12px 14px; border-radius: 16px; }
  .brand{ margin-bottom: 8px; }
  .brand__logo{ width: 88px; margin-bottom: 4px; }
  .brand__name{ font-size: 24px; letter-spacing: .8px; margin: 0 0 3px; }
  .brand__subtitle{ font-size: 10.5px; margin: 0 0 8px; }
  .field{ margin-bottom: 8px; }
  .input{ height: 40px; font-size: 16px; }
  .btn{ height: 42px; font-size: 14px; }
}

@media (max-height: 740px){
  .page{
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-y: auto;
  }
}

@media (max-height: 640px){
  .login-card{ max-height: calc(100svh - 16px); }
  .brand{ margin-bottom: 6px; }
  .brand__logo{ width: 80px; margin-bottom: 3px; }
  .brand__name{ font-size: 22px; margin: 0 0 2px; }
  .field{ margin-bottom: 7px; }
  .input{ height: 38px; }
  .btn{ height: 40px; }
}

@media (max-height: 560px){
  .page{
    align-items: flex-start;
  }
}
