.mem-profiler-container {
    padding: 0 0 20px 0;
}

.mem-profiler-control-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mem-profiler-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mem-profiler-status-badge.active {
    background-color: rgba(0, 200, 83, 0.15);
    color: #00c853;
}

.mem-profiler-status-badge.inactive {
    background-color: rgba(158, 158, 158, 0.15);
    color: #9e9e9e;
}

.mem-profiler-status-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.mem-profiler-status-badge.active .status-dot {
    background-color: #00c853;
    animation: pulse-dot 1.5s infinite;
}

.mem-profiler-status-badge.inactive .status-dot {
    background-color: #9e9e9e;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.mem-profiler-status-detail {
    font-size: 0.8rem;
    color: #9e9e9e;
}

.mem-profiler-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mem-profiler-summary-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0d6efd;
}

.mem-profiler-summary-card .card-label {
    font-size: 0.78rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.mem-profiler-summary-card .card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #212529;
}

.mem-profiler-summary-card .card-sub {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 4px;
}

.mem-profiler-summary-card.highlight-danger {
    border-left-color: #dc3545;
}

.mem-profiler-summary-card.highlight-warning {
    border-left-color: #ffc107;
}

.mem-profiler-summary-card.highlight-info {
    border-left-color: #0dcaf0;
}

.mem-profiler-routes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.mem-profiler-routes-table thead th {
    background: #f4f5f7;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #495057;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    border-bottom: 2px solid #dee2e6;
}

.mem-profiler-routes-table thead th:hover {
    background: #e9ecef;
}

.mem-profiler-routes-table thead th .sort-indicator {
    margin-left: 4px;
    font-size: 0.7rem;
    color: #adb5bd;
}

.mem-profiler-routes-table thead th.sorted-asc .sort-indicator,
.mem-profiler-routes-table thead th.sorted-desc .sort-indicator {
    color: #0d6efd;
}

.mem-profiler-routes-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.mem-profiler-routes-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}

.mem-profiler-routes-table tbody tr:hover {
    background-color: #f8f9fa;
}

.mem-profiler-routes-table tbody tr.row-green {
    border-left: 3px solid #00c853;
}

.mem-profiler-routes-table tbody tr.row-yellow {
    border-left: 3px solid #ffc107;
}

.mem-profiler-routes-table tbody tr.row-red {
    border-left: 3px solid #dc3545;
}

.mem-profiler-routes-table .route-name {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.83rem;
    color: #0d6efd;
}

.mem-profiler-routes-table .delta-value {
    font-weight: 600;
}

.mem-profiler-routes-table .delta-value.positive {
    color: #dc3545;
}

.mem-profiler-routes-table .delta-value.negative {
    color: #00c853;
}

.mem-profiler-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 0;
}

.mem-profiler-detail-row {
    display: none;
}

.mem-profiler-detail-row.expanded {
    display: table-row;
}

.mem-profiler-detail-row td {
    padding: 0;
    background: #f8f9fa;
}

.mem-profiler-detail-wrapper {
    padding: 10px 15px 15px 30px;
    max-height: 300px;
    overflow-y: auto;
}

.mem-profiler-detail-table thead th {
    background: #e9ecef;
    padding: 7px 10px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #495057;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}

.mem-profiler-detail-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mem-profiler-detail-table .long-duration {
    color: #dc3545;
    font-weight: 600;
}

.mem-profiler-params-cell {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.78rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mem-profiler-params-cell:hover {
    white-space: normal;
    word-break: break-all;
}

.mem-profiler-params-cell .param-key {
    color: #0d6efd;
    font-weight: 600;
}

.mem-profiler-params-cell .param-val {
    color: #495057;
}

.mem-profiler-chart-container {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 10px;
}

.mem-profiler-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9e9e9e;
}

.mem-profiler-empty-state i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: #212529;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    width: 260px;
    text-align: left;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-tooltip]::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #212529;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

.mem-profiler-summary-card[data-tooltip]::after {
    width: 280px;
}

.mem-profiler-routes-table thead th[data-tooltip]::after {
    width: 240px;
}
