/* Sidebar Tumoro untuk panel live (index.html). Terisolasi dengan awalan .tm-side supaya tidak bentrok
   dengan gaya panel; isinya disalin dari app.css (bagian sidebar). */
.tm-side {
  --ink: #0f1d3d; --muted: #56627f; --faint: #8a94ad; --line: #e3e9f5; --line-2: #eef2f9;
  --bg: #f4f7fd; --card: #ffffff; --soft: #f7f9fe;
  --blue: #1a5fe8; --blue-2: #134bc0; --blue-soft: #e8efff;
  --red: #e0313b; --crimson: #c8102e; --red-soft: #fde8ec;
  --green: #13803d; --green-soft: #e3f7ea; --amber: #a3620a; --amber-soft: #fff2d9;
  --navy: #0b1530;
  --grad: linear-gradient(135deg, #e0313b 0%, #b0122f 45%, #6d0a1f 100%);
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
  --r: 16px; --side: 224px;
  --shadow: 0 1px 2px rgba(15,29,61,.04), 0 10px 30px rgba(15,29,61,.06);

  box-sizing: border-box; font: 15px/1.55 var(--body); color: var(--ink); text-align: left; }
.tm-side *, .tm-side *::before, .tm-side *::after { box-sizing: border-box; }
.tm-side a { text-decoration: none; }
.tm-side button { font: inherit; }
.tm-side svg { flex: none; }
body.tm-has-side { padding-left: var(--tm-side-w, 224px); }
.tm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 12px; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
.tm-side .logo { display: block; padding: 2px 8px; }
.tm-side .logo img { height: 28px; display: block; }
.tm-side .ws { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); text-align: left; cursor: default; }
.tm-side .ws .ava { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; }
.tm-side .ws b { display: block; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-side .ws small { display: block; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.tm-side .ws select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tm-side .ws-wrap { position: relative; }
.tm-side .nav { display: grid; gap: 2px; }
.tm-side .nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.tm-side .nav a svg { width: 17px; height: 17px; }
.tm-side .nav a:hover { background: var(--soft); color: var(--ink); }
.tm-side .nav a.on { background: var(--blue-soft); color: var(--blue); }
.tm-side .nav a .live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(224,49,59,.15); }
.tm-side .bottom { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tm-side .credit-box { padding: 12px; border-radius: 14px; background: linear-gradient(180deg, #f3f7ff, #e8efff); border: 1px solid #d6e2fb; color: var(--ink); }
.tm-side .credit-box small { display: block; font-size: 12px; color: var(--muted); }
.tm-side .credit-box b { display: block; font-size: 19px; font-weight: 800; margin: 2px 0 8px; }
.tm-side .credit-box b span { font-size: 13px; font-weight: 600; color: var(--muted); }
.tm-side .credit-box .meter { height: 6px; border-radius: 999px; background: #fff; overflow: hidden; margin-bottom: 10px; }
.tm-side .credit-box .meter i { display: block; height: 100%; background: linear-gradient(90deg, #4f8bff, #9fbcff); border-radius: inherit; }
.tm-side .credit-box.low .meter i { background: linear-gradient(90deg, #ff6b74, #e0313b); }
.tm-side .credit-box a { color: var(--blue); font-weight: 700; font-size: 13px; }
.tm-side .me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.tm-side .me .ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.tm-side .me div { min-width: 0; flex: 1; }
.tm-side .me b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-side .me small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-side .me button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.tm-side .me button:hover { background: var(--soft); color: var(--ink); }
.tm-side { position: fixed; left: 0; top: 0; width: 224px; z-index: 30; view-transition-name: tm-side; }
/* ruang sidebar disiapkan sejak awal (cache sesi ada) supaya halaman tidak bergeser saat sidebar muncul */
html.tm-pre-side body:not(.tm-has-side) { padding-left: 224px; }
html.tm-pre-side body:not(.tm-has-side)::before { content: ''; position: fixed; left: 0; top: 0; bottom: 0; width: 224px; background: #fff; border-right: 1px solid #e3e9f5; view-transition-name: tm-side; }
@media (max-width: 860px) { html.tm-pre-side body:not(.tm-has-side) { padding-left: 0; } html.tm-pre-side body:not(.tm-has-side)::before { display: none; } }
::view-transition-group(tm-side), ::view-transition-old(tm-side), ::view-transition-new(tm-side) { animation: none; }
.tm-menu { display: none; position: fixed; z-index: 29; top: 14px; left: 14px; border: 1px solid #e3e9f5; background: #fff; border-radius: 10px; padding: 8px; cursor: pointer; color: #0f1d3d; box-shadow: 0 6px 20px rgba(15,29,61,.12); }
.tm-scrim { display: none; }
@media (max-width: 860px) {
  body.tm-has-side { padding-left: 0; }
  .tm-side { width: 280px; transform: translateX(-102%); transition: transform .25s; box-shadow: 0 20px 60px rgba(11,21,48,.25); }
  .tm-side.open { transform: none; }
  .tm-scrim.open { display: block; position: fixed; inset: 0; z-index: 28; background: rgba(11,21,48,.35); }
  .tm-menu { display: inline-flex; }
}
body.tm-has-side .topbar .brand { visibility: hidden; }
@media (max-width: 860px) { body.tm-has-side .topbar { padding-left: 64px; } }

/* popover (dipakai sidebar di panel live) */
.pop {
  --ink: #0f1d3d; --muted: #56627f; --faint: #8a94ad; --line: #e3e9f5; --line-2: #eef2f9;
  --bg: #f4f7fd; --card: #ffffff; --soft: #f7f9fe;
  --blue: #1a5fe8; --blue-2: #134bc0; --blue-soft: #e8efff;
  --red: #e0313b; --crimson: #c8102e; --red-soft: #fde8ec;
  --green: #13803d; --green-soft: #e3f7ea; --amber: #a3620a; --amber-soft: #fff2d9;
  --navy: #0b1530;
  --grad: linear-gradient(135deg, #e0313b 0%, #b0122f 45%, #6d0a1f 100%);
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
  --r: 16px; --side: 224px;
  --shadow: 0 1px 2px rgba(15,29,61,.04), 0 10px 30px rgba(15,29,61,.06);

  font: 15px/1.55 var(--body); color: var(--ink); box-sizing: border-box; }
.pop * { box-sizing: border-box; }
@keyframes fade { from { opacity: 0; } }
.pop { position: fixed; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(15,29,61,.18); padding: 6px; display: grid; gap: 2px; max-height: 70vh; overflow-y: auto; animation: fade .12s; }
.pop.static { position: static; box-shadow: none; border: 0; padding: 0; }
.pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.pop-h { padding: 8px 10px 6px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pop-h b { display: block; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); } .pop-h small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pop-h.row { display: flex; justify-content: space-between; align-items: center; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; color: var(--ink); font: 600 14px var(--body); text-align: left; cursor: pointer; text-decoration: none !important; }
.pop-item:hover, .pop-item:focus-visible { background: var(--soft); outline: none; }
.pop-item > span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.pop-item small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: capitalize; }
.pop-item kbd, .search-btn kbd, .kbd-list kbd { font: 700 11px var(--body); color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; background: #fff; }
.pop-item svg:last-child { color: var(--blue); }
.pop-item.danger { color: var(--crimson); }
.ava.sm { width: 24px !important; height: 24px !important; border-radius: 7px !important; font-size: 12px !important; display: inline-grid !important; place-items: center; background: var(--grad); color: #fff; font-weight: 800; flex: none; }
button.ws, button.me { font: inherit; cursor: pointer; text-align: left; }
button.ws:hover { border-color: #c7d3ec; }
button.me { width: 100%; border: 0; background: none; color: var(--ink); }
button.me:hover { background: var(--soft); }
.tm-side button.ws, .tm-side button.me { font: inherit; cursor: pointer; text-align: left; }
.tm-side button.me { width: 100%; border: 0; background: none; color: var(--ink); }
.tm-side button.me:hover { background: var(--soft); }

/* modal untuk panel live (buat workspace, bantuan, pintasan) */
.modal {
  --ink: #0f1d3d; --muted: #56627f; --faint: #8a94ad; --line: #e3e9f5; --line-2: #eef2f9;
  --bg: #f4f7fd; --card: #ffffff; --soft: #f7f9fe;
  --blue: #1a5fe8; --blue-2: #134bc0; --blue-soft: #e8efff;
  --red: #e0313b; --crimson: #c8102e; --red-soft: #fde8ec;
  --green: #13803d; --green-soft: #e3f7ea; --amber: #a3620a; --amber-soft: #fff2d9;
  --navy: #0b1530;
  --grad: linear-gradient(135deg, #e0313b 0%, #b0122f 45%, #6d0a1f 100%);
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
  --r: 16px; --side: 224px;
  --shadow: 0 1px 2px rgba(15,29,61,.04), 0 10px 30px rgba(15,29,61,.06);

  font: 15px/1.55 var(--body); color: var(--ink); }
.modal * { box-sizing: border-box; }
.modal .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent; font: 700 14px var(--body); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.modal .btn:active { transform: translateY(1px); }
.modal .btn svg { width: 17px; height: 17px; }
.modal .btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(26,95,232,.22); }
.modal .btn-primary:hover { background: var(--blue-2); }
.modal .btn-live { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(200,16,46,.28); }
.modal .btn-live:hover { filter: brightness(1.06); }
.modal .btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.modal .btn-ghost:hover { border-color: #c7d3ec; background: var(--soft); }
.modal .btn-danger { background: var(--card); color: var(--crimson); border-color: #f3c8cf; }
.modal .btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.modal .btn-lg { padding: 14px 22px; font-size: 15.5px; border-radius: 13px; }
.modal .btn:disabled { opacity: .55; cursor: default; }
.modal .field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; }
.modal .field small { font-weight: 500; color: var(--muted); }
.modal .input, select.input, textarea.input { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 500 15px var(--body); outline: none; transition: border-color .15s, box-shadow .15s; }
.modal .input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26,95,232,.12); }
textarea.input { min-height: 90px; resize: vertical; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(11,21,48,.45); backdrop-filter: blur(3px); animation: fade .15s; }
.modal .box { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(11,21,48,.3); padding: 24px; display: grid; gap: 16px; }
.modal .box h2 { font-size: 20px; font-weight: 800; }
.modal .box .lead { margin: -8px 0 0; color: var(--muted); }
.modal .x { justify-self: end; margin: -8px -8px -28px 0; border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
@keyframes fade { from { opacity: 0; } }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice label { position: relative; display: grid; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice label:hover { border-color: #c7d3ec; }
.choice input { position: absolute; opacity: 0; }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice b { font-size: 15px; } .choice small { color: var(--muted); font-size: 13px; }
.choice i { font-style: normal; font-size: 12px; font-weight: 800; color: var(--blue); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 16px 40px rgba(11,21,48,.3); animation: fade .2s; }

