/* Auth is sized to viewport height; short screens collapse decorative content
   while preserving document scrolling for zoom, keyboards and accessibility. */
@layer auth-layout {
  .auth-header {
    height: 64px;
    flex-shrink: 0;
  }
  .auth-center {
    padding: 20px 24px;
    min-height: 0;
  }
  .auth-intro {
    margin-bottom: 20px;
  }
  .auth-intro h1 {
    font-size: clamp(30px, 2.6vw, 38px);
    margin: 10px 0;
    line-height: 1.1;
  }
  .auth-intro p {
    font-size: 13px;
  }
  .auth-panel {
    padding: 24px 30px;
  }
  .auth-form h2 {
    font-size: 23px;
    margin: 7px 0;
  }
  .auth-form > p {
    margin-bottom: 18px;
    font-size: 13px;
  }
  .auth-form label {
    margin-bottom: 14px;
  }
  .auth-form input {
    height: 44px;
  }
  .auth-form .button {
    min-height: 44px;
    margin-top: 4px;
  }
  .auth-link {
    margin-top: 14px;
  }
  .invite-note {
    margin-top: 18px;
    padding-top: 16px;
  }
  .auth-footer {
    padding: 12px clamp(24px, 5vw, 80px);
    flex-shrink: 0;
  }
  .security-center {
    padding: 26px 24px;
  }
  .mfa-panel {
    max-width: 480px;
  }
  .mfa-setup-panel {
    max-width: 740px;
  }
  .security-progress {
    display: flex;
    gap: 14px;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    color: #9099ab;
    justify-content: space-between;
  }
  .security-progress .current {
    color: #93c5fd;
  }
  .security-progress .done {
    color: #67e8f9;
  }
  .mfa-setup-grid {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 30px;
    margin-top: 22px;
    align-items: start;
  }
  .qr-block {
    text-align: center;
  }
  .qr-block img {
    display: block;
    width: 212px;
    height: 212px;
    background: white;
    border-radius: 8px;
    margin: 0 auto 12px;
  }
  .qr-block details {
    font-size: 12px;
  }
  .qr-block details p {
    font-size: 11px;
    margin: 10px 0;
  }
  .qr-block summary,
  .recovery-option summary {
    cursor: pointer;
    color: #93c5fd;
  }
  .setup-key {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: all;
    background: #111827;
    border: 1px solid var(--line);
    padding: 10px;
    color: #d1d5db;
    font-size: 12px;
    letter-spacing: 1px;
    border-radius: 6px;
  }
  .mfa-setup-grid h3 {
    font-size: 15px;
  }
  .setup-steps {
    padding-left: 19px;
    margin: 10px 0 20px;
    color: #b6becb;
    font-size: 12px;
  }
  .setup-steps li {
    padding-left: 3px;
    margin-bottom: 8px;
  }
  .otp-input {
    letter-spacing: 8px;
    font-variant-numeric: tabular-nums;
    font-size: 21px !important;
    text-align: center;
  }
  .security-explainer {
    font-size: 11px !important;
    text-align: center;
    margin: 22px 0 0 !important;
    color: #9ca3af;
  }
  .security-signout {
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 14px;
  }
  .security-signout .text-link {
    font-size: 12px;
  }
  .mfa-description {
    font-size: 13px;
    margin-bottom: 20px;
    color: #b6becb;
  }
  .recovery-option {
    margin-top: 20px;
    font-size: 12px;
  }
  .recovery-option p {
    font-size: 12px;
    margin: 13px 0;
  }
  .recovery-option form {
    margin-top: 16px;
  }
  .recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid var(--line);
    background: #080f1e;
    border-radius: 8px;
  }
  .recovery-codes code {
    font-size: 11px;
    color: #dbeafe;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 12px;
    gap: 9px;
    margin: 18px 0 14px !important;
    font-weight: 400;
  }
  .checkbox-label input {
    width: 16px;
    height: 16px;
    min-height: 16px;
    accent-color: #2563eb;
    flex-shrink: 0;
  }
  @media (max-height: 850px) {
    .auth-center {
      padding-top: 16px;
      padding-bottom: 16px;
    }
    .auth-intro {
      margin-bottom: 16px;
    }
    .auth-intro h1 {
      font-size: 32px;
    }
    .auth-intro > p {
      display: none;
    }
    .auth-panel {
      padding-top: 22px;
      padding-bottom: 22px;
    }
    .auth-form label {
      margin-bottom: 12px;
    }
    .invite-note {
      margin-top: 14px;
      padding-top: 12px;
    }
    .auth-footer {
      font-size: 10px;
      padding-top: 10px;
      padding-bottom: 10px;
    }
  }
  @media (max-height: 740px) {
    .auth-intro {
      display: none;
    }
    .auth-header {
      height: 56px;
    }
    .auth-center {
      padding: 15px 20px;
    }
    .auth-footer {
      padding-top: 8px;
      padding-bottom: 8px;
    }
    .security-progress {
      margin-bottom: 16px;
      padding-bottom: 12px;
    }
    .security-explainer {
      margin-top: 15px !important;
    }
    .security-signout {
      margin-top: 16px;
    }
  }
  @media (max-width: 600px) {
    .auth-header {
      height: 60px;
    }
    .auth-center {
      padding: 18px 20px;
    }
    .auth-intro h1 {
      font-size: 30px;
    }
    .auth-intro p {
      font-size: 12px;
    }
    .auth-panel {
      padding: 23px;
    }
    .auth-footer {
      padding: 12px 22px;
      font-size: 9px;
    }
    .mfa-setup-grid {
      grid-template-columns: 1fr;
      gap: 15px;
      margin-top: 18px;
    }
    .qr-block img {
      width: 172px;
      height: 172px;
      margin-bottom: 9px;
    }
    .mfa-setup-grid h3 {
      font-size: 14px;
    }
    .setup-steps {
      margin-bottom: 15px;
    }
    .security-progress {
      gap: 8px;
      font-size: 10px;
      margin-bottom: 18px;
    }
    .mfa-panel {
      padding: 22px;
    }
    .recovery-codes {
      padding: 11px;
      gap: 8px 5px;
    }
    .recovery-codes code {
      font-size: 10px;
    }
    .security-center {
      justify-content: center;
    }
    .security-signout {
      margin-top: 16px;
    }
    .security-explainer {
      margin-top: 16px !important;
    }
  }
  @media (max-width: 600px) and (max-height: 780px) {
    .security-center {
      justify-content: flex-start;
    }
    .auth-footer {
      gap: 8px;
    }
    .auth-intro {
      display: none;
    }
  }
}
