/* ============================
   Patch Bay — Base Styles
   ============================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0F1417;
    color: #E4E9EC;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #262E33;
}

header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}

main {
    padding: 20px 24px;
}

main h2 {
    font-size: 15px;
    font-weight: 600;
    color: #8B979E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px 0;
}

/* ============================
   Room List Table
   ============================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    overflow: hidden;
}

thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8B979E;
    padding: 10px 14px;
    border-bottom: 1px solid #262E33;
}

tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #262E33;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

/* Status text coloring, used in table cells and sidebar pills */
.status {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status.online {
    color: #3FCF8E;
}

.status.offline {
    color: #E85C5C;
}

/* --- Room Detail Sidebar Panel --- */

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 5;
}
.backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

#detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: #161C20;
    border-left: 1px solid #262E33;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    z-index: 10;
    color: #E4E9EC;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}
#detail-panel.open {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #262E33;
}
.panel-header h2 {
    margin: 0 0 8px 0;
    font-size: 17px;
    color: #E4E9EC;
    text-transform: none;
    letter-spacing: normal;
}
.panel-header .pills {
    display: flex;
    gap: 8px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #8B979E;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}
.close-btn:hover {
    color: #E4E9EC;
    background: rgba(255, 255, 255, 0.06);
}

.panel-body {
    padding: 20px;
}

.device-card {
    border: 1px solid #262E33;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 12px;
}

.device-card p {
    margin: 6px 0;
    font-size: 13px;
}

.device-card p strong {
    color: var(--accent, #E4002B);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Room Detail Page --- */

.breadcrumb {
    font-size: 12px;
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--accent, #E4002B);
    text-decoration: none;
}

.room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.room-header h2 {
    margin: 0;
    font-size: 20px;
    color: #E4E9EC;
    text-transform: none;
    letter-spacing: normal;
}

.command-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.cmd-btn {
    background: #161C20;
    border: 1px solid #262E33;
    color: #E4E9EC;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.cmd-btn:hover {
    border-color: #E85C5C;
}
.cmd-btn.danger:hover {
    border-color: #E85C5C;
    color: #E85C5C;
}

.dim {
    color: #8B979E;
}

/* --- Filter Toolbar & Column Picker --- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.filter-label {
    font-size: 12px;
    color: #8B979E;
}

.toolbar select {
    background: #161C20;
    border: 1px solid #262E33;
    color: #E4E9EC;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-left: 4px;
}

.column-picker {
    position: relative;
    margin-left: auto; /* pushes it to the right edge of the toolbar */
}

.picker-button {
    background: #161C20;
    border: 1px solid #262E33;
    color: #E4E9EC;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.picker-button:hover {
    border-color: #E85C5C;
}

.picker-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    padding: 8px;
    z-index: 20;
    min-width: 160px;
}
.picker-menu.open {
    display: block;
}

.picker-item {
    display: block;
    padding: 4px 6px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
    user-select: none;
}
.picker-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Overview Dashboard --- */

header nav a {
    color: #8B979E;
    text-decoration: none;
    font-size: 13px;
    margin-left: 16px;
}
header nav a:hover { color: #4FD1C5; }

#dashboard-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
    cursor: pointer;
}
.stat-card:hover { border-color: #4FD1C5; }

.stat-number {
    font-size: 26px;
    font-weight: 600;
}

.stat-label {
    font-size: 12px;
    color: #8B979E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.dash-panel {
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    padding: 16px;
}
.dash-panel h3 {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #8B979E;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dash-panel canvas {
    max-height: 260px;
}

.alert-item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid #262E33;
    font-size: 13px;
}
.alert-item:last-child { border-bottom: none; }
.alert-room { font-weight: 600; }
.alert-text { color: #8B979E; font-size: 12px; }

/* --- Left Sidebar Navigation --- */

#sidebar {
    position: fixed;
    top: var(--banner-offset, 0px);
    left: 0;
    width: 200px;
    height: calc(100vh - var(--banner-offset, 0px));
    background: #161C20;
    border-right: 1px solid #262E33;
    display: flex;
    flex-direction: column;
    z-index: 15;
    transition: transform 0.2s ease;
}

body.sidebar-hidden #sidebar {
    transform: translateX(-100%);
}

.sidebar-brand {
    font-size: 17px;
    font-weight: 700;
    padding: 20px 20px 20px 56px; /* leaves room for the hamburger button */
    border-bottom: 1px solid var(--border, #262E33);
    letter-spacing: 0.01em;
    color: var(--accent, #E4002B);   /* bold brand red — text only, no pill,
                                        so it reads distinctly from the
                                        active-page background highlight */
    text-decoration: none;
    cursor: pointer;
}

.sidebar-brand:hover {
    color: var(--accent-hover, #C00025);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-bottom {
    padding: 12px 0;
    border-top: 1px solid #262E33;
}

.sidebar-link {
    display: block;
    padding: 10px 20px;
    color: #8B979E;
    text-decoration: none;
    font-size: 13.5px;
    border-left: 2px solid transparent;
}
.sidebar-link:hover {
    color: #E4E9EC;
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-link.active {
    color: var(--accent, #4FD1C5);
    border-left-color: var(--accent, #4FD1C5);
    background: var(--accent-soft, rgba(79, 209, 197, 0.06));
}

/* Hamburger toggle — always visible, floats above the sidebar */
#sidebar-toggle {
    position: fixed;
    top: calc(14px + var(--banner-offset, 0px));
    left: 14px;
    z-index: 500;
    background: var(--surface, #161C20);
    border: 1px solid var(--border, #262E33);
    color: var(--text, #E4E9EC);
    font-size: 15px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: var(--shadow, none);
}
#sidebar-toggle:hover {
    border-color: var(--accent, #4FD1C5);
}

/* Shift page content right when sidebar is visible */
body.has-sidebar header,
body.has-sidebar main {
    margin-left: 200px;
    transition: margin-left 0.2s ease;
}

body.sidebar-hidden header,
body.sidebar-hidden main {
    margin-left: 0;
}

/* When sidebar is hidden, pad the header so it doesn't sit under the hamburger */
body.sidebar-hidden header {
    padding-left: 56px;
}

/* --- View Toggle & Room Tree --- */

.view-toggle {
    display: flex;
    gap: 0;
}
.view-btn {
    background: #161C20;
    border: 1px solid #262E33;
    color: #8B979E;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}
.view-btn:first-child { border-radius: 4px 0 0 4px; }
.view-btn:last-child { border-radius: 0 4px 4px 0; border-left: none; }
.view-btn.active {
    color: #4FD1C5;
    background: rgba(79, 209, 197, 0.08);
}

.room-tree {
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    padding: 8px;
}

.tree-region > summary {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}
.tree-region > summary:hover { color: #4FD1C5; }

.tree-city {
    margin-left: 18px;
}
.tree-city > summary {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    color: #E4E9EC;
}
.tree-city > summary:hover { color: #4FD1C5; }

.tree-room {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 30px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13.5px;
}
.tree-room:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tree-count {
    color: #8B979E;
    font-weight: 400;
    font-size: 12px;
    margin-left: 6px;
}

.device-field {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.device-field:last-child { border-bottom: none; }
.field-label { color: #8B979E; }

/* --- Management Page --- */

.mgmt-layout {
    display: flex;
    gap: 20px;
}

.mgmt-subnav {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mgmt-link {
    display: block;
    padding: 9px 12px;
    color: #8B979E;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}
.mgmt-link:hover {
    color: #E4E9EC;
    background: rgba(255, 255, 255, 0.03);
}
.mgmt-link.active {
    color: #4FD1C5;
    background: rgba(79, 209, 197, 0.08);
}

.mgmt-content {
    flex: 1;
    min-width: 0;
}

.conn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* --- Drill-in nav panels --- */

#sidebar {
    overflow-x: hidden;
}

.nav-panel {
    position: absolute;
    top: 57px;
    left: 0;
    width: 100%;
    height: calc(100vh - 57px);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease;
    background: #161C20;
}

#sidebar.drilled .main-panel {
    transform: translateX(-100%);
}

.drill-panel {
    transform: translateX(100%);
}
.drill-panel.open {
    transform: translateX(0);
}

.drill-tree {
    overflow-y: auto;
    flex: 1;
}

.tree-region-link.expanded .tree-caret {
    transform: rotate(90deg);
}

.tree-city-link {
    padding-left: 32px !important;
    display: flex !important;
    justify-content: space-between;
}

.tree-caret {
    display: inline-block;
    transition: transform 0.15s ease;
    margin-right: 4px;
}

.tree-city-group {
    display: none;
}
.tree-city-group.expanded {
    display: block;
}

/* --- Incidents Page --- */

.incident-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.sev-chip {
    background: #161C20;
    border: 1px solid #262E33;
    color: #E4E9EC;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sev-chip .sev-count {
    font-size: 16px;
    font-weight: 600;
}
.sev-chip.sev-critical .sev-count { color: #E85C5C; }
.sev-chip.sev-warning .sev-count { color: #C9A94F; }
.sev-chip.sev-info .sev-count { color: #4FA8D1; }
.sev-chip.active { border-color: #E85C5C; }

.incident-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.incident-card {
    background: #161C20;
    border: 1px solid #262E33;
    border-left-width: 3px;
    border-radius: 6px;
    padding: 14px 16px;
    cursor: pointer;
}
.incident-card:hover { background: rgba(255, 255, 255, 0.02); }
.sev-border-critical { border-left-color: #E85C5C; }
.sev-border-warning { border-left-color: #C9A94F; }
.sev-border-info { border-left-color: #4FA8D1; }

.incident-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.sev-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 3px;
}
.sev-badge.sev-critical { background: rgba(232, 92, 92, 0.15); color: #E85C5C; }
.sev-badge.sev-warning { background: rgba(201, 169, 79, 0.15); color: #C9A94F; }
.sev-badge.sev-info { background: rgba(79, 168, 209, 0.15); color: #4FA8D1; }

.incident-type {
    font-size: 12px;
    color: #8B979E;
}

.incident-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.incident-desc { font-size: 13px; margin-bottom: 8px; }
.incident-meta { font-size: 11.5px; }

.toolbar input[type="date"] {
    background: #161C20;
    border: 1px solid #262E33;
    color: #E4E9EC;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-left: 4px;
}

.uptime-list { list-style: none; padding: 0; margin: 0; }
.uptime-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.uptime-good { color: #4ade80; }
.uptime-warn { color: #facc15; }
.uptime-bad  { color: #f87171; }

/* Scheduled Operations */
.hidden { display: none; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.filter-bar label { font-size: 12px; color: #8B979E; display: flex; flex-direction: column; gap: 4px; }
.sched-form-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: center; }
.sched-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sched-table th, .sched-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #232B30; }
.ops-row { padding: 6px 0; border-bottom: 1px solid #232B30; }
.ops-caret, .linklike { background: none; border: none; color: var(--accent, #E4002B); cursor: pointer; font-size: 13px; }
.ops-devices { margin: 4px 0 4px 28px; }

.ops-manage-head { display: flex; gap: 12px; align-items: center; }
.ops-cancel { margin-left: auto; background: none; border: 1px solid #E85C5C; color: #E85C5C; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.resolve-btn { margin-left: auto; background: none; border: 1px solid #E85C5C; color: #E85C5C; border-radius: 4px; padding: 2px 8px; cursor: pointer; font-size: 12px; }
.bulk-controls { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.incident-controls { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.resolved-label { color: #3FCF8E; font-size: 12px; }
.incident-card.resolved { opacity: 0.6; }
.resolve-btn:disabled { opacity: 0.4; cursor: default; }

/* Scrollable report sections: ~5 rows visible, then scroll */
.scroll-box { max-height: 270px; overflow-y: auto; }
.scroll-box table { width: 100%; }
.scroll-box thead th { position: sticky; top: 0; background: #171D21; z-index: 1; }
.section-head { display: flex; align-items: center; gap: 12px; }
.section-head h3 { margin-right: auto; }

/* Reporting tabs */
.report-tabs { display: flex; gap: 20px; margin-bottom: 14px; }
.report-tab { background: none; border: none; color: #8B979E; font-size: 15px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; padding: 4px 0; border-bottom: 2px solid transparent; }
.report-tab.active { color: #E4E9EC; border-bottom-color: #E85C5C; }
.issue-date { min-width: 90px; }

/* Incident status widget */
#incident-status-btn { position: fixed; top: calc(14px + var(--banner-offset, 0px)); right: 20px; z-index: 60; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border, #232B30); background: var(--surface, #171D21); color: var(--text, #E4E9EC); cursor: pointer; font-size: 15px; box-shadow: var(--shadow, none); }
#incident-status-btn.all-clear { border-color: #3FCF8E; color: #3FCF8E; }
#incident-status-btn.has-incidents { border-color: #E85C5C; color: #E85C5C; }
#incident-status-btn.has-incidents::after { content: attr(data-count); position: absolute; top: -6px; right: -6px; background: #E85C5C; color: #fff; border-radius: 8px; font-size: 10px; padding: 1px 5px; }
#incident-panel { position: fixed; top: var(--banner-offset, 0px); right: -340px; width: 320px; height: calc(100vh - var(--banner-offset, 0px)); background: #12181C; border-left: 1px solid #232B30; z-index: 55; transition: right 0.25s ease; overflow-y: auto; }
#incident-panel.open { right: 0; }
.incident-panel-head { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid #232B30; }
.incident-panel-head strong { margin-right: auto; }
.incident-mini-card { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #232B30; align-items: flex-start; }
.incident-mini-desc { font-size: 12px; }
/* ============================
   Pinned settings link (always visible under drill panels)
   ============================ */

.sidebar-bottom-fixed {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #161C20;
    border-top: 1px solid #262E33;
    z-index: 3;             /* sits above the sliding nav panels */
}

/* Shorten the sliding panels so they don't run underneath the pinned bar */
.nav-panel {
    height: calc(100vh - 57px - 46px);
}

/* ============================
   Profiles section
   ============================ */

.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #262E33;
    margin-bottom: 16px;
}

.tab-bar button {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #000000;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

.tab-bar button:hover { color: #959797; }

.tab-bar button.active {
    color: #474747;
    border-bottom-color: #E85C5C;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.profile-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #8B979E;
    margin-top: 8px;
}

.source-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid #262E33;
}
.source-badge.vendor { color: #4FA8D1; border-color: #4FA8D1; }
.source-badge.local  { color: #C9A94F; border-color: #C9A94F; }

/* ============================
   Asset management
   ============================ */

.warranty-banner {
    border-left: 3px solid #C9A94F;
}
.warranty-banner.all-clear {
    border-left-color: #3FCF8E;
}

.warranty-pill {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
}
.warranty-pill.active   { color: #3FCF8E; background: rgba(63,207,142,0.12); }
.warranty-pill.expiring { color: #C9A94F; background: rgba(201,169,79,0.12); }
.warranty-pill.expired  { color: #E85C5C; background: rgba(232,92,92,0.12); }
.warranty-pill.unknown  { color: #8B979E; background: rgba(139,151,158,0.12); }

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

/* ============================
   User settings page
   ============================ */

.settings-card {
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 16px;
    max-width: 520px;
}

.settings-card h3 { margin: 0 0 12px 0; font-size: 14px; }

.theme-options { display: flex; gap: 10px; }

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 10px 16px;
    border: 1px solid #262E33;
    border-radius: 6px;
    font-size: 12px;
}
.theme-swatch.selected { border-color: #E85C5C; }
.theme-swatch .swatch-preview {
    width: 48px; height: 30px; border-radius: 4px; border: 1px solid #262E33;
}

/* ============================
   Home page: upcoming operations card
   ============================ */

.upcoming-op-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #262E33;
    font-size: 13px;
}
.upcoming-op-row:last-child { border-bottom: none; }
.upcoming-op-when { color: #8B979E; white-space: nowrap; }

/* ============================
   Light theme
   ============================
   The site was built dark-first with hardcoded colors, so light mode works
   as an override layer on the main surfaces. */

html[data-theme="light"] body { background: #F4F6F8; color: #1C2429; }
html[data-theme="light"] header { border-bottom-color: #D8DEE3; }
html[data-theme="light"] main h2 { color: #5A6A73; }

html[data-theme="light"] table,
html[data-theme="light"] #sidebar,
html[data-theme="light"] .nav-panel,
html[data-theme="light"] .device-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .dash-panel,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .sidebar-bottom-fixed,
html[data-theme="light"] #incident-panel,
html[data-theme="light"] #detail-panel {
    background: #FFFFFF;
    border-color: #D8DEE3;
    color: #1C2429;
}

html[data-theme="light"] thead th,
html[data-theme="light"] tbody td { border-bottom-color: #E4E9EC; }
html[data-theme="light"] tbody tr:hover { background: rgba(0, 0, 0, 0.03); }

html[data-theme="light"] .sidebar-link { color: #3A4750; }
html[data-theme="light"] .sidebar-link:hover { background: rgba(0,0,0,0.04); }
html[data-theme="light"] .sidebar-link.active { background: rgba(0,0,0,0.06); }

html[data-theme="light"] .modal { background: #FFFFFF; color: #1C2429; }
html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer { border-color: #E4E9EC; }
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] select {
    background: #F4F6F8; border-color: #D8DEE3; color: #1C2429;
}
html[data-theme="light"] .btn { background: #EDEFF2; border-color: #D8DEE3; color: #1C2429; }
html[data-theme="light"] .dim { color: #6B7A84; }

/* ============================
   Device page toggles + agent page
   ============================ */

.setting-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #8B979E;
}
.setting-toggle input[type="checkbox"] {
    width: 34px; height: 18px;
    appearance: none;
    background: #262E33;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
}
.setting-toggle input[type="checkbox"]:checked { background: #3FCF8E; }
.setting-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #E4E9EC;
    transition: transform 0.15s;
}
.setting-toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }
.setting-toggle input[type="checkbox"]:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================
   Devices page: search + header filters
   ============================ */

.device-search {
    width: 280px;
    padding: 7px 10px;
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 4px;
    color: #E4E9EC;
    font-size: 13px;
    font-family: inherit;
}
.device-search:focus { outline: none; border-color: #E85C5C; }

th.th-filterable { position: relative; cursor: pointer; user-select: none; }
th.th-filterable:hover { color: #E4E9EC; }
th.th-filtered { color: #E85C5C; }
.th-caret { font-size: 9px; }
.th-count {
    font-size: 10px;
    background: #E85C5C;
    color: #0F1417;
    border-radius: 999px;
    padding: 0 5px;
}

.th-filter-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    max-height: 280px;
    overflow-y: auto;
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 6px;
    z-index: 20;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    font-size: 13px;
    color: #E4E9EC;
    cursor: default;
}
.th-filter-menu.open { display: block; }
.th-filter-menu .picker-item { display: block; padding: 4px 6px; cursor: pointer; }
.th-filter-menu .picker-item:hover { background: rgba(255,255,255,0.04); }
.th-filter-menu .linklike { display: block; padding: 4px 6px; }

html[data-theme="light"] .device-search,
html[data-theme="light"] .th-filter-menu { background: #FFFFFF; border-color: #D8DEE3; color: #1C2429; }

/* ============================
   Agent chat widget
   ============================ */

#agent-chat-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid #262E33;
    background: #1C2429;
    color: #E85C5C;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
    z-index: 90;
    transition: transform 0.15s;
}
#agent-chat-fab:hover { transform: scale(1.08); }
#agent-chat-fab.hidden { display: none; }

#agent-chat-panel {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 360px;
    height: 480px;
    max-height: calc(100vh - 44px);
    display: none;
    flex-direction: column;
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 91;
    overflow: hidden;
}
#agent-chat-panel.open { display: flex; }

.acp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #262E33;
    font-size: 13px;
    font-weight: 600;
}
.acp-header button {
    background: none; border: none; color: #8B979E;
    font-size: 14px; cursor: pointer;
}
.acp-header button:hover { color: #E4E9EC; }

.acp-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #8B979E;
    margin-right: 4px;
}
.acp-dot.on { background: #3FCF8E; }
.acp-dot.off { background: #E85C5C; }

.acp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.acp-msg {
    max-width: 85%;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    white-space: pre-wrap;      /* multi-line replies keep their layout */
    word-break: break-word;
    font-family: inherit;
}
.acp-user {
    align-self: flex-end;
    background: #2f6fed;
    color: #fff;
    border-bottom-right-radius: 3px;
}
.acp-agent {
    align-self: flex-start;
    background: #1C2429;
    border: 1px solid #262E33;
    color: #E4E9EC;
    border-bottom-left-radius: 3px;
}
.acp-thinking { color: #8B979E; }

.acp-input-row {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #262E33;
}
.acp-input-row input {
    flex: 1;
    padding: 8px 10px;
    background: #0F1417;
    border: 1px solid #262E33;
    border-radius: 6px;
    color: #E4E9EC;
    font-size: 13px;
    font-family: inherit;
}
.acp-input-row input:focus { outline: none; border-color: #E85C5C; }
.acp-input-row button {
    padding: 8px 14px;
    background: #2f6fed;
    border: 1px solid #2f6fed;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.acp-input-row button:hover { background: #2660d1; }

html[data-theme="light"] #agent-chat-panel,
html[data-theme="light"] #agent-chat-fab { background: #FFFFFF; border-color: #D8DEE3; }
html[data-theme="light"] .acp-agent { background: #F4F6F8; border-color: #D8DEE3; color: #1C2429; }
html[data-theme="light"] .acp-input-row input { background: #F4F6F8; border-color: #D8DEE3; color: #1C2429; }

/* Room calendars: bounded + scrollable (fleets get long) */
#cal-mappings { max-height: 320px; overflow-y: auto; }

/* Incident launcher hides while its panel is open */
#incident-status-btn.panel-open { display: none; }
.incident-panel-actions { display: flex; align-items: center; gap: 10px; }
.incident-collapse { font-size: 15px; }

/* Warranty banner: soft "blind spots" state (between all-clear and warning) */
.warranty-banner.info { border-left-color: #4FA8D1; }

/* Header filter dropdowns styled like the toolbar <select>s they replaced */
.th-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    background: #161C20;
    border: 1px solid #262E33;
    border-radius: 4px;
    color: #8B979E;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    font-family: inherit;
}
.th-select:hover { color: #E4E9EC; border-color: #3A4750; }
.th-filtered .th-select { color: #E85C5C; border-color: #E85C5C; }
html[data-theme="light"] .th-select { background: #FFFFFF; border-color: #D8DEE3; }

/* Warranty table: scrolls under a frozen header; banner + bulk bar stay put */
#asset-table {
    max-height: calc(100vh - 360px);
    overflow-y: auto;
}
#asset-table thead th {
    position: sticky;
    top: 0;
    background: #161C20;
    z-index: 5;
}
html[data-theme="light"] #asset-table thead th { background: #FFFFFF; }

/* Incident panel: column layout — header, scrolling cards, pinned footer */
#incident-panel { display: flex; flex-direction: column; overflow: hidden; }
#incident-panel-list { flex: 1; overflow-y: auto; }
.incident-panel-foot {
    padding: 12px 14px;
    border-top: 1px solid #232B30;
    text-align: left;       /* View all sits bottom-LEFT, far from the » */
}

/* ============================
   Dashboard trend charts
   ============================ */
.chart-box { margin-top: 8px; }
.trend-chart { width: 100%; height: auto; }
.chart-grid { stroke: #262E33; stroke-width: 1; }
.chart-axis { fill: #8B979E; font-size: 10px; }
.chart-legend { display: flex; gap: 14px; font-size: 11px; color: #8B979E; margin-bottom: 4px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

.hbar-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.hbar-label { width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; background: #1C2429; border-radius: 3px; height: 12px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: #E85C5C; border-radius: 3px; }
.hbar-value { width: 64px; text-align: right; color: #8B979E; }
html[data-theme="light"] .chart-grid { stroke: #E4E9EC; }
html[data-theme="light"] .hbar-track { background: #EDEFF2; }

/* ═══════════════════════════════════════════════════════════
   DESIGN REFRESH — "shipped app" layer
   One variable system drives both themes; every rule below is
   scoped with html[data-theme] so it outranks the legacy rules
   above without editing them.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #F4F5F7;
    --surface: #FFFFFF;
    --surface-2: #F0F1F3;
    --border: #E2E5EA;
    --text: #1E262E;
    --muted: #68737F;
    --accent: #E4002B;            /* F5 red */
    --accent-hover: #C00025;
    --accent-soft: rgba(228, 0, 43, 0.07);
    --accent-2: #8A93A0;          /* cool grey secondary */
    --success: #12855F;
    --warn: #B7791F;
    --danger: #C0392B;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16,24,40,0.05), 0 4px 16px rgba(16,24,40,0.06);
    --shadow-pop: 0 16px 48px rgba(16,24,40,0.14);
}
html[data-theme="dark"] {
    --bg: #0B0F14;
    --surface: #131A22;
    --surface-2: #1A232E;
    --border: #223040;
    --text: #E7ECF2;
    --muted: #8C9AA8;
    --accent: #FF3355;            /* F5 red, brightened for dark surfaces */
    --accent-hover: #E4002B;
    --accent-soft: rgba(255, 51, 85, 0.12);
    --accent-2: #7C8794;
    --success: #34D399;
    --warn: #FBBF24;
    --danger: #F87171;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 8px 24px rgba(0,0,0,0.25);
    --shadow-pop: 0 12px 40px rgba(0,0,0,0.45);
}

html[data-theme] body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Header: sticky, translucent */
html[data-theme] header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
html[data-theme] header h1 { letter-spacing: -0.01em; }
html[data-theme] main h2 { color: var(--dim); }

/* Sidebar */
html[data-theme] #sidebar,
html[data-theme] .nav-panel,
html[data-theme] .sidebar-bottom-fixed {
    background: var(--surface);
    border-color: var(--border);
}
html[data-theme] .sidebar-link {
    border-radius: var(--radius-sm);
    margin: 1px 8px;
    color: var(--dim);
    transition: background 0.12s, color 0.12s;
}
html[data-theme] .sidebar-link:hover { background: var(--surface-2); color: var(--text); }
html[data-theme] .sidebar-link.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* Cards & panels — the signature: a jack-port dot beside each panel title */
html[data-theme] .device-card,
html[data-theme] .dash-panel,
html[data-theme] .stat-card,
html[data-theme] .settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
html[data-theme] .stat-card:hover,
html[data-theme] .dash-panel:hover {
    box-shadow: var(--shadow-lift);
    border-color: var(--border-strong);
}
html[data-theme] .dash-panel > h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dim);
}
html[data-theme] .dash-panel > h3::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);   /* the patch-bay jack */
    flex: none;
}

/* Tables */
html[data-theme] table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
html[data-theme] thead th {
    background: var(--surface-2);
    color: var(--dim);
    border-bottom: 1px solid var(--border);
}
html[data-theme] tbody td { border-bottom: 1px solid var(--border); }
html[data-theme] tbody tr { transition: background 0.1s; }
html[data-theme] tbody tr:hover { background: var(--accent-soft); }
html[data-theme] tbody tr:last-child td { border-bottom: none; }
html[data-theme] #asset-table thead th { background: var(--surface-2); }

/* Buttons */
html[data-theme] .btn {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
html[data-theme] .btn:hover { border-color: var(--accent); }
html[data-theme] .btn:active { transform: translateY(1px); }
html[data-theme] .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #08211D;
}
html[data-theme] .btn-primary:hover { background: #3FD9C6; border-color: #3FD9C6; }
html[data-theme] .btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
html[data-theme] .btn-danger:hover { background: rgba(240,106,106,0.12); }
html[data-theme] .picker-button, html[data-theme] .export-button {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
}

/* Inputs */
html[data-theme] input[type="text"],
html[data-theme] input[type="search"],
html[data-theme] input[type="password"],
html[data-theme] input[type="number"],
html[data-theme] input[type="date"],
html[data-theme] input[type="month"],
html[data-theme] select,
html[data-theme] textarea {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.12s, box-shadow 0.12s;
}
html[data-theme] input:focus,
html[data-theme] select:focus,
html[data-theme] textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
html[data-theme] .device-search { background: var(--surface-2); border-color: var(--border); color: var(--text); }

/* Modals */
html[data-theme] .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    color: var(--text);
}
html[data-theme] .modal-overlay { backdrop-filter: blur(3px); }
html[data-theme] .modal-header, html[data-theme] .modal-footer { border-color: var(--border); }

/* Header filter dropdowns + menus */
html[data-theme] .th-select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--dim);
}
html[data-theme] .th-select:hover { color: var(--text); border-color: var(--border-strong); }
html[data-theme] .th-filtered .th-select { color: var(--accent); border-color: var(--accent); }
html[data-theme] .th-filter-menu, html[data-theme] .picker-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    color: var(--text);
}

/* Chat widget + incident panel */
html[data-theme] #agent-chat-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lift);
}
html[data-theme] #agent-chat-fab {
    background: var(--accent);
    color: #08211D;
    border: none;
    box-shadow: var(--shadow-lift);
}
html[data-theme] .acp-agent { background: var(--surface-2); border-color: var(--border); color: var(--text); }
html[data-theme] .acp-user { background: var(--blue); }
html[data-theme] .acp-input-row input { background: var(--surface-2); border-color: var(--border); color: var(--text); }
html[data-theme] #incident-panel { background: var(--surface); border-color: var(--border); }
html[data-theme] .incident-panel-head, html[data-theme] .incident-panel-foot,
html[data-theme] .incident-mini-card { border-color: var(--border); }

/* Charts + misc */
html[data-theme] .chart-grid { stroke: var(--border); }
html[data-theme] .chart-axis { fill: var(--dim); }
html[data-theme] .hbar-track { background: var(--surface-2); }
html[data-theme] .hbar-fill { background: var(--accent); }
html[data-theme] .dim { color: var(--dim); }

/* Scrollbars */
html[data-theme] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme] ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
html[data-theme] ::-webkit-scrollbar-track { background: transparent; }

/* Accessibility floor */
html[data-theme] :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    html[data-theme] * { transition: none !important; animation: none !important; }
}

/* Warranty line on device pages: two labeled sides, visually separated */
.warranty-side { display: inline-block; }
.warranty-side + .warranty-side {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid var(--border, #262E33);
}
.warranty-side strong { font-weight: 600; }

/* Dashboard grid: fixed 2 columns, so each pair of panels forms one row */
html[data-theme] .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
@media (max-width: 900px) { html[data-theme] .dashboard-grid { grid-template-columns: 1fr; } }

/* Full-width panel (used for Scheduled Operations, above the stat row) */
.dash-panel.w-span-2 { grid-column: span 2; }
@media (max-width: 900px) { .dash-panel.w-span-2 { grid-column: span 1; } }

/* Cyclable / drill-down card header: arrow — title — arrow */
.cycle-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.cycle-card-head h3 { margin: 0; text-align: center; flex: 1; }
.cycle-arrow {
    background: var(--surface-2, #1C2429);
    border: 1px solid var(--border, #262E33);
    color: var(--text, #E4E9EC);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.cycle-arrow:hover { border-color: var(--accent, #E85C5C); color: var(--accent, #E85C5C); }

/* ============================
   Virtual Control widget (room.html)
   ============================ */

#vc-panel { padding: 0; overflow: hidden; }

.vc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}
.vc-header:hover { background: var(--surface-2, rgba(255,255,255,0.03)); }
.vc-header h3 { margin: 0; font-size: 14px; }
.vc-chevron { color: var(--dim, #8B979E); font-size: 13px; transition: transform 0.15s; }

.vc-body { padding: 0 16px 16px; border-top: 1px solid var(--border, #262E33); }

/* Native browser resize handle — vertical only, scrolls when content
   overflows. No custom drag JS: the browser's own grip is more reliable
   and never fights the mouse the way a hand-rolled one can. */
.vc-resizable {
    resize: vertical;
    overflow-y: auto;
    min-height: 160px;
    max-height: 640px;
    height: 260px;
    padding: 14px 4px 4px;
    border: 1px dashed var(--border, #262E33);
    border-radius: 8px;
    margin-top: 10px;
}

.vc-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0 6px;
}


/* Touch-controller-style button grid: big, glanceable, icon-forward */
.vc-btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 0 6px;
}
.vc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--surface-2, #1C2429);
    border: 1px solid var(--border, #262E33);
    border-radius: 10px;
    color: var(--text, #E4E9EC);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s, transform 0.08s;
}
.vc-btn:hover:not(:disabled) { border-color: var(--accent, #E85C5C); }
.vc-btn:active:not(:disabled) { transform: scale(0.96); }
.vc-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.vc-btn.danger:hover:not(:disabled) { border-color: #E85C5C; color: #E85C5C; }
.vc-btn-icon { font-size: 22px; line-height: 1; }

/* Zoom web controller launch link on room.html */
.vc-webctrl-box { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border, #262E33); }

/* ============================
   room.html: Virtual Control refinements
   ============================ */

.vc-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dim, #8B979E);
    margin: 18px 0 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border, #262E33);
}
#vc-zoom-grid, #vc-webctrl-grid { margin-top: 4px; }

.vc-meeting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px 16px;
    font-size: 13px;
}

/* This page's one green accent (Neat "Connected" pill) goes red, per request —
   scoped to room.html only; warranty status elsewhere keeps its normal
   green-means-good meaning */
#vc-panel .warranty-pill.active {
    color: var(--accent, #E4002B);
    background: var(--accent-soft, rgba(228,0,43,0.10));
}
