/* UI 2.0 (html.uv2): one modern look for every section, the same language as the new deals and tasks.
   Only the skin changes (type, radii, borders, shadows, tabs, tables, windows); layouts stay as they are.
   Follows the theme and the colour scheme through the --rd-* tokens. Loaded before deals-v2/tasks-v2. */

:root.rd.uv2 { --uv-radius:14px; --uv-shadow:0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06); --uv-shadow-hover:0 10px 24px -8px rgba(16,24,40,.16), 0 2px 6px rgba(16,24,40,.06); --uv-window:0 24px 64px -16px rgba(16,24,40,.28); }
:root.rd.uv2[data-theme="dark"] { --uv-shadow:0 1px 2px rgba(0,0,0,.3); --uv-shadow-hover:0 12px 28px -10px rgba(0,0,0,.6); --uv-window:0 24px 64px -16px rgba(0,0,0,.7); }

/* ── page headers: one size and weight everywhere ── */
:root.rd.uv2 #app #page :is(.page-head,.page-heading,.mail-work-heading,.ai-heading,.cal-head) h1,
:root.rd.uv2 #app #page > h1 {
  font-size:30px !important; line-height:1.15 !important; font-weight:600 !important; letter-spacing:-.02em !important; color:var(--rd-ink) !important;
}
:root.rd.uv2 #app #page .hm-title h1 { font-size:30px !important; line-height:1.15 !important; font-weight:600 !important; letter-spacing:-.02em !important; }
:root.rd.uv2 #app #page :is(.subtitle,.page-subtitle,.ai-heading p,.cal-head p) { color:var(--rd-text3) !important; font-size:14px !important; }
:root.rd.uv2 #app #page :is(.page-head,.page-heading,.mail-work-heading,.ai-heading,.cal-head) { align-items:flex-end; margin-bottom:20px !important; }
:root.rd.uv2 #app #page :is(.head-actions,.hm-actions,.ai-heading) > .btn,
:root.rd.uv2 #app #page :is(.head-actions,.hm-actions) .btn { height:38px !important; min-height:38px !important; border-radius:10px !important; font-weight:500 !important; }
:root.rd.uv2 #app #page .btn.primary { box-shadow:0 1px 2px rgba(16,24,40,.1), inset 0 1px 0 rgba(255,255,255,.15) !important; }

/* ── cards: soft radius, thin line, a light shadow ── */
:root.rd.uv2 #app #page .card,
:root.rd.uv2 #app #page .tc-card,
:root.rd.uv2 #app #page .hm-card {
  border:1px solid var(--rd-line) !important; border-radius:16px !important; box-shadow:var(--uv-shadow) !important;
}
:root.rd.uv2 #app #page .card :is(.card,.tc-card) { box-shadow:none !important; }
:root.rd.uv2 #app #page .card > h2,
:root.rd.uv2 #app #page .card .card-head h2,
:root.rd.uv2 #app #page .settings-form > h2 { color:var(--rd-ink) !important; font-size:16px !important; font-weight:600 !important; letter-spacing:0 !important; }

/* ── filter panels: one card with 40px controls ── */
:root.rd.uv2 #app #page :is(.portal-filter-panel,.filter-panel):not(.chat-list-tools):not(.deal-toolbar):not(.task-filter-panel):not(.mail-filter-panel):not(.drive-filters):not(.category-filters) {
  background:var(--rd-surface) !important; border:1px solid var(--rd-line) !important; border-radius:var(--uv-radius) !important; box-shadow:var(--uv-shadow) !important; padding:12px !important; margin-bottom:16px !important;
}
:root.rd.uv2 #app #page :is(.portal-filter-panel,.filter-panel) :is(input:not([type=checkbox]):not([type=radio]),select,.filter-select-trigger,.filter-action,.search) { min-height:40px !important; border-radius:10px !important; }
:root.rd.uv2 #app #page :is(.portal-filter-panel,.filter-panel) .search { background:var(--rd-subtle) !important; border:1px solid var(--rd-line) !important; }
:root.rd.uv2 #app #page :is(.portal-filter-panel,.filter-panel) .search input { background:transparent !important; border:0 !important; }
:root.rd.uv2 #app #page .ui-filter-chip { border-radius:999px !important; background:var(--rd-primary-soft) !important; border:1px solid var(--rd-primary-line) !important; color:var(--rd-primary) !important; }

/* ── tab switches (contacts, AI agents, settings, calendar views): one segmented control ── */
:root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views,.mail-work-tabs) {
  display:inline-flex !important; flex-wrap:wrap; gap:2px !important; padding:4px !important; border-radius:12px !important; background:var(--rd-hover) !important; border:0 !important; box-shadow:none !important; margin-bottom:16px;
}
:root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views,.mail-work-tabs) :is(button,.btn,a) {
  height:32px !important; min-height:32px !important; padding:0 14px !important; border-radius:9px !important; border:0 !important; background:transparent !important; box-shadow:none !important;
  color:var(--rd-text2) !important; font-size:13px !important; font-weight:500 !important;
}
:root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views,.mail-work-tabs) :is(button,.btn,a):hover { color:var(--rd-ink) !important; }
:root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views,.mail-work-tabs) :is([aria-pressed="true"],[aria-current="page"],[aria-selected="true"],.active) {
  background:var(--rd-surface) !important; color:var(--rd-ink) !important; box-shadow:0 1px 2px rgba(16,24,40,.08) !important;
}
:root.rd.uv2 #app #page .ai-tab-count { margin-left:6px; padding:0 7px; border-radius:999px; background:var(--rd-primary) !important; color:#fff !important; font-size:11.5px; }
/* other segmented switches keep the same look */
:root.rd.uv2 #app #page .segmented { border-radius:12px !important; padding:4px !important; }
:root.rd.uv2 #app #page .segmented :is(.btn,button) { border-radius:9px !important; font-weight:500 !important; }

/* ── stat tiles (home, projects, AI agents): the same cards as the deals ── */
:root.rd.uv2 #app #page :is(.pl-kpi,.hm-kpi,.ai-metrics > button) {
  position:relative; overflow:hidden; background:var(--rd-surface) !important; border:1px solid var(--rd-line) !important; border-radius:var(--uv-radius) !important; box-shadow:var(--uv-shadow) !important;
  transition:border-color .15s, box-shadow .15s, transform .15s;
}
:root.rd.uv2 #app #page :is(.pl-kpi,.ai-metrics > button):hover,
:root.rd.uv2 #app #page a.hm-kpi:hover,
:root.rd.uv2 #app #page button.hm-kpi:hover { box-shadow:var(--uv-shadow-hover) !important; transform:translateY(-1px); border-color:var(--rd-primary-line) !important; }
:root.rd.uv2 #app #page :is(.pl-kpi,.ai-metrics > button)[aria-pressed="true"] { border-color:var(--rd-primary) !important; box-shadow:0 0 0 3px var(--focus) !important; }
:root.rd.uv2 #app #page :is(.pl-kpi b,.ai-metrics > button b,.hm-kpi-value) { color:var(--rd-ink) !important; font-size:26px !important; line-height:1.15 !important; font-weight:600 !important; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
:root.rd.uv2 #app #page :is(.pl-kpi span,.ai-metrics > button span,.hm-kpi-label) { color:var(--rd-text3) !important; font-size:13px !important; font-weight:500 !important; }
:root.rd.uv2 #app #page .pl-kpi small { color:var(--rd-text3) !important; }
:root.rd.uv2 #app #page .hm-kpi-icon { border-radius:10px !important; }

/* ── tables: uppercase small heads, taller rows, a hover tint ── */
:root.rd.uv2 #app #page .table-wrap { border:1px solid var(--rd-line) !important; border-radius:var(--uv-radius) !important; box-shadow:var(--uv-shadow) !important; overflow:hidden; padding:0 !important; background:var(--rd-surface) !important; }
:root.rd.uv2 #app #page .table-wrap table { border-collapse:separate !important; border-spacing:0 !important; background:transparent !important; }
:root.rd.uv2 #app #page .table-wrap thead th {
  height:40px; padding-block:0 !important; background:var(--rd-subtle) !important; border-bottom:1px solid var(--rd-line) !important;
  color:var(--rd-text3) !important; font-size:11px !important; font-weight:600 !important; text-transform:uppercase; letter-spacing:.06em;
}
:root.rd.uv2 #app #page .table-wrap tbody td { height:56px; border-bottom:1px solid var(--rd-line) !important; background:transparent !important; vertical-align:middle !important; font-size:13.5px; }
:root.rd.uv2 #app #page .table-wrap tbody tr { transition:background-color .12s; }
:root.rd.uv2 #app #page .table-wrap tbody tr:hover td { background:var(--rd-subtle) !important; }
:root.rd.uv2 #app #page .table-wrap tbody tr:last-child td { border-bottom:0 !important; }
:root.rd.uv2 #app #page .table-wrap tbody td :is(strong,b,.cell-title,button.text-link):first-child { color:var(--rd-ink); font-weight:600; }
:root.rd.uv2 #app #page .table-wrap .cell-sub { color:var(--rd-text3) !important; font-size:12px !important; }

/* ── home ── */
:root.rd.uv2 #app #page .hm-toolbar .segmented { background:var(--rd-hover) !important; }
:root.rd.uv2 #app #page .hm-card h2,
:root.rd.uv2 #app #page .hm-card h3 { color:var(--rd-ink) !important; font-weight:600 !important; }

/* ── drive, mail, chats: the big working surfaces ── */
:root.rd.uv2 #app #page :is(.drive-spaces,.drive-browser,.mail-work-folders,.mail-work-content,.chat-shell,.messenger-shell) { border:1px solid var(--rd-line) !important; border-radius:16px !important; box-shadow:var(--uv-shadow) !important; }
:root.rd.uv2 #app #page :is(.drive-spaces,.mail-work-folders) :is(button,a)[aria-current="page"],
:root.rd.uv2 #app #page :is(.drive-spaces,.mail-work-folders) :is(button,a).active { background:var(--rd-primary-soft) !important; color:var(--rd-primary) !important; border-radius:10px !important; }

/* ── calendar ── */
:root.rd.uv2 #app #page .cal-card { border:1px solid var(--rd-line) !important; border-radius:16px !important; box-shadow:var(--uv-shadow) !important; overflow:hidden; }
:root.rd.uv2 #app #page .cal-cardbar { background:var(--rd-surface) !important; border-bottom:1px solid var(--rd-line) !important; }

/* ── settings ── */
:root.rd.uv2 #app #page .settings-form { padding:20px 22px !important; }
:root.rd.uv2 #app #page .settings-form label { color:var(--rd-text2) !important; font-size:13px !important; font-weight:500 !important; }

/* ── empty states ── */
:root.rd.uv2 #app #page :is(.empty,.empty-state,.deal-filter-empty,.cl-empty) { border-radius:var(--uv-radius) !important; border:1px dashed var(--rd-line) !important; background:var(--rd-surface) !important; box-shadow:none !important; color:var(--rd-text3) !important; }

/* ── windows: every dialog in the same frame as the deal and task cards ── */
:root.rd.uv2 #modal-root .modal { border-radius:20px !important; border:1px solid var(--rd-line) !important; box-shadow:var(--uv-window) !important; overflow:hidden; }
:root.rd.uv2 #modal-root .modal > .modal-head { background:var(--rd-surface) !important; border-bottom:1px solid var(--rd-line) !important; padding:12px 16px 12px 24px !important; min-height:56px; }
:root.rd.uv2 #modal-root .modal > .modal-head h2 { color:var(--rd-ink) !important; font-size:17px !important; font-weight:600 !important; letter-spacing:-.01em !important; }
:root.rd.uv2 #modal-root .modal > .modal-head :is(.icon-btn,.dc-rail-button,[data-action="close"]) { width:36px !important; height:36px !important; min-height:36px !important; border-radius:10px !important; background:transparent !important; border:1px solid transparent !important; color:var(--rd-text2) !important; box-shadow:none !important; }
:root.rd.uv2 #modal-root .modal > .modal-head :is(.icon-btn,.dc-rail-button,[data-action="close"]):hover { background:var(--rd-hover) !important; color:var(--rd-ink) !important; }
:root.rd.uv2 #modal-root .modal .modal-body { padding:20px 24px !important; }
:root.rd.uv2 #modal-root .modal :is(.modal-foot,.modal-actions,footer) { background:var(--rd-subtle) !important; border-top:1px solid var(--rd-line) !important; padding:12px 24px !important; }
:root.rd.uv2 #modal-root .modal .btn { height:38px; min-height:38px !important; border-radius:10px !important; font-weight:500 !important; }
:root.rd.uv2 #modal-root .modal .field > span,
:root.rd.uv2 #modal-root .modal label > span:first-child { color:var(--rd-text2) !important; font-size:13px !important; font-weight:500 !important; }
:root.rd.uv2 #modal-root .modal :is(input:not([type=checkbox]):not([type=radio]),select) { min-height:40px !important; border-radius:10px !important; }
:root.rd.uv2 #modal-root .modal textarea { border-radius:12px !important; }
/* the large cards (project, contact, company): soft background behind white cards */
:root.rd.uv2 #modal-root .modal:is(.project-detail-modal,.contact-card-modal,.company-card-modal,.wide) .modal-body { background:var(--rd-subtle) !important; }
:root.rd.uv2 #modal-root .modal .tc-card { background:var(--rd-surface) !important; border:1px solid var(--rd-line) !important; border-radius:16px !important; box-shadow:var(--uv-shadow) !important; }
:root.rd.uv2 #modal-root .modal .tc-section-head { color:var(--rd-ink) !important; font-weight:600 !important; }

/* ── the shell: sidebar and top bar in the same calm weight ── */
:root.rd.uv2 #app .sidebar .nav button,
:root.rd.uv2 #app .sidebar .nav a { border-radius:10px !important; }
:root.rd.uv2 #app .topbar { box-shadow:none !important; }
:root.rd.uv2 #app .topbar .icon-btn,
:root.rd.uv2 #app .topbar .ui-appearance > summary { border-radius:10px !important; }

/* ── popups and side panels: the same radii, lines and shadows as the windows ── */
/* chips inside the deal context: the pipeline count had a pale plate in the dark theme */
:root.rd.uv2 #modal-root .tc-context .dc-pipeline b { background:transparent !important; color:inherit !important; padding:0 !important; }
/* confirm dialogs */
:root.rd.uv2 .ms-dialog { border-radius:16px !important; border:1px solid var(--rd-line) !important; background:var(--rd-surface) !important; box-shadow:var(--uv-window) !important; }
:root.rd.uv2 .ms-dialog h3 { color:var(--rd-ink) !important; font-size:17px !important; font-weight:600 !important; }
:root.rd.uv2 .ms-dialog p { color:var(--rd-text2) !important; }
:root.rd.uv2 .ms-dialog .btn { height:38px; min-height:38px !important; border-radius:10px !important; font-weight:500 !important; }
/* dropdown lists, the notification inbox, the «Вид» menu, the emoji picker */
:root.rd.uv2 .filter-select-popup { border-radius:12px !important; border:1px solid var(--rd-line) !important; box-shadow:var(--uv-shadow-hover) !important; }
:root.rd.uv2 .filter-select-popup .filter-select-option { border-radius:8px !important; }
:root.rd.uv2 :is(#notice-inbox,.ui-appearance-panel,#chat-picker,#chat-mentions,.deal-tools) { border-radius:16px !important; border:1px solid var(--rd-line) !important; box-shadow:var(--uv-shadow-hover) !important; }
/* side panels (letter, new letter, commercial offer): rounded inner edge and a line */
@media (min-width:761px) {
  :root.rd.uv2 .ms-panel { border-radius:20px 0 0 20px !important; border-left:1px solid var(--rd-line) !important; box-shadow:var(--uv-window) !important; overflow:hidden; }
}
:root.rd.uv2 .ms-panel .ms-head { background:var(--rd-surface) !important; border-bottom:1px solid var(--rd-line) !important; }
:root.rd.uv2 .ms-panel .ms-close { border-radius:10px !important; }
/* an HTML letter stays on its white sheet, framed like a card */
:root.rd.uv2 .ms-panel iframe.ms-frame { border-radius:12px !important; border:1px solid var(--rd-line) !important; }
/* the chat info panel is separated from the conversation by a line */
:root.rd.uv2 #app .chat-info-panel { border-left:1px solid var(--rd-line) !important; }

@media (max-width:760px) {
  :root.rd.uv2 #app #page :is(.page-head,.page-heading,.mail-work-heading,.ai-heading,.cal-head) h1,
  :root.rd.uv2 #app #page .hm-title h1 { font-size:24px !important; }
  :root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views) { display:flex !important; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; max-width:100%; }
  :root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views)::-webkit-scrollbar { display:none; }
  :root.rd.uv2 #app #page :is(.cl-tabs,.ai-tabs,.settings-sections,.cal-views) :is(button,.btn,a) { flex:none; }
  :root.rd.uv2 #modal-root .modal { border-radius:0 !important; }
  :root.rd.uv2 #modal-root .modal .modal-body { padding:16px !important; }
}

/* ── one size for every window that slides in from the right: from the right edge up to the left menu ──
   (deal / task / contact / project forms and cards, the new letter, a letter, the KP panel; phones keep full width) */
@media (min-width:901px) {
  :root.rd.uv2 #modal-root .modal-overlay > .modal,
  :root.rd.uv2 .ms-overlay > .ms-panel { width:calc(100% - 210px) !important; max-width:none !important; min-width:0 !important; border-radius:20px 0 0 20px !important; }
}
@media (min-width:1201px) {
  :root.rd.uv2 #modal-root .modal-overlay > .modal,
  :root.rd.uv2 .ms-overlay > .ms-panel { width:calc(100% - 256px) !important; }
}

/* ── fields in every window: white on the soft window background, a thin line, one height and radius ── */
:root.rd.uv2 #modal-root .modal :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]),select,textarea,.filter-select-trigger) {
  background:var(--rd-surface) !important; border:1px solid color-mix(in srgb,var(--rd-text3) 32%,var(--rd-line)) !important; border-radius:10px !important;
  color:var(--rd-ink) !important; box-shadow:none !important; transition:border-color .12s, box-shadow .12s;
}
:root.rd.uv2 #modal-root .modal :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]),select,.filter-select-trigger) { height:40px !important; min-height:40px !important; }
:root.rd.uv2 #modal-root .modal textarea { min-height:96px; }
:root.rd.uv2 #modal-root .modal :is(input,select,textarea,.filter-select-trigger):hover:not(:disabled):not(:focus) { border-color:color-mix(in srgb,var(--rd-text3) 60%,var(--rd-line)) !important; }
:root.rd.uv2 #modal-root .modal :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]),select,textarea,.filter-select-trigger):is(:focus,[aria-expanded="true"]) {
  background:var(--rd-surface) !important; border-color:var(--rd-primary) !important; box-shadow:0 0 0 3px var(--focus) !important; outline:none !important;
}
:root.rd.uv2 #modal-root .modal :is(input,textarea)::placeholder { color:var(--rd-text3) !important; opacity:1; }
:root.rd.uv2 #modal-root .modal :is(input,select,textarea,.filter-select-trigger):disabled,
:root.rd.uv2 #modal-root .modal :is(input,textarea)[readonly] { background:var(--rd-subtle) !important; color:var(--rd-text2) !important; }
:root.rd.uv2 #modal-root .modal .filter-select-trigger .filter-select-value { color:var(--rd-ink) !important; }

/* ── contact card: header with position and contact buttons, tabs, messengers, a note ── */
:root.rd.uv2 #modal-root .contact-detail-panel .cc-heading { display:flex; align-items:flex-start; gap:16px; padding:4px 0 16px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-avatar { width:56px !important; height:56px !important; flex:none; border-radius:16px !important; background:var(--rd-primary-soft) !important; color:var(--rd-primary) !important; font-size:20px !important; font-weight:600 !important; display:grid; place-items:center; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-heading-main { min-width:0; flex:1; display:grid; gap:2px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-heading-main > .tc-field > .tc-label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-name :is(.tc-edit,.tc-readonly) { font-size:22px !important; font-weight:600 !important; color:var(--rd-ink) !important; letter-spacing:-.015em; padding:2px 6px !important; margin-left:-6px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-position :is(.tc-edit,.tc-readonly) { font-size:14px !important; color:var(--rd-text2) !important; padding:1px 6px !important; margin-left:-6px; min-height:0 !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-position .tc-empty-value { color:var(--rd-text3) !important; font-weight:400 !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-heading-main .tc-context { color:var(--rd-text3) !important; font-size:13px !important; margin-top:2px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-head-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-head-btn { display:inline-flex !important; align-items:center; gap:7px; height:36px !important; min-height:36px !important; padding:0 14px !important; border-radius:999px !important; font-size:13px !important; font-weight:500 !important; text-decoration:none; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-head-btn:first-child { background:var(--rd-primary) !important; border-color:var(--rd-primary) !important; color:#fff !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-head-btn .icon { width:16px; height:16px; }
/* tabs */
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tabs { display:flex; gap:2px; padding:4px; margin:0 0 16px; border-radius:12px; background:var(--rd-hover); width:max-content; max-width:100%; overflow-x:auto; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tabs button { height:32px; padding:0 14px; border:0; border-radius:9px; background:transparent; color:var(--rd-text2); font-size:13px; font-weight:500; cursor:pointer; white-space:nowrap; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tabs button:hover { color:var(--rd-ink); }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tabs button[aria-selected="true"] { background:var(--rd-surface); color:var(--rd-ink); box-shadow:0 1px 2px rgba(16,24,40,.08); }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tabs b { margin-left:4px; padding:0 7px; border-radius:999px; background:var(--rd-surface); color:var(--rd-text3); font-size:11.5px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tabs button[aria-selected="true"] b { background:var(--rd-primary-soft); color:var(--rd-primary); }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-tab-panel > * + * { margin-top:16px; }
/* messengers */
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messengers { display:block !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messengers > .tc-label { display:block; margin-bottom:6px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messenger-list { display:grid; gap:6px; margin-bottom:4px; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messenger { display:flex; align-items:center; gap:10px; min-width:0; padding:6px 6px 6px 8px; border-radius:10px; background:var(--rd-subtle); border:1px solid var(--rd-line); }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messenger-badge { flex:none; display:inline-flex; align-items:center; height:22px; padding:0 8px; border-radius:999px; color:#fff; font-size:11.5px; font-weight:600; background:#64748b; }
:root.rd.uv2 #modal-root .cc-messenger-badge[data-messenger="telegram"] { background:#229ed9; }
:root.rd.uv2 #modal-root .cc-messenger-badge[data-messenger="whatsapp"] { background:#1fa855; }
:root.rd.uv2 #modal-root .cc-messenger-badge[data-messenger="max"] { background:#6b4eff; }
:root.rd.uv2 #modal-root .cc-messenger-badge[data-messenger="viber"] { background:#7360f2; }
:root.rd.uv2 #modal-root .cc-messenger-badge[data-messenger="vk"] { background:#0077ff; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messenger-value { flex:1; min-width:0; color:var(--rd-ink); font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messengers-edit { width:auto !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-messenger-list + .cc-messengers-edit { display:inline-flex; margin-top:2px; }
/* messenger editor rows (the card and the full contact form) */
:root.rd.uv2 #modal-root .cc-messenger-editor { display:grid; gap:8px; }
:root.rd.uv2 #modal-root .cc-messenger-edit-row { display:grid; grid-template-columns:140px minmax(0,1fr) 40px; gap:8px; align-items:center; }
:root.rd.uv2 #modal-root .cc-messenger-edit-row .icon-btn { width:40px !important; height:40px !important; border-radius:10px !important; }
:root.rd.uv2 #modal-root .cc-messenger-add { margin-top:8px; height:34px !important; border-radius:999px !important; }
:root.rd.uv2 #modal-root .cc-form-messengers > span { display:block; margin-bottom:6px; }
/* the note */
:root.rd.uv2 #modal-root .contact-detail-panel .cc-notes-card .cc-notes { display:block !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-notes > .tc-label { display:block; margin-bottom:6px; color:var(--rd-ink) !important; font-size:14px !important; font-weight:600 !important; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-notes .tc-value { white-space:pre-wrap; line-height:1.55; }
:root.rd.uv2 #modal-root .contact-detail-panel .cc-updated { margin-top:14px; color:var(--rd-text3); font-size:12px; }
@media (max-width:600px) { :root.rd.uv2 #modal-root .cc-messenger-edit-row { grid-template-columns:110px minmax(0,1fr) 40px; } }

/* ── task form: watchers are picked like a mention (@ and a name), chosen people stay as tags ── */
:root.rd.uv2 #modal-root .task-watchers { position:relative; }
:root.rd.uv2 #modal-root .task-watchers > span small { margin-left:6px; color:var(--rd-text3); font-size:12px; font-weight:400; }
:root.rd.uv2 #modal-root .watcher-box { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-height:40px; margin-top:6px; padding:4px 6px; border-radius:10px; background:var(--rd-surface); border:1px solid color-mix(in srgb,var(--rd-text3) 32%,var(--rd-line)); cursor:text; transition:border-color .12s, box-shadow .12s; }
:root.rd.uv2 #modal-root .watcher-box:focus-within { border-color:var(--rd-primary); box-shadow:0 0 0 3px var(--focus); }
:root.rd.uv2 #modal-root .watcher-tag { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 4px 0 3px; border-radius:999px; background:var(--rd-primary-soft); color:var(--rd-primary); font-size:13px; font-weight:500; max-width:100%; }
:root.rd.uv2 #modal-root .watcher-tag > span:not(.avatar) { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:root.rd.uv2 #modal-root .watcher-tag .avatar,
:root.rd.uv2 #modal-root .watcher-option .avatar { width:24px !important; height:24px !important; flex:none; }
:root.rd.uv2 #modal-root .watcher-remove { display:grid; place-items:center; width:22px; height:22px; padding:0; border:0; border-radius:50%; background:transparent; color:inherit; cursor:pointer; }
:root.rd.uv2 #modal-root .watcher-remove:hover { background:color-mix(in srgb,var(--rd-primary) 18%,transparent); }
:root.rd.uv2 #modal-root .watcher-remove .icon { width:13px; height:13px; }
:root.rd.uv2 #modal-root .modal .task-watchers .watcher-box input.watcher-input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]),
:root.rd.uv2 #modal-root .modal .task-watchers .watcher-box input.watcher-input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]):focus { flex:1 1 160px; min-width:120px; height:30px !important; min-height:30px !important; padding:0 6px !important; border:0 !important; background:transparent !important; box-shadow:none !important; outline:none !important; }
:root.rd.uv2 #modal-root .watcher-suggest { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:20; max-height:280px; overflow:auto; padding:4px; border-radius:12px; border:1px solid var(--rd-line); background:var(--rd-surface); box-shadow:var(--uv-shadow-hover); }
:root.rd.uv2 #modal-root .watcher-option { display:flex; align-items:center; gap:10px; width:100%; height:40px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:var(--rd-ink); font-size:14px; text-align:left; cursor:pointer; }
:root.rd.uv2 #modal-root .watcher-option:hover,
:root.rd.uv2 #modal-root .watcher-option[aria-selected="true"] { background:var(--rd-primary-soft); color:var(--rd-primary); }
:root.rd.uv2 #modal-root .watcher-none { margin:0; padding:10px; color:var(--rd-text3); font-size:13px; }

/* ── dots in drop-down lists: colours by meaning (priority: red / amber / grey; «Все…» neutral) ── */
:root.rd.uv2 .filter-select-badge.is-status[data-tone="red"] { background:var(--rd-red) !important; }
:root.rd.uv2 .filter-select-badge.is-status[data-tone="amber"] { background:#f59e0b !important; }
:root.rd.uv2 .filter-select-badge.is-status[data-tone="gray"] { background:#94a3b8 !important; }
:root.rd.uv2 .filter-select-badge.is-status[data-tone="green"] { background:var(--rd-green) !important; }
:root.rd.uv2 .filter-select-badge.is-status[data-tone="violet"] { background:var(--rd-purple) !important; }
:root.rd.uv2 .filter-select-badge.is-status[data-tone="blue"] { background:var(--rd-primary) !important; }

/* ── «Кому» in a letter: the wrapper with recipient chips is the field, the text input inside has no frame of its own ── */
:root.rd.uv2 #modal-root .modal .mc-recipients { min-height:40px; padding:1px 6px !important; box-sizing:border-box; border-radius:10px !important; background:var(--rd-surface) !important; border:1px solid color-mix(in srgb,var(--rd-text3) 32%,var(--rd-line)) !important; box-shadow:none !important; transition:border-color .12s, box-shadow .12s; }
:root.rd.uv2 #modal-root .modal .mc-recipients:hover { border-color:color-mix(in srgb,var(--rd-text3) 60%,var(--rd-line)) !important; }
:root.rd.uv2 #modal-root .modal .mc-recipients:focus-within { border-color:var(--rd-primary) !important; box-shadow:0 0 0 3px var(--focus) !important; outline:none !important; }
:root.rd.uv2 #modal-root .modal .mc-recipients #mc-recipient,
:root.rd.uv2 #modal-root .modal .mc-recipients #mc-recipient:hover,
:root.rd.uv2 #modal-root .modal .mc-recipients #mc-recipient:focus { border:0 !important; background:transparent !important; box-shadow:none !important; outline:none !important; height:36px !important; min-height:36px !important; }

/* ── people pickers everywhere (members, participants, moderators, deal contacts): @ search, chosen people as tags ── */
:root.rd.uv2 .pp-list { display:flex !important; flex-wrap:wrap; align-items:center; gap:6px !important; position:relative; }
:root.rd.uv2 .pp-list > .pp-picker { flex:1 1 100%; position:relative; order:-1; margin:4px 0 2px; }
:root.rd.uv2 .pp-list .pp-row[hidden] { display:none !important; }
:root.rd.uv2 .pp-list > .pp-row:not(.pp-tag) { flex:1 1 100%; }
:root.rd.uv2 .pp-picker input.pp-input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=color]):not([type=range]) { width:100%; height:40px !important; min-height:40px !important; }
:root.rd.uv2 .pp-empty { margin:6px 2px 0 !important; color:var(--rd-text3) !important; font-size:12.5px !important; }
:root.rd.uv2 .pp-empty[hidden] { display:none !important; }
/* a bare person is a tag: the tick is hidden, a click on the tag removes the person */
:root.rd.uv2 label.pp-tag { position:relative; display:inline-flex !important; align-items:center; gap:6px; width:auto !important; height:30px; min-height:30px !important; margin:0 !important; padding:0 26px 0 10px !important; border-radius:999px !important; background:var(--rd-primary-soft) !important; border:0 !important; color:var(--rd-primary) !important; font-size:13px !important; font-weight:500 !important; cursor:pointer; }
:root.rd.uv2 label.pp-tag:has(.avatar) { padding-left:3px !important; }
:root.rd.uv2 label.pp-tag .avatar { width:24px !important; height:24px !important; flex:none; }
:root.rd.uv2 label.pp-tag > input[type=checkbox] { position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
:root.rd.uv2 label.pp-tag::after { content:"×"; position:absolute; right:9px; top:50%; transform:translateY(-52%); font-size:16px; line-height:1; opacity:.7; }
:root.rd.uv2 label.pp-tag:hover::after { opacity:1; }
:root.rd.uv2 label.pp-tag.is-locked { padding-right:10px !important; cursor:default; background:var(--rd-hover) !important; color:var(--rd-text2) !important; }
:root.rd.uv2 label.pp-tag.is-locked::after { content:none; }
:root.rd.uv2 label.pp-tag small,
:root.rd.uv2 label.pp-tag .pill { display:none !important; }
/* suggestions */
:root.rd.uv2 .pp-suggest { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:30; max-height:280px; overflow:auto; padding:4px; border-radius:12px; border:1px solid var(--rd-line); background:var(--rd-surface); box-shadow:var(--uv-shadow-hover); }
:root.rd.uv2 .pp-option { display:flex; align-items:center; gap:10px; width:100%; height:40px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:var(--rd-ink); font-size:14px; text-align:left; cursor:pointer; }
:root.rd.uv2 .pp-option:hover,
:root.rd.uv2 .pp-option[aria-selected="true"] { background:var(--rd-primary-soft); color:var(--rd-primary); }
:root.rd.uv2 .pp-option .avatar,
:root.rd.uv2 .pp-initials { width:24px !important; height:24px !important; flex:none; }
:root.rd.uv2 .pp-initials { display:grid; place-items:center; border-radius:50%; background:var(--rd-hover); color:var(--rd-text2); font-size:10px; font-weight:700; }
:root.rd.uv2 .pp-none { margin:0; padding:10px; color:var(--rd-text3); font-size:13px; }
/* the calendar's own «Найти участника» is replaced by the picker */
:root.rd.uv2 .cal-people:has(.pp-picker) .cal-people-search { display:none !important; }
/* a list with a people picker grows with its content (no inner scroll), and its search field is always a normal field
   (the calendar made every input inside its list transparent and stretched over a tag) */
:root.rd.uv2 .pp-list { max-height:none !important; overflow:visible !important; height:auto !important; }
:root.rd.uv2 .pp-list > .pp-picker > input.pp-input { position:static !important; inset:auto !important; opacity:1 !important; width:100% !important; max-width:none !important; height:40px !important; margin:0 !important; pointer-events:auto !important; }

/* ── CRM assistant: a dialog of its own at the top of «Чаты» ── */
:root.rd.uv2 .as-chat-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:var(--rd-primary-soft); color:var(--rd-primary); flex:none; }
:root.rd.uv2 .as-chat-avatar .icon { width:20px; height:20px; }
:root.rd.uv2 .as-chat-row .chat-list-tags i { background:var(--rd-primary-soft) !important; color:var(--rd-primary) !important; }
:root.rd.uv2 .as-chat-row .chat-list-copy small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:root.rd.uv2 .as-chat-main { display:flex; flex-direction:column; min-height:0; }
:root.rd.uv2 .as-chat-main .as-scroll { background:transparent; }
:root.rd.uv2 .as-scroll { flex:1; min-height:0; overflow:auto; padding:20px; display:flex; flex-direction:column; gap:10px; }
:root.rd.uv2 .as-msg { display:flex; }
:root.rd.uv2 .as-msg.is-user { justify-content:flex-end; }
:root.rd.uv2 .as-bubble { max-width:78%; padding:10px 14px; border-radius:14px; background:var(--rd-surface); border:1px solid var(--rd-line); color:var(--rd-ink); font-size:14px; line-height:1.55; overflow-wrap:anywhere; }
:root.rd.uv2 .as-msg.is-user .as-bubble { background:var(--rd-primary); border-color:var(--rd-primary); color:#fff; border-bottom-right-radius:4px; }
:root.rd.uv2 .as-msg.is-bot .as-bubble { border-bottom-left-radius:4px; }
:root.rd.uv2 .as-typing { display:inline-flex; gap:4px; }
:root.rd.uv2 .as-typing i { width:7px; height:7px; border-radius:50%; background:var(--rd-text3); animation:as-dot 1s infinite ease-in-out; }
:root.rd.uv2 .as-typing i:nth-child(2) { animation-delay:.15s; } :root.rd.uv2 .as-typing i:nth-child(3) { animation-delay:.3s; }
@keyframes as-dot { 0%,80%,100% { opacity:.3; transform:translateY(0); } 40% { opacity:1; transform:translateY(-3px); } }
:root.rd.uv2 .as-action { align-self:stretch; max-width:78%; padding:12px 14px; border-radius:14px; background:var(--rd-surface); border:1px solid var(--rd-primary-line); box-shadow:var(--uv-shadow); }
:root.rd.uv2 .as-action p { margin:6px 0 0; color:var(--rd-ink); font-size:14px; font-weight:500; }
:root.rd.uv2 .as-action-tag { display:inline-flex; height:22px; align-items:center; padding:0 8px; border-radius:999px; background:var(--rd-primary-soft); color:var(--rd-primary); font-size:11.5px; font-weight:600; }
:root.rd.uv2 .as-action.is-done { border-color:color-mix(in srgb,var(--rd-green) 40%,var(--rd-line)); }
:root.rd.uv2 .as-action.is-done .as-action-tag { background:var(--rd-green-soft); color:var(--rd-green); }
:root.rd.uv2 .as-action.is-failed { border-color:color-mix(in srgb,var(--rd-red) 40%,var(--rd-line)); }
:root.rd.uv2 .as-action.is-failed .as-action-tag { background:color-mix(in srgb,var(--rd-red) 10%,var(--rd-surface)); color:var(--rd-red); }
:root.rd.uv2 .as-action.is-cancelled { opacity:.7; border-color:var(--rd-line); }
:root.rd.uv2 .as-action.is-cancelled .as-action-tag { background:var(--rd-hover); color:var(--rd-text3); }
:root.rd.uv2 .as-action-buttons { display:flex; gap:8px; margin-top:10px; }
:root.rd.uv2 .as-action-result { margin-top:8px; color:var(--rd-green); font-size:13px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
:root.rd.uv2 .as-action-error { margin-top:8px; color:var(--rd-red); font-size:13px; }
:root.rd.uv2 .as-empty { margin:auto; max-width:460px; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; color:var(--rd-text3); font-size:14px; }
:root.rd.uv2 .as-empty strong { color:var(--rd-ink); font-size:17px; font-weight:600; }
:root.rd.uv2 .as-empty-icon { display:grid; place-items:center; width:60px; height:60px; border-radius:18px; background:var(--rd-primary-soft); color:var(--rd-primary); margin-bottom:6px; }
:root.rd.uv2 .as-empty-icon .icon { width:28px; height:28px; }
:root.rd.uv2 .as-suggest { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:10px; }
:root.rd.uv2 .as-suggest .btn { border-radius:999px !important; height:34px !important; }
:root.rd.uv2 .as-compose { display:flex; align-items:flex-end; gap:10px; padding:12px 16px 16px; border-top:1px solid var(--rd-line); background:var(--rd-surface); }
:root.rd.uv2 .as-compose textarea { flex:1; min-height:44px; max-height:160px; resize:vertical; border-radius:12px !important; padding:10px 12px !important; background:var(--rd-subtle) !important; border:1px solid var(--rd-line) !important; color:var(--rd-ink) !important; font-size:14px; }
:root.rd.uv2 .as-compose textarea:focus { background:var(--rd-surface) !important; border-color:var(--rd-primary) !important; box-shadow:0 0 0 3px var(--focus) !important; outline:none !important; }
:root.rd.uv2 .as-compose .btn.primary { width:44px; height:44px; min-height:44px; padding:0 !important; border-radius:12px !important; display:grid; place-items:center; }

/* ── «Обзор» header: the date with a calendar icon under the greeting (the day.s numbers are in the cards below) ── */
:root.rd.uv2 #app #dashboard-workspace.hm .hm-subline { display:flex !important; align-items:center; margin:6px 0 0 !important; min-height:0 !important; white-space:normal !important; overflow:visible !important; font-size:14px !important; line-height:21px !important; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-subline > .hm-date { display:inline-flex !important; align-items:center; gap:6px; color:var(--rd-text3) !important; font-size:14px !important; font-weight:400 !important; line-height:21px !important; white-space:nowrap; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-subline > .hm-date .icon { width:15px; height:15px; color:var(--rd-primary); stroke-width:2; flex:none; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-head { display:grid !important; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:16px; row-gap:0; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-title { display:contents; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-head h1 { grid-column:1; grid-row:1; min-width:0; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-head .hm-actions { grid-column:2; grid-row:1 / span 2; align-self:end; }
:root.rd.uv2 #app #dashboard-workspace.hm .hm-head .hm-subline { grid-column:1 / -1; grid-row:2; }
@media (max-width:900px) {
  :root.rd.uv2 #app #dashboard-workspace.hm .hm-head { grid-template-columns:minmax(0,1fr); row-gap:12px; }
  :root.rd.uv2 #app #dashboard-workspace.hm .hm-head .hm-subline { grid-row:2; margin-top:-6px !important; }
  :root.rd.uv2 #app #dashboard-workspace.hm .hm-head .hm-actions { grid-column:1; grid-row:3; }
}
/* the date opens the calendar */
:root.rd.uv2 #app #dashboard-workspace.hm button.hm-date { height:auto !important; margin:-3px 0 -3px -8px !important; padding:3px 8px !important; border:0 !important; border-radius:8px !important; background:transparent !important; box-shadow:none !important; cursor:pointer; font-family:inherit; }
:root.rd.uv2 #app #dashboard-workspace.hm button.hm-date:hover { background:var(--rd-hover) !important; color:var(--rd-primary) !important; }
:root.rd.uv2 #app #dashboard-workspace.hm button.hm-date:focus-visible { outline:2px solid var(--rd-primary); outline-offset:2px; }

/* ── «Новое дело»: the deal is found by typing; without a deal the activity is personal ── */
:root.rd.uv2 #modal-root .ad-pick { display:flex; flex-direction:column; gap:6px; }
:root.rd.uv2 #modal-root .ad-label { color:var(--rd-text2); font-size:13px; font-weight:500; }
:root.rd.uv2 #modal-root .ad-label small { color:var(--rd-text3); font-weight:400; font-size:12.5px; }
:root.rd.uv2 #modal-root .ad-search { position:relative; }
:root.rd.uv2 #modal-root .ad-search > .icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--rd-text3); pointer-events:none; z-index:1; }
:root.rd.uv2 #modal-root #ad-pick-input { width:100%; padding-left:36px !important; }
:root.rd.uv2 #modal-root .ad-list { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:30; max-height:300px; overflow:auto; padding:4px; background:var(--rd-surface); border:1px solid var(--rd-line); border-radius:12px; box-shadow:0 12px 32px rgba(16,24,40,.16); }
:root.rd.uv2 #modal-root .ad-option { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; padding:8px 10px; border:0; border-radius:8px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; font:inherit; }
:root.rd.uv2 #modal-root .ad-option b { font-size:14px; font-weight:500; line-height:1.3; }
:root.rd.uv2 #modal-root .ad-option small { font-size:12.5px; color:var(--rd-text3); line-height:1.3; }
:root.rd.uv2 #modal-root .ad-option:hover,
:root.rd.uv2 #modal-root .ad-option.is-active { background:var(--rd-primary-soft); }
:root.rd.uv2 #modal-root .ad-option.is-active b { color:var(--rd-primary); }
:root.rd.uv2 #modal-root .ad-empty { padding:12px; color:var(--rd-text3); font-size:13px; }
:root.rd.uv2 #modal-root .ad-chosen { display:flex; align-items:center; gap:10px; min-height:44px; padding:6px 6px 6px 10px; border:1px solid var(--rd-primary-line); border-radius:10px; background:var(--rd-primary-soft); }
:root.rd.uv2 #modal-root .ad-chosen[hidden],
:root.rd.uv2 #modal-root .ad-search[hidden] { display:none; }
:root.rd.uv2 #modal-root .ad-chosen-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; background:var(--rd-surface); color:var(--rd-primary); flex:none; }
:root.rd.uv2 #modal-root .ad-chosen-icon .icon { width:16px; height:16px; }
:root.rd.uv2 #modal-root .ad-chosen-text { display:flex; flex-direction:column; min-width:0; flex:1; }
:root.rd.uv2 #modal-root .ad-chosen-text b { font-size:14px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:root.rd.uv2 #modal-root .ad-chosen-text small { font-size:12.5px; color:var(--rd-text3); }
:root.rd.uv2 #modal-root .ad-hint { color:var(--rd-text3); font-size:12.5px; }
:root.rd.uv2 #modal-root .ad-personal-row { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid var(--rd-line); border-radius:12px; background:var(--rd-subtle); }
:root.rd.uv2 #modal-root .ad-personal-row span:last-child { display:flex; flex-direction:column; gap:2px; }
:root.rd.uv2 #modal-root .ad-personal-row b { color:var(--ink); font-weight:600; }
:root.rd.uv2 #modal-root .ad-personal-row small { color:var(--rd-text3); }

/* date and time fields open their calendar on a click anywhere (date-fields.js) */
:root.rd input:is([type="date"],[type="datetime-local"],[type="time"],[type="month"],[type="week"]):not(:disabled):not([readonly]) { cursor:pointer; }
:root.rd input:is([type="date"],[type="datetime-local"],[type="time"],[type="month"],[type="week"])::-webkit-calendar-picker-indicator { cursor:pointer; }

/* portal confirmation (instead of the browser's dialog): an icon, the question as the title, the details below */
:root.rd.uv2 .ms-dialog { width:min(440px,100%) !important; padding:22px 24px 20px !important; }
:root.rd.uv2 .ms-dialog .pc-icon { display:grid; place-items:center; width:42px; height:42px; margin-bottom:14px; border-radius:12px; background:var(--rd-primary-soft); color:var(--rd-primary); }
:root.rd.uv2 .ms-dialog .pc-icon .icon { width:20px; height:20px; }
:root.rd.uv2 .ms-dialog.is-danger .pc-icon { background:color-mix(in srgb,var(--rd-red) 12%,var(--rd-surface)); color:var(--rd-red); }
:root.rd.uv2 .ms-dialog p { white-space:pre-line; font-size:14px !important; line-height:1.55 !important; }
:root.rd.uv2 .ms-dialog-actions { margin-top:20px !important; }
:root.rd.uv2 .ms-dialog .btn.danger { background:var(--rd-red) !important; border-color:var(--rd-red) !important; color:#fff !important; }
:root.rd.uv2 .ms-dialog-layer.is-fixed { background:rgb(15 23 42 / 36%) !important; backdrop-filter:blur(2px); }
/* «Обзор» keeps the grid of the other sections: header 62px (title, then the date line), buttons level with that line, 20px to the content */
:root.rd.uv2 #app #dashboard-workspace.hm { row-gap:20px !important; }
/* «Задачи» and «Календарь»: their column already puts 16px between blocks, so the header adds 4px — 20px to the content as in the other sections */
:root.rd.uv2 #app #page .task-workspace > .task-page-heading, :root.rd.uv2 #app #page .cal-page > .cal-head { margin-bottom:4px !important; }
:root.rd.uv2 #app #page :is(.deal-header .page-subtitle, .task-page-heading .task-heading-note) { margin-top:6px !important; }
/* «Моё / Команда», «Обновить»: while the overview loads the cursor shows it is busy (an arrow with a spinner) */
:root.rd #dashboard-workspace[aria-busy="true"], :root.rd #dashboard-workspace[aria-busy="true"] * { cursor:progress !important; }

/* «печатает…» in the chat header and the chat list: the scheme colour and three jumping dots */
:root.rd .chat-typing { display:inline-flex; align-items:baseline; gap:1px; color:var(--rd-primary) !important; font-weight:500; white-space:nowrap; }
:root.rd[data-theme="dark"] .chat-typing { color:var(--blue-text) !important; }
:root.rd .chat-typing i { display:inline-block; width:3px; height:3px; margin-left:2px; border-radius:50%; background:currentColor; animation:chat-typing-dot 1.2s infinite ease-in-out; }
:root.rd .chat-typing i:first-of-type { margin-left:3px; }
:root.rd .chat-typing i:nth-of-type(2) { animation-delay:.15s; }
:root.rd .chat-typing i:nth-of-type(3) { animation-delay:.3s; }
@keyframes chat-typing-dot { 0%,60%,100% { transform:translateY(0); opacity:.4; } 30% { transform:translateY(-3px); opacity:1; } }
@media (prefers-reduced-motion:reduce) { :root.rd .chat-typing i { animation:none; opacity:.8; } }
