/* ===== TELEBUILD fix3.css (dimuat paling akhir) =====
   1. margin samping seragam 16px (sama dengan Pengaturan TELEBUILD: #app 12px + main 4px), jarak antar kartu rapi
   2. kartu SIMETRIS: tidak ada bayangan keras ke kanan-bawah (penyebab kartu/chat terlihat miring di tema gelap)
   3. ketuk baris/kartu: tanpa efek mengecil, diganti sorotan warna halus
   4. toolbar tampil di semua tab, ikon cari/menu di dalam toolbar
   5. Arsip: margin atas & samping dikurangi
   6. Profil: banner penuh lebar (menempel kiri-kanan-atas), tanpa tombol Edit Profil
   7. dialog, sheet & popup: datar (tidak neo-brutalism)
   8. posisi ikon & teks di kartu chat/grup/saluran dipusatkan presisi */

:root{--tbx:16px}

/* ---------- 1. margin seragam ---------- */
.tb-scr{padding-left:var(--tbx)!important;padding-right:var(--tbx)!important;padding-top:12px}
.tb-scr.tb-prof{padding-top:0!important}
.tb-upg{padding-top:12px}
.tb-list,.tb-arv .tb-list{gap:10px}
.tb-sec{margin:18px 8px 8px!important;letter-spacing:.22em}
.tb-stories,.tb-chips{margin-left:calc(var(--tbx) * -1);margin-right:calc(var(--tbx) * -1);padding-left:var(--tbx)!important;padding-right:var(--tbx)!important}
.tb-strow{margin-left:calc(var(--tbx) * -1)!important;margin-right:calc(var(--tbx) * -1)!important;padding-left:var(--tbx)!important;padding-right:var(--tbx)!important}
.tb-upg .tb-h2,.tb-upg .tb-h3{margin-left:0;margin-right:0}
.tb-upg .tb-h2row{margin-top:20px;margin-bottom:6px}
.tb-sr{margin-bottom:12px!important}
.tb-mq{margin-bottom:12px}
.tb-fab{right:var(--tbx)}
.gp.chat .ch-list,.ch-list{padding-left:12px!important;padding-right:12px!important}

/* ---------- 2. kartu simetris (tanpa bayangan miring) ---------- */
.tb-row,.tb-pi,.tb-card,.tb-fv,.tb-info,.tb-post,.tb-ic,.tb-pcard,.tb-3 button,.tb-wide,.tb-sm3 button,.tb-rt,.tb-bt,.tb-scard,.tb-chips button,.tb-chip2,.tb-ibtn,.tb-mq,.tb-clk,.tb-sr,.tb-tg i,.tb-micbtn,.tb-sendfab,.tb-chav .gl-av,.tb-fa button,.tb-rxbar,.tb-pop{box-shadow:none!important}
.tb-row,.tb-pi,.tb-card,.tb-fv,.tb-info,.tb-post,.tb-ic,.tb-3 button,.tb-wide,.tb-sm3 button,.tb-rt,.tb-bt,.tb-scard,.tb-mq{border-width:2px!important}
.tb-row{border-radius:18px;padding:10px 12px}
.tb-pi{border-radius:18px;margin-bottom:10px;padding:13px 14px}
.tb-card,.tb-fv,.tb-post,.tb-info,.tb-ic{border-radius:20px}
.tb-clk{border-width:2px}
.gp.chat .ch-m,.ch-m{box-shadow:none!important;border:0!important}
.gp.chat .ch-m.pe{background:var(--card2,var(--card,#fff))}
.tb-gmsg{border:0!important}

/* ---------- 3. ketuk: tanpa mengecil ---------- */
html body .tb-row:active,html body .tb-pi:active,html body .tb-scard:active,html body .tb-crow:active,html body .tb-story:active,html body .tb-rt:active,html body .tb-bt:active,html body .tb-3 button:active,html body .tb-sm3 button:active{transform:none!important;translate:none!important;scale:1!important;box-shadow:none!important}
html body .tb-row:active,html body .tb-pi:active,html body .tb-scard:active{background-image:linear-gradient(rgba(127,127,127,.2),rgba(127,127,127,.2))!important}
html body .tb-row.picked{outline:2px solid var(--tbc)}
html body .tb-nav button:active,html body .tb-chips button:active,html body .tb-fab:active{transform:none!important;translate:none!important}

/* ---------- 4. toolbar semua tab ---------- */
.tbm.tb-noh .tb-h{display:flex}
.tb-h{padding-bottom:12px}
.tb-hx{display:inline-flex;align-items:center;margin-left:0}
.tb-h .tb-uhb{display:flex;align-items:center;gap:0}
html body .tb-h .tb-uhb button{width:40px;height:40px;color:inherit!important;background:transparent!important}
html body .tb-h .tb-uhb button:active{background:rgba(0,0,0,.14)!important}
.tb-h>b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tb-hx:not(:empty)+*{margin-left:0}

/* ---------- 5. Arsip: lebih rapat ---------- */
.tb-arv .gp-body{padding:6px 4px calc(env(safe-area-inset-bottom) + 16px)!important;gap:0}
.tb-arv .tb-pad{padding:0 8px 12px!important}
.tb-arv .tb-list{gap:6px}
.tb-arv .tb-row{padding:7px 10px;border-radius:16px}
.tb-arv .tb-row .gl-av{width:44px;height:44px}
.tb-arv .tb-note{margin:8px 6px 0}

/* ---------- 6. Profil: banner penuh ---------- */
.tb-prof .tb-pcard{margin:0 calc(var(--tbx) * -1) 14px!important;padding:0 var(--tbx) 16px!important;border:0!important;border-bottom:2px solid var(--bd,#111)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:hidden}
.tb-prof .tb-pbn{width:calc(100% + var(--tbx) * 2)!important;height:156px;margin:0 calc(var(--tbx) * -1) -56px!important;background:var(--card2,rgba(127,127,127,.2))}
.tb-prof .tb-pbn img,.tb-prof .tb-pbn video{object-fit:cover}
.tb-prof .tb-pbn .tb-pbc{top:12px;right:var(--tbx)}
.tb-prof .tb-pnm{margin-top:2px}
.tb-prof .tb-pnm button{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;line-height:0;opacity:.85}
.tb-prof .tb-pnm button:active{background:rgba(127,127,127,.22)}
.tb-prof .tb-bio{margin:8px 8px 0;font-size:14px;line-height:1.5;opacity:.8;white-space:pre-wrap}
.tb-prof .tb-vst{margin-top:14px}

/* sheet Ubah profil: datar seperti Edit Profil di TELEBUILD */
.tb-sheet .tb-sh3{font-size:18px;letter-spacing:.04em;margin:2px 0 14px}
.tb-sheet .tb-eb{border-bottom:0;border-radius:16px;margin:0;background:rgba(127,127,127,.16);height:118px}
.tb-sheet .tb-eav{margin:-44px auto 16px}
.tb-sheet .tb-lbl{font-size:12px;letter-spacing:.14em;text-transform:uppercase;opacity:.7;margin-top:10px}
.tb-sheet .tb-lbl input,.tb-sheet .tb-lbl textarea{border:0!important;border-radius:14px;background:rgba(127,127,127,.16)!important;padding:14px 16px;margin:6px 0 4px;text-transform:none;letter-spacing:0;opacity:1}
.tb-sheet .tb-lbl input:focus,.tb-sheet .tb-lbl textarea:focus{outline:2px solid var(--tbc,#ff4458)}
.tb-sheet .tb-ebs{height:50px;margin-top:14px}

/* ---------- 7. dialog / sheet / popup: datar ---------- */
html.tb-on .ui-dlg,html.tb-on .ui-sheet{border:0!important;border-radius:24px!important;box-shadow:0 16px 48px rgba(0,0,0,.38)!important}
html.tb-on .ui-sheet{border-radius:26px 26px 0 0!important;box-shadow:0 -10px 40px rgba(0,0,0,.3)!important}
html.tb-on .ui-b{border:0!important;border-radius:999px!important;box-shadow:none!important}
html.tb-on .ui-b:active{translate:none!important;filter:brightness(.92)}
html body .tb-mic{border:0!important;border-radius:14px}
html body .tb-pop{border:0!important;border-radius:16px;box-shadow:0 10px 32px rgba(0,0,0,.34)!important}
html body .tb-chips button{border:0!important}
html body .tb-opt i{border-width:2px}
.tb-grab{opacity:.5}

/* popup menu tekan-lama chat */
.tb-dlg.tb-pm{max-width:320px;padding:18px 8px 10px!important}
.tb-dlg.tb-pm h3{margin:0 12px 8px;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tb-pml{display:flex;flex-direction:column}
.tb-pmi{display:flex;align-items:center;gap:14px;width:100%;min-height:52px;padding:0 14px;border:0;border-radius:14px;background:transparent;color:inherit;font:inherit;font-size:16px;text-align:left}
.tb-pmi:active{background:rgba(127,127,127,.18)}
.tb-pmc{display:grid;place-items:center;width:26px;height:26px;flex:none;line-height:0;color:var(--tbc,#ff4458)}
.tb-pmc svg{display:block;margin:0}
.tb-pmi.danger{color:var(--tbc,#ff4458)}

/* ---------- 8. posisi presisi di kartu chat / grup / saluran ---------- */
.tb-row{align-items:center;gap:12px}
.tb-row .gl-av{flex:none;display:grid;place-items:center;line-height:0}
.tb-row .gl-av svg,.tb-crow .gl-av svg{display:block;margin:0;flex:none}
.tb-rb{display:flex;flex-direction:column;justify-content:center;gap:2px}
.tb-r1,.tb-r2{align-items:center;min-height:22px;line-height:1.25}
.tb-r1{gap:8px}
.tb-r2{margin-top:0;gap:6px}
.tb-r1 time{display:inline-flex;align-items:center;line-height:1}
.tb-nm{display:inline-flex;align-items:center;gap:6px;min-width:0;line-height:1.25}
.tb-nm>span:first-child{display:block;min-width:0}
.tb-ki,.tb-pn{display:inline-grid;place-items:center;flex:none;line-height:0;opacity:.6}
.tb-ki svg,.tb-pn svg{display:block;margin:0}
.tb-last{line-height:1.25}
.tb-un{display:inline-grid;place-items:center;line-height:1;min-width:22px;height:22px;padding:0 6px}
.tb-crow{gap:12px}
.tb-c1,.tb-c2{min-height:22px}
.tb-c1 .tb-tag{display:inline-grid;place-items:center}

/* avatar saluran di baris daftar: buang margin-atas milik halaman saluran (penyebab kartu channel lebih tinggi & avatar geser) */
.tb-row .tb-chav,.tb-crow .tb-chav,.tb-row .tb-grav{margin:0!important;display:grid;place-items:center}

/* ===== ring status bersegmen, titik aktif, mengetik ===== */
.tb-sring.sgm{border:0!important;outline:0!important;padding:6px;background:none}
.tb-sring.sgm::before,.tb-avw.hs::before{content:'';position:absolute;inset:0;border-radius:50%;background:var(--segbg);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3.5px),#000 calc(100% - 3px));mask:radial-gradient(farthest-side,transparent calc(100% - 3.5px),#000 calc(100% - 3px));pointer-events:none}
.tb-scard .tb-sring.sgm{padding:6px}
.tb-sring.sgm .gl-av{border-width:0}

.tb-avw{position:relative;flex:none;display:grid;place-items:center;width:52px;height:52px;border-radius:50%}
.tb-row .tb-avw>.gl-av{width:48px;height:48px}
.tb-row .tb-avw.hs>.gl-av{width:42px;height:42px;border-width:0;font-size:18px}
.tb-onl{position:absolute;right:0;bottom:0;z-index:2;width:15px;height:15px;border-radius:50%;background:#2fc45a;border:3px solid var(--card,#fff);box-sizing:border-box}
.ch-av{position:relative}
.ch-av.on::after{content:'';position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#2fc45a;border:2.5px solid var(--acc,#ffd83d);box-sizing:border-box}
html.dark .ch-av.on::after{border-color:#000}
.ch-id.onl{color:#1f9d4a;opacity:1;font-weight:700;letter-spacing:.06em}
html.dark .ch-id.onl{color:#4be07f}
.ch-id.typ{opacity:1;font-weight:700;letter-spacing:.06em}

.tb-dots{display:inline-flex;align-items:center;gap:3px;margin-left:6px;vertical-align:middle}
.tb-dots i{display:block;width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.35;animation:tbDot 1.1s infinite ease-in-out}
.tb-dots i:nth-child(2){animation-delay:.18s}.tb-dots i:nth-child(3){animation-delay:.36s}
@keyframes tbDot{0%,70%,100%{opacity:.3;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
body.noanim .tb-dots i{animation:none;opacity:.7}
.tb-typ{color:var(--tbc,#ff4458)!important;opacity:1!important;font-weight:700}
.gp.chat .ch-m.typ{align-self:flex-start;width:auto;min-width:0;padding:13px 16px;margin-top:7px;animation:none!important}
.gp.chat .ch-m.typ .tb-dots{margin:0}
.gp.chat .ch-m.typ .tb-dots i{background:var(--mute,#888);opacity:.5}

/* judul toolbar tidak terpotong */
.tb-h{gap:6px;padding-left:16px;padding-right:12px}
.tb-h>b{font-size:19px;letter-spacing:.06em}
.tb-clk{padding:4px 9px;font-size:13px;gap:5px;border-radius:11px}
html body .tb-h .tb-uhb button{width:36px;height:36px}

html body .tb-shw .tb-sheet .tb-lbl input,html body .tb-shw .tb-sheet .tb-lbl textarea{border:0!important;box-shadow:none!important;background:rgba(127,127,127,.16)!important;border-radius:14px!important;padding:14px 16px!important;min-height:50px}
html body .tb-shw .tb-sheet .tb-lbl textarea{min-height:96px}
html body .tb-shw .tb-sheet .tb-lbl input:not(.a):not(.b):not(.c):not(.d):not(.e),html body .tb-shw .tb-sheet .tb-lbl textarea:not(.a):not(.b):not(.c):not(.d):not(.e){border:0!important;background:rgba(127,127,127,.16)!important}
