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

:root {
  --g1: #052e16;
  --g2: #14532d;
  --g3: #10b981;
  --g4: #d1fae5;
  --white: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 20px;
  --shadow: 0 24px 60px rgba(0,0,0,.35);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g1);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .45;
  animation: float 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  top: -150px; left: -150px;
}
body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #14532d 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -6s;
}
@keyframes float {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px,30px) scale(1.1); }
}

.card {
  position: relative;
  z-index: 1;
  width: min(1060px, 95vw);
  min-height: 620px;
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: rise .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes rise {
  from { opacity:0; transform:translateY(32px) scale(.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

.panel-left {
  width: 46%;
  position: relative;
  background: var(--g2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 44px;
  text-align: center;
  overflow: hidden;
}
.panel-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 36px 36px;
}
.panel-left::after {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  border: 60px solid rgba(16,185,129,.18);
  border-radius: 50%;
  top: -120px; right: -120px;
}

.logo-wrap {
  position: relative;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}
.logo-wrap img {
  width: 130px; height: 130px;
  object-fit: contain;
}
.logo-placeholder {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.logo-placeholder svg { width: 90px; height: 90px; }

.brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 58px;
  letter-spacing: 8px;
  color: var(--white);
  line-height: 1;
  margin-bottom: 16px;
}
.brand span { color: var(--g3); }

.tagline {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--g4);
  font-weight: 300;
  max-width: 280px;
  opacity: .85;
}

.dots {
  position: absolute;
  bottom: 32px;
  display: flex;
  gap: 8px;
}
.dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}
.dots span:nth-child(2) { background: var(--g3); transform: scale(1.4); }

.panel-right {
  flex: 1;
  background: var(--white);
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.greet-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--g3);
  margin-bottom: 8px;
}
.greet-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 46px;
  letter-spacing: 2px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}
.greet-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 38px;
}

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .5px;
  color: #374151;
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 15px 18px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
  background: #fafafa;
}
.field input:focus {
  border-color: var(--g3);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}

.extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 13px;
}
.extras label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.extras input[type=checkbox] { accent-color: var(--g3); width:14px; height:14px; }
.extras a {
  color: var(--g2);
  font-weight: 500;
  text-decoration: none;
  font-size: 13px;
}
.extras a:hover { text-decoration: underline; }

.btn-login {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--g1) 0%, var(--g3) 100%);
  color: var(--white);
  font-size: 15px;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(16,185,129,.35);
}
.btn-login::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.12), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,185,129,.45); }
.btn-login:hover::after { opacity: 1; }
.btn-login:active { transform: translateY(0); }

.btn-login.loading { pointer-events: none; opacity: .8; }
.btn-login .spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.msg-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  animation: shake .4s ease;
}
.msg-error.show { display: block; }
@keyframes shake {
  0%,100% { transform:translateX(0); }
  20%,60%  { transform:translateX(-6px); }
  40%,80%  { transform:translateX(6px); }
}

.footer-line {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: #d1d5db;
}
.footer-line a { color: var(--g3); text-decoration: none; font-weight: 500; }

@media (max-width: 720px) {
  body { overflow: auto; padding: 20px; align-items: flex-start; }
  .card { flex-direction: column; min-height: unset; }
  .panel-left { width: 100%; padding: 44px 28px; }
  .brand { font-size: 44px; }
  .panel-right { padding: 40px 28px; }
  .greet-title { font-size: 36px; }
}

.btn-back{
    width:100%;
    margin-top:12px;
    padding:14px;

    border:2px solid #10b981;
    border-radius:12px;

    background:transparent;
    color:#10b981;

    font-family:'DM Sans', sans-serif;
    font-size:14px;
    font-weight:600;

    cursor:pointer;
    transition:.3s;
}

.btn-back:hover{
    background:#10b981;
    color:#fff;
}

/* Accesibilidad y ajuste para pantallas de poca altura */
.btn-login:focus-visible,
.btn-back:focus-visible,
.field input:focus-visible,
.eye-btn:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(16,185,129,.45);
  outline-offset: 3px;
}

@media (max-height: 760px) and (min-width: 721px) {
  body { overflow-y: auto; padding: 24px 0; }
  .card { min-height: 580px; }
  .panel-right { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
