/* RB Monitor - stilovi (izdvojeno iz index.html, CSP: bez <style> bloka) */
*{margin:0;padding:0;box-sizing:border-box}
:root{
  --bg:#0a0e1a;--surface:#1a1f2e;--surface2:#232940;
  --border:#2a3f5f;--accent:#4a7fd7;
  --text:#e0e0e0;--muted:#888;--red:#d74a4a;--yellow:#d7a74a;--green:#4ad74a;
  --sidebar:220px;
}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);min-height:100vh;display:flex;flex-direction:column}
.header{background:var(--surface);padding:12px 20px;display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid var(--border);position:sticky;top:0;z-index:100}
.header h1{font-size:18px;font-weight:700;color:var(--accent)}
.layout{display:flex;flex:1}
.sidebar{width:var(--sidebar);min-width:var(--sidebar);background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;position:sticky;top:49px;height:calc(100vh - 49px);overflow-y:auto}
.sidebar-title{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;padding:14px 14px 6px}
.router-item{display:flex;align-items:center;justify-content:space-between;padding:9px 14px;cursor:pointer;border-left:3px solid transparent;font-size:13px}
.router-item:hover{background:var(--surface2)}
.router-item.active{background:var(--surface2);border-left-color:var(--accent)}
.router-item-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}
.router-item-acts{display:flex;gap:4px;opacity:0}
.router-item:hover .router-item-acts{opacity:1}
.icon-btn{background:none;border:none;padding:2px 5px;cursor:pointer;color:var(--muted);border-radius:3px;font-size:13px}
.icon-btn:hover{background:var(--border);color:var(--text)}
.sidebar-bottom{padding:12px;border-top:1px solid var(--border);margin-top:auto}
.sidebar-bottom button{width:100%}
.main{flex:1;display:flex;flex-direction:column;min-width:0}
.tabs{display:flex;background:var(--surface);border-bottom:2px solid var(--border);overflow-x:auto}
.tab{padding:12px 18px;cursor:pointer;border-bottom:3px solid transparent;white-space:nowrap;font-size:13px;color:var(--muted)}
.tab:hover{background:var(--surface2);color:var(--text)}
.tab.active{border-bottom-color:var(--accent);color:var(--text);font-weight:600}
#content{padding:20px;max-width:1200px;width:100%}
select,button,input[type=text],input[type=password],input[type=number]{background:var(--surface2);color:var(--text);border:1px solid var(--border);padding:7px 12px;border-radius:5px;font-size:13px;cursor:pointer;outline:none}
button:hover{background:var(--border)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-primary:hover{background:#3a6fc7}
.btn-danger{background:var(--red);border-color:var(--red);color:#fff}
.btn-warn{background:var(--yellow);border-color:var(--yellow);color:#000}
.btn-sm{padding:4px 10px;font-size:12px}
.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:14px;margin-bottom:20px}
.metric-card{background:var(--surface);padding:18px;border-radius:8px;border:1px solid var(--border)}
.metric-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}
.metric-value{font-size:28px;font-weight:700}
.metric-sub{font-size:11px;color:var(--muted);margin-top:4px}
.bar{height:6px;background:var(--border);border-radius:3px;margin-top:8px;overflow:hidden}
.bar-fill{height:100%;border-radius:3px;transition:width .5s}
.table-wrap{overflow-x:auto;border-radius:6px;border:1px solid var(--border)}
table{width:100%;border-collapse:collapse;font-size:12px}
th{background:var(--surface);padding:8px 12px;text-align:left;color:var(--muted);font-weight:600;border-bottom:1px solid var(--border)}
td{padding:8px 12px;border-bottom:1px solid var(--border)}
tr:last-child td{border-bottom:none}
tr:hover td{background:var(--surface2)}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}
.dot-g{background:var(--green)}.dot-r{background:var(--red)}.dot-y{background:var(--yellow)}
.badge{display:inline-block;padding:2px 7px;border-radius:3px;font-size:11px;font-weight:600}
.badge-g{background:rgba(74,215,74,.15);color:var(--green)}
.badge-r{background:rgba(215,74,74,.15);color:var(--red)}
.badge-y{background:rgba(215,167,74,.15);color:var(--yellow)}
.action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;align-items:stretch}
.action-card{background:var(--surface);padding:18px;border-radius:8px;border:1px solid var(--border);display:flex;flex-direction:column}
.action-card h3{font-size:14px;margin-bottom:6px}
.action-card p{font-size:12px;color:var(--muted);margin-bottom:12px;flex:1}
.action-row{display:flex;flex-direction:column;gap:8px;margin-top:auto}
.action-row select{width:100%}
.action-row button{width:100%}
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.75);z-index:200;align-items:center;justify-content:center}
.modal.open{display:flex}
.modal-box{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:28px;min-width:380px;max-width:90%}
.modal-box h2{margin-bottom:18px;font-size:16px}
.modal-box input,.modal-box select{width:100%;margin-bottom:10px}
.modal-box label{font-size:12px;color:var(--muted);display:block;margin-bottom:4px}
.modal-buttons{display:flex;gap:8px;margin-top:16px}
.modal-buttons button{flex:1}
.toast{position:fixed;bottom:20px;right:20px;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:12px 18px;font-size:13px;z-index:300;opacity:0;transition:opacity .3s;pointer-events:none;max-width:320px}
.toast.show{opacity:1}
.toast.ok{border-color:var(--green)}
.toast.err{border-color:var(--red)}
.empty{text-align:center;padding:60px;color:var(--muted)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:500;display:flex;align-items:center;justify-content:center}
