.ultraguard-two-factor-shell {
    --ug-2fa-accent: #14532d;
    --ug-2fa-soft: #ecfdf3;
}

#two-factor-users-table .badge,
.ultraguard-two-factor-codes {
    font-family: Consolas, Monaco, monospace;
    letter-spacing: 0.08em;
}

.ultraguard-two-factor-setup {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: 20px;
    align-items: start;
}

.ultraguard-two-factor-setup img {
    max-width: 100%;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.ultraguard-two-factor-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.ultraguard-two-factor-codes code {
    display: block;
    padding: 10px 12px;
    background: var(--ug-2fa-soft);
    border-radius: 8px;
    color: var(--ug-2fa-accent);
    text-align: center;
    font-size: 13px;
}

@media (max-width: 782px) {
    .ultraguard-two-factor-setup {
        grid-template-columns: 1fr;
    }
}

/* ── 2FA mobile fixes ─────────────────────────────────────────── */
@media screen and (max-width: 782px) {
  .ug-2fa-setup-grid {
    flex-direction: column;
    gap: 20px;
  }

  .ug-qr-code-wrap {
    text-align: center;
    width: 100%;
  }

  .ug-qr-code-wrap img,
  .ug-qr-code-wrap canvas {
    max-width: 200px;
    height: auto;
  }

  .ug-backup-codes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .ug-2fa-verify-form {
    padding: 16px;
  }

  .ug-2fa-code-input {
    font-size: 20px;
    letter-spacing: 6px;
    width: 100%;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .ug-backup-codes-grid {
    grid-template-columns: 1fr;
  }
}
