:root {
  --bg: #f4f5f7;
  --chat-bg: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f8f9fb;
  --border: #e3e6eb;
  --text: #1c2330;
  --muted: #6b7484;
  --accent: #2f6fed;
  --accent-soft: #e6eefe;
  --out: #dcebff;
  --in: #ffffff;
  --danger: #d6453d;
  --danger-soft: #fdeceb;
  --ok: #2aa868;
  --warn: #d99a1e;
  --hover: #eef1f5;
  --shadow: 0 8px 30px rgba(20, 30, 50, .14);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1217;
    --chat-bg: #0c0f14;
    --panel: #161a21;
    --panel-2: #1b2029;
    --border: #262c37;
    --text: #e6e9ef;
    --muted: #8a93a3;
    --accent: #5b8cff;
    --accent-soft: #1f2a44;
    --out: #22385c;
    --in: #1c2129;
    --danger: #ff6b61;
    --danger-soft: #3a1f1e;
    --hover: #1f2530;
    --shadow: 0 8px 30px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- controls ---------- */
.btn {
  border: 1px solid var(--border); background: var(--panel); border-radius: 8px;
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, .select, textarea, .modal-body input, .modal-body select {
  border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 7px 10px;
  outline: none; width: 100%;
}
.input:focus, textarea:focus, .modal-body input:focus, .modal-body select:focus { border-color: var(--accent); }
.select { width: auto; min-width: 200px; }
.form-error { color: var(--danger); min-height: 18px; font-size: 13px; }

/* ---------- login ---------- */
.login-screen { height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
}
.login-card label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.login-card input { border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 9px 10px; }

/* ---------- layout ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 6px; }
.brand-lg { font-size: 20px; margin-bottom: 6px; }
.brand-mark { color: var(--accent); }
.spacer { flex: 1; }
.me { color: var(--muted); font-size: 13px; }
.main { flex: 1; display: grid; grid-template-columns: 260px 330px 1fr; min-height: 0; }

/* ---------- avatars ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 14px; position: relative; overflow: hidden; user-select: none;
}
.avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-wrap { position: relative; flex: none; }
.av-wrap .dot {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--panel); background: var(--muted); z-index: 1;
}
.dot.active, .dot.online { background: var(--ok); }
.dot.revoked, .dot.error, .dot.banned { background: var(--danger); }
.dot.pending, .dot.offline { background: var(--warn); }

/* ---------- accounts rail ---------- */
.rail { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.rail-search { padding: 10px; border-bottom: 1px solid var(--border); }
.acc-list { flex: 1; overflow-y: auto; padding: 4px 6px 10px; }
.group-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  padding: 12px 8px 4px; display: flex; justify-content: space-between; gap: 6px;
}
.group-head .mgr { text-transform: none; letter-spacing: 0; opacity: .8; }
.acc {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer;
  position: relative;
}
.acc:hover { background: var(--hover); }
.acc.active { background: var(--accent-soft); }
.acc .num { position: absolute; left: 2px; top: 2px; font-size: 9px; color: var(--muted); z-index: 2; }
.acc .avatar { width: 38px; height: 38px; font-size: 13px; }
.acc-info { min-width: 0; flex: 1; }
.acc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  background: var(--accent); color: #fff; border-radius: 10px; min-width: 20px; height: 20px;
  padding: 0 6px; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; flex: none;
}
.hint { font-size: 11px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--border); line-height: 1.5; }

/* ---------- dialogs ---------- */
.dialogs { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.dlg-head { padding: 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.tabs { display: flex; gap: 4px; }
.tab { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dlg-list { flex: 1; overflow-y: auto; }
.dlg { display: flex; gap: 10px; padding: 8px 12px; cursor: pointer; align-items: center; }
.dlg .avatar { width: 46px; height: 46px; font-size: 15px; }
.dlg:hover { background: var(--hover); }
.dlg.active { background: var(--accent-soft); }
.dlg-body { flex: 1; min-width: 0; }
.dlg-top { display: flex; justify-content: space-between; gap: 6px; }
.dlg-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-time { font-size: 11px; color: var(--muted); flex: none; }
.dlg-bottom { display: flex; justify-content: space-between; gap: 6px; align-items: center; margin-top: 2px; }
.dlg-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typing { color: var(--accent) !important; font-style: italic; }
.online-text { color: var(--accent); }
.chk { color: var(--muted); font-size: 11px; letter-spacing: -3px; margin-right: 3px; }
.chk.read { color: var(--accent); }
.empty { color: var(--muted); padding: 30px 16px; text-align: center; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; background: var(--chat-bg); }
.chat-head {
  min-height: 58px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.head-text { flex: 1; min-width: 0; }
.chat-head .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .sub { font-size: 12px; color: var(--muted); }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; color: var(--muted); min-width: 0; }
.head-side .copy { cursor: pointer; color: var(--accent); }
.head-side .copy:hover { text-decoration: underline; }
.head-side .via { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.banner { padding: 8px 16px; font-size: 13px; background: var(--danger-soft); color: var(--danger); display: flex; gap: 10px; align-items: center; }
.banner.info { background: var(--accent-soft); color: var(--accent); }

.msg-wrap { flex: 1; position: relative; min-height: 0; display: flex; }
.msg-list { flex: 1; overflow-y: auto; padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.day { align-self: center; font-size: 12px; color: var(--muted); background: var(--panel); border-radius: 12px; padding: 2px 10px; margin: 10px 0 6px; position: sticky; top: 4px; z-index: 1; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.service-msg { align-self: center; color: var(--muted); font-size: 12px; padding: 4px 10px; }
.load-more { align-self: center; font-size: 12px; color: var(--muted); padding: 6px; }

.msg-row { display: flex; align-items: flex-end; gap: 4px; }
.msg-row.out { flex-direction: row-reverse; }
.msg-row.flash .msg { box-shadow: 0 0 0 3px var(--accent); transition: box-shadow .3s; }
.msg {
  max-width: min(560px, 76%); padding: 6px 10px 4px; border-radius: 14px; background: var(--in);
  word-wrap: break-word; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.06); min-width: 70px;
}
.msg.out { background: var(--out); }
.msg.bare { background: transparent; box-shadow: none; padding: 0; }
.msg.bare .meta { background: rgba(0,0,0,.35); color: #fff; border-radius: 10px; padding: 0 6px; align-self: flex-end; display: inline-flex; float: right; }
.msg.deleted { outline: 1px dashed var(--danger); opacity: .85; }
.msg .sender { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.msg .text { white-space: pre-wrap; }
.msg .text a { color: var(--accent); }
.msg .meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 1px; flex-wrap: wrap; }
.meta .del { color: var(--danger); font-weight: 600; }
.meta .crm { color: var(--accent); }
.meta .edited { cursor: help; text-decoration: underline dotted; }
.fwd { font-size: 12px; color: var(--accent); margin-bottom: 3px; }
.reply-quote {
  border-left: 3px solid var(--accent); background: rgba(47,111,237,.08); border-radius: 4px;
  padding: 3px 8px; margin-bottom: 4px; cursor: pointer; display: flex; flex-direction: column; font-size: 12px; min-width: 0;
}
.reply-quote b { color: var(--accent); font-weight: 600; }
.reply-quote span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg img.photo { display: block; max-width: 100%; max-height: 380px; min-height: 60px; border-radius: 10px; cursor: zoom-in; margin: 2px 0 4px; background: var(--hover); }
.msg video.video { display: block; max-width: 100%; max-height: 380px; border-radius: 10px; margin: 2px 0 4px; background: #000; }
.msg video.round { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; display: block; background: #000; }
.msg .voice { display: flex; align-items: center; gap: 8px; }
.msg audio { display: block; width: 260px; max-width: 100%; height: 36px; margin: 2px 0; }
.msg .dur { font-size: 12px; color: var(--muted); }
.msg .sticker { font-size: 64px; line-height: 1.1; }
.msg .sticker-img { display: block; width: 160px; height: 160px; object-fit: contain; }
.msg .media-label { color: var(--muted); font-style: italic; }
.msg .file-card { display: inline-block; color: var(--accent); background: var(--hover); padding: 6px 10px; border-radius: 8px; text-decoration: none; margin: 2px 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.react { border: 0; border-radius: 12px; padding: 1px 8px; background: var(--hover); cursor: pointer; font-size: 13px; }
.react.mine { background: var(--accent); color: #fff; }
.react b { font-weight: 600; font-size: 12px; }

.msg-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .1s; padding-bottom: 4px; }
.msg-row:hover .msg-tools { opacity: 1; }
.msg-tools button { border: 0; background: var(--panel); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; color: var(--muted); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.msg-tools button:hover { color: var(--accent); }

.scroll-down {
  position: absolute; right: 18px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--panel); box-shadow: var(--shadow); cursor: pointer; font-size: 18px; color: var(--muted);
}
.scroll-down .badge { position: absolute; top: -6px; right: -4px; }

/* ---------- composer ---------- */
.composer { background: var(--panel); border-top: 1px solid var(--border); padding: 8px 12px 10px; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; max-height: 200px; min-height: 40px; border-radius: 20px; padding: 9px 14px; flex: 1; }
.attach { cursor: pointer; font-size: 20px; padding: 6px 4px; user-select: none; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--hover); cursor: pointer; font-size: 17px; flex: none; }
.round-btn.send { background: var(--accent); color: #fff; }
.round-btn:disabled { opacity: .5; }
.composer-bar { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; }
.composer-bar .bar-icon { color: var(--accent); font-size: 18px; width: 24px; text-align: center; }
.composer-bar .bar-text { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding-left: 8px; display: flex; flex-direction: column; font-size: 12px; }
.composer-bar .bar-text b { color: var(--accent); }
.composer-bar .bar-text span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-preview { display: flex; gap: 10px; align-items: center; padding: 2px 4px 8px; font-size: 13px; }
.file-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.file-preview .file-ico { font-size: 26px; }
.file-preview .fp-name { font-weight: 600; }
.file-preview .fp-hint { color: var(--muted); font-size: 12px; flex: 1; }
.rec-ui { display: none; align-items: center; gap: 10px; height: 40px; }
.composer.recording .composer-row, .composer.recording .composer-bar, .composer.recording .file-preview { display: none !important; }
.composer.recording .rec-ui { display: flex; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.rec-hint { color: var(--muted); flex: 1; }
#recTime { font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes blink { 50% { opacity: .2; } }
.drop-zone {
  position: absolute; inset: 58px 0 0 0; background: rgba(47,111,237,.12); border: 3px dashed var(--accent);
  display: grid; place-items: center; font-size: 18px; color: var(--accent); z-index: 5; pointer-events: none;
}

/* ---------- menu / lightbox ---------- */
.menu {
  position: fixed; z-index: 70; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; min-width: 210px; display: flex; flex-direction: column;
}
.menu-reacts { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 2px 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; max-width: 260px; }
.menu-reacts button { border: 0; background: transparent; font-size: 20px; border-radius: 8px; cursor: pointer; width: 34px; height: 34px; }
.menu-reacts button:hover { background: var(--hover); transform: scale(1.15); }
.menu-item { border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.menu-item:hover { background: var(--hover); }
.menu-item.danger { color: var(--danger); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 80; display: grid; place-items: center; cursor: zoom-out; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(10, 15, 25, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-box { background: var(--panel); border-radius: 14px; width: 100%; max-width: 860px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 16px 18px 20px; overflow-y: auto; }
.modal-body label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.modal-body label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 13px; }
.modal-body label.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 14px; }
.section-title { font-weight: 600; margin: 4px 0 10px; }
.people { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.person { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.person:last-child { border-bottom: 0; }
.person .pname { font-weight: 600; }
.person .plogin { color: var(--muted); font-size: 12px; }
.role { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--hover); color: var(--muted); }
.role.admin { background: var(--danger-soft); color: var(--danger); }
.role.manager { background: var(--accent-soft); color: var(--accent); }
.inactive { opacity: .5; }
table.accs { width: 100%; border-collapse: collapse; }
table.accs th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 6px; border-bottom: 1px solid var(--border); }
table.accs td { padding: 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.accs td input, table.accs td select { padding: 5px 7px; font-size: 13px; }
.status { font-size: 12px; font-weight: 600; }
.status.active { color: var(--ok); }
.status.revoked, .status.error, .status.banned { color: var(--danger); }
.status.pending, .status.offline { color: var(--warn); }
.qr-box { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr-img { width: 240px; height: 240px; background: #fff; border-radius: 12px; padding: 8px; display: grid; place-items: center; flex: none; }
.qr-img svg { width: 100%; height: 100%; }
.qr-steps { flex: 1; min-width: 220px; }
.qr-steps ol { padding-left: 18px; margin: 6px 0; }
.qr-status { margin-top: 10px; font-weight: 600; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; box-shadow: var(--shadow); max-width: 360px; cursor: pointer; }
.toast.error { border-left-color: var(--danger); }

@media (max-width: 1100px) {
  .main { grid-template-columns: 220px 290px 1fr; }
  .head-side { display: none; }
}
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
  .rail, .dialogs { max-height: 40vh; }
  .grid2 { grid-template-columns: 1fr; }
  .msg { max-width: 88%; }
  .msg-tools { opacity: 1; }
}

/* ---------- employees ---------- */
.rail-search { display: flex; flex-direction: column; gap: 8px; }
.add-emp { width: 100%; }
.emp {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 2px; margin-top: 6px; border-radius: 8px; cursor: pointer;
}
.emp:hover { background: var(--hover); }
.emp.active { background: var(--accent-soft); }
.emp .emp-av { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
.emp-info { flex: 1; min-width: 0; }
.emp-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-toggle { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 18px; padding: 0; transition: transform .15s; }
.emp-toggle.closed { transform: rotate(-90deg); }
.emp-add { border: 1px solid var(--border); background: var(--panel); color: var(--accent); border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 16px; line-height: 1; flex: none; opacity: .0; }
.emp:hover .emp-add, .emp.active .emp-add { opacity: 1; }
.acc { margin-left: 18px; }
.acc.in-view { box-shadow: inset 3px 0 0 var(--accent); }
.acc-empty { margin-left: 28px; font-size: 12px; color: var(--muted); padding: 4px 0 6px; }
.acc-empty a { color: var(--accent); }
.dlg-title { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-title b { color: var(--text); }
.dlg-title:empty { display: none; }
.acc-pill {
  display: inline-block; margin-top: 3px; font-size: 10px; padding: 0 6px; border-radius: 8px; max-width: 100%;
  color: var(--c); border: 1px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.owner-summary { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px; max-width: 460px; width: 100%; text-align: center; }
.owner-summary h2 { margin: 4px 0 0; font-size: 20px; }
.owner-summary .muted, .muted { color: var(--muted); font-size: 13px; }
.avatar.big { width: 80px; height: 80px; font-size: 28px; border-radius: 24px; }
.sum-list { width: 100%; display: flex; flex-direction: column; gap: 4px; margin: 10px 0; text-align: left; }
.sum-acc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel); cursor: pointer; }
.sum-acc:hover { background: var(--hover); }

/* ---------- emoji / stickers ---------- */
.round-btn.ghost { background: transparent; }
.round-btn.ghost.on { background: var(--accent-soft); }
.emoji-panel {
  position: absolute; left: 12px; bottom: 64px; width: 370px; max-width: calc(100% - 24px); height: 400px; z-index: 30;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.panel-tabs { display: flex; gap: 4px; padding: 8px 8px 4px; }
.panel-cats { display: flex; gap: 2px; padding: 2px 6px 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; flex: none; }
.panel-cats button { border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: 18px; min-width: 32px; height: 32px; flex: none; }
.sticker-cats button { font-size: 12px; padding: 0 8px; color: var(--muted); }
.sticker-cats button:first-child, .sticker-cats button:nth-child(2) { font-size: 16px; }
.panel-cats button:hover { background: var(--hover); }
.panel-cats button.active { background: var(--accent-soft); color: var(--accent); }
.panel-body { flex: 1; overflow-y: auto; padding: 4px 8px 10px; position: relative; }
.sec-title { font-size: 12px; color: var(--muted); margin: 8px 2px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); }
.emoji-grid button { border: 0; background: transparent; font-size: 24px; height: 38px; border-radius: 8px; cursor: pointer; padding: 0; }
.emoji-grid button:hover { background: var(--hover); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 4px; padding-top: 6px; }
.sticker-grid button { border: 0; background: transparent; height: 80px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; font-size: 34px; }
.sticker-grid button:hover { background: var(--hover); }
.sticker-grid img { max-width: 72px; max-height: 72px; object-fit: contain; }

/* ---------- managers ---------- */
.add-row { flex-wrap: nowrap; }
.add-row .add-emp { flex: 1; padding: 6px 4px; }
.emp.lead .emp-av { border-radius: 50%; }
.role-tag { font-size: 10px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 0 6px; border-radius: 8px; vertical-align: 1px; }
.role-tag.me-tag { color: var(--muted); background: var(--hover); }
.sum-title { align-self: flex-start; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-top: 12px; }
.sum-move { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sum-move select { border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 5px 8px; }
.owner-summary .sum-list { margin: 4px 0; }
.toast.sticky { border-left-color: var(--warn); user-select: text; }
