:root {
  --free: #1f9d55;
  --occupied: #d64545;
  --reserved: #d9a327;
  --offline: #8a8f98;
  --maintenance: #5b5fc7;
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --border: #e0e2e7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.4rem; }

.legend {
  font-size: 0.85rem;
  color: #555;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.status-free, .dot.status-free { background: var(--free); }
.status-occupied, .dot.status-occupied { background: var(--occupied); }
.status-reserved, .dot.status-reserved { background: var(--reserved); }
.status-offline, .dot.status-offline { background: var(--offline); }
.status-maintenance, .dot.status-maintenance { background: var(--maintenance); }
.status-unknown, .dot.status-unknown { background: #bbb; }

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

.form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  gap: 4px;
}

.form input, .form select {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

button {
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button.danger { background: var(--occupied); }
button.secondary { background: #6b7280; }

.error { color: var(--occupied); font-size: 0.85rem; }

.booking-summary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-width: 420px;
}

.hint { font-size: 0.8rem; color: #666; }

.admin-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.admin-nav a { text-decoration: none; color: var(--text); font-weight: 600; }

.booking-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  font-size: 0.85rem;
}

.booking-table th, .booking-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
}

.zone-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.zone-filter a, .zone-filter button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.zone-filter a.active, .zone-filter button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.zone-title {
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-nav { flex-wrap: wrap; }
.admin-user { margin-left: auto; font-size: 0.85rem; color: #555; }

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.panel summary { cursor: pointer; font-weight: 600; }

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 10px;
}
.inline-form label, .inline-label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  gap: 4px;
}
.inline-form input, .inline-form select, .inline-label input, .toolbar input, .pc-table input, .pc-table select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 8px 0;
}
.toolbar .zone-filter { margin: 0; }

.table-wrap { overflow-x: auto; }
.pc-table td { vertical-align: middle; }
.pc-table input.dup { border-color: var(--occupied); background: #fdecec; }
.pc-table tr.dirty { background: #fff8e1; }
.pc-table tr.disabled-row { opacity: 0.55; }
.row-actions { white-space: nowrap; }
.row-actions button { padding: 5px 8px; font-size: 0.75rem; }

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
}

.wa-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.wa-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wa-steps { padding-left: 18px; font-size: 0.9rem; line-height: 1.5; }
#wa-qr img { display: block; margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; }
.wa-preview {
  background: #e7f8e3;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  max-width: 420px;
}

.notice {
  background: #fff4e0;
  border: 1px solid #f3c98b;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  max-width: 420px;
}

.setting-card { max-width: 720px; }
.setting-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.setting-state { margin: 6px 0 0; }
.setting-card + .setting-card { margin-top: 12px; }
.ping-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ping-controls select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.quiet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 0.9rem; }
.quiet-check { display: flex; align-items: center; gap: 6px; }
.quiet-hours { display: flex; align-items: center; gap: 6px; }
.quiet-hours select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.quiet-hours select:disabled { opacity: 0.5; }
.setting-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  font-size: 0.85rem;
}
.setting-detail ul { padding-left: 18px; margin: 6px 0; }
.pill-on, .pill-off {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 6px;
}
.pill-on { background: var(--free); }
.pill-off { background: var(--offline); }

.refresh-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.refresh-bar button:disabled { opacity: 0.7; cursor: wait; }
.refresh-bar .hint { margin: 0; }

.success { color: var(--free); font-size: 0.85rem; font-weight: 600; }
.form .checkbox-label { flex-direction: row; align-items: center; gap: 6px; }
@keyframes blink-alert { 50% { outline-color: #fca5a5; } }

.booking-alert {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.booking-alert.alert-conflict { background: #fde8e8; border: 1px solid #f5a3a3; }
.booking-alert.alert-warning { background: #fff4e0; border: 1px solid #f3c98b; }
.booking-alert-actions { display: flex; gap: 6px; }
.booking-alert-actions button { padding: 6px 10px; font-size: 0.8rem; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 18px;
  width: 100%;
  max-width: 440px;
}
.modal select { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; }

.failed-row { background: #fdecec; }
.ua { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; color: #666; }

/* ---- Booking form (multi-PC) ---- */
.book-form { max-width: 720px; }
.book-step { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--card-bg); display: flex; flex-direction: column; gap: 10px; }
.book-step legend { font-weight: 600; padding: 0 6px; }
.book-time { display: flex; gap: 12px; flex-wrap: wrap; }
.book-time label { flex: 1 1 150px; }
.book-form input, .book-form select, .book-form textarea, .modal select, .modal input[type=date] {
  padding: 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit;
}
.time24 { display: flex; align-items: center; gap: 4px; }
.time24 select { flex: 1; }
.pick-pc { background: #fff; color: var(--text); border: 2px solid var(--border); padding: 8px 4px; border-radius: 8px; font-size: 0.85rem; cursor: pointer; }
.pick-pc.on { background: var(--free); border-color: var(--free); color: #fff; font-weight: 600; }
.pick-pc:disabled { background: #eee; color: #aaa; text-decoration: line-through; cursor: not-allowed; }
.form label.radio, .form label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 0.9rem; }
.info-war { background: #e8f1ff; border: 1px solid #9cc0f5; border-radius: 8px; padding: 10px 12px; margin: 0; font-size: 0.9rem; }
.button-link { display: inline-block; background: #2563eb; color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.summary-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0; }
.summary-list dt { color: #666; }
.summary-list dd { margin: 0; font-weight: 500; }
.booking-code { font-size: 1.1rem; }

/* ---- Admin: Daftar Booking ---- */
.booking-stats { font-size: 0.95rem; }
.booking-list { display: flex; flex-direction: column; gap: 12px; }
.bk-card { background: var(--card-bg); border: 1px solid var(--border); border-left: 5px solid var(--reserved); border-radius: 8px; padding: 12px 14px; }
.bk-card.st-confirmed { border-left-color: var(--free); }
.bk-card.st-cancelled, .bk-card.st-done { border-left-color: var(--offline); opacity: 0.8; }
.bk-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.bk-code { font-weight: 700; font-size: 1.05rem; }
.bk-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; background: #fff4e0; color: #8a5a00; }
.bk-status.st-confirmed { background: #e3f6ea; color: #15703c; }
.bk-status.st-cancelled, .bk-status.st-done { background: #eceef1; color: #555; }
.bk-pcs { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.bk-pcs td { border-top: 1px solid var(--border); padding: 6px 4px; vertical-align: middle; }
.bk-pcs .row-actions { text-align: right; }
@media (max-width: 600px) {
  .bk-pcs td { display: block; border-top: none; padding: 2px 0; }
  .bk-pcs tr { display: block; border-top: 1px solid var(--border); padding: 6px 0; }
  .bk-pcs .row-actions { text-align: left; }
}

[hidden] { display: none !important; }

/* ---- Prices / bill / QRIS ---- */
.bill-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 6px 0; }
.bill-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
.bill-table .num { text-align: right; white-space: nowrap; }
.bill-table tfoot td { font-weight: 700; font-size: 1rem; border-bottom: none; border-top: 2px solid var(--text); }
.qris-box { text-align: center; border: 2px dashed #2563eb; border-radius: 10px; padding: 12px; margin: 12px 0; }
.qris-img { max-width: 280px; width: 100%; height: auto; border-radius: 8px; }
.qris-total { font-size: 1.2rem; }
.wa-admin-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-admin-row input { flex: 1 1 260px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.pay-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; }
.pay-badge.paid { background: #e3f6ea; color: #15703c; }
.pay-badge.unpaid { background: #fdecec; color: #a12828; }
.price-table input { width: 100px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }
.price-table input.name { width: 140px; }
.price-table input.hours { width: 60px; }
.price-table th, .price-table td { padding: 4px 6px; text-align: left; }
.folder-status li { margin: 2px 0; }

/* ---- Price list (booking page) + editor ---- */
.price-cat-edit .cat-head { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 6px 0; }
.price-cat-edit input { padding: 6px; border: 1px solid var(--border); border-radius: 6px; }
.price-cat-edit input.wide { flex: 1 1 220px; }
.price-cat-edit .cat-zones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; margin: 6px 0; }
.price-cat-edit .cat-note { display: flex; flex-direction: column; font-size: 0.8rem; gap: 4px; }
.sec-edit { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 6px; }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }

/* ---- Booking form: popup, booked PCs, my bookings ---- */
.modal-overlay[hidden] { display: none !important; }
.popup-list { margin: 6px 0; padding-left: 20px; }
.popup-list li { margin: 4px 0; }
.pick-pc small { display: block; font-size: 0.65rem; font-weight: 400; line-height: 1.2; margin-top: 2px; }
.pick-pc.booked-day { background: #fff4e0; border-color: var(--reserved); }
.pick-pc.booked-day.on { background: var(--free); border-color: var(--free); color: #fff; }
.pick-pc.clash { background: #fdecec; border-color: var(--occupied); color: #a12828; cursor: not-allowed; }
.pick-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 0.8rem; margin: 0; }
.pick-pc.sample { display: inline-block; padding: 2px 6px; font-size: 0.7rem; cursor: default; }
.day-schedule ul { margin: 4px 0; padding-left: 20px; font-size: 0.85rem; }
.day-schedule li.clash { color: #a12828; font-weight: 600; }
.my-bookings { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 8px 0 14px; max-width: 720px; }
.my-bookings summary { cursor: pointer; }
.mb-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mb-item { border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: 0.85rem; }
.mb-item.dead { opacity: 0.6; }
.mb-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mb-badge { font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; }
.mb-badge.ok { background: #e3f6ea; color: #15703c; }
.mb-badge.wait { background: #fff4e0; color: #8a5a00; }
.mb-x { margin-left: auto; background: none; color: #999; border: none; padding: 0 4px; cursor: pointer; }
.mb-add { display: flex; gap: 6px; }
.mb-add input { flex: 1; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; text-transform: uppercase; }
.qris-info { text-align: left; background: #f5f8ff; border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; margin-top: 10px; }
.qris-info p { margin: 4px 0; }
.qris-info ul { margin: 4px 0; padding-left: 18px; }

/* Booking: 2 tabs (Main Game / War Tiket) */

/* Dashboard: booking notification box */
.bk-inbox { border: 2px solid #f59e0b; background: #fffbeb; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.bk-inbox.empty { border-color: var(--border); background: var(--card-bg); }
.bk-inbox-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-inbox-head h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.bk-inbox-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bk-note { background: #fff; border: 1px solid var(--border); border-left: 5px solid #f59e0b; border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; }
.bk-note.paid { border-left-color: #16a34a; }
.bk-note.late { border-left-color: #dc2626; }
.bk-late { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: #fee2e2; color: #991b1b; font-weight: 600; }
.bk-note.fresh { animation: bk-flash 1s ease-in-out 4; }
.bk-note-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bk-note ul { margin: 6px 0; padding-left: 18px; }
.bk-note .wa-actions { margin-top: 6px; }
@keyframes bk-flash { 50% { background: #fde68a; } }

/* Booking page v3: 4 tabs, compact for phones */
.book-title { margin-bottom: 4px; }
.book-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 720px; position: sticky; top: 0; z-index: 5; background: var(--bg, #f4f5f7); padding: 6px 0; }
.book-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; font-size: 1.2rem; line-height: 1.1; font-weight: 600; background: var(--card-bg); color: inherit; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; }
.book-tabs button.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.book-tabs button span { font-size: 0.72rem; font-weight: 600; }
.book-tabs.locked button { opacity: 0.5; cursor: not-allowed; }
.rules-bar { margin: 6px 0; }
.link-btn { background: none; border: none; color: #2563eb; font-weight: 600; padding: 4px 0; cursor: pointer; font-size: 0.95rem; text-decoration: underline; }
.notice.small { font-size: 0.85rem; padding: 6px 10px; }
.book-form, .booking-summary { max-width: 720px; }
.time-box { background: #eef4ff; border: 1px solid #b9d0fb; border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; line-height: 1.5; }
.time-box .big { font-size: 1.25rem; }
.pick-pc.busy.on { background: var(--free); border-color: var(--free); color: #fff; }
.pick-sel { background: var(--free); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 0.75rem; }
.member-card { border: 1px solid var(--border); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: #fafbfc; }
.member-card + .member-card { margin-top: 8px; }
.mc-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.mc-until { margin-left: auto; font-size: 0.8rem; background: #e3f6ea; color: #15703c; border-radius: 999px; padding: 0 8px; }
.member-card input[type=text], .member-card select { width: 100%; box-sizing: border-box; font-size: 1rem; }
.buyer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.buyer input { width: 100%; box-sizing: border-box; font-size: 1rem; }
@media (max-width: 520px) { .buyer { grid-template-columns: 1fr; } }
.big-btn { font-size: 1.05rem; padding: 12px 16px; width: 100%; }
.small-btn { font-size: 0.85rem; padding: 6px 10px; margin-top: 8px; }
.form label.check.agree { align-items: flex-start; background: #fff4e0; border: 1px solid #f0c36d; border-radius: 8px; padding: 8px; font-size: 0.85rem; }
.form label.check.agree input { margin-top: 3px; }
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip { background: #fff; color: inherit; border: 2px solid var(--border); border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.chip.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.price-block { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 8px 0; max-width: 720px; }
.price-block h3 { margin: 0 0 6px; font-size: 1rem; }
.price-block h3 small { display: block; font-weight: 400; font-size: 0.75rem; color: #666; }
.price-rows { list-style: none; margin: 0; padding: 0; }
.price-rows li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.price-rows li:last-child { border-bottom: none; }
.pr-time { font-weight: 600; }
.pr-price { font-weight: 700; color: #15703c; text-align: right; }
.pr-active { grid-column: 1 / -1; font-size: 0.75rem; color: #777; }
.book-links { display: flex; gap: 8px; flex-wrap: wrap; }
.button-link.secondary-link { background: #fff; color: #2563eb; border: 2px solid #2563eb; }

/* Booking: compact PC tiles, all zones visible (no collapsing) */
.pick-zone2 { margin: 6px 0 8px; }
.pz-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 0.9rem; margin-bottom: 4px; }
.pick-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; }
.pick-grid2 .pick-pc { padding: 7px 0; font-size: 0.85rem; font-weight: 700; border-width: 2px; border-radius: 6px; line-height: 1; min-height: 34px; }
.pick-legend { gap: 4px 10px; font-size: 0.75rem; }
.pick-legend > span { display: inline-flex; align-items: center; gap: 3px; }
.pick-legend .pick-pc.sample { padding: 2px 5px; font-size: 0.65rem; min-height: 0; }
.pick-pc.busy { background: #e6e8ec; border-color: #b9bec7; color: #555; }

/* Status page: small status-coloured PC tiles (a free PC links to the booking page) */
.st-zones { margin-top: 8px; }
.st-pc { display: flex; align-items: center; justify-content: center; color: #fff; border: 2px solid transparent; border-radius: 6px;
  padding: 7px 0; min-height: 34px; font-size: 0.85rem; font-weight: 700; line-height: 1; text-decoration: none; }
a.st-pc:hover { border-color: #111; }

/* Status page: Pricelist button (green, stands out) + popup */
button.button-link { border: 0; font-size: 1rem; font-family: inherit; cursor: pointer; }
.button-link.pricelist-btn { background: var(--free); }
.modal.modal-pricelist { max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 12px 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-head .zone-title { margin: 0; }

/* Pricelist: info at the bottom (Spek PC + notes) */
.price-info { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid #2563eb; border-radius: 8px; background: #f8faff; }
.price-info h3 { margin: 0 0 6px; font-size: 0.95rem; }
.price-info h3 + ul { margin-top: 0; }
.price-info ul { margin: 0 0 8px; padding-left: 18px; font-size: 0.85rem; }
.price-info ul:last-child { margin-bottom: 0; }

/* Admin dashboard: small PC tiles with marks; click = details popup */
.adm-grid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.adm-tile { position: relative; cursor: pointer; font-family: inherit; }
.adm-tile:hover { border-color: #111; }
.adm-tile.alert-conflict { outline: 3px solid #b91c1c; outline-offset: 1px; animation: blink-alert 1.2s infinite; }
.adm-tile.alert-warning { outline: 2px dashed #d97706; outline-offset: 1px; }
.adm-marks { position: absolute; top: -7px; right: -5px; font-size: 0.6rem; line-height: 1; background: #fff; border-radius: 6px; padding: 1px 2px; box-shadow: 0 0 0 1px var(--border); }
.adm-pc-modal p { margin: 6px 0; }
.adm-pc-modal label { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 0.9rem; }

/* Chat: customer widget (floating button + panel) and Admin -> Chat Pelanggan */
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.72rem; font-weight: 700; text-align: center; line-height: 18px; }
.nav-badge[hidden] { display: none; }
.chat-fab { position: fixed; right: 16px; bottom: 16px; z-index: 70; border: 0; border-radius: 999px; padding: 12px 16px; background: #2563eb; color: #fff;
  font-weight: 700; font-size: 0.95rem; font-family: inherit; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); cursor: pointer; }
.chat-badge { display: inline-block; margin-left: 4px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.75rem; line-height: 20px; }
.chat-badge[hidden] { display: none; }
.chat-panel { position: fixed; right: 16px; bottom: 72px; z-index: 71; width: 340px; max-width: calc(100vw - 32px); height: 460px; max-height: calc(100vh - 100px);
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: #f8faff; }
.chat-head .hint { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head b + button, .chat-head .hint + button { margin-left: auto; }
.chat-x { margin-left: auto; border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: #555; padding: 2px 6px; }
.chat-start { display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; }
.chat-start label { display: flex; flex-direction: column; gap: 3px; font-size: 0.85rem; }
.chat-start input, .chat-start textarea, .chat-send textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 0.9rem; }
.chat-start .big-btn { margin: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-msg.from-me { align-self: flex-end; align-items: flex-end; }
.chat-msg.from-admin { align-self: flex-start; }
.chat-bubble { padding: 7px 10px; border-radius: 12px; font-size: 0.9rem; line-height: 1.35; word-wrap: break-word; overflow-wrap: anywhere; }
.from-me .chat-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.from-admin .chat-bubble { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-time { font-size: 0.68rem; color: #777; margin-top: 2px; }
.chat-send { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.chat-send textarea { resize: none; }
.chat-send button { flex-shrink: 0; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 0; padding: 0 10px 8px; font-size: 0.8rem; }
@media (max-width: 480px) {
  .chat-panel { right: 8px; left: 8px; width: auto; max-width: none; bottom: 68px; height: calc(100vh - 90px); }
}
.chat-admin { display: grid; grid-template-columns: 280px 1fr; gap: 10px; height: 70vh; min-height: 420px; }
.chat-threads { overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.chat-thread { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--border);
  background: #fff; color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.chat-thread.active { background: #eef4ff; }
.chat-thread.closed { opacity: 0.6; }
.ct-top { display: flex; gap: 6px; align-items: center; }
.ct-top .hint { margin-left: auto; font-size: 0.7rem; }
.ct-last { color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-room { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.chat-room > .hint { padding: 12px; }
.chat-room .chat-send button { padding: 8px 16px; }
@media (max-width: 700px) {
  .chat-admin { grid-template-columns: 1fr; height: auto; }
  .chat-threads { max-height: 220px; }
  .chat-room { height: 60vh; }
}

/* Booking page, tab Billiard: 6 bigger table tiles */
.bil-grid { grid-template-columns: repeat(6, minmax(44px, 1fr)); max-width: 420px; }
.bil-grid .pick-pc { padding: 12px 0; font-size: 1rem; font-weight: 700; border-radius: 8px; }

/* Kelola PC: billiard tables */
.table-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.table-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.table-chip .small-btn { padding: 2px 8px; }
.adm-tile.time-up { outline: 3px solid #b91c1c; outline-offset: 1px; animation: blink-alert 1.2s infinite; }
.table-start { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.table-start button { padding: 8px 12px; }

/* =====================================================================
   Dark theme — modern & minimal (overrides the light colours above)
   ===================================================================== */
:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --card-bg: #121826;
  --card-2: #182033;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #243044;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --free: #16a34a;
  --occupied: #dc2626;
  --reserved: #d97706;
  --offline: #475569;
  --maintenance: #7c3aed;
  --ok-bg: rgba(34, 197, 94, 0.14);   --ok-fg: #86efac;
  --warn-bg: rgba(245, 158, 11, 0.14); --warn-fg: #fcd34d;
  --bad-bg: rgba(239, 68, 68, 0.14);   --bad-fg: #fca5a5;
  --info-bg: rgba(99, 102, 241, 0.14);
  --radius: 12px;
}
body { background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); }
h1 { font-weight: 700; letter-spacing: -0.02em; }
.topbar { background: rgba(11, 15, 23, 0.85); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 40; }
.brand { color: var(--text); letter-spacing: 0.02em; }
.brand::before { content: "●"; color: var(--accent); margin-right: 8px; }

/* text */
.hint, .summary-list dt, .price-block h3 small, .pr-active, .admin-user, .ua, .chat-time, .legend { color: var(--muted); }
.error { color: var(--bad-fg); }
.success { color: var(--ok-fg); }

/* controls */
input, select, textarea { background: #0f1522; color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }
input::placeholder, textarea::placeholder { color: #64748b; }
option:disabled { color: #64748b; }
button { background: var(--accent); border-radius: 8px; transition: filter 0.15s, transform 0.05s; }
button:hover { filter: brightness(1.12); }
button:active { transform: translateY(1px); }
button.secondary { background: #2b3447; color: var(--text); }
button.danger { background: #b91c1c; }
.button-link { background: var(--accent); border-radius: 10px; }
.button-link.secondary-link { background: transparent; color: var(--accent-2); border: 1px solid var(--accent); }
.button-link.pricelist-btn { background: var(--free); }
.link-btn { color: var(--accent-2); }

/* surfaces */
.panel, .booking-summary, .book-step, .bk-card, .my-bookings, .modal, .price-block, .booking-table, .chat-threads, .chat-room, .chat-panel { background: var(--card-bg); border-color: var(--border); border-radius: var(--radius); }
.booking-table th { background: var(--card-2); color: var(--muted); font-weight: 600; }
.booking-table th, .booking-table td { border-color: var(--border); }
.modal { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); border: 1px solid var(--border); }
.modal-overlay { background: rgba(2, 6, 12, 0.7); backdrop-filter: blur(2px); }
.member-card, .mb-item, .table-chip, .chat-thread { background: var(--card-2); border-color: var(--border); color: var(--text); }
.chat-thread.active { background: #222b44; }
.save-bar { background: var(--bg); }

/* chips / filters / tabs */
.zone-filter a, .zone-filter button, .chip { background: transparent; color: var(--text); border: 1px solid var(--border); }
.zone-filter a:hover, .chip:hover { border-color: var(--accent); }
.zone-filter a.active, .zone-filter button.active, .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.book-tabs { background: var(--bg); }
.book-tabs button { background: var(--card-bg); border: 1px solid var(--border); color: var(--text); }
.book-tabs button.active { background: var(--accent); border-color: var(--accent); }
.admin-nav { padding: 6px 0 10px; border-bottom: 1px solid var(--border); gap: 6px 14px; }
.admin-nav a { color: var(--muted); font-weight: 600; padding: 4px 2px; }
.admin-nav a:hover { color: var(--text); }

/* status tiles: flat, soft */
.st-pc, .pick-pc { border-radius: 8px; }
.st-pc { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2); }
.status-free { background: #15803d; }
.status-occupied { background: #b91c1c; }
.status-reserved { background: #b45309; }
.status-maintenance { background: #6d28d9; }
.status-offline, .status-unknown { background: #334155; }
.dot.status-free { background: #22c55e; } .dot.status-occupied { background: #ef4444; } .dot.status-reserved { background: #f59e0b; }
.dot.status-maintenance { background: #8b5cf6; } .dot.status-offline { background: #64748b; }
a.st-pc:hover, .adm-tile:hover { border-color: #e5e7eb; }
.adm-marks { background: #0b0f17; box-shadow: 0 0 0 1px var(--border); }
.pick-pc { background: var(--card-2); color: var(--text); border: 1px solid var(--border); }
.pick-pc.on, .pick-pc.booked-day.on, .pick-pc.busy.on { background: var(--free); border-color: #22c55e; color: #fff; }
.pick-pc.busy { background: #1e293b; border-color: #334155; color: #94a3b8; }
.pick-pc.booked-day { background: var(--warn-bg); border-color: #b45309; color: var(--warn-fg); }
.pick-pc.clash { background: var(--bad-bg); border-color: #b91c1c; color: var(--bad-fg); }
.pick-pc:disabled { background: #111827; color: #475569; }
.pick-sel { background: var(--free); }

/* notices / badges */
.notice, .form label.check.agree { background: var(--warn-bg); border: 1px solid rgba(245, 158, 11, 0.35); color: var(--text); border-radius: 10px; }
.time-box, .info-war, .qris-info { background: var(--info-bg); border: 1px solid rgba(99, 102, 241, 0.35); color: var(--text); border-radius: 10px; }
.qris-box { border-color: var(--accent); border-radius: var(--radius); }
.qris-img { background: #fff; padding: 8px; }
.pay-badge.paid, .mb-badge.ok, .bk-status.st-confirmed { background: var(--ok-bg); color: var(--ok-fg); }
.pay-badge.unpaid, .mb-badge.wait, .bk-status { background: var(--warn-bg); color: var(--warn-fg); }
.bk-status.st-cancelled, .bk-status.st-done { background: #1e293b; color: var(--muted); }
.mc-until { background: var(--ok-bg); color: var(--ok-fg); }
.booking-alert.alert-conflict, .failed-row, .bk-late { background: var(--bad-bg); border-color: rgba(239, 68, 68, 0.4); color: var(--bad-fg); }
.booking-alert.alert-warning { background: var(--warn-bg); border-color: rgba(245, 158, 11, 0.35); }
.pc-table input.dup { background: var(--bad-bg); }
.pc-table tr.dirty { background: rgba(245, 158, 11, 0.08); }
.wa-preview { background: #0f2a1a; color: #d1fae5; }
.day-schedule li.clash { color: var(--bad-fg); }

/* booking inbox */
.bk-inbox { background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.5); border-radius: var(--radius); }
.bk-inbox.empty { background: var(--card-bg); border-color: var(--border); }
.bk-note { background: var(--card-2); border-color: var(--border); }
@keyframes bk-flash { 50% { background: rgba(245, 158, 11, 0.25); } }

/* pricelist */
.pr-price { color: #4ade80; }
.price-info { background: var(--info-bg); border-color: var(--border); border-left-color: var(--accent); }
.price-rows li { border-bottom-color: var(--border); }
.bill-table tfoot td { border-top-color: var(--muted); }
.bill-table td { border-bottom-color: var(--border); }

/* chat */
.chat-panel { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.chat-head { background: var(--card-2); border-bottom-color: var(--border); }
.chat-list { background: var(--bg); }
.from-admin .chat-bubble { background: var(--card-2); border-color: var(--border); color: var(--text); }
.from-me .chat-bubble { background: var(--accent); }
.chat-send, .chat-start { border-top-color: var(--border); }
.chat-fab { background: var(--accent); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
.chat-x { color: var(--muted); }
.mb-x { color: var(--muted); }

/* promo (Daftar Harga discount) */
.promo-banner { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: linear-gradient(90deg, rgba(236, 72, 153, 0.18), rgba(99, 102, 241, 0.18)); border: 1px solid rgba(236, 72, 153, 0.4); font-size: 0.9rem; }
.pr-old { color: var(--muted); font-weight: 400; margin-right: 4px; font-size: 0.85em; }
.chip-promo { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #db2777; color: #fff; font-size: 0.7rem; }
.promo-edit { margin: 8px 0; border: 1px dashed rgba(236, 72, 153, 0.5); border-radius: 10px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.promo-edit legend { font-weight: 600; padding: 0 6px; }
.promo-edit label { display: flex; flex-direction: column; font-size: 0.8rem; gap: 4px; }
.promo-edit input { padding: 6px 8px; }
.promo-edit input[type=number] { width: 80px; }
.promo-edit .hint { flex-basis: 100%; }
/* 5 booking tabs in one row, below the sticky top bar */
.book-tabs { grid-template-columns: repeat(5, 1fr); top: 44px; z-index: 30; }
.book-tabs button { padding: 7px 1px; font-size: 1.1rem; }
.book-tabs button span { font-size: 0.66rem; }
/* Long option texts (packages with promo) must not widen the form on phones */
fieldset { min-width: 0; }
.book-form select, .book-form input, .book-form textarea { max-width: 100%; min-width: 0; }
.book-time label { min-width: 0; }

/* Status page banner: call to book + live free count */
.hero { position: relative; overflow: hidden; margin: 4px 0 18px; padding: 20px 20px 18px; border-radius: 16px; border: 1px solid rgba(99, 102, 241, 0.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(99, 102, 241, 0.35), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(236, 72, 153, 0.25), transparent 55%), var(--card-bg); }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.3rem, 4.5vw, 1.9rem); line-height: 1.2; }
.hero-tag { margin: 0 0 10px; font-size: 1rem; color: #c7d2fe; min-height: 2.6em; transition: opacity 0.35s; }
.hero-tag.fade { opacity: 0; }
.hero-live { margin: 0; font-size: 0.9rem; color: var(--muted); }
.hero-live b { color: #4ade80; font-size: 1.05rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 4px; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.status-title { font-size: 1.1rem; margin: 0 0 10px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

/* Customer pages footer */
.site-footer { text-align: center; margin: 32px auto 0; padding: 22px 16px 90px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; line-height: 1.6; max-width: 960px; }
.site-footer p { margin: 4px 0; }
.footer-brand { color: var(--text); font-size: 1rem; }
.footer-brand i { color: var(--accent-2); }
.hero-kicker { margin: 0 0 4px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }

/* Pengaturan: backup & restore */
.backup-dir { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0 4px; }
.backup-dir input { min-width: 260px; }
.backup-sub { margin: 14px 0 4px; font-size: 1rem; }
.backup-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 460px; }
.backup-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-2); }
.backup-list .small-btn { margin: 0; }
