/* MultiTG responsive workspace — browser CSS, mobile first controls. */
:root {
  color-scheme: dark;
  --bg: #0c1220;
  --surface: #141e2e;
  --surface-soft: #1b283b;
  --ink: #edf2fc;
  --muted: #a1afc5;
  --line: #2a374c;
  --blue: #8b9cff;
  --blue-deep: #7286f5;
  --blue-soft: #283457;
  --green: #64d8b0;
  --yellow: #f2cc84;
  --coral: #ffa49e;
  --shadow: 0 8px 30px #00000012;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button, a { touch-action: manipulation; }
button { color: inherit; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
input, textarea, select { min-width: 0; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
input::placeholder, textarea::placeholder { color: #8191aa; }
a { color: #b0bbff; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -1px; line-height: 1.25; }
h2 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
button, .panel, input, textarea { transition: background .15s, border-color .15s; }
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 26px 16px 18px; background: #101827; border-right: 1px solid var(--line); overflow-y: auto; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand-mark, .mobile-brand-icon { width: 40px; height: 40px; display: grid; place-items: center; background: var(--blue); color: #101827; border-radius: 13px; }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: -.6px; }
.brand-caption { color: var(--muted); font-size: 10px; letter-spacing: .8px; }
.primary-nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; background: transparent; color: var(--muted); text-align: left; font-weight: 600; }
.nav-item:hover, .account-item:hover { background: var(--surface-soft); }
.nav-item.active { color: #c3cbff; background: var(--blue-soft); }
.nav-count { margin-left: auto; font-size: 11px; background: #ffffff0a; border-radius: 6px; padding: 1px 6px; }
.sidebar-section-title { margin: 24px 10px 10px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; letter-spacing: 1.4px; }
.account-list { display: grid; gap: 6px; }
.account-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; }
.account-item.selected { background: var(--blue-soft); border-color: #6371ad; }
.account-copy, .profile-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy strong, .profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-copy span, .profile-copy span, .sidebar-empty { color: var(--muted); font-size: 11px; }
.account-note { display: flex; align-items: center; gap: 4px; }
.account-note svg { width: 12px; height: 12px; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.workspace-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); padding: 12px 8px; }
.profile-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.profile-row .icon-button { margin-left: auto; }
.main-panel { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; height: 72px; display: flex; justify-content: space-between; align-items: center; padding: 0 32px; background: #0c1220ed; backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.breadcrumbs, .topbar-actions, .sync-status { display: flex; align-items: center; gap: 12px; }
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--ink); }
.breadcrumbs svg { width: 14px; }
.sync-status { color: var(--muted); font-size: 11px; }
.live-dot, .status-dot, .legend-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; background: var(--green); border-radius: 50%; }
.status-dot.warn, .legend-dot.yellow { background: var(--yellow); }
.status-dot.off, .legend-dot.gray { background: #718099; }
.content-wrap { max-width: 1600px; margin: auto; padding: 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 10px; letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; }
.heading-subtitle, .modal-subtitle, .modal-intro, .modal-hint, .auth-subtitle { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 11px; font-size: 12px; font-weight: 800; line-height: 1.4; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: #101827; background: var(--blue); }
.button-primary:hover { background: #a4b1ff; }
.button-secondary { color: var(--ink); border: 1px solid var(--line); background: var(--surface-soft); }
.button-secondary:hover { background: #293951; }
.button-danger { color: var(--coral); background: #41282e; }
.button-small { min-height: 40px; padding: 8px 12px; font-size: 11px; }
.icon-button, .tiny-button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; padding: 0; color: var(--muted); background: transparent; border-radius: 11px; }
.icon-button:hover, .tiny-button:hover { color: var(--ink); background: var(--surface-soft); }
.tiny-button { width: 32px; height: 32px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; background: transparent; color: #b0bbff; font-size: 12px; }
.text-button svg { width: 16px; }
.metric-grid, .activity-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card, .activity-stat { min-width: 0; display: flex; gap: 14px; padding: 22px; border: 1px solid var(--line); background: linear-gradient(135deg, #1b273b, var(--surface)); border-radius: 18px; }
.metric-card > div:last-child, .activity-stat > div { display: grid; gap: 6px; min-width: 0; }
.metric-card strong, .activity-stat strong { font-size: 30px; line-height: 1.2; letter-spacing: -1px; }
.metric-label, .metric-trend, .activity-stat > div > span { font-size: 11px; color: var(--muted); }
.metric-icon, .stat-icon, .event-icon, .timeline-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-soft); color: #b0bbff; }
.mint, .green { color: var(--green); }
.yellow { color: var(--yellow); }
.coral { color: var(--coral); }
.lilac { color: #d2b0ff; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.panel-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.right-column { display: grid; gap: 20px; }
.filter-row, .activity-toolbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 20px 18px; border-bottom: 1px solid var(--line); }
.search-input { min-width: 0; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #0f1828; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.search-input:focus-within { border-color: var(--blue); }
.search-input input { width: 100%; height: 100%; outline: none; background: transparent; border: 0; color: var(--ink); font-size: 14px; }
.filter-row > .search-input { flex: 1 1 100%; }
.segmented-control, .activity-filters, .chat-page-filters { display: flex; align-items: center; gap: 4px; }
.segmented-control { position: relative; }
.segment, .activity-filter, .filter-more, .filter-sort { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 12px; border-radius: 10px; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; }
.segment.active, .activity-filter.active { background: var(--blue-soft); color: #c3cbff; }
.segment b { font-size: 10px; opacity: .8; }
.bulk-tools { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.select-all-control { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.chat-sort-menu, .message-context-menu { z-index: 60; padding: 6px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px #0006; }
.chat-sort-menu { position: absolute; right: 0; top: 100%; min-width: 220px; }
.chat-sort-menu button, .message-context-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px; text-align: left; background: transparent; border-radius: 8px; font-size: 12px; }
.chat-sort-menu button:hover, .message-context-menu button:hover { background: var(--blue-soft); }
.message-context-menu { position: fixed; }
.message-context-danger { color: var(--coral); }
.chat-list { padding: 6px 10px 12px; }
.chat-row { display: grid; grid-template-columns: 28px 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 10px; min-height: 88px; border-bottom: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.chat-row:hover, .chat-row.selected { background: #202e45; }
.chat-row.has-note { border-left: 3px solid var(--note-accent, var(--yellow)); }
.chat-copy, .chat-meta { display: grid; gap: 5px; min-width: 0; }
.chat-meta { justify-items: end; }
.chat-name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chat-name, .chat-preview, .chat-account-context, .chat-target strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-name { font-size: 14px; font-weight: 800; }
.chat-preview { font-size: 12px; color: var(--muted); }
.chat-time, .chat-account { font-size: 10px; color: var(--muted); }
.chat-account-context, .chat-target { font-size: 11px; color: #aab8f8; }
.chat-target { display: flex; align-items: center; gap: 5px; }
.chat-target svg, .note-mark svg { width: 12px; height: 12px; }
.chat-note-preview { display: flex; gap: 5px; padding: 6px 8px; border-radius: 6px; background: #f2cc8410; color: var(--yellow); font-size: 11px; overflow-wrap: anywhere; }
.chat-note-preview svg { width: 14px; height: 14px; }
.chat-note-preview > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-type, .status-pill, .event-status { display: inline-flex; padding: 4px 8px; border-radius: 7px; font-size: 10px; background: #ffffff08; }
.unread-count { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; color: #101827; background: var(--blue); border-radius: 8px; font-size: 11px; font-weight: 800; }
.avatar, .chat-avatar { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; overflow: hidden; border-radius: 13px; font-weight: 800; font-size: 12px; color: white; }
.chat-avatar { width: 46px; height: 46px; }
.avatar img, .chat-avatar img, .profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar-blue { background: #546da4; }.avatar-mint { background: #397d73; }.avatar-lilac { background: #7b62a4; }.avatar-sand { background: #92754d; }.avatar-coral { background: #a36464; }.avatar-slate { background: #566780; }.avatar-rose { background: #a35e89; }
.chat-select, .account-select-control { display: grid; place-items: center; min-width: 28px; min-height: 44px; cursor: pointer; }
.chat-select input, .account-select-control input { position: absolute; opacity: 0; }
.chat-select span, .account-select-control span { width: 18px; height: 18px; border: 1px solid #6c7c98; border-radius: 5px; }
.chat-select input:checked + span, .account-select-control input:checked + span { background: var(--blue); box-shadow: inset 0 0 0 3px var(--surface); }
.chat-select input:focus-visible + span, .account-select-control input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.chat-delete { width: 32px; height: 32px; }
.empty-state, .empty-activity, .empty-panel { padding: 42px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.health-summary { display: flex; align-items: center; gap: 20px; padding: 0 22px 20px; }
.health-ring { --health: 0%; position: relative; width: 90px; height: 90px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 var(--health), var(--line) var(--health) 100%); }
.health-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.health-ring > div { position: relative; display: grid; text-align: center; }
.health-ring strong { font-size: 22px; }.health-ring span { font-size: 10px; color: var(--muted); }
.health-legend { display: grid; gap: 8px; font-size: 11px; }.health-legend div { display: flex; align-items: center; gap: 8px; }
.health-account-list, .timeline { padding: 0 22px 20px; }
.health-account { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 11px; }.account-mini-name { flex: 1; }.health-status { color: var(--muted); }
.timeline-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
.timeline-icon { width: 30px; height: 30px; }.timeline-icon svg { width: 15px; }.timeline-item strong { font-size: 12px; }.timeline-item p, .timeline-item time { margin: 4px 0; color: var(--muted); font-size: 11px; }
.full-width-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 40px); min-height: 44px; margin: 0 20px 20px; border-radius: 10px; background: var(--blue-soft); color: #c3cbff; font-size: 11px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.account-card { min-width: 0; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.account-card-head, .account-card-actions, .account-card-meta { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.account-card-head > .avatar { margin-right: auto; }
.account-card h2 { margin: 18px 0 6px; }.account-card p { margin: 0; color: var(--muted); font-size: 12px; }
.account-card-meta { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.account-card-actions { margin-top: 14px; flex-wrap: wrap; }.account-delete-button { margin-left: auto; }
.account-card.divinchik-selected { border-color: var(--blue); }
.connected-label, .divinchik-progress, .divinchik-countdown, .divinchik-contact-count { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--green); margin-top: 8px; }
.divinchik-card-stats { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-top: 12px; border-radius: 8px; background: #ffffff05; font-size: 11px; color: var(--muted); }
.divinchik-card-stats svg { width: 14px; height: 14px; }.divinchik-card-stats span { display: flex; align-items: center; gap: 5px; }
.account-worker-assignment { font-size: 11px; color: var(--yellow); }
.account-error, .import-warning, .guided-message, .phone-login-status, .auth-error { padding: 12px; margin-top: 14px; border: 1px solid #66513b; border-radius: 10px; background: #352b22; color: var(--yellow); font-size: 12px; overflow-wrap: anywhere; }
.auth-error, .phone-login-status.error { background: #41282e; border-color: #75464e; color: var(--coral); }
.team-panel + .team-panel { margin-top: 20px; }
.team-list, .city-request-list { display: grid; gap: 12px; padding: 0 20px 20px; }
.team-worker { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff03; }
.team-worker-main { display: flex; gap: 12px; align-items: center; min-width: 0; }.team-worker-main > div { display: grid; gap: 4px; min-width: 0; }.team-worker-main strong { overflow-wrap: anywhere; }.team-worker-main span:not(.avatar) { color: var(--muted); font-size: 11px; }
.team-worker-accounts, .team-worker-actions { display: flex; flex-wrap: wrap; gap: 6px; }.team-worker-accounts { color: var(--muted); font-size: 11px; }.team-worker-accounts span { padding: 6px 9px; border-radius: 7px; background: var(--blue-soft); color: #c3cbff; overflow-wrap: anywhere; }
.danger-icon { color: var(--coral); }
.city-request-card { padding: 18px; background: #ffffff03; border: 1px solid var(--line); border-radius: 12px; }
.city-request-head { display: flex; justify-content: space-between; gap: 12px; }.city-request-head > div { display: grid; gap: 5px; }.city-request-head span:not(.status-pill), .city-request-card small { font-size: 11px; color: var(--muted); }.city-request-lines { display: grid; gap: 8px; margin: 14px 0; }.city-request-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-soft); }.city-request-line span { color: var(--blue); }
.activity-table { padding: 0 20px 16px; }.activity-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 140px 120px 90px; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }.event-copy { display: grid; gap: 4px; min-width: 0; }.event-copy strong { font-size: 12px; }.event-copy span, .event-time, .event-account { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }.event-status.success { color: var(--green); }.event-status.warning { color: var(--yellow); }.event-status.error { color: var(--coral); }
.chat-page-shell { position: relative; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; overflow: hidden; }
.chat-page-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; }
.chat-page-brand { display: flex; align-items: center; gap: 12px; font-size: 21px; letter-spacing: -.5px; }
.chat-page-search { margin: 8px 24px 12px; }
.chat-page-filters { padding: 0 24px 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.chat-page-list { padding-bottom: 90px; }.chat-page-list .chat-row { grid-template-columns: 46px minmax(0, 1fr) auto; }.chat-page-list .chat-select, .chat-page-list .chat-delete { display: none; }
.chat-page-compose { position: fixed; right: 32px; bottom: 28px; z-index: 12; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--blue); color: #101827; box-shadow: 0 8px 30px #0005; }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: #030712b8; backdrop-filter: blur(8px); }
.modal { width: min(540px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 24px 90px #0006; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }.modal-header h2 { font-size: 22px; }.modal-header .icon-button { margin: -6px -8px 0 0; }
.field-label { display: grid; gap: 8px; margin-top: 16px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field-label input, .field-label select, .field-label textarea { width: 100%; padding: 12px 14px; min-height: 46px; border: 1px solid #36445c; border-radius: 10px; color: var(--ink); background: #0f1828; font-size: 14px; }
textarea { resize: vertical; }.field-label input:focus, .field-label textarea:focus, .field-label select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field-label input[type=color] { width: 70px; padding: 4px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.profile-edit-grid, .proxy-grid, .location-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }.profile-edit-wide { grid-column: 1 / -1; }
.account-details-modal { width: min(720px, 100%); }.account-details-summary { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 14px; background: var(--surface-soft); }.account-details-summary p { color: var(--muted); font-size: 12px; }.profile-avatar { position: relative; display: grid; place-items: center; overflow: hidden; width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.upload-photo-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px; margin-top: 12px; border-radius: 10px; color: #c3cbff; background: var(--blue-soft); font-size: 12px; cursor: pointer; }.upload-photo-button input, .composer-attachment input { display: none; }
.divinchik-settings { padding: 16px; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; }.divinchik-settings > span, .upload-hint { display: block; color: var(--muted); font-size: 11px; }
.worker-account-list, .divinchik-account-choices, .forward-target-list, .guided-action-list { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 12px; }.worker-account-choice, .divinchik-account-choice, .forward-target { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface-soft); border-radius: 10px; font-size: 12px; cursor: pointer; }.worker-account-choice small, .divinchik-account-choice small, .forward-target small { color: var(--muted); font-size: 10px; }.divinchik-account-choice > span:last-child { display: grid; }.divinchik-account-choice.selected { outline: 1px solid var(--blue); }.divinchik-selected-label { display: flex; justify-content: space-between; font-size: 12px; }.hide-sender-control { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12px; }
.templates-modal { width: min(680px, 100%); }.templates-header-actions, .template-actions { display: flex; gap: 4px; }.template-list { display: grid; gap: 10px; margin-top: 16px; }.template-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }.template-main { min-width: 0; display: grid; gap: 6px; background: transparent; text-align: left; }.template-main strong { font-size: 13px; }.template-main span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.template-drag { color: var(--muted); cursor: grab; }
.chat-details-modal { width: min(1080px, 100%); height: min(860px, calc(100dvh - 48px)); padding: 0; overflow: hidden; }
.chat-details-layout { height: 100%; }.conversation-pane { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-width: 0; }
.conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }.conversation-heading { display: none; }.chat-profile-card { display: flex; align-items: center; gap: 12px; min-width: 0; }.chat-profile-avatar { position: relative; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; width: 46px; height: 46px; border-radius: 14px; text-decoration: none; color: white; }.chat-profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }.chat-profile-copy { display: grid; gap: 2px; min-width: 0; }.chat-profile-copy strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.chat-profile-copy > span { color: var(--muted); font-size: 11px; }.chat-profile-copy .online { color: var(--green); }.chat-profile-copy p { margin: 0; max-width: 400px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.chat-profile-details { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--blue); }.conversation-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.message-list { min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: #0e1625; }
.message-bubble { display: flex; gap: 8px; max-width: min(82%, 640px); padding: 12px 14px 8px; border-radius: 16px; cursor: context-menu; }.message-bubble.incoming { align-self: flex-start; background: #213047; border-bottom-left-radius: 5px; }.message-bubble.outgoing { align-self: flex-end; background: #3b487d; border-bottom-right-radius: 5px; }.message-content { min-width: 0; }.message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }.message-author { color: var(--green); font-size: 11px; margin-bottom: 5px; }.message-avatar { width: 28px; height: 28px; border-radius: 9px; }.message-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.message-meta time, .message-bubble time { color: #b1bdd2; font-size: 10px; }.message-forward { display: grid; place-items: center; width: 32px; height: 32px; background: transparent; color: #b1bdd2; }.message-forward svg { width: 15px; }.message-media { display: block; max-width: min(100%, 360px); border-radius: 12px; margin: 5px 0; }.message-photo { max-height: 400px; object-fit: contain; }.message-audio { width: 270px; }.message-video-note { width: 250px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }.message-file { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }.message-buttons { display: grid; gap: 6px; margin-top: 8px; }.message-button-row { display: flex; gap: 6px; }.message-button { flex: 1; min-width: 0; padding: 10px; min-height: 44px; border: 1px solid #ffffff22; border-radius: 9px; background: #ffffff0c; color: #dbe0ff; text-align: center; text-decoration: none; font-size: 12px; }.message-contact-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; color: #c3cbff; font-size: 10px; }.message-contact-meta svg { width: 14px; }
.message-composer { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); }.composer-input-wrap { flex: 1; min-width: 0; }.message-composer textarea { display: block; width: 100%; min-height: 46px; max-height: 140px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #0f1828; font-size: 14px; resize: none; }.message-composer .button-primary { width: 46px; height: 46px; padding: 0; flex-shrink: 0; }.message-composer .button-primary span { display: none; }.message-composer-tools { order: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding-top: 8px; border-top: 1px solid var(--line); }.composer-more.active { background: var(--blue-soft); color: var(--blue); }.video-note-toggle { display: flex; align-items: center; gap: 8px; font-size: 11px; }.composer-voice.recording { background: #693940; color: var(--coral); }.reply-preview { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border-left: 3px solid var(--blue); background: var(--blue-soft); border-radius: 8px; }.reply-preview-copy { min-width: 0; display: grid; gap: 3px; font-size: 11px; }.reply-preview-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; z-index: 1100; bottom: 24px; left: 50%; transform: translate(-50%, 12px); display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100% - 32px)); padding: 14px 20px; background: #293a51; color: var(--ink); border: 1px solid #526079; border-radius: 14px; box-shadow: 0 12px 40px #0005; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 13px; }.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast-check { color: var(--green); }
.auth-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow-y: auto; padding: 32px 20px; background: radial-gradient(ellipse at 50% 0, #283657, transparent 70%), var(--bg); }.auth-card { width: min(460px, 100%); padding: 36px; border: 1px solid #38465f; border-radius: 24px; background: #141e2ef5; box-shadow: 0 24px 90px #0004; }.auth-brand { margin-bottom: 28px; width: 52px; height: 52px; border-radius: 16px; }.auth-card h1 { font-size: 27px; }.auth-subtitle { margin-bottom: 24px; }.auth-form { display: grid; gap: 4px; }.auth-form-title { font-size: 12px; color: var(--muted); }.auth-submit { width: 100%; margin-top: 20px; }.auth-login-forms { display: grid; gap: 20px; }
.dialogs-loader { display: grid; justify-items: center; gap: 12px; padding: 48px 20px; color: var(--muted); font-size: 12px; }.loader-orbit { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }.dialog-skeleton-list { width: min(320px, 100%); display: grid; gap: 10px; }.dialog-skeleton-list i { height: 48px; border-radius: 12px; background: var(--surface-soft); }@keyframes spin { to { transform: rotate(360deg); } }
.mobile-home-toolbar, .mobile-account-strip, .mobile-account-add, .mobile-logout { display: none; }
body:has(.modal-backdrop:not([hidden])), body:has(.auth-screen:not([hidden])) { overflow: hidden; }
@media (min-width: 1200px) {
  body.view-chats:has(#chatDetailsBackdrop:not([hidden])) { overflow: auto; }
  body.view-chats:has(#chatDetailsBackdrop:not([hidden])) .chat-page-shell { width: 390px; }
  body.view-chats #chatDetailsBackdrop:not([hidden]) { inset: 104px 24px 24px 670px; padding: 0; background: transparent; backdrop-filter: none; z-index: 15; }
  body.view-chats #chatDetailsBackdrop .chat-details-modal { width: 100%; height: 100%; max-height: none; }
  body.view-chats:has(#chatDetailsBackdrop:not([hidden])) .chat-page-compose { display: none; }
}
@media (max-width: 1250px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }.right-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .activity-row { grid-template-columns: 38px minmax(0, 1fr) 110px; }.event-account, .event-status { grid-column: auto; }.event-account { grid-column: 2; }
  .team-worker { grid-template-columns: minmax(0, 1fr) auto; }.team-worker-accounts { grid-column: 1 / -1; grid-row: 2; }
}
@media (min-width: 721px) and (max-width: 1000px) {
  .app-shell { grid-template-columns: 196px minmax(0, 1fr); }.sidebar { padding: 22px 10px; }.brand-row { gap: 8px; padding: 0 4px 26px; }.brand-caption { font-size: 8px; }.brand-name { font-size: 18px; }
  .content-wrap { padding: 24px; }.topbar { padding: 0 24px; }.right-column { grid-template-columns: 1fr; }.metric-card { padding: 16px; gap: 10px; }.activity-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .app-shell { display: block; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; inset: auto 0 0; z-index: 20; height: auto; overflow: visible; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); background: #101827f5; backdrop-filter: blur(16px); }
  .brand-row, .sidebar-section-title, .account-list, .sidebar-bottom { display: none; }
  .primary-nav { display: flex; gap: 2px; }.primary-nav .nav-item { position: relative; flex: 1; min-width: 0; min-height: 58px; flex-direction: column; gap: 5px; justify-content: center; padding: 7px 0; border-radius: 10px; font-size: 9px; }.nav-item svg { width: 21px; height: 21px; }.nav-item .nav-count { display: none; }
  .topbar { height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; }.breadcrumbs > span, .breadcrumbs > svg { display: none; }.breadcrumbs strong { font-size: 15px; }.sync-status { display: none; }.topbar-actions { gap: 2px; }.mobile-logout { display: inline-grid; }
  .content-wrap { padding: 22px 16px; }.page-heading { margin-bottom: 22px; }.eyebrow { font-size: 9px; }.heading-subtitle { font-size: 12px; }.heading-actions { width: 100%; }.heading-actions .button { flex: 1 1 140px; }
  .metric-grid, .activity-metrics { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }.metric-card { flex-direction: column; gap: 12px; padding: 16px; border-radius: 15px; }.metric-card strong { font-size: 28px; }.metric-label { min-height: 30px; }.metric-trend { font-size: 10px; }.metric-icon { width: 32px; height: 32px; }.metric-icon svg { width: 17px; }.activity-stat { padding: 14px; gap: 10px; }.activity-stat strong { font-size: 24px; }
  .dashboard-grid, .right-column { grid-template-columns: 1fr; gap: 16px; }.panel { border-radius: 16px; }.panel-header { padding: 18px 16px; flex-wrap: wrap; }.panel-header h2 { font-size: 16px; }.panel-header p { font-size: 11px; }.panel-header-actions { width: 100%; justify-content: space-between; }.filter-row, .activity-toolbar { padding: 0 12px 14px; }.chat-filters { flex-wrap: wrap; }.segment, .activity-filter { padding: 8px 10px; font-size: 11px; }.bulk-tools { flex-wrap: wrap; }.bulk-tools .button { flex: 1; }.select-all-control { min-height: 40px; }
  .chat-row { grid-template-columns: 24px 40px minmax(0, 1fr) auto; gap: 8px; padding: 12px 4px; }.chat-avatar { width: 40px; height: 40px; border-radius: 12px; }.chat-name { font-size: 13px; }.chat-account { display: none; }.chat-name-line { flex-wrap: wrap; gap: 4px; }.chat-time { font-size: 9px; }.chat-preview { font-size: 12px; }.chat-note-preview { font-size: 10px; }.chat-note-preview strong { display: none; }
  .chat-page-shell { border-radius: 0; border: 0; margin: -22px -16px; min-height: calc(100dvh - 140px); }.chat-page-toolbar { padding: 16px; }.chat-page-brand { font-size: 21px; }.chat-page-search { margin: 0 16px 12px; }.chat-page-filters { padding: 0 12px 12px; }.chat-page-list { padding: 0 12px 96px; }.chat-page-list .chat-row { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 14px 4px; gap: 12px; }.chat-page-list .chat-avatar { width: 46px; height: 46px; }.chat-page-list .chat-name { font-size: 15px; }.chat-page-compose { right: 18px; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .account-grid { grid-template-columns: 1fr; }.account-card { padding: 18px; }.activity-toolbar > * { width: 100%; }.activity-filters { overflow-x: auto; }.activity-table { padding: 0 14px 14px; }.activity-row { grid-template-columns: 32px minmax(0, 1fr); gap: 8px 10px; }.event-time { grid-column: 2; }.event-account, .event-status { display: none; }.event-icon { width: 32px; height: 32px; }.event-copy span { white-space: normal; }
  .team-list, .city-request-list { padding: 0 12px 12px; }.team-worker { padding: 12px; gap: 10px; }.team-worker-main { gap: 8px; }.team-worker-main strong { font-size: 12px; }.team-worker-actions { gap: 0; }.team-worker-actions .icon-button { width: 40px; }.city-request-head { flex-wrap: wrap; }.city-request-card { padding: 14px; }
  .modal-backdrop { padding: 0; align-items: end; }.modal { width: 100%; max-height: calc(100dvh - env(safe-area-inset-top) - 12px); border-radius: 22px 22px 0 0; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }.modal-header h2 { font-size: 21px; }.modal-actions .button { flex: 1 1 130px; }.profile-edit-grid, .proxy-grid, .location-grid { grid-template-columns: 1fr; }.profile-edit-wide { grid-column: auto; }
  .field-label input, .field-label select, .field-label textarea, .search-input input { font-size: 16px; }
  #chatDetailsBackdrop { top: var(--visual-top, 0px); height: var(--visual-height, 100dvh); bottom: auto; padding: 0; }.chat-details-modal { height: 100%; max-height: 100%; border: 0; border-radius: 0; padding: 0; }.conversation-header { gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }.chat-profile-card { gap: 8px; }.chat-profile-avatar { width: 38px; height: 38px; border-radius: 12px; }.chat-profile-copy strong { font-size: 14px; }.chat-profile-copy p, .chat-profile-details { display: none; }.conversation-actions { gap: 0; }#toggleBlockDialog { min-width: 40px; padding: 8px; background: transparent; }#toggleBlockDialog span { display: none; }
  .message-list { padding: 16px 12px; }.message-bubble { max-width: 90%; padding: 10px 12px 6px; }.message-text { font-size: 15px; }.message-composer { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); gap: 6px; }.message-composer textarea { font-size: 16px; }.message-composer .icon-button { width: 40px; }.message-composer .button-primary { width: 44px; }.message-composer-tools { gap: 6px; }.message-audio { max-width: 100%; }.message-avatar { display: none; }
  .auth-screen { align-items: safe center; padding: 20px 16px; }.auth-card { padding: 28px 22px; }.toast { bottom: calc(96px + env(safe-area-inset-bottom)); width: max-content; }
}
.messenger-accounts { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 16px; scrollbar-width: thin; }
.messenger-account { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; max-width: 260px; min-height: 56px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); }
.messenger-account > span:not(.avatar):not(.account-all) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 700; }
.messenger-account.active { border-color: var(--blue); background: var(--blue-soft); color: var(--ink); }
.messenger-account b { min-width: 22px; padding: 2px 6px; border-radius: 7px; background: var(--blue); color: var(--bg); font-size: 11px; }
.messenger-account .avatar, .account-all { width: 34px; height: 34px; }
.account-all { display: grid; place-items: center; font-size: 26px; color: var(--blue); }
.inbox-scope { margin: 0; padding: 0 24px 12px; color: var(--muted); font-size: 11px; }
.messenger-workspace { position: relative; min-width: 0; }
.conversation-empty { display: none; }
.sending-account { flex: 1 0 100%; order: -1; color: #c3cbff; font-size: 12px; padding: 0 2px 6px; overflow-wrap: anywhere; }
.chat-row.selected { background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
@media (min-width: 1000px) {
  body.view-chats .app-shell { grid-template-columns: 196px minmax(0, 1fr); }
  body.view-chats .sidebar { padding-left: 10px; padding-right: 10px; }
  body.view-chats .brand-row { padding-left: 4px; gap: 8px; }
  body.view-chats .brand-caption { font-size: 8px; }
  body.view-chats .content-wrap { padding: 20px; max-width: none; }
  body.view-chats .messenger-workspace { display: grid; grid-template-columns: minmax(300px, 36%) minmax(0, 1fr); height: calc(100dvh - 184px); min-height: 360px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
  body.view-chats .chat-page-shell, body.view-chats:has(#chatDetailsBackdrop:not([hidden])) .chat-page-shell { width: 100%; min-height: 0; display: flex; flex-direction: column; border: 0; border-right: 1px solid var(--line); border-radius: 0; }
  body.view-chats .chat-page-toolbar { padding: 14px 16px 10px; }
  body.view-chats .chat-page-brand { font-size: 17px; }
  body.view-chats .chat-page-search { margin-left: 16px; margin-right: 16px; flex-shrink: 0; }
  body.view-chats .chat-page-filters { padding-left: 10px; padding-right: 10px; flex-shrink: 0; }
  body.view-chats .chat-page-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  body.view-chats .chat-page-compose { position: absolute; right: 20px; bottom: 20px; width: 48px; height: 48px; }
  body.view-chats:has(#chatDetailsBackdrop:not([hidden])) .chat-page-compose { display: grid; }
  body.view-chats .conversation-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 32px; text-align: center; background: radial-gradient(ellipse at center, #24325266, transparent 70%); }
  .conversation-empty .brand-mark { width: 64px; height: 64px; border-radius: 20px; }
  .conversation-empty p { margin: 0; font-size: 13px; color: var(--muted); }
  .conversation-empty > span { font-size: 11px; color: var(--muted); }
  body.view-chats:has(#chatDetailsBackdrop:not([hidden])) { overflow: auto; }
  body.view-chats #chatDetailsBackdrop:not([hidden]) { position: absolute; inset: 0 0 0 36%; padding: 0; background: transparent; backdrop-filter: none; z-index: 15; }
  body.view-chats #chatDetailsBackdrop .chat-details-modal { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  body.view-chats .conversation-actions .button span { display: none; }
  body.view-chats .conversation-actions .button { padding: 8px; background: transparent; }
  body.view-chats .chat-profile-copy p { max-width: 240px; }
}
@media (max-width: 999px) { .messenger-workspace > #chatDetailsBackdrop { position: fixed; } }
@media (max-width: 720px) {
  body.view-chats .content-wrap { padding-top: 12px; }
  .messenger-accounts { margin: 0 -16px; padding: 0 12px 12px; }
  .messenger-account { max-width: 210px; min-height: 52px; padding-right: 10px; }
  .messenger-account > span:not(.avatar):not(.account-all) { font-size: 11px; }
  .messenger-workspace .chat-page-shell { margin-top: 0; }
  .inbox-scope { padding-left: 16px; }
  .sending-account { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Photo library, city catalog, registration flow. */
.folder-create-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.folder-create-bar .search-input { flex: 1 1 240px; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.folder-card { display: grid; gap: 8px; padding: 0 0 14px; overflow: hidden; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.folder-card:hover { border-color: var(--blue); }
.folder-cover { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--surface-soft); color: var(--muted); overflow: hidden; }
.folder-cover img { width: 100%; height: 100%; object-fit: cover; }
.folder-cover svg { width: 40px; height: 40px; }
.folder-card strong { padding: 0 14px; font-size: 14px; overflow-wrap: anywhere; }
.folder-card small { padding: 0 14px; color: var(--muted); font-size: 11px; }
.folder-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.folder-detail-title { flex: 1 1 200px; min-width: 0; }
.folder-detail-title h2 { font-size: 20px; overflow-wrap: anywhere; }
.folder-detail-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.folder-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-button { position: relative; cursor: pointer; }
.upload-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 12px; color: var(--muted); }
.upload-progress-bar { height: 6px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.photo-tile { position: relative; margin: 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.photo-tile.used { opacity: .62; }
.photo-tile.reserved { outline: 2px solid var(--yellow); }
.photo-open { display: block; width: 100%; padding: 0; background: transparent; }
.photo-status { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 6px; font-size: 9px; font-weight: 700; background: #0009; color: #fff; }
.photo-tile.used .photo-status { background: #3b2f16; color: var(--yellow); }
.photo-delete { position: absolute; top: 5px; right: 5px; width: 32px; height: 32px; background: #0008; color: #fff; }
.photo-viewer { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 40px; background: #000d; }
.photo-viewer img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.photo-viewer .icon-button { position: absolute; width: 48px; height: 48px; color: #fff; background: #ffffff1a; }
.viewer-close { top: 16px; right: 16px; }
.viewer-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 12px; top: 50%; transform: translateY(-50%); }
.city-add-panel { margin-bottom: 18px; }
.city-add-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding: 0 20px 20px; }
.city-add-form .field-label { margin-top: 0; }
.city-search { margin-bottom: 14px; }
.city-list { display: grid; gap: 6px; }
.city-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.city-row span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.city-select-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.city-select-toolbar .search-input { flex: 1; }
.city-select-list { max-height: 240px; overflow-y: auto; display: grid; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #0f1828; }
.city-select-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; cursor: pointer; transition: background .12s, border-color .12s; }
.city-select-item:hover { background: var(--surface-soft); }
.city-select-item.selected { background: rgba(139,156,255,.12); border-color: rgba(139,156,255,.4); }
.city-select-item input { appearance: none; -webkit-appearance: none; position: relative; width: 20px; height: 20px; margin: 0; border: 1.5px solid #5b6d8c; border-radius: 6px; background: #0f1828; cursor: pointer; transition: background .12s, border-color .12s; }
.city-select-item input:hover { border-color: #8294b3; }
.city-select-item input:checked { background: var(--blue); border-color: var(--blue); }
.city-select-item input:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.city-select-item small { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.seg-segmented { display: flex; gap: 8px; }
.radio-chip { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); cursor: pointer; font-size: 13px; transition: background .12s, border-color .12s; }
.radio-chip:hover { border-color: #8294b3; }
.radio-chip:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--ink); }
.radio-chip input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid #5b6d8c; border-radius: 50%; background: #0f1828; cursor: pointer; }
.radio-chip input:checked { border-color: var(--blue); background: radial-gradient(circle, var(--blue) 0 4px, transparent 5px); }
.registration-modal { width: min(680px, 100%); }
.reg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.reg-privacy { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; }
.reg-warning { margin-top: 14px; padding: 12px; border-radius: 10px; background: #3a2f1a; border: 1px solid #66512b; color: var(--yellow); font-size: 12px; line-height: 1.45; }
.reg-summary { display: grid; gap: 2px; }
.reg-summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.reg-summary-row span { color: var(--muted); }
.reg-summary-row strong { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .city-add-form { grid-template-columns: 1fr; padding-left: 14px; padding-right: 14px; }
  .reg-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .folder-grid { grid-template-columns: repeat(2, 1fr); }
  .reg-summary-row { flex-direction: column; gap: 3px; }
  .reg-summary-row strong { text-align: left; }
}

/* Per-account colored labels. */
.account-copy strong { color: var(--acc-color, #eef4ff) !important; }
.account-card h2 { color: var(--acc-color, #f0f5f9) !important; }
.chat-account-context { font-weight: 700; }
/* Show delete-dialog button in the chat list (desktop + mobile). */
.chat-page-list .chat-delete { display: grid !important; color: #ffa49e; }
@media (max-width: 720px) {
  .chat-page-list .chat-delete { display: grid !important; width: 34px; height: 34px; }
  .chat-page-list .chat-meta { gap: 4px; }
}

/* DB presence badge on anketa cards. */
.db-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 7px; border-radius: 6px; font-size: 9px; font-weight: 800; letter-spacing: .04em; vertical-align: middle; }
.db-badge.found { color: #fff; background: #e5484d; }
.db-badge.new { color: #04140b; background: #39e08a; }
