/* =====================================================
   Rectium Labs – Login Stylesheet
   Página: login.html
   ===================================================== */

/* ── TOKENS ──────────────────────────────────────── */
:root {
  --dark:         #4A4F57;
  --navy:         #2F3946;
  --navy-mid:     #69717B;
  --blue:         #0B86D4;
  --blue-light:   #62C6FF;
  --silver:       #C2C8CF;
  --silver-light: #F4F7FA;
  --white:        #FFFFFF;
  --text-muted:   #D7DEE6;
}

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

/* ── BODY ────────────────────────────────────────── */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #C9D0D8 0%, #B0B8C2 100%);
  color: var(--white);
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* ── BACKGROUND ──────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 60px 60px;
}
.bg-glow {
  position: fixed; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .12) 0%, transparent 72%);
}
.bg-glow-1 { width: 600px; height: 600px; top: -220px; right: -180px; }
.bg-glow-2 { width: 420px; height: 420px; bottom: -150px; left: -120px; opacity: .7; }

/* ── BACK LINK ───────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .4px;
  color: var(--navy); text-decoration: none;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 20px;
  transition: background .2s, color .2s, transform .15s;
  align-self: flex-start;
  position: relative; z-index: 1;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.back-link:hover {
  background: rgba(255, 255, 255, .97);
  color: var(--blue);
  transform: translateX(-3px);
}

/* ── CONTAINER ───────────────────────────────────── */
.container {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; padding: 16px 20px 20px;
}

/* ── CARD ────────────────────────────────────────── */
.card {
  background: linear-gradient(145deg, rgba(112, 121, 132, .92), rgba(139, 148, 159, .88));
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px; padding: 28px 34px 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}

/* ── LOGO ────────────────────────────────────────── */
.card-logo {
  position: relative;
  margin: 0 auto 14px;
  width: 200px;
  height: 86px;
  overflow: hidden;
}
.card-logo img {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 210px;
  width: auto;
  transform: translate(-50%, -52%);
}
.logo-text { font-size: 24px; font-weight: 800; letter-spacing: -.5px; display: none; }
.logo-text span {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── CARD HEADER ─────────────────────────────────── */
.card-header { text-align: center; margin-bottom: 18px; }
.card-header h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.card-header p  { font-size: 13px; color: var(--silver); line-height: 1.55; max-width: 300px; margin: 0 auto; }

/* ── BANNERS ─────────────────────────────────────── */
.error-banner {
  background: rgba(220, 38, 38, .1); border: 1px solid rgba(220, 38, 38, .3);
  border-radius: 9px; padding: 12px 16px;
  font-size: 13px; color: #FCA5A5; margin-bottom: 18px; display: none;
}
.success-banner {
  background: rgba(13, 155, 94, .1); border: 1px solid rgba(13, 155, 94, .3);
  border-radius: 9px; padding: 12px 16px;
  font-size: 13px; color: #6EE7B7; margin-bottom: 18px; display: none;
}

/* ── FORM ────────────────────────────────────────── */
.fg { margin-bottom: 12px; }
.fg label { display: block; font-size: 13px; font-weight: 600; color: var(--silver-light); margin-bottom: 7px; }

.input-wrap { position: relative; }
.i-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; opacity: .45; pointer-events: none;
}

.fg input {
  width: 100%; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px;
  padding: 13px 16px 13px 42px; color: var(--white); font-size: 14px;
  font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.fg input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 134, 212, .14);
}
.fg input::placeholder { color: rgba(244, 247, 250, .58); }

/* ── FIELD VALIDATION ──────────────────────────── */
.fg.error input {
  border-color: rgba(220, 38, 38, .65);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}
.fg.valid input {
  border-color: rgba(13, 155, 94, .65);
  box-shadow: 0 0 0 3px rgba(13, 155, 94, .12);
}
.field-error {
  display: block;
  font-size: 12px;
  color: #FCA5A5;
  margin-top: 6px;
  min-height: 16px;
  padding-left: 2px;
  letter-spacing: .2px;
}

/* ── PASSWORD TOGGLE ─────────────────────────────── */
.pw-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  cursor: pointer; font-size: 16px; opacity: .4; transition: opacity .2s; user-select: none;
}
.pw-toggle:hover { opacity: .8; }

/* ── OPTIONS ROW ─────────────────────────────────── */
.form-opts { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rem-me { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.rem-me input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.rem-me span { font-size: 13px; color: var(--silver); }
.forgot-link { font-size: 13px; color: var(--blue-light); text-decoration: none; transition: opacity .2s; }
.forgot-link:hover { opacity: .75; }

/* ── SUBMIT BUTTON ───────────────────────────────── */
.btn-login {
  width: 100%; background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white); border: none; padding: 12px;
  border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .3s; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(11, 134, 212, .24); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; }

/* ── SPINNER ─────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DIVIDER ─────────────────────────────────────── */
.divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.divider hr { flex: 1; border: none; border-top: 1px solid rgba(255, 255, 255, .14); }
.divider span { font-size: 12px; color: var(--silver); white-space: nowrap; }

/* ── CARD FOOTER ─────────────────────────────────── */
.card-footer { text-align: center; font-size: 13px; color: var(--silver); line-height: 1.65; }
.card-footer a { color: var(--blue-light); text-decoration: none; }

/* ── POWERED ─────────────────────────────────────── */
.powered {
  text-align: center; font-size: 11px; color: rgba(141, 168, 196, .35);
  margin-top: 20px; letter-spacing: .5px; position: relative; z-index: 1;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 480px) {
  .card-logo {
    width: 214px;
    height: 92px;
  }
  .card-logo img {
    height: 224px;
  }

  .card      { padding: 36px 24px 32px; }
  .container { padding: 16px 16px 24px; }
}
