:root{
  --bg:#A6AEBA;
  --outer:#cfd3da;
  --panel:#0034c8;
  --panel-dark:#002a9a;
  --card:var(--panel);

  --text:#ffffff;
  --text-dark:#111827;
  --muted:#4b5563;
  --link:#FF8C11;

  --input-bg:#f9fafb;
  --input-border:#d1d5db;
  --placeholder:#9ca3af;

  --error-bg:#fee2e2;
  --error-border:#fecaca;
  --error-text:#7f1d1d;

  --radius-lg:18px;
  --radius-md:12px;
  --radius-sm:8px;

  --shadow-outer:0 10px 28px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.6);
  --shadow-inner:inset 0 2px 0 rgba(255,255,255,.25);
  --shadow-card:0 6px 18px rgba(0,0,0,.12);
  --shadow-btn:0 2px 0 rgba(255,255,255,.7) inset, 0 3px 0 #b6bcc6, 0 6px 16px rgba(0,0,0,.15);

  --gap:12px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  padding:20px;
  min-height:100vh;

  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;

  display:flex;
  justify-content:center;
  align-items:flex-start;
}

/* Layout */
.wrap{
  width:100%;
  max-width:420px;
  display:flex;
  flex-direction:column;
  gap:var(--gap);
}

.outer{
  padding:14px;
  border-radius:var(--radius-lg);
  background:linear-gradient(#d9dce2,var(--outer));
  box-shadow:var(--shadow-outer);
}

.inner{
  padding:22px;
  border-radius:var(--radius-md);
  background:linear-gradient(180deg,var(--panel) 0%, var(--panel-dark) 100%);
  color:var(--text);
  text-align:center;

  display:flex;
  flex-direction:column;
  gap:18px;

  box-shadow:var(--shadow-inner);
}

/* Branding */
.logo img{
  width:100%;
  max-width:184px;
  height:auto;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.3));
}

.title{
  font-weight:700;
  font-size:clamp(16px,2.5vw,20px);
  letter-spacing:.4px;
}

/* Messages */
.error{
  padding:8px;
  border-radius:var(--radius-sm);
  text-align:center;
  font-weight:500;

  background:var(--error-bg);
  color:var(--error-text);
  border:1px solid var(--error-border);
}

/* Card / Form */
.card{
  padding:16px;
  border-radius:10px;
  background:var(--card);
  color:var(--text);
  box-shadow:var(--shadow-card);

  display:flex;
  flex-direction:column;
  gap:var(--gap);
}

form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.row{
  display:flex;
  flex-direction:column;
  gap:6px;
  text-align:left;
}

.label{
  font-weight:500;
  color:var(--text);
}

input[type="text"],
input[type="password"]{
  width:100%;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  border:1px solid var(--input-border);
  background:var(--input-bg);
  font:inherit;
  color:var(--text-dark);
}

input::placeholder{color:var(--placeholder)}

/* Accesibilidad: focus claro */
input:focus{
  outline:2px solid rgba(255,255,255,.7);
  outline-offset:2px;
}

/* Captcha */
.captchaBox{
  height:70px;
  overflow:hidden;
  border-radius:var(--radius-sm);

  display:flex;
  justify-content:center;
  align-items:center;

  background:var(--panel);
  border:0;
}

.captchaBox img{
  max-height:120%;
  cursor:pointer;
}

/* Actions */
.actions{
  margin-top:4px;
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
}

.btn{
  border:0;
  cursor:pointer;
  font-weight:700;
  padding:10px 18px;
  border-radius:10px;

  color:var(--text-dark);
  background:linear-gradient(#fff,#e5e7eb);
  box-shadow:var(--shadow-btn);

  text-transform:uppercase;
  letter-spacing:1.2px;
}

.btn:hover{filter:brightness(.98)}
.btn:active{transform:translateY(1px)}
.btn:focus{outline:2px solid rgba(255,255,255,.7); outline-offset:3px}

/* Links / Footer */
.link{
  text-align:center;
  font-size:12px;
}

.link a{
  color:var(--link);
  text-decoration:none;
  font-weight:700;
}

.link a:hover{text-decoration:underline}

.footer{
  margin-top:8px;
  text-align:center;
  font-size:12px;
  color:var(--muted);

  display:flex;
  flex-direction:column;
  gap:4px;
}

/* Responsive */
@media (max-width:480px){
  body{padding:10px}
  .inner{padding:16px}
  .card{padding:12px}
}
