/* Sign-in screen: device QR step, 2FA step, passcode step, and branding. */

.auth-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 400px;
    padding: 20px;
}
.auth-screen.hidden {
    display: none;
}

.auth-step {
    width: 100%;
}

.auth-header {
    margin-bottom: 30px;
}
.logo-section h1 {
    color: var(--text-primary);
    font-size: 2.2em;
    margin-bottom: 8px;
    font-weight: 700;
}
.subtitle {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin: 0;
    font-weight: 400;
}

.auth-welcome {
    background: var(--bg-input);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}
.welcome-icon {
    font-size: 3em;
    margin-bottom: 15px;
}
.auth-welcome h2 {
    color: var(--text-primary);
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: 600;
}
.welcome-text {
    color: var(--text-secondary);
    font-size: 1em;
    line-height: 1.6;
    margin: 0;
}

.auth-content {
    width: 100%;
    max-width: 450px;
}

.reporter-badge {
    text-align: center;
    font-size: 0.95em;
    color: var(--accent-success);
    margin-bottom: 16px;
}

.auth-title {
    font-size: 1.6em;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}
.auth-description {
    font-size: 1.05em;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}
.auth-input {
    width: 100%;
    max-width: 400px;
    padding: 16px;
    font-size: 1.1em;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 2px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.auth-input.error {
    border-color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}
.auth-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0;
}
.auth-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.auth-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    box-shadow: none;
}
.auth-error {
    color: var(--accent-danger);
    font-size: 0.9em;
    margin-top: 10px;
    display: none;
}
.character-counter {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 5px;
}

.auth-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}
.branding {
    text-align: center;
}
.developed-by {
    color: var(--text-muted);
    font-size: 0.9em;
    margin: 0 0 5px 0;
}
.company-name {
    color: var(--accent-primary);
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-decoration: none;
}
.tagline {
    color: var(--text-muted);
    font-size: 0.8em;
    font-style: italic;
    margin: 0;
}

/* QR Scanner */
.qr-scanner-section {
    margin-bottom: 20px;
}
.qr-toggle-btn {
    background: var(--gradient-success);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.qr-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.qr-reader-container {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}
.qr-close-btn {
    background: var(--accent-danger);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.2s ease;
}
.qr-close-btn:hover {
    background: #dc2626;
}

.input-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}
.input-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}
.input-divider span {
    background: var(--bg-card);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 0.9em;
    position: relative;
    z-index: 2;
}
.manual-input-section {
    width: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .auth-screen {
        padding: 15px;
    }
    .logo-section h1 {
        font-size: 1.8em;
    }
    .auth-welcome {
        padding: 20px;
        margin-bottom: 25px;
    }
    .welcome-icon {
        font-size: 2.5em;
    }
    .auth-welcome h2 {
        font-size: 1.4em;
    }
    .welcome-text {
        font-size: 0.95em;
    }

    .qr-toggle-btn {
        width: 100%;
        max-width: 300px;
        padding: 16px 24px;
        min-height: 52px;
    }
    .qr-toggle-btn:active {
        transform: scale(0.97);
    }
    .qr-reader-container {
        padding: 15px;
    }
    #qr-reader {
        width: 100% !important;
        max-width: 280px;
    }
    .qr-close-btn {
        padding: 14px 28px;
        min-height: 48px;
    }
    .qr-close-btn:active {
        transform: scale(0.97);
    }

    .auth-title {
        font-size: 1.4em;
    }
    .auth-description {
        font-size: 1em;
        padding: 0 10px;
    }
    .auth-input {
        max-width: 100%;
        font-size: 16px; /* Prevents iOS auto-zoom */
        padding: 16px;
        min-height: 52px;
    }
    .auth-btn {
        width: 100%;
        max-width: 300px;
        padding: 16px 32px;
        min-height: 52px;
    }
    .auth-btn:active {
        transform: scale(0.97);
    }
}
