:root{
  --bg:#0b0b0f;
  --card:#11111a;
  --text:#f6f7fb;
  --muted:#b7b9c6;
  --red:#e11d48;
  --line:rgba(255,255,255,.08);
}

*{box-sizing:border-box}
html, body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: radial-gradient(900px 420px at 20% 0%, rgba(225,29,72,.20), transparent 55%),
              radial-gradient(900px 520px at 80% 20%, rgba(255,255,255,.06), transparent 50%),
              var(--bg);
  color:var(--text);
  min-height:100vh;

  /* ✅ lebih “app feel” */
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

a{color:inherit}

.wrap{
  max-width:980px;
  margin:0 auto;

  /* ✅ safe-area biar gak ketabrak notch/home-bar */
  padding: calc(24px + env(safe-area-inset-top))
           calc(24px + env(safe-area-inset-right))
           calc(24px + env(safe-area-inset-bottom))
           calc(24px + env(safe-area-inset-left));
}

.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:#fff}
.brand .title{font-weight:800;letter-spacing:.2px}
.brand .sub{color:var(--muted);font-size:12px;margin-top:2px}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}

.grid{display:grid;grid-template-columns:1fr;gap:14px}
@media(min-width:860px){.grid{grid-template-columns: 1.2fr .8fr}}

label{display:block;margin:10px 0 6px;color:var(--muted);font-size:13px}
input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
input:focus{border-color:rgba(225,29,72,.55);box-shadow:0 0 0 4px rgba(225,29,72,.16)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:10px;
  padding:12px 14px;border-radius:14px;
  border:1px solid rgba(225,29,72,.35);
  background: linear-gradient(180deg, rgba(225,29,72,.95), rgba(225,29,72,.75));
  color:#fff;font-weight:800;cursor:pointer;
}
.btn.secondary{
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:700;
}
.btn:disabled{opacity:.55;cursor:not-allowed}

/* ✅ kecil tapi kerasa: tombol lebih nyaman di mobile */
.btn, input{
  touch-action: manipulation;
}

.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.notice{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--muted);font-size:13px}
.error{border-color:rgba(225,29,72,.5);color:#ffd1dc;background:rgba(225,29,72,.12)}
.ok{border-color:rgba(34,197,94,.4);color:#caffdd;background:rgba(34,197,94,.10)}

.small{font-size:12px;color:var(--muted);line-height:1.45}
.hr{height:1px;background:var(--line);margin:14px 0}
.kbd{font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12px; padding:2px 8px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.06)}

/* ===== Rabitalk Header Fix (mobile-first, rapi & profesional) ===== */
.rt-topbar{
  align-items:flex-start;
  gap:14px;
}

.rt-brand{
  min-width: 0;               /* penting biar teks bisa ellipsis */
}

.rt-brand-text{
  min-width:0;
}

.rt-brand .title{
  font-size:16px;
  line-height:1.2;
}

.rt-brand .sub{
  font-size:12px;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp: 2;      /* maksimal 2 baris, biar gak nyeret */
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.rt-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

.icon-btn{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
  text-decoration:none;
  user-select:none;
}

.icon-btn:active{
  transform: translateY(1px);
}

/* Mobile layout: header jadi 2 baris yang rapi */
@media (max-width: 640px){
  .rt-topbar{
    flex-direction:column;
    align-items:stretch;
  }

  .rt-actions{
    width:100%;
    justify-content:flex-end;
  }

  .rt-actions .btn{
    flex: 1 1 auto;           /* tombol jadi “sebaris rapi” */
    min-width: 120px;
  }

  .rt-actions .icon-btn{
    flex: 0 0 auto;
    width:42px;
    height:42px;
  }
}

/* Desktop: biar brand dan tombol sejajar cantik */
@media (min-width: 641px){
  .rt-topbar{
    align-items:center;
  }
}

/* ===== Hamburger Menu ===== */
.rt-actions{
  position:relative;
  display:flex;
  gap:10px;
  align-items:center;
}

.rt-dropdown{
  position:absolute;
  top:56px;
  right:0;
  min-width:180px;
  background: rgba(18,18,26,.95);
  backdrop-filter: blur(14px);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:999;
}

.rt-dropdown a{
  padding:14px 16px;
  text-decoration:none;
  color:var(--text);
  font-weight:600;
  border-bottom:1px solid var(--line);
}

.rt-dropdown a:last-child{
  border-bottom:none;
}

.rt-dropdown a:hover{
  background:rgba(255,255,255,.05);
}

.rt-dropdown a.danger{
  color:#ffb4c4;
}

.rt-dropdown.show{
  display:flex;
}

/* Mobile spacing */
@media (max-width:640px){
  .rt-dropdown{
    right:0;
  }
}

/* ===== Header Professional (Rabitalk) ===== */
.rt-topbar{
  align-items:center;
  gap:12px;
}

.rt-brand{
  min-width:0;
}

.rt-brand-text{
  min-width:0;
}

.rt-brand .title{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 46vw;
}

.rt-brand .sub{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 52vw;
}

/* icon buttons */
.icon-btn{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active{
  transform: translateY(1px);
}
.icon-btn:focus{
  outline:none;
  border-color: rgba(225,29,72,.55);
  box-shadow: 0 0 0 4px rgba(225,29,72,.16);
}

/* actions + dropdown */
.rt-actions{
  position:relative;
  display:flex;
  gap:10px;
  align-items:center;
  flex-shrink:0;
}

.rt-dropdown{
  position:absolute;
  top:54px;
  right:0;
  min-width:200px;
  background: rgba(18,18,26,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: 0 20px 70px rgba(0,0,0,.65);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:999;
}

.rt-dropdown a{
  padding:14px 16px;
  text-decoration:none;
  color:var(--text);
  font-weight:700;
  border-bottom:1px solid var(--line);
}

.rt-dropdown a:last-child{
  border-bottom:none;
}

.rt-dropdown a:hover{
  background:rgba(255,255,255,.06);
}

.rt-dropdown a.danger{
  color:#ffb4c4;
}

.rt-dropdown.show{
  display:flex;
}

/* Mobile: biar judul gak tabrakan tombol */
@media (max-width:520px){
  .rt-brand .title{ max-width: 42vw; }
  .rt-brand .sub{   max-width: 46vw; }
}

/* ===== Header: 1-line title, sejajar ikon kanan ===== */
.rt-topbar{
  display:flex;
  align-items:center !important;
}

.rt-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.rt-brand-text{
  display:flex;
  align-items:center;
  min-width:0;
}

/* judul dibesarkan + tegas */
.rt-brand-title{
  font-size:22px;
  font-weight:900;
  letter-spacing:.2px;
  line-height:1;
  margin:0;
  white-space:nowrap;
}

/* pastikan area tombol kanan sejajar & tidak turun */
.rt-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* khusus mobile: paksa header tetap satu baris rapi */
@media (max-width: 640px){
  .rt-topbar{
    flex-direction:row !important;
    justify-content:space-between;
    align-items:center !important;
  }

  .rt-brand img{
    width:44px;
    height:44px;
  }

  .rt-brand-title{
    font-size:24px; /* biar “Rabitalk” berasa brand */
  }
}

/* ===== Home Header Pro: title selalu tampil & sejajar ===== */
.rt-topbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px;
}

.rt-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.rt-logo{
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  flex:0 0 auto;
}

.rt-brand-text{min-width:0}

.rt-brand-title{
  display:block !important;
  font-size:24px;
  font-weight:900;
  letter-spacing:.2px;
  line-height:1.05;
  margin:0;
  color:var(--text) !important;
  text-shadow:0 10px 40px rgba(0,0,0,.45);
  white-space:nowrap;
}

.rt-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.rt-iconbtn{
  width:44px;
  height:44px;
  padding:0;
  border-radius:14px;
  font-size:18px;
  font-weight:900;
}

/* Drawer */
.rt-drawer{position:fixed;inset:0;z-index:9999;display:none}
.rt-drawer.show{display:block}
.rt-drawer-bg{position:absolute;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(10px)}
.rt-drawer-box{
  position:absolute;right:14px;top:14px;
  width:min(320px,92vw);
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(15,15,20,.82);
  box-shadow:0 18px 70px rgba(0,0,0,.60);
  overflow:hidden;
}
.rt-drawer-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 12px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.04);
}
.rt-drawer-title{font-weight:900}
.rt-drawer-body{padding:12px;display:grid;gap:10px}

/* Mobile polish */
@media (max-width: 520px){
  .wrap{padding:18px}
  .rt-brand-title{font-size:26px}
  .rt-iconbtn{width:42px;height:42px}
}

/* ===== Topbar Professional ===== */
.rt-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.rt-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.rt-brand-text{min-width:0}
.rt-brand .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rt-brand .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ===== Hamburger Menu ===== */
.rt-actions{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.icon-btn{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
  user-select:none;
}

.rt-dropdown{
  position:absolute;
  top:54px;
  right:0;
  min-width:190px;
  background: rgba(18,18,26,.95);
  backdrop-filter: blur(14px);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:999;
}

.rt-dropdown a{
  padding:14px 16px;
  text-decoration:none;
  color:var(--text);
  font-weight:650;
  border-bottom:1px solid var(--line);
}

.rt-dropdown a:last-child{border-bottom:none}
.rt-dropdown a:hover{background:rgba(255,255,255,.05)}
.rt-dropdown a.danger{color:#ffb4c4}
.rt-dropdown.show{display:flex}

/* ===== Dropdown buttons (Room menu) ===== */
.rt-dropdown .rt-dd-btn{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  color:var(--text);
  padding:14px 14px;
  font-weight:650;
  border-bottom:1px solid var(--line);
  cursor:pointer;
  font-family:inherit;
}
.rt-dropdown .rt-dd-btn:hover{ background:rgba(255,255,255,.05); }
.rt-dropdown .rt-dd-btn.danger{ color:#ffb4c4; }
.rt-dropdown .rt-dd-btn:last-child{ border-bottom:none; }

/* opsional: sedikit rapikan dropdown khusus room */
.rt-room-dd{ min-width:240px; }

/* ===== TOP ACTIONS (Bagikan Undangan + Hamburger) ===== */
.top-actions,
.header-actions,
.call-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-pill,
.btn-primary,
.btn-ghost {
  border-radius: 16px;
}

/* Tombol “Bagikan Undangan” */
#shareInviteBtn,
.btn-share-invite {
  padding: 10px 16px;
  border-radius: 18px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
}

/* Tombol hamburger */
#menuBtn,
.btn-menu {
  width: 48px;
  height: 44px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  display: grid;
  place-items: center;
}

/* ===== DRAWER MENU: default hidden ===== */
#menuDropdown,
.menu-dropdown,
.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(20,20,26,.96);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  display: none;           /* KUNCI: jangan muncul default */
  z-index: 9999;
}

/* Muncul kalau dibuka */
#menuDropdown.is-open,
.menu-dropdown.is-open,
.nav-menu.is-open {
  display: block;
}

/* Item menu di dalam dropdown */
#menuDropdown a,
.menu-dropdown a,
.nav-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  line-height: 1.2;
}

#menuDropdown a:hover,
.menu-dropdown a:hover,
.nav-menu a:hover {
  background: rgba(255,255,255,.08);
}

/* Item “Keluar Akun” dibuat merah halus */
#menuDropdown a.logout,
.menu-dropdown a.logout,
.nav-menu a.logout {
  color: #ffd1d1;
}
#menuDropdown a.logout:hover,
.menu-dropdown a.logout:hover,
.nav-menu a.logout:hover {
  background: rgba(255, 0, 0, .10);
}

/* Biar header nggak pecah di HP */
.header,
.topbar,
.callbar {
  position: relative; /* penting supaya dropdown nempel header */
  overflow: visible;
}

/* ==============================
   RT MENU FIX (dropdown hamburger)
   Tempel paling bawah app.css
================================ */

.dropdown{
  position: relative;
}

/* default: disembunyikan */
.dropdown-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;

  padding: 10px;
  border-radius: 16px;

  background: rgba(18,18,22,.96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  z-index: 9999;
  display: none; /* KUNCI */
}

/* tampil hanya saat class open */
.dropdown-menu.open{
  display: block;
}

/* rapikan isi menu */
.dropdown-menu a,
.dropdown-menu .rt-dd-btn{
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;

  padding: 10px 12px;
  border-radius: 12px;

  color: var(--text);
  text-decoration: none;
  font-weight: 800;

  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.dropdown-menu a:hover,
.dropdown-menu .rt-dd-btn:hover{
  background: rgba(255,255,255,.07);
}

.dropdown-menu .danger,
.dropdown-menu a.danger,
.dropdown-menu .rt-dd-btn.danger{
  color: #ffd1d1;
}

.dropdown-menu .danger:hover,
.dropdown-menu a.danger:hover,
.dropdown-menu .rt-dd-btn.danger:hover{
  background: rgba(255,0,0,.10);
}

/* optional: biar topbar gak pecah di HP */
.topbar{
  gap: 12px;
  flex-wrap: wrap;
}
.rt-actions{
  margin-left: auto;
  gap: 10px;
  flex-wrap: nowrap;
}