/* Profile Page Styles */
.profile-container {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    background-color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Profile Sidebar */
.profile-sidebar {
    width: 280px;
    background-color: #f5f7fa;
    padding: 30px 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-header {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile-avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.avatar-edit:hover {
    background-color: #e64a19;
    transform: scale(1.1);
}

.profile-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.user-info {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.subscription-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.subscription-badge.free {
    background-color: #e0e0e0;
    color: #616161;
}

.subscription-badge.premium {
    background-color: #ffd54f;
    color: #ff6f00;
}

.subscription-badge.advanced {
    background-color: #81c784;
    color: #2e7d32;
}

.profile-menu {
    display: flex;
    flex-direction: column;
}

.profile-menu a {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: var(--dark-color);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.profile-menu a i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.profile-menu a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.profile-menu a.active {
    background-color: rgba(255, 87, 34, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Profile Content */
.profile-content {
    flex: 1;
    padding: 30px;
}

.profile-section {
    display: none;
}

.profile-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section-header h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.edit-btn {
    padding: 8px 15px;
    background-color: #f5f7fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    color: var(--dark-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.edit-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Profile Form */
.profile-form {
    max-width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: #fff;
}

.profile-form input:disabled,
.profile-form select:disabled,
.profile-form textarea:disabled {
    background-color: #f5f7fa;
    cursor: not-allowed;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.2);
    outline: none;
}

.profile-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.save-btn {
    padding: 12px 25px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.save-btn:hover {
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.3);
    transform: translateY(-2px);
}

.save-btn:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.cancel-btn {
    padding: 12px 25px;
    background: #fff;
    color: var(--gray-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cancel-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.cancel-btn:disabled {
    background: #f5f7fa;
    color: #bdbdbd;
    cursor: not-allowed;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-input .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    cursor: pointer;
}

/* Form Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Settings Group */
.settings-group {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.settings-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-group h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* Danger Zone */
.danger-zone {
    background-color: rgba(244, 67, 54, 0.05);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.delete-account-btn {
    padding: 12px 25px;
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.delete-account-btn:hover {
    background-color: #d32f2f;
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

/* Subscription Section */
.current-plan {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #f5f7fa;
    padding: 25px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.plan-info {
    flex: 1;
}

.plan-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.premium-text {
    color: #ff6f00;
}

.plan-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.plan-features {
    list-style: none;
    padding: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--gray-color);
}

.plan-features li i {
    color: var(--accent-color);
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upgrade-btn {
    padding: 12px 25px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.upgrade-btn:hover {
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.3);
    transform: translateY(-2px);
}

.cancel-subscription-btn {
    padding: 12px 25px;
    background: #fff;
    color: #f44336;
    border: 1px solid #f44336;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cancel-subscription-btn:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

/* Payment History */
.payment-table {
    width: 100%;
    border-collapse: collapse;
}

.payment-table th,
.payment-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.payment-table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.payment-table tr:last-child td {
    border-bottom: none;
}

.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.status.pending {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.status.failed {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.invoice-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Activity Section */
.activity-filters,
.saved-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background-color: #f5f7fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    color: var(--gray-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.activity-timeline {
    margin-bottom: 30px;
}

.timeline-item {
    display: flex;
    margin-bottom: 25px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 20px;
    height: calc(100% + 25px);
    width: 2px;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 0;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #fff;
    margin-right: 20px;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-content {
    background-color: #f5f7fa;
    padding: 20px;
    border-radius: var(--radius-md);
    flex: 1;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.timeline-content p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.timeline-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
}

.time {
    color: #9e9e9e;
}

.category {
    color: var(--secondary-color);
    font-weight: 500;
}

.view-link {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: auto;
}

.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 10px 25px;
    background-color: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background-color: rgba(255, 87, 34, 0.1);
}

/* Saved Content Section */
.saved-items {
    margin-bottom: 30px;
}

.saved-item {
    display: flex;
    align-items: flex-start;
    background-color: #f5f7fa;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    position: relative;
}

.saved-item:last-child {
    margin-bottom: 0;
}

.saved-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #fff;
    margin-right: 20px;
    flex-shrink: 0;
}

.saved-content {
    flex: 1;
}

.saved-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.saved-content p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.saved-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
}

.saved-date {
    color: #9e9e9e;
}

.remove-saved {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.remove-saved:hover {
    background-color: #f44336;
    color: #fff;
}

/* User Menu Styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.2rem;
    color: var(--gray-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile span {
    font-weight: 500;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background-color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 10px 0;
    z-index: 100;
    display: none;
}

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

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--dark-color);
    transition: var(--transition);
}

.dropdown-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dropdown-menu a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-menu a.active {
    color: var(--primary-color);
    background-color: rgba(255, 87, 34, 0.1);
}

.dropdown-menu a.logout {
    color: #f44336;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .profile-container {
        flex-direction: column;
        margin: 20px;
    }
    
    .profile-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding-bottom: 0;
    }
    
    .profile-header {
        padding: 20px;
    }
    
    .profile-menu {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .profile-menu a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .profile-menu a.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary-color);
    }
    
    .profile-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .current-plan {
        flex-direction: column;
    }
    
    .plan-info {
        margin-bottom: 20px;
    }
    
    .plan-actions {
        width: 100%;
    }
    
    .payment-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .timeline-item,
    .saved-item {
        flex-direction: column;
    }
    
    .timeline-icon,
    .saved-icon {
        margin-bottom: 15px;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .save-btn,
    .cancel-btn {
        width: 100%;
    }
}
