:root {
  --brand: #6366f1;
  --brand-2: #14b8a6;
  --brand-strong: #4f46e5;
  --brand-soft: rgba(99, 102, 241, .12);
  --accent: #14b8a6;
  --danger: #ef4444;
  --ok: #10b981;
  --warn: #f59e0b;
  --text: #1e293b;
  --muted: #5b6478;
  --link: #4f46e5;
  --bg: #eaf0fb;
  --card: rgba(255, 255, 255, .55);
  --card-strong: rgba(255, 255, 255, .78);
  --card-muted: rgba(255, 255, 255, .35);
  --border: rgba(255, 255, 255, .7);
  --border-strong: rgba(148, 158, 210, .45);
  --glass-blur: 16px;
  --glass-saturate: 170%;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(89, 96, 180, .1);
  --shadow: 0 18px 42px rgba(80, 88, 180, .16), 0 3px 10px rgba(80, 88, 180, .08);
  --shadow-lg: 0 30px 80px rgba(50, 60, 150, .28), 0 8px 24px rgba(50, 60, 150, .14);
  --focus: 0 0 0 3px rgba(99, 102, 241, .25);
}

:root[data-theme="dark"] {
  --brand: #818cf8;
  --brand-2: #2dd4bf;
  --brand-strong: #6366f1;
  --brand-soft: rgba(129, 140, 248, .18);
  --text: #e6e9f5;
  --muted: #a3acc4;
  --link: #a5b4fc;
  --bg: #0f1220;
  --card: rgba(28, 32, 56, .55);
  --card-strong: rgba(34, 39, 66, .8);
  --card-muted: rgba(28, 32, 56, .35);
  --border: rgba(255, 255, 255, .14);
  --border-strong: rgba(148, 158, 210, .35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow: 0 18px 42px rgba(0, 0, 0, .4), 0 3px 10px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .3);
  --focus: 0 0 0 3px rgba(129, 140, 248, .35);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42rem 42rem at 6% 10%, rgba(99, 102, 241, .28), transparent 62%),
    radial-gradient(46rem 46rem at 94% 6%, rgba(20, 184, 166, .25), transparent 64%),
    radial-gradient(44rem 44rem at 82% 92%, rgba(236, 72, 153, .18), transparent 64%),
    radial-gradient(50rem 50rem at 4% 88%, rgba(56, 189, 248, .2), transparent 66%),
    linear-gradient(180deg, #eef3fc 0%, #e3ecfb 100%);
}

:root[data-theme="dark"] body::before {
  background:
    radial-gradient(42rem 42rem at 8% 12%, rgba(99, 102, 241, .4), transparent 62%),
    radial-gradient(52rem 52rem at 92% 8%, rgba(168, 85, 247, .35), transparent 64%),
    radial-gradient(46rem 46rem at 78% 88%, rgba(20, 184, 166, .28), transparent 64%),
    radial-gradient(50rem 50rem at 6% 85%, rgba(56, 189, 248, .26), transparent 66%),
    linear-gradient(180deg, #0c0f1c 0%, #151a2e 100%);
}

button, input, textarea { font: inherit; color: inherit; }

a { color: var(--link); }

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px clamp(12px, 3vw, 26px) 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--card-strong); }
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  position: sticky;
  top: 10px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .3px;
}

.brand .logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.brand .logo svg { width: 19px; height: 19px; }

.brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .6px;
  color: var(--muted);
  text-transform: uppercase;
}

.topbar .spacer { flex: 1; }

.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-muted);
  border: 1px solid var(--border);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

.conn.online .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.conn.offline .dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }

.icon-btn {
  border: 1px solid var(--border);
  background: var(--card-muted);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.icon-btn:hover { background: var(--card-strong); transform: translateY(-1px); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.icon-btn svg { width: 19px; height: 19px; }

/* ===== Layout ===== */
.layout {
  display: grid;
  grid-template-columns: minmax(360px, 430px) 1fr;
  gap: 16px;
  align-items: start;
}

.col-send { position: sticky; top: 84px; }

.panel { padding: 18px; }
.panel + .panel { margin-top: 16px; }

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 0 0 14px;
}

.panel-title .count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

:root[data-theme="dark"] .panel-title .count { color: var(--brand); }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ===== Dropzone ===== */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  background: var(--card-muted);
}

.dropzone:hover, .dropzone.drag {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.dropzone.drag { transform: scale(1.01); }

.dropzone svg { width: 44px; height: 44px; color: var(--brand); }
.dropzone .dz-title { font-weight: 700; margin-top: 8px; }
.dropzone .dz-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== Chips ===== */
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 0 8px;
  display: block;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  border: 1px solid var(--border-strong);
  background: var(--card-muted);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.chip.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  color: #fff;
}

/* ===== Textarea ===== */
textarea.text-input {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--card-strong);
  outline: none;
  line-height: 1.5;
}

textarea.text-input:focus { border-color: var(--brand); box-shadow: var(--focus); }

/* ===== Buttons ===== */
.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }

.btn-ghost {
  background: var(--card-muted);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) { background: var(--card-strong); }

.btn-danger {
  background: linear-gradient(135deg, #f87171, var(--danger));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover:not(:disabled) { filter: brightness(1.06); }

.btn-block { width: 100%; margin-top: 12px; }

.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-sm svg { width: 15px; height: 15px; }

/* ===== Queue ===== */
.queue-summary {
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

:root[data-theme="dark"] .queue-summary { color: var(--brand); }

.queue { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }

.queue-item {
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: opacity .2s ease, border-color .2s ease;
}

.queue-item.waiting {
  opacity: .55;
  border-style: dashed;
}

.queue-item.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-soft);
}

.queue-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.queue-head .qname {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.queue-head .qsize { font-size: 11.5px; color: var(--muted); }

.progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .3);
  overflow: hidden;
  margin-top: 9px;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .2s ease;
}

.queue-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}

.queue-item.done .progress > span { background: var(--ok); }
.queue-item.error .progress > span { background: var(--danger); }

.q-cancel {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  padding: 2px;
  display: grid;
  place-items: center;
}

.q-cancel svg { width: 15px; height: 15px; }

/* ===== Feed ===== */
.feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.feed-head .panel-title { margin: 0; }

.search {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--card-muted);
  border: 1px solid var(--border-strong);
}

.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
}

.filters { display: flex; gap: 6px; }
.filters .chip { padding: 6px 11px; }

.feed-list { display: flex; flex-direction: column; gap: 11px; }

.item-card {
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  gap: 13px;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}

.item-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.item-card.new { animation: pop .5s ease; border-color: var(--brand); }

@keyframes pop {
  0% { opacity: 0; transform: translateY(-8px) scale(.98); }
  100% { opacity: 1; transform: none; }
}

.item-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

:root[data-theme="dark"] .item-icon { color: var(--brand); }
.item-icon svg { width: 23px; height: 23px; }

.item-body { flex: 1; min-width: 0; }

.item-name {
  font-weight: 700;
  font-size: 14.5px;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.item-name .badge-mine {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

:root[data-theme="dark"] .item-name .badge-mine { color: var(--brand); }

.item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.item-meta .sep { opacity: .5; }

.item-text {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card-muted);
  border: 1px solid var(--border);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 132px;
  overflow: hidden;
  cursor: pointer;
}

.item-text.expanded { max-height: 420px; overflow: auto; }

.item-text a {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
  cursor: pointer;
}

.item-text a:hover { color: var(--brand); }

/* ===== Media pratinjau di kartu ===== */
.item-media {
  position: relative;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-muted);
}

.item-thumb {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  cursor: zoom-in;
}

.item-media.video {
  cursor: pointer;
  min-height: 168px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(20, 184, 166, .28));
}
.item-media.video .item-thumb { cursor: pointer; background: #0b0f1a; }

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 12, 22, .35);
  transition: background .15s ease;
}

.item-media.video:hover .play-overlay { background: rgba(10, 12, 22, .5); }

.play-overlay .play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .9);
  color: var(--brand-strong);
  box-shadow: var(--shadow);
}

.play-overlay .play-circle svg { width: 24px; height: 24px; }

.item-audio {
  width: 100%;
  margin-top: 10px;
  height: 38px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.empty {
  text-align: center;
  padding: 40px 18px;
  color: var(--muted);
}

.empty svg { width: 54px; height: 54px; opacity: .55; }
.empty p { margin: 10px 0 0; font-size: 14px; }

/* ===== Toast ===== */
.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(360px, 92vw);
}

.toast {
  padding: 12px 15px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--card-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: slideIn .25s ease;
  display: flex;
  align-items: center;
  gap: 9px;
}

.toast::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.toast.ok::before { background: var(--ok); }
.toast.error::before { background: var(--danger); }
.toast.warn::before { background: var(--warn); }
.toast.leaving { animation: fadeOut .25s ease forwards; }

@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(24px); } }

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 18, 32, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal.open { display: grid; }

.modal-card {
  width: min(420px, 100%);
  padding: 22px;
  text-align: center;
}

.modal-card h3 { margin: 0 0 4px; font-size: 18px; }
.modal-card p { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.modal-card img.qr { width: 240px; height: 240px; max-width: 80vw; border-radius: 14px; background: #fff; padding: 10px; }

.link-box {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.link-box input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--card-muted);
  outline: none;
  font-size: 13px;
}

.modal-close { margin-top: 16px; }

.modal-card h3 + p { margin-top: 6px; }

.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ===== Lightbox pratinjau ===== */
.preview-modal { background: rgba(8, 10, 18, .78); }

.preview-modal .modal-card {
  width: min(1000px, 94vw);
  padding: 14px;
  text-align: left;
  background: rgba(18, 20, 34, .82);
  border-color: rgba(255, 255, 255, .16);
}

.preview-stage {
  display: grid;
  place-items: center;
  min-height: 160px;
  max-height: 78vh;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0, 0, 0, .25);
}

.preview-stage img,
.preview-stage video {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
}

.preview-stage audio { width: 100%; }

.preview-stage iframe {
  width: 100%;
  height: 78vh;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.preview-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #eef1fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-modal .btn-ghost {
  color: #eef1fb;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .12);
}

.preview-modal .modal-card { position: relative; }

/* ===== Footer bar ===== */
.footbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.disk-bar {
  flex: 1;
  min-width: 140px;
  max-width: 320px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .3);
  overflow: hidden;
}

.disk-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ok), var(--warn));
  width: 0;
}

.footbar .low { color: var(--danger); font-weight: 700; }

.mobile-tabs { display: none; }

.hidden { display: none !important; }

/* ===== Pengguna & kirim privat ===== */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card-muted);
  border-radius: 12px;
  height: 40px;
  padding: 0 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  max-width: 220px;
}

.user-chip:hover { background: var(--card-strong); }
.user-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.user-chip svg { width: 17px; height: 17px; flex: none; color: var(--brand-strong); }
:root[data-theme="dark"] .user-chip svg { color: var(--brand); }

.user-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-chip-count {
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  display: grid;
  place-items: center;
}

:root[data-theme="dark"] .user-chip-count { color: var(--brand); }

.target-chips { margin-bottom: 14px; }

.target-chip {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-more {
  border-style: dashed;
  color: var(--brand-strong);
  white-space: nowrap;
}

:root[data-theme="dark"] .target-more { color: var(--brand); }

.target-hint {
  font-size: 12px;
  color: var(--muted);
  align-self: center;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--card-muted);
  color: var(--text);
  font-size: 14px;
  outline: none;
  text-align: left;
}

.field-input:focus { border-color: var(--brand); box-shadow: var(--focus); }

.item-card.private { border-color: rgba(99, 102, 241, .5); }

.item-name .badge-private {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .16);
  color: #0f766e;
}

.item-name .badge-private svg { width: 11px; height: 11px; }
:root[data-theme="dark"] .item-name .badge-private { color: var(--brand-2); background: rgba(45, 212, 191, .16); }

.user-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--card-muted);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}

.user-row:hover { background: var(--card-strong); }
.user-row.active { border-color: var(--brand); background: var(--brand-soft); }
.user-row.self { cursor: default; border-color: var(--brand); background: var(--brand-soft); }
.user-row.self:hover { background: var(--brand-soft); }

.user-sep {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin: 6px 2px 0;
}

.user-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.user-row .user-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .user-status { font-size: 11px; font-weight: 600; color: var(--ok); }
.user-row .user-status.self { color: var(--brand-strong); text-transform: uppercase; letter-spacing: .4px; }
:root[data-theme="dark"] .user-row .user-status.self { color: var(--brand); }
.user-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .layout { grid-template-columns: 1fr; }
  .col-send { position: static; }
  .col-send .panel + .panel { margin-top: 14px; }
  .topbar { position: static; }
  .mobile-tabs { display: flex; }
  .mobile-only { display: block; }
  .col-send, .col-feed { display: none; }
  .layout[data-active="send"] .col-send { display: block; }
  .layout[data-active="feed"] .col-feed { display: block; }
}

@media (max-width: 520px) {
  .brand small { display: none; }
  .conn #connText { display: none; }
  .conn { padding: 8px; }
  .user-chip-name { display: none; }
  .user-chip { padding: 0 10px; gap: 6px; }
  .item-text { max-height: 180px; }
}
