:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #102825;
  color: #fff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #102825;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(63, 99, 82, .62), transparent 48%),
    linear-gradient(145deg, #173a35, #081815);
}

.login-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 180ms ease-out;
}

.login-background.is-ready {
  opacity: 1;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding:
    max(28px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.login-shell::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 17, 15, .06), rgba(4, 17, 15, .16));
  content: "";
  pointer-events: none;
}

.login-card {
  width: min(100%, 480px);
  padding: 32px 54px 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: rgba(16, 25, 22, .43);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #fff;
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  backdrop-filter: blur(20px) saturate(115%);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.login-brand-amara img {
  width: min(100%, 282px);
  max-height: 91px;
  filter: brightness(0) invert(1);
}

.login-brand-urbain img {
  width: 132px;
  max-width: 44%;
  max-height: 55px;
  filter: brightness(0) invert(1);
}

.login-divider {
  width: 100%;
  height: 1px;
}

.login-divider-accent {
  margin: 20px 0 19px;
  background: linear-gradient(90deg, transparent, rgba(74, 137, 108, .95) 10%, rgba(74, 137, 108, .95) 90%, transparent);
}

.login-divider-footer {
  width: 80%;
  margin: 25px auto 20px;
  background: rgba(255, 255, 255, .24);
}

h1 {
  margin: 0 0 31px;
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 1.82rem);
  font-weight: 400;
  letter-spacing: .31em;
  line-height: 1.1;
  text-align: center;
  text-indent: .31em;
  white-space: nowrap;
}

form,
.session-panel {
  display: grid;
  gap: 10px;
}

label {
  color: rgba(255, 255, 255, .96);
  font-size: .96rem;
  font-weight: 600;
}

input[type="email"],
.password-field input {
  width: 100%;
  min-height: 45px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 5px;
  background: rgba(11, 25, 21, .16);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
  color: #fff;
  font: inherit;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

input::placeholder {
  color: rgba(255, 255, 255, .7);
}

input[type="email"]:hover,
.password-field input:hover {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(11, 25, 21, .23);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  display: grid;
  width: 44px;
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: rgba(255, 255, 255, .9);
}

.password-toggle:hover {
  background: rgba(255, 255, 255, .09);
}

.password-toggle-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-toggle-icon-hide {
  display: none;
}

.password-toggle[aria-pressed="true"] {
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.password-toggle[aria-pressed="true"] .password-toggle-icon-show {
  display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-icon-hide {
  display: block;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid #d9ad67;
  outline-offset: 2px;
}

input[type="email"]:focus-visible,
.password-field input:focus-visible {
  border-color: rgba(255, 255, 255, .82);
  background: rgba(11, 25, 21, .32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 8px 0 0;
  font-weight: 400;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #174b45;
}

button {
  min-height: 46px;
  border: 1px solid rgba(28, 98, 89, .52);
  border-radius: 4px;
  background: rgba(13, 72, 65, .92);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

button:hover:not(:disabled) {
  border-color: rgba(51, 135, 123, .74);
  background: rgba(11, 86, 77, .96);
}

button:disabled {
  cursor: wait;
  opacity: .72;
}

.login-message {
  min-height: 1.25rem;
  margin: 1px 0 7px;
  color: #ffd5c9;
  font-size: .88rem;
  font-weight: 600;
}

.session-panel {
  text-align: center;
}

.session-label {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: .96rem;
}

.session-email {
  margin: 0 0 16px;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 1.04rem;
  font-weight: 600;
}

.session-panel .login-message {
  margin: 0 0 7px;
}

.secondary-button {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(8, 28, 25, .26);
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .64);
  background: rgba(255, 255, 255, .12);
}

@media (max-height: 790px) and (min-width: 481px) {
  .login-shell {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .login-card {
    padding-top: 24px;
    padding-bottom: 23px;
  }

  .login-brand-amara img {
    width: min(100%, 252px);
    max-height: 81px;
  }

  .login-divider-accent {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  h1 {
    margin-bottom: 23px;
  }

  .login-divider-footer {
    margin-top: 19px;
    margin-bottom: 15px;
  }
}

@media (max-width: 600px) {
  .login-shell {
    place-items: center;
    padding:
      max(18px, env(safe-area-inset-top))
      max(4vw, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(4vw, env(safe-area-inset-left));
  }

  .login-card {
    width: min(92vw, 480px);
    padding: 28px clamp(22px, 7vw, 36px) 25px;
  }

  .login-brand-amara img {
    width: min(100%, 252px);
    max-height: 82px;
  }

  .login-divider-accent {
    margin: 17px 0;
  }

  h1 {
    margin-bottom: 26px;
    font-size: clamp(1.35rem, 7vw, 1.7rem);
    letter-spacing: .24em;
    text-indent: .24em;
  }

  .login-divider-footer {
    margin-top: 21px;
    margin-bottom: 16px;
  }
}

@media (max-width: 380px) {
  .login-card {
    width: 94vw;
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-background,
  input,
  button {
    transition: none;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .login-card {
    background: rgba(16, 25, 22, .82);
  }
}
