/* SOC_CAM_MONITOR_V11_20260812 */

.cam-monitor-view {
    overflow: auto;
}

.cam-monitor-panel {
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.cam-monitor-shell {
    display: grid;
    gap: 16px;
}

.cm-topline {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
    gap: 10px;
}

.cm-metric,
.cm-refresh {
    min-height: 68px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 15px;
    background: rgba(12, 13, 20, 0.82);
}

.cm-metric {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 12px 15px;
}

.cm-metric span {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.cm-metric strong {
    color: #fff;
    font-size: 1.35rem;
}

.cm-metric.live strong,
.cm-metric strong.ok {
    color: #6dffab;
}

.cm-metric strong.warning {
    color: #ffc36e;
}

.cm-refresh {
    padding: 0 18px;
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.cm-refresh:hover {
    border-color: rgba(127, 95, 255, 0.5);
    background: rgba(91, 66, 196, 0.13);
}

.cm-room-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.cm-room-tab {
    min-height: 66px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    cursor: pointer;
}

.cm-room-tab span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 800;
}

.cm-room-tab strong {
    color: #fff;
    font-size: 1rem;
}

.cm-room-tab small {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.65rem;
}

.cm-room-tab.active {
    border-color: rgba(124, 91, 255, 0.48);
    background: rgba(107, 77, 232, 0.14);
    box-shadow: inset 0 0 0 1px rgba(124, 91, 255, 0.08);
}

.cm-warning-banner {
    padding: 11px 13px;
    border: 1px solid rgba(255, 179, 71, 0.2);
    border-radius: 12px;
    background: rgba(136, 82, 18, 0.09);
    color: #ffd296;
    font-size: 0.76rem;
}

.cm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 13px;
}

.cm-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 17px;
    background:
        linear-gradient(
            145deg,
            rgba(18, 20, 30, 0.96),
            rgba(10, 11, 17, 0.95)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 12px 38px rgba(0, 0, 0, 0.14);
}

.cm-card-head {
    display: flex;
    align-items: center;
    gap: 11px;
}

.cm-avatar {
    position: relative;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 900;
}

.cm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.cm-avatar i {
    position: absolute;
    right: -1px;
    bottom: 1px;
    width: 13px;
    height: 13px;
    border: 3px solid #11131c;
    border-radius: 50%;
    background: #818795;
}

.cm-avatar i.live {
    background: #3df08c;
    box-shadow: 0 0 14px rgba(61, 240, 140, 0.56);
}

.cm-avatar i.warning {
    background: #ffb34d;
}

.cm-person {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 5px;
}

.cm-person > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.cm-person strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 0.98rem;
    white-space: nowrap;
}

.cm-person small {
    color: rgba(255, 255, 255, 0.43);
}

.cm-live-badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.07em;
}

.cm-live-badge.live {
    background: rgba(39, 161, 93, 0.15);
    color: #74f2ac;
}

.cm-live-badge.warning {
    background: rgba(166, 101, 22, 0.15);
    color: #ffc473;
}

.cm-card-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 14px;
}

.cm-card-status span {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.032);
}

.cm-card-status small {
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.07em;
}

.cm-card-status strong {
    color: #fff;
    font-size: 0.91rem;
}

.cm-card-status em {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.33);
    font-size: 0.61rem;
    font-style: normal;
    text-overflow: ellipsis;
}

.cm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.cm-card-meta span {
    padding: 5px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.65rem;
}

.cm-card-meta strong {
    color: rgba(255, 255, 255, 0.72);
}

.cm-card-meta span.warning {
    width: 100%;
    border: 1px solid rgba(255, 174, 64, 0.16);
    background: rgba(136, 82, 18, 0.07);
    color: #ffc476;
}

.cm-actions {
    display: grid;
    grid-template-columns: 1.25fr repeat(4, 1fr);
    gap: 6px;
    margin-top: 13px;
}

.cm-actions button {
    min-width: 0;
    min-height: 38px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.67rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.cm-actions button:hover {
    background: rgba(255, 255, 255, 0.075);
    color: #fff;
}

.cm-actions button.danger {
    border-color: rgba(255, 75, 92, 0.24);
    background: rgba(158, 31, 45, 0.12);
    color: #ffacb5;
}

.cm-actions button.danger.ghost {
    background: transparent;
}

.cm-actions button:disabled {
    opacity: 0.5;
    cursor: wait;
}

.cm-tech {
    margin-top: 11px;
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.64rem;
}

.cm-tech summary {
    cursor: pointer;
}

.cm-tech code {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.4);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-no-actions {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.68rem;
}

.cm-empty,
.cm-loading,
.cm-error {
    grid-column: 1 / -1;
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 26px;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 17px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.cm-empty > span {
    color: #7e65ff;
    font-size: 2rem;
}

.cm-empty strong,
.cm-loading strong,
.cm-error strong {
    color: #fff;
}

.cm-loading > span {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8267ff;
    border-radius: 50%;
    animation: cmSpin 0.8s linear infinite;
}

@keyframes cmSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1180px) {
    .cm-room-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cm-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 760px) {
    .cm-topline {
        grid-template-columns: 1fr 1fr;
    }

    .cm-room-strip {
        grid-template-columns: 1fr 1fr;
    }

    .cm-grid {
        grid-template-columns: 1fr;
    }

    .cm-actions {
        grid-template-columns: 1fr 1fr;
    }
}
