/* VERBATEL POC – layout ispirato all'interfaccia di riferimento (header scuro, sidebar sinistra, area centrale) */
:root {
    --bg-app: #0f1418;
    --bg-panel: #1a2128;
    --bg-panel-2: #232c34;
    --bg-header: #0b0f13;
    --border: #2f3a44;
    --text: #e6ebf0;
    --text-muted: #8a97a3;
    --accent: #ffb400;
    --accent-hover: #ffc94a;
    --normal: #3ec46d;
    --fault: #f0b429;
    --alarm: #e5484d;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.brand-mark { font-weight: 700; letter-spacing: 2px; color: var(--accent); font-size: 18px; }
.brand-sub { margin-left: 12px; color: var(--text-muted); font-size: 12px; }

.header-actions { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; }

.status-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--text-muted);
}
.status-dot.ok { background: var(--normal); }
.status-dot.ko { background: var(--alarm); }
.status-dot.disabled { background: #888; }
.status-dot.unknown { background: var(--text-muted); }

/* Main layout */
.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    overflow: hidden;
}

.sidebar {
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h2 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.sidebar-header button {
    background: transparent; color: var(--text-muted); border: 1px solid var(--border);
    padding: 3px 8px; border-radius: 3px; cursor: pointer; font-size: 14px;
}
.sidebar-header button:hover { color: var(--accent); border-color: var(--accent); }

.camera-legend {
    display: flex; gap: 12px; padding: 8px 14px;
    font-size: 11px; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-normal { background: var(--normal); }
.dot-fault  { background: var(--fault); }
.dot-alarm  { background: var(--alarm); }

.camera-list {
    list-style: none; margin: 0; padding: 6px 0;
    overflow-y: auto; flex: 1;
}
.camera-list li {
    padding: 10px 14px; cursor: pointer;
    border-left: 3px solid transparent;
    display: flex; align-items: center; gap: 10px;
}
.camera-list li:hover { background: var(--bg-panel-2); }
.camera-list li.selected {
    background: var(--bg-panel-2);
    border-left-color: var(--accent);
}
.camera-list li .cam-name { flex: 1; }
.camera-list li .cam-model { color: var(--text-muted); font-size: 11px; }
.camera-placeholder { color: var(--text-muted); font-style: italic; }

/* Detail area */
.detail {
    background: var(--bg-app);
    overflow: auto;
    padding: 18px;
}
.detail-empty {
    height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}

/* Footer */
.app-footer {
    padding: 6px 18px;
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    text-align: right;
}

/* Utility */
.btn {
    background: var(--accent); color: #1a1a1a; border: none;
    padding: 6px 14px; border-radius: 3px; cursor: pointer;
    font-weight: 600; letter-spacing: 0.3px;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary {
    background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--alarm); color: #fff; }
