* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }

/* Warna dasar. Mode dan warna aksen diisi lewat JavaScript (menu Tampilan) */
:root {
  --acc-from: #5f5c58;
  --acc-to: #85817b;
  --acc-ink: #fbf8f4;
  --wall-img: none;
  --wall-size: auto;
  --home-img: none;
  --home-size: auto;
}
[data-mode="terang"] {
  --bg: #f4f2ee; --surface: #ffffff; --surface-2: #ebe7e1; --text: #1d1915; --muted: #7b726a;
  --line: #e2ddd6; --bubble-in: #ffffff; --chat-bg: #efebe5; --shadow: 0 1px 2px rgba(40, 30, 20, .08);
  --wp-dot: rgba(70, 55, 40, .16); --wp-line: rgba(70, 55, 40, .07); --wp-glow: rgba(255, 255, 255, .75);
}
[data-mode="gelap"] {
  --bg: #141317; --surface: #1d1c21; --surface-2: #2a2930; --text: #efeae4; --muted: #9b949c;
  --line: #2f2d36; --bubble-in: #2a2930; --chat-bg: #17161b; --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --wp-dot: rgba(255, 255, 255, .09); --wp-line: rgba(255, 255, 255, .05); --wp-glow: rgba(255, 255, 255, .06);
}

.app {
  position: relative;
  height: 100vh;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Bagian atas: nama aplikasi, menu, dan kolom cari, memakai warna aksen */
.topbar {
  padding: 8px 14px 10px;
  background: var(--acc-from) url("/assets/images/bg-topbar.svg") center / cover no-repeat;
  color: var(--acc-ink);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 3px 8px -6px rgba(0, 0, 0, .5);
  flex-shrink: 0;
}
.top-row { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.app-name { font-family: "sans-serif-black", "Arial Black", system-ui, sans-serif; font-weight: 900; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.search {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--acc-ink) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc-ink) 26%, transparent);
  border-radius: 999px;
  padding: 0 14px;
  height: 36px;
  color: var(--acc-ink);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 15px; color: var(--acc-ink); }
.search input::placeholder { color: color-mix(in srgb, var(--acc-ink) 70%, transparent); }
.search svg { width: 18px; height: 18px; }

.main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.list-view { flex: 1; overflow-y: auto; min-height: 0; padding: 8px 0; background-color: var(--chat-bg); background-image: url("/assets/images/bg-chat.svg"); background-size: cover; background-position: center; }
.list-view[data-tab="grup"] { background-image: url("/assets/images/bg-grup.svg"); }
.list-view[data-tab="status"] { background-image: url("/assets/images/bg-status.svg"); }
[data-home="custom"] .list-view { background-image: var(--home-img); background-size: var(--home-size); }
#settingsView { background-image: url("/assets/images/bg-profil.svg"); background-size: cover; background-position: center; }

/* Bar bawah: Chat, Grup, Status, Profil */
.bottombar { display: flex; background: var(--surface); border-top: 1px solid var(--line); height: auto; flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.tab-btn { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tab-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.tab-btn.is-on { color: var(--text); font-weight: 600; }
.tab-btn.is-on svg { color: var(--acc-from); }
.tab-btn.is-on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--acc-from); }
.tab {
  flex: 1;
  background: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tab > span:first-child { padding: 4px 16px; border-radius: 999px; display: flex; }
.tab[data-tab="chat"] { --tc: #1F8A84; }
.tab[data-tab="grup"] { --tc: #B8860B; }
.tab[data-tab="status"] { --tc: #E8745E; }
.tab[data-tab="profil"] { --tc: #2F7FC1; }
.tab.active { color: var(--tc); font-weight: 600; }
.tab.active > span:first-child { background: color-mix(in srgb, var(--tc) 26%, transparent); }
.tab.active svg { color: var(--tc); }

svg { width: 22px; height: 22px; display: block; }
.icon-btn {
  background: none;
  border: 0;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.topbar .icon-btn { color: var(--acc-ink); }

/* Daftar chat dan grup: kartu rapi dengan jarak */
.item {
  display: flex; gap: 12px; margin: 4px 10px; padding: 12px; align-items: center; cursor: pointer;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
}
.item:active { background: var(--surface-2); }
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc-from), var(--acc-to));
  color: var(--acc-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar.sm { width: 38px; height: 38px; }
.item-body { flex: 1; min-width: 0; }
.item-name { font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.item-last { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-last span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.time { font-size: 12px; color: var(--muted); font-weight: 400; flex-shrink: 0; }
.badge { background: var(--acc-from); color: var(--acc-ink); border-radius: 999px; font-size: 12px; padding: 1px 8px; flex-shrink: 0; }
.placeholder { margin: 10px; padding: 40px 20px; text-align: center; color: var(--muted); background: var(--surface); border-radius: 16px; }

/* Tampilan obrolan */
.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  height: 66px;
  background: linear-gradient(135deg, var(--acc-from), var(--acc-to));
  color: var(--acc-ink);
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .45);
  flex-shrink: 0;
}
.chat-header .icon-btn { color: var(--acc-ink); }
.chat-header .avatar { background: var(--surface); color: var(--text); }
.chat-header .info { flex: 1; min-width: 0; }
.chat-header .title { font-weight: 600; font-size: 15px; }
.chat-header .sub { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header .sub.typing { font-style: italic; opacity: 1; }
.chat-header .actions { display: flex; gap: 2px; flex-shrink: 0; }

/* Wallpaper: warna dasar chat, lalu pola atau foto di atasnya */
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px 16px;
  background-color: var(--chat-bg);
  background-image: var(--wall-img);
  background-size: var(--wall-size);
  background-position: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  max-width: min(76%, 340px);
  padding: 8px 12px 6px;
  border-radius: 18px 18px 18px 6px;
  font-size: 15px;
  line-height: 1.35;
  background: color-mix(in srgb, var(--bubble-in) 72%, transparent);
  color: var(--text);
  align-self: flex-start;
  box-shadow: var(--shadow);
  word-wrap: break-word;
  white-space: pre-wrap;
}
.bubble.me {
  background: color-mix(in srgb, var(--acc-from) 78%, transparent);
  color: var(--acc-ink);
  align-self: flex-end;
  border-radius: 18px 18px 6px 18px;
}

/* Progres unggah: tampil di chat sejak mulai, dengan persen yang berjalan */
.bubble.upload { min-width: 210px; }
.up-name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.up-name svg { width: 20px; height: 20px; flex-shrink: 0; }
.up-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.up-track { margin-top: 8px; height: 6px; border-radius: 6px; background: color-mix(in srgb, currentColor 22%, transparent); overflow: hidden; }
.up-track span { display: block; height: 100%; width: 0; background: currentColor; transition: width .2s linear; }
.up-meta { display: flex; justify-content: space-between; font-size: 12px; opacity: .85; margin-top: 5px; }
.bubble.upload.failed { color: #b91c1c; }
.bubble.upload.failed .up-track { display: none; }

.composer {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.composer > .icon-btn { color: var(--muted); }
.composer textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 9px 14px;
  font: inherit;
  font-size: 15px;
  outline: none;
  max-height: 100px;
  background: var(--bg);
  color: var(--text);
}
.send-btn {
  background: linear-gradient(135deg, var(--acc-from), var(--acc-to));
  color: var(--acc-ink);
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.send-btn svg { width: 20px; height: 20px; }

/* Profil kontak dan profil sendiri: kartu per bagian */
.profile-view { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; background: var(--bg); }
.profile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; height: 66px; background: linear-gradient(135deg, var(--acc-from), var(--acc-to)); color: var(--acc-ink); flex-shrink: 0; font-weight: 600; }
.profile-bar .icon-btn { color: var(--acc-ink); }
.profile-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 10px 0 4px; }
.avatar.lg { width: 96px; height: 96px; font-size: 36px; }
.profile-name { font-size: 18px; font-weight: 600; }
.profile-user { color: var(--muted); font-size: 14px; }
.profile-section { background: var(--surface); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.profile-section h3 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.profile-row { font-size: 15px; color: var(--text); word-break: break-word; }
.muted { color: var(--muted); font-size: 14px; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.opt-btn.active { background: linear-gradient(135deg, var(--acc-from), var(--acc-to)); color: var(--acc-ink); border-color: transparent; }

/* Pengaturan: daftar menu dalam kartu, lalu halaman per menu */
.settings-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 10px 0 24px; }
.set-list { display: flex; flex-direction: column; background: var(--surface); margin: 0 10px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.set-row:last-child { border-bottom: 0; }
.set-row:active { background: var(--surface-2); }
.set-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.set-ico svg { width: 20px; height: 20px; }
.set-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-title { font-size: 16px; color: var(--text); }
.set-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-note { margin: 0 10px; }
.action-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.action-btn.danger { color: #b91c1c; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.field input, .field textarea { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); outline: none; }
.field textarea { resize: vertical; min-height: 64px; }
.clickable { cursor: pointer; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.crop-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 15; display: flex; align-items: center; justify-content: center; padding: 16px; }
.crop-box { background: var(--surface); color: var(--text); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; width: min(92vw, 320px); }
.crop-title { font-weight: 600; }
.crop-stage { display: flex; justify-content: center; }
#cropCanvas { width: min(280px, 80vw); height: min(280px, 80vw); border-radius: 50%; background: var(--surface-2); touch-action: none; cursor: grab; }
.crop-zoom { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crop-zoom input { flex: 1; }
.crop-actions { display: flex; gap: 8px; }
.crop-actions > * { flex: 1; }
.toast { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 30; max-width: 90%; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }

/* Tampilan: pilihan mode, warna, dan wallpaper */
.theme-section { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: 16px; padding: 14px 16px; margin: 0 10px; box-shadow: var(--shadow); }
.theme-section h3 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.swatch { height: 52px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.active, .wall-tile.active { border-color: var(--text); }
.wall-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wall-tile { height: 64px; border-radius: 12px; border: 2px solid transparent; background-color: var(--chat-bg); background-position: center; cursor: pointer; padding: 0; font: inherit; font-size: 11px; color: var(--muted); display: flex; align-items: flex-end; justify-content: center; }
.wall-tile span { background: var(--surface); padding: 1px 5px; border-radius: 6px; margin-bottom: 4px; }
.preview-bubble { align-self: flex-end; background: linear-gradient(160deg, var(--acc-from), var(--acc-to)); color: var(--acc-ink); padding: 8px 12px; border-radius: 18px 18px 6px 18px; font-size: 14px; }
.preview-box { background-color: var(--chat-bg); background-image: var(--wall-img); background-size: var(--wall-size); background-position: center; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.preview-bubble.in { align-self: flex-start; background: var(--bubble-in); color: var(--text); border-radius: 18px 18px 18px 6px; }

.overlay-text { color: var(--muted); text-align: center; margin: 0; }
.overlay input { width: 100%; max-width: 320px; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; outline: none; }
.primary-btn {
  width: 100%; max-width: 320px; height: 46px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--acc-from), var(--acc-to)); color: var(--acc-ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.overlay-error { color: #b91c1c; font-size: 13px; min-height: 18px; }

/* Status pesan, indikator mengetik, dan layar nama */
.bubble .meta { float: right; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 1; opacity: .75; margin: 6px 0 0 10px; }
.tick svg { width: 14px; height: 14px; }
.tick.pending, .tick.delivered { color: inherit; }
.tick.read { color: #2563eb; }
.bubble.me .tick.read { color: #9fd0ff; }
.overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}

/* Layar masuk, daftar, dan lupa kata sandi: kartu kaca biru dengan sudut terpotong, pita cahaya lambat */
.auth-screen {
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #0A1624 0%, #04080D 70%);
  padding: 24px 20px;
  isolation: isolate;
  animation: authFade .9s ease both;
}
.auth-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.auth-ribbon { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; animation: authDrift 28s ease-in-out infinite; }
.auth-glow {
  position: absolute; left: 50%; top: 35%; width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 168, 240, .22), rgba(43, 168, 240, 0) 60%);
  transform: translate(var(--gx, 0px), var(--gy, 0px));
  transition: transform 1.4s cubic-bezier(.16, 1, .3, 1);
}
.auth-stage { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.auth-wrap { position: relative; filter: drop-shadow(0 30px 44px rgba(2, 12, 24, .7)) drop-shadow(0 0 28px rgba(43, 168, 240, .12)); }
.auth-card {
  position: relative; overflow: hidden; border-radius: 20px;
  clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04) 45%, rgba(255, 255, 255, .07));
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .3), inset 0 0 26px rgba(43, 168, 240, .08);
  padding: 34px 28px 28px;
  transition: height .6s cubic-bezier(.16, 1, .3, 1);
}
.shard { position: absolute; width: 28px; height: 28px; background: linear-gradient(135deg, rgba(255, 255, 255, .32), rgba(127, 216, 255, .08)); }
.shard-tl { left: 0; top: 0; clip-path: polygon(0 0, 100% 0, 0 100%); transform: translate(-7px, -7px); }
.shard-br { right: 0; bottom: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); transform: translate(7px, 7px); }
.auth-card .hidden { display: none !important; }
.auth-body { display: flex; flex-direction: column; gap: 16px; transition: opacity .25s, filter .25s, transform .25s; }
.auth-body > * { animation: authUp .6s cubic-bezier(.16, 1, .3, 1) both; }
.auth-body > :nth-child(2) { animation-delay: .05s; }
.auth-body > :nth-child(3) { animation-delay: .1s; }
.auth-body > :nth-child(4) { animation-delay: .15s; }
.auth-body > :nth-child(5) { animation-delay: .2s; }
.auth-card.fx-out .auth-body { opacity: 0; filter: blur(16px); transform: scale(.98); }
.auth-card.shell .auth-body { display: none; }
.auth-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.auth-title { font-family: "Sora", "Plus Jakarta Sans", system-ui, sans-serif; font-size: 27px; font-weight: 650; color: #F2F8FF; letter-spacing: -.02em; }
.auth-grad { background: linear-gradient(90deg, #BFE6FF, #2BA8F0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { font-size: 13px; color: #8FA8BF; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.auth-label { font-size: 13px; font-weight: 500; color: #8FA8BF; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-row.single { grid-template-columns: 1fr; }
.auth-input {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px;
  border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .12);
  transition: border-color .3s, box-shadow .3s;
}
.auth-input:focus-within { border-color: #2BA8F0; box-shadow: 0 0 0 3px rgba(43, 168, 240, .16), 0 0 20px rgba(43, 168, 240, .22); }
.auth-ico { width: 18px; height: 18px; color: #5A7088; flex-shrink: 0; display: flex; transition: color .3s; }
.auth-ico svg { width: 18px; height: 18px; stroke-width: 1.75; }
.auth-input:focus-within .auth-ico { color: #7FD8FF; }
.auth-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: #F2F8FF; padding: 0; }
.auth-input input::placeholder { color: #5A7088; }
.auth-eye { width: 32px; height: 32px; margin-right: -6px; border: 0; border-radius: 8px; background: transparent; color: #8FA8BF; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.auth-eye svg { width: 18px; height: 18px; stroke-width: 1.75; }
.auth-eye:hover, .auth-eye.on { color: #7FD8FF; }
.auth-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: -6px; }
.auth-meter i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); transition: background .3s; }
.auth-meter[data-lvl="1"] i:nth-child(-n+1), .auth-meter[data-lvl="2"] i:nth-child(-n+2), .auth-meter[data-lvl="3"] i:nth-child(-n+3), .auth-meter[data-lvl="4"] i:nth-child(-n+4) { background: #7FD8FF; }
.auth-meter[data-lvl="1"] i:nth-child(-n+1) { background: #FF6B6B; }
.auth-forgot-row { display: flex; justify-content: flex-end; margin-top: -6px; }
.auth-link { border: 0; background: none; font: inherit; font-size: 13px; color: #7FD8FF; cursor: pointer; padding: 6px 2px; }
.auth-link.strong { font-weight: 700; color: #2BA8F0; }
.auth-link:disabled { color: #5A7088; cursor: default; }
.auth-error { text-align: center; min-height: 0; font-size: 13px; color: #FF6B6B; }
.auth-error:not(:empty) { min-height: 18px; animation: authShake .5s cubic-bezier(.36, .07, .19, .97); }
.auth-submit {
  position: relative; overflow: hidden; width: 100%; height: 48px; margin-top: 4px; border: 0; border-radius: 12px;
  background: linear-gradient(90deg, #7FD0FF, #2BA8F0); color: #04121E;
  font: inherit; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(43, 168, 240, .65);
  transition: transform .25s cubic-bezier(.34, 1.4, .64, 1), opacity .3s, box-shadow .3s;
}
.auth-submit:hover:not(:disabled) { transform: translateY(-1px); }
.auth-submit:active:not(:disabled) { transform: scale(.98); }
.auth-submit:disabled { opacity: .5; cursor: default; box-shadow: none; }
.auth-arrow, .auth-arrow svg { width: 18px; height: 18px; display: flex; }
.auth-submit.loading > * { opacity: 0; }
.auth-submit.loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; left: 50%; top: 50%; margin: -10px 0 0 -10px;
  border-radius: 50%; border: 2.5px solid rgba(4, 18, 30, .25); border-top-color: #04121E; animation: authSpin .8s linear infinite;
}
.auth-hint { font-size: 12px; color: #5A7088; margin: 0; line-height: 1.6; }
.auth-switch { text-align: center; font-size: 13px; color: #8FA8BF; }

/* Transisi: kartu memudar, berubah ukuran, logo muncul, lalu isi mode baru */
.auth-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.auth-loader.show { opacity: 1; }
.auth-mark {
  position: relative; width: 56px; height: 56px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #7FD0FF, #0E5A8A);
  transform: scale(.8); transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  animation: authHalo 1.8s ease-in-out infinite;
}
.auth-loader.show .auth-mark { transform: scale(1); }
.auth-mark::after { content: ""; position: absolute; left: -10%; top: 48%; width: 120%; height: 1px; background: rgba(255, 255, 255, .55); transform: rotate(-45deg); }

@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes authUp { from { opacity: 0; transform: translateY(8px); filter: blur(16px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes authShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes authDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-24px, 18px) scale(1.04); } }
@keyframes authHalo { 0%, 100% { box-shadow: 0 0 18px rgba(43, 168, 240, .35); } 50% { box-shadow: 0 0 36px rgba(127, 216, 255, .6); } }
@keyframes authSpin { to { transform: rotate(360deg); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(28px) scale(.94) rotateX(8deg); filter: blur(12px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes shardTL { 0%, 100% { transform: translate(-7px, -7px) rotate(0deg); } 50% { transform: translate(-12px, -10px) rotate(8deg); } }
@keyframes shardBR { 0%, 100% { transform: translate(7px, 7px) rotate(0deg); } 50% { transform: translate(12px, 10px) rotate(-8deg); } }
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes errIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.auth-card { animation: cardIn .9s cubic-bezier(.16, 1, .3, 1) both; }
.shard-tl { animation: shardTL 6s ease-in-out infinite; }
.shard-br { animation: shardBR 7s ease-in-out infinite; }
.auth-input:focus-within { transform: translateY(-2px); }
.auth-error:not(:empty) { animation: authShake .5s cubic-bezier(.36, .07, .19, .97), errIn .3s ease-out; }
.auth-submit::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); transform: translateX(-120%); pointer-events: none; }
.auth-submit:hover:not(:disabled)::before { animation: sheen .9s ease-out; }
.auth-submit.loading::before { display: none; }
.auth-title { animation: authUp .7s cubic-bezier(.16, 1, .3, 1) both .05s; }

/* Daftar chat: tiap baris muncul bertahap dari kiri, avatar memantul */
@keyframes listIn { from { opacity: 0; transform: translateX(-16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes avPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes badgePop { 0% { transform: scale(.3); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
#listView .item { transition: transform .2s ease, background-color .2s ease; }
#listView .item:active { transform: scale(.985); }

@media (prefers-reduced-motion: reduce) { #listView .item, #listView .item .avatar, #listView .item .badge, .auth-card, .auth-title, .shard-tl, .shard-br { animation: none !important; } }

@media (prefers-reduced-motion: reduce) { .auth-screen *, .auth-screen { animation: none !important; transition: none !important; } }

/* Media pesan dan pesan gagal kirim */
.msg-img { display: block; max-width: 260px; width: 100%; border-radius: 12px; }
.msg-video { display: block; max-width: 280px; width: 100%; border-radius: 12px; }
.msg-file { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 180px; }
.msg-file svg { width: 22px; height: 22px; flex-shrink: 0; }
.bubble audio { display: block; max-width: 260px; width: 100%; }
.bubble.failed { opacity: 0.9; }
.failed-note { display: inline-flex; align-items: center; gap: 4px; color: #d93025; font-size: 12px; cursor: pointer; text-decoration: underline; }
.failed-note svg { width: 14px; height: 14px; }

/* Media di Info kontak */
.media-grid { display: flex; flex-direction: column; gap: 8px; }
.media-grid .msg-img, .media-grid .msg-video { max-width: 100%; border-radius: 10px; }
.media-grid audio { width: 100%; }

/* Grup dan Status */
.list-tools { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.list-section-title { padding: 12px 16px 4px; font-size: 13px; font-weight: 600; opacity: .7; }
.status-input { width: 100%; resize: none; border: 1px solid var(--line, #d9dde3); border-radius: 12px; padding: 10px 12px; background: transparent; color: inherit; font: inherit; }
.status-actions { display: flex; align-items: center; gap: 8px; }
.status-actions .status-muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-muted { font-size: 13px; opacity: .65; }
.status-card { padding: 12px 16px; border-bottom: 1px solid var(--line, #d9dde3); display: flex; flex-direction: column; gap: 8px; }
.status-card .msg-img, .status-card .msg-video { max-width: 100%; border-radius: 10px; }
.status-card audio { width: 100%; }
.status-text { white-space: pre-wrap; word-break: break-word; }
.status-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.gsender { display: block; font-size: 12px; font-weight: 600; opacity: .75; margin-bottom: 2px; }


/* Pengaturan: warna teal, daftar menu, dan halaman menu */
#settingsView .profile-bar { background: #1F8A84; color: #FFFFFF; }
#settingsView .profile-bar .icon-btn { color: #FFFFFF; }
#settingsBody .set-ico { background: #E3F4F2; color: #14605B; }
[data-mode="gelap"] #settingsBody .set-ico { background: #17332F; color: #7FD6CF; }
.set-page { display: flex; flex-direction: column; gap: 12px; padding: 4px 10px; }

/* Akun: foto, nama, ID, dan form profil */
.acc-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 6px; }
.acc-photo { cursor: pointer; }
.acc-avatar { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #E3F4F2; color: #14605B; font-size: 30px; font-weight: 600; }
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-name { font-size: 17px; font-weight: 600; margin-top: 6px; }
.acc-id { font-size: 13px; letter-spacing: 1px; opacity: .7; }
.acc-form { display: flex; flex-direction: column; gap: 6px; }
.acc-label { font-size: 12px; opacity: .75; margin-top: 6px; }
.acc-form textarea.status-input { resize: vertical; }

/* Kartu vCard gaya KTP: kotak tenang, tanpa gradasi */
.id-card { border: 1px solid #1F8A84; border-radius: 10px; overflow: hidden; background: #FFFFFF; color: #1d2b2a; }
.id-head { display: flex; justify-content: space-between; padding: 8px 12px; background: #1F8A84; color: #FFFFFF; font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.id-body { display: flex; gap: 12px; padding: 12px; }
.id-photo { width: 96px; height: 116px; flex: 0 0 96px; border: 1px solid #C9DCDA; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #E3F4F2; color: #14605B; font-size: 30px; font-weight: 600; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.id-row { display: flex; flex-direction: column; min-width: 0; }
.id-label { font-size: 11px; color: #5a6b69; }
.id-val { font-size: 14px; font-weight: 600; word-break: break-word; }
.id-foot { padding: 8px 12px; border-top: 1px dashed #C9DCDA; font-size: 12px; color: #5a6b69; }
[data-mode="gelap"] .acc-avatar { background: #17332F; color: #7FD6CF; }
[data-mode="gelap"] .id-card { background: #1A2A29; color: #E6F1F0; border-color: #2E7E78; }
[data-mode="gelap"] .id-photo { background: #17332F; color: #7FD6CF; border-color: #2E4B48; }
[data-mode="gelap"] .id-label, [data-mode="gelap"] .id-foot { color: #9FB8B5; }
[data-mode="gelap"] .id-foot { border-top-color: #2E4B48; }

/* Privasi: blok per bagian, pengecualian, dan pilihan audiens */
.priv-block { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.priv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.priv-title { font-size: 15px; font-weight: 600; }
.priv-select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 60%; }
.priv-hint { font-size: 13px; }
.priv-exc-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.priv-exc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priv-del { font: inherit; font-size: 13px; color: #b91c1c; background: none; border: none; cursor: pointer; padding: 4px; }
.priv-add { display: flex; flex-wrap: wrap; gap: 6px; }
.priv-add .priv-select { max-width: none; flex: 1; min-width: 120px; }
.priv-check { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

/* Perangkat yang sedang masuk (menu Akun) */
.sess-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.sess-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #d9dfe3); border-radius: 10px; }
.sess-info { min-width: 0; }
.sess-dev { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.sess-now { font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 6px; background: #e6eeee; color: #2f5d5d; margin-left: 4px; }
.sess-sub { font-size: 12px; color: var(--muted, #6b7780); margin-top: 2px; }
.sess-btn { flex: none; border: 1px solid #b8c4c9; background: transparent; color: inherit; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.sess-btn:hover { background: #f1f4f5; }

/* Kode cadangan pemulihan: teks mudah disalin, warna netral */
.rc-code { font-family: monospace; font-size: 20px; letter-spacing: 1px; padding: 12px; border: 1px solid #cfd6d3; border-radius: 8px; text-align: center; margin: 12px 0 8px; user-select: all; }

/* Menu Daftar: judul bagian, dan kolom nama panggilan di bawah tiap kontak */
.daftar-sec { padding: 14px 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted, #6b7780); }
.daftar-row { border-bottom: 1px solid var(--line, #d9dfe3); padding-bottom: 6px; }
.daftar-nick { display: flex; gap: 8px; padding: 0 16px 8px; }
.daftar-nick .status-input { flex: 1; min-width: 0; }

/* ---- Menu Chat dan pengaturan chat per perangkat ---- */
.btext { font-size: var(--chat-fs, 15px); }
.hide-time .mtime { display: none; }
.hide-preview .item-last > span:first-child { display: none; }
.chat-sec { margin: 4px 0 8px; }
.sw {
  width: 42px; height: 24px; border-radius: 12px; flex: none; position: relative;
  background: var(--surface-2); border: 1px solid var(--line);
}
.sw::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--muted); transition: left .2s, background .2s;
}
.sw.on { background: var(--text); border-color: var(--text); }
.sw.on::after { left: 21px; background: var(--bg); }
.chat-arch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.chat-arch-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* Menu Akun: tombol cepat dan ringkasan akun */
.acc-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.acc-info { display: grid; gap: 8px; margin: 8px 0 14px; }
.acc-info-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

/* Status: tampilan daftar, editor foto (crop), dan penampil layar penuh */
.st-unseen .item-name > span:first-child { font-weight: 700; }
.st-compose-row { display: flex; align-items: flex-end; gap: 6px; }
.st-compose-row .status-input { flex: 1; min-width: 0; }
.st-upload { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.st-media-icon { display: flex; flex: none; opacity: .75; }
.st-media-icon svg { width: 22px; height: 22px; }
.st-media-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-media-title { font-size: 14px; font-weight: 600; }
.st-upload .action-btn { flex: none; padding: 8px 16px; text-align: center; }
.st-bgs { display: flex; flex-wrap: wrap; gap: 6px; }
.st-bg-opt { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.st-bg-opt.on { border-color: var(--text); }
.st-text-card { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 100%; box-sizing: border-box; padding: 32px 24px; text-align: center; color: #FFFFFF; font-size: 24px; font-weight: 600; line-height: 1.35; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.st-text-card p { margin: 0; max-width: 100%; white-space: pre-wrap; word-break: break-word; }
.st-prev { min-height: 120px; border-radius: 12px; font-size: 18px; padding: 20px 16px; }
.st-select { height: 36px; border-radius: 10px; padding: 0 8px; font: inherit; }
.st-edit-tools { display: flex; flex-direction: column; gap: 8px; }
.st-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.st-overlay.hidden { display: none; }
.st-edit-box { width: 100%; max-width: 420px; background: var(--surface, #FFFFFF); color: inherit; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.st-edit-stage { display: flex; align-items: center; justify-content: center; min-height: 160px; max-height: 62vh; overflow: hidden; background: #000000; border-radius: 12px; touch-action: none; }
.st-crop-wrap { position: relative; display: inline-block; max-width: 100%; user-select: none; }
.st-crop-wrap img { display: block; max-width: 100%; max-height: 60vh; }
.st-crop { position: absolute; border: 2px solid #FFFFFF; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); cursor: move; box-sizing: border-box; }
.st-crop i { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; background: #FFFFFF; border-radius: 50%; }
.st-crop i[data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.st-crop i[data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.st-crop i[data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.st-crop i[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.st-viewer { position: fixed; inset: 0; z-index: 80; background: #000000; color: #FFFFFF; display: flex; flex-direction: column; }
.st-viewer.hidden { display: none; }
.st-vtop { position: relative; z-index: 3; padding: 10px 12px 0; }
.st-bars { display: flex; gap: 4px; margin-bottom: 10px; }
.st-bar { flex: 1; height: 3px; background: rgba(255, 255, 255, .35); border-radius: 2px; overflow: hidden; }
.st-bar i { display: block; width: 100%; height: 100%; background: #FFFFFF; transform-origin: 0 50%; }
.st-vhead { display: flex; align-items: center; gap: 10px; }
.st-vhead .avatar { flex: none; }
.st-vname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-vname span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-vname small { font-size: 12px; opacity: .7; }
.st-viewer .icon-btn { color: #FFFFFF; }
.st-stage { position: relative; flex: 1; min-height: 0; }
.st-body { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.st-media { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-caption { position: absolute; left: 0; right: 0; bottom: 16px; padding: 10px 14px; text-align: center; background: rgba(0, 0, 0, .45); }
.st-tap { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; background: transparent; border: 0; padding: 0; cursor: pointer; }
.st-tap-l { left: 0; }
.st-tap-r { right: 0; }
.st-vbottom { position: relative; z-index: 3; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; }
.st-foot-row { display: flex; align-items: center; gap: 8px; }
.st-reply { flex: 1; min-width: 0; height: 40px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #FFFFFF; padding: 0 14px; font: inherit; }
.st-send { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #FFFFFF; color: #000000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.st-send svg, .st-chip svg { width: 18px; height: 18px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #FFFFFF; font: inherit; cursor: pointer; }
.st-chip.st-danger { color: #F2B8AE; border-color: #F2B8AE; }
.st-viewers { max-height: 40vh; overflow-y: auto; background: #1B1B1B; border-radius: 12px; padding: 10px 12px; }
.st-vhead2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.st-vrow { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.st-muted { font-size: 13px; opacity: .7; }

/* Grup: layar info, aksi anggota, dan menu pesan */
.gpanel { position: fixed; inset: 0; z-index: 70; background: var(--bg); color: var(--text); display: flex; flex-direction: column; overflow: hidden; }
.gpanel.hidden, .gsheet.hidden { display: none; }
.gp-top { display: flex; align-items: center; gap: 10px; padding: 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 17px; }
.gp-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 10px 24px; }
.gp-body .profile-section .status-input { width: 100%; }
.g-member { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.g-mname { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.g-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.g-macts { display: flex; flex-wrap: wrap; gap: 6px; }
.g-mini { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.g-pin { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; word-break: break-word; }
.gsheet { position: fixed; inset: 0; z-index: 75; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; }
.gs-box { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.gs-danger { color: #B3261E; }

/* Pesan pribadi: balasan, reaksi, edit, dan hapus */
.rq { display: block; border-left: 3px solid #00C9C1; background: rgba(0, 0, 0, .08); border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; font-size: 13px; }
.rq b { display: block; font-size: 12px; }
.rq span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.btext.deleted { font-style: italic; opacity: .7; }
.rx { display: inline-block; margin-top: 4px; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(0, 0, 0, .18); }
.pm-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 3px solid #F5B51B; background: #063C40; color: #F5F4EF; }
.pm-bar.hidden { display: none; }
.pm-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.pm-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.pm-cancel { flex-shrink: 0; border: 1px solid #F5F4EF; background: transparent; color: #F5F4EF; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.pm-title { font-size: 13px; color: #777C7C; padding: 6px 4px; }
.pm-react { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.pm-chip { border: 1px solid #063C40; background: transparent; color: inherit; border-radius: 14px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.pm-chip.on { background: #063C40; color: #F5F4EF; }


/* Grup: pesan sistem, pengumuman, mention, link undangan, dan riwayat */
.gsys { align-self: center; margin: 8px auto; max-width: 90%; font-size: 12px; text-align: center; color: #f5f4ef; background: rgba(16, 23, 25, 0.45); padding: 4px 10px; border-radius: 999px; }
.ann-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #101719; background: #f5b51b; border-radius: 4px; padding: 1px 6px; margin-bottom: 4px; }
.bubble.ann { border-left: 3px solid #f5b51b; }
.mention { color: #00c9c1; font-weight: 700; }
.pm-chip.on { outline: 2px solid #00c9c1; outline-offset: 1px; }
.g-link { font-size: 12px; word-break: break-all; margin: 6px 0; opacity: 0.85; }
.g-log { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; padding: 4px 0; }
