/* warna kondisi "tidak aktif" (data terputus / berlayar) */
:root { --off: #8a8f98; }
.status.sailing i { background: var(--accent); }
.status.sailing { color: var(--accent); }

/* Panel beban crane (kiri atas) */
.load-panel {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  width: 270px;
  padding: 14px 16px 12px;
  border-left: 3px solid var(--state, var(--ok));
  transition: border-color 0.3s;
}
.lp-head { display: flex; align-items: center; justify-content: space-between; }
.lp-title { font-weight: 600; font-size: 14px; }
.demo-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 16%, transparent);
}

.gauge { display: block; width: 100%; height: auto; margin-top: 6px; }
.gauge path { fill: none; stroke-width: 14; stroke-linecap: butt; }
.g-track { stroke: var(--grid); }
.g-warn { stroke: color-mix(in srgb, var(--warn) 35%, transparent); }
.g-fill { stroke: var(--state, var(--ok)); transition: stroke 0.3s; }
.g-needle { stroke: var(--text); stroke-width: 3; stroke-linecap: round; transform-origin: 100px 110px; transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.g-hub { fill: var(--text); }

.lp-value { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-top: -6px; }
.lp-value strong { font-size: 40px; font-weight: 600; line-height: 1.1; color: var(--state, var(--text)); font-variant-numeric: tabular-nums; }
.lp-value span { color: var(--muted); font-size: 15px; }
.lp-state { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 4px; }
.lp-state .badge { color: var(--state, var(--ok)); background: color-mix(in srgb, var(--state, var(--ok)) 14%, transparent); }

.lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 0; }
.lp-stats div { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; }
.lp-stats dt { font-size: 10px; color: var(--muted); }
.lp-stats dd { margin: 2px 0 0; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

.lp-spark { margin-top: 10px; --series: var(--state, var(--ok)); }
.lp-spark .muted { font-size: 11px; }
.lp-note { margin: 8px 0 0; font-size: 11px; }

/* angkatan kontainer */
.load-panel { max-height: calc(100% - 32px); overflow-y: auto; }
.lp-lifts { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.lp-lifts-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lp-lifts-head div { display: flex; flex-direction: column; }
.lp-lifts-head span { font-size: 10px; }
.lp-lifts-head strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lp-lifts-head div:first-child strong { font-size: 22px; color: var(--accent); }
.lp-lifts-title { font-size: 11px; margin: 10px 0 4px; }
.lp-lift-list { list-style: none; margin: 0; padding: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.lp-lift-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.lp-lift-list li:last-child { border-bottom: 0; }
.lp-lift-list li.muted { display: block; }
.lp-lift-list .t { color: var(--muted); }
.lp-lift-list .w { font-weight: 600; }
.lp-lift-list li.fresh { animation: fresh 2s ease-out; }
@keyframes fresh { from { background: var(--accent-soft); } to { background: transparent; } }

/* label beban yang melayang di atas kontainer */
.load-label {
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--border);
  border-left: 3px solid var(--state, var(--ok));
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.load-label small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.load-label.crit { animation: blink 0.8s infinite; }

@media (max-width: 700px) {
  .load-panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; border-radius: 12px 12px 0 0; padding: 10px 14px; }
  .load-panel .gauge, .load-panel .lp-spark, .load-panel .lp-note,
  .load-panel .lp-lifts-title, .load-panel .lp-lift-list { display: none; }
  .load-panel ~ .legend { display: none; }
}
