:root {
  --blue: #0087e8;
  --blue-2: #27a0f6;
  --blue-dk: #006ed1;
  --blue-soft: #eaf4fd;
  --bg: #f3f8fd;
  --ink: #0f2138;
  --ink-2: #34485f;
  --muted: #6e8298;
  --border: #d9e7f3;
  --border2: #c7ddef;
  --shadow-sm: 0 2px 10px rgba(4, 129, 247, .07);
  --shadow-md: 0 8px 32px rgba(4, 129, 247, .11);
  --shadow-lg: 0 20px 60px rgba(4, 129, 247, .15);
  --f-disp: 'Sora', sans-serif;
  --f-body: 'DM Sans', sans-serif;
  --f-mono: 'DM Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--f-body);
  background: linear-gradient(150deg, #F6F9FD 0%, #EDF4FB 55%, #E2EFF9 100%);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── CANVAS BG (reutiliza el del sitio) ── */
#fiber-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

/* ── SHELL ── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

/* ── CARD ── */
.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(4, 129, 247, .12);
  border-radius: 28px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

/* ── BRAND ── */
.lc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.lc-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 16px;
  padding: 3px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(0, 135, 232, .14);
  box-shadow: 0 8px 20px rgba(0, 135, 232, .12);
  flex-shrink: 0;
}

.lc-brand-txt {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.lc-brand-name {
  font-family: var(--f-disp);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--ink);
}

.lc-brand-name span {
  color: var(--blue);
}

.lc-brand-sub {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 5px;
  font-family: var(--f-mono);
}

/* ── HEAD ── */
.lc-head {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.lc-head h2 {
  font-family: var(--f-disp);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.05;
}

.lc-head p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── ALERT ── */
.alert-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 13px;
  background: #fff5f5;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
}

.alert-error i {
  font-size: 16px;
  flex-shrink: 0;
}

/* ── FIELDS ── */
.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--f-body);
}

.input-wrap {
  position: relative;
}

.input-wrap i.left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}

.input-wrap button.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-wrap button.toggle-pass:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0 42px 0 42px;
  background: #f8fbfe;
  color: var(--ink);
  font-size: 14.5px;
  font-family: var(--f-body);
  outline: none;
  transition: .2s;
}

.input::placeholder {
  color: #a0b4c6;
}

.input:focus {
  border-color: rgba(0, 135, 232, .5);
  box-shadow: 0 0 0 4px rgba(0, 135, 232, .09);
  background: #fff;
}

.field-error {
  display: block;
  font-size: 12px;
  color: #dc2626;
  margin-top: 5px;
  font-family: var(--f-mono);
  min-height: 16px;
}

/* ── ROW BETWEEN ── */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.mini-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}

.mini-link:hover {
  text-decoration: underline;
}

/* ── BUTTON ── */
.btn-login {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dk) 100%);
  color: #fff;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 135, 232, .28);
  transition: .25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 135, 232, .36);
}

.btn-login:active {
  transform: translateY(0);
}

/* ── LOADING SPIN ── */
.spin {
  display: inline-block;
  animation: spinAnim .7s linear infinite;
}

@keyframes spinAnim {
  to { transform: rotate(360deg); }
}

/* ── FOOTER DEL CARD ── */
.lc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.lc-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: gap .2s;
}

.lc-footer a:hover {
  gap: 9px;
}

.lc-footer span {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--f-mono);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .login-shell {
    padding: 20px 14px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .login-card {
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .lc-head h2 {
    font-size: 22px;
  }

  .input {
    height: 48px;
    font-size: 14px;
  }

  .btn-login {
    height: 50px;
  }

  .row-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .lc-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}