:root {
  --access-ink: #102f2a;
  --access-green: #075c4f;
  --access-lime: #ddf56b;
  --access-paper: #fffdf8;
  --access-line: #c9d9d3;
}

body.auth-pending,
body.auth-locked {
  overflow: hidden;
}

body.auth-pending > .app-shell,
body.auth-pending > #modal-root,
body.auth-pending > #toast-root,
body.auth-locked > .app-shell,
body.auth-locked > #modal-root,
body.auth-locked > #toast-root {
  visibility: hidden;
}

.access-gate[hidden] {
  display: none;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(221, 245, 107, .24), transparent 28%),
    radial-gradient(circle at 90% 88%, rgba(95, 189, 166, .2), transparent 30%),
    linear-gradient(135deg, #f7f6ec 0%, #e6f2eb 100%);
  font-family: "Manrope", sans-serif;
}

.access-gate::before,
.access-gate::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(7, 92, 79, .13);
  border-radius: 50%;
  pointer-events: none;
}

.access-gate::before {
  width: 440px;
  height: 440px;
  left: -250px;
  bottom: -250px;
}

.access-gate::after {
  width: 620px;
  height: 620px;
  right: -390px;
  top: -390px;
}

.access-gate__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.18fr);
  width: min(960px, 100%);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(16, 47, 42, .16);
  border-radius: 30px;
  background: var(--access-paper);
  box-shadow: 0 32px 90px rgba(16, 47, 42, .18);
}

.access-gate__identity {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 48px 42px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(155deg, #0a6657 0%, #073f38 100%);
}

.access-gate__identity::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -160px;
  bottom: -155px;
  border: 50px solid rgba(221, 245, 107, .11);
  border-radius: 50%;
}

.access-gate__identity img {
  width: 132px;
  height: 132px;
  margin-bottom: 36px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .18));
}

.access-gate__eyebrow,
.access-form__kicker {
  color: var(--access-lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.access-gate__identity h1 {
  max-width: 290px;
  margin: 12px 0 14px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 400;
  line-height: .95;
}

.access-gate__identity p {
  max-width: 320px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.7;
}

.access-gate__trust {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 700;
}

.access-gate__trust i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--access-lime);
  box-shadow: 0 0 0 5px rgba(221, 245, 107, .13);
}

.access-gate__form-area {
  display: grid;
  align-content: center;
  padding: 54px 62px;
}

.access-gate__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: var(--access-ink);
}

.access-gate__loading[hidden] {
  display: none;
}

.access-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #d8e5e0;
  border-top-color: var(--access-green);
  border-radius: 50%;
  animation: access-spin .75s linear infinite;
}

@keyframes access-spin { to { transform: rotate(360deg); } }

.access-form[hidden] {
  display: none;
}

.access-form {
  display: grid;
  gap: 17px;
}

.access-form__kicker {
  color: #137666;
}

.access-form h2 {
  margin: -7px 0 -9px;
  color: var(--access-ink);
  font-family: "DM Serif Display", serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
}

.access-form > p {
  margin: 0 0 4px;
  color: #637b75;
  font-size: 13px;
  line-height: 1.6;
}

.access-form label {
  display: grid;
  gap: 8px;
  color: #294c45;
  font-size: 12px;
  font-weight: 800;
}

.access-form input {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  border: 1px solid var(--access-line);
  border-radius: 12px;
  outline: none;
  padding: 0 15px;
  color: #102f2a;
  background: #fff;
  font: 700 15px "Manrope", sans-serif;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.access-form input:focus {
  border-color: #19836f;
  box-shadow: 0 0 0 4px rgba(25, 131, 111, .11);
}

.access-form__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.access-form button {
  min-height: 52px;
  margin-top: 3px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--access-green);
  box-shadow: 0 12px 24px rgba(7, 92, 79, .18);
  font: 800 14px "Manrope", sans-serif;
  cursor: pointer;
}

.access-form button:hover { background: #064d43; }
.access-form button:disabled { cursor: wait; opacity: .65; }

.access-form__message {
  min-height: 20px;
  margin: 16px 0 0;
  color: #b53d2d;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.global-logout-button {
  height: 38px;
  border: 1px solid #cbdad5;
  border-radius: 10px;
  padding: 0 13px;
  color: #185d51;
  background: #fff;
  font: 800 11px "Manrope", sans-serif;
  cursor: pointer;
}

@media (max-width: 760px) {
  .access-gate { padding: 12px; }
  .access-gate__card { grid-template-columns: 1fr; min-height: auto; max-height: calc(100vh - 24px); overflow-y: auto; border-radius: 22px; }
  .access-gate__identity { min-height: 170px; padding: 26px 28px; }
  .access-gate__identity img { width: 72px; height: 72px; margin-bottom: 16px; }
  .access-gate__identity h1 { margin: 6px 0; font-size: 34px; }
  .access-gate__identity p { display: none; }
  .access-gate__trust { margin-top: 12px; }
  .access-gate__form-area { padding: 30px 26px 34px; }
  .access-form h2 { font-size: 34px; }
  .access-form__columns { grid-template-columns: 1fr; }
}
