:root {
  --bg: #eef2f6;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --emerald-2: #10b981;
  --emerald-dark: #064e3b;
  --emerald-soft: #d1fae5;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --danger: #dc2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
  --sidebar: 260px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 6px 0 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: #f1f5f9; padding: 1px 5px; border-radius: 6px; }
ul, ol { margin: 8px 0 0; padding-left: 20px; }
li + li { margin-top: 6px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.link { font-weight: 600; font-size: 14px; }

/* ---------- shell ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 750; font-size: 18px; letter-spacing: -.02em; }
.brand-sm { display: none; }

.logo {
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--emerald), var(--emerald-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(5, 150, 105, .35);
  flex: 0 0 auto;
}
.logo span { font-size: .52em; transform: translateY(-1px); }

.nav-label { font-size: 11px; letter-spacing: .12em; color: #94a3b8; font-weight: 700; margin: 26px 10px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px;
  color: #334155; font-weight: 500; font-size: 14.5px;
}
.nav-item:hover { background: #f1f5f9; text-decoration: none; }
.nav-item.active { background: var(--emerald-soft); color: #065f46; font-weight: 650; }
.nav-ico { width: 18px; text-align: center; opacity: .85; font-size: 13px; }

.side-bottom { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.side-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.side-card-title { font-weight: 650; font-size: 14px; }
.side-user { text-align: center; }
.side-user .avatar-lg { margin: 0 auto 6px; }
.side-user-name { font-weight: 650; font-size: 14px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px; background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.2) blur(8px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.crumb { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.crumb b { color: var(--ink); font-weight: 650; }
.crumb-sep { margin: 0 4px; color: #cbd5e1; }
.secure-dot { font-size: 12.5px; color: var(--emerald); background: var(--emerald-soft); padding: 4px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.bell { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 36px; height: 36px; cursor: pointer; font-size: 15px; }
.bell-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-2); }
.balance-pill { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-weight: 650; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }

.content { padding: 28px; max-width: 1140px; width: 100%; margin: 0 auto; }
.content-wide { max-width: 1280px; }

/* ---------- primitives ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { margin-top: 34px; }
.section-head { margin-bottom: 16px; }
.eyebrow { font-size: 11.5px; letter-spacing: .14em; font-weight: 750; color: var(--emerald); }
.page-head { margin-bottom: 8px; }
.page-head h1 { margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px; padding: 9px 16px;
  background: #fff; color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: background .15s, box-shadow .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 4px 12px rgba(5, 150, 105, .22); }
.btn-primary:hover { background: #047857; }
.btn-outline { border-color: #cbd5e1; color: #0f172a; background: #fff; }
.btn-outline:hover { border-color: var(--emerald); color: #065f46; }
.btn-ghost { background: #f1f5f9; color: #334155; }
.btn-ghost:hover { background: #e2e8f0; }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-light { background: #fff; color: var(--emerald-dark); }
.btn-ghost-light { background: transparent; color: #d1fae5; border-color: rgba(255,255,255,.4); }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.chip-green { background: var(--emerald-soft); color: #065f46; }
.chip-grey { background: #f1f5f9; color: #475569; }
.chip-amber { background: var(--amber-soft); color: #92400e; }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: #e2e8f0; color: #334155; font-weight: 700; flex: 0 0 auto; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-agent { background: #ede9fe; color: #5b21b6; }
.avatar-demo { background: #fef3c7; color: #92400e; }

.metric { padding: 18px 20px; }
.metric-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.metric-num { font-size: 30px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; }
.metric-sm { font-size: 22px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; }
.form input, .form textarea, .form select, select, input[type="file"] {
  font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #cbd5e1; background: #fff; color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus, select:focus, input:focus, textarea:focus {
  outline: 2px solid rgba(16, 185, 129, .35); border-color: var(--emerald); outline-offset: 0;
}
.form textarea { resize: vertical; }
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-inline select { flex: 1; min-width: 160px; }
.form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px; padding: 9px 12px; border-radius: 10px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid #f1f5f9; }

.empty-state { text-align: center; padding: 44px 24px; }
.empty-state.small { padding: 20px 10px; }
.empty-ico { font-size: 34px; opacity: .45; margin-bottom: 8px; }
.empty-inline { color: var(--muted); font-size: 14px; padding: 18px; border: 1px dashed #cbd5e1; border-radius: 12px; text-align: center; }

/* ---------- landing ---------- */
.hero {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 44px 40px; box-shadow: var(--shadow); overflow: hidden;
  background-image: radial-gradient(900px 320px at 85% 0%, #ecfdf5 0%, transparent 60%), radial-gradient(600px 260px at 0% 100%, #eef2ff 0%, transparent 65%);
}
.hero h1 { font-size: 42px; max-width: 660px; margin-top: 14px; }
.hero-sub { color: var(--muted); font-size: 16.5px; max-width: 620px; margin-top: 14px; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.badge { display: inline-block; background: var(--emerald-soft); color: #065f46; font-weight: 650; font-size: 12.5px; padding: 6px 13px; border-radius: 999px; }
.perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.perk { display: flex; gap: 10px; align-items: flex-start; }
.perk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--emerald-2); margin-top: 7px; flex: 0 0 auto; }
.perk b { font-size: 14px; }
.hero-art { position: absolute; right: 34px; top: 84px; width: 210px; height: 210px; display: grid; place-items: center; }
.stack { position: relative; width: 140px; height: 140px; }
.stack-tile { position: absolute; width: 104px; height: 104px; border-radius: 22px; }
.stack-tile-3 { right: 0; top: 0; background: #ecfdf5; border: 1px solid #d1fae5; }
.stack-tile-2 { right: 14px; top: 18px; background: #a7f3d0; opacity: .75; }
.stack-tile-1 {
  left: 0; bottom: 0; background: linear-gradient(145deg, var(--emerald), #0d9488);
  box-shadow: 0 18px 36px rgba(5, 150, 105, .32);
  display: grid; place-items: center;
}
.stack-tile-1 span { color: #fff; font-weight: 800; font-size: 48px; line-height: 1; }
.art-chip { position: absolute; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 999px; font-size: 12px; font-weight: 600; padding: 6px 12px; }
.art-chip-1 { top: 14px; left: -10px; }
.art-chip-2 { bottom: 12px; right: -14px; color: var(--emerald); }

.feature-card { padding: 22px; }
.feature-ico { width: 40px; height: 40px; border-radius: 12px; background: #ecfdf5; color: var(--emerald); display: grid; place-items: center; font-size: 18px; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 2px; }
.feature-card p { font-size: 14px; }

.stats-band {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.stat { text-align: center; }
.stat-num { font-size: 28px; font-weight: 750; letter-spacing: -.02em; color: #065f46; }
.stat-note { position: absolute; bottom: 6px; right: 12px; font-size: 10.5px; color: #94a3b8; }

.cta-band {
  margin-top: 34px; background: var(--emerald-dark); color: #ecfdf5; border-radius: 20px;
  padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #a7f3d0; margin-top: 6px; }
.cta-actions { display: flex; gap: 10px; }

.footer { text-align: center; color: #94a3b8; font-size: 12.5px; padding: 34px 0 8px; }

.step-card { padding: 22px; }
.step-num { width: 34px; height: 34px; border-radius: 10px; background: var(--emerald-soft); color: #065f46; font-weight: 750; display: grid; place-items: center; margin-bottom: 12px; }
.tips-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 38px; box-shadow: var(--shadow); }

/* ---------- auth ---------- */
.auth-wrap {
  min-height: 62vh; display: grid; place-items: center; padding: 40px 12px;
  border-radius: 22px;
  background: linear-gradient(160deg, #e7edf5 0%, #eef2f6 45%, #e6f5ee 100%);
}
.auth-card { width: 100%; max-width: 420px; padding: 32px 30px; box-shadow: var(--shadow-lg); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 10px; }
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card > p { text-align: center; }
.auth-card .form { margin-top: 20px; }
.auth-switch { margin-top: 16px; font-size: 13.5px; }

/* ---------- rooms ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.split-side { position: sticky; top: 84px; }
.list-stack { display: flex; flex-direction: column; gap: 12px; }

.room-card { display: block; padding: 18px; color: var(--ink); }
.room-card:hover { text-decoration: none; border-color: #a7f3d0; box-shadow: var(--shadow-lg); }
.room-card h3 { margin-top: 10px; }
.room-card-top { display: flex; align-items: center; justify-content: space-between; }
.room-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--emerald-soft); color: #065f46; display: grid; place-items: center; }
.room-ico.big { width: 44px; height: 44px; border-radius: 12px; }
.room-meta { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; }
.room-row-main { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.room-row h3 a { color: var(--ink); }

/* ---------- room detail ---------- */
.room-title-row { display: flex; flex-direction: column; gap: 4px; }
.back-link { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-top: 18px; }
.room-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }

.room-chat { display: flex; flex-direction: column; min-height: 560px; height: calc(100vh - 220px); overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-status { font-weight: 650; font-size: 14px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; background: #fbfdfc; }
.bubble-row { display: flex; gap: 10px; align-items: flex-start; max-width: 86%; }
.bubble-row.mine { margin-left: auto; flex-direction: row-reverse; }
.bubble-col { min-width: 0; }
.bubble-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin-bottom: 3px; }
.bubble-row.mine .bubble-head { justify-content: flex-end; }
.bubble { background: #fff; border: 1px solid var(--line); padding: 10px 13px; border-radius: 4px 14px 14px 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.bubble-row.mine .bubble { background: #d1fae5; border-color: #a7f3d0; border-radius: 14px 4px 14px 14px; }
.attachment { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }

.composer { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.composer-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.composer input[type="text"], .composer #chat-input { border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; width: 100%; }
.attach { width: 36px; height: 36px; border-radius: 10px; border: 1px dashed #cbd5e1; display: grid; place-items: center; cursor: pointer; font-size: 18px; color: var(--muted); flex: 0 0 auto; }
.attach:hover { border-color: var(--emerald); color: var(--emerald); }
.agent-select { width: auto; max-width: 190px; font-size: 12.5px; padding: 8px 10px; }
.attach-preview { font-size: 12px; color: var(--emerald); }

.agent-chip-list { display: flex; flex-direction: column; gap: 8px; }
.agent-chip-card { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: #fcfdfe; }
.agent-chip-card b { font-size: 13.5px; }
.dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-2); margin-left: auto; flex: 0 0 auto; }
.task-mini-list { display: flex; flex-direction: column; gap: 8px; }
.task-mini { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; font-size: 13px; }
.task-mini-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- agents ---------- */
.row-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.invite-result { margin-top: 12px; background: #f8fafc; border: 1px dashed #a7f3d0; border-radius: 12px; padding: 12px; }
.label-xs { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.invite-code { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 800; letter-spacing: .18em; color: #065f46; margin-top: 4px; }
.invite-code-sm { font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 9px 11px; }
.steps-list { font-size: 13.5px; }

/* ---------- tasks ---------- */
.task-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 18px; }
.task-main { min-width: 0; }
.task-detail { font-size: 13px; color: #475569; margin-top: 6px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 480px; padding: 22px; box-shadow: var(--shadow-lg); }

@media (max-width: 1080px) {
  .split, .room-layout { grid-template-columns: 1fr; }
  .split-side, .room-side { position: static; }
  .hero-art { display: none; }
  .perks, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-chat { height: 70vh; }
}

@media (max-width: 860px) {
  .sidebar { position: static; height: auto; width: 100%; flex: none; }
  .layout { flex-direction: column; }
  .side-bottom { margin-top: 16px; }
  .brand-sm { display: flex; }
  .topbar .brand-sm { display: none; }
  .content { padding: 18px; }
  .grid-2, .grid-3, .grid-4, .perks, .stats-band { grid-template-columns: 1fr; }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 30px; }
  .room-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- revisi v3: filter/sortir tugas, pencarian, menu pesan, reaksi, sematan, suara ---------- */
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.filter-chip:hover { border-color: var(--emerald); color: #065f46; text-decoration: none; }
.filter-chip.active { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.mini-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mini-filter .filter-chip { padding: 4px 10px; font-size: 12px; }
.sort-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.sort-select { width: auto; padding: 7px 10px; font-size: 13px; }

.chat-search { width: 220px; max-width: 40%; padding: 7px 11px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; }
.chat-search:focus { outline: 2px solid rgba(16, 185, 129, .35); border-color: var(--emerald); }

.pinned-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #fffbeb; border-bottom: 1px solid #fde68a; font-size: 12.5px; }
.pinned-label { font-weight: 700; color: #92400e; white-space: nowrap; }
.pinned-item { color: #78350f; background: #fff; border: 1px solid #fde68a; border-radius: 999px; padding: 3px 10px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinned-item:hover { text-decoration: none; border-color: var(--amber); }

.bubble-head { position: relative; }
.msg-menu-btn {
  border: none; background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
  color: var(--muted); padding: 0 2px; border-radius: 6px; font-weight: 700;
}
.msg-menu-btn:hover { color: var(--ink); background: #f1f5f9; }
.msg-menu {
  position: absolute; top: 100%; right: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 150px;
}
.msg-menu[hidden] { display: none; }
.msg-menu > button {
  border: none; background: transparent; text-align: left; font: inherit; font-size: 13px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; color: var(--ink);
}
.msg-menu > button:hover { background: #f1f5f9; }
.msg-menu-react { display: flex; gap: 2px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.msg-menu-react button {
  border: none; background: transparent; font-size: 16px; padding: 4px 6px; border-radius: 8px; cursor: pointer;
}
.msg-menu-react button:hover { background: #f1f5f9; }

.reply-quote {
  font-size: 12.5px; color: var(--muted); background: #f8fafc; border-left: 3px solid var(--emerald-2);
  border-radius: 0 8px 8px 0; padding: 5px 9px; margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.reply-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; color: var(--muted); background: #ecfdf5; border: 1px solid #a7f3d0;
  border-radius: 8px; padding: 5px 9px;
}
.reply-preview[hidden] { display: none; }
.reply-preview button { border: none; background: transparent; cursor: pointer; font-size: 13px; color: var(--muted); }
.reply-preview button:hover { color: var(--danger); }

.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.reaction-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 8px;
  font: inherit; font-size: 12px; cursor: pointer; color: var(--ink);
}
.reaction-chip:hover { border-color: var(--emerald); }
.reaction-chip.mine { background: var(--emerald-soft); border-color: #a7f3d0; color: #065f46; font-weight: 650; }
.pin-mark { font-size: 11px; }

.voice-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff;
  cursor: pointer; font-size: 15px; flex: 0 0 auto; display: grid; place-items: center;
}
.voice-btn:hover { border-color: var(--emerald); }
.voice-btn:disabled { opacity: .45; cursor: not-allowed; }
.voice-btn.recording { background: #fef2f2; border-color: #fca5a5; color: var(--danger); }

/* ================= IRISAN 2 ================= */

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.tab {
  border: none; background: transparent; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--ink); background: #f8fafc; }
.tab.active { color: var(--emerald); border-bottom-color: var(--emerald); }
.tab-panel[hidden] { display: none; }

/* ---------- shop ---------- */
.shop-item { display: flex; align-items: center; gap: 12px; padding: 14px; }
.shop-ico { width: 44px; height: 44px; border-radius: 12px; background: #ecfdf5; display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.shop-item b { font-size: 14px; }
.price { font-weight: 700; color: #065f46; font-size: 14px; margin-top: 2px; }
.token-card { padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.token-amount { font-size: 26px; font-weight: 750; color: var(--emerald); letter-spacing: -.02em; }
.token-card .price { font-size: 15px; }
.token-card .chip { margin-top: 4px; }

/* ---------- top up ---------- */
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: #334155;
}
.chip-btn:hover { border-color: var(--emerald); color: #065f46; }
.qr-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border: 1px dashed #a7f3d0; border-radius: 14px; background: #f8fefb; }
.qr-box[hidden] { display: none; }
.qr-svg { width: 190px; height: 190px; border: 8px solid #fff; border-radius: 12px; box-shadow: var(--shadow); }
.qr-id { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); word-break: break-all; }
.qr-amount { font-size: 20px; font-weight: 750; color: #065f46; }
.qr-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12px; font-weight: 650; padding: 5px 10px; border-radius: 999px; }

/* ---------- kantor 3D ---------- */
.scene-wrap {
  position: relative; margin-top: 20px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 95% at 50% 0%, #eaf2fa 0%, #dfe8f2 55%, #ccd8e6 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow); touch-action: pan-y; cursor: grab;
  user-select: none;
}
.scene-wrap.dragging { cursor: grabbing; }
.scene-wrap:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.scene-stage {
  perspective: 1300px; perspective-origin: 50% 38%;
  height: 470px; display: grid; place-items: center;
}
.scene {
  position: relative; width: 600px; height: 320px; transform-style: preserve-3d;
  transform: rotateX(20deg) rotateY(0deg);
}
/* lantai: bidang datar, tepi atas = garis dinding, menjulur ke kamera */
.scene-floor {
  position: absolute; left: 0; top: 300px; width: 600px; height: 220px;
  transform-origin: top center; transform: rotateX(90deg);
  background:
    repeating-linear-gradient(90deg, #cdd7e3 0 30px, #d8e1ec 30px 60px),
    linear-gradient(180deg, #d9e2ec, #c2cedb);
  box-shadow: inset 0 16px 30px rgba(15, 23, 42, .14);
  border-radius: 0 0 10px 10px;
}
.scene-wall { position: absolute; top: 0; height: 300px; background: linear-gradient(180deg, #f8fafc, #e5ecf4); }
.scene-wall.back { left: 0; width: 600px; transform: translateZ(-150px); border: 1px solid #d5dde7;
  box-shadow: inset 0 -6px 0 #cbd5e1; }
.scene-wall.left {
  left: 0; width: 150px; transform-origin: left center;
  transform: rotateY(90deg); background: linear-gradient(180deg, #eef3f8, #d9e3ee);
}
.scene-wall.right {
  left: 450px; width: 150px; transform-origin: left center;
  transform: rotateY(-90deg); background: linear-gradient(180deg, #f2f6fa, #e2e9f1);
}
.scene-window {
  position: absolute; left: 56px; top: 42px; width: 220px; height: 126px;
  transform: translateZ(-149px); overflow: hidden; border-radius: 5px;
  border: 6px solid #9aa8b8; box-shadow: inset 0 0 0 2px #fff;
}
.city { width: 100%; height: 100%; position: relative;
  background: linear-gradient(180deg, #7dd3fc 0%, #bae6fd 44%, #fde68a 78%, #fbbf24 100%); }
.city::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: repeating-linear-gradient(90deg, #3f4c5f 0 11px, transparent 11px 19px,
    #55637a 19px 28px, transparent 28px 40px, #334155 40px 52px, transparent 52px 63px);
  opacity: .45;
}
.window-frame { position: absolute; inset: 0; background:
  linear-gradient(90deg, transparent 49.4%, #9aa8b8 49.4% 50.6%, transparent 50.6%),
  linear-gradient(180deg, transparent 49.4%, #9aa8b8 49.4% 50.6%, transparent 50.6%); }
.scene-shelf { position: absolute; left: 392px; top: 176px; width: 140px;
  transform: translateZ(-146px); display: flex; flex-direction: column; gap: 30px; }
.scene-shelf span { display: block; height: 9px; border-radius: 2px;
  background: linear-gradient(90deg, #a16207, #7c4a08);
  box-shadow: 0 3px 6px rgba(15, 23, 42, .22); }
.scene-desk {
  position: absolute; left: 128px; top: 246px; width: 204px; height: 66px;
  transform: translateZ(24px);
}
.desk-top {
  position: absolute; left: 0; top: 0; width: 200px; height: 26px;
  transform: skewX(-16deg); border-radius: 3px;
  background: linear-gradient(180deg, #d97706, #b45309);
  box-shadow: 0 10px 18px rgba(15, 23, 42, .24);
}
.desk-face {
  position: absolute; left: 12px; top: 13px; width: 180px; height: 53px;
  background: linear-gradient(180deg, #a1540b, #7a3a07);
  border-radius: 0 0 3px 3px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.12);
}
.desk-leg { position: absolute; top: 30px; width: 9px; height: 40px;
  background: linear-gradient(180deg, #6b2f0a, #431a05); border-radius: 0 0 2px 2px; }
.desk-leg.l { left: 18px; }
.desk-leg.r { right: 18px; }
.desk-screen {
  position: absolute; left: 54px; top: -56px; width: 96px; height: 54px;
  border-radius: 4px; background: #0f172a; border: 4px solid #334155;
  box-shadow: inset 0 0 16px rgba(16, 185, 129, .55), 0 6px 12px rgba(15,23,42,.2);
}
.desk-screen::before {
  content: ''; position: absolute; left: 50%; bottom: -14px; width: 12px; height: 12px;
  transform: translateX(-50%); background: #334155;
}
.desk-screen::after {
  content: ''; position: absolute; left: 50%; bottom: -18px; width: 42px; height: 5px;
  transform: translateX(-50%); background: #475569; border-radius: 2px;
}
.scene-rug {
  position: absolute; left: 190px; top: 352px; width: 320px; height: 160px;
  transform-origin: top center; transform: rotateX(90deg) translateZ(3px);
  border-radius: 46%; background: radial-gradient(circle at 50% 42%, #a7f3d0, #6ee7b7 58%, #34d399 100%);
  opacity: .9; box-shadow: 0 0 0 6px rgba(52, 211, 153, .25);
}
.scene-agents {
  position: absolute; left: 50%; top: 0; width: 600px; height: 100%;
  transform: translateX(-50%); pointer-events: none;
}
.scene-agent {
  position: absolute; left: var(--x); top: calc(74% + var(--r) * 54px);
  transform: translateX(-50%); display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}
.scene-agent-dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--emerald), var(--emerald-2)); color: #fff;
  font-weight: 800; font-size: 13px; border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(5, 150, 105, .4);
}
.scene-agent-name {
  font-size: 9.5px; font-weight: 700; color: #064e3b; background: #ecfdf5;
  border: 1px solid #a7f3d0; padding: 1px 6px; border-radius: 999px;
  max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scene-empty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .94); border: 1px dashed #94a3b8; border-radius: 12px;
  padding: 10px 16px; font-size: 13px; color: #475569; text-align: center; max-width: 300px;
}
.scene-hint {
  position: absolute; right: 12px; bottom: 10px; font-size: 11.5px; color: #475569;
  background: rgba(255, 255, 255, .88); border-radius: 999px; padding: 4px 10px;
}

/* ---------- statistik ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar-label { font-weight: 600; color: #334155; }
.bar-track { height: 12px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.bar-grey { background: #94a3b8; }
.bar-amber { background: var(--amber); }
.bar-green { background: var(--emerald); }
.bar-num { text-align: right; font-weight: 700; }
.tips-list-plain { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.tips-list-plain li { padding-left: 14px; position: relative; }
.tips-list-plain li::before { content: '•'; position: absolute; left: 0; color: var(--emerald); font-weight: 800; }

/* ---------- mining ---------- */
.mining-card { background: linear-gradient(160deg, #ffffff 0%, #f6fefb 100%); }
.section > .grid { align-items: start; }
.mining-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mining-num { font-size: 19px; font-weight: 750; letter-spacing: -.01em; color: #065f46; }
.xp-bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.xp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--emerald-2)); border-radius: 999px; transition: width .4s; }
.mining-timer { font-family: ui-monospace, monospace; font-weight: 700; font-size: 14px; color: #065f46; }

/* ---------- profil ---------- */
.avatar-xl { width: 78px; height: 78px; font-size: 30px; }
.avatar-img { object-fit: cover; border-radius: 50%; }
.badge-groups { display: flex; flex-direction: column; gap: 6px; }
.badge-group { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.badge-catalog { display: flex; flex-direction: column; gap: 16px; }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.badge-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: #fcfdfe; }
.badge-item.locked { background: #f8fafc; opacity: .92; }
.badge-lock { font-size: 16px; flex: 0 0 auto; }
.badge-item b { font-size: 13px; }

@media (max-width: 860px) {
  .mining-grid, .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-stage { height: 320px; }
  .scene { transform-origin: center center; scale: .72; }
  .scene-svg { max-width: 100%; }
}
