/**
 * TuerSmart v2.3 - Login & Registration Styles
 * ==============================================
 * Login, Register, Password Reset Pages
 * 
 * @author IBKuehne
 * @date 2025-11-24 05:06:00 UTC
 */

/* ========================================
   LOGIN LAYOUT
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: var(--primary-gradient);
}

.login-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    padding: var(--space-10) var(--space-8);
    animation: slideUp 0.5s ease;
}

/* ========================================
   LOGIN HEADER
   ======================================== */

.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-3xl);
    color: white;
    font-weight: bold;
}

.login-header h1 {
    font-size: var(--text-2xl);
    color: var(--text);
    margin-bottom: var(--space-2);
}

.login-header p {
    color: var(--text-muted);
    font-size: var(--text-base);
    margin: 0;
}

/* ========================================
   LOGIN FORM
   ======================================== */

.login-form {
    margin-bottom: var(--space-6);
}

.login-form .form-group {
    margin-bottom: var(--space-5);
}

.login-form input {
    font-size: var(--text-base);
    padding: var(--space-4);
}

.login-form .btn {
    margin-top: var(--space-2);
    padding: var(--space-4);
    font-size: var(--text-base);
}

/* Password Field with Toggle */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-2);
    font-size: var(--text-lg);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary);
}

/* ========================================
   LOGIN FOOTER
   ======================================== */

.login-footer {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}

.login-footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-footer-info {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-4);
}

/* ========================================
   REGISTRATION PAGE
   ======================================== */

.register-container {
    max-width: 600px;
    padding: var(--space-8);
}

.register-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.register-form .form-row.single {
    grid-template-columns: 1fr;
}

/* Password Generator */
.password-generator {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.password-generator .btn {
    flex: 1;
}

.password-generator .btn-icon {
    flex: 0;
}

/* Legal Checkbox */
.legal-checkbox {
    padding: var(--space-4);
    background: var(--background);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    margin-bottom: var(--space-5);
    transition: border-color var(--transition-fast);
}

.legal-checkbox:has(input:checked) {
    border-color: var(--success);
    background: var(--success-light);
}

.legal-checkbox label {
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

.legal-checkbox a {
    color: var(--primary);
    text-decoration: underline;
}

/* ========================================
   2FA PAGE
   ======================================== */

.twofa-container {
    max-width: 420px;
}

.twofa-code-input {
    font-size: var(--text-3xl);
    text-align: center;
    letter-spacing: 0.5em;
    font-weight: bold;
    padding: var(--space-5);
    font-family: 'Courier New', monospace;
}

.twofa-resend {
    text-align: center;
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.twofa-resend button {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: var(--text-sm);
    padding: 0;
}

.twofa-resend button:hover {
    color: var(--primary-dark);
}

.twofa-resend button:disabled {
    color: var(--text-muted);
    text-decoration: none;
    cursor: not-allowed;
}

/* 2FA Method Selection */
.twofa-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: var(--space-6) 0;
}

.twofa-method {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.twofa-method:hover {
    border-color: var(--primary);
    background: var(--background);
}

.twofa-method input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.twofa-method-icon {
    font-size: var(--text-2xl);
}

.twofa-method-info {
    flex: 1;
}

.twofa-method-info strong {
    display: block;
    margin-bottom: var(--space-1);
}

.twofa-method-info small {
    display: block;
    color: var(--text-muted);
}

.twofa-method:has(input:checked) {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

/* ========================================
   PASSWORD RESET
   ======================================== */

.password-reset-success {
    text-align: center;
    padding: var(--space-8);
}

.password-reset-success .icon {
    font-size: 60px;
    color: var(--success);
    margin-bottom: var(--space-4);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .login-container,
    .register-container {
        padding: var(--space-8) var(--space-6);
    }
    
    .register-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .login-header h1 {
        font-size: var(--text-xl);
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: var(--space-2);
    }
    
    .login-container,
    .register-container {
        padding: var(--space-6) var(--space-4);
    }
}