:root{
  --bg:#080F1F; --panel:#101C31; --surface:#15233B; --surface2:#1B2E4B;
  --cyan:#00D4FF; --blue:#3278FF; --ok:#16C784; --warn:#F5B942; --bad:#F05252;
  --text:#EEF4FF; --muted:#93A4C4;
}
html[data-theme="light"]{
  --bg:#F2F5FB; --panel:#FFFFFF; --surface:#FFFFFF; --surface2:#E9EEF7;
  --text:#0B1B33; --muted:#4A5B76;
}
*{box-sizing:border-box}
html,body{overflow-x:hidden}
body{background:var(--bg);color:var(--text);font-family:'Inter','Plus Jakarta Sans',system-ui,sans-serif;margin:0;min-height:100vh}
a{color:inherit}
.muted{color:var(--muted)}
.card{background:var(--surface);border:1px solid rgba(255,255,255,.08);border-radius:1rem;box-shadow:0 8px 24px rgba(0,0,0,.25)}
html[data-theme="light"] .card{box-shadow:0 6px 18px rgba(20,40,80,.08)}
.btn{display:inline-flex;align-items:center;gap:.5rem;border-radius:.9rem;padding:.55rem 1rem;font-weight:600;border:1px solid transparent;cursor:pointer;min-height:44px}
.btn-primary{background:linear-gradient(135deg,var(--cyan),var(--blue));color:#04121f}
html[data-theme="light"] .btn-primary{color:#fff}
.btn-ghost{background:transparent;border-color:rgba(255,255,255,.15);color:var(--text)}
html[data-theme="light"] .btn-ghost{border-color:#c4d0e4}
.btn-danger{background:var(--bad);color:#fff}
.badge{display:inline-flex;align-items:center;gap:.35rem;font-size:.72rem;font-weight:700;padding:.2rem .7rem;border-radius:9999px}
.b-live{background:rgba(22,199,132,.15);color:var(--ok);border:1px solid var(--ok)}
.b-off{background:rgba(240,82,82,.15);color:var(--bad);border:1px solid var(--bad)}
.b-warn{background:rgba(245,185,66,.15);color:var(--warn);border:1px solid var(--warn)}
.b-con{background:rgba(0,212,255,.12);color:var(--cyan);border:1px solid var(--cyan)}
.sidebar{width:248px;transition:width .2s ease}
.sidebar.collapsed{width:72px}
.sidebar.collapsed .lbl{display:none}
.navlink{display:flex;align-items:center;gap:.7rem;padding:.65rem .8rem;border-radius:.8rem;color:var(--muted);font-weight:600;min-height:44px;word-break:break-word}
.navlink:hover{background:rgba(0,212,255,.08);color:var(--text)}
.navlink.active{background:linear-gradient(135deg,rgba(0,212,255,.22),rgba(50,120,255,.22));color:var(--text);border:1px solid rgba(0,212,255,.35)}
table.data{width:100%;border-collapse:collapse;font-size:.88rem}
table.data th,table.data td{padding:.6rem .7rem;border-bottom:1px solid rgba(255,255,255,.07);text-align:left;vertical-align:top}
html[data-theme="light"] table.data th,html[data-theme="light"] table.data td{border-color:#e2e8f2}
input,select,textarea{background:var(--panel);border:1px solid rgba(255,255,255,.14);color:var(--text);border-radius:.7rem;padding:.6rem .8rem;width:100%;min-height:44px}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#fff;border-color:#c4d0e4}
.tile{position:relative;background:#040a16;border:1px solid rgba(255,255,255,.1);border-radius:.9rem;overflow:hidden;min-height:180px}
.tile video,.tile img{width:100%;height:100%;object-fit:cover;max-width:100%}
.lucide{width:18px;height:18px;flex:none}
.grid-wall{display:grid;gap:.7rem}
:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
@media print{.noprint{display:none!important}}
/* Mobile safety (<=767px): desktop design unchanged; cegah scroll horizontal */
@media (max-width:767px){
  body>div.flex{flex-direction:column}
  #layout-side{width:100%;min-height:0!important}
  #shell-sidebar{flex-direction:row;overflow-x:auto;padding-bottom:.25rem}
  #shell-sidebar .navlink{white-space:nowrap;flex:none;font-size:.8rem}
  div.card.flex{flex-wrap:wrap}
  .tile{min-width:0}
  input,select,textarea{max-width:100%}
}
