:root{
  --bg:#EEF2F7;
  --surface:#FFFFFF;
  --ink:#101B2D;
  --muted:#5C6B7F;
  --line:#DEE5EE;
  --navy:#0B2E59;
  --navy-light:#144E8C;
  --blue:#0072BC;
  --blue-soft:#E4F0FA;
  --campus-green:#1B5E3A;
  --aman:#1E8E5A;
  --aman-soft:#E1F3EA;
  --waspada:#C9821B;
  --waspada-soft:#FBEEDA;
  --bahaya:#C0152B;
  --bahaya-soft:#FBE3E5;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{
  background:var(--bg); color:var(--ink);
  font-family:'Public Sans','Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;
}
.mono{ font-family:'IBM Plex Mono','Courier New',monospace; }
button{ font-family:inherit; cursor:pointer; }
a{ color:inherit; }

/* ===== Academic strip ===== */
.academic-strip{
  background:var(--campus-green); color:#E4F1EA; padding:6px 28px; font-size:11px;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:4px;
}

/* ===== Ticker ===== */
.ticker{ background:var(--navy); color:#fff; overflow:hidden; white-space:nowrap; padding:8px 0; font-size:12.5px; position:relative; }
.ticker-label{ position:absolute; left:0; top:0; bottom:0; display:flex; align-items:center; background:var(--bahaya); padding:0 14px; font-weight:700; font-size:11px; letter-spacing:.04em; z-index:2; }
.ticker-track{ display:inline-block; padding-left:160px; animation:scroll-left 50s linear infinite; }
@keyframes scroll-left{ 0%{ transform:translateX(0);} 100%{ transform:translateX(-50%);} }

/* ===== Topbar ===== */
.topbar{ background:var(--ink); color:#BFD3EA; padding:7px 28px; font-size:11.5px; display:flex; justify-content:space-between; align-items:center; }
.dot-live{ width:7px; height:7px; border-radius:50%; background:#54D18B; display:inline-block; margin-right:6px; animation:pulse 2s infinite; }
@keyframes pulse{ 0%{box-shadow:0 0 0 0 rgba(84,209,139,.55);} 70%{box-shadow:0 0 0 6px rgba(84,209,139,0);} 100%{box-shadow:0 0 0 0 rgba(84,209,139,0);} }

/* ===== Header ===== */
header{ background:var(--surface); border-bottom:1px solid var(--line); padding:14px 28px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:50; }
.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{ width:42px; height:42px; border-radius:10px; background:linear-gradient(160deg, var(--navy), var(--blue)); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.brand-text .name{ font-weight:800; font-size:17px; letter-spacing:.01em; }
.brand-text .sub{ font-size:11px; color:var(--muted); margin-top:1px; }
nav{ display:flex; gap:20px; align-items:center; }
nav a{ color:var(--muted); text-decoration:none; font-size:13px; font-weight:600; padding:6px 0; border-bottom:2px solid transparent; }
nav a.active{ color:var(--navy); border-bottom-color:var(--blue); }
.nav-btn{ display:flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:8px; padding:7px 12px; font-size:12.5px; font-weight:600; background:var(--surface); text-decoration:none; color:var(--ink); }
.nav-btn:hover{ background:var(--blue-soft); }

main{ max-width:1360px; margin:0 auto; padding:22px 28px 50px; }

/* ===== Hero ===== */
.hero{ position:relative; overflow:hidden; border-radius:16px; margin-bottom:20px; background:linear-gradient(120deg, var(--navy), var(--navy-light)); color:#fff; padding:30px 32px; display:grid; grid-template-columns:1.35fr 1fr; gap:20px; }
.hero::before{ content:""; position:absolute; inset:0; opacity:.14; pointer-events:none; background-image:var(--contour-svg); background-size:900px; background-position:right -80px top -60px; }
.hero-left{ position:relative; z-index:2; }
.eyebrow{ display:inline-flex; align-items:center; gap:8px; font-size:11px; letter-spacing:.07em; text-transform:uppercase; color:#9FC3EA; font-weight:700; margin-bottom:12px; }
.hero h1{ font-weight:800; font-size:26px; line-height:1.25; max-width:560px; margin-bottom:10px; }
.hero p{ color:#CFE0F2; font-size:13.5px; max-width:500px; line-height:1.6; }
.hero-meta{ display:flex; gap:22px; margin-top:20px; flex-wrap:wrap; }
.hero-meta .k{ font-size:10.5px; color:#8FB6DE; text-transform:uppercase; letter-spacing:.05em; }
.hero-meta .v{ font-family:'IBM Plex Mono',monospace; font-size:14.5px; margin-top:3px; }

.status-card{ position:relative; z-index:2; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.2); border-radius:14px; padding:20px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.status-card .label{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:#9FC3EA; margin-bottom:8px; }
.gauge-wrap{ position:relative; width:150px; height:90px; margin-bottom:6px; }
.status-badge{ font-weight:800; font-size:20px; background:#fff; padding:3px 10px; border-radius:6px; }
.status-sub{ color:#CFE0F2; font-size:11.5px; margin-top:8px; max-width:230px; }
.index-value{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:#9FC3EA; margin-top:10px; }

/* ===== Sections ===== */
.section-title{ display:flex; align-items:baseline; justify-content:space-between; margin:26px 0 14px; flex-wrap:wrap; gap:6px;}
.section-title h2{ font-size:16px; font-weight:700; }
.section-title .desc{ font-size:12px; color:var(--muted); }

/* ===== Methodology panel ===== */
.method-panel{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px 20px; margin-bottom:8px; }
.method-eq{ font-family:'IBM Plex Mono',monospace; font-size:12.5px; background:var(--blue-soft); color:var(--navy); padding:10px 14px; border-radius:10px; margin-bottom:12px; overflow-x:auto; white-space:nowrap; }
.method-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin-top:16px;
}


.method-grid > div{
  background:linear-gradient(145deg, #ffffff, #f5f7fa);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  box-shadow:0 4px 12px rgba(0,0,0,0.06);
  font-size:13px;
  line-height:1.7;
  transition:0.3s ease;
  position:relative;
  overflow:hidden;
}


.method-grid > div:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 18px rgba(0,0,0,0.12);
}


.method-grid > div b{
  display:block;
  font-size:15px;
  margin-bottom:10px;
  color:var(--ink);
}


.method-grid > div span{
  color:var(--muted);
  font-size:12px;
}
.method-item .mk{ color:var(--muted); font-size:11px; }
.method-item .mv{ font-family:'IBM Plex Mono',monospace; margin-top:2px; }
.method-refs{ font-size:10.5px; color:var(--muted); line-height:1.6; border-top:1px solid var(--line); padding-top:10px; }

/* ===== Node cards ===== */
.node-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.node-card{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px; }
.node-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.node-id{ font-weight:800; font-size:14.5px; display:flex; align-items:center; gap:6px; }
.node-loc{ font-size:11.5px; color:var(--muted); margin-bottom:12px; }
.status-tag{ font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:20px; text-transform:uppercase; letter-spacing:.03em; }
.tag-aman{ background:var(--aman-soft); color:var(--aman); }
.tag-waspada{ background:var(--waspada-soft); color:var(--waspada); }
.tag-bahaya{ background:var(--bahaya-soft); color:var(--bahaya); }
.tag-unknown{ background:#EEF1F5; color:var(--muted); }
.node-metrics{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:6px; }
.metric .mk{ font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.metric .mv{ font-family:'IBM Plex Mono',monospace; font-size:15px; font-weight:600; margin-top:2px; }
.node-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:12px; font-size:10.5px; color:var(--muted); }
.live-pulse{ width:6px; height:6px; border-radius:50%; display:inline-block; animation:pulse2 1.6s ease-in-out infinite; }
@keyframes pulse2{ 0%,100%{opacity:1} 50%{opacity:.35} }

/* ===== Grid 2 ===== */
.grid-2{ display:grid; grid-template-columns:1.15fr .85fr; gap:16px; margin-top:8px; }
.panel{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:20px; }
.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; flex-wrap:wrap; gap:8px; }
.panel-head h3{ font-size:14.5px; font-weight:700; }
.legend{ display:flex; gap:12px; font-size:11px; color:var(--muted); }
.legend span{ display:inline-flex; align-items:center; gap:5px; }
.legend i{ width:8px; height:8px; border-radius:50%; display:inline-block; font-style:normal; }

.map-frame{ position:relative; border-radius:10px; overflow:hidden; height:320px; background:#E4EDF6; border:1px solid var(--line); }
.map-frame svg{ position:absolute; inset:0; width:100%; height:100%; }
.map-pin{ position:absolute; transform:translate(-50%,-100%); display:flex; flex-direction:column; align-items:center; cursor:pointer; }
.map-pin .pin-dot{ width:15px; height:15px; border-radius:50%; border:3px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.25); }
.map-pin .pin-tooltip{ position:absolute; bottom:20px; left:50%; transform:translateX(-50%); background:var(--ink); color:#fff; font-size:10.5px; padding:6px 9px; border-radius:6px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .15s; }
.map-pin:hover .pin-tooltip{ opacity:1; }

.chart-box{ height:150px; margin-bottom:6px; }
.alert-log{ margin-top:4px; max-height:260px; overflow-y:auto; }
.log-item{ display:flex; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); font-size:12px; }
.log-item:last-child{ border-bottom:none; }
.log-dot{ width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0; }
.log-time{ color:var(--muted); font-family:'IBM Plex Mono',monospace; font-size:10.5px; margin-top:2px; }
.log-empty{ color:var(--muted); font-size:12px; padding:12px 0; }

/* ===== Table ===== */
.table-wrap{ overflow-x:auto; }
table{ width:100%; border-collapse:collapse; font-size:12.5px; }
thead th{ text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); padding:10px 12px; border-bottom:1px solid var(--line); }
tbody td{ padding:12px; border-bottom:1px solid var(--line); }
tbody tr:last-child td{ border-bottom:none; }
.status-pill{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px; }
.status-pill i{ width:6px; height:6px; border-radius:50%; font-style:normal; }

/* ===== Buttons ===== */
.btn-row{ display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.btn{ display:flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--surface); border-radius:8px; padding:9px 14px; font-size:13px; font-weight:600; color:var(--ink); text-decoration:none; }
.btn:hover{ background:var(--blue-soft); }

/* ===== Skeleton loading ===== */
.skeleton{ background:linear-gradient(90deg, var(--line) 25%, #EEF2F7 37%, var(--line) 63%); background-size:400% 100%; animation:skeleton-loading 1.4s ease infinite; border-radius:6px; }
@keyframes skeleton-loading{ 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }
.skel-card{ height:120px; border-radius:14px; }
.skel-line{ height:12px; margin-bottom:8px; }

footer{ background:var(--navy); color:#CFE0F2; margin-top:36px; padding:20px 28px; font-size:12px; }
.footer-inner{ max-width:1360px; margin:0 auto; display:flex; justify-content:space-between; flex-wrap:wrap; gap:14px; }
.footer-note{ opacity:.85; max-width:700px; line-height:1.6; }

.conn-banner{ display:none; background:var(--bahaya-soft); color:var(--bahaya); border:1px solid var(--bahaya); border-radius:10px; padding:10px 16px; font-size:12.5px; margin-bottom:16px; font-weight:600; }

/* ===== Admin & riwayat shared bits ===== */
.simple-card{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:24px; }
.form-row{ margin-bottom:14px; display:flex; flex-direction:column; gap:6px; }
.form-row label{ font-size:12.5px; font-weight:600; color:var(--muted); }
.form-row input, .form-row select{ padding:9px 12px; border:1px solid var(--line); border-radius:8px; font-size:13.5px; font-family:inherit; }
.btn-primary{ background:var(--navy); color:#fff; border:none; border-radius:8px; padding:10px 16px; font-size:13.5px; font-weight:600; }
.btn-primary:hover{ background:var(--navy-light); }
.alert-box{ padding:10px 14px; border-radius:8px; font-size:12.5px; margin-bottom:14px; }
.alert-success{ background:var(--aman-soft); color:var(--aman); }
.alert-error{ background:var(--bahaya-soft); color:var(--bahaya); }
.filter-bar{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; align-items:end; }
.filter-bar .form-row{ margin-bottom:0; min-width:150px; }
.tag-offline{ background:#EFEFEF; color:#8A8A8A; }
.node-card.offline{ opacity:0.7; border-style:dashed; }
.node-location-list{ margin-top:12px; display:flex; flex-direction:column; gap:8px; max-height:180px; overflow-y:auto; }
.loc-row{ display:flex; align-items:center; gap:10px; padding:8px 10px; background:var(--bg); border-radius:8px; }
.loc-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.loc-main{ flex:1; }
.loc-name{ font-size:12.5px; font-weight:700; }
.loc-coord{ font-size:10.5px; color:var(--muted); margin-top:1px; }
@media(max-width: 1080px){
  .node-grid{ grid-template-columns:1fr 1fr; }
  .grid-2{ grid-template-columns:1fr; }
  .hero{ grid-template-columns:1fr; }
  .method-grid{ grid-template-columns:1fr; }
  nav{ display:none; }
}

@media print{
  header, footer, .topbar, .ticker, .academic-strip, .btn-row, nav{ display:none !important; }
  body{ background:#fff; }
  main{ padding:0; max-width:100%; }
}
.node-location-list{ margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.loc-row{ display:flex; align-items:center; gap:10px; padding:8px 10px; background:var(--bg); border-radius:8px; }
.loc-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.loc-main{ flex:1; }
.loc-name{ font-size:12.5px; font-weight:700; }
.loc-coord{ font-size:10.5px; color:var(--muted); margin-top:1px; }
/* ===========================
   LEGENDA MONITORING
=========================== */

.map-legend{

    margin-top:18px;

    padding:16px;

    border:1px solid var(--line);

    border-radius:12px;

    background:var(--surface);

}

.legend-title{

    font-size:14px;

    font-weight:600;

    color:var(--ink);

    margin-bottom:14px;

    padding-bottom:8px;

    border-bottom:1px solid var(--line);

}

.legend-item{

    display:flex;

    align-items:flex-start;

    gap:10px;

    margin-bottom:14px;

}

.legend-color{

    width:14px;

    height:14px;

    border-radius:50%;

    margin-top:3px;

    flex-shrink:0;

}

.legend-color.aman{

    background:#22C55E;

}

.legend-color.waspada{

    background:#F59E0B;

}

.legend-color.bahaya{

    background:#DC2626;

}

.legend-color.offline{

    background:#9CA3AF;

}

.legend-text{

    font-size:12px;

    line-height:1.5;

    color:var(--muted);

}

.legend-text strong{

    color:var(--ink);

}

.legend-footer{

    margin-top:12px;

    padding-top:12px;

    border-top:1px solid var(--line);

    font-size:12px;

    color:var(--muted);

}
@keyframes markerPulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.marker-ping {
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin-top: -8px; margin-left: -8px;
  border-radius: 50%;
  animation: markerPulse 1.5s ease-out infinite;
  pointer-events: none;
}
.method-grid > div:nth-child(1){
  border-top:4px solid #2563eb;
}

.method-grid > div:nth-child(2){
  border-top:4px solid #0891b2;
}

.method-grid > div:nth-child(3){
  border-top:4px solid #dc2626;
}