/* =====================================================================
   NeoTalk Dispatcher — lapisan desain (dimuat terakhir).
   Palet merek: navy #0F172A · oranye #FF5500 · putih #F4F4F1; semua warna lain = campurannya.
   Warna status (merah SOS, hijau online, kuning peringatan) tetap.
   ===================================================================== */
:root {
  --bg: #E7E8E7;          /* navy 6% di atas putih: latar aplikasi */
  --panel: #F4F4F1;       /* kartu / panel */
  --surface: #EBECEA;     /* isian di dalam panel */
  --surface-2: #E1E3E2;
  --line: #D6D8D8;
  --line-soft: rgba(15, 23, 42, .07);
  --text: #0F172A;
  --muted: #5E6470;
  --navy-2: #1B2438;      /* navy 90% */
  --navy-3: #2A3347;
  --accent-soft: rgba(255, 85, 0, .10);
  --accent-ring: rgba(255, 85, 0, .28);
  --radius: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow-2: 0 2px 4px rgba(15, 23, 42, .05), 0 10px 28px rgba(15, 23, 42, .07);
  --shadow-3: 0 18px 50px rgba(15, 23, 42, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body { font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-ring); }
* { scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, .22) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, .18); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- tombol ---------- */
.btn-primary { border-radius: 10px; padding: 10px 16px; font-weight: 700; letter-spacing: .01em;
  background: linear-gradient(180deg, #FF6A1F, #FF5500); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 14px rgba(255, 85, 0, .28);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .12s; }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 18px rgba(255, 85, 0, .36); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { border-radius: 10px; padding: 7px 12px; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  transition: border-color .12s, background .12s; }
.btn-ghost:hover { border-color: rgba(15, 23, 42, .28); background: #F7F7F5; }
.btn-sm { border-radius: 8px; padding: 6px 11px; font-weight: 700; transition: filter .12s, border-color .12s, background .12s; }
.btn-sm:hover:not(:disabled) { filter: brightness(1.12); }
.btn-sm.ghost { background: var(--panel); }
.btn-sm.ghost:hover { border-color: var(--accent); filter: none; }
.btn-sm.danger:hover { background: rgba(220, 38, 38, .08); filter: none; }

/* tombol/isian tanpa kelas khusus di halaman kelola */
button.ghost:not(.btn-sm) { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 600; }
button.ghost:not(.btn-sm):hover { border-color: var(--accent); }
.mpane .row > input:not([type]), .mpane .row > input[type=text], .mpane .row > input[type=search] { flex: 1; min-width: 200px; max-width: 420px; padding: 9px 12px; margin-bottom: 12px; font: inherit; color: var(--text); }
.top-actions .btn-ghost, .view-btn, #conn { white-space: nowrap; }

/* ---------- input ---------- */
.search, select, .dlg input, .dlg textarea, .card input, .msg-form textarea, .login-card input, .mpane input, .mpane textarea {
  background: #F8F8F6; border: 1px solid var(--line); border-radius: 10px; transition: border-color .12s, box-shadow .12s; }
.search:hover, select:hover, .mpane input:hover { border-color: rgba(15, 23, 42, .25); }

/* ---------- login ---------- */
.login { background:
  radial-gradient(900px 500px at 85% -10%, rgba(255, 85, 0, .22), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, rgba(255, 85, 0, .10), transparent 60%),
  linear-gradient(160deg, #0F172A 0%, #1B2438 55%, #2A3347 100%); padding: 20px; overflow: auto; }
.login-card { width: min(400px, 100%); border: 0; border-radius: 20px; padding: 32px 30px; gap: 14px; box-shadow: var(--shadow-3); }
.login-card .brand { font-size: 20px; gap: 12px; }
.login-card .brand-icon { width: 40px; height: 40px; }
.login-card > .muted:first-of-type { margin: -4px 0 6px; }
.login-card label { font-weight: 600; font-size: 13px; color: var(--text); }
.login-card input { padding: 11px 13px; }
.login-card .btn-primary { padding: 12px; font-size: 15px; }
.login-card .btn-ghost { padding: 11px; font-weight: 600; }

/* ---------- bilah atas ---------- */
.topbar { background: linear-gradient(180deg, #0F172A, #141D31); color: #F4F4F1; border-bottom: 0; padding: 10px 18px; gap: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 4px 18px rgba(15, 23, 42, .18); position: relative; z-index: 1600; }
.topbar .brand { color: #F4F4F1; letter-spacing: .01em; }
.topbar .brand-icon { width: 32px; height: 32px; }
.topbar .org-label { color: rgba(244, 244, 241, .62); font-weight: 600; margin-left: 8px; padding-left: 10px; border-left: 1px solid rgba(244, 244, 241, .18); }
.views { background: rgba(244, 244, 241, .06); border: 1px solid rgba(244, 244, 241, .10); border-radius: 12px; padding: 3px; }
.view-btn { color: rgba(244, 244, 241, .70); border-radius: 9px; padding: 7px 16px; transition: background .15s, color .15s; }
.view-btn:hover { color: #F4F4F1; background: rgba(244, 244, 241, .06); }
.view-btn.active { background: #F4F4F1; color: #0F172A; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.view-btn .badge { vertical-align: 1px; }
.topbar .pill { border: 1px solid transparent; }
.topbar .pill-ok { background: rgba(22, 163, 74, .18); color: #4ADE80; border-color: rgba(74, 222, 128, .25); }
.topbar .pill-wait { background: rgba(255, 85, 0, .16); color: #FF8A4C; border-color: rgba(255, 138, 76, .25); }
.topbar .pill-off { background: rgba(244, 244, 241, .08); color: rgba(244, 244, 241, .6); }
.topbar .pill::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.topbar .pill-ok::before { box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
.top-actions .btn-ghost { background: transparent; color: rgba(244, 244, 241, .82); border-color: rgba(244, 244, 241, .14); }
.top-actions .btn-ghost:hover { color: #F4F4F1; background: rgba(244, 244, 241, .07); border-color: rgba(244, 244, 241, .3); }
#meBtn, .top-actions #meBtn { color: #F4F4F1; }
.top-actions .role { background: rgba(255, 85, 0, .2); color: #FFB089; }
.menu-btn { color: #F4F4F1 !important; background: transparent !important; border-color: rgba(244, 244, 241, .18) !important; }

/* ---------- panel umum ---------- */
.grid { gap: 14px; padding: 14px; }
.panel { border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 16px; }
.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.panel h2::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }
.mt { margin-top: 22px !important; }

/* channel */
.channel-list { gap: 4px; }
.channel { background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; transition: background .12s, border-color .12s; position: relative; }
.channel:hover { background: var(--surface); border-color: transparent; }
.channel.current { background: var(--panel); border-color: rgba(255, 85, 0, .45); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-1); }
.channel.current::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.channel .count { background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.channel.current .count { background: var(--accent-soft); color: #C84300; }
.live { background: #C4C7C9; }
.channel.talking .live { animation: livepulse 1.2s var(--ease) infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(255, 85, 0, .45); } 100% { box-shadow: 0 0 0 9px rgba(255, 85, 0, 0); } }

/* anggota */
.members { gap: 2px; }
.member { background: transparent; border-radius: 10px; padding: 7px 8px; transition: background .12s; }
.member:hover { background: var(--surface); }
.member .avatar { background: linear-gradient(160deg, #2A3347, #0F172A); color: #F4F4F1; font-size: 12px; letter-spacing: .02em; box-shadow: 0 2px 6px rgba(15, 23, 42, .18); }
.member.me .avatar { background: linear-gradient(160deg, #FF7A33, #FF5500); }
.member.talking { background: var(--accent-soft); border-color: rgba(255, 85, 0, .45); }
.member.talking .avatar { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.member .who b { font-weight: 700; font-size: 13.5px; }
.quick { margin-bottom: 18px; }
.quick .btn-primary { border-radius: 12px; }
.hint { line-height: 1.5; background: var(--surface); border-radius: 10px; padding: 10px 12px; }

/* tengah */
.center { gap: 12px; }
.now { border-radius: 14px; padding: 12px 16px; font-size: 16px; box-shadow: var(--shadow-1); transition: background .2s, color .2s; }
.now.idle { background: var(--panel); border: 1px solid var(--line-soft); color: var(--muted); font-weight: 600; }
.now.idle .now-dot { background: #16A34A; box-shadow: 0 0 0 4px rgba(22, 163, 74, .15); }
.now.rx, .now.tx { background: linear-gradient(100deg, #FF5500, #FF7A33); box-shadow: 0 6px 22px rgba(255, 85, 0, .32); }
.now.rx .now-dot, .now.tx .now-dot { animation: livepulse-w 1s infinite; }
@keyframes livepulse-w { 0% { box-shadow: 0 0 0 0 rgba(244, 244, 241, .7); } 100% { box-shadow: 0 0 0 10px rgba(244, 244, 241, 0); } }
.map-wrap { border-radius: var(--r-lg); border: 1px solid var(--line-soft); box-shadow: var(--shadow-2); }
.map-tools button { background: rgba(244, 244, 241, .96); border: 1px solid var(--line-soft); border-radius: 10px; padding: 7px 11px;
  box-shadow: var(--shadow-2); backdrop-filter: blur(6px); }
.map-tools button:hover, .map-tools button.on { border-color: var(--accent); color: #C84300; }
.legend { background: rgba(244, 244, 241, .94); border: 1px solid var(--line-soft); border-radius: 10px; box-shadow: var(--shadow-1); backdrop-filter: blur(6px); }
.leaflet-control-zoom a { color: var(--text) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-2) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-3); }

/* PTT */
.ptt-wrap { gap: 12px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-2); }
.ptt { border-radius: 14px; height: 80px;
  background: linear-gradient(180deg, #232D44 0%, #0F172A 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .10) inset, 0 -2px 0 rgba(0, 0, 0, .25) inset, 0 6px 16px rgba(15, 23, 42, .25);
  transition: transform .08s var(--ease), background .1s, box-shadow .1s; }
.ptt:hover:not(:disabled) { filter: brightness(1.08); }
.ptt:active, .ptt.active { transform: translateY(1px) scale(.995); }
.ptt.active { background: linear-gradient(180deg, #FF6A1F, #FF5500);
  box-shadow: 0 0 0 4px var(--accent-ring), 0 10px 28px rgba(255, 85, 0, .45); }
.ptt:disabled { background: #B9BCC0; box-shadow: none; }
.ptt-main { letter-spacing: .06em; }
.ptt-sub { opacity: .72; }
.ptt-all { background: linear-gradient(180deg, #3A4358, #2A3347); }
.ptt-private { background: linear-gradient(180deg, #D24B0E, #BC440C); }
.vol { padding: 0 6px; font-weight: 600; }

/* panel kanan: tab bergaya segmen — label penuh, membungkus ke baris kedua bila sempit (tidak terpotong "…") */
.tabs { border-bottom: 0; background: var(--surface); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 12px; }
.right .tabs { flex-wrap: wrap; overflow: visible; }
.right .tab { flex: 1 1 auto; min-width: max-content; overflow: visible; text-overflow: clip; padding: 7px 8px !important; font-size: 12.5px !important; }
.tab { border-radius: 9px; border-bottom: 0; margin-bottom: 0; padding: 7px 6px; transition: background .12s, color .12s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-1); }
.badge { background: var(--accent); font-weight: 700; line-height: 17px; min-width: 17px; text-align: center; display: inline-block; }
.badge.red { background: var(--sos); }
.feed { gap: 0; }
.feed li { border-bottom: 1px solid var(--line-soft); padding: 9px 4px; grid-template-columns: 48px 1fr; line-height: 1.4; }
.feed li:last-child { border-bottom: 0; }
.feed time { font-size: 12px; padding-top: 1px; }
.rec, .dev, .bc-item { background: var(--surface); border-radius: 10px; transition: background .12s, outline-color .12s; }
.rec:hover { background: var(--surface-2); outline: 0; }
.rec.playing { outline: 2px solid var(--accent); }
.msg { border-radius: 12px 12px 12px 4px; box-shadow: var(--shadow-1); }
.msg.mine { border-radius: 12px 12px 4px 12px; background: rgba(255, 85, 0, .16); }
.msg-form { border-top-color: var(--line-soft); }
.sos-item { border-radius: 12px; box-shadow: var(--shadow-1); }

/* SOS */
.sos-bar { box-shadow: 0 6px 22px rgba(220, 38, 38, .35); }
.btn-sos, .btn-sos-ghost { border-radius: 10px; }

/* ---------- laporan & kelola ---------- */
.report:not([hidden]) { padding: 14px; }
.manage:not([hidden]) { grid-template-columns: 232px minmax(0, 1fr); gap: 14px; padding: 14px; }
.mtabs { border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 10px; gap: 2px; position: sticky; top: 0; }
.mgroup { font-weight: 700; opacity: 1; color: #8A8F97; font-size: 10.5px; letter-spacing: .12em; padding: 14px 12px 4px; }
.mtab { position: relative; border-radius: 10px; padding: 9px 12px; color: var(--muted); transition: background .12s, color .12s; display: flex; align-items: center; gap: 6px; }
.mtab:hover { background: var(--surface); color: var(--text); }
.mtab.active { background: var(--accent-soft); color: #C84300; }
.mtab.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.mtab .badge { margin-left: auto; }
.mpane { border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 24px 26px; }
.mhead { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.mhead h1 { font-size: 24px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mhead p { line-height: 1.55; }
.role { background: var(--surface); color: var(--muted); font-weight: 700; border-radius: 6px; padding: 3px 7px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-1); }
.card h2 { margin-top: 0; font-size: 16px; }
.stats { gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .8; }
.stat b { font-size: 24px; font-family: "Outfit", sans-serif; letter-spacing: -.01em; }
.sub-h { font-size: 17px; margin-top: 32px; }

/* tabel */
.table { border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { background: var(--surface); color: var(--muted); font-size: 11px; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.table th:first-child { border-top-left-radius: 10px; }
.table th:last-child { border-top-right-radius: 10px; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover td { background: rgba(15, 23, 42, .025); }
.table tbody tr:last-child td { border-bottom: 0; }
.st { padding: 3px 9px; font-size: 11.5px; letter-spacing: .01em; }
.code { background: var(--surface); border: 1px solid var(--line-soft); }

/* dialog & toast */
.dlg { border: 0; border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden auto; max-height: calc(100dvh - 32px); overscroll-behavior: contain; }
.dlg::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.dlg-head { padding: 20px 22px 8px; }
.dlg-head h2 { font-size: 19px; }
.dlg .x { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.dlg .x:hover { background: var(--surface); color: var(--text); }
.dd-section { border-top-color: var(--line-soft); }
.toast { border-radius: 12px; padding: 11px 18px; box-shadow: var(--shadow-3); }
.gate-card { border: 0; border-radius: 16px; box-shadow: var(--shadow-3); }

/* animasi lembut saat ganti tampilan */
.mpane:not([hidden]), .tabpane:not([hidden]) { animation: fadein .18s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (min-width: 1281px) { .grid { grid-template-columns: 280px minmax(0, 1fr) 340px; } }
/* ---------- layar lebar ---------- */
@media (min-width: 1600px) {
  .grid { grid-template-columns: 300px minmax(0, 1fr) 360px; gap: 16px; padding: 16px; }
}

/* ---------- laptop kecil ---------- */
@media (max-width: 1280px) {
  .grid { gap: 12px; padding: 12px; }
  .channel .spk { display: none; } /* penutur sudah tampil di bilah "sedang bicara" */
  .top-actions { gap: 6px; }
  .top-actions .btn-ghost { padding: 6px 9px; font-size: 13px; }
  .topbar .org-label { max-width: 130px; }
  .topbar .brand { white-space: nowrap; }
  .top-actions .role { display: none; }
  .topbar { gap: 10px; }
  .mpane { padding: 20px; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .topbar { padding: 8px 12px; gap: 10px; }
  .topbar .org-label { display: none; }
  .topbar .brand { white-space: nowrap; font-size: 15px; }
  .view-btn { padding: 6px 11px; }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .top-actions .btn-ghost { padding: 5px 8px; font-size: 12px; }
  .top-actions .role { display: none; }
  .view-btn { padding: 6px 9px; font-size: 13px; }
  .manage:not([hidden]) { grid-template-columns: 200px minmax(0, 1fr); }
  .mpane { padding: 18px; }
  /* tabel lebar bisa digeser ke samping, tidak memecah tata letak */
  .mpane .table, .report .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .ptt { height: 70px; }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .grid { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(200px, 36vh); }
}

/* ---------- HP ---------- */
@media (max-width: 820px) {
  body { font-size: 15px; }
  .topbar { padding: 8px 10px; }
  .topbar .brand { font-size: 15px; }
  .topbar .brand-icon { width: 28px; height: 28px; }
  .top-actions { background: #141D31; border: 1px solid rgba(244, 244, 241, .1); border-radius: 14px; box-shadow: var(--shadow-3); padding: 8px; }
  .top-actions .btn-ghost { border: 0; border-radius: 10px; padding: 12px; }
  .grid { gap: 8px; padding: 8px; }
  .panel { border-radius: 14px; padding: 12px; }
  .ptt-wrap { padding: 8px; gap: 8px; border-radius: 14px; }
  .ptt { height: 96px; border-radius: 16px; }
  .ptt-main { font-size: 19px; }
  .ptt-all, .ptt-private { height: 58px; border-radius: 12px; }
  .now { font-size: 14.5px; padding: 10px 12px; border-radius: 12px; }
  .channel { padding: 12px; }
  .member { padding: 9px 8px; }
  .manage:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  .mtabs { position: sticky; top: 0; border-radius: 14px; padding: 5px; box-shadow: var(--shadow-1); }
  .mtab { padding: 9px 13px; }
  .mtab.active::before { display: none; }
  .mpane { padding: 16px 14px; border-radius: 14px; }
  .mhead h1 { font-size: 20px; }
  .card { padding: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat b { font-size: 20px; }
  .btn-sm { padding: 8px 12px; min-height: 36px; }
  .dlg { border-radius: 18px 18px 0 0; margin: auto auto 0; width: 100vw; max-width: 100vw; max-height: 94vh; }
  .mnav { background: rgba(244, 244, 241, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line-soft); box-shadow: 0 -6px 20px rgba(15, 23, 42, .08); }
  .mnav button.active { color: #C84300; background: var(--accent-soft); }
  .login-card { padding: 26px 20px; border-radius: 18px; }
}

/* Login: logo di tengah, nama di bawahnya, keterangan di tengah */
.login-card .brand { flex-direction: column; justify-content: center; text-align: center; gap: 10px; font-size: 22px; }
.login-card .brand-icon { width: 64px; height: 64px; }
.login-card > .muted:first-of-type { text-align: center; margin: -2px 0 8px; }
.login-card .small-line { text-align: center; margin: 0; }
.login-card .home-link { justify-self: center; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 8px; }
.login-card .home-link:hover { color: var(--accent); background: var(--accent-soft); }

/* kredit pengembang */
.login-card .dev-credit { text-align: center; margin: 2px 0 0; font-size: 11px; letter-spacing: .04em; color: var(--muted); opacity: .8; }
.login-card .dev-credit b { color: var(--text); font-weight: 700; }

/* Detail perangkat: dialog bisa digulir, judul tetap di atas, isian penuh lebar */
#devDlg { width: min(640px, 96vw); }
#devDlg .dlg-head { position: sticky; top: 0; z-index: 2; background: var(--panel); padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
#devDlg .dlg-head > div { min-width: 0; }
#devDlg #ddName { overflow-wrap: anywhere; }
#devDlg #ddSub { overflow-wrap: anywhere; font-size: 13px; }
#devDlg .dd-info { grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); padding: 14px 22px; }
#devDlg .dd-info > * { min-width: 0; overflow-wrap: anywhere; }
#devDlg .dd-actions { flex-wrap: wrap; padding: 0 22px 14px; }
#devDlg .dd-actions .btn-ghost { flex: 1 1 130px; }
#devDlg .dd-section { padding: 16px 22px; }
#devDlg .dd-section > label > input, #devDlg .dd-section > label > select { width: 100%; }
#devDlg .dd-section .row { flex-wrap: wrap; }
#devDlg .dd-section .row > select, #devDlg .dd-section .row > input { flex: 1 1 180px; min-width: 0; }
#devDlg .ch-checks { max-height: 220px; background: var(--surface); border-radius: 10px; padding: 8px 10px; }
#devDlg .hint { margin: 0; }
#devDlg .danger-zone { gap: 8px; }
#devDlg .error:empty { display: none; }
@media (max-width: 820px) {
  #devDlg { width: 100vw; max-width: 100vw; max-height: 94dvh; }
  #devDlg .dd-info { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  #devDlg .dd-info .k { margin-top: 8px; }
  #devDlg .dd-section, #devDlg .dd-info, #devDlg .dd-actions { padding-left: 16px; padding-right: 16px; }
}

/* Detail perangkat di desktop: hampir selebar halaman, isi dua kolom agar mudah dinavigasi */
@media (min-width: 1100px) {
  #devDlg { width: calc(100vw - 64px); max-width: 1500px; max-height: calc(100dvh - 48px); }
  #devDlg[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; column-gap: 0; }
  #devDlg .dlg-head, #devDlg #ddError { grid-column: 1 / -1; }
  #devDlg #ddInfo { grid-column: 1; }
  #devDlg .dd-actions { grid-column: 1; align-self: start; }
  #devDlg .dd-section { border-left: 1px solid var(--line-soft); }
  #devDlg #ddInfo + .dd-actions + .dd-section { grid-column: 2; grid-row: 2 / span 2; border-top: 0; }
  #devDlg #ddBridge { grid-column: 1 / -1; }
  #devDlg #ddBridge .br-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1500px) { #devDlg #ddBridge .br-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#devDlg .dd-section { align-content: start; }
#devDlg label.check { display: flex !important; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; }
#devDlg label.check input { width: auto !important; flex: none; margin: 0; }
