:root{
  --black:#0a0a0a;
  --white:#ffffff;
  --cream:#FFF8E7;
  --yellow:#FFD93D;
  --pink:#FF5DA2;
  --blue:#4D96FF;
  --green:#6BCB77;
  --orange:#FF8C42;
  --purple:#9B5DE5;
  --red:#FF4545;
  --cyan:#3DDBD9;

  --accent: var(--purple);
  --accent2: var(--pink);
  --bubble-me: var(--yellow);
  --bubble-other: var(--white);
  --danger: var(--red);
  --success: var(--green);

  --border-w: 3px;
  --border-w-lg: 4px;
  --shadow-off: 5px;
  --shadow-off-lg: 7px;
  --radius: 14px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle, rgba(10,10,10,0.06) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--black);
  overflow: hidden;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  font-weight: 500;
}
.hidden{ display:none !important; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
input, textarea{ font-family:inherit; }
::-webkit-scrollbar{ width:8px; height:8px; }
::-webkit-scrollbar-thumb{ background: var(--black); border-radius:10px; }
::-webkit-scrollbar-track{ background: transparent; }

/* ---- shared "brutal card" look (keeps .glass class name used in HTML) ---- */
.glass{
  background: var(--white);
  border: var(--border-w-lg) solid var(--black);
  box-shadow: var(--shadow-off-lg) var(--shadow-off-lg) 0 var(--black);
  backdrop-filter: none;
}

/* ============ AUTH SCREEN ============ */
.auth-screen{
  height:100%;
  display:flex; align-items:center; justify-content:center;
  padding:20px;
  background:
    linear-gradient(135deg, var(--purple) 0%, var(--purple) 30%, var(--pink) 60%, var(--yellow) 100%);
  background-size: 200% 200%;
}
.auth-card{
  width:100%; max-width:400px;
  border-radius: var(--radius);
  padding: 34px 26px;
  background: var(--white);
}
.auth-logo{ text-align:center; margin-bottom:22px; }
.logo-badge{
  width:60px;height:60px;border-radius:14px;
  background: var(--yellow);
  border: var(--border-w-lg) solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:28px;margin:0 auto 14px;
  transform: rotate(-4deg);
  color: var(--black);
}
.auth-logo h1{ font-size:28px; font-weight:900; letter-spacing:-0.5px; }
.auth-logo h1 span{ color:var(--pink); -webkit-text-stroke: 0.5px var(--black); }
.auth-tag{ color:#555; font-size:13px; margin-top:6px; font-weight:600; }
.auth-tabs{
  display:flex; gap:8px; margin-bottom:18px; background: var(--cream);
  border: var(--border-w) solid var(--black); border-radius:12px; padding:4px;
}
.auth-tab{
  flex:1; padding:10px; border-radius:8px; font-weight:800; color:#555; font-size:14px;
  transition:.12s;
}
.auth-tab.active{ background: var(--blue); color:var(--black); border: 2px solid var(--black); }
.auth-form{ display:flex; flex-direction:column; gap:14px; }
.auth-form input, .modal-search{
  padding:13px 16px; border-radius:10px; border: var(--border-w) solid var(--black);
  background: var(--white); color: var(--black); font-size:14px; outline:none; font-weight:600;
  box-shadow: 3px 3px 0 var(--black);
}
.auth-form input::placeholder, .modal-search::placeholder{ color:#888; font-weight:500; }
.auth-form input:focus, .modal-search:focus{ background: var(--yellow); }
.btn-primary{
  padding:13px; border-radius:10px; font-weight:900; font-size:14px; text-transform:uppercase; letter-spacing:.4px;
  background: var(--pink); color:var(--black); border: var(--border-w) solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  transition: transform .1s, box-shadow .1s;
}
.btn-primary:hover{ background: var(--yellow); }
.btn-primary:active{ transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--black); }
.btn-secondary{
  padding:12px; border-radius:10px; font-weight:800; font-size:14px;
  background: var(--cyan); color:var(--black); border: var(--border-w) solid var(--black);
  box-shadow: 3px 3px 0 var(--black);
  transition: transform .1s, box-shadow .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-secondary:hover{ background: var(--blue); }
.btn-secondary:active{ transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--black); }
.auth-error{ color:#B8003A; font-size:13px; min-height:16px; text-align:center; font-weight:700; }
.auth-field-label{ font-size:12px; opacity:.75; margin:-4px 2px 0; }
.auth-hint{ font-size:12px; line-height:1.4; color:#B8003A; background:rgba(184,0,58,.08); border-radius:8px; padding:8px 10px; margin:0 0 2px; }

/* ============ APP LAYOUT ============ */
.app{
  height:100vh; height:100dvh;
  display:flex;
  background: var(--cream);
}
.sidebar{
  width:340px; min-width:300px; flex-shrink:0;
  display:flex; flex-direction:column;
  border-radius:0; border-right: var(--border-w-lg) solid var(--black); border-left:none; border-top:none; border-bottom:none;
  box-shadow:none;
  background: var(--white);
}
.sidebar-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px; gap:8px; border-bottom: var(--border-w) solid var(--black);
  background: var(--yellow);
}
.my-profile{ display:flex; align-items:center; gap:10px; cursor:pointer; overflow:hidden; }
.my-name{ font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px; }
.my-sub{ font-size:11px; color:#1a7a1a; font-weight:700; }
.sidebar-actions{ display:flex; gap:5px; flex-shrink:0; }
.icon-btn{
  width:36px; height:36px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  font-size:16px; transition:.1s; background: var(--white); border: 2px solid var(--black);
  box-shadow: 2px 2px 0 var(--black);
}
.icon-btn i{
  font-size: 16px;
  line-height: 1;
}
.icon-btn:hover{ background: var(--cyan); }
.icon-btn:active{ transform: translate(2px,2px); box-shadow: 0 0 0 var(--black); }
.icon-btn.small{ width:28px; height:28px; font-size:13px; border-width:2px; box-shadow:1px 1px 0 var(--black); }
.icon-btn.small i{ font-size: 12px; }

.avatar{
  width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--black);font-size:16px;
  border: 2.5px solid var(--black); flex-shrink:0;
  text-transform:uppercase;
  box-shadow: 2px 2px 0 var(--black);
}
.avatar.big{ width:76px;height:76px;font-size:28px; margin:0 auto 10px; border-width:3px; box-shadow:3px 3px 0 var(--black); }
.avatar img{ width:100%; height:100%; border-radius:50%; object-fit:cover; }

.avatar-edit-row{ display:flex; flex-direction:column; align-items:center; margin-bottom:6px; }
.avatar-edit-actions{ display:flex; gap:8px; margin-bottom:6px; }
.btn-secondary.small{ padding:7px 12px; font-size:12px; box-shadow:2px 2px 0 var(--black); }
.info-avatar-row .btn-secondary.small{ margin:2px auto 10px; }
.info-field-label{ font-size:11px; font-weight:800; text-transform:uppercase; color:#666; margin:8px 0 4px; }

.invite-link-row{ display:flex; gap:8px; align-items:center; }
.invite-link-row input{ flex:1; font-size:12px; padding:10px 12px; }
.invite-qr-wrap{ display:flex; flex-direction:column; align-items:center; margin-top:14px; }
#invite-qr{ background:#fff; padding:10px; border-radius:10px; border:2.5px solid var(--black); box-shadow:3px 3px 0 var(--black); line-height:0; }

.search-box{ padding:12px 16px; }
.search-box input{
  width:100%; padding:10px 14px; border-radius:10px; border: 2.5px solid var(--black);
  background: var(--cream); color: var(--black); outline:none; font-size:13px; font-weight:600;
}
.chat-filter-tabs{ display:flex; gap:6px; padding:0 16px 10px; overflow-x:auto; }
.filter-tab{
  padding:7px 14px; border-radius:20px; font-size:12px; font-weight:800; white-space:nowrap;
  background: var(--white); color:#555; border: 2px solid var(--black);
}
.filter-tab.active{ background: var(--purple); color:var(--white); }
.chat-list{ flex:1; overflow-y:auto; }
.chat-item{
  display:flex; align-items:center; gap:12px; padding:12px 16px; cursor:pointer; border-bottom: 1.5px solid #f0f0f0;
  transition:.1s; position:relative;
}
.chat-item:hover{ background: var(--cream); }
.chat-item.active{ background: var(--yellow); border-left: 4px solid var(--purple); }
.chat-item-body{ flex:1; min-width:0; }
.chat-item-top{
  display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px;
}
.chat-item-name{ font-size:14px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.chat-type-tag{
  font-size:10px; font-weight:700; background: var(--cyan); color:var(--black);
  padding:2px 6px; border-radius:6px; white-space:nowrap; flex-shrink:0;
}
.chat-item-time{ font-size:11px; color:#999; white-space:nowrap; flex-shrink:0; }
.chat-item-bottom{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
.chat-item-preview{ font-size:12px; color:#666; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.unread-badge{ 
  font-size:11px; font-weight:800; background: var(--red); color:var(--white); 
  border-radius:50%; width:22px; height:22px; display:flex; align-items:center; 
  justify-content:center; flex-shrink:0; border:2px solid var(--black);
}
.online-dot{
  position:absolute; bottom:0; right:-2px; width:12px; height:12px; 
  background: var(--green); border-radius:50%; border:2px solid var(--white);
  box-shadow: 0 0 0 1px var(--black);
}

.empty-state{
  display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; gap:16px; color:#999;
}
.empty-icon{ font-size:64px; color:#ddd; line-height:1; }
.system-bubble{
  align-self:center; padding:8px 12px; border-radius:12px; background: var(--cream);
  border: 2px solid var(--black); font-size:12px; color:#666; font-weight:600;
  margin:4px 0; box-shadow: 2px 2px 0 var(--black);
}
.call-log-bubble{
  align-self:center; display:flex; align-items:center; gap:8px; padding:8px 14px; border-radius:14px;
  background: var(--cream); border: 2px solid var(--black); font-size:12.5px; color:#333; font-weight:700;
  margin:4px 0; box-shadow: 2px 2px 0 var(--black);
}
.call-log-bubble i{ font-size:13px; }
.call-log-bubble.missed, .call-log-bubble.rejected{ color:#B8003A; }
.call-log-bubble.missed i, .call-log-bubble.rejected i{ color:#B8003A; }
.call-log-duration{ opacity:.7; font-weight:600; }

/* ============ CHAT AREA ============ */
.chat-area{
  flex:1; display:flex; flex-direction:column;
}
.chat-window{
  display:flex; flex-direction:column; height:100%; width:100%;
}
.chat-header{
  flex-shrink:0; display:flex; align-items:center; gap:12px; padding:12px 20px; border-bottom: var(--border-w) solid var(--black);
  background: var(--white);
}
.chat-header-info{ display:flex; align-items:center; gap:10px; flex:1; cursor:pointer; min-width:0; }
.chat-title{ font-weight:800; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-subtitle{ font-size:12px; color:#666; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-header-actions{ display:flex; gap:6px; }

.messages{
  flex:1; padding:16px 20px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; min-height:0;
}
.msg-row{
  display:flex; gap:8px; margin-bottom:4px; align-items:flex-end;
}
.msg-row.me{ justify-content:flex-end; }
.msg-row.me .bubble{ background: var(--bubble-me); color:var(--black); }
.msg-row.system{
  display:flex; justify-content:center; margin:8px 0;
}
.bubble{
  max-width:60%; word-wrap:break-word; padding:12px 16px; border-radius:12px;
  background: var(--bubble-other); border: 2px solid var(--black); box-shadow: 2px 2px 0 var(--black);
  color:var(--black); font-size:14px; line-height:1.4;
}
.bubble-time{ font-size:10px; opacity:.7; margin-top:4px; text-align:right; font-weight:700; }
.bubble-deleted{ font-style:italic; opacity:.7; font-size:13px; }
.bubble-sender{ font-size:11px; color:var(--purple); font-weight:800; margin-bottom:4px; }
.bubble-reply{
  background: var(--cream); border-left: 3px solid var(--purple); padding:5px 8px; border-radius:8px;
  margin-bottom:6px; font-size:12px; border:2px solid var(--black); border-left-width:4px;
}
.bubble-reply-name{ font-weight:800; font-size:11.5px; color:var(--purple); }
.bubble img.msg-image{ max-width:220px; border-radius:10px; display:block; margin-top:2px; cursor:pointer; border:2px solid var(--black); }
.bubble .doc-chip{
  display:flex; align-items:center; gap:8px; background: var(--cream); padding:8px 10px; border-radius:10px; margin-top:2px;
  border: 2px solid var(--black); font-weight:700; cursor:pointer;
}
.bubble .doc-chip i{
  font-size: 14px;
}
.bubble audio{ margin-top:2px; max-width:220px; }
.msg-actions{
  display:flex; gap:4px; align-self:center; opacity:0; transition:.15s; margin:0 6px;
}
.msg-row:hover .msg-actions{ opacity:1; }
.msg-actions button{ 
  font-size:12px; width:32px; height:32px; border-radius:8px; background: var(--white); 
  border:2px solid var(--black); cursor: pointer; display: flex; align-items: center; 
  justify-content: center; transition:.1s; box-shadow: 1px 1px 0 var(--black);
}
.msg-actions button i{ font-size: 13px; line-height: 1; }
.msg-actions button:hover{ background: var(--yellow); }
.msg-actions button:active{ transform: translate(1px,1px); box-shadow: 0 0 0 var(--black); }

.reply-preview, .recording-bar{
  flex-shrink:0; display:flex; align-items:center; gap:10px; padding:9px 16px; border-top: var(--border-w) solid var(--black);
  background: var(--cyan);
}
.reply-preview-bar{ width:4px; align-self:stretch; background: var(--purple); border-radius:4px; border:1px solid var(--black); }
.reply-preview-body{ flex:1; min-width:0; }
.reply-preview-name{ font-size:12px; font-weight:800; color:var(--purple); }
.reply-preview-text{ font-size:12.5px; color:#222; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; }

.channel-readonly-note{
  flex-shrink:0; text-align:center; font-size:12px; color:#333; padding:9px; border-top: var(--border-w) solid var(--black);
  background: var(--yellow); font-weight:700;
}

.chat-input-bar{
  flex-shrink:0; display:flex; align-items:center; gap:8px; padding:12px 16px; border-top: var(--border-w-lg) solid var(--black);
  position:relative; background: var(--white);
}
.message-input{
  flex:1; padding:12px 16px; border-radius:16px; border: var(--border-w) solid var(--black);
  background: var(--cream); color: var(--black); outline:none; font-size:14px; font-weight:600;
}
.message-input:focus{ background: var(--white); }
.send-btn{ background: var(--green); border:2.5px solid var(--black); box-shadow:2px 2px 0 var(--black); }
.send-btn i{ font-size: 14px; }
.send-btn:hover{ background: var(--yellow); }
.attach-menu{
  position:absolute; bottom:60px; left:16px; display:flex; flex-direction:column; gap:5px;
  background: var(--white); border: var(--border-w) solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  padding:8px; border-radius:12px; z-index:5;
}
.attach-menu button{ padding:9px 16px; border-radius:8px; font-size:13.5px; text-align:left; font-weight:700; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.attach-menu button i{ font-size: 13px; }
.attach-menu button:hover{ background: var(--yellow); }

.recording-bar{ align-items:center; background: var(--red); color:var(--white); }
.rec-dot{ width:11px; height:11px; border-radius:50%; background: var(--black); animation:pulse 1s infinite; }
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.25;} }
.rec-hint{ flex:1; font-size:13px; color:var(--white); font-weight:700; }

/* ============ INFO PANEL ============ */
.info-panel{
  width:320px; flex-shrink:0; display:flex; flex-direction:column; border-radius:0;
  border-left: var(--border-w-lg) solid var(--black); box-shadow:none;
  background: var(--white);
}
.info-header{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom: var(--border-w) solid var(--black); background: var(--pink); }
.info-header h3{ font-weight:900; }
.info-header button{ display: flex; align-items: center; }
.info-body{ padding:20px; overflow-y:auto; }
.info-avatar-row{ text-align:center; margin-bottom:20px; }
.info-name{ font-weight:900; font-size:17px; }
.info-sub{ font-size:12.5px; color:#555; margin-top:2px; font-weight:700; }
.info-section{ margin-top:16px; }
.info-section h4{ font-size:12.5px; color:#555; margin-bottom:8px; text-transform:uppercase; letter-spacing:.5px; font-weight:800; }
.members-list{ display:flex; flex-direction:column; gap:8px; }
.member-row{ display:flex; align-items:center; gap:10px; padding:7px; border-radius:10px; border:2px solid transparent; }
.member-row:hover{ border-color: var(--black); background: var(--cream); }
.member-name{ font-size:13.5px; font-weight:700; }
.member-tag{ font-size:10.5px; color:var(--purple); font-weight:800; }

/* ============ MODALS ============ */
.modal-overlay{
  position:fixed; inset:0; background:rgba(10,10,10,0.55);
  display:flex; align-items:center; justify-content:center; z-index:50; padding:16px;
}
.modal{
  display:none; width:100%; max-width:420px; border-radius:16px; padding:24px; flex-direction:column; gap:12px;
  max-height:85vh; background: var(--white);
}
.modal.show{ display:flex; }
.modal h3{ font-size:18px; font-weight:900; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.modal h3 i{ font-size: 18px; line-height: 1; }
.modal-search{
  width:100%;
}
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:6px; }
.user-pick-list{ display:flex; flex-direction:column; gap:6px; overflow-y:auto; max-height:280px; }
.user-pick-item{
  display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; cursor:pointer; transition:.1s;
  border: 2px solid transparent;
}
.user-pick-item:hover{ border-color: var(--black); background: var(--cream); }
.user-pick-item.selected{ background: var(--yellow); border-color: var(--black); box-shadow:2px 2px 0 var(--black); }
.user-pick-item .avatar{ width:36px; height:36px; font-size:14px; }
.user-pick-name{ font-size:13.5px; font-weight:700; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.muted{ color:#666; font-size:13px; font-weight:600; }

/* ============ CROP FOTO (avatar) ============ */
.crop-viewport{
  position:relative; width:260px; height:260px; margin:0 auto; border-radius:16px; overflow:hidden;
  background:#111; border:3px solid var(--black); box-shadow:4px 4px 0 var(--black); touch-action:none; cursor:grab;
}
.crop-viewport.dragging{ cursor:grabbing; }
.crop-viewport img{
  position:absolute; top:50%; left:50%; max-width:none; max-height:none; user-select:none; pointer-events:none;
  will-change:transform;
}
.crop-circle-guide{
  position:absolute; inset:0; pointer-events:none; border-radius:50%;
  box-shadow: 0 0 0 2000px rgba(0,0,0,.45); border:2px dashed rgba(255,255,255,.85);
}
.crop-zoom-row{ display:flex; align-items:center; gap:10px; padding:0 4px; color:#666; }
.crop-zoom-row input[type="range"]{ flex:1; }

/* ============ CALL OVERLAY ============ */
.call-overlay{
  position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center;
  background: var(--purple);
}
.call-bg{ position:absolute; inset:0; border-radius:0; border:none; box-shadow:none; background: var(--purple); }
.call-content{
  position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:10px;
  width:100%; height:100%; justify-content:center; padding:20px; color: var(--white);
}
.call-identity{
  display:flex; flex-direction:column; align-items:center; gap:10px; z-index:2;
  transition: opacity .25s ease, transform .25s ease;
}
.call-avatar{
  width:114px;height:114px;border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:42px; font-weight:900; color:var(--black);
  border: 4px solid var(--black); box-shadow: 5px 5px 0 var(--black);
}
.call-name{ font-size:23px; font-weight:900; }
.call-status{ font-size:14px; color:var(--yellow); font-weight:700; }
.remote-video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; border-radius:0; background:#000; }
.local-video{
  position:absolute; bottom:120px; right:20px; width:120px; height:160px; object-fit:cover; border-radius:12px;
  border:3px solid var(--black); box-shadow:4px 4px 0 var(--black); background:#000; z-index:3;
}
.local-video.camera-off{ opacity:0; }
/* Sebelumnya .call-controls cuma diberi margin-top di dalam .call-content yang
   justify-content:center. Selama panggilan suara itu cukup (identity + controls
   sama-sama ada di flow, jadi keduanya kebawa ke tengah bareng). TAPI begitu
   video-connected: elemen .call-identity dipindah jadi position:absolute (lihat
   bawah), sehingga .call-controls jadi satu-satunya elemen yang tersisa di flow
   flex-nya .call-content -> otomatis diseret ke tengah layar oleh justify-content:
   center, bukan menempel di bawah seperti tombol panggilan pada umumnya.
   Fix: lepaskan .call-controls dari flow, kunci posisinya sendiri di bawah,
   supaya tetap di bawah baik saat voice call maupun video call. */
.call-controls{
  display:flex; gap:14px; z-index:3;
  position:absolute; left:0; right:0; bottom: calc(36px + var(--safe-bottom, 0px));
  justify-content:center;
}

/* Saat video call sudah tersambung: lingkaran avatar disembunyikan, nama & timer
   pindah jadi bar kecil di atas supaya video remote terlihat penuh dan tombol
   kontrol tetap bisa dijangkau di bawah. */
.call-content.video-connected .call-avatar{ display:none; }
.call-content.video-connected .call-identity{
  position:absolute; top:16px; left:0; right:0; flex-direction:row; justify-content:center; gap:8px;
  padding:8px 16px; pointer-events:none;
}
.call-content.video-connected .call-name{
  font-size:14px; background:rgba(0,0,0,.45); padding:5px 10px; border-radius:20px;
}
.call-content.video-connected .call-status{
  font-size:12px; background:rgba(0,0,0,.45); padding:5px 10px; border-radius:20px; color:var(--white);
}
.call-btn{
  width:56px; height:56px; border-radius:50%; background: var(--white); display:flex; align-items:center;
  justify-content:center; font-size:21px; transition:.1s; border:3px solid var(--black); box-shadow:3px 3px 0 var(--black);
  color: var(--black); cursor: pointer;
}
.call-btn i{ font-size: 21px; line-height: 1; }
.call-btn:hover{ background: var(--cyan); }
.call-btn:active{ transform:translate(2px,2px); box-shadow:1px 1px 0 var(--black); }
.call-btn.hangup{ background: var(--red); color:var(--white); }
.call-btn.hangup:hover{ background:#ff2020; }
.call-btn.accept{ background: var(--green); }
.call-btn.muted{ background: var(--red); color:var(--white); }

.incoming-call{
  position:fixed; top:20px; right:20px; z-index:110; border-radius:14px; padding:14px 18px;
  display:flex; align-items:center; gap:14px; animation: slideIn .3s ease;
  background: var(--yellow);
}
@keyframes slideIn{ from{ transform:translateX(120%); } to{ transform:translateX(0); } }
.incoming-name{ font-weight:900; font-size:14px; }
.incoming-type{ font-size:12px; color:#333; font-weight:700; }
.incoming-actions{ display:flex; gap:8px; }
.incoming-actions .call-btn{ width:44px; height:44px; font-size:17px; }
.incoming-actions .call-btn i{ font-size: 17px; }

.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:200;
  background: var(--black); color: var(--white); padding:12px 22px; border-radius:12px; font-size:13.5px;
  border: 3px solid var(--black); box-shadow: 4px 4px 0 var(--yellow); font-weight:700;
}

/* ============ MOBILE RESPONSIVE ============ */
@media (max-width: 860px){
  .info-panel{
    position:fixed; right:0; top:0; bottom:0; z-index:40; border-radius:0; width:85%; max-width:340px;
  }
}
@media (max-width: 720px){
  .app{ position:relative; overflow:hidden; }
  .sidebar{
    position:absolute; inset:0; width:100%; border-radius:0; z-index:2; transition:transform .25s ease;
  }
  .chat-area{ position:absolute; inset:0; z-index:3; transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; }
  .chat-window{ display:flex; flex-direction:column; height:100%; width:100%; }
  .chat-input-bar, .recording-bar{ padding-bottom: calc(12px + var(--safe-bottom)); }
  .app.show-chat .sidebar{ transform:translateX(-100%); }
  .app.show-chat .chat-area{ transform:translateX(0); }
  .only-mobile{ display:flex; }
  .bubble{ max-width:82%; }
  .local-video{ width:90px; height:120px; bottom:110px; right:14px; }
  .call-controls{ gap:10px; }
  .call-btn{ width:48px; height:48px; font-size:18px; }
  .call-btn i{ font-size:18px; }
  .logo-badge{ transform:none; }
}