/* Mesaj Merkezi panel — one accent, neutral surfaces, 4/8/12/16 spacing. */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f3;
  --line: #e5e7eb;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --accent: #0f8a74;
  --accent-hover: #0c735f;
  --accent-weak: #e7f4f1;
  --danger: #c0262d;
  --danger-weak: #fdecec;
  --warn: #a15c07;
  --warn-weak: #fdf3e3;
  --note: #fff8db;
  --note-line: #e6c34a;
  --bubble-in: #ffffff;
  --bubble-out: #dcf5e9;
  --chat-bg: #f3f4f6;
  --badge: #e0373f;
  --shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 1px 3px rgba(17, 24, 39, .08);
  --shadow-lg: 0 10px 30px rgba(17, 24, 39, .18);
  --r: 10px;
  --r-sm: 8px;
}

[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #161c23;
  --surface-2: #1d252e;
  --line: #27313c;
  --text: #e8ecf1;
  --text-2: #c9d1da;
  --muted: #8b97a5;
  --accent: #2fbf9f;
  --accent-hover: #3fd1b0;
  --accent-weak: #133a33;
  --danger: #f2707a;
  --danger-weak: #3a1a1e;
  --warn: #f0b45a;
  --warn-weak: #3a2a12;
  --note: #3a3418;
  --note-line: #8a7424;
  --bubble-in: #1d252e;
  --bubble-out: #14423a;
  --chat-bg: #0b1015;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { font: inherit; color: var(--text); }
svg.i { width: 18px; height: 18px; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); font-weight: 500; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--surface); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
[data-theme="dark"] .btn--primary { color: #04221c; }
.btn--danger { color: var(--danger); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn--block { width: 100%; height: 40px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; }

/* ---------- top bar & header ---------- */
.topbar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.topbar__title { font-size: 15px; font-weight: 650; }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.me { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 4px; border: 0; border-radius: 999px; background: transparent; }
.me:hover { background: var(--surface-2); }
.me__dot { width: 8px; height: 8px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 2px var(--bg); margin-left: -14px; margin-top: 18px; }
.me__dot--away { background: #e8a33d; }

.head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 8px 8px 6px; border-bottom: 1px solid var(--line); flex: none; }
.head__who { flex: 1; min-width: 0; }
.head__name { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__sub b { color: var(--text-2); font-weight: 600; }

.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 13px; color: #fff; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }

/* ---------- search & tabs ---------- */
.search { position: relative; margin: 12px 16px 8px; flex: none; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--bg); }

.seg { display: flex; gap: 2px; margin: 0 16px 8px; padding: 3px; border-radius: var(--r-sm); background: var(--surface-2); flex: none; }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
.seg button.is-on { background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.seg .n { min-width: 16px; padding: 0 4px; border-radius: 8px; font-size: 10px; line-height: 16px; background: var(--line); color: var(--text-2); }
.seg .n--hot { background: var(--badge); color: #fff; }
.seg--chat { margin: 8px 12px; }

/* ---------- conversation list ---------- */
.list { flex: 1; overflow-y: auto; }
.row { display: flex; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; }
.row:hover { background: var(--surface); }
.row__body { flex: 1; min-width: 0; }
.row__top { display: flex; align-items: baseline; gap: 8px; }
.row__name { flex: 1; min-width: 0; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row--unread .row__name { font-weight: 700; }
.row__time { flex: none; font-size: 11px; color: var(--muted); }
.row--unread .row__time { color: var(--accent); font-weight: 600; }
.row__mid { display: flex; align-items: center; gap: 8px; margin-top: 1px; }
.row__last { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row--unread .row__last { color: var(--text-2); }
.row__meta { margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.badge { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--badge); color: #fff; font-size: 11px; font-weight: 650; line-height: 18px; text-align: center; }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 550; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip--warn { background: var(--warn-weak); color: var(--warn); }
.chip--danger { background: var(--danger-weak); color: var(--danger); }
.chip--ok { background: var(--accent-weak); color: var(--accent); }

.empty { flex: 1; display: grid; place-items: center; padding: 32px 24px; text-align: center; color: var(--muted); }
.empty svg { width: 28px; height: 28px; margin-bottom: 8px; opacity: .6; }

.ctxbar { margin: 4px 16px 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--accent-weak); color: var(--text-2); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.ctxbar b { color: var(--text); }
.offer-files { margin: -4px 16px 8px; padding: 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); font-size: 12px; }
.offer-files__title { font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.offer-files__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ofile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ofile__thumb { display: grid; place-items: center; height: 76px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.ofile__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ofile small { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ofile .btn, .ofile .chip { justify-content: center; }
.attach { display: flex; gap: 6px; margin-top: 6px; }
.attach button { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 11.5px; font-weight: 550; }
.attach button svg.i { width: 14px; height: 14px; }
.attach__main { color: var(--accent); border-color: var(--accent) !important; }
.attach__main:hover { background: var(--accent-weak) !important; }
.attach__more { color: var(--muted); }
.ctxbar--warn { margin: 0; border-radius: 0; background: var(--warn-weak); color: var(--warn); }
.ctxbar--warn .btn { flex: none; }

/* ---------- toast ---------- */
.toast { position: absolute; left: 12px; right: 12px; top: 8px; z-index: 30; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: #1f2937; color: #fff; box-shadow: var(--shadow-lg); font-size: 12px; }
.toast--err { background: #8f1d23; }
.toast--info { background: #0c5f50; align-items: center; }
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: #fff; opacity: .8; padding: 0; }
.toast .toast__act { opacity: 1; padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); font-weight: 600; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 12px; background: var(--chat-bg); display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 84%; padding: 7px 10px 5px; border-radius: 12px; border-top-left-radius: 4px; background: var(--bubble-in); box-shadow: var(--shadow); word-wrap: break-word; }
.bubble--out { align-self: flex-end; background: var(--bubble-out); border-top-left-radius: 12px; border-top-right-radius: 4px; }
.bubble__text { white-space: pre-wrap; }
.bubble__meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.bubble__meta .read { color: #2b8fd6; }
.bubble__ctx { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.bubble__err { font-size: 12px; color: var(--danger); margin-top: 2px; }
.bubble__chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.photo { display: block; max-width: 220px; max-height: 260px; border-radius: 8px; }
.file { display: flex; gap: 10px; align-items: center; padding: 8px; margin: 2px 0 4px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .04); color: inherit; text-decoration: none; }
[data-theme="dark"] .file { background: rgba(255, 255, 255, .05); }
.file:hover b { text-decoration: underline; }
.file__ext { flex: none; width: 34px; height: 40px; border-radius: 6px; background: #d4423b; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.file b { display: block; font-weight: 600; word-break: break-all; }
.file small { color: var(--muted); }
.sys { align-self: center; max-width: 92%; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; text-align: center; }
.sys--ok { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.note { align-self: stretch; padding: 8px 10px; border-radius: var(--r-sm); background: var(--note); border-left: 3px solid var(--note-line); }
.note__head { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.note__head svg { width: 13px; height: 13px; }

.audio { display: block; width: 240px; max-width: 100%; height: 36px; margin: 2px 0; }
.transcript { margin-top: 4px; padding: 6px 8px; border-left: 2px solid var(--accent); border-radius: 4px; background: rgba(0, 0, 0, .03); font-size: 12px; color: var(--text-2); white-space: pre-wrap; }
[data-theme="dark"] .transcript { background: rgba(255, 255, 255, .04); }

.composer { position: relative; flex: none; border-top: 1px solid var(--line); background: var(--bg); padding: 6px 8px 8px; }
.qr { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 4px); z-index: 10; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); box-shadow: var(--shadow-lg); }
.qr__item { display: flex; gap: 10px; align-items: baseline; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none; text-align: left; }
.qr__item b { flex: none; color: var(--accent); }
.qr__item span { min-width: 0; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr__item.is-on, .qr__item:hover { background: var(--surface-2); }
.composer__status { display: flex; align-items: center; gap: 6px; padding: 0 4px 6px; font-size: 11px; color: var(--muted); }
.composer__status--warn { color: var(--warn); }
.composer__row { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { flex: 1; min-height: 36px; max-height: 120px; resize: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); line-height: 1.35; }
.composer textarea:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.composer textarea:disabled { opacity: .6; }
.send-btn { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
[data-theme="dark"] .send-btn { color: #04221c; }
.plus-btn { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--text-2); display: grid; place-items: center; }
.plus-btn:hover { background: var(--surface); }

/* ---------- cards (cari, b2b, admin) ---------- */
.pane { flex: 1; overflow-y: auto; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.balance { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.balance--debt { color: var(--danger); }
.balance--credit { color: var(--accent); }
.balance small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin-top: 12px; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 550; }
.kv dd.danger { color: var(--danger); }
.actions { display: flex; flex-direction: column; }
.action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.action:first-child { border-top: 0; }
.action:hover:not(:disabled) .action__label { color: var(--accent); }
.action__icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); flex: none; }
.action__label { font-weight: 600; }
.action__hint { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.action--danger .action__icon { background: var(--danger-weak); color: var(--danger); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:first-child td { border-top: 0; }
.tbl .r { text-align: right; white-space: nowrap; padding-left: 8px; }
.tbl small { display: block; color: var(--muted); }
.total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 650; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { flex: none; width: 74px; color: var(--muted); font-size: 11px; }
.card__tools { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.card .inline-form + small { display: block; margin-top: 6px; font-size: 11px; }
.inline-form input { min-width: 0; }
.inline-form .qty { flex: 0 0 64px; width: 64px; text-align: right; }
.icon-btn--sm { width: 28px; height: 28px; }
.icon-btn--xs { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; line-height: 1; color: var(--text-2); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper b { min-width: 18px; text-align: center; }
.search--card { margin: 0 0 8px; }
.prod { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.search--card + .prod, .sub + .prod { border-top: 0; }
.prod__body { flex: 1; min-width: 0; }
.prod__name { font-weight: 600; font-size: 13px; }
.prod__body small, .prod__price small { display: block; color: var(--muted); font-size: 11px; }
.prod__body .ok { color: var(--accent); }
.prod__body .warn { color: var(--warn); }
.prod__price { text-align: right; white-space: nowrap; font-weight: 650; }
.prod__acts { display: flex; gap: 2px; flex: none; }
.sub { margin: 14px 0 4px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.sub small { font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-btn--sm svg.i { width: 16px; height: 16px; }
.meter { margin-top: 12px; }
.meter__top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.meter__top b { color: var(--text); }
.meter__bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter__bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.meter__bar i.warm { background: #d98a12; }
.meter__bar i.hot { background: var(--danger); }
.meter__top b.warm { color: var(--warn); }
.meter__top b.hot { color: var(--danger); }
.meter small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.rem__icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.rem__icon--due { background: var(--warn-weak); color: var(--warn); }
.summary, .preview { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; line-height: 1.5; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
small.danger, .danger { color: var(--danger); }
.urow--top { align-items: flex-start; }
.urow__name .chip { vertical-align: 1px; margin-left: 2px; }
.ex { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ex b { flex: 0 0 34px; font-size: 12px; color: var(--accent); }
.ex input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.wa-preview { padding: 12px; border-radius: var(--r-sm); background: var(--chat-bg); }
.wa-preview__bubble { max-width: 90%; padding: 8px 10px; border-radius: 10px; border-top-left-radius: 4px; background: var(--bubble-in); box-shadow: var(--shadow); white-space: pre-wrap; }
.wa-preview__bubble b { display: block; margin-bottom: 4px; }
.wa-preview__bubble small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.muted { color: var(--muted); }
.hint { padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-weak); color: var(--warn); font-size: 12px; }
.hint--info { background: var(--surface-2); color: var(--text-2); }

/* ---------- sheet (bottom drawer) ---------- */
.backdrop { position: absolute; inset: 0; z-index: 20; background: rgba(17, 24, 39, .35); animation: fade .15s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 85%; overflow-y: auto; padding: 8px 16px 16px; border-radius: 16px 16px 0 0; background: var(--bg); box-shadow: var(--shadow-lg); animation: up .18s ease; }
.sheet__grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
.sheet__title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.sheet__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.menu { display: flex; flex-direction: column; margin: 0 -8px; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; }
.menu button:hover:not(:disabled) { background: var(--surface); }
.menu svg { color: var(--muted); }
.menu small { display: block; color: var(--muted); font-size: 11px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.field textarea { min-height: 80px; resize: vertical; }
.field small { color: var(--muted); font-size: 11px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- compose (PDF send) ---------- */
.page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.page__body { flex: 1; overflow-y: auto; padding: 16px; }
.page__foot { flex: none; display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.page__foot .btn { flex: 1; height: 38px; }
.pdf { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; background: var(--surface); }
.pdf iframe { display: block; width: 100%; height: 240px; border: 0; background: #fff; }
.pdf__meta { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.pdf__wait { padding: 40px 12px; text-align: center; color: var(--muted); }
.spin { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.login { margin: auto; width: 100%; max-width: 340px; padding: 24px; }
.login__mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.login__mark svg { width: 24px; height: 24px; }
.login h1 { margin: 0 0 4px; font-size: 20px; }
.login p { margin: 0 0 20px; color: var(--muted); }

/* ---------- admin ---------- */
.urow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.urow:first-child { border-top: 0; }
.urow__body { flex: 1; min-width: 0; }
.urow__name { font-weight: 600; }
.urow small { display: block; color: var(--muted); font-size: 11px; }
.urow--off { opacity: .5; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }

/* ---------- web chat: visitors on the site ---------- */
.seg .n--live { background: var(--accent); color: #fff; }
.vis-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 16px 8px; font-size: 12px; color: var(--muted); }
.vis-head .link-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.vis-head svg.i { width: 14px; height: 14px; }
.row--visitor { align-items: center; cursor: default; }
.row--visitor > .btn { flex: none; }
.bubble__page { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bubble__page svg.i { width: 12px; height: 12px; }
