/* Panggil semua, bisukan channel, alat peta, ikuti, putar ulang rute, laporan, editor area. */

/* ---------- tombol PTT ---------- */
.ptt-all { flex: 0 0 210px; background: #8a2be2; }
.ptt-all.active { background: var(--tx); }
.ptt-all .ptt-main { font-size: 17px; }

/* ---------- bisukan channel ---------- */
.channel .mute { background: transparent; border: 0; padding: 0 2px; font-size: 14px; opacity: .45; }
.channel .mute:hover, .channel .mute.on { opacity: 1; }
.channel.muted .name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(150,160,172,.5); }

/* ---------- alat peta ---------- */
.map-tools { position: absolute; top: 10px; right: 10px; z-index: 600; display: flex; flex-direction: column; gap: 6px; }
.map-tools button { background: rgba(11,14,19,.88); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; font-weight: 600; text-align: left; }
.map-tools button:hover, .map-tools button.on { border-color: var(--private); }
.follow-bar { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; gap: 12px;
  align-items: center; background: rgba(11,14,19,.92); border: 1px solid var(--rx); border-radius: 10px; padding: 8px 12px;
  font-weight: 600; font-size: 14px; }
.route-bar { flex-direction: column; align-items: stretch !important; gap: 8px !important; white-space: normal !important; }
.route-bar input[type=range] { flex: 1; min-width: 220px; accent-color: var(--private); }
.route-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 110px; }
.feed span.geo { color: #ffb36b; }

/* ---------- laporan ---------- */
.report:not([hidden]) { flex: 1; display: flex; padding: 14px; min-height: 0; }
.report .mpane { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.stat b { font-size: 22px; }
.stat span { color: var(--muted); font-size: 12px; }
.sub-h { font-size: 16px; margin: 28px 0 10px; }
.inline-search { width: 220px !important; margin: 0 !important; }
.link-btn { text-decoration: none; display: inline-flex; align-items: center; color: var(--text) !important; }
#repPlayer { width: 100%; height: 36px; margin: 10px 0; }
a.btn-sm { text-decoration: none; display: inline-block; }

/* ---------- editor area ---------- */
.geo-grid { display: grid; grid-template-columns: 1fr 330px; gap: 14px; margin-bottom: 16px; }
.geo-map-wrap { position: relative; height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); isolation: isolate; }
#geoMap { position: absolute; inset: 0; background: #0f141b; }
.geo-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 600; background: rgba(11,14,19,.9);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.geo-form { display: grid; gap: 12px; align-content: start; margin: 0; }
.geo-form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.geo-form select[multiple] { min-height: 110px; }
.btn-sm.ghost.on { border-color: var(--rx); background: rgba(32,112,230,.2); }

/* kepala halaman: kontrol membungkus rapi di layar laptop */
.mhead > .row { flex-wrap: wrap; justify-content: flex-end; max-width: 560px; }
.mhead > div:first-child { min-width: 280px; }

/* ---------- layar sempit (laptop kecil / tablet) ---------- */
.grid { grid-template-columns: 270px minmax(0, 1fr) 310px; }
.center, .panel { min-width: 0; }
.ptt-wrap { gap: 14px; }
.ptt { min-width: 0; }
@media (max-width: 1280px) {
  .grid { grid-template-columns: 220px minmax(0, 1fr) 270px; gap: 10px; padding: 10px; }
  .ptt-all { flex-basis: 170px; }
  .ptt-main { font-size: 17px; }
  .vol { width: 110px; }
  .form-grid, #opForm.form-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .geo-grid { grid-template-columns: 1fr 290px; }
}
@media (max-width: 1100px) {
  .grid { grid-template-columns: 190px minmax(0, 1fr) 240px; }
  .ptt { height: 72px; }
  .ptt-all { flex-basis: 140px; }
  .ptt-all .ptt-main { font-size: 14px; }
  .ptt-main { font-size: 15px; }
  .ptt-sub { font-size: 11.5px; }
  .vol { width: 80px; font-size: 12px; }
  .topbar { gap: 8px; padding: 8px 12px; }
  #toneBtn { padding: 6px 8px; }
  .manage:not([hidden]) { grid-template-columns: 170px 1fr; }
  .geo-grid { grid-template-columns: 1fr; }
  .tab { padding: 8px 5px; font-size: 12px; }
}
/* baris channel & anggota tidak boleh melebar keluar panel */
.side { overflow-x: hidden; }
.channel { min-width: 0; }
.channel .name, .member .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol input[type=range] { width: 100%; min-width: 0; }
@media (max-width: 1100px) {
  .panel { padding: 12px; }
  .channel { padding: 8px 9px; gap: 7px; }
}

/* ---------- siaran audio ---------- */
.bc-pane:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }
.bc-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.bc-head select { padding: 4px 6px; }
.bc-now { background: rgba(214,40,48,.16); border: 1px solid var(--tx); border-radius: 10px; padding: 10px; display: grid; gap: 5px; }
.bc-now-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bc-now-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bc-progress div { height: 100%; width: 0; background: var(--tx); transition: width .25s linear; }
.bc-actions { gap: 6px; }
.bc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; overflow: auto; min-height: 0; }
.bc-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px;
  border-radius: 8px; background: var(--surface); font-size: 13px; }
.bc-item.playing { outline: 1px solid var(--tx); background: rgba(214,40,48,.12); }
.bc-play { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #8a2be2; color: #fff; font-size: 11px; }
.bc-item.playing .bc-play { background: var(--tx); }
.bc-meta { display: grid; min-width: 0; }
.bc-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-meta span { color: var(--muted); font-size: 11.5px; }
.bc-tools { display: flex; gap: 2px; }
.bc-tools button { background: transparent; border: 0; color: var(--muted); padding: 2px 5px; font-size: 13px; }
.bc-tools button:hover:not(:disabled) { color: var(--text); }
.bc-tools button:disabled { opacity: .3; }

/* Siaran: judul panjang dipotong "…", kartu & tombol Stop tetap di dalam panel (tanpa gulir ke samping). */
.bc-pane > * { min-width: 0; max-width: 100%; }
.bc-now { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.bc-now-head { min-width: 0; }
.bc-now-head b { flex: 1; min-width: 0; display: block; }
.bc-now-head .btn-sm { flex: none; }
#bcNowTarget, #bcTime { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-list { grid-template-columns: minmax(0, 1fr); }
.tabpane { overflow-x: hidden; }
/* Tab panel kanan berbagi lebar: 5 tab tidak pernah melebihi panel. */
.right .tabs { overflow: hidden; }
.right .tab { flex: 1 1 auto; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .right .tab { padding: 8px 2px; font-size: 11.5px; } }

/* ---------- Mode Bridge (radio analog) ---------- */
.st-br { background: rgba(120, 140, 255, .18); color: #a9b6ff; }
#ddBridge label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
#ddBridge label.check input { width: auto; }
.br-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.br-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.br-grid input, .br-grid select { width: 100%; min-width: 0; box-sizing: border-box; }
.br-grid .wide { grid-column: 1 / -1; }
.br-grid[hidden] { display: none; }
#ddBridge .hint { margin-top: 0; }
@media (max-width: 700px) { .br-grid { grid-template-columns: 1fr; } }

/* ---------- multi-organisasi ---------- */
.org-label { font-weight: 600; color: var(--muted); margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; display: inline-block; vertical-align: bottom; }
body:not(.is-org-admin) .org-admin-only { display: none !important; }
body:not(.is-super) .super-only { display: none !important; }
.scope-list { display: grid; gap: 6px; padding: 12px 20px; max-height: 50vh; overflow: auto; }
.scope-list label.check { display: flex; align-items: center; gap: 8px; }
.scope-list input { width: auto; }
#chForm label.inline select { max-width: 260px; }
#opScopeNew { min-height: 96px; }
#opScopeWrap { grid-column: span 2; }

/* ---------- Tahap 2: masuk dengan Wuzchat, pengajuan, syarat, tautan gabung ---------- */
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.wz-box { display: grid; gap: 10px; font-size: 14px; }
.wz-box p { margin: 0; }
.wz-box .wz-code { font: 800 28px/1 Consolas, monospace; letter-spacing: 6px; text-align: center; padding: 12px;
  border: 1px dashed var(--line); border-radius: 10px; }
.wz-box .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wz-box a.btn { text-decoration: none; padding: 8px 14px; border-radius: 8px; }
.wz-box .small { font-size: 12px; }
.wz-box .sim-note { font-size: 12px; color: #f0b000; }
.wz-choose { display: grid; gap: 6px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: #3fd08a;
  border-radius: 50%; animation: wzsp .9s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes wzsp { to { transform: rotate(360deg); } }
.section-gap { margin-top: 28px; }
.rules-table td:first-child { color: var(--muted); }
.rules-table input[type=number] { width: 110px; }
.link-url { font: 13px Consolas, monospace; word-break: break-all; }
.big-link { font-size: 16px; margin: 8px 0 12px; color: #3fd08a; }
.wz-box .wz-qr { display: block; margin: 0 auto; width: 180px; height: 180px; border-radius: 10px; background: #fff; padding: 6px; }
.wz-link { border-top: 1px solid var(--line); }
.wz-link h2 { font-size: 16px; }
