/* Negoda CRM — стилі застосунку. Одна тема з кольорами бренду (глибокий зелений, золото), світлий і тёмный
   режими за налаштуванням системи. Без декоративних кольорових смужок на картках, значки — лише SVG. */

:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #e9eeec;
  --text: #15211d;
  --text-2: #5a6a64;
  --line: #d8e0dc;
  --line-2: #c3cec8;
  --brand: #1A3C34;
  --brand-hover: #244f45;
  --brand-soft: #e3ece8;
  --on-brand: #ffffff;
  --accent: #B8924A;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --ok: #1f7a45;
  --ok-soft: #e2f3e9;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  --focus: 0 0 0 3px rgba(26, 60, 52, .22);
  --shadow: 0 1px 2px rgba(21, 33, 29, .06), 0 10px 30px rgba(21, 33, 29, .08);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1513;
    --surface: #161f1c;
    --surface-2: #1f2b27;
    --text: #e9eeec;
    --text-2: #9fb0a9;
    --line: #27332f;
    --line-2: #35443f;
    --brand: #2f7261;
    --brand-hover: #398a75;
    --brand-soft: #1d3730;
    --on-brand: #ffffff;
    --accent: #cfa964;
    --danger: #f08a80;
    --danger-soft: #3a1f1c;
    --ok: #5fc48a;
    --ok-soft: #173126;
    --warn: #e5b85c;
    --warn-soft: #3a2f14;
    --focus: 0 0 0 3px rgba(95, 196, 138, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.hidden { display: none !important; }
svg.ic { width: 20px; height: 20px; flex: none; }
svg.ic-sm { width: 16px; height: 16px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- завантаження ---------- */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--line-2); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { text-decoration: none; background: var(--line); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: var(--line-2); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn .spinner { border-top-color: currentColor; border-color: rgba(255, 255, 255, .35); border-top-color: currentColor; }
.btn-secondary .spinner, .btn-ghost .spinner { border-color: var(--line-2); border-top-color: var(--brand); }
.btn-tg { background: #2aabee; color: #fff; }
.btn-tg:hover { background: #1f9bdc; }
.btn-google { background: var(--surface); border-color: var(--line-2); }
.btn-google:hover { background: var(--surface-2); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }

/* ---------- поля ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder { color: var(--text-2); opacity: .8; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6a64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); cursor: pointer; }
.input-wrap .eye:hover { background: var(--surface-2); color: var(--text); }
.hint { font-size: 13px; color: var(--text-2); }
.error { font-size: 13px; color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- картки, повідомлення ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head p { margin: 2px 0 0; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 14px; background: var(--surface-2); }
.alert svg { margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; }

/* ---------- сповіщення ---------- */
.toasts { position: fixed; top: 14px; right: 14px; left: 14px; display: grid; gap: 8px; z-index: 50; pointer-events: none; justify-items: end; }
.toast { pointer-events: auto; max-width: 420px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
.toast-ok { background: var(--ok); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- вікна ---------- */
dialog.modal { border: 0; border-radius: var(--radius); padding: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); width: min(420px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(10, 18, 15, .5); }
dialog.modal h2 { margin-bottom: 8px; }
dialog.modal .btn-row { margin-top: 18px; justify-content: flex-end; }
dialog.modal .btn-row .btn { flex: 0 0 auto; }

/* ---------- сторінки входу ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; box-shadow: var(--shadow); }
/* Логотип з брендбуку (золото) — вертикальний на сторінках входу, горизонтальний у бічній панелі, зірка на телефоні */
.brand { display: grid; justify-items: center; gap: 10px; margin-bottom: 22px; }
.brand-logo { display: block; height: auto; user-select: none; }
.brand-logo-vertical { width: 150px; }
.brand-logo-horizontal { width: 100%; max-width: 200px; }
.brand-star { width: 26px; height: 32px; flex: none; }
.brand-sub { font-size: 12.5px; color: var(--text-2); letter-spacing: .04em; text-transform: uppercase; }
.auth h1 { font-size: 21px; margin-bottom: 4px; }
.auth .lead { color: var(--text-2); margin-bottom: 18px; }
.auth .stack { display: grid; gap: 10px; }
.auth form { margin-top: 4px; }
.auth .links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 14px; }
.auth .foot { margin-top: 20px; text-align: center; font-size: 14px; color: var(--text-2); }
.wait { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.wait-row { display: flex; align-items: center; gap: 12px; }
.pw-hint { font-size: 13px; color: var(--text-2); }

/* ---------- каркас застосунку ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100dvh; }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100dvh; }
.side .brand { margin: 6px 8px 24px; justify-items: start; gap: 8px; }
.side .brand-sub { font-size: 11.5px; letter-spacing: .03em; white-space: nowrap; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav a .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); }
.me:hover { background: var(--surface-2); text-decoration: none; }
.me .name { font-weight: 600; line-height: 1.2; }
.me .sub { font-size: 12.5px; color: var(--text-2); line-height: 1.2; }
.me .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px 0; }
.topbar-mobile { display: none; }
.content { padding: 18px 28px 40px; max-width: 1040px; width: 100%; }
.content.narrow { max-width: 720px; }
.tabbar { display: none; }

@media (max-width: 840px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 14px 16px 0; }
  .topbar-mobile { display: flex; align-items: center; gap: 10px; }
  .topbar-desktop { display: none; }
  .content { padding: 14px 16px 90px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; color: var(--text-2); font-size: 11.5px; font-weight: 600; position: relative; }
  .tabbar a.active { color: var(--brand); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 22px); }
}

/* ---------- переписки ---------- */
svg.ic-xs { width: 13px; height: 13px; flex: none; }
.main-full { height: 100dvh; }
.content-full { padding: 0; max-width: none; height: 100%; min-height: 0; display: flex; flex-direction: column; }
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); flex: 1; min-height: 0; height: 100%; }
.inbox.show-info { grid-template-columns: 340px minmax(0, 1fr) 300px; }
.pane { min-height: 0; display: flex; flex-direction: column; position: relative; }
.pane-list { border-right: 1px solid var(--line); background: var(--surface); }
.list-head { padding: 16px 14px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.list-head h1 { font-size: 20px; }
.search { min-height: 40px; }
.small-filters { margin: 0; gap: 6px; }
.small-filters .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }
.conv-list { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.list-loading { display: grid; place-items: center; padding: 16px; }
.conv-item { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; align-items: center; }
.conv-item:hover { background: var(--surface-2); text-decoration: none; }
.conv-item.active { background: var(--brand-soft); }
.conv-avatar { position: relative; flex: none; }
.ch-badge { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2px solid var(--surface); }
.ch-wa { background: #1f9d55; }
.ch-tg { background: #2a8bd6; }
.conv-main { flex: 1; min-width: 0; }
.conv-top, .conv-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.conv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 12px; color: var(--text-2); flex: none; }
.conv-preview { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item.unread .conv-preview { color: var(--text); font-weight: 500; }
.conv-item.unread .conv-name { font-weight: 700; }

.pane-thread { background: var(--bg); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 60px; }
.thread-head .txt { flex: 1; min-width: 0; }
.thread-head .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-head .s { font-size: 13px; color: var(--text-2); }
.thread-head .act { display: flex; gap: 4px; }
.thread-head .back { display: none; padding: 0 8px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.day-sep { align-self: center; font-size: 12px; color: var(--text-2); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; margin: 12px 0 6px; }
.msg { max-width: min(72%, 640px); display: flex; flex-direction: column; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.system { align-self: center; max-width: 85%; align-items: center; }
.msg.pending { opacity: .7; }
.msg.failed .bubble { border-color: var(--danger); }
.bubble { padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); word-break: break-word; font-size: 15px; line-height: 1.45; display: grid; gap: 6px; }
.msg.in .bubble { border-bottom-left-radius: 4px; }
.msg.out .bubble { background: var(--brand-soft); border-color: transparent; border-bottom-right-radius: 4px; }
.msg.system .bubble { background: transparent; border: 0; color: var(--text-2); font-size: 13px; text-align: center; padding: 2px 8px; }
.msg-text { white-space: pre-wrap; }
.msg-meta { font-size: 11.5px; color: var(--text-2); margin-top: 2px; display: flex; gap: 5px; align-items: center; padding: 0 4px; }
.msg-failed { color: var(--danger); display: inline-flex; align-items: center; gap: 3px; }
.msg-author { font-size: 12px; color: var(--text-2); margin: 8px 4px 2px; font-weight: 600; }
.msg-img-wrap { display: block; }
.msg-img { max-width: min(320px, 70vw); max-height: 320px; border-radius: 10px; display: block; background: var(--surface-2); }
.msg-video { max-width: min(320px, 70vw); max-height: 320px; border-radius: 10px; display: block; }
.msg-audio { display: grid; gap: 2px; }
.msg-audio audio { max-width: 280px; width: 100%; }
.msg-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: inherit; text-decoration: none; }
.msg-file:hover { text-decoration: none; background: var(--line); }
.msg-file .txt { min-width: 0; display: grid; }
.msg-file .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file .s { font-size: 12px; color: var(--text-2); }
.composer-wrap { flex: none; }
.composer { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: var(--brand); box-shadow: var(--focus); }
.attach-btn, .send-btn { width: 44px; padding: 0; flex: none; }
.attach-list { display: flex; gap: 8px; flex-wrap: wrap; }
.attach-list:empty { display: none; }
.chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 0 0 0 4px; }
.pane-info { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 20px 18px; display: none; }
.inbox.show-info .pane-info { display: block; }
.info-head { display: grid; justify-items: center; gap: 10px; text-align: center; margin-bottom: 16px; }
.info-block { margin-top: 18px; display: grid; gap: 8px; }
@media (max-width: 1199px) {
  .inbox.show-info { grid-template-columns: 340px minmax(0, 1fr); }
  .inbox.show-info .pane-info { position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 90vw); box-shadow: var(--shadow); z-index: 5; }
  .inbox { position: relative; }
}
@media (max-width: 840px) {
  .main-full { height: 100dvh; }
  .inbox, .inbox.show-info { grid-template-columns: 1fr; }
  .pane-thread { display: none; }
  .inbox.has-thread .pane-list { display: none; }
  .inbox.has-thread .pane-thread { display: flex; }
  .inbox.has-thread ~ .tabbar, .main-full .content-full .inbox.has-thread { padding-bottom: 0; }
  .thread-head .back { display: inline-flex; }
  .hide-sm { display: none; }
  .msg { max-width: 86%; }
  .msgs { padding: 12px 12px; }
  .content-full { padding-bottom: 64px; }
  .shell.thread-open .content-full { padding-bottom: 0; }
  .shell.thread-open .tabbar { display: none; }
}

/* ---------- порожній стан ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 20px; color: var(--text-2); }
.empty .ic-big { width: 44px; height: 44px; color: var(--brand); }
.empty h2 { color: var(--text); }
.empty p { max-width: 460px; }

/* ---------- профіль ---------- */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .ic-wrap { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--text); flex: none; }
.row .txt { flex: 1; min-width: 0; }
.row .txt .t { font-weight: 600; }
.row .txt .s { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .act { display: flex; gap: 8px; flex: none; }
@media (max-width: 560px) {
  .row { flex-wrap: wrap; }
  .row .act { width: 100%; justify-content: flex-end; }
}
.inline-form { margin-top: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.switch-row { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch-row input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.switch-row .txt { display: grid; gap: 2px; }
.switch-row .t { font-weight: 600; }
.switch-row .s { font-size: 13px; color: var(--text-2); }
.inline-form .field { margin-bottom: 10px; }

/* ---------- співробітники ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .btn { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.filters .btn.active { background: var(--brand); color: var(--on-brand); }
.user-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin-bottom: 12px; }
.user-card.pending { border-color: var(--accent); }
.user-card .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-card .head .name { font-weight: 650; font-size: 16px; }
.user-card .meta { font-size: 13px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; }
.user-card .controls { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.user-card .actions { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.user-card .methods { display: flex; gap: 6px; }
.user-card .methods span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.user-card .methods span.on { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 640px) {
  .user-card { grid-template-columns: 1fr; }
  .user-card .controls, .user-card .actions { grid-column: 1; grid-template-columns: 1fr; }
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
