/* Authentication-specific styles for Remote Life Health Platform */

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 2rem;
}

.auth-card {
    background: var(--content-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 2rem;
}

.auth-logo i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-logo p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Auth Form */
.auth-form {
    text-align: left;
}

/* Info Box for OTP explanation */
.info-box {
    background: var(--info-bg, #e7f3ff);
    border: 1px solid var(--info-border, #b8daff);
    border-radius: var(--border-radius, 6px);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    color: var(--info-text, #0c5460);
}

.info-box i {
    color: var(--info-icon, #0ea5e9);
    margin-top: 2px;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-control {
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 90, 160, 0.1);
}

.auth-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Auth Button */
.auth-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    transition: all var(--transition-fast);
    margin-bottom: 1.5rem;
}

.auth-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* OTP Input */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.otp-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(44, 90, 160, 0.1);
}

.otp-input.filled {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

/* OTP Timer */
.otp-timer {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.otp-timer.warning {
    color: var(--warning-color);
}

.otp-timer.expired {
    color: var(--danger-color);
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Security Notice */
.security-notice {
    background: var(--info-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.security-notice i {
    margin-right: 0.5rem;
}

/* Loading State */
.auth-loading {
    display: none;
    text-align: center;
    color: var(--text-secondary);
}

.auth-loading.active {
    display: block;
}

.auth-loading .spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Error Messages */
.auth-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-error i {
    margin-right: 0.5rem;
}

/* Success Messages */
.auth-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-success i {
    margin-right: 0.5rem;
}

/* Password Strength Meter */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.password-strength-fill.weak {
    width: 25%;
    background: var(--danger-color);
}

.password-strength-fill.fair {
    width: 50%;
    background: var(--warning-color);
}

.password-strength-fill.good {
    width: 75%;
    background: var(--info-color);
}

.password-strength-fill.strong {
    width: 100%;
    background: var(--success-color);
}

.password-requirements {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.password-requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.password-requirement i {
    margin-right: 0.5rem;
    width: 1rem;
}

.password-requirement.met {
    color: var(--success-color);
}

.password-requirement.unmet {
    color: var(--danger-color);
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-me .form-check {
    margin-bottom: 0;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Clinic Selection */
.clinic-selector {
    margin-bottom: 1.5rem;
}

.clinic-option {
    display: block;
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--content-bg);
    text-align: left;
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.clinic-option:hover {
    border-color: var(--primary-color);
    background: rgba(44, 90, 160, 0.05);
}

.clinic-option.selected {
    border-color: var(--primary-color);
    background: rgba(44, 90, 160, 0.1);
}

.clinic-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.clinic-domain {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        border-radius: var(--border-radius);
    }
    
    .auth-logo i {
        font-size: 3rem;
    }
    
    .auth-logo h1 {
        font-size: 1.25rem;
    }
    
    .otp-container {
        gap: 0.25rem;
    }
    
    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
    .auth-container,
    .auth-card {
        display: none !important;
    }
}