/* Authentication and User Interface Styles */

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.user-link:hover {
    color: #f35821;
}

.role-badge {
    background: linear-gradient(135deg, #f35821, #fec304);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
    border: 1px solid #e9ecef;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #f35821;
}

.dropdown-item i {
    margin-left: 0.5rem;
    width: 16px;
}

.auth-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Enhanced Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f35821 0%, #fec304 100%);
    padding: 2rem 1rem;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f35821, #fec304);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f35821, #fec304);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.auth-title {
    color: var(--secondary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Enhanced Form Styles */
.auth-form {
    margin-bottom: 2rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #f35821;
    background: white;
    box-shadow: 0 0 0 3px rgba(243, 88, 33, 0.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.password-strength.weak {
    background: #fff5f5;
    color: #dc3545;
    border: 1px solid #feb2b2;
}

.password-strength.medium {
    background: #fffbf0;
    color: #d69e2e;
    border: 1px solid #fbd38d;
}

.password-strength.strong {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #f35821, #fec304);
    color: white;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e14a1a, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 88, 33, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #f35821;
    border: 2px solid #f35821;
}

.btn-outline:hover {
    background: #f35821;
    color: white;
}

/* Account Type Info */
.account-type-info {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.account-type-info h4 {
    color: #1565c0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.account-type-info p {
    color: #424242;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.auth-links a {
    color: #f35821;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #e14a1a;
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 500;
    position: relative;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-right: 4px solid #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-right: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-right: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-right: 4px solid #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Checkbox and Radio Styles */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: #f35821;
}

.form-check-label {
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Terms and Conditions */
.terms-text {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.terms-text a {
    color: #f35821;
    text-decoration: none;
    font-weight: 600;
}

.terms-text a:hover {
    text-decoration: underline;
}