/* Monitor page grid */
monitor-page.monitor-layout {
    display: block;
    height: 100vh;
    overflow: hidden;
}

.monitor-page {
    height: 100vh;
    overflow: hidden;
}

.monitor-topbar {
    height: 52px;
    flex-shrink: 0;
    z-index: 10;
}

.monitor-stats {
    flex-shrink: 0;
}

.monitor-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left panel */
.monitor-list {
    width: 280px;
    min-width: 260px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-column: column;
}

.monitor-orders-scroll {
    flex: 1;
    overflow-y: auto;
}

.monitor-order-card {
    cursor: pointer;
    transition: background 0.15s;
}

.monitor-order-card:hover {
    background: #f0f0f0;
}

.monitor-order-card.selected {
    background: #fff;
    border-left: 3px solid #212529 !important;
}

.monitor-order-card.order-new-flash {
    animation: newOrderFlash 1.5s ease-out 2;
}

@keyframes newOrderFlash {
    0%   { background: #fff3cd; }
    100% { background: transparent; }
}

/* Center panel */
.monitor-detail {
    width: 260px;
    min-width: 240px;
    flex-shrink: 0;
    overflow-y: auto;
    background: #fff;
}

.monitor-section {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.monitor-section:last-of-type {
    border-bottom: none;
}

.section-title {
    letter-spacing: 0.06em;
    font-weight: 600;
    text-transform: uppercase;
}

/* Right panel — map sidebar */
.monitor-location {
    flex: 1;
    min-width: 0;
    background: #fafafa;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.monitor-location yandex-map {
    flex: 1;
    min-height: 0;
    display: block;
}

.monitor-map-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* Stats chips */
.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-chip-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-chip-label {
    font-size: 0.68rem;
    color: #6c757d;
    margin-top: 1px;
}

/* Avatar initials */
.avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Status timeline */
.status-timeline {
    padding-left: 0.25rem;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Master option in assign modal */
.master-option {
    cursor: pointer;
    border-radius: 0.6rem;
    border: 1px solid var(--bs-border-color-translucent);
    transition: border-color 0.15s;
}

.master-option:hover {
    border-color: #adb5bd;
}

.master-option.selected {
    border-color: #212529;
    box-shadow: inset 0 0 0 1px #212529;
}

.master-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Monitor actions */
.monitor-actions {
    margin-top: auto;
}

/* Responsive — collapse map panel on narrow screens */
@media (max-width: 900px) {
    .monitor-location {
        display: none;
    }
}

@media (max-width: 768px) {
    .monitor-list {
        width: 100%;
    }
    .monitor-detail {
        display: none;
    }
    .monitor-list.has-selection .monitor-detail {
        display: flex;
    }
}
