* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #1e1e1e;
    color: #ffffff;
}

/* TOP BAR */
.top-bar {
    background-color: #2b2f3a;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav {
    display: flex;
    flex-direction: row;      /* 🔥 FORCE LEFT → RIGHT */
    align-items: center;
    gap: 25px;
    padding: 15px 25px;
    border-bottom: 2px solid #ccc;
    flex-wrap: nowrap;        /* 🔥 PREVENT STACKING */
}

 .face-card {
        width: 120px;          /* rectangle width */
        height: 150px;         /* rectangle height */
        background-color: 1px #fff;
        border:solid #ccc;
        border-radius: 2px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        margin: 17px;
        text-align: center;
    }
  


.nav-item {
    text-align: center;
    cursor: pointer;
}

.nav-item span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

.nav-link {
    text-decoration: none;
    color: inherit;
}


/* ICON BOX */
.icon {
    width: 55px;
    height: 55px;
    border: 15px solid #625b5b;
    background-color: #625b5b;
    border-radius: 8px;
    margin: auto;
}

/* HOVER EFFECT */
.nav-item:hover .icon {
    background-color:#625b5b;
}

button {
        background-color: #2b7bff;
        color: white;
        border: none;
        padding: 10px 18px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        margin-top: 10px;
    }

    button:hover {
        background-color: #1a5fcc;
    }

.system-title {
    font-size: 18px;
    font-weight: bold;
}

.system-status {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.safe {
    background-color: green;
}

/* MAIN CONTAINER */
.container {
     display: flex;
    height: calc(100vh - 160px);
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: #252932;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 10px;
    margin-top: 20px;
    font-size: 14px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    font-size: 13px;
    margin-bottom: 8px;
}

.state-buttons button {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 12px;
}

.safe-btn { background: green; }
.alert-btn { background: blue; }
.risk-btn { background: red; }

/* CAMERA GRID */
.camera-grid {
    flex: 1;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 10px;
}

.camera-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera {
    background-color: #000;
    border: 2px solid #555;
    position: relative;
}

.camera.normal {
    border-color: #6bfb72;
}

.camera.alert {
    border-color: blue;
}

.camera.danger {
    border-color: red;
}

/* CAMERA LABEL */
.cam-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 12px;
    background: rgba(0,0,0,0.6);
    padding: 3px 6px;
}

/* WARNINGS */
.warning {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 4px;
}

.red {
    background-color: red;
}

.blue {
    background-color: blue;
}

.green {
    background-color: green;
}

/* EVENT LOG */
.event-log {
    background-color: #2b2f3a;
    padding: 15px;
}

.event-log h3 {
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th, td {
    border: 1px solid #444;
    padding: 8px;
    text-align: left;
}

.red-text {
    color: red;
}

.blue-text {
    color: deepskyblue;
}


/* AI INSIGHTS PANEL */
.ai-panel {
    width: 260px;
    background: #252932;
    padding: 20px;
    border-left: 2px solid #444;
    font-size: 13px;
}

.ai-panel h3 {
    font-size: 14px;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 6px;
}

.ai-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 6px 0;
}

.ai-item span {
    font-weight: bold;
}

.ai-item .yes {
    color: red;
}

.ai-item.time span {
    color: deepskyblue;
}

.playback-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns by default */
    grid-auto-rows: 200px; 
    gap: 10px;
}
    