.monitor-toolbar {
    position: relative;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px solid rgba(16, 23, 37, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(16, 23, 37, 0.05);
    backdrop-filter: blur(10px);
}
.monitor-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(16, 23, 37, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}
.monitor-control-label {
    white-space: nowrap;
}
.monitor-dropdown {
    position: relative;
}
.monitor-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.82rem;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}
.monitor-dropdown-trigger:hover {
    color: var(--accent-primary);
}
.monitor-dropdown-value {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.monitor-dropdown-chevron {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-tertiary);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.monitor-dropdown.is-open .monitor-dropdown-chevron {
    transform: rotate(180deg);
}
.monitor-control:has(.monitor-dropdown.is-open) {
    background: #fff;
    box-shadow: 0 4px 18px rgba(23, 32, 51, 0.08);
}
.monitor-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -0.35rem;
    z-index: 60;
    min-width: 200px;
    max-width: 300px;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(23, 32, 51, 0.12), 0 2px 8px rgba(23, 32, 51, 0.06);
    display: none;
}
.monitor-dropdown.is-open .monitor-dropdown-menu {
    display: block;
}
.monitor-dropdown-option {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.52rem 0.7rem;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    line-height: 1.35;
    transition: background 0.12s ease, color 0.12s ease;
}
.monitor-dropdown-option:hover {
    background: rgba(23, 32, 51, 0.04);
}
.monitor-dropdown-option.is-selected {
    background: rgba(47, 158, 118, 0.1);
    color: #1f7a5c;
    font-weight: 500;
}
.monitor-list {
    display: flex;
    flex-direction: column;
}
.monitor-board-panel {
    margin: 0;
    padding: 12px 18px 8px;
    border: 1px solid rgba(16, 23, 37, 0.1);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 23, 37, 0.05);
}
.monitor-section-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0 0.85rem;
}
.monitor-section-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}
.monitor-section-count {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}
.monitor-row {
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--border-light);
}
.monitor-row:last-child {
    border-bottom: none;
}
.monitor-row--nested {
    padding: 0.65rem 0;
}

.monitor-row--nested .monitor-name {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.monitor-row--nested .monitor-meta {
    color: var(--text-tertiary);
}

.monitor-row--nested .monitor-rate {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.monitor-row--nested .monitor-bar {
    height: 22px;
}

.monitor-platform {
    border-bottom: 1px solid rgba(16, 23, 37, 0.16);
}
.monitor-platform > .monitor-row {
    border-bottom: none;
}
.monitor-models .monitor-row--nested {
    border: none;
}
.monitor-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}
.monitor-row-top--clickable {
    cursor: pointer;
}
.monitor-row-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
    flex-wrap: wrap;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot--green { background: #2f9e76; }
.status-dot--yellow { background: #d4a017; }
.status-dot--red { background: #dc6b5a; }
.status-dot--gray { background: #c8cdd6; }
.monitor-name {
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-primary);
}
.monitor-name-sub {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 400;
}
.monitor-meta {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}
.monitor-rate {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}
.monitor-chevron {
    width: 11px;
    height: 7px;
    margin-left: 0.2rem;
    flex-shrink: 0;
    background-color: var(--text-tertiary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' d='M2 2.2L6 6L10 2.2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' d='M2 2.2L6 6L10 2.2'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.15s ease;
}
.monitor-chevron--open {
    transform: rotate(180deg);
}
.monitor-bar {
    display: flex;
    gap: 2px;
    width: 100%;
    height: 34px;
}
.timeline-cell {
    flex: 1 1 0;
    min-width: 2px;
    height: 100%;
    border-radius: 2px;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.timeline-cell:hover {
    transform: scaleY(1.06);
    filter: brightness(0.96);
    z-index: 1;
}
.timeline-cell--green { background: #2f9e76; }
.timeline-cell--yellow { background: #d4a017; }
.timeline-cell--red { background: #dc6b5a; }
.timeline-cell--gray { background: #e8ecf1; }

.monitor-row--nested .timeline-cell--green { background: #55b590; }
.monitor-row--nested .timeline-cell--yellow { background: #dbb848; }
.monitor-row--nested .timeline-cell--red { background: #e28c7f; }
.monitor-row--nested .timeline-cell--gray { background: #eef0f4; }
.monitor-models {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.monitor-loading,
.monitor-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}
.monitor-board-panel.monitor-loading,
.monitor-board-panel.monitor-empty {
    padding: 2.5rem 1rem;
}
.monitor-tooltip {
    position: fixed;
    z-index: 200;
    pointer-events: none;
    background: #fff;
    color: var(--text-primary);
    min-width: 168px;
    max-width: 240px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid rgba(23, 32, 51, 0.07);
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.12), 0 2px 8px rgba(23, 32, 51, 0.05);
    display: none;
}
.monitor-tooltip-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}
.monitor-tooltip-status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.35;
}
.monitor-tooltip-icon {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    line-height: 1;
}
.monitor-tooltip-icon--green { background: #2f9e76; }
.monitor-tooltip-icon--yellow { background: #d4a017; }
.monitor-tooltip-icon--red { background: #dc6b5a; }
.monitor-tooltip-icon--gray { background: #b8bec8; }
.monitor-tooltip-detail {
    margin-top: 0.35rem;
    font-size: 0.76rem;
    color: var(--text-tertiary);
    line-height: 1.35;
}
@media (max-width: 640px) {
    .monitor-row-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .monitor-rate {
        padding-left: 1.25rem;
    }
}
