.nvr-wrap {
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Sarabun', sans-serif;
}

.nvr-header {
    background: #0f172a;
    color: #fff;
    padding: 14px 18px;
    border-radius: 12px 12px 0 0;
    font-weight: 400;
}

.nvr-header span {
    display: block;
    font-size: 14px;
    opacity: .7;
    margin-top: 3px;
}

.nvr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 0 0 12px 12px;
}

.nvr-card {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nvr-video {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    flex: 1;
}

.nvr-video iframe, .nvr-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: contain;
}

.nvr-footer {
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nvr-title {
    font-size: 16px;
    font-weight: 400;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.status-msg {
    font-size: 14px;
    font-weight: 400;
    color: #ffaa00;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-retry {
    background: #475569;
    border: none;
    color: #fff;
    font-family: 'Sarabun', sans-serif;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-retry:hover {
    background: #1e293b;
}

.nvr-controls {
    display: flex;
    gap: 8px;
}

.btn-server {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 5px 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-server:hover {
    background: #e2e8f0;
}

.btn-server.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

@media(max-width:768px) {
    .nvr-grid {
        grid-template-columns: 1fr;
    }
}