:root {
  --bg: #f4f3ef; --panel: #ffffff; --ink: #1d2320; --muted: #6b726e; --line: #e2e0d8;
  --accent: #1f6f5c; --accent-ink: #ffffff; --accent-soft: #e3efe9; --warn: #b4531a; --danger: #b3261e;
  --bubble-me: #dcefe6; --bubble: #ffffff; --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  --font-ui: "Manrope", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-family: var(--font-ui);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #141716; --panel: #1c201e; --ink: #e8ebe9; --muted: #98a19c; --line: #2c3230;
    --accent: #4fb596; --accent-ink: #0d1412; --accent-soft: #20332c; --bubble-me: #23392f; --bubble: #232826;
    --shadow: none; color-scheme: dark; }
}
:root[data-theme=dark] { --bg: #141716; --panel: #1c201e; --ink: #e8ebe9; --muted: #98a19c; --line: #2c3230;
    --accent: #4fb596; --accent-ink: #0d1412; --accent-soft: #20332c; --bubble-me: #23392f; --bubble: #232826;
    --shadow: none; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-size: 15px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.page h1, .brand { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 9px 14px; background: var(--accent-soft); color: var(--ink); }
button.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.ghost { background: transparent; color: var(--muted); }
button.danger { background: transparent; color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--panel); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.muted { color: var(--muted); }
.err { color: var(--danger); min-height: 1.2em; font-size: 14px; }
.ok { color: var(--accent); }

/* каркас */
.shell { display: grid; grid-template-columns: 220px 1fr; height: 100vh; height: 100dvh; }
nav.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; font-weight: 700; letter-spacing: .2px; }
.brand svg { width: 28px; height: 28px; }
.nav-find { margin: 0 4px 10px; padding: 8px 10px; font-size: 13px; border-radius: 8px; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 12px 4px; }
.nav-group { margin: 2px 0 4px; }
.nav-group-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 0;
  background: transparent; color: var(--muted); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; border-radius: 8px; text-align: left;
}
.nav-group-btn:hover { background: var(--accent-soft); color: var(--ink); }
.nav-group-chev {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; flex: none;
  transition: transform .2s ease;
}
.nav-group.is-collapsed .nav-group-chev { transform: rotate(-90deg); }
.nav-group-body {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows .22s ease;
}
.nav-group.is-collapsed .nav-group-body { grid-template-rows: 0fr; }
.nav-group-inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-group.is-collapsed .nav-group-btn { opacity: .85; }
@media (prefers-reduced-motion: reduce) {
  .nav-group-body, .nav-group-chev { transition: none; }
}
nav.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; position: relative; font-size: 14px; }
nav.side a:hover { background: var(--accent-soft); }
nav.side a.on { background: var(--accent); color: var(--accent-ink); }
nav.side a.nav-hide { display: none; }
nav.side .spacer { flex: 1; min-height: 8px; }
nav.side .me { font-size: 13px; color: var(--muted); padding: 8px 12px; }
.badge { margin-left: auto; background: var(--warn); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 7px; min-width: 20px; text-align: center; }
nav.side a.on .badge { background: #fff; color: var(--accent); }
nav.side a > .nav-fav-btn {
  margin-left: auto; flex: none; display: inline-grid; place-items: center;
  width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 15px; line-height: 1; cursor: pointer; opacity: .4;
  user-select: none;
}
nav.side a > .badge + .nav-fav-btn { margin-left: 2px; }
nav.side a:hover > .nav-fav-btn,
nav.side a.is-fav > .nav-fav-btn,
nav.side a.nav-fav-link > .nav-fav-btn { opacity: 1; }
nav.side a > .nav-fav-btn:hover { background: var(--accent-soft); color: var(--ink); }
nav.side a > .nav-fav-btn.on { color: #c9a227; opacity: 1; }
nav.side a.on > .nav-fav-btn { color: inherit; opacity: .85; }
nav.side a.on > .nav-fav-btn.on { opacity: 1; }
.nav-fav-group { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.nav-fav-group .nav-fav-link { font-weight: 600; }
main { overflow: hidden; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.view { display: none; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.view.on { display: flex; }
.page {
  flex: 1 1 auto; min-height: 0;
  overflow: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 22px 26px 40px;
}
.page h1 { font-size: 22px; margin: 0 0 4px; }
.page > p.lead { margin: 0 0 18px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); font-size: 12px; }
.warn { background: #fbecdf; color: #7a3410; border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .warn { background: #3a2617; color: #f4c7a5; } }
:root[data-theme=dark] .warn { background: #3a2617; color: #f4c7a5; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.kpi { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }

/* мессенджер и ИИ-чат */
.chatwrap { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; }
.people { border-right: 1px solid var(--line); overflow: auto; background: var(--panel); }
.people .p { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.people .p.on { background: var(--accent-soft); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: none; position: relative; font-size: 14px; }
.av.group { background: #8a6d3b; color: #fff; }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #9aa19d; border: 2px solid var(--panel); }
.av .dot.online { background: #2fbf71; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread header { padding: 12px 18px; border-bottom: 1px solid var(--line); font-weight: 600; background: var(--panel); display: flex; align-items: center; gap: 10px; }
.msgs { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: min(680px, 85%); padding: 8px 12px; border-radius: 14px; background: var(--bubble); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; line-height: 1.4; }
.msg.me { align-self: flex-end; background: var(--bubble-me); border-color: transparent; }
.msg .who { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.msg .t { font-size: 11px; color: var(--muted); margin-top: 3px; text-align: right; }
.msg img { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; margin-top: 4px; }
.msg a.file { display: inline-flex; gap: 6px; align-items: center; color: var(--accent); text-decoration: none; font-weight: 600; }
.composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; }
.composer button { flex: none; height: 42px; }
.empty { margin: auto; color: var(--muted); text-align: center; padding: 30px; }
.typing { color: var(--muted); font-style: italic; }

/* ИИ-чат — полноэкран как Gemini (чеклист от Gemini) */
#v-ai.view.on {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 90;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
body.ai-chat-open .side,
body.ai-chat-open .mobile-nav,
body.ai-chat-open .office-float,
body.ai-chat-open .smola-pet,
body.ai-chat-open .cc-fab,
body.ai-chat-open .nudge,
body.ai-chat-open .unlock {
  display: none !important;
}
.ai-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.ai-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px 10px;
  padding-top: calc(8px + env(safe-area-inset-top, 0));
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  z-index: 2;
}
.ai-top-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.ai-top-acts { display: flex; gap: 4px; flex: none; }
.ai-icon {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); font-size: 18px;
  cursor: pointer; display: grid; place-items: center;
}
.ai-icon:active { background: var(--accent-soft); }
.ai-model-chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  color: var(--ink); cursor: pointer; max-width: min(240px, 55vw);
}
.ai-model-chip #ai-prov {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px;
  background: none; border: 0; padding: 0; font: inherit;
}
.ai-chev { font-size: 10px; opacity: .55; }
.ai-shield-dot { font-size: 14px; opacity: .85; }
.ai-route { font-size: 11px !important; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.pill.soft { background: var(--accent-soft); font-weight: 500; font-size: 12px; }
.ai-setup {
  flex: 0 1 auto;
  max-height: 42dvh;
  overflow: auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}
.ai-stream {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ai-msgs {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
@media (min-width: 900px) {
  .ai-msgs { padding: 28px clamp(24px, 12vw, 18%); }
}
.msg.ai-bubble {
  width: 100%;
  max-width: min(720px, 100%);
  margin: 0 auto;
  padding: 4px 2px;
  border-radius: 0;
  font-size: 15.5px;
  line-height: 1.6;
  white-space: normal;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.msg.ai-bubble.bot {
  align-self: stretch;
  color: var(--ink);
}
.msg.ai-bubble.me {
  align-self: stretch;
  max-width: min(640px, 92%);
  margin-left: auto;
  margin-right: 0;
  padding: 12px 16px;
  border-radius: 22px 22px 6px 22px;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
}
.msg.ai-bubble .ai-p { margin: 0 0 12px; white-space: pre-wrap; word-break: break-word; }
.msg.ai-bubble .ai-p:last-child { margin-bottom: 0; }
.ai-empty {
  max-width: 440px;
  margin: auto;
  text-align: center;
  padding: 48px 24px;
}
.ai-empty .ai-hello {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 28px;
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
}
.ai-empty b {
  display: block;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.ai-empty p { margin: 0 0 10px; line-height: 1.5; color: var(--muted); font-size: 15px; }
.ai-empty .ai-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px;
}
.ai-empty .ai-chips button {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 10px 14px; font-size: 13px; cursor: pointer;
  color: var(--ink);
}
.ai-dock {
  flex: 0 0 auto;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(to top, var(--bg) 65%, transparent);
  z-index: 3;
}
.ai-modes, .ai-smart {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  padding: 4px 2px 8px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 0 !important;
  background: transparent !important;
  max-width: min(720px, 100%);
  margin: 0 auto;
}
.ai-modes button, .ai-smart button {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
}
.ai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: min(720px, 100%);
  margin: 0 auto;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}
.ai-composer .clip {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  cursor: pointer; opacity: .75;
}
.ai-composer textarea {
  flex: 1;
  min-height: 24px;
  max-height: 36dvh;
  font-size: 16px;
  line-height: 1.45;
  padding: 8px 4px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  outline: none;
  overflow-y: auto;
}
.ai-send {
  flex: none;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #fff);
  font-size: 18px; font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
}
.ai-send:active { transform: scale(.96); }
.ai-banner {
  max-width: min(720px, 100%);
  margin: 8px auto 0 !important;
  font-size: 11px !important;
  text-align: center;
  line-height: 1.35;
  opacity: .85;
}
.ai-err { color: var(--danger, #c44); }
.ai-err-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-err-acts button { font-size: 13px; }
.ai-smart-out { max-width: min(720px, 100%); margin: 0 auto 6px; font-size: 13px; }

/* рация */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.talk { aspect-ratio: 1.3; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; user-select: none; -webkit-user-select: none; touch-action: none; box-shadow: var(--shadow); font-weight: 600; }
.talk .av { width: 54px; height: 54px; font-size: 20px; }
.talk small { font-weight: 400; color: var(--muted); }
.talk.all { background: var(--accent-soft); }
.talk.rec { background: var(--danger); color: #fff; transform: scale(.97); }
.talk.rec small { color: #fff; }
.talk-wrap { display: flex; flex-direction: column; gap: 6px; }
.talk-wrap .talk { flex: 1; }
.talk-call-row { display: flex; gap: 6px; justify-content: center; }
.talk-call-row button { flex: 1; font-size: 13px; padding: 8px 6px; }
.call-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(10,16,14,.72); display: flex; align-items: center; justify-content: center; padding: 24px; }
.call-overlay[hidden] { display: none !important; }
.call-card { background: var(--panel); border-radius: 20px; padding: 28px 24px; max-width: 340px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.call-avatar { font-size: 48px; margin-bottom: 8px; }
.call-name { font-size: 22px; font-weight: 700; }
.call-state { color: var(--muted); margin: 8px 0 18px; font-size: 14px; }
.call-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.call-actions button { min-width: 110px; }

/* ========== Простой / Про — разные миры, не «крупнее буквы» ========== */
.ui-mode-bar {
  display: flex; gap: 2px; align-items: center; padding: 3px; margin: 0 4px 12px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 12px;
}
.ui-mode-bar button {
  flex: 1; font-size: 12px; font-weight: 600; padding: 8px 10px; border-radius: 10px;
  background: transparent; border: 0; color: var(--muted); font-family: var(--font-ui);
  transition: background .22s ease, color .2s, transform .2s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.ui-mode-bar button.on {
  background: var(--panel); color: var(--ink); font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* --- ПРОСТОЙ: мало пунктов, крупные дела, меньше шума --- */
body.ui-simple {
  --radius: 18px;
  --shadow: 0 8px 28px rgba(31, 111, 92, .08);
}
body.ui-simple .shell { grid-template-columns: 200px 1fr; }
body.ui-simple nav.side { padding: 16px 12px; gap: 0; }
body.ui-simple .brand { font-size: 18px; padding-bottom: 8px; }
body.ui-simple .brand::after { content: none; }
body.ui-simple .nav-find { display: none; }
body.ui-simple .nav-group-btn { display: none; }
body.ui-simple .nav-group-body { display: block !important; }
body.ui-simple .nav-group.is-collapsed .nav-group-body { grid-template-rows: 1fr; }
body.ui-simple .side a[data-pro],
body.ui-simple .side a.pro-only,
body.ui-simple .pro-only,
body.ui-simple .nav-label.pro-only { display: none !important; }
body.ui-simple .side a {
  font-size: 15px; padding: 14px 14px; margin: 3px 0; border-radius: 14px;
  font-weight: 600;
}
body.ui-simple .side a:not([data-simple]):not(#logout) { display: none; }
body.ui-simple .nav-fav-group { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
body.ui-simple .page { padding: 20px 20px 48px; max-width: 720px; }
body.ui-simple .page h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
body.ui-simple .page > p.lead { font-size: 16px; line-height: 1.45; margin-bottom: 22px; }
body.ui-simple .card { padding: 20px; margin-bottom: 14px; border: 0; }
body.ui-simple .card h2, body.ui-simple .card h3 { font-size: 18px; }
body.ui-simple .muted, body.ui-simple .where { font-size: 13px; }
body.ui-simple .kpis { gap: 12px; }
body.ui-simple .kpi { padding: 14px 16px; border-radius: 14px; }
body.ui-simple .kpi b { font-size: 24px; }
body.ui-simple button.primary { padding: 14px 20px; border-radius: 14px; font-size: 16px; }
body.ui-simple .actions button { padding: 12px 16px; border-radius: 12px; }
body.ui-simple .row { gap: 14px; }
body.ui-simple input, body.ui-simple select, body.ui-simple textarea {
  padding: 14px 14px; border-radius: 12px; font-size: 16px;
}
body.ui-simple table { font-size: 15px; }
body.ui-simple .simple-home {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 20px;
}
body.ui-simple .simple-home .big-tile {
  aspect-ratio: 1.05; border-radius: 20px; background: var(--panel);
  border: 2px solid var(--line); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; font-weight: 700;
  text-decoration: none; color: inherit; box-shadow: var(--shadow); font-size: 16px;
  transition: transform .15s ease, border-color .15s ease;
}
body.ui-simple .simple-home .big-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
body.ui-simple .simple-home .big-tile span { font-size: 36px; line-height: 1; }
body.ui-simple #h-grid, body.ui-simple #h-duty-board,
body.ui-simple details.fold, body.ui-simple #h-wizard,
body.ui-simple .sec-label { display: none !important; }
body.ui-simple #h-easy { display: grid; grid-template-columns: 1fr; gap: 10px; }
body.ui-simple .easy-tile {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border-radius: 16px; text-align: left; width: 100%;
  background: var(--panel); border: 2px solid var(--line);
}
body.ui-simple .easy-tile.primary { border-color: var(--accent); background: var(--accent-soft); }
body.ui-simple .easy-tile .home-ico { font-size: 28px; }
body.ui-simple .easy-tile b { font-size: 17px; display: block; }
body.ui-simple .easy-tile small { color: var(--muted); font-size: 13px; }
body.ui-simple .page-help { display: block; }
body.ui-simple .learn-md, body.ui-simple pre.sent { font-size: 15px; line-height: 1.55; }

/* --- ПРО: благородный iOS · navy + champagne (без дешёвого GOLD) --- */
@keyframes ios-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes ios-soft {
  from { opacity: 0; }
  to { opacity: 1; }
}
body.ui-pro {
  --bg: #0b1020;
  --panel: rgba(28, 36, 56, .72);
  --ink: #f5f2eb;
  --muted: #9aa6b8;
  --line: rgba(255, 255, 255, .08);
  --accent: #c4a574;
  --accent-ink: #1a1520;
  --accent-soft: rgba(196, 165, 116, .12);
  --gold: #c4a574;
  --gold-bright: #e2d0b0;
  --gold-deep: #8f7550;
  --navy: #1a2744;
  --navy-deep: #0b1020;
  --bubble-me: rgba(40, 56, 88, .9);
  --bubble: rgba(22, 30, 48, .9);
  --warn: #d4b896;
  --danger: #e88a8a;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .28);
  --font-ui: "Manrope", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --ease-ios: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: dark;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.011em;
  background: #0b1020 url("/app/s/luxury-wall.svg") center / cover no-repeat fixed;
}
body.ui-pro::before {
  content: ""; pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 32%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(196, 165, 116, .08), transparent 55%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 1;
}
body.ui-pro .shell { grid-template-columns: 232px 1fr; position: relative; z-index: 1; }
body.ui-pro nav.side {
  background: rgba(14, 18, 32, .78);
  backdrop-filter: saturate(1.4) blur(28px);
  -webkit-backdrop-filter: saturate(1.4) blur(28px);
  border-right: 1px solid var(--line);
  box-shadow: none;
}
body.ui-pro .brand {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink); text-transform: none;
  text-shadow: 0 1px 0 rgba(255,255,255,.06);
  animation: ios-soft .6s var(--ease-ios) both;
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 4px;
}
body.ui-pro .brand::before {
  content: "";
  position: absolute; left: 8px; right: 8px; bottom: 4px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .55;
}
body.ui-pro .brand::after {
  content: "СЭМПОЛ";
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  color: var(--gold-bright);
  vertical-align: middle; margin-left: 8px;
  padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(226,208,176,.16), rgba(196,165,116,.08));
  border: 1px solid rgba(196, 165, 116, .35);
  box-shadow: 0 0 20px rgba(196,165,116,.12);
}
body.ui-pro .ui-mode-bar {
  background: rgba(255,255,255,.04);
  border-radius: 12px; padding: 3px; gap: 2px; margin: 0 4px 12px;
}
body.ui-pro .ui-mode-bar button {
  border: 0; border-radius: 10px; font-size: 12px; font-weight: 600;
  letter-spacing: -.01em; font-family: inherit; color: var(--muted);
  background: transparent; flex: 1; padding: 8px 10px;
  transition: background .25s var(--ease-ios), color .25s, transform .2s var(--ease-spring);
}
body.ui-pro .ui-mode-bar button.on {
  background: rgba(255,255,255,.12);
  color: var(--ink); border: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  font-weight: 700;
}
body.ui-pro .nav-find {
  background: rgba(255,255,255,.06); border: 1px solid transparent; border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--ink);
  transition: background .2s, box-shadow .25s var(--ease-ios);
}
body.ui-pro .nav-find:focus {
  border-color: transparent; background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 3px rgba(196, 165, 116, .2);
  outline: none;
}
body.ui-pro .nav-find::placeholder { color: #6a7588; }
body.ui-pro .nav-group-btn {
  font-size: 11px; letter-spacing: .06em; color: var(--muted);
  border-radius: 10px; text-transform: uppercase; font-weight: 700;
}
body.ui-pro nav.side a {
  font-size: 14px; font-weight: 500; padding: 9px 12px; border-radius: 12px; gap: 10px;
  border-left: 0; color: #c8d0dc;
  transition: background .22s var(--ease-ios), color .22s, transform .2s var(--ease-spring);
}
body.ui-pro nav.side a:hover {
  background: rgba(255,255,255,.06); color: #fff; transform: translateX(2px);
}
body.ui-pro nav.side a.on {
  background: rgba(255,255,255,.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
body.ui-pro nav.side a > .nav-fav-btn.on { color: #e2d0b0; }
body.ui-pro .nav-fav-group { border-bottom-color: rgba(196,165,116,.22); }
body.ui-pro .badge {
  border-radius: 999px; background: var(--gold);
  color: var(--accent-ink); font-weight: 700; font-size: 11px;
  box-shadow: none;
}
body.ui-pro .page { padding: 22px 28px 48px; animation: ios-rise .45s var(--ease-ios) both; }
body.ui-pro .page h1 {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600; letter-spacing: -.03em;
  color: var(--ink); text-transform: none; margin-bottom: 6px;
  text-shadow: none;
  background: none;
  -webkit-text-fill-color: unset;
  animation: ios-rise .5s var(--ease-ios) both;
}
body.ui-pro .page h1::before { content: none; }
body.ui-pro .page > p.lead {
  font-size: 15px; font-weight: 400; color: var(--muted); margin-bottom: 20px;
  max-width: 42em; line-height: 1.55; letter-spacing: -.01em;
}
body.ui-pro .card {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, var(--shadow);
  transition: transform .3s var(--ease-ios), border-color .25s, background .25s;
  animation: ios-rise .55s var(--ease-ios) both;
}
body.ui-pro .card:hover {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
}
body.ui-pro .card h2, body.ui-pro .card h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600; letter-spacing: -.02em;
  text-transform: none; color: var(--ink); margin-top: 0;
}
body.ui-pro button {
  border-radius: 12px; font-family: inherit; font-size: 13px; font-weight: 600;
  text-transform: none; letter-spacing: -.01em; padding: 10px 16px;
  background: rgba(255,255,255,.08); border: 1px solid transparent; color: var(--ink);
  transition: background .22s, transform .25s var(--ease-spring), box-shadow .25s;
}
body.ui-pro button:hover {
  background: rgba(255,255,255,.14); color: #fff; transform: scale(1.02);
}
body.ui-pro button:active { transform: scale(.97); }
body.ui-pro button.primary {
  background: linear-gradient(180deg, #e8d5b5 0%, var(--gold) 100%);
  color: var(--accent-ink); border: 0;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(196, 165, 116, .28), inset 0 1px 0 rgba(255,255,255,.35);
}
body.ui-pro button.primary:hover {
  background: linear-gradient(180deg, #f0e2c8 0%, #d4b484 100%);
  color: var(--accent-ink);
  box-shadow: 0 6px 24px rgba(196, 165, 116, .38), inset 0 1px 0 rgba(255,255,255,.4);
}
body.ui-pro button.ghost { color: var(--muted); border-color: transparent; background: transparent; }
body.ui-pro button.danger { color: var(--danger); border-color: transparent; background: rgba(232,138,138,.1); }
body.ui-pro input, body.ui-pro select, body.ui-pro textarea {
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 500; padding: 11px 14px; color: var(--ink);
  transition: box-shadow .25s var(--ease-ios), border-color .2s;
}
body.ui-pro input:focus, body.ui-pro select:focus, body.ui-pro textarea:focus {
  outline: none; border-color: rgba(196, 165, 116, .45);
  box-shadow: 0 0 0 4px rgba(196, 165, 116, .15);
}
body.ui-pro label {
  font-size: 12px; letter-spacing: .02em; color: var(--muted);
  text-transform: none; font-weight: 600;
}
body.ui-pro .kpi {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
  color: var(--ink);
  transition: transform .3s var(--ease-spring);
}
body.ui-pro .kpi:hover { transform: translateY(-2px); }
body.ui-pro .kpi b { font-size: 22px; color: var(--gold-bright); font-weight: 700; letter-spacing: -.02em; }
body.ui-pro .kpi span { font-size: 11px; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; font-weight: 600; }
body.ui-pro table { font-size: 13.5px; color: var(--ink); background: transparent; }
body.ui-pro th {
  font-size: 11px; letter-spacing: .05em; color: var(--muted);
  text-transform: uppercase; font-weight: 700;
  background: rgba(0,0,0,.2);
}
body.ui-pro td { color: #eef2f8; background: transparent; }
body.ui-pro td, body.ui-pro th { padding: 10px 8px; border-bottom-color: var(--line); }
body.ui-pro td[style*="accent-soft"],
body.ui-pro tr.sec-row td {
  background: rgba(196, 165, 116, .1) !important;
  color: var(--gold-bright) !important;
}
body.ui-pro .tablewrap {
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
}
body.ui-pro .muted { color: var(--muted) !important; }
body.ui-pro .pill {
  border-radius: 999px; font-size: 11px; font-weight: 600;
  color: #fff !important;
  background: rgba(90, 130, 200, .45) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}
body.ui-pro .simple-home { display: none !important; }
body.ui-pro .easy-tile {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  font-family: inherit; text-transform: none; letter-spacing: -.01em; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease-spring), background .25s;
}
body.ui-pro .easy-tile.primary {
  border-color: rgba(196, 165, 116, .35);
  box-shadow: 0 8px 28px rgba(196, 165, 116, .15);
}
body.ui-pro .easy-tile:hover {
  border-color: rgba(255,255,255,.16);
  transform: translateY(-3px) scale(1.01);
  background: rgba(255,255,255,.08);
}
body.ui-pro .home-grid .home-tile {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05); font-size: 13px; color: var(--ink);
  transition: transform .3s var(--ease-spring);
}
body.ui-pro .home-grid .home-tile:hover { transform: scale(1.03); }
body.ui-pro .sec-label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 18px 0 10px; font-weight: 700;
}
body.ui-pro .sec-label::before {
  content: ""; display: inline-block; width: 10px; height: 2px;
  margin-right: 8px; vertical-align: middle;
  background: var(--gold); border-radius: 2px; opacity: .7;
}
body.ui-pro pre.sent, body.ui-pro .learn-md {
  font-family: inherit; font-size: 13.5px; line-height: 1.55;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
}
body.ui-pro .msg { border-radius: 16px; font-size: 14px; color: var(--ink); }
body.ui-pro .talk { border-radius: 18px; }
body.ui-pro .call-card {
  border-radius: 22px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(28, 36, 56, .85);
  backdrop-filter: blur(24px);
}
body.ui-pro .theme-toggle, body.ui-pro [data-theme-btn] { opacity: .45; }
body.ui-pro .page-help {
  border-color: var(--line);
  background: rgba(255,255,255,.04); font-size: 13px; color: var(--muted);
  border-radius: 14px;
}
body.ui-pro a { color: var(--gold-bright); }
body.ui-pro a:hover { color: #fff; text-decoration: none; opacity: .92; }
body.ui-pro .err { color: #f0a0a0; }
body.ui-pro .ok { color: var(--gold-bright); }
@media (prefers-reduced-motion: reduce) {
  body.ui-pro .page, body.ui-pro .page h1, body.ui-pro .card, body.ui-pro .brand { animation: none; }
  body.ui-pro button, body.ui-pro nav.side a, body.ui-pro .easy-tile, body.ui-pro .kpi { transition: none; }
}

/* ========== Дизайн · ателье фирстиля (не cyberpunk) ========== */
@keyframes bs-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bs-soft-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes bs-spin {
  to { transform: rotate(360deg); }
}

.brand-studio {
  --bs-navy: #1d2f57;
  --bs-navy-deep: #152445;
  --bs-gold: #b8923e;
  --bs-paper: #f7f5f1;
  --bs-paper-2: #efeae2;
  --bs-ink: #1a2332;
  --bs-muted: #5c6b7a;
  --bs-line: #d8d2c8;
  --bs-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --bs-font-ui: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--bs-line) !important;
  border-radius: 4px !important;
  background: var(--bs-paper) !important;
  color: var(--bs-ink);
  font-family: var(--bs-font-ui);
  box-shadow: 0 12px 32px rgba(26, 35, 50, .08) !important;
  isolation: isolate;
}
.brand-studio > *:not(.bs-paper) { position: relative; z-index: 1; }

.bs-paper {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), transparent 40%),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(29, 47, 87, .015) 4px),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(184, 146, 62, .08), transparent 50%),
    var(--bs-paper);
}

.bs-hero {
  display: grid; grid-template-columns: 1.5fr auto; gap: 24px; align-items: end;
  padding: 28px 28px 20px;
}
@media (max-width: 720px) {
  .bs-hero { grid-template-columns: 1fr; gap: 16px; }
}
.bs-eyebrow {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .04em;
  color: var(--bs-gold); font-weight: 600; text-transform: none;
}
.bs-title {
  margin: 0 0 10px !important;
  font-family: var(--bs-font-display) !important;
  font-size: 42px !important; font-weight: 600 !important;
  letter-spacing: -.02em !important; text-transform: none !important;
  color: var(--bs-navy) !important; text-shadow: none !important;
  line-height: 1.05;
  animation: bs-fade-up .5s ease both;
}
.bs-title::before { content: none !important; }
.bs-lead {
  margin: 0; max-width: 38em; font-size: 15px; line-height: 1.55; color: var(--bs-muted);
  animation: bs-fade-up .55s ease .04s both;
}
.bs-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.bs-rule {
  height: 1px; margin: 0 28px;
  background: linear-gradient(90deg, var(--bs-navy), var(--bs-gold) 42%, transparent);
  opacity: .45;
}

.bs-btn-primary {
  border: 0 !important; border-radius: 2px !important;
  padding: 12px 18px !important; font-size: 14px !important; font-weight: 650 !important;
  letter-spacing: 0 !important; text-transform: none !important;
  color: #fff !important;
  background: var(--bs-navy) !important;
  box-shadow: none !important;
  transition: background .2s ease, transform .2s ease !important;
  font-family: var(--bs-font-ui) !important;
}
.bs-btn-primary:hover {
  background: var(--bs-navy-deep) !important;
  transform: translateY(-1px);
}
.bs-btn-primary:active { transform: translateY(0); }
.bs-btn-primary:disabled { opacity: .65; cursor: wait; transform: none; }
.bs-btn-label { position: relative; }
.brand-studio.is-busy .bs-btn-label::after {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 8px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  vertical-align: -1px; animation: bs-spin .75s linear infinite;
}

.bs-btn-ghost {
  border-radius: 2px !important; padding: 11px 16px !important;
  background: transparent !important; color: var(--bs-navy) !important;
  border: 1px solid var(--bs-line) !important;
  font-size: 14px !important; letter-spacing: 0 !important; text-transform: none !important;
  font-family: var(--bs-font-ui) !important;
  transition: border-color .2s, background .2s, color .2s !important;
}
.bs-btn-ghost:hover {
  border-color: var(--bs-navy) !important; background: rgba(29, 47, 87, .04) !important;
}

.bs-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; padding: 18px 28px 8px;
}
.bs-kpi {
  padding: 14px 14px 12px; border-radius: 2px;
  background: #fff;
  border: 1px solid var(--bs-line);
  transition: border-color .2s ease, box-shadow .25s ease;
  animation: bs-fade-up .4s ease both;
}
.bs-kpi:nth-child(2) { animation-delay: .03s; }
.bs-kpi:nth-child(3) { animation-delay: .06s; }
.bs-kpi:nth-child(4) { animation-delay: .09s; }
.bs-kpi:nth-child(5) { animation-delay: .12s; }
.bs-kpi:hover {
  border-color: color-mix(in srgb, var(--bs-navy) 35%, var(--bs-line));
  box-shadow: 0 6px 16px rgba(26, 35, 50, .06);
}
.bs-kpi b {
  display: block; font-size: 15px; color: var(--bs-navy); font-weight: 700;
  font-variant-numeric: tabular-nums; word-break: break-all;
  font-family: var(--bs-font-ui);
}
.bs-kpi span {
  display: block; margin-top: 6px; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--bs-muted); font-weight: 500;
}
.bs-swatch {
  display: inline-block; width: 14px; height: 14px; border-radius: 2px;
  margin-left: 8px; vertical-align: -2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.bs-tabs {
  display: flex; gap: 0; margin: 12px 28px 0;
  border-bottom: 1px solid var(--bs-line);
  background: transparent; padding: 0; border-radius: 0;
}
.bs-tab {
  flex: 0 0 auto; border: 0 !important; border-radius: 0 !important;
  padding: 12px 16px 11px !important; background: transparent !important;
  color: var(--bs-muted) !important; font-size: 14px !important; font-weight: 550 !important;
  letter-spacing: 0 !important; text-transform: none !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px;
  font-family: var(--bs-font-ui) !important;
  transition: color .2s, border-color .25s !important;
}
.bs-tab:hover { color: var(--bs-navy) !important; background: transparent !important; }
.bs-tab.on {
  color: var(--bs-navy) !important;
  background: transparent !important;
  border-bottom-color: var(--bs-gold) !important;
  box-shadow: none !important;
}

.bs-panes { padding: 18px 28px 24px; min-height: 180px; }
.bs-pane { display: none; animation: bs-soft-in .35s ease both; }
.bs-pane.on { display: block; }

.bs-stage {
  min-height: 180px; border-radius: 2px; padding: 28px 24px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, #fff, var(--bs-paper-2));
  border: 1px solid var(--bs-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  transition: border-color .25s, background .3s;
}
.brand-studio[data-ready="1"] .bs-stage {
  border-color: color-mix(in srgb, var(--bs-navy) 25%, var(--bs-line));
  background: #fff;
}
.bs-empty {
  text-align: center; color: var(--bs-muted); font-size: 14px; max-width: 280px;
  display: grid; place-items: center; gap: 14px;
}
.bs-empty-mark {
  width: 48px; height: 48px;
  border: 1px solid var(--bs-line);
  background:
    linear-gradient(135deg, transparent 46%, var(--bs-gold) 46%, var(--bs-gold) 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--bs-navy) 46%, var(--bs-navy) 54%, transparent 54%);
  opacity: .55;
}
.bs-empty p { margin: 0; line-height: 1.5; }

.bs-frame {
  position: relative; border-radius: 2px; padding: 12px;
  background: #fff; border: 1px solid var(--bs-line);
  transition: transform .3s ease, box-shadow .3s ease, border-color .25s;
  animation: bs-fade-up .45s ease both;
}
.bs-frame:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--bs-navy) 30%, var(--bs-line));
  box-shadow: 0 14px 28px rgba(26, 35, 50, .1);
}
.bs-frame img {
  display: block; border-radius: 0; max-width: 100%;
  background: var(--bs-paper-2);
}
.bs-frame-mark img { width: 92px; height: 92px; object-fit: contain; }
.bs-frame-header img { max-width: min(100%, 440px); height: auto; }
.bs-frame figcaption {
  margin-top: 10px; font-size: 12px; letter-spacing: .04em;
  text-transform: none; color: var(--bs-muted); text-align: center;
  font-family: var(--bs-font-ui);
}

.bs-files {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.bs-file {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 2px; text-decoration: none;
  color: var(--bs-ink) !important;
  background: #fff;
  border: 1px solid var(--bs-line);
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
  animation: bs-fade-up .35s ease both;
  font-family: var(--bs-font-ui);
}
.bs-file:nth-child(n) { animation-delay: calc(var(--i, 0) * 25ms); }
.bs-file:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--bs-navy) 35%, var(--bs-line));
  box-shadow: 0 8px 18px rgba(26, 35, 50, .07);
}
.bs-file-ico {
  width: 32px; height: 32px; border-radius: 2px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  color: var(--bs-navy);
  background: var(--bs-paper-2);
  border: 1px solid var(--bs-line);
}
.bs-file b { display: block; font-size: 13px; font-weight: 650; color: var(--bs-ink); }
.bs-file small { display: block; font-size: 11px; color: var(--bs-muted); margin-top: 2px; }

.bs-ideas { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bs-ideas li {
  padding: 14px 16px 14px 18px; border-radius: 2px; position: relative;
  background: #fff; border: 1px solid var(--bs-line);
  border-left: 3px solid var(--bs-gold);
  color: var(--bs-ink); font-size: 14px; line-height: 1.5;
  animation: bs-fade-up .35s ease both;
  transition: border-color .2s, box-shadow .2s;
}
.bs-ideas li:hover {
  border-color: color-mix(in srgb, var(--bs-navy) 25%, var(--bs-line));
  border-left-color: var(--bs-navy);
  box-shadow: 0 6px 14px rgba(26, 35, 50, .05);
}
.bs-ideas li::before { content: none; }

.bs-status { margin: 0 28px 20px; min-height: 0; font-size: 13px; color: var(--bs-navy); }
.bs-status.err { color: #9b2c2c; }
.bs-status:empty { display: none; }

/* Про · GOLD не должен ломать светлое ателье вкладки Дизайн */
body.ui-pro .brand-studio,
body.ui-pro .brand-studio .bs-title,
body.ui-pro .brand-studio .bs-tab,
body.ui-pro .brand-studio .bs-btn-primary,
body.ui-pro .brand-studio .bs-btn-ghost,
body.ui-pro .brand-studio .bs-kpi b,
body.ui-pro .brand-studio .bs-file {
  font-family: var(--bs-font-ui) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
}
body.ui-pro .brand-studio .bs-title {
  font-family: var(--bs-font-display) !important;
  font-size: 36px !important;
  color: var(--bs-navy) !important;
}
body.ui-pro .brand-studio {
  border-radius: 4px !important;
  background: var(--bs-paper) !important;
  color: var(--bs-ink) !important;
  border-color: var(--bs-line) !important;
  box-shadow: 0 12px 32px rgba(26, 35, 50, .1) !important;
}
.learn-md { font-size: 14px; line-height: 1.5; }
.learn-md h2 { font-size: 1.25em; margin: 1em 0 .4em; }
.learn-md h3 { font-size: 1.1em; margin: .9em 0 .35em; }
.learn-md h4 { margin: .7em 0 .3em; }
.learn-md ul { margin: .4em 0 .8em; padding-left: 1.2em; }
.learn-md p { margin: .45em 0; }

/* Презентации СЭМПОЛ в Учёбе */
.learn-deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.learn-deck-card {
  border: 1px solid rgba(29, 47, 87, .14); border-radius: 12px; padding: 14px 16px;
  background: linear-gradient(160deg, #f7f4ec 0%, #fff 55%, #eef2fa 100%);
  cursor: pointer; text-align: left; transition: transform .15s ease, box-shadow .15s ease;
}
.learn-deck-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14, 24, 48, .12); }
.learn-deck-card .ico { font-size: 22px; }
.learn-deck-card h3 { margin: 6px 0 4px; font-size: 15px; color: #1d2f57; }
.learn-deck-card p { margin: 0; font-size: 12px; color: #5a6070; line-height: 1.4; }
.learn-deck-stage {
  position: relative; min-height: 320px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(145deg, #0e1830 0%, #1d2f57 55%, #243a6b 100%);
  color: #fff; padding: clamp(20px, 4vw, 40px); margin: 10px 0 14px;
}
.learn-deck-stage .brand { letter-spacing: .28em; font-size: 11px; color: #c9a24a; text-transform: uppercase; margin-bottom: 12px; font-weight: 600; }
.learn-deck-stage h2 { font-size: clamp(22px, 3.5vw, 34px); font-weight: 650; border-left: 4px solid #c9a24a; padding-left: 14px; margin: 0 0 12px; max-width: 18ch; line-height: 1.15; }
.learn-deck-stage .sub { color: #c9d2e8; margin: 0 0 14px 18px; font-size: 15px; }
.learn-deck-stage ul { list-style: none; margin: 0; padding: 0; max-width: 36rem; }
.learn-deck-stage li { font-size: 15px; line-height: 1.45; padding: 8px 0 8px 22px; position: relative; border-bottom: 1px solid rgba(201, 162, 74, .18); color: #eef2fa; }
.learn-deck-stage li::before { content: ""; position: absolute; left: 0; top: 1em; width: 10px; height: 2px; background: #c9a24a; }
.learn-deck-meta { display: flex; justify-content: space-between; font-size: 12px; color: #9aa6c2; margin-top: 18px; }
body.ui-pro .learn-deck-card { background: #121820; border-color: rgba(201, 162, 74, .25); }
body.ui-pro .learn-deck-card h3 { color: #e8ecf4; }

/* курс валют */
.fx-box { max-width: 640px; }
.fx-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fx-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fx-field { flex: 1; min-width: 120px; }
.fx-swap {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-size: 18px; margin-bottom: 1px;
}
.fx-result {
  margin-top: 16px; font-size: 28px; font-weight: 700; letter-spacing: -.02em;
  padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--line);
}

/* один прозрачный хаб-виджет (ИИ · эфир · быстрые) */
.office-float {
  --fm-accent: #1a4f8b;
  position: fixed; right: 16px; bottom: calc(168px + env(safe-area-inset-bottom));
  z-index: 38; display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none;
}
.office-float > * { pointer-events: auto; }
.of-fab {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; position: relative;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.of-fab:hover { transform: scale(1.06); }
.of-fab-ico { font-size: 17px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.office-float.of-glass .of-fab {
  background: color-mix(in srgb, var(--panel, #fff) 38%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: 0 10px 28px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.4);
}
.of-hub-fab.is-on {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent), 0 8px 20px rgba(0,0,0,.18);
}
.office-float.is-live .of-hub-fab {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--fm-accent) 40%, transparent), 0 8px 20px rgba(0,0,0,.16);
}
.of-hub-dot {
  position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--fm-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 80%, #fff);
}
.of-hub-panel {
  width: 328px; padding: 12px 12px 10px;
  border-radius: 20px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.22); color: var(--ink);
  overflow: visible;
}
.of-hub-body, .of-hub-tabs, .of-hub-pane { overflow: visible; }
.office-float.of-glass .of-hub-panel {
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border-color: color-mix(in srgb, var(--ink) 10%, transparent);
}
.of-hub-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px;
}
.of-hub-x { margin-left: auto; padding: 2px 8px; height: auto; font-size: 12px; }
.of-hub-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px;
  padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.of-hub-tabs.of-hub-tabs-5 { grid-template-columns: repeat(5, 1fr); }
.of-hub-tabs.of-hub-tabs-7,
.of-hub-tabs.of-hub-tabs-8,
.of-hub-tabs:has([data-tab="pulse"]),
.of-hub-tabs:has([data-tab="chat"]) {
  grid-template-columns: repeat(4, 1fr);
}
.of-hub-tabs button {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 44px;
}
.of-hub-tabs .of-tab-ico { font-size: 15px; line-height: 1; }
.of-hub-tabs .of-tab-lab {
  font-size: 9px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  color: inherit; opacity: .92;
}
.of-tab-badge {
  position: absolute; top: 2px; right: 4px; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 99px; background: #c45c26; color: #fff;
  font-size: 9px; font-weight: 800; line-height: 14px; text-align: center;
}
.of-hub-dot.of-hub-dot-msg { background: #c45c26; }
.of-pane-hint {
  margin: 0 0 8px; padding: 6px 8px; border-radius: 10px; font-size: 11px; line-height: 1.35;
  color: var(--muted); background: color-mix(in srgb, var(--ink) 5%, transparent);
}
/* Всплывающие описания кнопок */
[data-tip] { position: relative; }
button[data-tip], a[data-tip], .chip[data-tip], .of-q[data-tip], .of-br-tile[data-tip] {
  overflow: visible;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after,
[data-tip].tip-on::after {
  content: attr(data-tip);
  position: absolute; z-index: 1200; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  max-width: min(280px, 72vw); width: max-content;
  padding: 7px 10px; border-radius: 10px; font-size: 11px; font-weight: 500;
  line-height: 1.35; text-align: left; white-space: normal;
  color: #f4f0e8; background: #1a2233;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  pointer-events: none;
}
[data-tip]:hover::before,
[data-tip]:focus-visible::before,
[data-tip].tip-on::before {
  content: ""; position: absolute; z-index: 91; left: 50%; bottom: calc(100% + 2px);
  transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1a2233;
  pointer-events: none;
}
/* у нижнего края экрана — подсказка снизу */
.office-float [data-tip]:hover::after,
.office-float [data-tip]:focus-visible::after {
  bottom: auto; top: calc(100% + 8px);
}
.office-float [data-tip]:hover::before,
.office-float [data-tip]:focus-visible::before {
  bottom: auto; top: calc(100% + 2px); border-top-color: transparent; border-bottom-color: #1a2233;
}
/* сайдбар: CSS-пузырь режется overflow — вкладки используют native title */
nav.side a[data-v][data-tip]:hover::after,
nav.side a[data-v][data-tip]:focus-visible::after,
nav.side a[data-v][data-tip]:hover::before,
nav.side a[data-v][data-tip]:focus-visible::before {
  content: none; display: none;
}
body.ui-pro [data-tip]:hover::after,
body.ui-pro [data-tip]:focus-visible::after {
  background: #0e1524; color: #f0e6d4; border: 1px solid rgba(196,165,116,.35);
}
.of-br-form { display: flex; gap: 6px; margin-bottom: 8px; }
.of-br-form input {
  flex: 1; font: inherit; font-size: 12px; border-radius: 10px;
  border: 1px solid var(--line); padding: 7px 9px; background: transparent; color: var(--ink);
}
.of-br-go { width: 40px; height: 36px; border-radius: 50%; padding: 0; flex: none; }
.of-br-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px;
}
.of-br-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px 6px; border-radius: 12px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--ink) 4%, transparent); cursor: pointer; color: var(--ink);
  font: inherit;
}
.of-br-tile:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.of-br-tile span {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); font-size: 13px; font-weight: 700;
}
.of-br-tile small { font-size: 9px; line-height: 1.15; text-align: center; color: var(--muted); font-weight: 600; }
.of-br-acts { display: flex; gap: 6px; }
.of-hub-tabs > button {
  border: 0; background: transparent; border-radius: 10px; padding: 5px 2px 4px;
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted, #666);
}
.of-hub-tabs > button.on {
  background: var(--panel); color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.of-hub-pane { min-height: 120px; }
/* мини-чат в виджете */
.of-msg-peers {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; max-height: 56px; overflow: auto;
}
.of-msg-chip {
  position: relative; border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 99px; padding: 4px 8px; font: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.of-msg-chip.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: transparent; }
.of-msg-chip.online { box-shadow: inset 0 0 0 1px color-mix(in srgb, #2a9d5c 35%, transparent); }
.of-msg-ub {
  margin-left: 4px; display: inline-block; min-width: 14px; padding: 0 4px;
  border-radius: 99px; background: #c45c26; color: #fff; font-size: 9px; line-height: 14px;
}
.of-msg-list {
  max-height: 160px; overflow: auto; display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 6px; font-size: 12px; line-height: 1.35;
}
.of-msg-row {
  padding: 5px 8px; border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.of-msg-row.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 16%, transparent); max-width: 95%; }
.of-msg-who { display: block; font-size: 10px; font-weight: 700; color: var(--muted); margin-bottom: 1px; }
/* мини-рация */
.of-radio-grid { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.of-talk-wrap { display: flex; gap: 6px; align-items: stretch; }
.of-talk {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, transparent);
  cursor: pointer; user-select: none; color: var(--ink);
}
.of-talk.all { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.of-talk.rec { background: color-mix(in srgb, #c45c26 22%, transparent); border-color: transparent; }
.of-talk-av {
  position: relative; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent); flex: none;
}
.of-talk-av .dot {
  position: absolute; right: 0; bottom: 0; width: 8px; height: 8px; border-radius: 50%;
  background: #999; box-shadow: 0 0 0 2px var(--panel);
}
.of-talk-av .dot.online { background: #2a9d5c; }
.of-talk-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.of-talk-meta b { font-size: 12px; font-weight: 700; }
.of-talk-meta small { font-size: 10px; color: var(--muted); }
.of-talk-calls { display: flex; flex-direction: column; gap: 4px; }
.of-talk-calls button {
  min-width: 36px; height: 28px; padding: 0 6px; font-size: 13px; border-radius: 8px;
}
.fm-dock-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 6px; }
.fm-dock-play {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--fm-accent); color: #fff; font-size: 16px; font-weight: 700;
}
.fm-dock-nav {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink);
}
.fm-dock-name { text-align: center; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
#fm-dock-vol { width: 100%; accent-color: var(--fm-accent); margin-bottom: 6px; }
.fm-dock-acts { display: flex; justify-content: center; }
.fm-dock-acts .ghost { font-size: 11px; padding: 4px 10px; height: auto; }
.of-ai-msgs {
  max-height: 200px; overflow: auto; font-size: 13px; line-height: 1.4;
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px;
}
.of-ai-u {
  align-self: flex-end; max-width: 92%; padding: 6px 10px; border-radius: 12px 12px 4px 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); white-space: pre-wrap;
}
.of-ai-b {
  align-self: flex-start; max-width: 95%; padding: 6px 10px; border-radius: 12px 12px 12px 4px;
  background: color-mix(in srgb, var(--ink) 6%, transparent); white-space: pre-wrap;
}
.of-ai-form { display: flex; gap: 6px; align-items: flex-end; }
.of-ai-form textarea {
  flex: 1; min-height: 44px; max-height: 90px; resize: vertical; font: inherit; font-size: 13px;
  border-radius: 12px; border: 1px solid var(--line); padding: 8px 10px;
  background: color-mix(in srgb, var(--bg, var(--panel)) 90%, transparent); color: var(--ink);
}
.of-ai-go { width: 40px; height: 40px; border-radius: 50%; padding: 0; flex: none; }
.of-quick {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.of-q {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px 6px; border-radius: 14px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--ink) 4%, transparent); cursor: pointer; color: var(--ink);
  font: inherit;
}
.of-q:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.of-q span { font-size: 16px; line-height: 1; }
.of-q small { font-size: 9px; line-height: 1.15; text-align: center; color: var(--muted, #777); font-weight: 600; }
.of-cal-h { font-size: 12px; font-weight: 700; margin-bottom: 4px; display: flex; gap: 6px; align-items: baseline; }
.of-cal-list, .of-cal-up { display: flex; flex-direction: column; gap: 4px; }
.of-cal-row {
  display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.3;
  padding: 4px 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.of-cal-row.warn { background: color-mix(in srgb, #c45c26 18%, transparent); }
.of-cal-plan { display: grid; gap: 6px; margin-top: 8px; }
.of-cal-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.of-cal-k {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--line); background: transparent; border-radius: 10px;
  padding: 5px 2px; cursor: pointer; font-size: 14px; color: var(--ink);
}
.of-cal-k.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: transparent; }
.of-cal-k small { font-size: 9px; font-weight: 700; color: var(--muted); }
.of-cal-k.on small { color: inherit; }
/* сводка */
.of-pulse-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.of-pulse-chip {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 5px 8px; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.of-pulse-chip small { font-size: 10px; font-weight: 600; color: var(--muted); }
.of-pulse-chip.warn { background: color-mix(in srgb, #c45c26 18%, transparent); }
.of-pulse-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 8px;
}
.of-kpi {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px; border-radius: 12px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--ink) 4%, transparent); cursor: pointer;
  color: var(--ink); font: inherit;
}
.of-kpi:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.of-kpi.warn { background: color-mix(in srgb, #c45c26 16%, transparent); }
.of-kpi b { font-size: 15px; line-height: 1.1; }
.of-kpi small { font-size: 9px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.15; }
.of-pulse-lines { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.of-pulse-line {
  font-size: 11px; line-height: 1.3; padding: 4px 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.of-pulse-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.of-pulse-acts button { font-size: 11px; padding: 5px 8px; height: auto; }
.of-fx-mini, .of-note-mini {
  padding-top: 8px; margin-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.of-fx-row { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.of-fx-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 12px; border-radius: 10px;
  border: 1px solid var(--line); padding: 7px 8px; background: transparent; color: var(--ink);
}
.of-fx-cur {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 14px; color: var(--ink); flex: none;
}
.of-fx-cur.on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: transparent; }
.of-fx-out { font-size: 18px; font-weight: 800; margin: 2px 0 6px; letter-spacing: -.02em; }
.of-fx-presets, .of-note-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.of-fx-presets button, .of-note-acts button { font-size: 11px; padding: 4px 8px; height: auto; }
.of-note-mini textarea {
  width: 100%; font: inherit; font-size: 12px; border-radius: 10px; resize: vertical;
  border: 1px solid var(--line); padding: 7px 8px; background: transparent; color: var(--ink);
  margin-bottom: 6px; min-height: 44px;
}
#of-q-filter {
  grid-column: 1 / -1; width: 100%; font: inherit; font-size: 12px;
  border-radius: 10px; border: 1px solid var(--line); padding: 7px 9px;
  background: transparent; color: var(--ink); margin-bottom: 2px;
}
.of-cal-plan input {
  width: 100%; font: inherit; font-size: 12px; border-radius: 10px;
  border: 1px solid var(--line); padding: 7px 9px; background: transparent; color: var(--ink);
}
.of-cal-go { width: 100%; font-size: 13px; }
@media (max-width: 760px) {
  .office-float { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 55; }
  .of-hub-panel { width: min(328px, calc(100vw - 28px)); max-height: min(70dvh, 520px); overflow: auto; }
  .of-quick { grid-template-columns: repeat(4, 1fr); }
}

/* календарь месяца */
.cal-grid-head, .cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-grid-head { margin: 12px 0 6px; }
.cal-grid-head div {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--muted, #777);
  text-transform: lowercase;
}
.cal-cell {
  min-height: 64px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--ink); cursor: pointer; padding: 6px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  font: inherit;
}
.cal-cell.out { opacity: .35; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.cal-cell.has { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; font-size: 12px; color: var(--muted);
}
.cal-leg {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-weight: 600; color: var(--ink);
  background: var(--accent-soft); border: 1px solid var(--line);
}
.cal-leg.weekend { background: #dce6f4; border-color: #3d6b9a; color: #1d2f57; }
.cal-leg.holiday { background: #f5ecd4; border-color: #9a7a32; color: #5c4818; }
.cal-leg.rent { background: #e8f0e9; border-color: #1f6f5c; color: #1a4a3c; }
.cal-leg.weekend::before, .cal-leg.holiday::before, .cal-leg.rent::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px;
}
.cal-leg.weekend::before { background: #3d6b9a; }
.cal-leg.holiday::before { background: #c9a24a; }
.cal-leg.rent::before { background: #1f6f5c; }
.cal-cell.weekend:not(.out) {
  background: #dce6f4 !important;
  border-color: #3d6b9a !important;
}
.cal-cell.holiday:not(.out) {
  background: #f3e6c4 !important;
  border-color: #9a7a32 !important;
}
.cal-cell.weekend .cal-d { color: #1d4a8c !important; }
.cal-cell.holiday .cal-d { color: #7a5a18 !important; }
.cal-d { font-size: 13px; font-weight: 700; }
.cal-mark {
  font-size: 10px; line-height: 1.2; color: #1d4a8c; font-weight: 700;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-cell.holiday .cal-mark { color: #7a5a18; }
body.ui-pro .cal-cell.weekend:not(.out) {
  background: #1a3458 !important; border-color: #5b8fd4 !important;
}
body.ui-pro .cal-cell.holiday:not(.out) {
  background: #3a3220 !important; border-color: #c9a24a !important;
}
body.ui-pro .cal-cell.weekend .cal-d,
body.ui-pro .cal-cell.weekend .cal-mark { color: #9ec5ff !important; }
body.ui-pro .cal-cell.holiday .cal-d,
body.ui-pro .cal-cell.holiday .cal-mark { color: #f0d690 !important; }
body.ui-pro .cal-leg.weekend { background: #1a3458; color: #9ec5ff; border-color: #5b8fd4; }
body.ui-pro .cal-leg.holiday { background: #3a3220; color: #f0d690; border-color: #c9a24a; }
body.ui-pro .cal-leg.rent { background: #1a3a30; color: #8fd4b8; border-color: #1f6f5c; }
.cal-n {
  font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 8px;
  background: #1f6f5c; color: #fff;
}
.cal-dots { display: flex; gap: 3px; margin-top: auto; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: #888; display: inline-block; }
.cal-dot.ship { background: #1a4f8b; }
.cal-dot.buy { background: #c45c26; }
.cal-dot.call { background: #6b4ea3; }
.cal-dot.task { background: #1f6f5c; }
.cal-dot.rent { background: #c9a24a; }
.cal-dot.ops { background: #8b5a2b; }
@media (max-width: 760px) {
  .cal-cell { min-height: 52px; padding: 4px; }
}

/* эфир — один плеер, все станции */
.fm-shell {
  --fm-accent: #1a4f8b;
  border-radius: 20px;
  padding: 22px;
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--fm-accent) 35%, transparent), transparent 55%),
    linear-gradient(160deg, #0c1220 0%, #152238 50%, #0a1018 100%);
  color: #f2f5fa;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 40px rgba(8, 16, 32, .35);
  max-width: 720px;
}
.fm-shell .muted { color: rgba(242,245,250,.62); }
.fm-now { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.fm-dial {
  width: 88px; height: 88px; border-radius: 50%;
  background:
    conic-gradient(from 210deg, rgba(255,255,255,.08), var(--fm-accent), rgba(255,255,255,.1), var(--fm-accent));
  box-shadow: inset 0 0 0 10px #0c1220, 0 0 0 2px rgba(255,255,255,.12);
  position: relative;
  flex: none;
}
.fm-shell.is-live .fm-dial {
  animation: fm-spin 8s linear infinite;
}
@keyframes fm-spin { to { transform: rotate(360deg); } }
.fm-dial::after {
  content: ""; position: absolute; inset: 22px; border-radius: 50%;
  background: #101826; box-shadow: inset 0 2px 8px rgba(0,0,0,.45);
}
.fm-onair { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,245,250,.55); }
.fm-shell.is-live .fm-onair { color: #7dffa3; }
.fm-now-text h2 { margin: 4px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.fm-stations {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px;
}
.fm-st {
  appearance: none; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: #f2f5fa; border-radius: 14px; padding: 12px 10px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; min-height: 72px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.fm-st:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.28); }
.fm-st.on {
  background: color-mix(in srgb, var(--st, var(--fm-accent)) 28%, rgba(0,0,0,.35));
  border-color: var(--st, var(--fm-accent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st, var(--fm-accent)) 60%, transparent);
}
.fm-st b { font-size: 14px; line-height: 1.2; }
.fm-st small { font-size: 11px; color: rgba(242,245,250,.55); }
.fm-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fm-play {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: #f2f5fa; color: #0c1220; font-size: 22px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.fm-play.is-on { background: #7dffa3; }
#fm-vol { flex: 1; min-width: 120px; accent-color: var(--fm-accent); }
@media (max-width: 560px) {
  .fm-now { flex-direction: column; align-items: flex-start; }
  .fm-now-text h2 { font-size: 22px; }
}
.toast { position: fixed; right: 18px; bottom: 18px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 9; max-width: 340px; }

/* 🫧 Смолик — питомец (только CSS/JS в браузере, без API) */
.smola-pet {
  --sp-skin: #5ec4a8;
  position: fixed; right: 16px; bottom: 72px; z-index: 40;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.smola-pet > * { pointer-events: auto; }
.sp-fab {
  position: relative; width: 64px; height: 64px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; padding: 0;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.22));
}
.sp-blob {
  position: absolute; inset: 8px 6px 4px; border-radius: 48% 52% 45% 55% / 55% 48% 52% 45%;
  background: radial-gradient(120% 100% at 30% 25%, #fff8, transparent 45%), var(--sp-skin);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.12);
  transition: background .35s ease, border-radius .35s ease;
}
.smola-pet[data-v="cook"] .sp-blob { border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; }
.smola-pet[data-v="ai"] .sp-blob { border-radius: 50%; }
.smola-pet[data-v="fm"] .sp-blob { border-radius: 42% 58% 48% 52% / 48% 42% 58% 52%; }
.smola-pet[data-v="safe"] .sp-blob { border-radius: 20% 20% 40% 40% / 30% 30% 50% 50%; }
.smola-pet[data-v="hr"] .sp-blob { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
.sp-eye {
  position: absolute; top: 38%; width: 7px; height: 9px; background: #1a2433; border-radius: 50%;
  animation: sp-blink 5s infinite;
}
.sp-eye.l { left: 28%; } .sp-eye.r { right: 28%; }
@keyframes sp-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(.1); }
}
.sp-mouth {
  position: absolute; left: 50%; bottom: 28%; width: 14px; height: 7px;
  border: 2px solid #1a2433; border-top: 0; border-radius: 0 0 12px 12px;
  transform: translateX(-50%);
}
.smola-pet.sp-open .sp-mouth,
.smola-pet[data-v="fm"] .sp-mouth { height: 9px; border-radius: 0 0 14px 14px; }
.sp-hat {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  font-size: 22px; line-height: 1; z-index: 2;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.12));
  transition: transform .25s ease;
}
.smola-pet.sp-open .sp-hat { transform: translateX(-50%) rotate(-12deg) scale(1.08); }
.sp-face {
  position: absolute; right: -4px; bottom: -2px; font-size: 18px; z-index: 2;
  transition: transform .3s ease;
}
.smola-pet[data-v="radio"] .sp-face { animation: sp-wiggle .6s ease infinite alternate; }
@keyframes sp-wiggle { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.sp-bubble {
  width: min(300px, calc(100vw - 28px));
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 12px 32px rgba(0,0,0,.2);
  font-size: 13px; line-height: 1.45;
}
.sp-bubble-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sp-bubble-h b { font-size: 14px; }
.sp-x { border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.sp-joke { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.sp-bubble p { margin: 0 0 8px; }
.sp-bubble .muted { color: var(--muted); font-weight: 400; }
.sp-priv { font-size: 11px !important; color: var(--muted) !important; margin-top: 4px !important; }
.sp-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sp-btn {
  border: 1px solid var(--line); background: var(--accent); color: var(--accent-ink, #fff);
  border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.sp-btn.ghost { background: var(--panel); color: var(--ink); }
.sp-toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 45;
}
.sp-toast button {
  border: 1px solid var(--line); background: var(--panel); border-radius: 99px;
  padding: 8px 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}
@media (max-width: 760px) {
  /* питомец слева — хаб справа, не дерутся за угол над меню */
  .smola-pet { bottom: calc(72px + env(safe-area-inset-bottom)); right: auto; left: 10px; z-index: 54; }
  .sp-fab { width: 48px; height: 48px; }
  .sp-bubble { max-width: min(280px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-eye, .smola-pet[data-v="radio"] .sp-face { animation: none; }
}
.unlock {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--warn); color: #fff; padding: 8px 12px; text-align: center;
  cursor: pointer; z-index: 60;
}
.unlock.is-off, .unlock[hidden] { display: none !important; }
.unlock-go {
  flex: 1; border: 0; background: transparent; color: inherit;
  font: inherit; font-weight: 600; cursor: pointer; padding: 4px 8px;
  text-align: center;
}
.unlock-x {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(0,0,0,.18); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer;
}
.unlock-x:active { background: rgba(0,0,0,.3); }

/* вход */
.login {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 28px 20px;
  position: relative; overflow: hidden;
  background: #0b1020 url("/app/s/luxury-wall.svg") center / cover no-repeat fixed;
  color: #f5f2eb;
}
.login::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(196,165,116,.14), transparent 55%),
    linear-gradient(180deg, rgba(11,16,32,.2), rgba(11,16,32,.55));
}
.login .card {
  width: 100%; max-width: 400px; padding: 32px 30px 28px;
  position: relative; z-index: 1;
  background: rgba(18, 24, 44, .78);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid rgba(196, 165, 116, .28);
  border-radius: 22px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 24px 64px rgba(0,0,0,.45),
    0 0 0 1px rgba(0,0,0,.2);
  color: #f5f2eb;
}
.login .card img {
  display: block; margin: 0 auto 8px;
  filter: drop-shadow(0 4px 16px rgba(196,165,116,.35));
}
.login h1 {
  font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  font-size: 28px; font-weight: 600; letter-spacing: -.02em;
  margin: 8px 0 6px; text-align: center; color: #f5f2eb;
}
.login .card > .muted { text-align: center; color: #9aa6b8 !important; }
.login .brand-line {
  display: block; text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: #c4a574;
  margin: 0 0 4px;
}
.login label { color: #9aa6b8; }
.login input, .login select, .login textarea {
  background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.1); color: #f5f2eb;
  border-radius: 12px;
}
.login input:focus {
  border-color: rgba(196,165,116,.5);
  outline: none; box-shadow: 0 0 0 3px rgba(196,165,116,.18);
}
.login button.primary {
  background: linear-gradient(180deg, #e8d5b5 0%, #c4a574 100%);
  color: #1a1520; font-weight: 700; border: 0; border-radius: 12px;
  box-shadow: 0 6px 22px rgba(196,165,116,.35), inset 0 1px 0 rgba(255,255,255,.4);
  padding: 12px 16px;
}
.login button.primary:hover {
  background: linear-gradient(180deg, #f0e2c8 0%, #d4b484 100%);
}
.login .login-tabs button {
  border-color: rgba(255,255,255,.12); color: #9aa6b8; background: rgba(255,255,255,.04);
}
.login .login-tabs button.on {
  background: linear-gradient(180deg, #e8d5b5, #c4a574);
  color: #1a1520; font-weight: 700;
}
.login .pat-lock canvas { background: rgba(196,165,116,.06); border: 1px solid rgba(196,165,116,.2); }
.login #local-otp { background: rgba(196,165,116,.1); color: #f5f2eb; }
.login .err { color: #e88a8a; }

/* PWA: баннер установки + режим «как приложение» */
.pwa-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom, 0));
  z-index: 88;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.pwa-bar[hidden] { display: none !important; }
.pwa-bar-txt { flex: 1; min-width: 140px; }
.pwa-bar-txt b { display: block; font-size: 14px; margin-bottom: 2px; }
.pwa-bar-txt span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pwa-bar-acts { display: flex; gap: 6px; align-items: center; flex: none; }
.pwa-bar-acts .primary { font-size: 13px; padding: 8px 12px; height: auto; min-height: 40px; }
.pwa-bar-acts .pwa-x { width: 36px; height: 36px; padding: 0; font-size: 20px; border-radius: 50%; }
body.pwa-standalone .pwa-bar { display: none !important; }
html.pwa-standalone, html.pwa-standalone body {
  overscroll-behavior: none;
}
body.pwa-standalone {
  padding-top: env(safe-area-inset-top, 0);
}
body.pwa-standalone .shell {
  min-height: 100dvh;
}
body.pwa-standalone.ai-chat-open #v-ai.view.on {
  padding-top: 0;
}
@media (display-mode: standalone), (display-mode: fullscreen) {
  html { height: 100%; }
  body { min-height: 100dvh; }
}

/* телефон / PWA — прокрутка документа (iOS не режет контент) */
.mobile-nav { display: none; }
@media (max-width: 760px) {
  html {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  html, body {
    height: auto !important;
    min-height: 100%;
    min-height: 100dvh;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: static !important;
  }
  body {
    display: block;
    width: 100%;
  }
  /* звук: компактная плашка, не на всю ширину и не sticky на весь экран */
  .unlock:not(.is-off):not([hidden]) {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0));
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: min(320px, calc(100vw - 24px));
    padding: 6px 8px 6px 10px;
    font-size: 13px;
    z-index: 85;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    gap: 4px;
  }
  .unlock.is-off, .unlock[hidden] { display: none !important; }
  .unlock-go { font-size: 13px; padding: 6px 10px; white-space: nowrap; }
  .unlock-x { width: 32px; height: 32px; border-radius: 50%; }
  body.m-compose .unlock,
  body[data-view="ai"] .unlock,
  body[data-view="msg"] .unlock,
  body[data-view="browser"] .unlock {
    display: none !important;
  }
  .shell {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    grid-template-rows: unset;
    width: 100%;
    min-height: 100dvh;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  nav.side { display: none !important; }
  main {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: visible !important;
  }
  .view { height: auto; overflow: visible; }
  .view.on {
    display: block;
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
  }
  .page,
  .page.desk-page,
  .page.fn-page,
  .page.ob-page {
    display: block;
    flex: none !important;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px calc(108px + env(safe-area-inset-bottom, 0));
    box-sizing: border-box;
  }
  .desk-page { max-height: none !important; }
  .desk-chat { max-height: min(52vh, 420px); min-height: 200px; }
  .notes-wrap {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 12px calc(108px + env(safe-area-inset-bottom, 0));
  }
  .notes-side, .notes-ed { width: 100%; max-width: 100%; }
  body.sandbox-on .shell {
    height: auto !important;
    min-height: calc(100dvh - 44px);
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 4px 4px calc(6px + env(safe-area-inset-bottom, 0));
    z-index: 80;
    max-width: 100vw;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .12);
  }
  .mobile-nav a {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px 6px 10px;
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    position: relative;
    min-width: 64px;
    min-height: 52px;
  }
  .mobile-nav a.on { color: var(--accent); font-weight: 600; }
  .mobile-nav a .ico { display: block; font-size: 22px; line-height: 1.2; }
  .mobile-nav .badge { position: absolute; top: 4px; right: 10px; }
  /* виджеты не перекрывают поле ввода и «Отправить» */
  body.m-compose .office-float,
  body.m-compose .smola-pet,
  body.m-compose .cc-fab,
  body.m-compose .unlock,
  body[data-view="browser"] .office-float,
  body[data-view="browser"] .smola-pet,
  body[data-view="browser"] .cc-fab,
  body[data-view="ai"] .office-float,
  body[data-view="ai"] .smola-pet,
  body[data-view="msg"] .office-float,
  body[data-view="msg"] .smola-pet {
    display: none !important;
  }
  body.m-compose .nudge,
  body[data-view="ai"] .nudge,
  body[data-view="msg"] .nudge {
    top: auto;
    bottom: calc(120px + env(safe-area-inset-bottom, 0));
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
  .cc-fab { display: none !important; } /* на телефоне хаб ◇ вместо Control Center */

  /* чат / браузер — fixed; ИИ — свой полноэкран (z=90, без нижней навигации) */
  #v-msg.view.on,
  #v-browser.view.on {
    display: flex;
    flex-direction: column;
    height: 100dvh !important;
    max-height: 100dvh;
    overflow: hidden !important;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: var(--bg);
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0));
    box-sizing: border-box;
  }
  #v-ai.view.on {
    padding-bottom: 0 !important;
    z-index: 90 !important;
  }
  #v-msg .chatwrap,
  #v-browser .sb-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  #v-ai .ai-shell {
    flex: 1 1 auto;
    min-height: 0;
  }
  #v-ai .msg.ai-bubble.me {
    max-width: 92%;
    font-size: 15px;
  }
  #v-ai #ai-setup {
    margin: 0;
  }
  #v-ai #ai-modes,
  #v-ai #ai-smart {
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-height: 44px;
    padding: 4px 10px !important;
    gap: 6px;
  }
  #v-ai #ai-smart-out:empty { display: none; }
  #v-ai #ai-att { max-width: min(720px, 100%); margin: 0 auto 6px; }
  #v-msg .composer {
    flex: 0 0 auto;
    position: relative;
    z-index: 6;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
    background: var(--panel);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
  }
  #v-msg .composer textarea {
    flex: 1 1 auto;
    min-height: 44px;
    max-height: 120px;
    font-size: 16px !important;
  }
  #v-msg .composer button.primary {
    flex: 0 0 auto;
    min-width: 52px;
    width: 52px;
    height: 48px;
    min-height: 48px;
    font-size: 20px;
    border-radius: 14px;
  }
  #v-msg .composer #attach {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
  }
  .chatwrap { grid-template-columns: 1fr; min-height: 0; flex: 1; overflow: hidden; }
  .chatwrap .people { display: none; }
  .chatwrap.list .people { display: block; overflow: auto; -webkit-overflow-scrolling: touch; height: 100%; }
  .chatwrap.list .thread { display: none; }
  .chatwrap .thread { min-height: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
  .chatwrap .msgs,
  #ai-msgs {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
  }
  #v-desk.view.on .desk-composer {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom, 0));
    z-index: 6;
    background: var(--panel);
    padding: 8px 0;
  }
  .back { display: inline-block !important; }
  .page h1 { font-size: 1.35rem; margin-bottom: 6px; }
  .page > p.lead { font-size: 14px; margin-bottom: 12px; }
  .card { padding: 14px; margin-bottom: 12px; border-radius: 14px; }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row, .toolbar, .actions { flex-wrap: wrap; gap: 8px; }
  .actions { width: 100%; }
  .actions .primary, .actions button.primary { flex: 1 1 100%; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi b { font-size: 18px; }
  button, .easy-tile, a.btn { min-height: 44px; }
  .easy-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  input, select, textarea { font-size: 16px !important; min-height: 44px; max-width: 100%; }
  table { font-size: 13px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .home-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-tile { min-height: 88px; width: 100%; }
  .login {
    min-height: 100dvh;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px calc(28px + env(safe-area-inset-bottom, 0));
    background-attachment: scroll;
    align-content: start;
    place-items: stretch center;
  }
  .login .card {
    max-width: 100%;
    width: 100%;
    margin: auto 0;
    padding: 22px 16px 20px;
    border-radius: 18px;
  }
  .login h1 { font-size: 24px; }
  .login button.primary { min-height: 48px; font-size: 16px; width: 100%; }
  .ui-mode-bar { margin-bottom: 8px; }
  .tablewrap { -webkit-overflow-scrolling: touch; max-width: 100%; }
  .toast { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: none; }
  body.ui-pro .page { padding-left: 12px; padding-right: 12px; animation: none; }
  body.ui-pro .shell { grid-template-columns: 1fr; }
  body.ui-simple .page { max-width: none; padding: 12px 12px calc(108px + env(safe-area-inset-bottom, 0)); }
}
.back { display: none; }

/* входящие */
.inb { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.inb .card-text { white-space: pre-wrap; line-height: 1.45; max-height: 260px; overflow: auto; }
.inb .meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.inb textarea { margin-top: 10px; min-height: 110px; }
.strict { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 99px; }

/* ключи */
.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.kgroup { margin: 10px 0 4px; font-weight: 600; font-size: 13px; color: var(--muted); }
.krow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.krow .lbl { flex: 1; }
.krow .where { font-size: 12px; color: var(--muted); }
code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

.tablewrap { overflow-x: auto; }
table.cmp td { vertical-align: top; }
table.cmp tr.win td { background: #e6f4ec; }
table.cmp tr.lose td { background: #fbe9e0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) table.cmp tr.win td { background: #1d3a2a; } :root:not([data-theme=light]) table.cmp tr.lose td { background: #43281d; } }
:root[data-theme=dark] table.cmp tr.win td { background: #1d3a2a; } :root[data-theme=dark] table.cmp tr.lose td { background: #43281d; }

.modes { display: flex; gap: 6px; padding: 8px 14px 0; overflow-x: auto; flex-wrap: wrap; }
.modes button { flex: none; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; opacity: 1; }
.modes button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.modes button.vpn-soft { border-style: dashed; opacity: 1; }
.modes button.is-off,
.modes button:disabled { opacity: 0.45; cursor: not-allowed; }

/* Кадры: вкладки людей + документы */
.hr-layout { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 820px) { .hr-layout { grid-template-columns: 1fr; } }
.hr-people { padding: 12px; max-height: 70vh; overflow: auto; }
.hr-tabs { display: flex; flex-direction: column; gap: 6px; }
.hr-person {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg, var(--panel)); cursor: pointer;
}
.hr-person b { font-size: 14px; }
.hr-person .muted { font-size: 11px; }
.hr-person.on { border-color: var(--accent); background: var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent)); box-shadow: inset 3px 0 0 var(--accent); }
.hr-person.off { opacity: 0.55; }
.hr-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.hr-docs { padding-left: 0 !important; }
.hr-card .row { margin-bottom: 8px; }
.hr-drop {
  display: block; margin-top: 12px; padding: 14px 16px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer;
  background: var(--accent-soft, color-mix(in srgb, var(--accent) 10%, transparent));
  font-size: 13px; line-height: 1.35; color: var(--ink);
}
.hr-drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.hr-scans { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hr-scan {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 12px;
}
.hr-scan a { color: var(--accent); font-weight: 600; text-decoration: none; }
.hr-scan .conf { color: var(--muted); }
.ts-person { margin-top: 14px; }
.ts-person > summary {
  cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 16px;
  align-items: baseline; padding: 12px 14px; font-weight: 600;
}
.ts-person > summary::-webkit-details-marker { display: none; }
.ts-person[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.ts-person .ts-meta { font-weight: 500; color: var(--muted); font-size: 13px; }
.ts-day-in, .ts-day-out { width: 5.5rem; font-variant-numeric: tabular-nums; }
.ts-abs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ts-abs .chip { cursor: default; }
.ts-abs .chip button { margin: 0; padding: 0 4px; border: 0; background: none; cursor: pointer; }
.ts-wk { opacity: .72; }
.ts-hol { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ts-abs-row { background: color-mix(in srgb, #c8452c 8%, transparent); }
.ai-setup { margin: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); max-height: 42vh; overflow: auto; }
.ai-setup .du-person { min-width: 140px; }
.ai-setup .du-person.on { outline: 2px solid var(--accent); }
.ai-setup h4 { color: var(--muted); font-weight: 600; }
.attach { display: flex; align-items: center; gap: 8px; margin: 8px 14px 0; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.attach span { flex: 1; }
.attach button { height: 28px; padding: 0 8px; }
.clip { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 18px; margin: 0; }
.findings { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.fd { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; border-left-width: 4px; }
.fd.red { border-left-color: #c8452c; } .fd.yellow { border-left-color: #d9a21b; } .fd.green { border-left-color: #2e8b57; } .fd.info { border-left-color: var(--muted); }
.fd summary { cursor: pointer; font-size: 14.5px; }
.fd summary .ico { margin-right: 6px; }
.fd p { margin: 6px 0; font-size: 14px; }
.fd blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: 13px; }
.fd .prop { background: var(--accent-soft); padding: 6px 10px; border-radius: 8px; }
.ai-out .msg { max-width: 100%; }
.attach[hidden] { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; margin: 0; cursor: pointer; }
pre.sent { white-space: pre-wrap; font-size: 12px; background: var(--bubble); padding: 8px; border-radius: 8px; max-height: 300px; overflow: auto; }
.watch-log { max-height: 280px; overflow: auto; font-size: 13px; }
.wiz-step { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.wiz-step .lbl { flex: 1; }
.wiz-step.ok { opacity: .85; }
.wiz-step.opt:not(.ok) { opacity: .7; }
#h-wizard.wiz-done { border-color: var(--accent); }
.buh-hero .buh-co { margin-bottom: 4px; }
.buh-hero .easy-grid { margin-top: 8px; }
body.ui-pro .buh-hero {
  background: linear-gradient(160deg, rgba(196,165,116,.08), transparent 55%);
  border-color: rgba(196,165,116,.25);
}
.su-hero .su-progress { margin-bottom: 10px; }
.su-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.su-bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.su-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; margin-top: 8px; font-size: 14px; }
.su-banner { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.4; }
.su-left, .su-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.su-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 99px; font-size: 13px; background: var(--panel);
}
.su-chip.must { border-color: var(--accent); font-weight: 600; cursor: pointer; }
.su-chip.ok { opacity: .85; background: var(--accent-soft); }
.su-list { display: flex; flex-direction: column; gap: 0; }
.su-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.su-item:last-child { border-bottom: 0; }
.su-item.ok { opacity: .72; }
.su-item.must:not(.ok) { background: var(--accent-soft); margin: 0 -10px; padding: 12px 10px; border-radius: 12px; border-bottom-color: transparent; }
.su-item-top { display: flex; gap: 10px; align-items: flex-start; }
.su-mark { flex: none; width: 1.5em; text-align: center; }
.su-item-txt { flex: 1; min-width: 0; }
.su-mins { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.su-priv { font-size: 12px; color: var(--muted); margin-top: 4px; opacity: .9; }
.su-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 1.5em; }
body.ui-pro .su-bar > i { background: linear-gradient(90deg, #c4a574, #8fa8d0); }
body.ui-pro .su-item.must:not(.ok) { background: rgba(196,165,116,.1); }
.smart-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.smart-row button { flex: 1 1 140px; }
.smart-tools { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.easy-h { margin: 0 0 12px; font-size: 18px; }
.easy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.easy-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  padding: 16px 14px; min-height: 108px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); box-shadow: var(--shadow); }
.easy-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.easy-tile.primary { border-color: var(--accent); background: var(--accent-soft); }
.easy-tile .home-ico { font-size: 26px; line-height: 1; }
.easy-tile b { font-size: 15px; }
.easy-tile small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.fold, .fold-card { margin-top: 10px; }
.fold > summary, .fold-card > summary { cursor: pointer; list-style: none; font-size: 14px; padding: 4px 0; color: var(--ink); }
.fold > summary::-webkit-details-marker, .fold-card > summary::-webkit-details-marker { display: none; }
.fold > summary::before, .fold-card > summary::before { content: "▸ "; color: var(--muted); }
.fold[open] > summary::before, .fold-card[open] > summary::before { content: "▾ "; }
.fold-card { padding: 14px 18px; }
.fold-card[open] { padding-bottom: 16px; }
.sec-label { font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .03em; }
.page-help { margin: 0 0 14px; }
.page-help-btn { background: var(--accent-soft); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.page-help-btn:hover { border-color: var(--accent); }
.page-help.open .page-help-btn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.page-help-body { margin-top: 10px; padding: 12px 14px; background: var(--accent-soft); border-radius: 12px; border: 1px solid var(--line); font-size: 14px; line-height: 1.45; max-width: 720px; }
.page-help-body p { margin: 0 0 8px; }
.page-help-body p:last-child { margin-bottom: 0; }
.notes-side .page-help { margin: 8px 10px 10px; }
.notes-side .page-help-body { max-width: none; }
.page-help-chat { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); grid-column: 1 / -1; }
.page-help-inline { margin: 0 0 0 8px; display: inline-flex; flex-direction: column; align-items: flex-start; }
.page-help-inline .page-help-body { position: absolute; z-index: 5; right: 12px; left: 12px; top: 52px; max-width: 560px; box-shadow: var(--shadow); }

/* ⚡ Всё сюда */
.desk-page { display: flex; flex-direction: column; min-height: 0; height: 100%; max-height: calc(100dvh - 24px); }
.desk-page.desk-drag { outline: 2px dashed var(--accent); outline-offset: -8px; background: var(--accent-soft); }
.desk-tips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.desk-modes { margin-bottom: 10px; }
.desk-chat { flex: 1; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.desk-empty { color: var(--muted); margin: auto; text-align: center; max-width: 360px; line-height: 1.4; padding: 24px; }
.desk-msg { max-width: min(720px, 92%); padding: 10px 12px; border-radius: 14px; white-space: pre-wrap; word-break: break-word;
  line-height: 1.4; font-size: 14px; border: 1px solid var(--line); background: var(--bubble); }
.desk-msg.me { align-self: flex-end; background: var(--bubble-me); border-color: transparent; }
.desk-msg.bot { align-self: flex-start; }
.desk-msg.k-ingest { border-left: 3px solid var(--accent); }
.desk-msg.k-agent { border-left: 3px solid #8a6d3b; }
.desk-msg a { color: var(--accent); font-weight: 600; }
.desk-composer { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.desk-composer textarea { flex: 1; min-height: 48px; max-height: 160px; }
.desk-attach { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px;
  background: var(--accent-soft); cursor: pointer; font-size: 18px; }
.desk-composer button.primary { flex: none; height: 42px; min-width: 48px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.home-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 14px 14px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
  box-shadow: var(--shadow); min-height: 96px; }
.home-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.home-tile .home-ico { font-size: 22px; line-height: 1; }
.home-tile b { font-size: 14px; }
.home-tile small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.home-tile.off { opacity: .55; }
:root[data-glass=on] .home-tile { border-radius: 18px; background: var(--glass-soft, var(--panel)); }
#au-list .krow { flex-wrap: wrap; }

a.btn { display: inline-block; padding: 9px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); text-decoration: none; }
:root[data-glass=on] a.btn { border-radius: 99px; background: var(--glass-soft); border: 1px solid var(--glass-border); }
.rc-table td { vertical-align: middle; }
.rc-table tr.ok-row td { opacity: .75; }
.rc-table .where { font-size: 12px; color: var(--muted); }
.kpi.warnk b { color: var(--warn); }

.inb.late { border-color: #e2563b; box-shadow: 0 0 0 1px #e2563b33, var(--shadow); }
.inb.focus {
  border-color: #c9a84c;
  box-shadow: 0 0 0 2px #c9a84c66, var(--shadow);
  animation: inb-focus-pulse 1.2s ease-out 2;
}
@keyframes inb-focus-pulse {
  0% { box-shadow: 0 0 0 0 #c9a84caa, var(--shadow); }
  70% { box-shadow: 0 0 0 10px #c9a84c00, var(--shadow); }
  100% { box-shadow: 0 0 0 2px #c9a84c66, var(--shadow); }
}
.inb.taken { opacity: .8; }
.inb .wait { font-variant-numeric: tabular-nums; }
.inb .wait.late { color: #d6452b; font-weight: 600; }
.inb-filter { padding: 0 0 12px; }

.kp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kp-row select { width: auto; flex: 1; min-width: 140px; }
.kp-row .where { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.kp-row .where.warn-text { color: var(--warn, #b7791f); }
.kp-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.kp-chips:empty { display: none; }
.chip { border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#sp-body td.in { color: var(--accent); }
#sp-body td.out { color: var(--warn); }
.tk-group h3 { margin: 14px 0 4px; font-size: 14px; color: var(--muted); text-transform: capitalize; }
.krow.done .lbl { text-decoration: line-through; opacity: .6; }
.msg .steps { font-size: 12px; color: var(--muted); border-bottom: 1px dashed var(--line); margin-bottom: 6px; padding-bottom: 6px; }

tr.soon td { background: #fff4e0; } tr.bad td { background: #fde3dc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) tr.soon td { background: #3b2e14; } :root:not([data-theme=light]) tr.bad td { background: #43221b; } }
:root[data-theme=dark] tr.soon td { background: #3b2e14; } :root[data-theme=dark] tr.bad td { background: #43221b; }
tr.done-row td { opacity: .6; }
a.lead-link { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--muted); }
.client-card { width: min(760px, 100%); }
.client-card .cc-sec h3 { font-size: 15px; margin: 16px 0 6px; justify-content: flex-start; }

.sandbox-bar { position: sticky; top: 0; z-index: 12; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  padding: 8px 12px; background: repeating-linear-gradient(135deg, #ffcc00 0 14px, #ffd84d 14px 28px); color: #3a2c00; font-weight: 700; font-size: 14px; }
.sandbox-bar button { padding: 5px 12px; background: rgba(255,255,255,.7) !important; color: #3a2c00; border: 0 !important; }
body.sandbox-on .shell { height: calc(100dvh - 44px); }

/* ---------- заметки ---------- */
.notes-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 16px; padding: 20px; height: 100%; min-height: calc(100vh - 20px); box-sizing: border-box; }
.notes-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nt-head h1 { margin: 0; }
.nt-head-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nt-day-strip { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: var(--accent-soft); border-radius: 12px; border: 1px solid var(--line); }
.nt-day-go { text-align: left; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; }
.nt-day-go.on { outline: 2px solid var(--accent); }
.nt-day-go b { font-size: 14px; }
.nt-day-go span { font-size: 12px; color: var(--muted); }
.nt-day-secs { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-day-sec { font-size: 12px; color: var(--muted); background: var(--panel); border-radius: 8px; padding: 2px 8px; border: 1px solid var(--line); }
.nt-day-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 14px; padding: 10px; background: var(--accent-soft); border-radius: 12px; border: 1px solid var(--line); }
.nt-day-kinds { display: flex; gap: 4px; }
.nt-day-k { padding: 6px 8px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); font-size: 16px; line-height: 1; }
.nt-day-k.on { outline: 2px solid var(--accent); background: var(--panel); }
.nt-day-quick input { flex: 1; min-width: 120px; }
.seg { display: flex; gap: 4px; background: var(--accent-soft); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; background: transparent; padding: 6px 8px; border-radius: 9px; font-size: 13px; }
.seg button.on { background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }
#nt-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding-bottom: 20px; }
.nt-item { text-align: left; display: flex; flex-direction: column; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.nt-item.on { outline: 2px solid var(--accent); }
.nt-item img { width: 100%; max-height: 90px; object-fit: cover; border-radius: 8px; }
.nt-item .pv { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-item small { font-size: 11px; color: var(--muted); }
[data-color=yellow] { --nt: #f5c518; } [data-color=green] { --nt: #34c759; } [data-color=blue] { --nt: #0a84ff; }
[data-color=pink] { --nt: #ff2d55; } [data-color=purple] { --nt: #af52de; } [data-color=gray] { --nt: #8e8e93; }
.nt-item[data-color]:not([data-color=""]) { border-left-color: var(--nt); }
.notes-ed { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 40px; box-shadow: var(--shadow); min-width: 0; overflow-y: auto; }
.notes-ed[data-color]:not([data-color=""]) { border-top: 5px solid var(--nt); }
.notes-ed.over { outline: 3px dashed var(--accent); outline-offset: -8px; }
.nt-empty { text-align: center; padding: 60px 20px; }
.nt-sealed { text-align: center; padding: 48px 24px; max-width: 420px; margin: 40px auto; }
.nt-item.nt-locked { opacity: 0.92; }
.nt-item.nt-locked .pv { font-style: italic; }
.lg-overlay {
  position: fixed; inset: 0; z-index: 12000; background: rgba(12, 22, 30, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.lg-card {
  background: var(--panel, #fff); color: var(--text, #122); border-radius: 16px;
  padding: 20px 22px; width: min(420px, 100%); box-shadow: 0 16px 48px rgba(0,0,0,.25);
  border: 1px solid var(--line, #d5ddd9);
}
.lg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.lg-tabs .lg-tab.on { outline: 2px solid var(--accent, #1f6f5c); }
.lg-fields input { margin-top: 4px; }
.lg-checks .chk { font-size: 14px; }
.nt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.nt-top select { width: auto; }
.nt-top .on { background: var(--accent-soft); }
.nt-back { display: none; }
.nt-colors { display: flex; gap: 5px; }
.nt-colors .dot { flex: none; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--nt, var(--panel)); border: 2px solid var(--line); }
.nt-colors .dot.on { border-color: var(--ink); }
.nt-menu { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nt-menu .btn { white-space: nowrap; }
.nt-people { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.nt-people .chk { display: inline-flex; gap: 5px; align-items: center; font-size: 14px; }
.nt-title { font-size: 26px; font-weight: 700; border: 0; background: transparent; padding: 4px 0; }
.nt-client { border: 0; background: transparent; color: var(--muted); padding: 2px 0 10px; font-size: 14px; }
.nt-b { position: relative; padding: 3px 0; }
.nt-tools { position: absolute; right: 0; top: -6px; display: none; gap: 2px; z-index: 2; }
.nt-b:hover > .nt-tools, .nt-b:focus-within > .nt-tools { display: flex; }
.nt-tools button { padding: 2px 7px; font-size: 12px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line); }
.nt-b textarea, .nt-b > input { border: 0; background: transparent; resize: none; overflow: hidden; width: 100%; padding: 6px 2px; font: inherit; line-height: 1.5; }
.nt-h > input { font-size: 20px; font-weight: 700; }
.nt-quote textarea { border-left: 3px solid var(--accent); padding-left: 12px; font-style: italic; }
.nt-ci { display: flex; align-items: center; gap: 8px; }
.nt-ci input:not([type=checkbox]) { border: 0; background: transparent; padding: 5px 2px; }
.nt-ci.done input:not([type=checkbox]) { text-decoration: line-through; opacity: .55; }
.nt-ci button { padding: 2px 8px; font-size: 12px; opacity: .7; white-space: nowrap; flex: none; }
.nt-ci input:not([type=checkbox]) { flex: 1; min-width: 0; }
.nt-prog { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.nt-prog::before { content: ""; } .nt-prog i { display: block; height: 5px; border-radius: 3px; background: var(--accent); max-width: 160px; }
.nt-table { border-collapse: collapse; min-width: 100%; }
.nt-table td { border: 1px solid var(--line); padding: 0; min-width: 90px; }
.nt-table td input { border: 0; border-radius: 0; background: transparent; padding: 6px 8px; width: 100%; box-sizing: border-box; }
.nt-table .nt-th td { background: var(--accent-soft); } .nt-table .nt-th input { font-weight: 600; }
.nt-table .nt-sum td { padding: 6px 8px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent); }
.nt-tbar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.nt-tbar button, .nt-tbar .btn { padding: 3px 9px; font-size: 12px; }
.nt-img img { max-width: 100%; max-height: 520px; border-radius: 10px; cursor: zoom-in; display: block; }
.nt-cap { border: 0; background: transparent; color: var(--muted); font-size: 13px; padding: 4px 2px; }
.nt-file { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.nt-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.nt-add button { padding: 6px 10px; font-size: 13px; }
.nt-add .muted { font-size: 12px; }
.nt-meta { font-size: 12px; margin-top: 12px; }
.nt-lb { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; cursor: zoom-out; padding: 20px; }
.nt-lb img { max-width: 100%; max-height: 88vh; border-radius: 8px; }
@media (max-width: 860px) {
  .notes-wrap { grid-template-columns: 1fr; padding: 12px 12px 90px; }
  body.nt-open .notes-side { display: none; }
  body:not(.nt-open) .notes-ed { display: none; }
  .nt-back { display: inline-block; }
  .nt-top { gap: 6px; } .nt-colors { gap: 3px; } .nt-colors .dot, :root[data-glass=on] .nt-colors button.dot { width: 18px; height: 18px; }
  .nt-tools { display: flex; position: static; justify-content: flex-end; }
  .nt-b:not(:focus-within) > .nt-tools { display: none; }
}

[hidden] { display: none !important; }

.dt-table { font-size: 13px; border-collapse: collapse; }
.dt-table th, .dt-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt-table th.dt-item { border-left: 2px solid var(--line); text-align: center; }
.dt-table td.in { color: var(--accent); border-left: 2px solid var(--line); } .dt-table td.out { color: var(--warn); } .dt-table td.left { font-weight: 600; }
.dt-table .dt-tot td { font-weight: 700; background: var(--accent-soft); }

.ck-stage { background: var(--accent-soft); font-weight: 600; }
.ck-ok { width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 18px; }
.ck-ok.on { background: var(--accent); color: var(--accent-ink); }
:root[data-glass=on] .ck-ok { border-radius: 50%; padding: 0; }
:root[data-glass=on] .ck-ok.on { background: var(--accent); color: var(--accent-ink); }
.ck-steps { display: flex; flex-direction: column; gap: 8px; }
.ck-step { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ck-step.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ck-step.done { opacity: .7; }
.ck-fact { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ck-proc li { margin: 4px 0; }

.cv-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-ops button.on { background: var(--accent); color: var(--accent-ink); }
:root[data-glass=on] .cv-ops button.on { background: var(--accent); color: var(--accent-ink); }

.site { padding: 12px 0; border-bottom: 1px solid var(--line); }
.site-h { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.site-open { color: inherit; text-decoration: none; }
.site-open:hover b { text-decoration: underline; color: var(--accent); }
.site-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.site-acts .btn { font-size: 13px; padding: 4px 10px; }
.site.bad .site-h b { color: var(--danger); }
#st-serp-box { margin: 10px 0 16px; }
#st-serp-box tr.ok td { background: color-mix(in srgb, var(--ok, #34c759) 12%, transparent); }
.warn-text { color: var(--warn); }

.ct-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.ct-body { display: flex; gap: 14px; flex-wrap: wrap; }
.ct-img { width: 220px; border-radius: 12px; display: block; }
.ct-img.story { width: 150px; }

.sl-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12px; }
.sl-legend .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--c); vertical-align: -1px; }
.st-due, .lg.due { --c: #e5484d; } .st-soon, .lg.soon { --c: #f5a524; } .st-ok, .lg.ok { --c: #30a46c; } .st-muted, .lg.muted, .st-none { --c: #b0b4ba; }
.sl-day-h { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--line); margin-bottom: 4px; }
.sl-day-h span { color: var(--muted); font-variant-numeric: tabular-nums; }
.sl-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 10px 12px; margin: 6px 0; border-radius: 12px;
  border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.sl-row[data-color]:not([data-color=""]) { box-shadow: inset -6px 0 0 var(--tag); }
[data-color=red] { --tag: #e5484d; } [data-color=orange] { --tag: #f76b15; } [data-color=yellow] { --tag: #ffc53d; }
[data-color=green] { --tag: #30a46c; } [data-color=blue] { --tag: #0090ff; } [data-color=purple] { --tag: #8e4ec6; } [data-color=gray] { --tag: #8b8d98; }
.sl-main { flex: 1; min-width: 240px; }
.sl-title b.link { cursor: pointer; text-decoration: underline dotted; }
.sl-deal { margin-left: 6px; font-variant-numeric: tabular-nums; }
.sl-contacts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 4px; }
.sl-contacts a { text-decoration: none; }
.sl-next { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sl-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sl-color { width: auto; max-width: 150px; font-size: 13px; padding: 5px 8px; }
.sl-edit { flex-basis: 100%; margin-top: 6px; }

.sl-color[data-c]:not([data-c=""]) { border: 2px solid var(--tag); }
.sl-color[data-c=red] { --tag: #e5484d; } .sl-color[data-c=orange] { --tag: #f76b15; } .sl-color[data-c=yellow] { --tag: #ffc53d; }
.sl-color[data-c=green] { --tag: #30a46c; } .sl-color[data-c=blue] { --tag: #0090ff; } .sl-color[data-c=purple] { --tag: #8e4ec6; } .sl-color[data-c=gray] { --tag: #8b8d98; }

.call-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.call-chips button { padding: 8px 12px; font-size: 14px; }
.call-chips button.on { background: var(--accent); color: var(--accent-ink); }
:root[data-glass=on] .call-chips button.on { background: var(--accent); color: var(--accent-ink); }
.call-chips input[type=date] { width: auto; }
.call-sheet .sheet { max-width: 560px; }
.call-sheet textarea { width: 100%; font-size: 16px; }
.sl-last { font-size: 13px; margin-top: 4px; background: var(--accent-soft); border-radius: 8px; padding: 4px 8px; display: inline-block; }
a.tel { white-space: nowrap; }
@media (max-width: 600px) {
  .call-sheet .sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; margin: 0; width: 100%; }
  .call-chips button { flex: 1 1 45%; padding: 12px 8px; }
  .sl-actions button { padding: 10px 14px; }
}

.tel-wrap { display: inline-flex; align-items: center; gap: 2px; }
.tel-pc { padding: 2px 8px; font-size: 14px; }

/* 🗂 обязанности · 🗓 план · ❄️ обзвон */
.du-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.du-people .card { margin: 0; }
.du-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.du-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(29, 74, 140, .12); font-size: 13px; text-decoration: none; color: #1d2f57; margin: 2px 4px 2px 0; }
.du-chip.main { background: #1d4a8c; color: #fff; font-weight: 600; }
.pl-day { border-left: 3px solid rgba(127,127,127,.25); padding-left: 10px; margin: 12px 0; }
.pl-day.today { border-left-color: #1d4a8c; }
.pl-day.past { opacity: .65; }
.pl-day h3 { margin: 0 0 4px; font-size: 15px; }
.pl-st { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: rgba(127,127,127,.15); }
.pl-st.st-готово { background: rgba(46,160,67,.2); }
.pl-st.st-варится { background: rgba(201,162,39,.25); }
tr.due td { background: rgba(220,53,69,.10); }
.cd-card h2 { font-size: 22px; }
.cd-contacts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0; font-size: 16px; }
.cd-contacts .tel { font-size: 18px; font-weight: 600; }
.cd-note { background: rgba(127,127,127,.08); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; margin: 6px 0; }
.cd-row { cursor: pointer; }
.cd-row.on { background: rgba(201,162,39,.12); border-radius: 8px; }
.cd-bar { height: 5px; border-radius: 3px; background: rgba(127,127,127,.2); margin-top: 6px; overflow: hidden; }
.cd-bar i { display: block; height: 100%; background: #c9a227; }
.kpi.wide { grid-column: 1 / -1; }

/* ☎️ набор как на телефоне */
.phone-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}
@media (max-width: 820px) {
  .phone-layout { grid-template-columns: 1fr; justify-items: center; }
  .phone-side { width: 100%; }
}
.phone-shell {
  --ph-bg: #1a1f24;
  --ph-face: #12161a;
  --ph-key: #2a3238;
  --ph-ink: #f2f4f3;
  --ph-muted: #8b9590;
  --ph-call: #2fbf71;
  --ph-call-ink: #0a1a12;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 18px 18px 22px;
  border-radius: 36px;
  background: linear-gradient(165deg, #2c343c 0%, var(--ph-bg) 42%, #0e1215 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 18px 40px rgba(0,0,0,.28);
  color: var(--ph-ink);
  outline: none;
}
.phone-shell:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 18px 40px rgba(0,0,0,.28); }
.phone-ear {
  width: 72px; height: 6px; border-radius: 99px; margin: 4px auto 14px;
  background: #0a0c0e; box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.phone-screen {
  min-height: 72px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: var(--ph-face);
  font: 600 28px/1.15 "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .04em;
  word-break: break-all;
  text-align: center;
  color: var(--ph-ink);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.45);
}
.phone-hint {
  font-size: 11px; color: var(--ph-muted); text-align: center;
  margin: 0 0 12px; line-height: 1.35;
}
.phone-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.phone-key {
  aspect-ratio: 1.15;
  min-height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--ph-key);
  color: var(--ph-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  padding: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 6px rgba(0,0,0,.25);
  transition: transform .08s ease, background .12s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.phone-key b { font-size: 26px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.phone-key small { font-size: 9px; letter-spacing: .12em; color: var(--ph-muted); font-weight: 600; }
.phone-key:hover { background: #354048; }
.phone-key:active, .phone-key.is-press {
  transform: scale(.94);
  background: #3d4850;
}
.phone-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 0 4px;
}
.phone-act {
  border: 0;
  border-radius: 50%;
  height: 56px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--ph-key);
  color: var(--ph-ink);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .08s ease;
}
.phone-act:active { transform: scale(.94); }
.phone-call {
  height: 64px;
  font-size: 28px;
  background: var(--ph-call);
  color: var(--ph-call-ink);
  box-shadow: 0 4px 16px rgba(47,191,113,.35);
}
.phone-call:hover { filter: brightness(1.05); }
.phone-back, .phone-clear { font-size: 20px; color: var(--ph-muted); }
.phone-hidden-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.phone-side { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) {
  .phone-key, .phone-act { transition: none; }
}

/* Супер-поиск закупок */
.pr-power {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.pr-power-chip {
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(31,111,92,.12), rgba(31,111,92,.04));
  border: 1px solid rgba(31,111,92,.18);
  font-size: 12px;
  line-height: 1.35;
}
.pr-power-chip b { display: block; font-size: 13px; margin-bottom: 2px; }
.pr-power-chip span { color: var(--muted, #667); }
.pr-qpack { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pr-qchip {
  font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.05); font-weight: 500;
}
.pr-pg { margin-bottom: 12px; }
.pr-pg-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pr-portals {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pr-portal {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 8px;
  background: var(--card-2, rgba(0,0,0,.04));
  color: inherit; text-decoration: none; font-size: 13px;
}
.pr-portal:hover { filter: brightness(1.05); }
.pr-best-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
}
.pr-best-badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 6px;
  background: #1f6f5c; color: #fff;
}
.pr-best-price { font-size: 1.15rem; font-weight: 600; }
.pr-title { font-weight: 500; max-width: 28rem; }
.pr-mp-badge {
  display: inline-block; margin-left: 6px; font-size: 10px;
  padding: 1px 6px; border-radius: 4px;
  background: #c45c26; color: #fff; vertical-align: middle;
}

/* ========== Команда: рабочий день ========== */
.team-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.team-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--panel);
  min-height: 88px;
}
.team-card.on { border-color: color-mix(in srgb, #1f6f5c 45%, var(--line)); }
.team-card.away { border-color: color-mix(in srgb, #c9a227 40%, var(--line)); opacity: 0.92; }
.team-card.off { opacity: 0.72; }
.team-card .tc-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.team-card .tc-name { font-weight: 600; font-size: 14px; }
.team-card .tc-role { font-size: 11px; color: var(--muted, #667); }
.team-card .tc-status {
  font-size: 12px; margin-top: 6px; line-height: 1.35;
  color: var(--text, #222);
}
.team-card .tc-acts {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
  font-size: 11px; color: var(--muted, #667); line-height: 1.4;
}
.team-card .tc-acts div { margin: 2px 0; }
body.ui-pro .team-card {
  background: rgba(21, 42, 72, 0.55);
  border-color: rgba(107, 154, 232, 0.22);
}
body.ui-pro .team-card.on { border-color: rgba(80, 180, 140, 0.45); }
#v-home .team-card {
  background: var(--hb-soft) !important;
  border-color: color-mix(in srgb, var(--hb) 28%, transparent) !important;
  color: var(--hb-ink) !important;
}
#v-home .team-card .tc-role,
#v-home .team-card .tc-acts { color: var(--hb-muted) !important; }

/* ========== Пульт: часы + погода (аккуратно, без карточки) ========== */
.home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.home-top-text { flex: 1 1 220px; min-width: 0; }
.home-top-text h1 { margin-bottom: 6px; }
.home-top-text .lead { margin-top: 0; }
.home-ambient {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex: 0 0 auto;
  margin-top: 2px;
}
.home-clock, .home-weather {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--hb, #1d4a8c) 22%, transparent);
  background: color-mix(in srgb, var(--hb-soft, #e8eef8) 88%, transparent);
  min-width: 108px;
}
.home-clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.hc-time {
  font-family: "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
  color: var(--hb-ink, #0f1c33);
}
.hc-sec {
  font-family: "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;
  font-size: 11px;
  opacity: 0.55;
  margin-top: 1px;
  letter-spacing: 0.12em;
}
.hc-date {
  font-size: 12px;
  color: var(--hb-muted, #4a5d78);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.home-weather {
  min-width: 120px;
  max-width: 160px;
}
.hw-icon { font-size: 18px; line-height: 1; margin-bottom: 2px; }
.hw-temp {
  font-family: "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--hb-ink, #0f1c33);
  font-variant-numeric: tabular-nums;
}
.hw-meta {
  font-size: 11px;
  color: var(--hb-muted, #4a5d78);
  margin-top: 3px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.ui-pro .home-clock,
body.ui-pro .home-weather {
  background: rgba(21, 42, 72, 0.72);
  border-color: rgba(107, 154, 232, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body.ui-pro .hc-time,
body.ui-pro .hw-temp { color: #d7e6ff; }
body.ui-pro .hc-date,
body.ui-pro .hw-meta,
body.ui-pro .hc-sec { color: #9aafcc; }
@media (max-width: 560px) {
  .home-ambient { width: 100%; }
  .home-clock, .home-weather { flex: 1; }
  .hc-time { font-size: 24px; }
}

/* ========== Пульт: синий вместо жёлтого/золота — всё читается ========== */
#v-home {
  --hb: #1d4a8c;
  --hb-soft: #e8eef8;
  --hb-ink: #0f1c33;
  --hb-muted: #4a5d78;
}
body.ui-pro #v-home {
  --hb: #6b9ae8;
  --hb-soft: #152a48;
  --hb-ink: #eef3fb;
  --hb-muted: #a8b8d0;
}
#v-home .page h1 { color: var(--hb-ink) !important; -webkit-text-fill-color: unset !important; background: none !important; }
body.ui-pro #v-home .page h1 { color: #c5d8f5 !important; text-shadow: none; }
#v-home .lead, #v-home .muted { color: var(--hb-muted) !important; }
#v-home .pill,
#v-home .chip,
#v-home .chip.on,
#v-home .strict,
#v-home .du-chip,
#v-home a.btn {
  background: var(--hb) !important;
  color: #fff !important;
  border-color: transparent !important;
}
#v-home .du-chip:not(.main) {
  background: var(--hb-soft) !important;
  color: var(--hb-ink) !important;
}
#v-home .du-chip.main {
  background: var(--hb) !important;
  color: #fff !important;
}
#v-home .kpi {
  background: var(--hb-soft) !important;
  color: var(--hb-ink) !important;
  border: 1px solid color-mix(in srgb, var(--hb) 28%, transparent) !important;
}
#v-home .kpi b { color: var(--hb) !important; }
body.ui-pro #v-home .kpi b { color: #9ec5ff !important; }
#v-home .kpi span { color: var(--hb-muted) !important; }
#v-home .easy-tile,
#v-home .home-tile,
#v-home .big-tile {
  background: var(--hb-soft) !important;
  color: var(--hb-ink) !important;
  border-color: color-mix(in srgb, var(--hb) 35%, transparent) !important;
}
#v-home .easy-tile b,
#v-home .home-tile b,
#v-home .big-tile { color: var(--hb-ink) !important; }
#v-home .easy-tile small,
#v-home .home-tile small { color: var(--hb-muted) !important; }
#v-home .easy-tile.primary,
#v-home .easy-tile:hover,
#v-home .home-tile:hover {
  border-color: var(--hb) !important;
  background: color-mix(in srgb, var(--hb) 18%, var(--hb-soft)) !important;
}
#v-home button.primary,
#v-home .smart-row button.primary {
  background: var(--hb) !important;
  color: #fff !important;
  border-color: var(--hb) !important;
  box-shadow: none !important;
}
#v-home button:not(.ghost):not(.danger):not(.primary) {
  background: var(--hb-soft) !important;
  color: var(--hb-ink) !important;
  border: 1px solid color-mix(in srgb, var(--hb) 30%, transparent);
}
#v-home .card h2,
#v-home .card h3,
#v-home .card h4,
#v-home .easy-h {
  color: var(--hb-ink) !important;
}
body.ui-pro #v-home .card h2,
body.ui-pro #v-home .card h3,
body.ui-pro #v-home .card h4,
body.ui-pro #v-home .easy-h {
  color: #c5d8f5 !important;
}
body.ui-pro #v-home .du-chip {
  background: #1e3a66 !important;
  color: #e8f0ff !important;
}
body.ui-pro #v-home .du-chip.main {
  background: #3d6bb0 !important;
  color: #fff !important;
}

/* —— Work Portal · iPhone / Safari noble —— */
@keyframes obIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes obTileIn {
  from { opacity: 0; transform: translateY(18px) scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes obChromeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
#v-browser {
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 20% -8%, rgba(120, 160, 220, .2), transparent 55%),
    radial-gradient(700px 360px at 90% 0%, rgba(196, 165, 116, .1), transparent 50%),
    var(--bg);
  padding: 0 !important; overflow: hidden;
}
/* —— Smola Surf (встроенный браузер) —— */
.sb-shell {
  --sb-accent: #e66000;
  --sb-chrome: color-mix(in srgb, var(--panel) 88%, #8a9bb0);
  display: flex; flex-direction: column; height: 100%; min-height: 0; flex: 1;
}
.sb-menubar {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
  background: var(--sb-chrome); border-bottom: 1px solid var(--line); flex: none;
}
.sb-brand {
  font-weight: 800; font-size: 13px; letter-spacing: -.02em;
  color: var(--sb-accent);
}
.sb-view-switch {
  display: flex; gap: 2px; padding: 2px; border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.sb-view-switch button {
  border: 0; background: transparent; border-radius: 8px; padding: 5px 12px;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted);
}
.sb-view-switch button.on {
  background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.sb-menubar-hint { font-size: 11px; margin-left: auto; }
.sb-surf { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sb-tabstrip {
  display: flex; align-items: flex-end; gap: 4px; padding: 6px 8px 0;
  background: color-mix(in srgb, var(--ink) 5%, var(--sb-chrome)); flex: none;
}
.sb-tabs { display: flex; gap: 3px; flex: 1; overflow-x: auto; min-width: 0; }
.sb-tab {
  display: inline-flex; align-items: center; gap: 6px; max-width: 160px;
  border: 0; border-radius: 10px 10px 0 0; padding: 7px 10px;
  background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; flex: none;
}
.sb-tab.on { background: var(--panel); color: var(--ink); }
.sb-tab-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-tab-x {
  opacity: .5; font-size: 14px; line-height: 1; padding: 0 2px; border-radius: 4px;
}
.sb-tab-x:hover { opacity: 1; background: color-mix(in srgb, #c45c26 25%, transparent); }
.sb-tab-add {
  width: 28px; height: 28px; border-radius: 8px; border: 0; margin-bottom: 4px;
  background: transparent; cursor: pointer; font-size: 18px; color: var(--ink);
}
.sb-toolbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex: none;
}
.sb-navbtn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 14px; color: var(--ink); flex: none;
}
.sb-navbtn.primary {
  background: color-mix(in srgb, var(--sb-accent) 18%, transparent); border-color: transparent;
  font-weight: 800;
}
.sb-addr {
  flex: 1; display: flex; align-items: center; gap: 6px; margin: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px 2px 12px;
  background: color-mix(in srgb, var(--ink) 3%, transparent); min-width: 0;
}
.sb-addr input {
  flex: 1; border: 0; background: transparent; font: inherit; font-size: 13px;
  padding: 7px 4px; color: var(--ink); min-width: 0;
}
.sb-addr input:focus { outline: none; }
.sb-lock { font-size: 12px; opacity: .65; }
#sb-go {
  border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  background: var(--sb-accent); color: #fff; font-weight: 700; font-size: 12px;
}
.sb-workbar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); border-bottom: 1px solid var(--line);
  flex: none;
}
.sb-chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 3px 10px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.sb-chip:hover { background: color-mix(in srgb, var(--sb-accent) 12%, transparent); }
.sb-body { display: flex; flex: 1; min-height: 0; }
.sb-main {
  flex: 1; min-width: 0; min-height: 0; position: relative;
  background: var(--bg); display: flex; flex-direction: column;
}
.sb-frame {
  flex: 1; width: 100%; height: 100%; border: 0; background: #fff; min-height: 280px;
}
.sb-home, .sb-reader {
  flex: 1; overflow: auto; padding: 16px 18px 24px;
}
.sb-home-hero h2 {
  margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em; color: var(--ink);
}
.sb-home-hero p { margin: 0 0 16px; color: var(--muted); font-size: 14px; max-width: 40em; }
.sb-shield-banner {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
  padding: 8px 12px; margin-bottom: 14px; border-radius: 12px;
  background: color-mix(in srgb, #1f6f5c 14%, transparent); font-size: 13px;
}
.sb-shield-banner b { color: #1f6f5c; }
.sb-policy {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 16px;
}
.sb-policy-col {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px;
}
.sb-policy-col.ok { background: color-mix(in srgb, #1f6f5c 8%, transparent); }
.sb-policy-col.bad { background: color-mix(in srgb, #c45c26 10%, transparent); }
.sb-policy-col h3 { margin: 0 0 6px; font-size: 13px; }
.sb-policy-col ul { margin: 6px 0 0; padding-left: 18px; }
.sb-policy-col li { margin: 2px 0; }
.sb-block-alert {
  padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, #c45c26 18%, transparent); color: var(--ink);
}
.sb-chip-shield {
  background: color-mix(in srgb, #1f6f5c 16%, transparent) !important;
  border-color: transparent !important; cursor: default;
}
@media (max-width: 760px) {
  .sb-policy { grid-template-columns: 1fr; }
}
.sb-start-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px;
  margin-bottom: 16px;
}
.sb-start {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; color: var(--ink); font: inherit;
}
.sb-start:hover { border-color: color-mix(in srgb, var(--sb-accent) 45%, var(--line)); }
.sb-start-ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sb-accent) 16%, transparent); font-weight: 800;
}
.sb-start b { font-size: 12px; }
.sb-home-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-reader-meta { margin-bottom: 12px; }
.sb-reader-meta b { display: block; font-size: 18px; margin-bottom: 4px; }
.sb-reader-body {
  font-size: 14px; line-height: 1.55; white-space: pre-wrap; color: var(--ink);
  max-width: 52em;
}
.sb-reader-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sb-side {
  width: 0; overflow: hidden; border-left: 0; background: var(--panel);
  transition: width .2s ease; flex: none; display: flex; flex-direction: column;
}
.sb-side.on {
  width: min(300px, 42vw); border-left: 1px solid var(--line); padding: 10px;
}
.sb-side-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sb-side-h b { font-size: 13px; }
.sb-side-h .ghost { margin-left: auto; padding: 2px 8px; height: auto; }
.sb-side-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.sb-side-acts button { font-size: 11px; padding: 5px 8px; height: auto; }
#sb-ai-q {
  width: 100%; font: inherit; font-size: 12px; border-radius: 10px;
  border: 1px solid var(--line); padding: 7px 8px; background: transparent; color: var(--ink);
  resize: vertical;
}
.sb-side-out {
  flex: 1; overflow: auto; margin-top: 10px; font-size: 12px; line-height: 1.4;
  min-height: 80px;
}
.sb-ai-ans { white-space: pre-wrap; }
.sb-side-tools {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.sb-side-tools button {
  border: 1px solid var(--line); background: transparent; border-radius: 10px;
  padding: 6px 4px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.sb-status {
  flex: none; padding: 4px 12px; font-size: 11px; color: var(--muted);
  border-top: 1px solid var(--line); background: var(--panel);
}
.sb-portal { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
@media (max-width: 760px) {
  .sb-side.on { width: min(100%, 280px); position: absolute; right: 0; top: 0; bottom: 22px; z-index: 6;
    box-shadow: -8px 0 24px rgba(0,0,0,.18); }
  .sb-body { position: relative; }
  .sb-menubar-hint { display: none; }
}
.ob-chrome {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px 14px;
  background: color-mix(in srgb, var(--panel) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  backdrop-filter: saturate(1.6) blur(24px);
  -webkit-backdrop-filter: saturate(1.6) blur(24px);
  position: sticky; top: 0; z-index: 5;
  animation: obChromeIn .5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ob-chrome-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ob-chrome-acts #ob-open-hub {
  font-size: 12px; font-weight: 700; padding: 6px 12px; height: auto; border-radius: 999px;
}
.of-br-quick { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.of-br-chip { font-size: 11px; padding: 4px 8px; height: auto; border-radius: 999px; }
.ob-traffic { display: flex; gap: 7px; padding: 0 2px; }
.ob-traffic i {
  width: 12px; height: 12px; border-radius: 50%; display: block;
  box-shadow: inset 0 -1px 1px rgba(0,0,0,.15);
}
.ob-traffic i:nth-child(1) { background: linear-gradient(180deg, #ff6e66, #ff5f57); }
.ob-traffic i:nth-child(2) { background: linear-gradient(180deg, #ffcd4a, #febc2e); }
.ob-traffic i:nth-child(3) { background: linear-gradient(180deg, #3dd956, #28c840); }
.ob-tabs {
  display: flex; gap: 4px; flex: 1; min-width: 180px; overflow-x: auto;
  padding: 3px; background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-radius: 12px;
}
.ob-tab {
  border: 0; background: transparent; color: var(--muted); padding: 8px 14px;
  border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap;
  font-family: var(--font-ui); letter-spacing: -.01em;
  transition: background .25s cubic-bezier(0.22, 1, 0.36, 1), color .2s, transform .25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.ob-tab:hover { color: var(--ink); }
.ob-tab.on {
  background: color-mix(in srgb, var(--panel) 92%, #fff);
  color: var(--ink); font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.ob-addr {
  display: flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 200px; margin: 0;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 999px; padding: 5px 8px 5px 14px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .25s, border-color .2s;
}
.ob-addr:focus-within {
  border-color: color-mix(in srgb, #3d6bb0 45%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, #3d6bb0 18%, transparent);
}
.ob-addr input {
  border: 0; background: transparent; padding: 7px 4px; font-size: 14px;
  font-weight: 500; flex: 1; min-width: 0; font-family: var(--font-ui); letter-spacing: -.01em;
}
.ob-addr input:focus { outline: none; }
.ob-lock { font-size: 13px; opacity: .7; }
#ob-go {
  border-radius: 999px; padding: 8px 16px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #4a78b8, #2f5a96);
  color: #fff; font-weight: 700; font-size: 13px; font-family: var(--font-ui);
  box-shadow: 0 4px 14px rgba(47, 90, 150, .3), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow .25s;
}
#ob-go:hover { transform: scale(1.04); }
#ob-go:active { transform: scale(.96); }
#ob-refresh {
  border-radius: 999px; padding: 8px 12px; background: transparent; color: var(--muted);
  transition: transform .4s cubic-bezier(0.34, 1.4, 0.64, 1), color .2s;
}
#ob-refresh:hover { color: var(--ink); transform: rotate(90deg); }
.ob-page { padding-top: 8px; padding-bottom: 48px; }
.ob-hero { margin-bottom: 8px; animation: obIn .55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ob-hero h1 {
  margin: 0 0 6px; font-size: 40px; letter-spacing: -.035em; line-height: 1.05;
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink);
  background: none; -webkit-text-fill-color: unset;
}
.ob-hero .lead, #ob-honesty {
  font-family: var(--font-ui); font-size: 15px; font-weight: 450;
  color: var(--muted); letter-spacing: -.01em; max-width: 36em; line-height: 1.5;
}
body.ui-pro .ob-hero h1 {
  color: #f7f3ea;
  background: none; -webkit-text-fill-color: unset;
  text-shadow: 0 8px 40px rgba(196, 165, 116, .12);
}
body.ui-pro .ob-chrome {
  background: rgba(12, 16, 28, .65);
  border-bottom-color: rgba(255,255,255,.06);
}
body.ui-pro .ob-tabs { background: rgba(255,255,255,.05); }
body.ui-pro .ob-tab.on {
  background: rgba(255,255,255,.14); color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
body.ui-pro .ob-addr {
  background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.08);
}
body.ui-pro #ob-go {
  background: linear-gradient(180deg, #e8d5b5, #c4a574);
  color: #1a1520;
  box-shadow: 0 4px 16px rgba(196, 165, 116, .28), inset 0 1px 0 rgba(255,255,255,.35);
}
.ob-smart { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.ob-smart a, .ob-smart button {
  text-decoration: none; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 999px;
  font-family: var(--font-ui); letter-spacing: -.01em;
  background: color-mix(in srgb, var(--ink) 5%, var(--panel));
  color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform .3s cubic-bezier(0.34, 1.4, 0.64, 1), background .2s, box-shadow .25s;
}
.ob-smart a:hover, .ob-smart button:hover {
  background: color-mix(in srgb, var(--ink) 9%, var(--panel));
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
body.ui-pro .ob-smart a, body.ui-pro .ob-smart button {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); color: #e8eef8;
}
.ob-panel { display: none; }
.ob-panel.on { display: block; animation: obIn .4s cubic-bezier(0.22, 1, 0.36, 1); }
.ob-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ob-card {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  border-radius: 20px; padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 12px;
  animation: obIn .5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ob-card h3 {
  margin: 0 0 12px; font-size: 18px; font-family: var(--font-display);
  font-weight: 600; letter-spacing: -.02em;
}
body.ui-pro .ob-card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
body.ui-pro .ob-card h3 { color: #f5f2eb; }
.ob-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  font-size: 14px; font-weight: 500;
}
.ob-row:last-child { border-bottom: 0; }
.ob-row a { color: inherit; text-decoration: none; font-weight: 600; transition: opacity .2s; }
.ob-row a:hover { opacity: .75; }
.ob-badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--accent-soft); color: var(--ink);
}
.ob-badge.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.ob-badge.bad { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.ob-badge.ok { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.ob-kpi { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ob-kpi span {
  font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 4%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
}
.ob-honesty { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.ob-tiles {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
button.ob-tile, .ob-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  padding: 16px 16px 14px; border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  background:
    linear-gradient(165deg, color-mix(in srgb, #fff 8%, transparent), transparent 55%),
    color-mix(in srgb, var(--panel) 96%, #3d6bb0);
  color: var(--ink); cursor: pointer;
  font-family: var(--font-ui);
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  transition: transform .35s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow .3s, border-color .2s, background .25s;
  animation: obTileIn .55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
button.ob-tile:nth-child(1), .ob-tiles > *:nth-child(1) { animation-delay: .02s; }
button.ob-tile:nth-child(2), .ob-tiles > *:nth-child(2) { animation-delay: .05s; }
button.ob-tile:nth-child(3), .ob-tiles > *:nth-child(3) { animation-delay: .08s; }
button.ob-tile:nth-child(4), .ob-tiles > *:nth-child(4) { animation-delay: .11s; }
button.ob-tile:nth-child(5), .ob-tiles > *:nth-child(5) { animation-delay: .14s; }
button.ob-tile:nth-child(6), .ob-tiles > *:nth-child(6) { animation-delay: .17s; }
button.ob-tile:nth-child(7), .ob-tiles > *:nth-child(7) { animation-delay: .2s; }
button.ob-tile:nth-child(8), .ob-tiles > *:nth-child(8) { animation-delay: .23s; }
button.ob-tile:hover {
  border-color: color-mix(in srgb, #3d6bb0 40%, var(--line));
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 36px rgba(40, 70, 120, .14);
}
button.ob-tile:active { transform: scale(.96); }
button.ob-tile b {
  font-size: 15px; font-weight: 700; letter-spacing: -.015em;
  font-family: var(--font-ui);
}
button.ob-tile span {
  font-size: 11px; font-weight: 500; color: var(--muted);
  word-break: break-all; line-height: 1.35; letter-spacing: -.01em;
}
body.ui-pro button.ob-tile, body.ui-pro .ob-tile {
  background:
    linear-gradient(160deg, rgba(255,255,255,.1), transparent 50%),
    rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  color: #f5f2eb;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}
body.ui-pro button.ob-tile:hover {
  border-color: rgba(196, 165, 116, .4);
  background:
    linear-gradient(160deg, rgba(196, 165, 116, .14), transparent 55%),
    rgba(255,255,255,.08);
  box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.ob-tile-wrap { display: flex; flex-direction: column; gap: 6px; animation: obTileIn .55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ob-del-bm { font-size: 12px !important; font-weight: 600; opacity: .7; }
.ob-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}
.ob-section-head h3 { margin: 0; }
.ob-section-hint {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); opacity: .85;
}
.ob-tile-card {
  position: relative; display: flex; flex-direction: column; gap: 0;
  animation: obTileIn .55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ob-tile-card .ob-tile { width: 100%; flex: 1; }
.ob-tile-acts {
  display: flex; gap: 6px; justify-content: flex-end;
  margin-top: -6px; padding: 0 6px 0; opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s ease, transform .3s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}
.ob-tile-card:hover .ob-tile-acts,
.ob-tile-card:focus-within .ob-tile-acts,
.ob-tile-card.pin-on .ob-tile-acts,
.ob-tile-card.fav-on .ob-tile-acts {
  opacity: 1; transform: none; pointer-events: auto;
}
.ob-act {
  width: 30px; height: 30px; padding: 0 !important; border-radius: 999px !important;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  color: var(--muted) !important;
  transition: transform .3s cubic-bezier(0.34, 1.4, 0.64, 1), background .2s, color .2s, border-color .2s;
}
.ob-act:hover { transform: scale(1.12); color: var(--ink) !important; }
.ob-act:active { transform: scale(.92); }
.ob-act.pin.on {
  background: color-mix(in srgb, #3d6bb0 18%, var(--panel)) !important;
  border-color: color-mix(in srgb, #3d6bb0 40%, transparent) !important;
  color: #2f5a96 !important;
}
.ob-act.star.on {
  background: color-mix(in srgb, #c4a574 22%, var(--panel)) !important;
  border-color: color-mix(in srgb, #c4a574 45%, transparent) !important;
  color: #a8844a !important;
}
button.ob-tile.is-pinned, .ob-tile.is-pinned {
  border-color: color-mix(in srgb, #3d6bb0 35%, var(--line));
  box-shadow: 0 8px 24px rgba(47, 90, 150, .12);
}
button.ob-tile.is-fav, .ob-tile.is-fav {
  border-color: color-mix(in srgb, #c4a574 40%, var(--line));
}
.ob-card.ob-dock {
  background:
    linear-gradient(135deg, color-mix(in srgb, #3d6bb0 12%, transparent), transparent 55%),
    color-mix(in srgb, var(--panel) 94%, transparent);
  border-color: color-mix(in srgb, #3d6bb0 22%, var(--line));
  box-shadow: 0 12px 40px rgba(40, 70, 120, .1);
}
.ob-dock-tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.ob-card.ob-favs {
  background:
    linear-gradient(145deg, color-mix(in srgb, #c4a574 14%, transparent), transparent 50%),
    color-mix(in srgb, var(--panel) 94%, transparent);
  border-color: color-mix(in srgb, #c4a574 28%, var(--line));
}
.ob-card.ob-favs.empty { opacity: .92; }
body.ui-pro .ob-card.ob-dock {
  background:
    linear-gradient(135deg, rgba(90, 130, 200, .16), transparent 55%),
    rgba(255,255,255,.06);
  border-color: rgba(120, 160, 220, .28);
}
body.ui-pro .ob-card.ob-favs {
  background:
    linear-gradient(145deg, rgba(196, 165, 116, .16), transparent 50%),
    rgba(255,255,255,.06);
  border-color: rgba(196, 165, 116, .3);
}
body.ui-pro .ob-act {
  background: rgba(20, 24, 40, .85) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #c8d0dc !important;
}
body.ui-pro .ob-act.pin.on { color: #9ec5ff !important; border-color: rgba(120,160,220,.45) !important; }
body.ui-pro .ob-act.star.on { color: #e2d0b0 !important; border-color: rgba(196,165,116,.5) !important; }
body.ui-pro button.ob-tile.is-pinned {
  border-color: rgba(120, 160, 220, .4);
  box-shadow: 0 10px 32px rgba(0,0,0,.28);
}
@media (hover: none) {
  .ob-tile-acts { opacity: 1; transform: none; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-panel.on, .ob-chrome, .ob-hero, .ob-card, button.ob-tile, .ob-tile, .ob-tile-wrap, .ob-tile-card { animation: none; }
  button.ob-tile, .ob-smart a, #ob-go, #ob-refresh, .ob-tab, .ob-act, .ob-tile-acts { transition: none; }
}

/* —— Уведомление об исходящей отправке (ИИ) —— */
.msg.out-wrap { max-width: min(720px, 94%); background: transparent; border: 0; padding: 0; box-shadow: none; }
.out-card {
  border-radius: 16px; padding: 14px 16px; margin: 4px 0 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: color-mix(in srgb, var(--panel) 94%, #3d6bb0);
  animation: ios-rise .4s cubic-bezier(0.22, 1, 0.36, 1) both;
  font-size: 13px; line-height: 1.45;
}
.out-card.risk-safe {
  background: color-mix(in srgb, #1f6f5c 10%, var(--panel));
  border-color: color-mix(in srgb, #1f6f5c 28%, var(--line));
}
.out-card.risk-masked {
  background: color-mix(in srgb, #3d6bb0 10%, var(--panel));
  border-color: color-mix(in srgb, #3d6bb0 28%, var(--line));
}
.out-card.risk-caution, .out-card.risk-danger {
  background: color-mix(in srgb, #b4531a 10%, var(--panel));
  border-color: color-mix(in srgb, #b4531a 30%, var(--line));
}
.out-card.risk-blocked {
  background: color-mix(in srgb, #b3261e 10%, var(--panel));
  border-color: color-mix(in srgb, #b3261e 32%, var(--line));
}
.out-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.out-head strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.out-badge { font-size: 16px; }
.out-where { margin: 0 0 6px; }
.out-where b { font-weight: 700; }
.out-where span { color: var(--muted); font-size: 12px; word-break: break-all; }
.out-sends { margin: 0 0 4px; }
.out-how { margin: 0 0 10px; font-size: 12px; }
.out-cols { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .out-cols { grid-template-columns: 1fr; } }
.out-cols h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.out-cols ul { margin: 0; padding-left: 16px; font-size: 12px; }
.out-cols li { margin: 2px 0; }
.out-labs { margin: 8px 0 0; font-size: 11px; }
.out-preview { margin-top: 8px; font-size: 12px; }
.out-preview pre {
  white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: auto;
  margin: 6px 0 0; padding: 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 12px;
}
body.ui-pro .out-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
}
body.ui-pro .out-card.risk-masked { border-color: rgba(120,160,220,.35); }
body.ui-pro .out-card.risk-safe { border-color: rgba(80,180,140,.35); }
body.ui-pro .out-card.risk-blocked { border-color: rgba(232,138,138,.4); }
body.ui-pro .out-head strong { color: #f5f2eb; }

/* —— Воронки (канбан) —— */
.fn-page { padding-bottom: 48px; }
.fn-hero h1 {
  margin: 0 0 4px; font-size: 36px; letter-spacing: -.03em;
  font-family: var(--font-display); font-weight: 600;
}
.fn-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 16px;
  padding: 4px; border-radius: 14px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.fn-tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 13px;
  font-family: var(--font-ui); cursor: pointer;
  transition: background .22s, color .2s, transform .25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.fn-tab:hover { color: var(--ink); }
.fn-tab.on {
  background: var(--panel); color: var(--ink); font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.fn-board { min-height: 0; }
.fn-cols {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x proximity; align-items: flex-start;
}
.fn-col {
  flex: 0 0 min(260px, 78vw); scroll-snap-align: start;
  background: color-mix(in srgb, var(--ink) 3%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 18px; padding: 12px; min-height: 220px;
  animation: ios-rise .45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fn-col-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; margin-bottom: 10px; padding: 0 4px;
}
.fn-col-head h3 {
  margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  text-transform: capitalize;
}
.fn-col-n {
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted);
}
.fn-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  width: 100%; padding: 12px 12px 10px; margin-bottom: 8px;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  background: var(--panel); color: var(--ink); cursor: pointer;
  font-family: var(--font-ui);
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  transition: transform .3s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow .25s, border-color .2s;
}
.fn-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: color-mix(in srgb, #3d6bb0 35%, var(--line));
  box-shadow: 0 10px 28px rgba(40, 70, 120, .1);
}
.fn-card b { font-size: 14px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.fn-card .fn-sub { font-size: 11px; color: var(--muted); line-height: 1.35; }
.fn-card .fn-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fn-card select {
  width: auto; min-width: 0; font-size: 11px; padding: 4px 8px; border-radius: 8px;
  margin: 0;
}
.fn-card .fn-age {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--muted);
}
.fn-card.is-risky .fn-age { background: color-mix(in srgb, #b4531a 18%, transparent); color: #b4531a; }
.fn-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; max-width: 48em; }
.fn-conv {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px;
}
.fn-conv span {
  font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px;
  background: color-mix(in srgb, #3d6bb0 10%, var(--panel));
  border: 1px solid color-mix(in srgb, #3d6bb0 20%, var(--line));
}
body.ui-pro .fn-tabs { background: rgba(255,255,255,.05); }
body.ui-pro .fn-tab.on { background: rgba(255,255,255,.12); color: #fff; }
body.ui-pro .fn-col {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
body.ui-pro .fn-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  color: #f5f2eb;
}
body.ui-pro .fn-hero h1 { color: #f7f3ea; }
