/* Admin sign-in and email code pages (shared/_auth_shell). Every rule sits under an .auth-* name,
   and only those two pages use them, so nothing here reaches other pages.
   Colors match the customer area (customer_area.css). */
.auth-main {
  --auth-navy: #003479;
  --auth-navy-dark: #002557;
  --auth-cyan: #00c2cb;
  --auth-teal: #00a3ab;
  --auth-ink: #0f1d33;
  --auth-muted: #56637a;
  --auth-line: #dfe5ef;
  --auth-link-on-navy: #7fe7ec;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
  color: var(--auth-ink);
}
.auth-main:focus { outline: none; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 44%) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Left brand panel */
.auth-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 48px;
  background: linear-gradient(160deg, var(--auth-navy) 0%, var(--auth-navy-dark) 100%);
  color: #fff;
}
/* Decorative ring, bottom right. A pseudo-element, so screen readers skip it. */
.auth-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border: 40px solid rgba(0, 194, 203, .22);
  border-radius: 50%;
  pointer-events: none;
}
.auth-panel-logo {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  overflow: hidden;
}
/* logo.svg has wide empty margins around the mark, so scale it up inside the tile */
.auth-panel-logo img { width: 60px; height: 60px; object-fit: contain; transform: scale(1.7); }
.auth-panel-body { position: relative; z-index: 1; max-width: 440px; }
.auth-panel-headline {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth-panel-note { margin: 0; font-size: 15px; line-height: 1.55; color: #c9d6ee; }
.auth-panel .auth-panel-link {
  color: var(--auth-link-on-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-panel .auth-panel-link:hover { color: #fff; }
.auth-panel .auth-panel-link:focus-visible {
  outline: 3px solid var(--auth-cyan);
  outline-offset: 2px;
  border-radius: 2px;
}
.auth-panel-version { position: relative; z-index: 1; margin: 0; font-size: 13px; color: #9fb2d3; }

/* Right side: the form */
.auth-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-form-wrap { width: 100%; max-width: 380px; }
.auth-version-mobile { display: none; }

.auth-title {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}
.auth-sub { margin: 0 0 24px; font-size: 15px; color: var(--auth-muted); }
.auth-alert { margin-bottom: 20px; }
.auth-field { margin-bottom: 18px; }
.auth-label { font-weight: 600; color: var(--auth-ink); }

.auth-main .auth-input {
  width: 100%; /* Rails adds size="6" to the code field from maxlength */
  min-height: 46px;
  font-size: 16px; /* 16px or more stops iOS Safari from zooming on focus */
  border-color: var(--auth-line);
  color: var(--auth-ink);
}
.auth-main .auth-input:focus {
  border-color: var(--auth-teal);
  outline: 3px solid rgba(0, 194, 203, .45);
  outline-offset: 0;
  box-shadow: none;
}
.auth-input-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }

.auth-password { position: relative; }
.auth-main .auth-input-password { padding-right: 76px; }
.auth-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-width: 56px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--auth-navy);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.auth-toggle:hover { background: #eef3fa; }
.auth-toggle:focus-visible { outline: 3px solid var(--auth-cyan); outline-offset: 0; }

.auth-check { margin-bottom: 0; }
.auth-check .form-check-input:focus-visible { outline: 3px solid rgba(0, 194, 203, .45); outline-offset: 1px; }
.auth-check .form-check-input:checked { background-color: var(--auth-navy); border-color: var(--auth-navy); }
.auth-hint { display: block; margin-top: 2px; color: var(--auth-muted); }

.auth-main .auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border: 0;
  background: var(--auth-navy);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.auth-main .auth-submit:hover { background: var(--auth-navy-dark); color: #fff; }
.auth-main .auth-submit:focus-visible { outline: 3px solid var(--auth-cyan); outline-offset: 2px; }
.auth-main .auth-submit:disabled { opacity: .75; cursor: progress; }

.auth-foot { margin: 20px 0 0; font-size: 14px; color: var(--auth-muted); }
.auth-foot a { color: var(--auth-navy); font-weight: 600; }
.auth-foot a:focus-visible { outline: 3px solid var(--auth-cyan); outline-offset: 2px; border-radius: 2px; }

/* Phone: the panel becomes a header strip with the logo and headline on one row. */
@media (max-width: 767.98px) {
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-panel {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .auth-panel::after,
  .auth-panel-note,
  .auth-panel-version { display: none; }
  .auth-panel-logo { width: 44px; height: 44px; flex: none; border-radius: 12px; }
  .auth-panel-logo img { width: 36px; height: 36px; }
  .auth-panel-headline { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
  .auth-content { justify-content: flex-start; padding: 28px 16px 24px; }
  .auth-title { font-size: 24px; }
  .auth-version-mobile { display: block; margin: 32px 0 0; font-size: 13px; color: var(--auth-muted); }
}
