:root {
  --hfl-navy: #071a35;
  --hfl-navy-light: #0c315a;
  --hfl-blue: #0877d5;
  --hfl-cyan: #29c7e8;
  --hfl-text: #142036;
  --hfl-muted: #6d7b8f;
  --hfl-border: #d6e2ed;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

svg {
  display: block;
}

.hfl-login-page {
  min-height: 100vh;
  color: var(--hfl-text);
  background:
    radial-gradient(
      circle at 90% 5%,
      rgba(41, 199, 232, 0.10),
      transparent 25%
    ),
    #f5f8fc;
}

.hfl-login-shell {
  display: grid;
  grid-template-columns:
    minmax(540px, 1.05fr)
    minmax(510px, 0.95fr);
  gap: 34px;
  width: min(100%, 1540px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px;
}

.hfl-login-presentation {
  position: relative;
  min-width: 0;
  min-height: calc(100vh - 52px);
  overflow: hidden;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(40, 189, 224, 0.23),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      var(--hfl-navy-light),
      var(--hfl-navy) 58%,
      #051329
    );
  box-shadow: 0 30px 70px rgba(7, 31, 61, 0.18);
}

.hfl-login-presentation-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(44px, 5vw, 72px);
}

.hfl-login-brand {
  min-height: 120px;
}

.hfl-login-brand-logo {
  display: block;
  width: clamp(190px, 20vw, 270px);
  max-height: 125px;
  object-fit: contain;
  object-position: left center;
}

.hfl-login-intro {
  max-width: 610px;
  margin-top: 24px;
}

.hfl-login-kicker {
  position: relative;
  margin: 0 0 14px;
  padding-top: 25px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hfl-cyan);
}

.hfl-login-kicker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: var(--hfl-cyan);
}

.hfl-login-intro h1 {
  margin: 0;
  font-size: clamp(2.9rem, 4.1vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hfl-login-description {
  max-width: 520px;
  margin: 25px 0 0;
  font-size: clamp(1.05rem, 1.35vw, 1.28rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
}

.hfl-login-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: auto;
  padding-top: 45px;
}

.hfl-login-feature {
  display: flex;
  gap: 17px;
  min-width: 0;
  min-height: 148px;
  padding: 23px;
  border: 1px solid rgba(91, 190, 231, 0.25);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.045);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.hfl-login-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(41, 199, 232, 0.45);
  background: rgba(255, 255, 255, 0.065);
}

.hfl-feature-icon {
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 17px;
  color: #31d1ed;
  background:
    linear-gradient(
      145deg,
      rgba(41, 168, 225, 0.36),
      rgba(23, 85, 154, 0.55)
    );
}

.hfl-feature-icon svg {
  width: 28px;
  height: 28px;
}

.hfl-login-feature h2 {
  margin: 5px 0 8px;
  font-size: 1.14rem;
}

.hfl-login-feature p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.73);
}

.hfl-login-route-decoration {
  position: absolute;
  right: -225px;
  bottom: -280px;
  width: 620px;
  height: 620px;
  border: 38px solid rgba(91, 175, 218, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.hfl-login-access {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 20px 14px;
}

.hfl-login-card {
  width: min(100%, 680px);
  padding:
    clamp(42px, 5vw, 72px)
    clamp(36px, 5vw, 68px)
    38px;
  border: 1px solid var(--hfl-border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 30px 80px rgba(20, 55, 91, 0.10),
    0 8px 24px rgba(20, 55, 91, 0.05);
}

.hfl-login-card-header h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
  color: #10213c;
}

.hfl-login-card-header h2 span {
  display: block;
}

.hfl-login-card-header p {
  max-width: 500px;
  margin: 17px 0 0;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--hfl-muted);
}

.hfl-login-form {
  margin-top: 40px;
}

.hfl-field {
  margin-bottom: 24px;
}

.hfl-field label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0872c9;
}

.hfl-input-wrapper {
  position: relative;
  width: 100%;
}

.hfl-input-wrapper input {
  display: block;
  width: 100%;
  min-height: 70px;
  padding: 0 64px 0 61px;
  border: 1px solid #cad9e7;
  border-radius: 17px;
  outline: none;
  font-size: 1.04rem;
  color: #172238;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.hfl-input-wrapper input::placeholder {
  color: #9aa6b5;
}

.hfl-input-wrapper input:focus {
  border-color: #1b94d2;
  box-shadow: 0 0 0 5px rgba(29, 151, 210, 0.11);
}

.hfl-input-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #73849a;
  transform: translateY(-50%);
  pointer-events: none;
}

.hfl-input-icon svg {
  width: 24px;
  height: 24px;
}

.hfl-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: #10233d;
  background: #f2f7fb;
  cursor: pointer;
  transform: translateY(-50%);
}

.hfl-password-toggle svg {
  width: 24px;
  height: 24px;
}

.hfl-password-toggle .eye-hidden {
  display: none;
}

.hfl-password-toggle.is-visible .eye-visible {
  display: none;
}

.hfl-password-toggle.is-visible .eye-hidden {
  display: block;
}

.hfl-login-alert {
  margin-bottom: 22px;
  padding: 14px 17px;
  border: 1px solid #f2c7cf;
  border-radius: 13px;
  font-size: 0.93rem;
  font-weight: 650;
  color: #9e273b;
  background: #fff3f5;
}

.hfl-login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 8px 0 30px;
}

.hfl-remember-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.hfl-remember-option input {
  position: absolute;
  opacity: 0;
}

.hfl-custom-checkbox {
  position: relative;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 2px solid #22344d;
  border-radius: 7px;
  background: #fff;
}

.hfl-remember-option input:checked +
.hfl-custom-checkbox {
  border-color: #0874cc;
  background: #0874cc;
}

.hfl-remember-option input:checked +
.hfl-custom-checkbox::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 7px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hfl-forgot-link {
  font-weight: 700;
  color: #0571ce;
  text-decoration: none;
}

.hfl-login-submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 15px 24px;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  font-size: 1.13rem;
  font-weight: 800;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #1da5df,
      #0877d5 58%,
      #0864bd
    );
  box-shadow: 0 16px 28px rgba(5, 111, 202, 0.2);
  cursor: pointer;
}

.hfl-login-submit svg {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
}

.hfl-login-card-footer {
  margin-top: 42px;
  text-align: center;
}

.hfl-login-card-footer p {
  margin: 0;
  font-size: 0.91rem;
  color: #728095;
}

.hfl-login-card-footer p span {
  margin: 0 5px;
}

.hfl-k4w-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 78px;
  height: 43px;
  margin-top: 20px;
  padding: 0 17px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #173a61;
  text-decoration: none;
  background: #edf6fb;
}

@media (max-width: 1100px) {
  .hfl-login-shell {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .hfl-login-presentation {
    min-height: auto;
    border-radius: 0 0 28px 28px;
  }

  .hfl-login-presentation-inner {
    padding: 44px 34px;
  }

  .hfl-login-features {
    margin-top: 38px;
    padding-top: 0;
  }

  .hfl-login-access {
    padding: 35px 22px 50px;
  }
}

@media (max-width: 620px) {
  .hfl-login-presentation-inner {
    padding: 34px 21px;
  }

  .hfl-login-brand {
    min-height: auto;
  }

  .hfl-login-brand-logo {
    width: 180px;
  }

  .hfl-login-intro h1 {
    font-size: 2.5rem;
  }

  .hfl-login-features {
    grid-template-columns: 1fr;
  }

  .hfl-login-feature {
    min-height: auto;
    padding: 19px;
  }

  .hfl-login-access {
    padding: 28px 14px 40px;
  }

  .hfl-login-card {
    padding: 35px 20px 29px;
    border-radius: 23px;
  }

  .hfl-login-card-header h2 {
    font-size: 2.1rem;
  }

  .hfl-login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .hfl-input-wrapper input {
    min-height: 62px;
    padding-left: 53px;
  }

  .hfl-login-submit {
    min-height: 65px;
    font-size: 1rem;
  }
}


/* =========================================================
   HFL LOGIN V0.2.2 — ALTURA COMPACTA
   ========================================================= */

@media (min-width: 1101px) {
  .hfl-login-shell {
    gap: 28px;
    padding: 18px;
  }

  .hfl-login-presentation {
    min-height: calc(100vh - 36px);
    border-radius: 26px;
  }

  .hfl-login-presentation-inner {
    padding:
      clamp(28px, 3.3vw, 48px)
      clamp(34px, 4vw, 58px);
  }

  .hfl-login-brand {
    min-height: 86px;
  }

  .hfl-login-brand-logo {
    width: clamp(165px, 17vw, 225px);
    max-height: 92px;
  }

  .hfl-login-intro {
    margin-top: 12px;
  }

  .hfl-login-kicker {
    margin-bottom: 10px;
    padding-top: 18px;
    font-size: 0.78rem;
  }

  .hfl-login-kicker::before {
    width: 34px;
  }

  .hfl-login-intro h1 {
    font-size: clamp(2.35rem, 3.3vw, 3.65rem);
  }

  .hfl-login-description {
    margin-top: 16px;
    font-size: 1rem;
    line-height: 1.5;
  }

  .hfl-login-features {
    gap: 13px;
    padding-top: 26px;
  }

  .hfl-login-feature {
    min-height: 112px;
    padding: 17px;
    border-radius: 16px;
  }

  .hfl-feature-icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .hfl-feature-icon svg {
    width: 24px;
    height: 24px;
  }

  .hfl-login-feature h2 {
    margin: 3px 0 5px;
    font-size: 1rem;
  }

  .hfl-login-feature p {
    font-size: 0.82rem;
    line-height: 1.42;
  }

  .hfl-login-access {
    padding: 12px 10px;
  }

  .hfl-login-card {
    width: min(100%, 630px);
    padding:
      clamp(30px, 3.5vw, 48px)
      clamp(32px, 4vw, 54px)
      28px;
    border-radius: 26px;
  }

  .hfl-login-card-header h2 {
    font-size: clamp(2rem, 2.6vw, 2.75rem);
  }

  .hfl-login-card-header p {
    margin-top: 12px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .hfl-login-form {
    margin-top: 26px;
  }

  .hfl-field {
    margin-bottom: 17px;
  }

  .hfl-field label {
    margin-bottom: 7px;
    font-size: 0.86rem;
  }

  .hfl-input-wrapper input {
    min-height: 58px;
    border-radius: 14px;
    font-size: 0.96rem;
  }

  .hfl-password-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .hfl-login-options {
    margin: 4px 0 21px;
    font-size: 0.9rem;
  }

  .hfl-custom-checkbox {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }

  .hfl-remember-option input:checked +
  .hfl-custom-checkbox::after {
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
  }

  .hfl-login-submit {
    min-height: 60px;
    border-radius: 14px;
    font-size: 1rem;
  }

  .hfl-login-card-footer {
    margin-top: 26px;
  }

  .hfl-login-card-footer p {
    font-size: 0.82rem;
  }

  .hfl-k4w-badge {
    min-width: 68px;
    height: 36px;
    margin-top: 13px;
    font-size: 0.88rem;
  }
}


/* Ecrãs com pouca altura, como portáteis */
@media (min-width: 1101px) and (max-height: 820px) {
  .hfl-login-shell {
    padding: 12px;
  }

  .hfl-login-presentation {
    min-height: calc(100vh - 24px);
  }

  .hfl-login-presentation-inner {
    padding: 24px 40px;
  }

  .hfl-login-brand {
    min-height: 70px;
  }

  .hfl-login-brand-logo {
    width: 180px;
    max-height: 75px;
  }

  .hfl-login-intro {
    margin-top: 8px;
  }

  .hfl-login-intro h1 {
    font-size: 2.65rem;
  }

  .hfl-login-description {
    margin-top: 12px;
  }

  .hfl-login-features {
    gap: 10px;
    padding-top: 18px;
  }

  .hfl-login-feature {
    min-height: 96px;
    padding: 14px;
  }

  .hfl-feature-icon {
    flex-basis: 41px;
    width: 41px;
    height: 41px;
  }

  .hfl-login-feature h2 {
    font-size: 0.93rem;
  }

  .hfl-login-feature p {
    font-size: 0.75rem;
  }

  .hfl-login-card {
    padding: 30px 46px 22px;
  }

  .hfl-login-card-header h2 {
    font-size: 2.3rem;
  }

  .hfl-login-card-header p {
    font-size: 0.93rem;
  }

  .hfl-login-form {
    margin-top: 20px;
  }

  .hfl-field {
    margin-bottom: 13px;
  }

  .hfl-input-wrapper input {
    min-height: 52px;
  }

  .hfl-login-options {
    margin-bottom: 16px;
  }

  .hfl-login-submit {
    min-height: 54px;
  }

  .hfl-login-card-footer {
    margin-top: 18px;
  }

  .hfl-k4w-badge {
    height: 32px;
    margin-top: 9px;
  }
}
