/* ==========================================================
   CCTV MONITOR GLOBAL STYLES (style.css)
   ========================================================== */

:root {
    --bg-main: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-card: #1e293b;
    --accent-color: #38bdf8;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --active-item: #334155;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h2 { font-size: 1.1rem; font-weight: 600; }

.menu-list {
    list-style: none;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-item:hover { background-color: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.menu-item.active { background-color: var(--active-item); color: var(--accent-color); }

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    overflow: hidden;
    height: 100vh;
    width: calc(100vw - 260px);
}

.top-nav {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    flex-shrink: 0;
}

.top-nav h1 { font-size: 1.1rem; font-weight: 600; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.dot { width: 6px; height: 6px; background-color: #22c55e; border-radius: 50%; }

/* Penyesuaian Kontainer Utama & Toolbar Bawah */
.content-area {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 60px) !important;
    padding: 8px 12px !important;
    gap: 6px !important;
    overflow: hidden !important;
    width: 100% !important;
}

#video-grid {
    flex-grow: 1 !important;
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bottom-control-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* Video Card & Wrapper Styling */
.video-card {
    background-color: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.video-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    flex-grow: 1 !important;
    background-color: #000;
    min-width: 0 !important;
    min-height: 0 !important;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    object-fit: contain !important;
}

.card-footer {
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background-color: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.info-box {
    background-color: rgba(56, 189, 248, 0.08);
    border-left: 4px solid var(--accent-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #cbd5e1;
    width: 100% !important;
    flex-shrink: 0;
}