﻿@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,700;0,800;1,400;1,700;1,800&display=swap");

:root {
  --color-bg-page: #f0f4fa;
  --color-white: #ffffff;
  --color-secondary: #efefef;
  --color-input: #e2e8f0;
  --text-main: #101012;
  --font-ui: "Inter", Arial, sans-serif;
  --blue: #0d4194;
  --blue-hover: rgba(13, 65, 148, 0.8);
  --radius-card: 40px;
  --radius-pill: 8px;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text-main);
  background: var(--color-bg-page);
}

.content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}

.content-card {
  width: min(100%, 1100px);
  min-height: 400px;
  border-radius: var(--radius-card);
  background: var(--color-white);
}

.header-panel {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 600;
}

.error-message {
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid #e9b5b5;
  border-radius: var(--radius-pill);
  background: #fff3f3;
  color: #922323;
  font-size: 0.9rem;
  line-height: 1.4;
}

.attempt-count {
  margin: 0 0 18px;
  color: #414c5f;
  font-size: 0.9rem;
  line-height: 1.4;
}

.attempt-count strong {
  color: var(--text-main);
}

.success-message {
  color: #1f7a4d;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* LOGIN */

.content-card-login {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 52px;
  padding: 40px;
}

.brand-panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 2px solid var(--color-secondary);
}

.login-page .brand-panel,
.auth-status-page .brand-panel {
  grid-template-rows: 1fr auto;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  align-self: start;
}

.login-page .brand-logos,
.auth-status-page .brand-logos {
  grid-row: 2;
  align-self: end;
}

.logo-aaci {
  width: 48px;
}

.brand-title h1 {
  font-size: 2.75rem;
  font-weight: 600;
}

.brand-title {
  grid-row: 2;
  align-self: center;
}

.login-page .brand-title,
.auth-status-page .brand-title {
  grid-row: 1;
}

.brand-title-ahosp {
  height: 0.95em;
  width: auto;
  vertical-align: middle;
  margin: 0 0 0.15em 0.12em;
}

.brand-title p {
  margin-top: 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.form-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-page .header-panel {
  margin-bottom: 24px;
  font-size: 1.75rem;
  line-height: 1.2;
}

.field-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin: 0 0 4px 8px;
  font-size: 1rem;
  font-weight: 500;
}

.input-with-icon {
  position: relative;
}

.input-with-icon::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 1.5rem;
  height: 1.5rem;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.92;
}

.user-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5zm0 2c-3.86 0-7 2.69-7 6v1h14v-1c0-3.31-3.14-6-7-6z'/%3E%3C/svg%3E");
}

.lock-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17 8h-1V6a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v10h14V10a2 2 0 0 0-2-2zm-7-2a2 2 0 0 1 4 0v2h-4zm3 9.73V18h-2v-2.27a2 2 0 1 1 2 0z'/%3E%3C/svg%3E");
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid transparent;
  padding: 0 18px 0 56px;
  border-radius: var(--radius-pill);
  background: var(--color-input);
  font-size: 1rem;
  color: var(--text-main);
  min-width: 0;
}

input::placeholder {
  color: #5e6878;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

input:focus-visible {
  background: var(--color-white);
}

input[aria-invalid="true"] {
  border-color: #b84242;
}

button {
  width: 180px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

button:hover {
  background: var(--blue-hover);
}

.login-page .form-panel > button {
  width: 100%;
}

.secondary-button {
  margin-top: 12px;
  background: #d6d6d8;
  color: #101012;
  font-size: 1rem;
}

.secondary-button:hover {
  background: #c5c5c8;
}

.button-link {
  width: 180px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
}

.button-link:hover {
  background: var(--blue-hover);
}

.help-text {
  margin-top: 8px;
  font-size: 1rem;
}

.help-text a {
  color: var(--blue);
  text-decoration: none;
}

.help-text a:hover {
  text-decoration: underline;
}

.login-page .help-text {
  margin: 14px 0 0;
  text-align: center;
}

/* LOGIN LOCKOUT */
.lockout-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.auth-status-page .button-link {
  width: 100%;
}

.lockout-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(229, 62, 62, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e53e3e'%3E%3Cpath d='M17 9V7a5 5 0 0 0-10 0v2H6a2 2 0 0 0-2 2v9h16v-9a2 2 0 0 0-2-2h-1ZM9 7a3 3 0 0 1 6 0v2H9V7Zm4 9.73V18h-2v-1.27a2 2 0 1 1 2 0Z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 26px;
}

.lockout-panel h2 {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 700;
}

.lockout-panel p {
  margin: 0;
  color: #33343a;
  font-size: 1rem;
  line-height: 1.45;
}

.lockout-panel .lockout-detail {
  color: #686a70;
  font-size: 0.9rem;
}

/* FORGOT-PASSWORD */
.content-card-forgot-password {
  width: min(100%, 900px);
  display: grid;
  grid-template-columns: 1.75fr auto;
  column-gap: 52px;
  row-gap: 24px;
  padding: 40px;
}

.forgot-password-page {
  width: min(100%, 620px);
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.forgot-password-page .logos {
  justify-content: flex-start;
  gap: 24px;
}

.forgot-password-page .logos img {
  max-width: 120px;
  max-height: 44px;
}

.forgot-password-page .header-panel {
  font-size: 1.75rem;
  line-height: 1.2;
}

.forgot-password-page .recovery-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.forgot-password-page .recovery-content p {
  margin: 0;
  line-height: 1.45;
}

.reset-password-page .form-panel .error-message {
  margin-bottom: 24px;
}

.forgot-password-page .form-panel {
  height: auto;
}

.forgot-password-page .form-panel button {
  width: 100%;
}

.forgot-password-page .password-rules {
  margin-bottom: 20px;
  color: #414c5f;
  font-size: 0.875rem;
  line-height: 1.45;
}

.forgot-password-page .password-rules p {
  margin: 0 0 6px;
}

.forgot-password-page .password-rules ul {
  margin: 0;
  padding-left: 20px;
}

.forgot-password-page .recovery-primary-link {
  width: 100%;
}

.forgot-password-page .success-message {
  padding: 12px 14px;
  border: 1px solid #aedbc0;
  border-radius: var(--radius-pill);
  background: #f0faf3;
}

.recovery-back {
  align-self: flex-start;
  color: var(--blue);
  text-decoration: none;
}

.recovery-back:hover {
  text-decoration: underline;
}

.form-panel p {
  margin-bottom: 16px;
}

.email-icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 2-8 5L4 7zm0 10H4V9l8 5 8-5z'/%3E%3C/svg%3E");
}

.logos {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: flex-end;
  gap: 50px;
  align-items: flex-start;
  align-self: start;
}

.logos img {
  max-width: 250px;
  height: auto;
  object-fit: contain;
}

/* 2FA */
.content-card-2fa {
  width: min(100%, 1100px);
  min-height: 500px;
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  column-gap: 52px;
  row-gap: 24px;
  padding: 40px;
}

.content-qr-code {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  margin-top: 16px;
  gap: 16px;
}

.content-qr-code img {
  width: 220px;
}

.content-qr-code > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.text-qr-code {
  font-size: 1.75rem;
  font-weight: bold;
}

/* ACCESS 2FA */
#keep_authenticated_30_days {
  width: 16px;
  height: 16px;
  padding: 0;
}

.remember-device {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-device-label {
  display: inline;
  margin: 0;
  font-weight: initial;
}

/* LOGOUT */
.container-button {
  display: flex;
  gap: 32px;
}

#cancel-button {
  width: 180px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: #d6d6d8;
  text-decoration: none;
  color: #101012;
  font-size: 1.25rem;
  cursor: pointer;
}

#cancel-button:hover {
  background: #c5c5c8;
}

@media (max-width: 1024px) {
  .content-card {
    border-radius: 24px;
  }

  .content-card-login {
    grid-template-columns: 1.25fr 1fr;
    gap: 32px;
    padding: 32px;
  }

  .content-card-forgot-password,
  .content-card-2fa {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px;
  }

  .brand-panel {
    padding-right: 24px;
  }

  .brand-title h1 {
    font-size: 2.2rem;
    line-height: 1.12;
  }

  .logos {
    justify-content: flex-start;
    gap: 28px;
    order: -1;
  }

  .logos img {
    max-width: 180px;
  }

  .content-qr-code {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  :root {
    --radius-card: 18px;
  }

  body {
    font-size: 15px;
  }

  .content-wrapper {
    align-items: flex-start;
    padding: 12px;
  }

  .content-card {
    min-height: auto;
  }

  .content-card-login,
  .content-card-forgot-password,
  .content-card-2fa {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 22px 18px;
  }

  .brand-panel {
    min-height: auto;
    padding: 0 0 22px;
    border-right: 0;
    border-bottom: 2px solid var(--color-secondary);
    gap: 24px;
  }

  .header-panel {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .brand-title {
    grid-row: auto;
  }

  .brand-title h1 {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .brand-title p {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.35;
  }

  .brand-logos {
    gap: 10px;
    font-size: 0.9rem;
  }

  .logo-aaci {
    width: 40px;
  }

  .form-panel {
    justify-content: flex-start;
  }

  .form-panel p,
  .help-text {
    line-height: 1.4;
  }

  button,
  .button-link,
  #cancel-button {
    width: 100%;
    min-height: 44px;
    height: auto;
    font-size: 1rem;
    padding: 10px 14px;
  }

  .logos {
    gap: 18px;
    flex-wrap: wrap;
  }

  .logos img {
    max-width: min(42vw, 150px);
  }

  .content-qr-code {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .content-qr-code img {
    width: min(100%, 220px);
    align-self: center;
  }

  .content-qr-code > div {
    width: 100%;
    text-align: left;
  }

  .text-qr-code {
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .remember-device {
    align-items: flex-start;
  }

  .remember-device-label {
    line-height: 1.3;
  }

  .container-button {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .content-wrapper {
    padding: 0;
  }

  .content-card {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .content-card-login,
  .content-card-forgot-password,
  .content-card-2fa {
    padding: 20px 14px;
  }

  input {
    padding-right: 12px;
  }
}
