/* app.css - tampilan Traffic Control Armada (digabung server menjadi /app.css) */
.sh-ico { background: none; border: 0; }
/* putar ulang voyage */
.rp-panel { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000; width: min(620px, calc(100% - 24px)); background: rgba(255,255,255,.97);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); padding: 10px 12px; font-size: 12.5px; }
.rp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .rp-head .rp-x { margin-left: auto; border: 0; background: none; font-size: 16px; cursor: pointer; }
.rp-ctl { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; } .rp-ctl .btn { padding: 4px 10px; } .rp-ctl select { padding: 4px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; margin: 4px 0; }
@media (max-width: 560px) { .rp-grid { grid-template-columns: repeat(2, 1fr); } }
.rp-panel.rp-luar { position: fixed; bottom: 8px; max-height: 45vh; overflow: auto; }
/* ringkasan pagi: hanya isi ringkasan yang dicetak */
@media print { body.cetak-ringkasan > *:not(#ringdlg) { display: none !important; } body.cetak-ringkasan #ringdlg { position: static; border: 0; box-shadow: none; width: auto; max-height: none; }
  body.cetak-ringkasan #ringdlg .drbar, body.cetak-ringkasan #ringdlg .dlg-foot { display: none !important; } body.cetak-ringkasan #ringBody { max-height: none !important; overflow: visible !important; } }
.ring h4 { margin: 14px 0 4px; font-size: 13.5px; color: var(--accent, #0b2545); }
.ring table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ring th, .ring td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ring th { color: var(--muted); font-weight: 650; }
.ring .kpi { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ring .kpi div { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-width: 110px; }
.ring .kpi b { display: block; font-size: 18px; }
/* akun "hanya lihat": tombol pengubah data disembunyikan (server tetap menolak bila dipaksa) */
body.hanya-lihat #importBtn, body.hanya-lihat #addBtn, body.hanya-lihat #kiBtn, body.hanya-lihat [data-edit], body.hanya-lihat [data-import],
body.hanya-lihat [data-route], body.hanya-lihat [data-aktual], body.hanya-lihat #alAck, body.hanya-lihat [data-al-ok],
/* ... dan semua export Excel: akun lihat / tamu hanya boleh PDF & cetak */
body.hanya-lihat #exportBtn, body.hanya-lihat #dExport, body.hanya-lihat #dRekap, body.hanya-lihat #dTpl, body.hanya-lihat #dAuto, body.hanya-lihat #kpiXls, body.hanya-lihat #ringXls,
body.hanya-lihat #hExport, body.hanya-lihat #fwExport, body.hanya-lihat #xGo, body.hanya-lihat #hSync, body.hanya-lihat #hEvSave, body.hanya-lihat #vAutoBtn, body.hanya-lihat #vSave,
body.hanya-lihat #aSave, body.hanya-lihat #edSave, body.hanya-lihat #shform, body.hanya-lihat #znform, body.hanya-lihat [data-sh-ed], body.hanya-lihat [data-sh-del], body.hanya-lihat [data-zn-ed],
body.hanya-lihat [data-zn-del], body.hanya-lihat [data-sh-edit], body.hanya-lihat [data-zn-edit], body.hanya-lihat [data-route-del], body.hanya-lihat [data-dr-set], body.hanya-lihat #tamuBtn,
body.hanya-lihat #lbdOtoWrap,
body.hanya-lihat #pickBtn, body.hanya-lihat #delBtn, body.hanya-lihat #saveBtn, body.hanya-lihat [data-export] { display: none !important; }
  :root {
    --bg: #eef2f6; --panel: #ffffff; --text: #17212e; --muted: #5c6878; --line: #dbe2ea;
    --accent: #0b63c4; --moving: #16904f; --idle: #c27c00; --inactive: #8792a2; --late: #cc3636; --nopos: #b3bac4; --manual: #7b3fc4; --skygate: #0e8a9a;
  }
  .tools { display: flex; gap: 8px; padding: 10px 12px 0; flex-wrap: wrap; }
  .chart-land { filter: sepia(.35) saturate(1.3) brightness(1.04); }
  .iso-lbl { background: none; border: 0; }
  .hkpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px; padding: 8px 18px; }
  .hk { background: var(--panel2, #f4f7fb); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; display: flex; flex-direction: column; }
  .hk span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; } .hk b { font-size: 13px; }
  .snd-canvas { position: absolute; pointer-events: none; }
  .hz-ico { background: none; border: 0; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1px #fff); }
  .hz-lbl { font-size: 11px; font-weight: 600; color: #b71c1c; }
  .hz-near { margin-top: 6px; padding: 5px 8px; border-radius: 6px; font-size: 12px; background: #fff4f4; border: 1px solid #f3c2c2; color: #8a1c1c; }
  .hz-near.aman { background: #f3f7fb; border-color: #d5dce6; color: #3d4b5c; }
  .chart-land2 { filter: sepia(.55) saturate(2.2) hue-rotate(-6deg) brightness(1.03); }
  .safety-ctl { background: #fff; padding: 6px 8px; font: 12px/1.3 Calibri, Arial, sans-serif; color: #0b2545; min-width: 128px; }
  .safety-ctl label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
  .safety-ctl select { font: inherit; padding: 1px 2px; }
  .safety-ctl .legend { margin-top: 5px; display: grid; gap: 2px; font-size: 11px; font-weight: 400; }
  .safety-ctl .legend span { display: flex; align-items: center; gap: 5px; }
  .safety-ctl .legend i { width: 18px; height: 10px; border: 1px solid #b9c6d6; display: inline-block; }
  .leaflet-container.leaflet-zoom-anim .snd-canvas { visibility: hidden; }
  .iso-lbl span { display: block; text-align: center; font: 600 10px/12px Calibri, Arial, sans-serif; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
  .more { position: relative; }
  .more > summary { list-style: none; cursor: pointer; }
  .more > summary::-webkit-details-marker { display: none; }
  .more .menu { position: absolute; z-index: 1200; top: calc(100% + 4px); left: 0; min-width: 250px; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 6px; }
  .more .menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; color: inherit; }
  .more .menu button:hover { background: rgba(11,99,196,.08); }
  .more .menu small { display: block; opacity: .7; font-size: 11px; margin-top: 2px; }
  .btn { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .btn:hover { filter: brightness(1.08); }
  .btn.ghost { background: #fff; color: var(--accent); }
  .btn.danger { background: #fff; color: var(--late); border-color: var(--late); }
  dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(440px, calc(100vw - 32px)); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
  dialog::backdrop { background: rgba(15,25,40,.35); }
  .dlg-head { padding: 14px 18px 4px; font-size: 16px; font-weight: 650; }
  .dlg-sub { padding: 0 18px 8px; color: var(--muted); font-size: 12.5px; }
  .form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 6px 18px 4px; }
  .form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
  .form label.full { grid-column: 1 / -1; }
  .form input, .form textarea { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 14px; color: var(--text); background: #fff; }
  .form textarea { resize: vertical; min-height: 56px; }
  .form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
  dialog.wide { width: min(1040px, calc(100vw - 24px)); }
  .drbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 6px 18px 4px; font-size: 12.5px; color: var(--muted); }
  .drbar label { display: flex; flex-direction: column; gap: 4px; }
  .drbar label.chk { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
  .drbar input[type=date], .drbar input[type=time] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
  .drwrap { max-height: 56vh; overflow: auto; margin: 6px 18px 0; border: 1px solid var(--line); border-radius: 8px; }
  .drtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .drtable th { position: sticky; top: 0; background: #0b2545; color: #fff; text-align: left; padding: 7px 8px; font-weight: 600; }
  .drtable td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .drtable tr:nth-child(even) td { background: #f4f7fb; }
  .drtable select { max-width: 160px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12px; }
  .drtable .btn { padding: 4px 10px; font-size: 12px; }
  .drlink { display: flex; gap: 12px; align-items: flex-end; padding: 4px 18px 0; font-size: 12.5px; color: var(--muted); }
  .drlink label { display: flex; flex-direction: column; gap: 4px; }
  .drlink select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; min-width: 220px; }
  .drsec { margin: 10px 18px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .drsec h4 { margin: 0; padding: 6px 10px; background: #0b2545; color: #fff; font-size: 12px; letter-spacing: .3px; }
  .drsec .form { grid-template-columns: repeat(4, 1fr); padding: 10px; }
  .drsec .form label.w2 { grid-column: span 2; }
  .drsec .form input, .drsec .form select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; }
  .drsec .form .auto { color: var(--moving); font-weight: 700; font-size: 10.5px; }
  @media (max-width: 760px) { .drsec .form { grid-template-columns: 1fr 1fr; } }
  .coordhint { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -4px; }
  .coordhint.ok { color: var(--moving); }
  .coordhint.bad { color: var(--late); }
  .pickrow { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
  .err { min-height: 18px; padding: 4px 18px 0; color: var(--late); font-size: 12.5px; }
  .dlg-foot { display: flex; gap: 8px; padding: 10px 18px 16px; }
  .dlg-foot .sp { flex: 1; }
  .pickhint { position: absolute; z-index: 1000; left: 50%; top: 12px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; display: none; }
  .pickhint.show { display: block; }
  .pop .note { margin-top: 6px; padding: 6px 8px; background: #f5f0fc; border-radius: 6px; font-size: 12.5px; white-space: pre-wrap; }
  .pop .btns { display: flex; gap: 6px; flex-wrap: wrap; }
  .pop .sec { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
  .pop .sec-h { font-weight: 650; font-size: 12.5px; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
  .pop .muted, .muted { color: var(--muted); font-size: 12px; }
  .pop .sec button { margin-top: 6px; }
  .pop .bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 4px 0 2px; }
  .pop .bar i { display: block; height: 100%; background: var(--accent); }
  .badge { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 650; line-height: 17px; }
  .badge.warn { background: #fff3d6; color: #8a5a00; }
  .badge.danger { background: #fde2e2; color: #a12020; }
  .badge.ok { background: #e3f4ea; color: #1d6b40; }
  .row .dest { grid-column: 2 / 4; font-size: 12px; color: var(--text); }
  .editor { position: absolute; z-index: 1000; left: 50%; top: 10px; transform: translateX(-50%); width: min(420px, calc(100% - 100px));
    background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.2); padding: 10px 12px; cursor: default; }
  .editor[hidden] { display: none; }
  .ed-title { font-weight: 650; margin-bottom: 6px; }
  .ed-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
  .ed-row input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13.5px; color: var(--text); min-width: 0; }
  .ed-row input:first-child { flex: 1; }
  .ed-row .sp { flex: 1; }
  .ed-info { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
  .ed-info b { color: var(--text); }
  .editor .btn { padding: 5px 10px; font-size: 12.5px; }
  .editor .err { padding: 4px 0 0; min-height: 0; }
  .wp-num { background: var(--accent); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
  .pop table.wpt { width: 100%; margin-top: 4px; font-size: 11.5px; }
  .pop table.wpt th { text-align: left; color: var(--muted); font-weight: 600; padding: 2px 6px 2px 0; border-bottom: 1px solid var(--line); }
  .pop table.wpt td { padding: 2px 6px 2px 0; white-space: nowrap; color: var(--text); }
  .pop table.wpt td:first-child { color: var(--muted); }
  .wp-dest { background: var(--late); border-radius: 3px; width: auto; padding: 0 6px; white-space: nowrap; }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
    font: 14px/1.4 "Segoe UI", system-ui, -apple-system, sans-serif; }
  body { display: flex; flex-direction: column; }

  header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
  header h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: .2px; }
  /* logo Transcoal Pacific: globe 3D berayun + kilau berjalan, tulisan berkilau */
  .brand { display: flex; align-items: center; gap: 10px; }
  .globe3d { position: relative; width: 58px; height: 44px; perspective: 260px; flex: none; }
  .globe-spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: globe-swing 6s ease-in-out infinite; }
  .globe-spin img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 2px rgba(11,37,69,.35)); }
  .globe-shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.9) 48%, transparent 60%) no-repeat; background-size: 250% 100%;
    -webkit-mask: url(/logo-lambang.png) center / contain no-repeat; mask: url(/logo-lambang.png) center / contain no-repeat;
    animation: globe-shine 3.5s ease-in-out infinite; }
  .globe-shadow { position: absolute; left: 22%; right: 22%; bottom: -5px; height: 5px; border-radius: 50%; background: radial-gradient(rgba(11,37,69,.35), transparent 70%); animation: globe-shadow 6s ease-in-out infinite; }
  .brand-text { display: flex; flex-direction: column; gap: 2px; }
  .wordmark { height: 15px; width: auto; display: block; }
  .brand-text h1 { font-size: 13px; color: var(--muted, #5f6b7a); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
  @keyframes globe-swing { 0%, 100% { transform: rotateY(-28deg) rotateX(6deg) translateY(0); } 50% { transform: rotateY(28deg) rotateX(-4deg) translateY(-2px); } }
  @keyframes globe-shine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -40% 0; } }
  @keyframes globe-shadow { 0%, 100% { transform: scaleX(1); opacity: .8; } 50% { transform: scaleX(.8); opacity: .55; } }
  @media (prefers-reduced-motion: reduce) { .globe-spin, .globe-shine, .globe-shadow { animation: none; } }
  /* pengembang: 6 foto tampil bergantian (geser + zoom pelan) */
  .dev { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); flex: none; }
  @media (min-width: 1000px) {
    header { flex-wrap: nowrap; }
    header .chips { flex: 1 1 auto; min-width: 0; }
    header .meta { flex: 0 1 290px; min-width: 230px; font-size: 12px; }
  }
  .dev-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
  .dev-text span { font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted, #5f6b7a); }
  .dev-text b { font-size: 13px; color: #0b2545; background: linear-gradient(90deg, #2747a3, #e8771e, #2747a3); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: dev-name 6s linear infinite; }
  .dev-photos { position: relative; width: 44px; height: 55px; border-radius: 9px; overflow: hidden; flex: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e8771e, 0 3px 8px rgba(11,37,69,.3); background: #f3f4f6; }
  .dev-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
    animation: dev-photo 18s ease-in-out infinite; }
  .dev-photos img:nth-child(2) { animation-delay: 3s; } .dev-photos img:nth-child(3) { animation-delay: 6s; }
  .dev-photos img:nth-child(4) { animation-delay: 9s; } .dev-photos img:nth-child(5) { animation-delay: 12s; } .dev-photos img:nth-child(6) { animation-delay: 15s; }
  @keyframes dev-photo {
    0% { opacity: 0; transform: translateX(30%) scale(1.08); }
    4% { opacity: 1; transform: translateX(0) scale(1.08); }
    16.6% { opacity: 1; transform: translateX(0) scale(1); }
    20.6% { opacity: 0; transform: translateX(-30%) scale(1); }
    100% { opacity: 0; transform: translateX(-30%) scale(1); }
  }
  @keyframes dev-name { to { background-position: -200% 0; } }
  @media (prefers-reduced-motion: reduce) { .dev-photos img { animation: none; } .dev-photos img:first-child { opacity: 1; } .dev-text b { animation: none; } }
  @media (max-width: 760px) { .dev-text { display: none; } }
  .chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
  .chip b { font-variant-numeric: tabular-nums; }
  .chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
  .meta { margin-left: auto; color: var(--muted); font-size: 12.5px; text-align: right; }
  .banner { display: none; padding: 8px 16px; background: #fdecec; color: #8e1f1f; border-bottom: 1px solid #f3c2c2; font-size: 13px; }
  .banner.show { display: block; }

  main { flex: 1; display: flex; min-height: 0; }
  aside { width: 340px; flex: none; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); min-height: 0; }
  .search { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .search input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #f8fafc; color: var(--text); }
  .search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: #fff; }
  #list { overflow-y: auto; flex: 1; }
  .row { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 10px; align-items: center; width: 100%;
    padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
  .row:hover { background: #f4f7fa; }
  .row.sel { background: #e8f1fc; }
  .row .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row .spd { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
  .row .sub { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; }
  .row .sub.late { color: var(--late); font-weight: 600; }
  .empty { padding: 24px 12px; color: var(--muted); text-align: center; }

  #map { flex: 1; min-height: 0; }
  /* daftar kapal bisa disembunyikan supaya peta penuh */
  body.list-hidden aside { display: none; }
  .list-toggle a { width: auto !important; padding: 0 9px; font: 600 12px/30px system-ui, sans-serif !important; white-space: nowrap; color: #0b2545; }
  .ship { background: none; border: 0; }
  .ship svg { display: block; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
  .ship.sel svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 4px var(--accent)); }
  .obs-ico { background: none; border: 0; }
  /* data induk kapal */
  table.ki { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  table.ki th { position: sticky; top: 0; background: var(--panel, #fff); text-align: left; font-weight: 650; color: var(--muted); padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  table.ki td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
  table.ki tr.off td { opacity: .55; }
  table.ki input[type=text], table.ki select { width: 100%; min-width: 80px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
  table.ki .src { font-weight: 600; } table.ki .sm { color: var(--muted); font-size: 11.5px; }
  table.ki .flag { display: inline-block; margin: 0 4px 3px 0; padding: 1px 6px; border-radius: 9px; font-size: 11px; background: #fff2cc; color: #8a5a00; }
  table.ki .flag.dup { background: #fde2e2; color: #9c0006; }
  table.ki td.saved { box-shadow: inset 0 0 0 2px #16904f55; }
  /* peringatan */
  .bell { position: relative; }
  .bell #alCount { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: #c62828; color: #fff; font-size: 11.5px; line-height: 18px; text-align: center; }
  .bell.waspada #alCount { background: #c27c00; }
  .bell.ring .bell-ic { display: inline-block; animation: bellRing 1s ease-in-out 3; transform-origin: 50% 0; }
  @keyframes bellRing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-16deg); } 60% { transform: rotate(10deg); } 80% { transform: rotate(-6deg); } }
  .al { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; padding: 10px 12px; margin: 8px 0; border: 1px solid var(--line); border-left: 5px solid #c27c00; border-radius: 8px; background: #fffaf0; }
  .al.bahaya { border-left-color: #c62828; background: #fff5f5; }
  .al.lihat { opacity: .72; }
  .al .lv { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: #c27c00; color: #fff; align-self: start; }
  .al.bahaya .lv { background: #c62828; }
  .al .jd { font-weight: 650; }
  .al .ps { grid-column: 2 / 4; color: var(--text); font-size: 12.5px; }
  .al .wk { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
  .al .bt { grid-column: 2 / 4; display: flex; gap: 6px; }
  .al .bt button { font: inherit; font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
  .al-h { margin: 14px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .al-r { display: grid; grid-template-columns: 110px 70px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
  /* gambar kapal animasi: TB (tug boat) & PT (pusher tug + tongkang batubara) */
  .boat { position: relative; transform-origin: 50% 75%; transition: transform .2s; }
  #map.z-lo .boat { transform: scale(.62); }
  #map.z-mid .boat { transform: scale(.8); }
  .boat svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
  /* HEMAT BATERAI: 67 kapal bergoyang terus = ±1,5-3 inti CPU tanpa henti. Kapal diam di peta;
     hanya kapal yang DIPILIH atau DITUNJUK mouse yang bergoyang (1 kapal = ringan). */
  .boat .rock { transform-box: fill-box; transform-origin: 50% 90%; }
  .ship.sel .boat .rock, .ship:hover .boat .rock { animation: boatRock 3.4s ease-in-out infinite; }
  .ship.sel .boat.idle .rock, .ship:hover .boat.idle .rock { animation-duration: 5.2s; }
  .ship.sel .boat.mv .rock, .ship:hover .boat.mv .rock { animation-name: boatRockBig; animation-duration: 6.5s; }   /* kapal besar: goyang lebih pelan & kecil */
  @keyframes boatRockBig { 0%, 100% { transform: rotate(-.8deg) translateY(0); } 50% { transform: rotate(.8deg) translateY(-.8px); } }
  /* ombak & jejak buih DIAM (gambar tetap ada): animasinya membuat browser menggambar ulang terus (±2 inti CPU, baterai boros).
     Goyangan kapal (.rock) tetap jalan - ringan (±4% CPU). */
  .boat .wake path { stroke-dasharray: 3 3; }
  .boat .chip { position: absolute; left: -7px; top: -7px; }
  .boat.est svg.hull { opacity: .6; }
  @keyframes boatRock { 0%, 100% { transform: rotate(-1.8deg) translateY(0); } 50% { transform: rotate(1.8deg) translateY(-1.2px); } }
  @keyframes boatWave { from { transform: translateX(0); } to { transform: translateX(-8px); } }
  @keyframes boatWake { to { stroke-dashoffset: 6; } }
  @media (prefers-reduced-motion: reduce) { .boat .rock, .boat .wv, .boat .wake path { animation: none; } }
  /* hemat baterai (30-hemat-daya.js): pakai baterai / tab tidak terlihat = goyangan kapal berhenti.
     Globe & goyangan foto/nama pembuat TETAP berjalan seperti biasa (hanya berhenti saat tab tidak terlihat). */
  body.hemat-daya .boat *, body.tab-tersembunyi *, body.tab-tersembunyi *::before, body.tab-tersembunyi *::after { animation: none !important; }
  body.tab-tersembunyi .dev-photos img:first-child { opacity: 1; }
  .leaflet-tooltip.lbl { display: none; background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: none;
    padding: 1px 6px; font-size: 11.5px; font-weight: 600; color: var(--text); }
  .leaflet-tooltip.lbl::before { display: none; }
  .show-labels .leaflet-tooltip.lbl { display: block; }
  .pop h3 { margin: 0 0 2px; font-size: 15px; }
  .pop .st { font-weight: 600; margin-bottom: 6px; }
  .pop table { border-collapse: collapse; font-size: 12.5px; }
  .pop td { padding: 2px 10px 2px 0; vertical-align: top; }
  .pop td:first-child { color: var(--muted); white-space: nowrap; }
  .pop button { margin-top: 8px; padding: 5px 10px; border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 6px; cursor: pointer; font: inherit; font-size: 12.5px; }
  .pop button:hover { background: #e8f1fc; }

  @media (max-width: 760px) {
    main { flex-direction: column-reverse; }
    aside { width: 100%; height: 42%; border-right: 0; border-top: 1px solid var(--line); }
    .meta { margin-left: 0; text-align: left; width: 100%; }
    header { padding: 10px 16px; }
  }
