/*
 * PetFindrz Authentication Styles
 * Modern, social-media inspired authentication UI
 */

/* ============================================
   Auth Page Layout
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.auth-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.auth-container.single-card {
    max-width: 480px;
}

.auth-card {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.auth-card.wide-card {
    max-width: 600px;
}

/* ============================================
   Auth Header
   ============================================ */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-logo.warning-logo {
    font-size: 3.5rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Auth Tabs
   ============================================ */
.auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: #374151;
}

.auth-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Auth Form
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-link {
    font-size: 0.875rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.form-link:hover {
    text-decoration: underline;
}

.form-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* ============================================
   Input Styles
   ============================================ */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    pointer-events: none;
    font-size: 1.25rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:disabled {
    background: #f9fafb;
    color: #6b7280;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #6b7280;
}

/* Code Input */
.code-input-wrapper .form-input {
    text-align: center;
    letter-spacing: 0.5em;
    font-size: 1.5rem;
    font-family: 'SF Mono', 'Monaco', monospace;
    padding-left: 1rem;
}

.code-input {
    max-width: 200px;
    margin: 0 auto;
}

/* ============================================
   Password Requirements
   ============================================ */
.password-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.requirement .rzi {
    font-size: 1rem;
}

.requirement.met {
    color: #10b981;
}

/* ============================================
   Checkbox Styles
   ============================================ */
.form-group-inline {
    display: flex;
    align-items: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
    position: relative;
}

.checkbox-input:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '';
    display: block;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-input:focus + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* ============================================
   Button Styles
   ============================================ */
.btn-auth-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.btn-auth-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-auth-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   Button with Icon and Spinner
   ============================================ */
.btn-with-icon {
    position: relative;
}

.btn-with-icon .btn-icon-lock {
    font-size: 1.1rem;
}

.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hide spinner by default for CSS-based loading (SSR forms) */
.btn-with-icon .btn-spinner {
    display: none;
}

/* Show spinner when form is submitting (CSS-based for SSR forms) */
.btn-with-icon.loading .btn-icon-lock,
.btn-with-icon.loading .btn-text {
    display: none;
}

.btn-with-icon.loading .btn-spinner {
    display: inline-block;
}

.btn-with-icon.loading {
    opacity: 0.8;
    cursor: wait;
    pointer-events: none;
}

.btn-auth-primary.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-auth-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-auth-secondary:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.btn-auth-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth-link:hover:not(:disabled) {
    text-decoration: underline;
}

.btn-auth-link:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-auth-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ============================================
   Social Login
   ============================================ */
.social-logins {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-social:hover:not(:disabled) {
    border-color: #d1d5db;
    background: #f9fafb;
}

.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Divider
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ============================================
   Auth Footer
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.auth-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

.auth-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ============================================
   Illustration Panel
   ============================================ */
.auth-illustration {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

@media (min-width: 768px) {
    .auth-illustration {
        display: flex;
    }
}

.illustration-content {
    text-align: center;
    max-width: 320px;
}

.illustration-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.illustration-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.illustration-content p {
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.9;
}

.feature-item .rzi {
    font-size: 1.25rem;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ============================================
   Registration Methods
   ============================================ */
.registration-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.method-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.method-icon .rzi {
    font-size: 1.5rem;
}

.method-content {
    flex: 1;
}

.method-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.method-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.method-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}

.method-badge.recommended {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ============================================
   Passkey Info
   ============================================ */
.passkey-info,
.email-code-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f0f5ff;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.passkey-info .passkey-icon,
.passkey-info .info-icon,
.email-code-info .info-icon {
    color: #667eea;
    font-size: 2rem;
}

.passkey-info p,
.email-code-info p {
    margin: 0;
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.passkey-setup-info {
    text-align: center;
    padding: 2rem;
    background: #f0f5ff;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.passkey-icon-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.passkey-icon-large .rzi {
    font-size: 2.5rem;
    color: white;
}

.passkey-setup-info h3 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
}

.passkey-setup-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

/* ============================================
   Code Sent Message
   ============================================ */
.code-sent-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: #ecfdf5;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.code-sent-message .success-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.code-sent-message p {
    margin: 0;
    color: #065f46;
}

/* ============================================
   Status Message
   ============================================ */
.auth-status-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.auth-status-message .status-icon {
    flex-shrink: 0;
}

.auth-status-message .status-icon .rzi {
    font-size: 1.5rem;
}

.auth-status-message .status-content {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.auth-status-message.status-error {
    background: #fef2f2;
    color: #991b1b;
}

.auth-status-message.status-error .status-icon {
    color: #dc2626;
}

.auth-status-message.status-warning {
    background: #fffbeb;
    color: #92400e;
}

.auth-status-message.status-warning .status-icon {
    color: #f59e0b;
}

.auth-status-message.status-success {
    background: #ecfdf5;
    color: #065f46;
}

.auth-status-message.status-success .status-icon {
    color: #10b981;
}

/* ============================================
   Validation Errors
   ============================================ */
.field-validation-error {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ============================================
   Success/Error States
   ============================================ */
.success-state,
.error-state {
    text-align: center;
    padding: 2rem 0;
}

.success-icon-large,
.error-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon-large {
    background: #ecfdf5;
}

.success-icon-large .rzi {
    font-size: 3rem;
    color: #10b981;
}

.error-icon-large {
    background: #fef2f2;
}

.error-icon-large .rzi {
    font-size: 3rem;
    color: #dc2626;
}

.success-state h2,
.error-state h2 {
    margin: 0 0 0.75rem 0;
    color: #1a1a2e;
}

.success-state p,
.error-state p {
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

.muted-text {
    color: #9ca3af !important;
    font-size: 0.875rem;
}

/* ============================================
   Spinner
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-large {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Two-Factor Info
   ============================================ */
.two-factor-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f0f5ff;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.two-factor-info.warning {
    background: #fffbeb;
}

.two-factor-info.warning .info-icon {
    color: #f59e0b;
}

.two-factor-info .info-icon {
    color: #667eea;
    font-size: 1.75rem;
}

.two-factor-info p {
    margin: 0;
    color: #4b5563;
    font-size: 0.9375rem;
}

/* ============================================
   Manage Pages
   ============================================ */
.manage-page .auth-card {
    max-width: none;
}

/* Security Status */
.security-status {
    margin-bottom: 2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 500;
}

.status-badge.enabled {
    background: #ecfdf5;
    color: #065f46;
}

.status-badge.disabled {
    background: #fef3c7;
    color: #92400e;
}

/* Security Options */
.security-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.security-card-icon {
    width: 48px;
    height: 48px;
    background: #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}

.security-card-icon.enabled {
    background: #ecfdf5;
    color: #10b981;
}

.security-card-icon .rzi {
    font-size: 1.5rem;
}

.security-card-content {
    flex: 1;
}

.security-card-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.security-card-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.security-card-content .badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.security-card-content .warning-text {
    color: #dc2626;
}

.btn-security-action {
    padding: 0.625rem 1rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-security-action:hover {
    background: #667eea;
    color: white;
}

.security-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-security-link {
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-security-link:hover {
    text-decoration: underline;
}

.btn-security-link.danger {
    color: #dc2626;
}

/* ============================================
   Setup Steps (Authenticator)
   ============================================ */
.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.setup-step {
    display: flex;
    gap: 1rem;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.step-content p {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

/* App Suggestions */
.app-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
}

.app-link:hover {
    background: #e5e7eb;
}

/* QR Code */
.qr-code-container {
    text-align: center;
}

.qr-code {
    display: inline-block;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.qr-code-fallback {
    margin-top: 1rem;
}

.qr-code-fallback p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.manual-key {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.manual-key code {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.9375rem;
    letter-spacing: 0.05em;
}

.copy-btn {
    padding: 0.5rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
}

.copy-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Verify Form */
.verify-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 280px;
}

/* ============================================
   Recovery Codes
   ============================================ */
.recovery-codes-container {
    text-align: center;
}

.recovery-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #fffbeb;
    border-radius: 12px;
    text-align: left;
    margin-bottom: 1.5rem;
}

.recovery-warning .rzi {
    color: #f59e0b;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recovery-warning strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.recovery-warning p {
    margin: 0;
    color: #92400e;
    font-size: 0.875rem;
}

.recovery-codes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.recovery-code {
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 8px;
}

.recovery-code code {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.9375rem;
    color: #1a1a2e;
}

.recovery-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.recovery-actions .btn-auth-secondary {
    width: auto;
    padding: 0.625rem 1rem;
}

.confirmation-check {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* ============================================
   Passkey Management
   ============================================ */
.passkey-explainer {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f5ff 0%, #faf5ff 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.explainer-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explainer-icon .rzi {
    font-size: 2rem;
    color: white;
}

.explainer-content h3 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
}

.explainer-content p {
    margin: 0 0 1rem 0;
    color: #4b5563;
    font-size: 0.9375rem;
}

.passkey-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.passkey-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #065f46;
    font-size: 0.875rem;
}

.passkey-benefits .rzi {
    color: #10b981;
}

/* Add Passkey Section */
.add-passkey-section,
.passkeys-list-section {
    margin-bottom: 2rem;
}

.add-passkey-section h3,
.passkeys-list-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a2e;
}

.limit-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 12px;
    color: #92400e;
}

.limit-warning .rzi {
    font-size: 1.5rem;
}

.limit-warning p {
    margin: 0;
}

/* Passkeys List */
.passkeys-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.passkey-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.passkey-item .passkey-icon {
    width: 44px;
    height: 44px;
    background: #e5e7eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.passkey-item .passkey-icon .rzi {
    font-size: 1.25rem;
}

.passkey-details {
    flex: 1;
}

.passkey-name {
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.passkey-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.passkey-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-icon.danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.no-passkeys {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.no-passkeys-icon {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-content h3 {
    margin: 0 0 1rem 0;
    color: #1a1a2e;
}

.modal-content p {
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-icon.danger {
    background: #fef2f2;
}

.modal-icon.danger .rzi {
    font-size: 2rem;
    color: #dc2626;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.modal-actions button {
    flex: 1;
    max-width: 150px;
}

.warning-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fef2f2;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: left;
}

.warning-message .rzi {
    flex-shrink: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .auth-page {
        padding: 0;
        background: white;
    }

    .auth-container {
        border-radius: 0;
        box-shadow: none;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .auth-tabs {
        flex-wrap: wrap;
    }

    .auth-tab {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .registration-methods .method-card {
        flex-direction: column;
        text-align: center;
    }

    .method-badge {
        position: static;
        margin-top: 0.5rem;
    }

    .passkey-explainer {
        flex-direction: column;
        text-align: center;
    }

    .passkey-benefits {
        justify-content: center;
    }

    .passkey-item {
        flex-wrap: wrap;
    }

    .passkey-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .security-card {
        flex-direction: column;
        text-align: center;
    }

    .recovery-codes-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Loading State
   ============================================ */
.loading-state {
    text-align: center;
    padding: 3rem;
}

.loading-state p {
    color: #6b7280;
    margin-top: 1rem;
}

/* ============================================
   Security Code Component
   ============================================ */
.security-code-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.security-code-group .form-label {
    align-self: flex-start;
    margin-bottom: 1rem;
}

.auth-security-code {
    justify-content: center;
    width: 100%;
}

/* Remove outer container border from Radzen SecurityCode */
.auth-security-code.rz-security-code,
.security-code-group .rz-security-code,
.rz-security-code.auth-security-code,
div.auth-security-code.rz-security-code {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    outline: none !important;
}

/* Also target the valid/invalid states container - remove outer border */
.auth-security-code.valid.rz-security-code,
.auth-security-code.invalid.rz-security-code,
.rz-security-code.auth-security-code.valid,
.rz-security-code.auth-security-code.invalid,
.security-code-group .rz-security-code.valid,
.security-code-group .rz-security-code.invalid,
.form-group .auth-security-code.valid,
.form-group .auth-security-code.invalid {
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
}

/* Default state - black borders, light grey background */
.auth-security-code .rz-security-code-input,
.auth-security-code.rz-security-code .rz-security-code-input,
.rz-security-code.auth-security-code .rz-security-code-input,
.security-code-group .rz-security-code .rz-security-code-input,
.form-group .rz-security-code .rz-security-code-input,
div.rz-security-code .rz-security-code-input {
    width: 48px !important;
    height: 56px !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 2px solid #1f2937 !important;
    border-radius: 12px !important;
    background: #f3f4f6 !important;
    transition: all 0.2s ease !important;
    color: #1a1a2e !important;
}

.auth-security-code .rz-security-code-input:focus,
.auth-security-code.rz-security-code .rz-security-code-input:focus,
.rz-security-code .rz-security-code-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
    background: #ffffff !important;
}

.auth-security-code .rz-security-code-input::placeholder {
    color: #9ca3af;
}

/* Security Code Validation States - Individual inputs only */
.auth-security-code.valid .rz-security-code-input,
.auth-security-code.valid.rz-security-code .rz-security-code-input {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
}

.auth-security-code.valid .rz-security-code-input:focus,
.auth-security-code.valid.rz-security-code .rz-security-code-input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.auth-security-code.invalid .rz-security-code-input,
.auth-security-code.invalid.rz-security-code .rz-security-code-input {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.auth-security-code.invalid .rz-security-code-input:focus,
.auth-security-code.invalid.rz-security-code .rz-security-code-input:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Ensure container never has border/outline in any state */
.auth-security-code:focus,
.auth-security-code:focus-within,
.auth-security-code.rz-security-code:focus,
.auth-security-code.rz-security-code:focus-within,
.auth-security-code.valid:focus-within,
.auth-security-code.invalid:focus-within,
.auth-security-code.valid,
.auth-security-code.invalid {
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Responsive adjustments for security code */
@media (max-width: 480px) {
    .auth-security-code .rz-security-code-input {
        width: 42px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
    }
    
    .auth-security-code {
        gap: 0.375rem !important;
    }
}
