:root {
  --bg: #0b0b0d;
  --panel: #111114;
  --panel2: #17171a;
  --border: #2a2a2e;
  --red: #e6303a;
  --cyan: #38bdf8;
  --gold: #f5c451;
  --green: #34d399;
  --text: #e8e8ea;
  --muted: #94a3b8;
  --orange: #f5a623;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 24px;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.header h1 {
  font-size: 22px;
  margin: 0 0 4px 0;
  letter-spacing: 0.3px;
}
.header .subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.header .subtitle .cyan { color: var(--cyan); }

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.info-chip {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  text-align: center;
  min-width: 140px;
}
.info-chip .label { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.info-chip .value { font-size: 15px; font-weight: bold; }
.info-chip .value.green { color: var(--green); }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { border-color: var(--cyan); color: var(--cyan); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-outline { border-color: var(--border); }

.login-info {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.login-info b { color: var(--cyan); }
.login-info a { color: var(--red); text-decoration: none; margin-left: 6px; }

.qr-badge {
  background: #ffffff;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
}
.qr-badge img { width: 56px; height: 56px; display: block; }
.qr-badge span { font-size: 9px; color: #333; text-align: center; line-height: 1.2; }

/* ---------- Warning box ---------- */
.warn-box {
  background: #150a0c;
  border: 1px solid rgba(244,63,94,0.4);
  border-radius: 10px;
  padding: 14px 18px;
  color: #fca5a5;
  margin-bottom: 24px;
}

/* ---------- Layout grid ---------- */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.card h3 {
  margin: 0 0 14px 0;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Jadwal table ---------- */
table.kapal-table {
  width: 100%;
  border-collapse: collapse;
}
table.kapal-table th, table.kapal-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}
table.kapal-table th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
}
.kode-speedboat { color: var(--cyan); font-weight: bold; }
.kode-ketek { color: var(--red); font-weight: bold; }
.jenis-label { display:block; font-size: 11px; color: var(--muted); }
.tarif-mandiri { color: var(--gold); font-weight: bold; }
.tarif-terusan { color: var(--cyan); font-weight: bold; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
}
.pill-status { border-color: var(--green); color: var(--green); }

/* ---------- LRT widget ---------- */
.lrt-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cyan);
  font-weight: bold;
  margin-bottom: 10px;
}
.lrt-track-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.lrt-track {
  display: flex;
  align-items: center;
  min-width: 820px;
  position: relative;
  margin: 0;
}
.lrt-track::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.lrt-stop {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  min-width: 63px;
  flex-shrink: 0;
  white-space: nowrap;
}
.lrt-stop .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  margin: 0 auto 6px auto;
}
.lrt-stop.active .dot {
  width: 14px; height: 14px;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(56,189,248,0.15);
}
.lrt-stop.active { color: var(--cyan); font-weight: bold; }

.lrt-schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.lrt-schedule-row .dest { font-weight: bold; font-size: 14px; }
.lrt-schedule-row .sub { font-size: 11px; color: var(--muted); }
.lrt-schedule-row .time { color: var(--cyan); font-weight: bold; font-size: 15px; text-align: right; }

/* ---------- BMKG widget ---------- */
.bmkg-box { display: flex; align-items: center; gap: 20px; }
.gauge {
  width: 46px;
  height: 110px;
  border-radius: 23px;
  background: #0e2233;
  border: 2px solid #164a63;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.gauge-fill {
  width: 100%;
  background: linear-gradient(180deg, #22d3ee, #0891b2);
}
.gauge-label {
  position: absolute;
  top: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: #bae6fd;
  font-weight: bold;
}
.bmkg-info .tinggi { font-size: 22px; font-weight: bold; margin: 4px 0; }
.bmkg-info .lokasi { font-size: 11px; color: var(--muted); }
.bmkg-info .update { font-size: 10.5px; color: #6b7280; margin-top: 4px; }

/* ---------- Forms (login & kelola) ---------- */
.form-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  max-width: 420px;
  margin: 60px auto;
}
.form-box.wide { max-width: 640px; margin: 0 0 24px 0; }
.form-box input, .form-box select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #1a1a1d;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.form-box label { font-size: 13px; color: var(--muted); }
.alert-error {
  background: #2a1015;
  border: 1px solid var(--red);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-success {
  background: #0f2a1a;
  border: 1px solid var(--green);
  color: #86efac;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
