/* User Profile Modal Styles */

.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.profile-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    position: relative;
}

.profile-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
}

.profile-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
    border-radius: 20px 20px 0 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    border: 4px solid white;
}

.profile-header h2 {
    margin: 10px 0 5px;
    font-size: 2em;
    text-transform: capitalize;
}

.profile-header p {
    opacity: 0.9;
    font-size: 0.95em;
}

.profile-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    background: #f8f8f8;
    overflow-x: auto;
}

.profile-tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
}

.profile-tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.profile-tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.profile-tab-btn span {
    font-size: 1.2em;
}

.profile-tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.profile-tab-content.active {
    display: block;
}

.profile-tab-content h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.profile-tab-content h4 {
    margin: 20px 0 15px;
    color: #555;
    font-size: 1.2em;
}

/* Information Tab */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.profile-info-item {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.profile-info-item label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-item p {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Security Tab */
.security-section {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.security-section .form-group {
    margin-bottom: 15px;
}

.danger-zone {
    border: 2px solid #dc3545;
    background: #fff5f5;
}

.danger-zone h4 {
    color: #dc3545;
}

.danger-zone p {
    color: #666;
    margin-bottom: 15px;
}

/* Notifications Tab */
.notification-settings {
    max-width: 600px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 12px;
    margin-bottom: 15px;
}

.setting-info {
    flex: 1;
}

.setting-info label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.setting-info small {
    color: #666;
    font-size: 0.85em;
}

.setting-info input[type="email"],
.setting-info input[type="tel"],
.setting-info input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    margin-top: 8px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 15px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Statistics Tab */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.category-breakdown {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
}

#categoryStats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.category-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.category-stat-item .name {
    font-weight: 600;
    color: #333;
}

.category-stat-item .count {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
}

/* Profile Footer */
.profile-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    background: #f8f8f8;
    border-radius: 0 0 20px 20px;
}

.profile-footer button {
    flex: 1;
    max-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .profile-tabs {
        flex-wrap: nowrap;
    }

    .profile-tab-btn {
        font-size: 0.85em;
        padding: 12px 15px;
        min-width: 120px;
    }

    .profile-tab-content {
        padding: 20px;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .toggle-switch {
        margin-left: 0;
    }

    .profile-footer {
        flex-direction: column;
    }

    .profile-footer button {
        max-width: 100%;
    }
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9em;
}
