:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --sidebar: #111110;
  --surface: #171716;
  --surface-2: #1d1d1b;
  --surface-3: #252522;
  --line: #2c2c28;
  --line-soft: rgba(255, 255, 255, .07);
  --text: #f3f0e8;
  --muted: #96938a;
  --accent: #d9ff57;
  --accent-ink: #111407;
  --warm: #f0b36d;
  --danger: #ff8f7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 76% -15%, rgba(217, 255, 87, .075), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.update-banner {
  position: fixed;
  z-index: 600;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  width: min(680px, calc(100% - 24px));
  min-height: 64px;
  padding: 12px 16px 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid rgba(217, 255, 87, .42);
  border-radius: 14px;
  background: rgba(23, 26, 20, .97);
  box-shadow: 0 16px 54px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .04);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.update-banner-symbol {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 255, 87, .32);
  border-radius: 10px;
  background: rgba(217, 255, 87, .09);
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
}
.update-banner.updating .update-banner-symbol { animation: update-banner-spin 1.25s linear infinite; }
.update-banner-copy { min-width: 0; display: grid; gap: 3px; }
.update-banner-copy strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.update-banner-copy small { overflow: hidden; color: #a8a59c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.update-banner-time { color: var(--accent); font-size: 11px; font-weight: 850; white-space: nowrap; }
.update-banner-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(217, 255, 87, .08);
}
.update-banner-progress::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(217, 255, 87, .38);
  content: "";
  animation: update-banner-progress 1.7s ease-in-out infinite;
}
.update-banner.ready { border-color: rgba(217, 255, 87, .62); }
.update-banner.ready .update-banner-symbol { animation: none; }
.update-banner.failed { border-color: rgba(240, 179, 109, .54); }
.update-banner.failed .update-banner-symbol,
.update-banner.failed .update-banner-time { color: var(--warm); }
.update-banner.failed .update-banner-progress::after { background: var(--warm); }
@keyframes update-banner-spin { to { transform: rotate(360deg); } }
@keyframes update-banner-progress {
  0% { left: -44%; }
  55% { left: 58%; }
  100% { left: 105%; }
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 255, 87, .5);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(217, 255, 87, .16), rgba(217, 255, 87, .04));
  color: var(--accent);
  font: 800 28px/1 Georgia, serif;
  box-shadow: inset 0 0 20px rgba(217, 255, 87, .04);
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 21px;
}

.login-screen {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .72)),
    repeating-linear-gradient(115deg, transparent 0 74px, rgba(255, 255, 255, .018) 75px 76px);
}

.login-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(20, 20, 19, .94);
  box-shadow: var(--shadow);
}

.login-card .brand-mark { margin-bottom: 28px; }
.login-card h1 { margin: 9px 0 12px; font-size: 31px; line-height: 1.08; letter-spacing: -.04em; }
.login-copy { margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-card label { display: block; margin-bottom: 8px; color: #cbc7bd; font-size: 12px; font-weight: 700; }
.login-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}
.login-card input:focus { border-color: rgba(217, 255, 87, .7); box-shadow: 0 0 0 3px rgba(217, 255, 87, .08); }
.login-card input + label { margin-top: 16px; }
.form-error { min-height: 20px; margin: 7px 0 3px; color: var(--danger); font-size: 12px; }
.primary-button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 850;
}
.primary-button:disabled { opacity: .55; cursor: wait; }
.primary-button.compact { width: auto; height: 43px; padding: 0 16px; }
.login-note { margin: 20px 0 0; color: #6f6d66; font-size: 11px; line-height: 1.5; }

.workspace {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  overscroll-behavior: none;
}

.dialogs-header {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 13, .9);
}
.dialogs-brand-row { max-width: none; }
.dialogs-primary-nav { width: 100%; }

.sidebar {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(17, 17, 16, .96);
}

.sidebar-header { padding: 24px 20px 18px; border-bottom: 1px solid var(--line-soft); }
.sidebar-toolbar { padding: 0 16px 15px; border-bottom: 1px solid var(--line-soft); background: var(--sidebar); }
.brand-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.brand-row h1 { margin: 4px 0 0; font-size: 22px; line-height: 1; letter-spacing: -.03em; }
.header-actions { display: flex; gap: 7px; }
.section-brand-row { width: 100%; min-width: 0; }
.section-header-actions { display: flex; align-items: center; gap: 8px; min-width: 83px; justify-content: flex-end; }
.section-header-actions .settings-button { width: 38px; height: 38px; flex: 0 0 38px; }
.section-header-actions .sections-button { width: 38px; height: 38px; flex: 0 0 38px; }
.sections-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.primary-nav {
  margin-top: 18px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(var(--nav-items, 3), minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 0, 0, .16);
}
.primary-nav button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 780;
}
.primary-nav button.active { background: var(--surface-3); color: var(--text); }
.primary-nav button { position: relative; }
.nav-count { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--danger); color: #160b09; font-size: 8px; font-weight: 900; line-height: 1; }

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.icon-button:disabled { opacity: .38; cursor: default; }
.notification-button.enabled { border-color: rgba(217, 255, 87, .42); color: var(--accent); background: rgba(217, 255, 87, .07); }
.notification-glyph {
  position: relative;
  width: 12px;
  height: 13px;
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 7px 7px 4px 4px;
}
.notification-glyph::before { content: ""; position: absolute; left: 50%; top: -4px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.notification-glyph::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 5px; height: 2px; border-radius: 0 0 5px 5px; background: currentColor; transform: translateX(-50%); }
.notification-glyph.large { width: 22px; height: 24px; border-width: 2px; border-radius: 12px 12px 7px 7px; }
.notification-glyph.large::before { top: -6px; width: 5px; height: 5px; }
.notification-glyph.large::after { bottom: -6px; width: 8px; height: 3px; }

.conversation-filters { margin-top: 16px; display: grid; gap: 8px; min-width: 0; }
.conversation-filter-row { min-width: 0; }
.conversation-filter-scroll {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.conversation-filter-scroll::-webkit-scrollbar { display: none; }
.conversation-filter {
  min-height: 30px;
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #151713;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}
.conversation-filter:hover { border-color: #4a4e41; color: var(--text); }
.conversation-filter.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

.search, .deals-search {
  width: 100%;
  min-width: 0;
  height: 42px;
  margin-top: 14px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
}
.search:focus-within, .deals-search:focus-within { border-color: #44443e; }
.search input, .deals-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search input::placeholder, .deals-search input::placeholder { color: #77756e; opacity: 1; }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}
input[type="search"]::-ms-clear,
input[type="search"]::-ms-reveal { display: none; width: 0; height: 0; }
.search-clear {
  width: 26px;
  height: 26px;
  padding: 0;
  flex: none;
  border: 0 !important;
  border-radius: 50%;
  background: #292b26;
  color: #a9aaa3;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.search-clear:hover { background: #34372f; color: var(--text); }

.list-heading {
  padding: 17px 20px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.live-indicator { display: flex; align-items: center; gap: 6px; letter-spacing: 0; text-transform: none; font-weight: 650; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(217, 255, 87, .08); }
.live-indicator.offline i { background: var(--danger); box-shadow: none; }

.conversation-list { width: 100%; max-width: 100%; min-width: 0; min-height: 0; height: 0; flex: 1 1 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0 9px 14px; scrollbar-width: thin; }
.conversation {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}
.conversation:hover { background: rgba(255, 255, 255, .025); }
.conversation.active { border-color: var(--line); background: var(--surface-2); }
.conversation-avatar, .avatar {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #33332f, #242421);
  color: #d8d4c9;
  background-size: cover;
  background-position: center;
  font-weight: 850;
}
.conversation-main { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.conversation-title-row { width: 100%; min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.conversation-name { min-width: 0; flex: 1; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 760; }
.manual-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--warm); }
.conversation-preview { width: 100%; max-width: 100%; margin-top: 5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.conversation-line { display: block; margin-top: 5px; overflow: hidden; color: #6f6d66; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta { min-width: 35px; flex: none; align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; overflow: hidden; }
.conversation-time { color: #77756e; font-size: 10px; white-space: nowrap; }
.conversation-receipt { min-width: 24px; color: #8b897f; font-size: 11px; font-weight: 900; letter-spacing: -.18em; line-height: 1; text-align: right; white-space: nowrap; }
.conversation-receipt.delivered { color: #b5c77a; }
.conversation-receipt.read { color: var(--accent); }
.unread-badge { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 900; }
.list-empty { margin: auto 30px; color: var(--muted); text-align: center; }
.list-empty span { color: var(--text); font-size: 14px; font-weight: 750; }
.list-empty p { margin: 6px 0; font-size: 12px; line-height: 1.5; }

.chat-panel { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: rgba(10, 10, 10, .7); }
.chat-panel.empty { display: grid; place-items: center; }
.empty-chat { max-width: 340px; padding: 30px; text-align: center; }
.empty-symbol { width: 68px; height: 68px; margin: 0 auto 18px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--accent); font-size: 22px; letter-spacing: .12em; }
.empty-chat h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.03em; }
.empty-chat p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.chat-content { min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.chat-content > :not(#messages) { flex-shrink: 0; }
.chat-content > #messages { flex: 1 1 0; min-height: 0; }
.chat-header { min-width: 0; padding: 17px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(14, 14, 13, .88); backdrop-filter: blur(15px); }
.back-button { display: none; }
.chat-close-button { flex: none; }
.client-heading { min-width: 0; flex: 1; }
.client-heading h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; letter-spacing: -.015em; }
.client-heading a { color: var(--muted); text-decoration: none; font-size: 10px; }
.client-heading a:hover { color: var(--accent); }
.client-subline { margin-top: 4px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.presence-button { padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; font-size: 9px; }
.presence-button:disabled { opacity: .55; cursor: wait; }
.presence-result { color: var(--muted); font-size: 9px; }
.line-chip { max-width: 170px; padding: 3px 7px; overflow: hidden; border-radius: 999px; background: rgba(217, 255, 87, .07); color: #b5c77a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.chat-secondary-button { width: auto; min-height: 38px; margin: 0; padding: 0 13px; flex: none; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 11px; font-weight: 750; }
.chat-secondary-button:hover:not(:disabled) { border-color: #4b4b45; background: var(--surface-2); }
.chat-secondary-button:disabled { opacity: .5; cursor: default; }
.handoff-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 750; }
.handoff-button:hover { border-color: #4b4b45; }
.handoff-button.manual { border-color: rgba(240, 179, 109, .28); color: #f3c48e; background: rgba(240, 179, 109, .07); }

.mode-banner { padding: 8px 22px; border-bottom: 1px solid var(--line-soft); background: rgba(217, 255, 87, .045); color: #b7b69e; font-size: 11px; }
.mode-banner.manual { background: rgba(240, 179, 109, .055); color: #c7a77f; }
.session-bar { min-width: 0; padding: 9px 22px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line-soft); background: #10100f; }
.session-bar > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.session-bar strong { font-size: 10px; }
.session-bar span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.message-history-tools {
  position: relative;
  z-index: 4;
  min-width: 0;
  padding: 7px max(18px, calc((100% - 900px) / 2));
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(15,16,14,.96);
}
.message-history-button {
  min-height: 34px;
  padding: 0 11px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}
.message-history-button:hover:not(:disabled) { border-color: #4b4f43; color: var(--text); }
.message-history-button:disabled { opacity: .5; cursor: wait; }
.message-search-box { position: relative; min-width: 130px; flex: 1; }
.message-search-field {
  height: 34px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
}
.message-search-field:focus-within { border-color: #596638; }
.message-search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.message-search-clear { width: 23px; height: 23px; padding: 0; flex: none; border: 0; border-radius: 50%; background: #2a2d26; color: var(--muted); cursor: pointer; }
.message-search-results { position: absolute; top: calc(100% + 7px); left: 0; right: 0; max-height: min(360px, 52vh); padding: 6px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; background: #121310; box-shadow: 0 18px 45px rgba(0,0,0,.45); }
.message-search-result { width: 100%; min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.message-search-result:hover { background: var(--surface-2); }
.message-search-result strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.message-search-result time { color: var(--muted); font-size: 8px; white-space: nowrap; }
.message-search-result span { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.message-search-empty { padding: 14px 10px; color: var(--muted); font-size: 9px; text-align: center; }
.message-date-field { height: 34px; padding: 0 8px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.message-date-field span { color: var(--muted); font-size: 8px; }
.message-date-field input { width: 116px; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 9px; color-scheme: dark; }
.message.history-highlight .message-bubble { box-shadow: 0 0 0 2px var(--accent); }

.messages {
  width: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 28px max(24px, calc((100% - 880px) / 2));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 11px;
  scrollbar-width: thin;
}
.typing-indicator { padding: 7px max(22px, calc((100% - 900px) / 2)); border-top: 1px solid var(--line-soft); background: rgba(14,14,13,.94); color: var(--muted); font-size: 10px; }
.typing-indicator span { margin-right: 5px; color: var(--accent); font-weight: 900; letter-spacing: .12em; }
.day-divider { margin: 12px auto; padding: 5px 9px; border: 1px solid var(--line-soft); border-radius: 999px; color: #77756e; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.message { max-width: min(72%, 620px); }
.message.incoming { align-self: flex-start; }
.message.outgoing { align-self: flex-end; }
.message-author { margin: 0 4px 4px; color: #77756e; font-size: 9px; }
.message.outgoing .message-author { text-align: right; }
.message-bubble { padding: 11px 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-2); font-size: 13px; line-height: 1.52; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.incoming .message-bubble { border-bottom-left-radius: 5px; }
.message.outgoing .message-bubble { border-color: rgba(217, 255, 87, .18); border-bottom-right-radius: 5px; background: #252a1b; }
.message.admin .message-bubble { border-color: rgba(240, 179, 109, .2); background: #2a231b; }
.message-context { margin: -3px 0 9px; padding: 8px 9px; display: grid; gap: 3px; border-left: 3px solid var(--accent); border-radius: 7px; background: rgba(217,255,87,.06); white-space: normal; }
.message-context strong { color: #aebd78; font-size: 9px; }
.message-context span, .message-context small { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.message-context img { width: auto; height: auto; max-width: 100%; max-height: 240px; margin-top: 4px; border-radius: 8px; object-fit: contain; }
.message-time { display: flex; align-items: center; gap: 5px; margin: 4px 4px 0; color: #6f6d66; font-size: 9px; }
.message.outgoing .message-time { text-align: right; }
.message.outgoing .message-time { justify-content: flex-end; }
.message-receipt { color: #8d926f; font-size: 11px; font-weight: 800; letter-spacing: -3px; padding-right: 3px; }
.message-receipt.read { color: var(--accent); }
.message-edited { color: #77756e; }
.message-actions { display: flex; justify-content: flex-end; gap: 7px; margin: 5px 4px 0; }
.message-actions button { appearance: none; border: 0; background: transparent; color: #9b9a92; font: inherit; font-size: 10px; padding: 3px 0; }
.message-actions button.danger { color: #bd8c82; }
.phone-suggestion { margin-top: 7px; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(217,255,87,.22); border-radius: 12px; background: rgba(217,255,87,.055); }
.phone-suggestion > span:first-child { min-width: 0; display: grid; gap: 2px; }
.phone-suggestion strong { color: #e4e3db; font-size: 10px; }
.phone-suggestion small { overflow: hidden; color: #a7b476; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.phone-suggestion-actions { flex: none; display: flex; gap: 6px; }
.phone-suggestion-actions button { min-width: 42px; min-height: 31px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 10px; font-weight: 800; }
.phone-suggestion-actions button:first-child { border-color: rgba(217,255,87,.35); background: var(--accent); color: var(--accent-ink); }
.phone-suggestion-actions button:disabled { opacity: .45; cursor: default; }
.attachment-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 420px; margin: 0 auto; border-radius: 11px; object-fit: contain; background: #0d0d0c; }
.attachment-note { margin-bottom: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .045); color: var(--muted); font-size: 11px; }
.attachment-file { min-width: 210px; margin-bottom: 7px; padding: 10px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .035); color: var(--text); text-decoration: none; }
.attachment-file:hover { border-color: rgba(217, 255, 87, .3); }
.attachment-file-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(217, 255, 87, .1); font-size: 16px; }
.attachment-file span { min-width: 0; display: grid; gap: 3px; }
.attachment-file strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file small { color: var(--muted); font-size: 9px; }

.composer { position: relative; padding: 14px max(22px, calc((100% - 900px) / 2)) 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; gap: 9px; border-top: 1px solid var(--line); background: rgba(14, 14, 13, .94); }
.reply-context-preview { grid-column: 1 / -1; min-width: 0; padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; border-left: 3px solid var(--accent); border-radius: 10px; background: rgba(217,255,87,.055); }
.reply-context-preview > span { min-width: 0; display: grid; gap: 2px; }
.reply-context-preview strong { color: #b7ca79; font-size: 9px; }
.reply-context-preview small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.reply-context-preview button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.wait-shortcuts { position: absolute; left: max(22px, calc((100% - 900px) / 2)); right: auto; bottom: calc(100% + 8px); z-index: 8; max-width: min(520px, calc(100% - 44px)); padding: 10px; display: flex; gap: 8px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); scrollbar-width: none; }
.wait-shortcuts::-webkit-scrollbar { display: none; }
.wait-shortcut-button { flex: 0 0 auto; min-height: 38px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font: inherit; font-weight: 700; }
.wait-shortcut-button.active { border-color: var(--accent); background: var(--accent); color: #11140b; }
.attach-button, .quick-reply-button, .wait-shortcuts-toggle { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); color: #aaa79f; cursor: pointer; font-size: 19px; }
.attach-button { align-self: auto; }
.attach-button:hover, .quick-reply-button:hover, .wait-shortcuts-toggle:hover { border-color: rgba(217, 255, 87, .34); color: var(--accent); }
.attach-button:disabled, .quick-reply-button:disabled, .wait-shortcuts-toggle:disabled { opacity: .35; cursor: default; }
.quick-reply-button { color: var(--accent); font-size: 17px; }
.wait-shortcuts-toggle { display: grid; place-items: center; }
.wait-shortcuts-toggle .notification-glyph { width: 14px; height: 15px; }
.wait-shortcuts-toggle.active { border-color: var(--accent); color: var(--accent); background: rgba(217,255,87,.08); }
.composer-left-actions, .composer-actions { display: grid; grid-template-rows: repeat(2, 46px); align-self: stretch; gap: 6px; }
.composer-field { min-width: 0; min-height: 98px; padding: 10px 13px 9px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.composer-field:focus-within { border-color: #494943; }
.composer-field span { display: block; margin-bottom: 3px; color: #77756e; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.composer textarea { width: 100%; min-height: 60px; max-height: 210px; padding: 3px 0 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); line-height: 1.45; }
.composer textarea::placeholder { color: #706e67; }
.send-button { width: 46px; height: 46px; border: 0; border-radius: 15px; background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 21px; font-weight: 900; }
.send-button:disabled { opacity: .3; cursor: default; }
.attachment-preview { grid-column: 1 / -1; min-width: 0; padding: 8px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid rgba(217, 255, 87, .16); border-radius: 12px; background: rgba(217, 255, 87, .045); }
.attachment-preview-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(217, 255, 87, .09); }
.attachment-preview > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.attachment-preview strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-preview small { color: var(--muted); font-size: 9px; }
.attachment-preview button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.attachment-preview button:hover { background: rgba(255, 143, 125, .08); color: var(--danger); }
.composer-note { grid-column: 1 / -1; margin: -1px 3px 0; color: #65635d; font-size: 9px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; max-width: calc(100% - 32px); padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #252522; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; font-size: 12px; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255, 143, 125, .35); color: #ffd1ca; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, .58); backdrop-filter: blur(4px); }
.client-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(410px, 100%); display: flex; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--line); background: #121211; box-shadow: -24px 0 70px rgba(0, 0, 0, .42); transform: translateX(102%); transition: transform .22s ease; }
.client-drawer.open { transform: translateX(0); }
.drawer-header { padding: 22px 22px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.035em; }
.drawer-client-summary { margin: 20px 22px 0; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.drawer-client-summary strong, .drawer-client-summary span { display: block; }
.drawer-client-summary strong { font-size: 13px; }
.drawer-client-summary span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.drawer-client-summary small { margin-top: 5px; display: block; color: #858178; font-size: 9px; }
.client-card-form { min-width: 0; max-width: 100%; flex: none; padding: 18px 22px 24px; overflow-x: hidden; }
.client-card-form > .field-control + .dynamic-fields { margin-top: 13px; }
.client-card-form > .primary-button { margin-top: 18px; }
.dynamic-fields, .dynamic-fields > * { min-width: 0; max-width: 100%; }
.dynamic-fields { display: grid; gap: 13px; }
.field-control { min-width: 0; max-width: 100%; display: grid; gap: 7px; color: #cbc7bd; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.field-control em { color: var(--danger); font-style: normal; }
.field-control input, .field-control textarea, .field-control select,
.settings-form input:not([type="checkbox"]), .settings-form textarea, .settings-form select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}
.field-control textarea, .settings-form textarea { min-height: 88px; resize: vertical; }
.field-control input:focus, .field-control textarea:focus, .field-control select:focus,
.settings-form input:focus, .settings-form textarea:focus, .settings-form select:focus { border-color: rgba(217, 255, 87, .42); }
.boolean-control { min-height: 43px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.drawer-sessions { padding: 0 22px 28px; border-top: 1px solid var(--line-soft); }
.drawer-section-heading { padding: 18px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-section-heading > div { display: grid; gap: 3px; }
.drawer-section-heading strong { font-size: 13px; }
.drawer-section-heading span { color: var(--muted); font-size: 9px; }
.session-list { display: grid; gap: 8px; }
.session-list-item { width: 100%; padding: 11px 12px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; }
button.session-list-item { cursor: pointer; }
button.session-list-item:hover { border-color: rgba(217, 255, 87, .35); }
.session-list-item > span:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.session-list-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.session-list-item i { flex: none; padding: 3px 6px; border-radius: 999px; background: rgba(217, 255, 87, .08); color: #b6c97a; font-size: 8px; font-style: normal; }
.session-list-item.status-cancelled i, .session-list-item.status-no_show i { background: rgba(255, 143, 125, .08); color: #eaa398; }
.session-list-item > span:nth-child(2), .session-list-item small { color: var(--muted); font-size: 9px; }
.session-list-empty { margin: 0; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.booking-case-card { padding: 11px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: #12130f; }
.booking-case-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.booking-case-heading > span { min-width: 0; display: grid; gap: 3px; }
.booking-case-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.booking-case-heading small { color: var(--muted); font-size: 8px; }
.booking-case-add { min-width: 86px; min-height: 32px; padding: 0 10px; }
.booking-case-sessions { display: grid; gap: 7px; }
.booking-case-card .session-list-item { background: #191b17; }
.session-number { color: #a8ad9d !important; font-weight: 800; }
.booking-status-history { display: grid; gap: 10px; }
.booking-status-timeline { display: grid; gap: 7px; }
.booking-status-event { padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; border-left: 2px solid #4d5a31; background: #171915; }
.booking-status-event strong { font-size: 10px; }
.booking-status-event time { color: #a7a99f; font-size: 9px; }
.booking-status-event small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }

.settings-dialog { width: min(1080px, calc(100% - 28px)); height: min(780px, calc(100% - 28px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: #10100f; color: var(--text); box-shadow: var(--shadow); }
.settings-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(7px); }
.settings-shell { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.settings-header { padding: 18px 20px 15px; border-bottom: 1px solid var(--line-soft); }
.settings-brand-row { width: 100%; max-width: none; grid-template-columns: auto minmax(0, 1fr) auto; }
.settings-brand-row h2 { margin: 5px 0 0; font-size: 20px; line-height: 1; letter-spacing: -.03em; }
.settings-header-actions { min-width: 38px; display: flex; justify-content: flex-end; }
.settings-header-actions .icon-button { width: 38px; height: 38px; flex: 0 0 38px; }
.settings-tabs { padding: 10px 26px 0; display: flex; gap: 7px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.settings-tabs,
.automation-kanban,
.confirmation-card-list,
.booking-master-track,
.deals-kanban,
.calendar-actions { -ms-overflow-style: none; scrollbar-width: none; }
.settings-tabs,
.automation-kanban,
.confirmation-card-list,
.booking-master-track,
.deals-kanban,
.calendar-actions { overscroll-behavior-x: none; }
.settings-tabs::-webkit-scrollbar,
.automation-kanban::-webkit-scrollbar,
.confirmation-card-list::-webkit-scrollbar,
.booking-master-track::-webkit-scrollbar,
.deals-kanban::-webkit-scrollbar,
.calendar-actions::-webkit-scrollbar { width: 0; height: 0; display: none; }
.calendar-week::-webkit-scrollbar { width: 0; height: 0; display: none; }
.settings-tab { flex: none; padding: 11px 13px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 750; white-space: nowrap; }
.settings-tab.active { border-bottom-color: var(--accent); color: var(--text); }
.settings-pane { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); }
.settings-general-pane { display: block; overflow-y: auto; }
.settings-general-shell { width: min(680px, 100%); margin: 0 auto; padding: 34px 26px; }
.settings-general-heading h3 { margin: 7px 0 6px; font-size: 21px; }
.settings-general-heading > p:last-child { margin: 0 0 24px; color: var(--muted); font-size: 11px; }
.settings-action-card { min-height: 82px; padding: 15px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.018); }
.settings-action-card + .settings-action-card { margin-top: 10px; }
.settings-action-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(217,255,87,.22); border-radius: 13px; background: rgba(217,255,87,.055); color: var(--accent); }
.settings-action-card > .settings-action-icon { display: grid; place-items: center; }
.settings-action-icon svg { width: 23px; height: 23px; display: block; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-action-icon.account-icon svg { width: 24px; height: 24px; }
.settings-action-icon.android-icon svg { width: 25px; height: 25px; }
.settings-action-card > div { min-width: 0; }
.settings-action-card strong, .settings-action-card span { display: block; }
.settings-action-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.settings-action-card > div > span { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.settings-action-button { width: auto; min-width: 118px; height: 40px; padding: 0 14px; }
.settings-download-button { margin-top: 0; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.settings-action-button:disabled { opacity: .55; cursor: default; }
.settings-theme-card { grid-template-columns: auto minmax(0, 1fr); }
.theme-selector { grid-column: 1 / -1; padding: 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.theme-selector button { min-width: 0; min-height: 38px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 800; }
.theme-selector button:hover { color: var(--text); background: var(--surface-2); }
.theme-selector button.active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px rgba(0,0,0,.16); }
.danger-outline { border-color: rgba(255,143,125,.25); color: #ff9e90; }
.settings-list-column { min-width: 0; padding: 24px 26px; overflow-y: auto; border-right: 1px solid var(--line); }
.section-heading h3, .form-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-list { margin-top: 18px; display: grid; gap: 8px; }
.settings-list-item { width: 100%; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: inherit; text-align: left; }
button.settings-list-item { cursor: pointer; }
button.settings-list-item:hover, button.settings-list-item.active { border-color: #4a4a43; background: var(--surface-2); }
.settings-list-main { min-width: 0; }
.settings-list-main strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.settings-list-main span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.settings-list-main .settings-list-details { color: #b3bd91; line-height: 1.4; white-space: normal; }
.stage-list-main strong { display: flex; align-items: center; gap: 8px; }
.stage-color-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .035); }
.settings-form input[type="color"] { min-height: 46px; padding: 5px; cursor: pointer; }
.settings-empty { padding: 18px 15px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.settings-list-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.status-pill { padding: 4px 7px; border-radius: 999px; background: rgba(217, 255, 87, .08); color: #b8c882; font-size: 9px; }
.status-pill.off { background: rgba(255, 255, 255, .05); color: var(--muted); }
.small-danger { border: 0; background: transparent; color: #a27b73; cursor: pointer; font-size: 10px; }
.settings-form { min-height: 0; padding: 24px 26px; overflow-y: auto; }
.settings-form > label, .location-editor > label { margin-top: 15px; display: grid; gap: 7px; color: #cbc7bd; font-size: 11px; font-weight: 700; }
.settings-form label small { color: #77756e; font-size: 9px; font-weight: 500; line-height: 1.45; }
.form-heading { display: flex; align-items: center; justify-content: space-between; }
.form-heading-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.calendar-header-delete {
  min-height: 38px;
  padding: 0 11px;
  flex: none;
  border: 1px solid rgba(255, 111, 97, .28);
  border-radius: 10px;
  background: rgba(255, 111, 97, .055);
  color: #d58f84;
  font-size: 9px;
  font-weight: 800;
}
.calendar-header-delete { border: 1px solid #373a33; background: transparent; box-shadow: none; }
.calendar-header-delete:hover { border-color: #55594f; background: rgba(255,255,255,.025); color: #ffada1; }
.calendar-header-delete:disabled { opacity: .45; cursor: wait; }
.settings-close-button,
.settings-close-button:hover,
.settings-close-button:focus-visible { border-color: transparent !important; outline: 0; background: transparent !important; box-shadow: none !important; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.checkbox-row { min-height: 40px; display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--accent); }
.checkbox-row span small { margin-top: 4px; display: block; }
.service-responsibility-fieldset { margin: 20px 0 0; padding: 0; border: 0; }
.service-responsibility-fieldset legend { color: #cbc7bd; font-size: 11px; font-weight: 700; }
.service-responsibility-fieldset > p { margin: 6px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.service-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.service-option { min-width: 0; min-height: 42px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: #c9c6bd; cursor: pointer; }
.service-option input { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.service-option span { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.service-option:has(input:checked) { border-color: var(--accent); background: rgba(217,255,87,.07); color: var(--text); }
.location-structure { display: block; }
.location-editor { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); }
.location-level { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.location-level > .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.location-card-list { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.location-card { min-width: 0; padding: 12px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; }
.location-card:hover, .location-card.active { border-color: rgba(217,255,87,.45); background: rgba(217,255,87,.045); }
.location-card strong, .location-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-card strong { font-size: 11px; }
.location-card span { color: var(--muted); font-size: 9px; }
.location-level .location-editor { margin-top: 12px; }
.location-form-actions { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.location-form-actions .primary-button { flex: 1; }
.settings-form > .primary-button { margin-top: 20px; }
.line-sync-panel { margin-top: 16px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(217,255,87,.16); border-radius: 13px; background: rgba(217,255,87,.035); }
.line-sync-panel > div { min-width: 0; }
.line-sync-panel strong, .line-sync-panel span { display: block; }
.line-sync-panel strong { font-size: 10px; }
.line-sync-panel span { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.line-sync-panel .secondary-button { flex: none; }
.secondary-button { width: 100%; min-height: 43px; margin-top: 12px; border: 1px dashed #44443e; border-radius: 12px; background: transparent; color: #c2beb4; cursor: pointer; font-size: 11px; font-weight: 700; }
.secondary-button:hover { border-color: rgba(217, 255, 87, .42); }
.defaults-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.defaults-section h4 { margin: 0; font-size: 12px; }
.defaults-section > p { margin: 6px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.line-default-picker { margin-bottom: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.line-default-picker select { min-width: 0; }
.secondary-button.compact { width: auto; min-height: 43px; margin-top: 0; padding: 0 14px; border-style: solid; }
.line-default-row { padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, .015); }
.line-default-remove { min-height: 43px; padding: 0 9px; border: 0; background: transparent; color: #a27b73; cursor: pointer; font-size: 9px; }
.vk-bot-draft { min-width: 0; margin-top: 22px; padding: 18px; border: 1px solid rgba(217,255,87,.18); border-radius: 14px; background: linear-gradient(145deg, rgba(217,255,87,.035), rgba(255,255,255,.012) 50%); }
.vk-bot-draft-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vk-bot-draft-heading > div { min-width: 0; }
.vk-bot-draft-kicker, .vk-preview-caption { display: block; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.vk-bot-draft-heading h4 { margin: 6px 0 0; font-size: 15px; }
.vk-bot-draft-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.vk-bot-draft-badge { flex: none; padding: 5px 8px; border: 1px solid rgba(217,255,87,.22); border-radius: 999px; background: rgba(217,255,87,.07); color: #cbe878; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.vk-bot-draft-warning { margin-top: 14px; padding: 10px 11px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid rgba(255,176,91,.17); border-radius: 10px; background: rgba(255,176,91,.045); }
.vk-bot-draft-warning strong { color: #e3b57c; font-size: 8px; text-transform: uppercase; }
.vk-bot-draft-warning span { color: #928c82; font-size: 8px; line-height: 1.45; }
.vk-bot-draft-layout { min-width: 0; margin-top: 17px; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 12px; }
.vk-keyboard-preview, .vk-scenario-preview { min-width: 0; }
.vk-preview-caption { margin: 0 0 8px 2px; }
.vk-preview-phone { min-width: 0; padding: 10px; border: 1px solid #292d34; border-radius: 14px; background: #0d1015; }
.vk-preview-message { padding: 10px 11px; border-radius: 11px 11px 11px 4px; background: #24262a; color: #e8e9ec; font-size: 9px; line-height: 1.4; }
.vk-draft-keyboard { min-width: 0; margin-top: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.vk-draft-button { min-width: 0; min-height: 32px; padding: 6px 7px; border: 1px solid transparent; border-radius: 8px; color: #fff; cursor: pointer; font: inherit; font-size: 7.5px; font-weight: 750; line-height: 1.15; overflow-wrap: anywhere; transition: border-color .15s ease, filter .15s ease, transform .15s ease; }
.vk-draft-button.wide { grid-column: 1 / -1; }
.vk-draft-button.tone-primary { background: #3f7fc4; }
.vk-draft-button.tone-secondary { background: #666b72; }
.vk-draft-button.tone-positive { background: #3f9664; }
.vk-draft-button.tone-danger { background: #d95155; }
.vk-draft-button:not(.active) { filter: saturate(.78) brightness(.86); }
.vk-draft-button.active { border-color: rgba(255,255,255,.9); box-shadow: 0 0 0 2px rgba(217,255,87,.18); }
.vk-draft-button:active { transform: scale(.985); }
.vk-scenario-card { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #141613; }
.vk-scenario-card-heading { min-width: 0; display: flex; align-items: center; gap: 8px; }
.vk-scenario-index { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border: 1px solid rgba(217,255,87,.22); border-radius: 8px; color: var(--accent); font-size: 8px; font-weight: 850; }
.vk-scenario-card h5 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.25; }
.vk-draft-action-flow { margin-top: 12px; display: grid; gap: 0; }
.vk-draft-flow-step { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; }
.vk-draft-flow-rail { position: relative; min-height: 48px; display: flex; justify-content: center; }
.vk-draft-flow-rail::after { content: ""; position: absolute; top: 21px; bottom: -3px; width: 1px; background: var(--line); }
.vk-draft-flow-step:last-child .vk-draft-flow-rail::after { display: none; }
.vk-draft-flow-marker { position: relative; z-index: 1; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #3b3e37; border-radius: 50%; background: #1d201b; color: #a9ada3; font-size: 6.5px; font-weight: 800; }
.vk-draft-flow-step > div:last-child { min-width: 0; padding: 1px 0 11px; }
.vk-draft-flow-step strong { display: block; color: #d5d3cb; font-size: 8px; line-height: 1.3; }
.vk-draft-flow-step p { margin: 4px 0 0; color: var(--muted); font-size: 7.5px; line-height: 1.48; overflow-wrap: anywhere; }
.vk-draft-flow-step.type-message .vk-draft-flow-marker { border-color: rgba(76,139,205,.48); color: #87b8e9; }
.vk-draft-flow-step.type-choice .vk-draft-flow-marker, .vk-draft-flow-step.type-route .vk-draft-flow-marker { border-color: rgba(217,255,87,.28); color: #c9e875; }
.vk-draft-flow-step.type-gallery .vk-draft-flow-marker { border-color: rgba(175,124,224,.35); color: #c9a3ea; }
.vk-draft-flow-step.type-wait .vk-draft-flow-marker { border-color: rgba(255,176,91,.28); color: #dfae75; }
.vk-bot-draft-actions { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.vk-bot-draft-actions .secondary-button { width: 100%; min-width: 0; }
.vk-bot-draft-note { margin-top: 10px; display: block; color: #6f7169; font-size: 7.5px; line-height: 1.5; }
.vk-draft-enable-row { min-width: 0; margin-top: 12px; padding: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.012); }
.vk-draft-enable-row .checkbox-row { margin: 0; }
.vk-draft-enable-state { padding: 5px 8px; border: 1px solid #353831; border-radius: 999px; color: #8d9087; font-size: 7.5px; font-weight: 800; white-space: nowrap; }
.vk-draft-enable-state.ready { border-color: rgba(217,255,87,.3); background: rgba(217,255,87,.07); color: var(--accent); }
.vk-draft-message-field { margin-top: 14px; }
.vk-draft-message-field input { margin-top: 7px; }
.vk-draft-editor { min-width: 0; margin-top: 13px; padding: 13px; border: 1px solid #34372f; border-radius: 13px; background: rgba(0,0,0,.13); }
.vk-draft-editor-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vk-draft-editor-heading > div { min-width: 0; }
.vk-draft-editor-heading h5 { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 11px; }
.vk-draft-editor-heading .text-button { flex: none; }
.vk-draft-editor > label { margin-top: 13px; }
.vk-draft-editor-grid { min-width: 0; margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 8px; }
.vk-draft-editor-grid label { min-width: 0; }
.vk-draft-wide-row { min-height: 43px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; }
.vk-draft-order-actions { min-width: 0; margin-top: 9px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vk-draft-order-actions .secondary-button { width: 100%; min-width: 0; padding-inline: 8px; font-size: 8px; }
.vk-draft-steps-heading { min-width: 0; margin-top: 17px; padding-top: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; border-top: 1px solid var(--line-soft); }
.vk-draft-steps-heading h5 { margin: 0; font-size: 10px; }
.vk-draft-steps-heading p { margin: 4px 0 0; color: var(--muted); font-size: 7.5px; line-height: 1.45; }
.vk-draft-steps-heading .secondary-button { flex: none; }
.vk-draft-step-editors { min-width: 0; margin-top: 10px; display: grid; gap: 8px; }
.vk-draft-step-editor { min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.013); }
.vk-draft-step-editor-head { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 5px; }
.vk-draft-step-editor-index { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #3a3d36; border-radius: 7px; color: #a8aaa2; font-size: 7px; font-weight: 800; }
.vk-draft-step-editor-head select { min-width: 0; height: 34px; margin: 0; padding: 0 25px 0 9px; font-size: 8px; }
.vk-draft-step-icon-button { width: 30px; height: 30px; padding: 0; border: 1px solid #34372f; border-radius: 8px; background: transparent; color: #a8aaa2; cursor: pointer; font-size: 10px; }
.vk-draft-step-icon-button.danger { color: #b7867d; }
.vk-draft-step-editor label { margin-top: 8px; }
.vk-draft-step-editor input, .vk-draft-step-editor textarea { margin-top: 5px; }
.vk-draft-step-editor textarea { min-height: 72px; resize: vertical; }
.vk-draft-empty-steps { padding: 13px; border: 1px dashed #363931; border-radius: 10px; color: var(--muted); font-size: 8px; text-align: center; }
.vk-draft-save-row { min-width: 0; margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; }
.vk-draft-save-row .primary-button { min-width: 0; }
.vk-draft-save-row .vk-bot-draft-note { margin: 0; }
.vk-draft-save-row .vk-bot-draft-note.saved { color: #a8c95e; }
.vk-draft-save-row .vk-bot-draft-note.dirty { color: #d9a86f; }
.permission-fieldset { margin: 22px 0 0; padding: 0; border: 0; }
.permission-fieldset legend { margin-bottom: 12px; color: #cbc7bd; font-size: 11px; font-weight: 700; }
.data-visibility-fieldset { min-width: 0; margin: 22px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.data-visibility-fieldset > legend { padding: 0 6px; color: #cbc7bd; font-size: 11px; font-weight: 760; }
.data-visibility-fieldset > p, .data-visibility-group > p { margin: 5px 0 11px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.data-visibility-group { min-width: 0; margin-top: 17px; }
.data-visibility-group > strong { font-size: 10px; }
.data-visibility-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.data-visibility-grid .permission-row { min-width: 0; margin: 0; padding: 9px 10px; }
.data-visibility-grid .permission-row > span { min-width: 0; }
.data-visibility-grid .permission-row strong { overflow-wrap: anywhere; }
.google-field-settings { margin-top: 16px; }
.workplace-default-users-fieldset { margin-top: 14px; }
.permission-list { display: grid; gap: 8px; }
.permission-row { padding: 11px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, .015); cursor: pointer; }
.permission-row input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.permission-row strong, .permission-row small { display: block; }
.permission-row strong { color: #cbc7bd; font-size: 11px; }
.permission-row small { margin-top: 4px; color: #77756e; font-size: 9px; line-height: 1.45; }
.automation-pane { display: block; min-width: 0; overflow: hidden; }
.automation-board-view { height: 100%; min-width: 0; padding: 22px 24px 26px; overflow-y: auto; }
.automation-board-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.automation-board-heading h3 { margin: 0; font-size: 14px; }
.automation-board-heading p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.automation-board-heading .secondary-button { flex: none; }
.automation-kanban { min-width: 0; margin: 18px -24px 0; padding: 0 24px 14px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); align-items: start; gap: 11px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.automation-board-column { min-height: 420px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 16px; background: #141413; }
.automation-board-column > header { min-height: 58px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.automation-board-column > header h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.automation-board-column > header h4 i { width: 9px; height: 9px; flex: none; border-radius: 50%; }
.automation-board-column > header span { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }
.automation-board-bucket { padding: 11px; }
.automation-board-bucket + .automation-board-bucket { border-top: 1px solid var(--line-soft); }
.automation-board-bucket-heading { display: flex; align-items: center; justify-content: space-between; color: #aaa79f; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.automation-board-bucket-heading i { min-width: 20px; padding: 3px 6px; border-radius: 999px; background: #252522; color: var(--muted); font-size: 8px; font-style: normal; text-align: center; }
.automation-board-bucket.trigger .automation-board-bucket-heading { color: #d9b176; }
.automation-board-bucket.robot .automation-board-bucket-heading { color: #b8cb79; }
.automation-board-cards { margin-top: 8px; display: grid; gap: 7px; }
.automation-board-cards > p { margin: 0; padding: 12px 10px; border: 1px dashed var(--line); border-radius: 11px; color: #66645e; font-size: 8px; line-height: 1.45; }
.automation-board-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); }
.automation-board-card.trigger { border-left: 3px solid #d8a663; }
.automation-board-card.robot { border-left: 3px solid #a6bd58; }
.automation-board-card.disabled { opacity: .56; }
.automation-board-card-main { min-width: 0; padding: 10px; display: block; border: 0; background: transparent; cursor: pointer; text-align: left; }
.automation-board-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.automation-board-card-top strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.automation-board-card-top i { flex: none; color: #a9bc69; font-size: 7px; font-style: normal; font-weight: 850; }
.automation-board-card-main > small { margin-top: 5px; display: block; overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.automation-board-card-order { width: 30px; display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid var(--line-soft); }
.automation-board-card-order button { border: 0; background: transparent; color: #77756e; cursor: pointer; font-size: 10px; }
.automation-board-card-order button + button { border-top: 1px solid var(--line-soft); }
.automation-board-add { width: 100%; min-height: 34px; margin-top: 8px; border: 1px dashed #3a3934; border-radius: 10px; background: transparent; color: #8d8a81; cursor: pointer; font-size: 9px; font-weight: 750; }
.automation-board-add.trigger:hover { border-color: #8e704a; color: #dab77f; }
.automation-board-add.robot:hover { border-color: #74813e; color: #c5d582; }
.automation-status { flex: none; padding: 5px 8px; border-radius: 999px; background: #2a2925; color: #85827a; font-size: 9px; font-style: normal; font-weight: 800; }
.automation-status.enabled { background: rgba(217, 255, 87, .12); color: var(--accent); }
.automation-journal-heading { margin-top: 28px; padding-top: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.automation-journal-heading h4 { margin: 0; font-size: 12px; }
.automation-journal-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.automation-runs { margin-top: 12px; display: grid; gap: 7px; }
.automation-run { border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, .015); overflow: hidden; }
.automation-run summary { padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.automation-run summary::-webkit-details-marker { display: none; }
.automation-run summary span { min-width: 0; }
.automation-run summary strong, .automation-run summary small { display: block; }
.automation-run summary strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.automation-run summary small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.automation-run summary i { flex: none; color: #aaa79f; font-size: 8px; font-style: normal; font-weight: 800; }
.automation-run-completed summary i { color: #9bd68f; }
.automation-run-failed summary i { color: #ff9e90; }
.automation-run-waiting summary i { color: #f0c678; }
.automation-run ol { margin: 0; padding: 0 14px 12px 30px; color: #99968e; font-size: 8px; line-height: 1.55; }
.automation-run li.error { color: #ff9e90; }
.automation-form { width: min(760px, 100%); height: 100%; margin: 0 auto; padding-top: 20px; }
.automation-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.automation-editor-kind { padding: 6px 9px; border-radius: 999px; background: rgba(166, 189, 88, .13); color: #bfd378; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.automation-editor-kind.trigger { background: rgba(216, 166, 99, .13); color: #e1b77e; }
.automation-block { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .012); }
.automation-block-title { display: flex; align-items: flex-start; gap: 10px; }
.automation-block-title h4 { margin: 1px 0 0; font-size: 12px; }
.automation-block-title p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.automation-step-number { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(217, 255, 87, .12); color: var(--accent); font-size: 10px; font-weight: 850; }
.automation-block > label, .automation-config > label, .automation-row-controls > label { display: grid; gap: 6px; color: #bdb9af; font-size: 9px; font-weight: 700; }
.automation-block > label { margin-top: 14px; }
.automation-config { margin-top: 10px; }
.automation-sequence { margin-top: 13px; display: grid; gap: 9px; }
.automation-sequence-row { padding: 11px; border: 1px solid var(--line-soft); border-radius: 12px; background: #171715; }
.automation-row-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.automation-row-header strong { color: #d6d2c7; font-size: 9px; }
.automation-row-buttons { flex: none; display: flex; gap: 4px; }
.automation-row-button { width: 27px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.automation-row-button.danger { color: #ff9e90; }
.automation-row-controls { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.automation-row-controls > label:only-child { grid-column: 1 / -1; }
.automation-row-controls input, .automation-row-controls select, .automation-row-controls textarea, .automation-block select, .automation-config select, .automation-add-row select, .automation-test-row select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #20201d; color: var(--text); outline: 0; }
.automation-row-controls input, .automation-row-controls select, .automation-block select, .automation-config select, .automation-add-row select, .automation-test-row select { height: 40px; padding: 0 10px; }
.automation-row-controls textarea { min-height: 76px; padding: 10px; resize: vertical; }
.automation-warning { grid-column: 1 / -1; color: #d1a86a; font-size: 8px; line-height: 1.45; }
.automation-add-row, .automation-test-row, .automation-form-actions { margin-top: 11px; display: flex; align-items: center; gap: 8px; }
.automation-add-row select, .automation-test-row select { flex: 1; min-width: 0; }
.automation-template-help { margin: 14px 2px 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.automation-template-help code { color: #c7d79a; }
.automation-form-actions { margin-top: 18px; justify-content: space-between; }
.automation-form-actions .primary-button { margin-left: auto; }
.current-user { max-width: 92px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.form-help { margin: 13px 0 0; color: #6f6d66; font-size: 9px; line-height: 1.5; }

.workspace.calendar-mode { display: block; }
.workspace.deals-mode { display: block; }
.workspace.today-mode, .workspace.updates-mode, .workspace.statistics-mode, .workspace.reports-mode, .workspace.expenses-mode, .workspace.training-mode, .workspace.estimation-mode, .workspace.marketing-mode, .workspace.content-mode { display: block; }
.workspace.calendar-mode .sidebar,
.workspace.calendar-mode .dialogs-header,
.workspace.waitlist-mode .sidebar,
.workspace.waitlist-mode .dialogs-header,
.workspace.waitlist-mode .chat-panel,
.workspace.calendar-mode .chat-panel,
.workspace.deals-mode .sidebar,
.workspace.deals-mode .dialogs-header,
.workspace.deals-mode .chat-panel,
.workspace.today-mode .sidebar,
.workspace.today-mode .dialogs-header,
.workspace.today-mode .chat-panel,
.workspace.updates-mode .sidebar,
.workspace.updates-mode .dialogs-header,
.workspace.updates-mode .chat-panel,
.workspace.statistics-mode .sidebar,
.workspace.statistics-mode .dialogs-header,
.workspace.statistics-mode .chat-panel,
.workspace.reports-mode .sidebar,
.workspace.reports-mode .dialogs-header,
.workspace.reports-mode .chat-panel,
.workspace.expenses-mode .sidebar,
.workspace.expenses-mode .dialogs-header,
.workspace.expenses-mode .chat-panel,
.workspace.training-mode .sidebar,
.workspace.training-mode .dialogs-header,
.workspace.training-mode .chat-panel,
.workspace.estimation-mode .sidebar,
.workspace.estimation-mode .dialogs-header,
.workspace.estimation-mode .chat-panel,
.workspace.marketing-mode .sidebar,
.workspace.marketing-mode .dialogs-header,
.workspace.marketing-mode .chat-panel,
.workspace.content-mode .sidebar,
.workspace.content-mode .dialogs-header,
.workspace.content-mode .chat-panel { display: none; }
.calendar-panel {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: rgba(10, 10, 10, .72);
}
.confirmation-inbox { padding: 12px 26px; border-bottom: 1px solid rgba(240,179,109,.18); background: rgba(240,179,109,.045); }
.confirmation-inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.confirmation-inbox-heading > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.confirmation-inbox-heading strong { color: #f2c38c; font-size: 11px; }
.confirmation-inbox-heading span { color: var(--muted); font-size: 9px; }
.confirmation-card-list { margin-top: 9px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(235px, 310px); gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.confirmation-card { min-width: 0; padding: 10px 11px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 9px; border: 1px solid rgba(240,179,109,.22); border-radius: 11px; background: rgba(17,17,16,.9); color: var(--text); cursor: pointer; text-align: left; }
.confirmation-card strong, .confirmation-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirmation-card strong { font-size: 10px; }
.confirmation-card span { color: var(--muted); font-size: 8px; }
.confirmation-card i { grid-row: 1 / 3; grid-column: 2; align-self: center; color: #f2c38c; font-size: 16px; font-style: normal; }
.calendar-panel > * { min-width: 0; }
.calendar-header {
  width: 100%;
  min-width: 0;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 13, .9);
}
.calendar-brand-row { max-width: 360px; }
.calendar-brand-row h1 { margin: 4px 0 0; font-size: 22px; line-height: 1; letter-spacing: -.03em; }
.calendar-primary-nav { width: min(320px, 100%); }
.calendar-header-actions,
.calendar-period-controls,
.calendar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calendar-toolbar {
  width: 100%;
  min-width: 0;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.calendar-period-controls strong { min-width: 180px; margin-left: 5px; font-size: 13px; text-transform: capitalize; }
.calendar-today { padding: 8px 5px; }
.calendar-back-month { flex: none; min-height: 38px; padding-inline: 11px; }
.calendar-filter { min-width: 190px; display: grid; gap: 4px; }
.calendar-filter > span { display: none; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-filter-view { min-width: 178px; }
.calendar-filter-city { min-width: 130px; }
.calendar-dialog.calendar-summary-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 22px; }
.calendar-summary-dialog .form-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-summary-dialog h2 { font-size: 22px; }
.calendar-summary-dialog p { white-space: pre-line; line-height: 1.5; }
.calendar-revenue-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.calendar-revenue-month { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.calendar-revenue-month h3 { margin: 0 0 14px; text-transform: capitalize; }
.calendar-revenue-total { color: var(--accent); font-size: 28px; }
.calendar-revenue-month dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 8px; font-size: 13px; }
.calendar-revenue-month dd { margin: 0; font-weight: 700; }
.calendar-revenue-scope, .calendar-revenue-note { color: var(--muted); font-size: 13px; }
.calendar-revenue-unpriced { font-size: 12px; }
#calendar-revenue-button { flex: none; width: 43px; height: 43px; font-size: 23px; font-weight: 700; }
.calendar-view-create { display: flex; align-items: end; gap: 8px; }
.calendar-view-create #calendar-add-button { width: 43px; min-width: 43px; height: 43px; padding: 0; font-size: 22px; line-height: 1; }
.calendar-view-buttons { display: grid; grid-template-columns: repeat(4, minmax(36px, 1fr)); gap: 5px; }
.calendar-view-buttons button {
  height: 43px;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.calendar-view-buttons button:hover { border-color: #4b4f45; color: var(--text); }
.calendar-view-buttons button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.calendar-actions select {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}
.calendar-week {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.calendar-time-view { display: grid; grid-template-columns: 54px repeat(7, minmax(145px, 1fr)); align-items: start; }
.calendar-day-view { grid-template-columns: 54px minmax(420px, 1fr); }
.calendar-time-axis, .calendar-time-day { min-width: 0; display: grid; grid-template-rows: 54px 42px 1024px; }
.calendar-time-axis { position: sticky; left: 0; z-index: 5; background: #10100f; }
.calendar-time-axis > div:first-child { position: sticky; top: 0; z-index: 6; border-bottom: 1px solid var(--line-soft); background: #10100f; }
.calendar-all-day-label { padding: 14px 6px 0 0; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: #69675f; font-size: 8px; text-align: right; text-transform: uppercase; }
.calendar-hour-labels { position: relative; border-right: 1px solid var(--line-soft); background: #10100f; }
.calendar-hour-labels span { position: absolute; right: 7px; color: #706e66; font-size: 8px; transform: translateY(-50%); }
.calendar-time-day { border-right: 1px solid var(--line-soft); }
.calendar-time-day > header { min-width: 0; padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 9px; position: sticky; top: 0; z-index: 4; border-bottom: 1px solid var(--line-soft); background: rgba(16, 16, 15, .97); }
.calendar-time-day > header span { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 750; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.calendar-time-day > header strong { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 12px; }
.calendar-time-day.today > header strong { background: var(--accent); color: var(--accent-ink); }
.calendar-all-day-lane { min-width: 0; padding: 4px; overflow-y: auto; border-bottom: 1px solid var(--line-soft); background: #121211; cursor: pointer; }
.calendar-time-lane { position: relative; min-width: 0; cursor: crosshair; background: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(255,255,255,.025) 31px 32px); }
.calendar-time-lane.outside-work { background-color: rgba(0, 0, 0, .32); background-image: repeating-linear-gradient(135deg, transparent 0 9px, rgba(255,255,255,.045) 9px 10px); }
.calendar-working-window { position: absolute; left: 0; right: 0; z-index: 0; border-block: 1px solid rgba(217,255,87,.12); background: rgba(217,255,87,.035); pointer-events: none; }
.calendar-nonworking { position: absolute; left: 0; right: 0; z-index: 1; background-color: rgba(0,0,0,.28); background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255,255,255,.045) 8px 9px); pointer-events: none; }
.calendar-hour-line { position: absolute; left: 0; right: 0; height: 1px; display: block; background: var(--line-soft); pointer-events: none; }
.calendar-now-line { position: absolute; left: -4px; right: 0; z-index: 3; height: 2px; background: #ff6f61; pointer-events: none; }
.calendar-now-line::before { content: ""; position: absolute; left: 0; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: #ff6f61; }
.calendar-event { width: 100%; min-width: 0; padding: 7px 8px; display: grid; align-content: start; gap: 2px; overflow: hidden; border: 1px solid rgba(217,255,87,.3); border: 1px solid color-mix(in srgb, var(--event-color, var(--accent)) 48%, transparent); border-left: 4px solid var(--event-color, var(--accent)); border-radius: 8px; background: #24291b; background: color-mix(in srgb, var(--event-color, var(--accent)) 14%, #171716); color: var(--text); cursor: pointer; text-align: left; }
.calendar-event:hover { filter: brightness(1.12); }
.calendar-event span { color: color-mix(in srgb, var(--event-color, var(--accent)) 72%, white); font-size: 8px; }
.calendar-event strong { overflow: hidden; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; }
.calendar-event small { color: #807d75; font-size: 8px; }
.calendar-event.positioned { position: absolute; right: 4px; z-index: 2; width: auto; min-height: 26px; padding: 5px 7px; box-shadow: 0 3px 10px rgba(0,0,0,.16); }
.calendar-rest-block { position: absolute; right: 4px; z-index: 1; min-height: 18px; padding: 3px 6px; overflow: hidden; border: 1px dashed rgba(240,179,109,.34); border-radius: 7px; background: rgba(240,179,109,.08); color: #bd9367; font-size: 7px; line-height: 1.25; pointer-events: none; }
.calendar-event.status-tentative { border-style: dashed; opacity: .82; }
.calendar-event.status-awaiting_confirmation { box-shadow: inset 0 0 0 1px rgba(240,198,120,.18); }
.calendar-event.status-completed { opacity: .58; filter: saturate(.45); }
.calendar-event.status-cancelled, .calendar-event.status-rescheduled { opacity: .78; filter: grayscale(.65); border-style: dashed; }
.calendar-event.status-no_show { opacity: .62; border-color: rgba(255,111,97,.55); }
.calendar-drag-handle { position: absolute; top: 1px; right: 3px; z-index: 4; min-width: 24px; min-height: 20px; display: grid; place-items: center; color: rgba(255,255,255,.55) !important; cursor: grab; font-size: 10px !important; letter-spacing: -3px; touch-action: none; }
.calendar-resize-handle { position: absolute; left: 6px; right: 6px; bottom: 0; z-index: 4; height: 9px; border-bottom: 2px solid rgba(255,255,255,.38); cursor: ns-resize; touch-action: none; }
.calendar-event.gesture-active { z-index: 8; opacity: .72; outline: 2px solid var(--accent); pointer-events: none; }
.calendar-event.gesture-active::after { content: attr(data-gesture-time); position: absolute; right: 3px; bottom: 3px; padding: 2px 4px; border-radius: 4px; background: #080808; color: var(--accent); font-size: 8px; font-weight: 800; }
.calendar-event.compact { min-height: 27px; padding: 4px 6px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px; border-left-width: 3px; }
.calendar-event.compact span { white-space: nowrap; }
.calendar-event.compact strong { white-space: nowrap; }
.calendar-month-view { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); align-content: start; }
.calendar-month-weekday { min-height: 34px; padding: 11px 10px 7px; position: sticky; top: 0; z-index: 4; border-bottom: 1px solid var(--line-soft); background: rgba(16,16,15,.97); color: var(--muted); font-size: 9px; font-weight: 800; text-align: right; text-transform: uppercase; }
.calendar-month-day { min-width: 0; min-height: 124px; padding: 7px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,.008); cursor: pointer; }
.calendar-month-day:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--accent); outline-offset: -2px; }
.calendar-month-day:nth-of-type(7n + 1) { border-right: 0; }
.calendar-month-day.outside-month { background: rgba(255,255,255,.018); }
.calendar-month-day.outside-month > .calendar-month-date { color: #5d5b55; }
.calendar-month-date { width: 27px; height: 27px; margin-left: auto; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #bcb8ae; cursor: pointer; font-size: 10px; }
.calendar-month-day.today .calendar-month-date { background: var(--accent); color: var(--accent-ink); font-weight: 850; }
.calendar-month-events { margin-top: 4px; display: grid; gap: 3px; }
.calendar-month-more { padding: 3px 5px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; text-align: left; }
.calendar-agenda-view { padding: 18px max(18px, calc((100% - 860px) / 2)) 34px; display: block; overflow-y: auto; }
.calendar-agenda-day + .calendar-agenda-day { margin-top: 22px; }
.calendar-agenda-day > header { padding: 0 3px 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.calendar-agenda-day > header strong { font-size: 13px; text-transform: capitalize; }
.calendar-agenda-day.today > header strong { color: var(--accent); }
.calendar-agenda-day > header span { color: var(--muted); font-size: 9px; }
.calendar-agenda-list { display: grid; }
.calendar-agenda-event { width: 100%; min-width: 0; min-height: 78px; padding: 13px 12px; display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid var(--line-soft); border-left: 4px solid var(--event-color, var(--accent)); background: rgba(255,255,255,.012); color: var(--text); cursor: pointer; text-align: left; }
.calendar-agenda-event:hover { background: rgba(255,255,255,.035); }
.calendar-agenda-leading { min-width: 0; display: grid; align-content: center; gap: 9px; }
.calendar-agenda-time { color: #c8c4ba; font-size: 10px; font-weight: 800; }
.calendar-agenda-sketch { width: 140px; height: 104px; display: block; border: 1px solid var(--line); border-radius: 12px; background: #090a08; cursor: zoom-in; object-fit: contain; transition: border-color .16s ease, filter .16s ease; }
.calendar-agenda-sketch:hover, .calendar-agenda-sketch:focus-visible { border-color: var(--accent); filter: brightness(1.08); outline: 0; }
.calendar-agenda-body { min-width: 0; display: grid; gap: 5px; }
.calendar-agenda-body strong, .calendar-agenda-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda-body strong { font-size: 12px; }
.calendar-agenda-body small { color: var(--muted); font-size: 9px; }
.calendar-agenda-body .calendar-agenda-payment { color: #c9d98e; font-weight: 750; }
.calendar-agenda-body .calendar-agenda-phone { color: #a7a49b; }
.calendar-agenda-body .calendar-agenda-notes { display: -webkit-box; overflow: hidden; line-height: 1.35; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.calendar-agenda-event i { padding: 6px 8px; border-radius: 999px; background: rgba(217,255,87,.08); color: #bdcb8a; font-size: 8px; font-style: normal; font-weight: 750; white-space: nowrap; }
.calendar-agenda-event.status-tentative { opacity: .82; }
.calendar-agenda-event.status-awaiting_confirmation i { background: rgba(240,198,120,.1); color: #f0c678; }
.calendar-agenda-event.status-completed { opacity: .55; }
.calendar-agenda-event.status-cancelled, .calendar-agenda-event.status-rescheduled { opacity: .78; border-style: dashed; }
.calendar-agenda-event.status-no_show i { background: rgba(255,111,97,.1); color: #ff9e90; }
.calendar-empty { position: absolute; left: 50%; top: 58%; color: var(--muted); font-size: 12px; pointer-events: none; transform: translate(-50%, -50%); }

.sketch-viewer-dialog { width: min(1100px, calc(100% - 28px)); height: min(900px, calc(100% - 28px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: #0c0d0b; color: var(--text); box-shadow: var(--shadow); }
.sketch-viewer-dialog::backdrop { background: rgba(0,0,0,.88); backdrop-filter: blur(9px); }
.sketch-viewer-shell { width: 100%; height: 100%; padding: 18px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 14px; }
.sketch-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sketch-viewer-header h2 { margin: 3px 0 0; font-size: 20px; }
.sketch-viewer-canvas { min-width: 0; min-height: 0; padding: 12px; display: grid; place-items: center; overflow: auto; border: 1px solid var(--line-soft); border-radius: 15px; background: #050505; }
.sketch-viewer-image { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.sketch-viewer-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.sketch-viewer-actions > * { min-height: 46px; display: grid; place-items: center; text-decoration: none; }

.calendar-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #121211;
  color: var(--text);
  box-shadow: var(--shadow);
}
.calendar-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(7px); }
.booking-conflict-dialog { width: min(430px, calc(100% - 28px)); }
.booking-conflict-form { display: grid; gap: 20px; }
.booking-conflict-message { margin: 0; color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.5; }
.booking-conflict-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.booking-conflict-actions button { min-height: 48px; }
.calendar-form { width: 100%; min-width: 0; max-width: 100%; max-height: calc(100vh - 30px); padding: 24px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-x: none; }
.calendar-form > * { min-width: 0; max-width: 100%; }
.calendar-form > label { width: 100%; margin-top: 14px; display: grid; gap: 7px; color: #cbc7bd; font-size: 11px; font-weight: 700; }
.calendar-title-field { margin-top: 17px !important; }
.calendar-title-field input { min-height: 52px !important; padding: 8px 2px !important; border-width: 0 0 1px !important; border-radius: 0 !important; background: transparent !important; font-size: 20px; font-weight: 700; }
.calendar-own-client { margin-top: 14px; padding: 13px 14px; display: grid; gap: 5px; border: 1px solid rgba(217,255,87,.28); border-radius: 11px; background: rgba(217,255,87,.045); }
.calendar-own-client > span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-own-client > strong { color: var(--text); font-size: 11px; }
.calendar-own-client > small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.calendar-own-client.missing { border-color: rgba(255,111,97,.4); background: rgba(255,111,97,.05); }
.calendar-own-client.missing > strong { color: #ff9e90; }
.calendar-busy-mode { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.calendar-busy-mode legend { margin-bottom: 8px; color: #cbc7bd; font-size: 11px; font-weight: 700; }
.calendar-busy-mode-grid { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.calendar-busy-mode-grid button { min-width: 0; min-height: 44px; padding: 7px 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: #c9c6bd; font-size: 9px; font-weight: 800; line-height: 1.25; }
.calendar-busy-mode-grid button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -2px rgba(0,0,0,.18); }
.calendar-time-choice { min-width: 0; margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #131512; }
.calendar-time-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calendar-time-heading > strong { font-size: 11px; }
.calendar-time-heading .slot-offset-button { min-height: 34px; padding: 0 12px; }
.calendar-time-group { margin-top: 13px; }
.calendar-time-group-heading { margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calendar-time-group-heading > span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.calendar-time-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.calendar-time-grid button { min-width: 0; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: #c9c6bd; font-size: 9px; font-weight: 750; }
.calendar-time-grid button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 850; }
.calendar-google-option { margin-top: 16px !important; }
.calendar-google-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 500; }
.calendar-details-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calendar-details-grid > label { display: grid; gap: 7px; color: #cbc7bd; font-size: 11px; font-weight: 700; }
.calendar-all-day { margin-top: 15px !important; display: flex !important; }
.calendar-form input[type="color"] { padding: 5px; }
.calendar-form input:not([type="checkbox"]),
.calendar-form textarea,
.calendar-form select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}
.calendar-form textarea { resize: vertical; }
.calendar-form > label:has(#calendar-event-date) { min-width: 0; max-width: 100%; overflow: hidden; contain: inline-size; }
#calendar-event-date {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  inline-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  height: 52px;
  min-height: 52px;
  padding-block: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
  font-size: 16px;
  line-height: normal;
  -webkit-appearance: none;
  appearance: none;
}
#calendar-event-date::-webkit-date-and-time-value {
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  text-align: left;
}
#calendar-event-date::-webkit-datetime-edit {
  min-height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
}
.calendar-form input:focus,
.calendar-form textarea:focus,
.calendar-form select:focus { border-color: rgba(217, 255, 87, .42); }
.calendar-datetime-row { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calendar-datetime-row label { display: grid; gap: 7px; color: #cbc7bd; font-size: 11px; font-weight: 700; }
.calendar-form-actions { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.calendar-form-actions .primary-button { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.schedule-days { margin-top: 15px; display: grid; gap: 7px; }
.calendar-series-scope { padding: 10px 12px; border: 1px solid rgba(217,255,87,.18); border-radius: 12px; background: rgba(217,255,87,.04); }
.schedule-help { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.schedule-day { min-height: 47px; padding: 7px 9px; display: grid; grid-template-columns: auto minmax(110px, 1fr) 96px 96px; align-items: center; gap: 8px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255, 255, 255, .015); }
.schedule-day .schedule-enabled { width: 17px; height: 17px; accent-color: var(--accent); }
.schedule-day strong { font-size: 10px; }
.schedule-day input[type="time"] { min-height: 34px; padding: 5px 7px; }
.calendar-form > .primary-button { margin-top: 18px; }
.calendar-room-list { margin-top: 16px; display: grid; gap: 7px; }
.calendar-room-row { min-height: 48px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.015); }
.calendar-room-row strong { font-size: 10px; }
.calendar-room-row > span { display: flex; gap: 9px; }
.calendar-room-row .text-button { padding: 5px 2px; font-size: 8px; }
.danger-text { color: #ff9e90 !important; }
.calendar-room-empty { margin: 8px 0; color: var(--muted); font-size: 10px; text-align: center; }
.booking-dialog { width: min(760px, calc(100% - 28px)); max-width: 100%; overflow-x: hidden; contain: inline-size; }
.booking-dialog .calendar-form { width: 100%; min-width: 0; max-width: 100%; }
.booking-dialog .calendar-form > *,
.booking-dialog .calendar-form > label,
.booking-dialog .calendar-details-grid,
.booking-dialog .calendar-details-grid > label,
.booking-dialog .dynamic-fields,
.booking-dialog .dynamic-fields > * { min-width: 0; max-width: 100%; }
.booking-dialog input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.booking-dialog select,
.booking-dialog textarea {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  inline-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}
.booking-dialog input[type="date"],
.booking-dialog input[type="time"],
.booking-dialog input[type="datetime-local"] { overflow: hidden; }
.booking-dialog input::-webkit-date-and-time-value { min-width: 0; text-align: left; }
.booking-dialog .form-heading { min-width: 0; gap: 12px; }
.booking-dialog .form-heading > div { min-width: 0; }
.booking-dialog .form-heading h2 { overflow-wrap: anywhere; }
.booking-google-sync { min-width: 0; margin-top: 12px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(217,255,87,.2); border-radius: 12px; background: rgba(217,255,87,.035); }
.booking-google-sync > div { min-width: 0; }
.booking-google-sync strong, .booking-google-sync span { display: block; }
.booking-google-sync strong { color: var(--text); font-size: 10px; }
.booking-google-sync span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.booking-google-sync .secondary-button { flex: none; min-height: 38px; font-size: 9px; }
.booking-google-sync.synced { border-color: rgba(217,255,87,.34); background: rgba(217,255,87,.06); }
.booking-google-sync.failed { border-color: rgba(255,143,125,.3); background: rgba(255,143,125,.055); }
.booking-google-sync.failed strong { color: #ffafa2; }
.google-targets { display: grid; gap: 6px; margin-top: 8px; }
.workspace.waitlist-mode { display: block; }
.workspace.waitlist-mode #waitlist-panel { display: grid; }
.session-bar { flex-wrap: wrap; }
#waitlist-add-from-chat { font-size: 11px; }
.google-target, .calendar-google-summary { font-size: 11px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.google-target-verified { color: var(--accent); }
.google-target-error, .google-target-missing { color: #d35b42; }
html[data-theme="light"] .google-target-error, html[data-theme="light"] .google-target-missing { color: #913f34; }
.booking-client { min-width: 0; margin-top: 14px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.booking-client span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.booking-client strong { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.booking-services, .booking-masters, .booking-workplaces, .booking-duration-control { width: 100%; min-width: 0; max-width: 100%; margin-top: 14px; }
.booking-service-grid { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.booking-service-grid button { min-width: 0; min-height: 40px; padding: 7px 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: #c9c6bd; cursor: pointer; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.booking-service-grid button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.booking-extra-fields { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.015); }
.booking-section-heading { min-width: 0; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.booking-section-heading strong { min-width: 0; color: #cbc7bd; font-size: 10px; }
.booking-section-heading span { min-width: 0; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; text-align: right; }
.booking-heading-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.booking-calendar-preview-button { flex: none; min-height: 28px; padding: 0 9px; border: 1px solid rgba(217,255,87,.28); border-radius: 8px; background: rgba(217,255,87,.055); color: var(--accent); cursor: pointer; font-size: 8px; font-weight: 850; }
.booking-calendar-preview-button:disabled { opacity: .35; cursor: not-allowed; }
.booking-calendar-preview-dialog { width: min(760px, calc(100% - 28px)); }
.booking-calendar-preview-shell { max-height: calc(100vh - 30px); padding: 20px; overflow-y: auto; }
.booking-calendar-preview-nav { margin: 16px 0 10px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 10px; }
.booking-calendar-preview-nav strong { text-align: center; text-transform: capitalize; }
.booking-calendar-preview-nav .secondary-button { min-width: 0; min-height: 38px; padding: 0; }
.booking-calendar-preview-weekdays,
.booking-calendar-preview-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.booking-calendar-preview-weekdays { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 850; text-align: center; text-transform: uppercase; }
.booking-calendar-preview-day { min-width: 0; min-height: 86px; padding: 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.booking-calendar-preview-day.outside { opacity: .38; }
.booking-calendar-preview-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(217,255,87,.16); }
.booking-calendar-preview-date { color: var(--muted); font-size: 8px; font-weight: 800; }
.booking-calendar-preview-event { min-width: 0; padding: 4px 5px; overflow: hidden; border: 0; border-radius: 5px; background: rgba(217,255,87,.1); color: #dce7b2; cursor: pointer; font-size: 7px; line-height: 1.25; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="light"] body.ink-control-theme .booking-calendar-preview-event { background: #e9efd0; color: #52630b; }
.booking-calendar-preview-day small { color: var(--muted); font-size: 7px; }
.booking-calendar-preview-details { min-height: 72px; margin-top: 12px; padding: 12px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 9px; line-height: 1.45; }
.booking-calendar-preview-details strong { color: var(--text); font-size: 11px; }
.booking-calendar-preview-details p { margin: 3px 0 0; white-space: pre-wrap; }
.booking-calendar-preview-grid.loading { opacity: .45; pointer-events: none; }
.booking-master-track { width: 100%; max-width: 100%; min-width: 0; padding: 2px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 74%); gap: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x; -webkit-overflow-scrolling: touch; contain: inline-size; }
.booking-master-track::-webkit-scrollbar { display: none; }
.booking-master-card { min-height: 65px; padding: 11px 12px; display: grid; align-content: center; gap: 4px; scroll-snap-align: center; scroll-snap-stop: always; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; }
.booking-master-card strong { font-size: 11px; }
.booking-master-card span { color: var(--muted); font-size: 9px; }
.booking-master-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(217,255,87,.18); background: rgba(217,255,87,.07); }
.booking-empty-choice { width: 100%; min-width: min(320px, 84vw); margin: 0; padding: 16px 13px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.booking-workplace-track { width: 100%; min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.booking-workplace-card { min-width: 0; min-height: 58px; padding: 9px 10px; display: grid; gap: 4px; align-content: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.booking-workplace-card strong, .booking-workplace-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-workplace-card strong { font-size: 10px; }
.booking-workplace-card span { color: var(--muted); font-size: 8px; }
.booking-workplace-card.active { border-color: var(--accent); background: rgba(217,255,87,.07); box-shadow: inset 0 0 0 1px rgba(217,255,87,.15); }
.booking-choice-row { width: 100%; min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.booking-choice-row > * { min-width: 0; max-width: 100%; }
.booking-choice-row button, .slot-offset-button { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: #c9c6bd; cursor: pointer; font-size: 9px; font-weight: 750; }
.booking-choice-row button.active, .slot-offset-button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.booking-choice-row .half-toggle { min-width: 48px; }
.booking-nearest { width:100%; min-width:0; margin-top:14px; padding:12px; border:1px solid var(--line); border-radius:13px; background:rgba(217,255,87,.025); }
.booking-nearest-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.booking-nearest-heading > div { min-width:0; display:grid; gap:4px; }
.booking-nearest-heading strong { font-size:10px; }
.booking-nearest-heading span { color:var(--muted); font-size:8px; line-height:1.4; }
.booking-nearest-results { margin-top:11px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; max-height:310px; overflow-y:auto; }
.booking-nearest-card { min-width:0; min-height:70px; padding:10px 11px; display:grid; gap:4px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text); cursor:pointer; text-align:left; }
.booking-nearest-card:hover { border-color:rgba(217,255,87,.42); background:rgba(217,255,87,.055); }
.booking-nearest-card strong,.booking-nearest-card span,.booking-nearest-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.booking-nearest-card strong { color:var(--accent); font-size:10px; }
.booking-nearest-card span { font-size:10px; font-weight:750; }
.booking-nearest-card small,.booking-nearest-note { color:var(--muted); font-size:8px; }
.booking-nearest-note { margin:10px 0 0; line-height:1.45; }
.booking-availability { width: 100%; min-width: 0; max-width: 100%; margin-top: 14px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.booking-availability-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.booking-availability-heading strong { font-size: 10px; }
.booking-availability-heading > div { min-width: 0; display: flex; align-items: center; gap: 6px; }
.booking-availability-heading .text-button { color: var(--accent); font-size: 9px; }
.booking-availability-heading .slot-offset-button { min-height: 30px; padding: 0 9px; }
.booking-slots { width: 100%; min-width: 0; max-width: 100%; margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.booking-slots button { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: #c9c6bd; cursor: pointer; font-size: 10px; }
.booking-slots button:hover { border-color: rgba(217,255,87,.35); }
.booking-slots button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 850; }
.booking-availability p { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.booking-custom-time-button { width: 100%; min-height: 38px; margin-top: 10px; }
.booking-custom-time { width: 100%; min-width: 0; max-width: 100%; margin-top: 9px; padding: 10px; display: grid; gap: 7px; overflow: hidden; border: 1px solid rgba(217,255,87,.23); border-radius: 10px; background: rgba(217,255,87,.04); }
.booking-custom-time label { width: 100%; min-width: 0; max-width: 100%; display: grid; gap: 6px; overflow: hidden; color: #cbc7bd; font-size: 9px; font-weight: 700; }
.booking-custom-time p { margin: 0; }
.booking-save-error { padding: 12px 14px; border: 1px solid rgba(255,143,125,.5); border-radius: 10px; background: rgba(255,105,85,.08); color: var(--danger); font-size: 12px; font-weight: 700; line-height: 1.45; }
.booking-save-error .secondary-button { display: block; margin-top: 10px; color: var(--text); background: var(--surface); border-color: var(--line); }
.booking-money-panel { width: 100%; min-width: 0; max-width: 100%; margin-top: 14px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.booking-money-heading, .booking-total-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.booking-money-heading:not(:first-child) { margin-top: 14px; }
.booking-money-heading span, .booking-total-row span { color: #cbc7bd; font-size: 10px; font-weight: 750; }
.booking-money-heading strong { color: var(--accent); font-size: 11px; }
.booking-price-composer { margin-top: 10px; display: grid; gap: 11px; }
.booking-price-group { display: grid; gap: 6px; }
.booking-price-group > span { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.booking-price-grid { width: 100%; min-width: 0; max-width: 100%; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.booking-price-grid > * { min-width: 0; max-width: 100%; }
.booking-price-grid button, .booking-price-half button { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: #c9c6bd; cursor: pointer; font-size: 9px; font-weight: 800; }
.booking-price-grid button.active, .booking-price-half button.active { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.booking-price-half { grid-template-columns: minmax(0, 1fr) 92px; align-items: center; }
.booking-price-half > span { min-width: 0; }
.booking-money-panel .booking-choice-row { margin-top: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.booking-total-row { margin-top: 12px; padding: 11px; border-radius: 10px; background: rgba(217,255,87,.07); }
.booking-total-row strong { color: var(--accent); font-size: 14px; }
.booking-total-row.remaining { background: rgba(255,255,255,.035); }
.booking-total-row.remaining strong { color: var(--text); }
.booking-sketch-panel { width: 100%; min-width: 0; max-width: 100%; margin-top: 14px; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.booking-sketch-panel > .secondary-button { width: 100%; }
.user-schedule-settings .secondary-button { width: 100%; }
.booking-sketch-preview { display: grid; grid-template-columns: 70px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.booking-sketch-preview img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.booking-sketch-preview span { min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.message-photo-wrap { position: relative; display: grid; gap: 6px; }
.message-photo-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 6px; }
.message-photo-download,
.message-sketch-button { width: 100%; min-height: 32px; padding: 6px 9px; border: 1px solid rgba(217,255,87,.3); border-radius: 9px; background: rgba(217,255,87,.08); color: var(--accent); cursor: pointer; font-size: 8px; font-weight: 800; }
.message-photo-download { display: grid; place-items: center; text-align: center; text-decoration: none; }
.message-photo-download:hover,
.message-sketch-button:hover { border-color: rgba(217,255,87,.58); background: rgba(217,255,87,.13); }

.booking-field-settings-list { margin: 16px 0; display: grid; gap: 7px; }
.booking-field-setting { min-height: 52px; padding: 9px 10px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.016); }
.booking-field-setting > span { min-width: 0; display: grid; gap: 3px; }
.booking-field-setting strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.booking-field-setting small { color: var(--muted); font-size: 8px; }
.booking-field-setting label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.booking-field-order { display: grid; grid-template-columns: 28px 28px 28px; gap: 3px; }
.booking-field-order button { min-height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.quick-reply-settings { overflow-y: auto; }
.quick-reply-settings > .section-heading { margin-bottom: 14px; }
.quick-reply-settings .compact-list { max-height: 220px; overflow-y: auto; }
.quick-reply-settings form { margin-top: 18px; padding-top: 18px; display: grid; gap: 13px; border-top: 1px solid var(--line-soft); }
.quick-reply-config-block { min-width: 0; padding: 13px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.014); }
.quick-reply-config-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quick-reply-config-heading > div { min-width: 0; display: grid; gap: 3px; }
.quick-reply-config-heading strong { font-size: 11px; }
.quick-reply-config-heading small { display: block; color: var(--muted); font-size: 8px; font-weight: 500; }
.quick-reply-line-options { display: grid; gap: 7px; }
.quick-reply-line-option { min-width: 0; padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-soft); border-radius: 9px; color: var(--text); font-size: 9px; }
.quick-reply-line-option input { width: 18px; height: 18px; flex: 0 0 auto; }
.quick-reply-line-option input:disabled + span { color: var(--muted); }
.quick-reply-parameter-settings { display: grid; gap: 8px; }
.quick-reply-parameter-row { min-width: 0; padding: 9px; display: grid; grid-template-columns: minmax(120px, 1fr) minmax(100px, .7fr) auto auto auto; align-items: center; gap: 7px; border: 1px solid var(--line-soft); border-radius: 9px; }
.quick-reply-parameter-row input, .quick-reply-parameter-row select { min-width: 0; height: 38px; }
.quick-reply-parameter-row code { color: var(--accent); font-size: 8px; white-space: nowrap; }

.confirmation-dialog { width: min(620px, calc(100% - 28px)); }
.confirmation-client { margin-top: 12px; padding: 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.confirmation-client > div:last-child { min-width: 0; display: grid; gap: 4px; }
.confirmation-client strong, .confirmation-client span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirmation-client strong { font-size: 12px; }
.confirmation-client span { color: var(--muted); font-size: 9px; }
.confirmation-summary { margin-top: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.confirmation-summary > div { min-width: 0; padding: 10px; display: grid; gap: 4px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255,255,255,.015); }
.confirmation-summary span { color: var(--muted); font-size: 8px; }
.confirmation-summary strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.confirmation-sketch { margin-top: 12px; display: grid; gap: 7px; }
.confirmation-sketch span { color: #cbc7bd; font-size: 9px; font-weight: 750; }
.confirmation-sketch img { width: 100%; max-height: 330px; object-fit: contain; border: 1px solid var(--line); border-radius: 13px; background: #080808; }
.confirmation-fields { margin-top: 12px; display: grid; gap: 6px; }
.confirmation-fields > div { padding: 9px 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.confirmation-fields span { color: var(--muted); font-size: 9px; }
.confirmation-fields strong { max-width: 65%; font-size: 9px; text-align: right; overflow-wrap: anywhere; }
.confirmation-control { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.confirmation-control > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.confirmation-control span { color: #cbc7bd; font-size: 10px; font-weight: 750; }
.confirmation-control strong { color: var(--accent); font-size: 13px; }
.confirmation-adjust-row { margin-top: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.confirmation-adjust-row button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); cursor: pointer; font-weight: 800; }
.confirmation-rest-hours { margin-top: 10px; grid-template-columns: repeat(5,minmax(0,1fr)); }
.confirmation-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.quick-reply-dialog { width: min(560px, calc(100% - 28px)); max-height: min(720px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: #111110; color: var(--text); box-shadow: var(--shadow); }
.quick-reply-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.quick-reply-shell { padding: 22px; }
.quick-reply-search { height: 42px; margin-top: 16px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); }
.quick-reply-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.quick-reply-list { margin-top: 12px; max-height: 500px; display: grid; gap: 7px; overflow-y: auto; }
.quick-reply-item { width: 100%; min-width: 0; padding: 11px 12px; display: grid; gap: 5px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); color: var(--text); cursor: pointer; text-align: left; }
.quick-reply-item:hover { border-color: rgba(217,255,87,.32); }
.quick-reply-item > span { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.quick-reply-item strong { font-size: 10px; }
.quick-reply-item i { color: #aebb7b; font-size: 8px; font-style: normal; }
.quick-reply-item small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.quick-reply-empty { margin: 0; padding: 24px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); font-size: 10px; text-align: center; }
.quick-reply-dialog.parameter-mode { width: min(480px, calc(100% - 28px)); }
.quick-reply-dialog.parameter-mode .quick-reply-shell { padding: 22px; }
.quick-reply-parameter-pane { width: 100%; min-width: 0; margin-top: 20px; display: grid; gap: 14px; }
.quick-reply-parameter-pane.hidden { display: none; }
.quick-reply-parameter-progress { margin: 0; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.quick-reply-parameter-pane label { width: 100%; min-width: 0; display: grid; gap: 8px; color: var(--text); font-size: 10px; font-weight: 800; }
.quick-reply-parameter-input-wrap { width: 100%; min-width: 0; display: block; }
.quick-reply-parameter-input-wrap input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  line-height: normal;
}
.quick-reply-parameter-input-wrap input:focus,
.quick-reply-parameter-input-wrap input:focus-visible {
  border-color: var(--accent);
  outline: 0;
  box-shadow: none;
}
.quick-reply-parameter-actions { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-reply-parameter-actions button { width: 100%; min-width: 0; min-height: 50px; }

.deals-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  overscroll-behavior: none;
  background: rgba(10, 10, 10, .72);
}
.deals-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 13, .9);
}
.deals-brand-row { max-width: 360px; }
.deals-brand-row h1 { margin: 4px 0 0; font-size: 22px; line-height: 1; letter-spacing: -.03em; }
.deals-primary-nav { width: min(320px, 100%); }
.deals-header-actions { display: flex; align-items: center; gap: 8px; }
.deals-toolbar {
  padding: 13px 24px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(220px, 430px) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.deals-filters { margin: 0; }
.deals-toolbar .deals-search { margin-top: 0; border-color: transparent; }
.deals-summary { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 10px; }
.deals-summary strong { color: var(--text); font-size: 18px; }
.deals-kanban {
  min-width: 0;
  min-height: 0;
  padding: 16px 18px 22px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 340px);
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: none;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.deal-column { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 16px; background: rgba(19, 19, 18, .86); }
.deal-column > header { min-height: 59px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.deal-column h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.deal-column h2 i { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.deal-column header span { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.deal-cards { min-height: 0; padding: 9px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; }
.deal-card { flex: 0 0 auto; min-width: 0; border: 1px solid var(--line-soft); border-radius: 13px; overflow: hidden; background: var(--surface-2); }
.deal-card-main { width: 100%; min-width: 0; min-height: 70px; padding: 11px; display: block; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.deal-card-main:hover { background: rgba(255, 255, 255, .018); }
.deal-card-client { display: flex; align-items: center; gap: 10px; }
.deal-card-client .conversation-avatar { width: 37px; height: 37px; border-radius: 12px; font-size: 11px; }
.deal-card-client > span:last-child { min-width: 0; max-width: 100%; flex: 1; overflow: hidden; }
.deal-card-client strong, .deal-card-client small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card-client strong { font-size: 11px; }
.deal-card-client small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.deal-card-meta, .deal-card-field { display: block; margin-top: 8px; overflow: hidden; color: #77756e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.deal-card-field { margin-top: 4px; color: #a7b181; }
.deal-card-session { display: block; margin-top: 8px; padding: 7px 8px; overflow: hidden; border-radius: 8px; background: rgba(217,255,87,.055); color: #bdcb8a; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.deal-card-session.muted { background: rgba(255,255,255,.025); color: var(--muted); }
.deal-stage-select { width: calc(100% - 18px); min-height: 35px; margin: 0 9px 9px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #151514; color: #bdb9af; font-size: 9px; }
.deal-column-empty { margin: auto; padding: 30px 12px; color: #68665f; font-size: 10px; text-align: center; }
.incremental-load { width: 100%; min-height: 42px; flex: 0 0 auto; border: 1px dashed #41413b; border-radius: 11px; background: rgba(255,255,255,.018); color: #929087; cursor: pointer; font-size: 9px; font-weight: 750; }
.incremental-load:hover { border-color: rgba(217,255,87,.34); color: #c8d69b; }
.conversation-load-more { width: calc(100% - 4px); margin: 5px 2px 9px; }
.deals-empty { position: absolute; left: 50%; top: 58%; color: var(--muted); font-size: 12px; pointer-events: none; transform: translate(-50%, -50%); }
.deal-dialog .calendar-form-actions .secondary-button { flex: none; }

.updates-panel {
  width: 100%; max-width: 100%; height: 100%; min-width: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
  background: rgba(10, 10, 10, .72);
}
.today-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.today-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.today-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.today-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.today-heading p:last-child { margin:8px 0 0; color:var(--muted); font-size:10px; }
.today-filters { margin-top:18px; padding:12px; display:grid; grid-template-columns:minmax(160px,260px) minmax(180px,300px) auto; align-items:end; gap:10px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.today-filters label { min-width:0; display:grid; gap:6px; }
.today-filters label span { color:var(--muted); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.today-filters select { width:100%; min-width:0; min-height:40px; padding:0 10px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); color:var(--text); }
.today-next { margin-top:14px; padding:15px 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid rgba(217,255,87,.38); border-radius:14px; background:linear-gradient(120deg,rgba(217,255,87,.10),var(--surface)); }
.today-next > span { min-width:0; display:grid; gap:4px; }
.today-next small { color:var(--accent); font-size:8px; font-weight:850; letter-spacing:.09em; text-transform:uppercase; }
.today-next strong { font-size:15px; }
.today-next span span { overflow:hidden; color:var(--muted); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.today-grid { margin-top:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:start; }
.today-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.today-card.tone-urgent,.today-card.tone-danger { border-color:rgba(255,126,110,.25); }
.today-card.tone-warning,.today-card.tone-attention { border-color:rgba(240,179,109,.25); }
.today-card.tone-money { border-color:rgba(217,255,87,.24); }
.today-card-heading { padding:13px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line-soft); }
.today-card-heading > span { min-width:0; display:grid; gap:4px; }
.today-card-heading strong { font-size:12px; }
.today-card-heading small { color:var(--muted); font-size:8px; }
.today-card-heading b { min-width:31px; height:31px; display:grid; place-items:center; border-radius:9px; background:rgba(217,255,87,.08); color:var(--accent); font-size:13px; }
.today-card-list { padding:7px; display:grid; gap:5px; }
.today-card-list > p { margin:0; padding:18px 10px; color:var(--muted); font-size:9px; text-align:center; }
.today-item { width:100%; min-width:0; padding:10px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:0; border-radius:9px; background:transparent; color:var(--text); cursor:pointer; text-align:left; }
.today-item:hover { background:var(--surface-2); }
.today-item > span:first-child { min-width:0; display:grid; gap:4px; }
.today-item strong,.today-item small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.today-item strong { font-size:10px; }
.today-item small { color:var(--muted); font-size:8px; }
.today-item-meta { flex:none; color:var(--accent); font-size:9px; font-weight:800; }
.today-empty { margin-top:14px; padding:28px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); text-align:center; }
.today-card-heading strong { font-size:14px; }
.today-card-heading small { font-size:11px; line-height:1.4; }
.today-item { min-height:60px; padding:12px; align-items:flex-start; }
.today-item strong { font-size:13px; }
.today-item small { font-size:11px; line-height:1.45; }
.today-item .today-item-hint { white-space:normal; overflow-wrap:anywhere; }
.today-item.is-urgent { border-left:3px solid var(--accent); background:var(--surface-2); }
.today-item-meta { display:grid; justify-items:end; gap:8px; font-size:12px; }
.today-item-meta small { color:var(--accent); font-size:10px; white-space:nowrap; }
.today-card-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-top:1px solid var(--line-soft); }
.today-card-footer > small { color:var(--muted); font-size:11px; }
.today-card-footer .secondary-button { min-height:40px; }
.today-item:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.calendar-agenda-event.today-target { outline:3px solid var(--accent); outline-offset:-3px; }
.marketing-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.marketing-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.marketing-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.marketing-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.marketing-heading p:last-child { max-width:680px; margin:8px 0 0; color:var(--muted); font-size:10px; line-height:1.5; }
.mailing-layout { margin-top:18px; display:grid; grid-template-columns:minmax(230px,300px) minmax(0,1fr); gap:14px; align-items:start; }
.mailing-sidebar,.mailing-form { min-width:0; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.mailing-sidebar { position:sticky; top:0; padding:14px; }
.mailing-form { padding:18px; display:grid; gap:15px; }
.mailing-form > label,.mailing-test-card > label,.mailing-filter-card > label { min-width:0; display:grid; gap:7px; color:#bdb9af; font-size:10px; font-weight:750; }
.mailing-form input:not([type="checkbox"]),.mailing-form textarea { width:100%; min-width:0; border:1px solid var(--line); border-radius:11px; background:#1a1c18; color:var(--text); outline:0; font:inherit; }
.mailing-form input:not([type="checkbox"]) { min-height:44px; padding:0 12px; }
.mailing-form textarea { min-height:126px; padding:12px; line-height:1.45; resize:vertical; }
.mailing-form input:focus,.mailing-form textarea:focus { border-color:rgba(217,255,87,.52); box-shadow:0 0 0 2px rgba(217,255,87,.08); }
.mailing-campaign-list { margin-top:12px; display:grid; gap:8px; }
.mailing-campaign-card { width:100%; min-width:0; padding:11px; display:grid; gap:7px; border:1px solid var(--line-soft); border-radius:11px; background:#151714; color:var(--text); cursor:pointer; text-align:left; }
.mailing-campaign-card.active { border-color:rgba(217,255,87,.42); background:#192013; box-shadow:inset 3px 0 var(--accent); }
.mailing-campaign-card > span { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mailing-campaign-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mailing-campaign-card i { flex:none; color:var(--muted); font-size:8px; font-style:normal; }
.mailing-campaign-card i[data-status="scheduled"] { color:#d7e9a0; }
.mailing-campaign-card i[data-status="failed"] { color:#ff9e90; }
.mailing-campaign-card small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.mailing-filter-card,.mailing-preview-card,.mailing-test-card,.mailing-image-block { min-width:0; padding:14px; border:1px solid var(--line-soft); border-radius:12px; background:#141613; }
.mailing-filter-card.exclude { border-color:rgba(255,158,144,.18); }
.mailing-filter-heading,.mailing-image-block > div:first-child,.mailing-test-card > div:first-child { display:grid; gap:4px; }
.mailing-filter-heading small,.mailing-image-block small,.mailing-test-card small { color:var(--muted); font-size:8px; line-height:1.4; }
.mailing-filter-groups { margin-top:12px; display:grid; gap:12px; }
.mailing-filter-group { min-width:0; margin:0; padding:0; border:0; }
.mailing-filter-group legend { margin-bottom:7px; color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.mailing-filter-choices,.mailing-variables,.mailing-selected-recipients { display:flex; flex-wrap:wrap; gap:6px; }
.mailing-filter-chip { cursor:pointer; }
.mailing-filter-chip input { position:absolute; opacity:0; pointer-events:none; }
.mailing-filter-chip span,.mailing-variable,.mailing-selected-recipient { min-height:31px; padding:0 10px; display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; background:#171915; color:var(--muted); font-size:9px; font-weight:750; }
.mailing-filter-chip input:checked + span { border-color:var(--accent); background:var(--accent); color:var(--accent-ink); }
.mailing-variables { margin-top:-7px; }
.mailing-variable { cursor:pointer; }
.mailing-selected-recipients { margin-top:8px; }
.mailing-selected-recipient { gap:6px; color:#c8d1aa; }
.mailing-selected-recipient button { width:20px; height:20px; padding:0; border:0; background:transparent; color:var(--muted); cursor:pointer; }
.mailing-recipient-search { max-height:230px; margin-top:5px; display:grid; gap:5px; overflow-y:auto; }
.mailing-recipient-result { width:100%; min-width:0; padding:9px 10px; display:grid; gap:3px; border:1px solid var(--line-soft); border-radius:9px; background:#171915; color:var(--text); cursor:pointer; text-align:left; }
.mailing-recipient-result span { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.mailing-image-block { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.mailing-image-block > .form-help { flex-basis:100%; margin:0; font-size:13px; line-height:1.5; color:var(--muted); }
.mailing-image-block > div:first-child { flex:1; min-width:180px; }
.mailing-image-preview { flex:1 1 100%; min-width:0; padding:8px; display:grid; grid-template-columns:54px minmax(0,1fr) auto; align-items:center; gap:9px; border:1px solid var(--line-soft); border-radius:10px; }
.mailing-image-preview img { width:54px; height:54px; object-fit:cover; border-radius:8px; }
.mailing-image-preview span { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.mailing-preview-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; }
.mailing-preview-card > div:first-child { display:grid; gap:4px; }
.mailing-preview-card span { color:var(--muted); font-size:8px; }
.mailing-preview-list { grid-column:1/-1; display:grid; gap:5px; }
.mailing-preview-list span { padding:7px 9px; border-radius:8px; background:rgba(255,255,255,.025); }
.mailing-test-card { display:grid; gap:11px; }
.mailing-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.content-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.content-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.content-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.content-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.content-heading p:last-child { max-width:680px; margin:8px 0 0; color:var(--muted); font-size:10px; line-height:1.5; }
.content-tabs { margin-top:20px; display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.content-tabs::-webkit-scrollbar { display:none; }
.content-tabs button { min-height:38px; padding:0 18px; flex:none; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--muted); cursor:pointer; font-weight:800; }
.content-tabs button.active { border-color:rgba(217,255,87,.34); background:rgba(217,255,87,.08); color:var(--accent); }
.content-tab-pane { margin-top:18px; min-width:0; }
.content-post-layout,.content-search-layout,.content-community-layout { display:grid; grid-template-columns:minmax(230px,300px) minmax(0,1fr); gap:14px; align-items:start; }
.content-post-sidebar,.content-post-form,.content-source-sidebar,.content-search-main,.content-community-layout > div,.content-community-form { min-width:0; padding:16px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.content-post-sidebar,.content-source-sidebar { position:sticky; top:0; }
.content-post-form,.content-community-form { display:grid; gap:15px; }
.content-post-form > label,.content-community-form > label,.content-source-sidebar form > label { min-width:0; display:grid; gap:7px; color:#bdb9af; font-size:10px; font-weight:750; }
.content-post-form input:not([type="checkbox"]),.content-post-form select,.content-post-form textarea,.content-community-form input:not([type="checkbox"]),.content-community-form select,.content-source-sidebar input,.content-search-toolbar input,.content-search-toolbar select { width:100%; min-width:0; border:1px solid var(--line); border-radius:11px; background:#1a1c18; color:var(--text); outline:0; font:inherit; }
.content-post-form input:not([type="checkbox"]),.content-post-form select,.content-community-form input:not([type="checkbox"]),.content-community-form select,.content-source-sidebar input,.content-search-toolbar input,.content-search-toolbar select { min-height:44px; padding:0 12px; }
.content-post-form textarea { min-height:150px; padding:12px; line-height:1.45; resize:vertical; }
.content-post-form input:focus,.content-post-form select:focus,.content-post-form textarea:focus,.content-community-form input:focus,.content-community-form select:focus,.content-source-sidebar input:focus,.content-search-toolbar input:focus,.content-search-toolbar select:focus { border-color:rgba(217,255,87,.52); box-shadow:0 0 0 2px rgba(217,255,87,.08); }
.content-post-list,.content-source-list,.content-community-list { margin-top:12px; display:grid; gap:8px; }
.content-post-view-switch { margin-top:12px; padding:3px; display:grid; grid-template-columns:1fr 1fr; gap:3px; border:1px solid var(--line-soft); border-radius:10px; background:#10110f; }
.content-post-view-switch button { min-height:32px; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; font-size:9px; font-weight:800; }
.content-post-view-switch button.active { background:#23261f; color:var(--accent); }
.content-post-calendar { margin-top:12px; }
.content-post-calendar-header { display:grid; grid-template-columns:34px minmax(0,1fr) 34px; align-items:center; gap:5px; }
.content-post-calendar-header button { width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:9px; background:#171915; color:var(--text); cursor:pointer; }
.content-post-calendar-header strong { overflow:hidden; font-size:10px; text-align:center; text-overflow:ellipsis; text-transform:capitalize; white-space:nowrap; }
.content-post-calendar-weekdays,.content-post-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.content-post-calendar-weekdays { margin-top:10px; color:#777b70; font-size:7px; font-weight:800; text-align:center; text-transform:uppercase; }
.content-post-calendar-grid { margin-top:5px; }
.content-post-calendar-day,.content-post-calendar-spacer { min-width:0; aspect-ratio:1; }
.content-post-calendar-day { position:relative; padding:0; display:grid; place-items:center; border:1px solid var(--line-soft); border-radius:7px; background:#141613; color:#aaa79f; cursor:pointer; font-size:8px; }
.content-post-calendar-day:hover,.content-post-calendar-day.today { border-color:rgba(217,255,87,.35); color:var(--accent); }
.content-post-calendar-day.has-posts { background:#202717; color:#e3edc2; }
.content-post-calendar-day span { position:absolute; right:2px; bottom:2px; min-width:13px; height:13px; padding:0 3px; display:grid; place-items:center; border-radius:999px; background:var(--accent); color:#111; font-size:6px; font-weight:900; }
.content-post-card,.content-community-card { width:100%; min-width:0; padding:11px; display:grid; gap:7px; border:1px solid var(--line-soft); border-radius:11px; background:#151714; color:var(--text); cursor:pointer; text-align:left; }
.content-post-card.active { border-color:rgba(217,255,87,.42); background:#192013; box-shadow:inset 3px 0 var(--accent); }
.content-post-card > span { min-width:0; display:flex; justify-content:space-between; gap:8px; }
.content-post-card strong,.content-community-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.content-post-card i { flex:none; color:var(--muted); font-size:8px; font-style:normal; }
.content-post-card i[data-status="scheduled"],.content-post-card i[data-status="published"] { color:#cbe58c; }
.content-post-card i[data-status="failed"] { color:#ff9e90; }
.content-post-card small,.content-community-card span { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.content-image-block { min-width:0; padding:14px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; border:1px solid var(--line-soft); border-radius:12px; background:#141613; }
.content-image-block > div:first-child { flex:1; min-width:180px; display:grid; gap:4px; }
.content-image-block small { color:var(--muted); font-size:8px; }
.content-image-preview { width:100%; display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:8px; }
.content-image-card { position:relative; min-width:0; aspect-ratio:1; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#0e0f0d; }
.content-image-card img { width:100%; height:100%; display:block; object-fit:cover; }
.content-image-remove { position:absolute; top:6px; right:6px; width:28px; height:28px; padding:0; border:1px solid rgba(255,255,255,.2); border-radius:9px; background:rgba(8,8,8,.78); color:#fff; cursor:pointer; }
.content-post-actions { display:flex; flex-wrap:wrap; gap:9px; }
.content-source-sidebar > div:first-child,.content-community-layout > div > div:first-child { display:grid; gap:5px; }
.content-source-sidebar h3,.content-community-layout h3 { margin:3px 0 0; font-size:20px; }
.content-source-sidebar p:last-child,.content-community-layout p:last-child { margin:0; color:var(--muted); font-size:9px; line-height:1.45; }
.content-auth-card { margin-top:14px; padding:12px; display:grid; gap:10px; border:1px solid rgba(217,255,87,.24); border-radius:12px; background:rgba(217,255,87,.035); }
.content-auth-card > div { min-width:0; display:grid; gap:4px; }
.content-auth-card strong { font-size:10px; }
.content-auth-card span { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.content-auth-card[data-configured="true"] span { color:#bdd886; }
.content-auth-card > label { min-width:0; display:grid; gap:7px; color:#bdb9af; font-size:9px; font-weight:750; }
.content-auth-card p { margin:0; color:#7d7b74; font-size:8px; line-height:1.45; }
.content-auth-connect { width:100%; }
.content-auth-details { overflow:hidden; border:1px solid var(--line-soft); border-radius:10px; background:#121411; }
.content-auth-details summary { padding:10px 11px; color:#bdb9af; font-size:9px; font-weight:800; cursor:pointer; list-style:none; }
.content-auth-details summary::-webkit-details-marker { display:none; }
.content-auth-details summary::after { content:"+"; float:right; color:var(--muted); font-size:13px; line-height:.75; }
.content-auth-details[open] summary::after { content:"−"; }
.content-auth-details-body { padding:0 10px 10px; display:grid; gap:9px; }
.content-auth-details label { min-width:0; display:grid; gap:7px; color:#bdb9af; font-size:9px; font-weight:750; }
.content-auth-details input[readonly] { color:#85837c; font-size:8px; }
.content-source-sidebar form { margin-top:14px; display:grid; gap:11px; }
.content-source-card { min-width:0; padding:10px; display:flex; align-items:center; justify-content:space-between; gap:8px; border:1px solid var(--line-soft); border-radius:10px; background:#151714; }
.content-source-card > div { min-width:0; display:grid; gap:4px; }
.content-source-card strong,.content-source-card span,.content-source-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.content-source-card span,.content-source-card small { color:var(--muted); font-size:8px; }
.content-source-card small { color:#77756e; }
.content-search-main { padding:14px; }
.content-search-toolbar { display:grid; grid-template-columns:minmax(150px,.8fr) minmax(180px,1.4fr) auto auto; align-items:center; gap:8px; }
.content-search-toolbar .checkbox-row { margin:0; white-space:nowrap; }
.content-search-results { margin-top:12px; display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px; }
.content-search-card { min-width:0; overflow:hidden; border:1px solid var(--line-soft); border-radius:13px; background:#151714; }
.content-search-gallery { height:180px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:minmax(0,1fr); gap:2px; background:#0b0c0a; }
.content-search-gallery img { width:100%; height:100%; min-height:0; object-fit:cover; }
.content-search-gallery img:only-child { grid-column:1/-1; grid-row:1/3; }
.content-search-card-body { padding:12px; display:grid; gap:10px; }
.content-search-card-body small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.content-search-card-body p { max-height:7.4em; margin:0; overflow:hidden; color:#c5c2b9; font-size:10px; line-height:1.48; }
.content-search-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.content-source-link { padding:7px 4px; color:#aeba88; text-decoration:none; }
.content-community-layout { grid-template-columns:minmax(0,1fr) minmax(260px,380px); }
.content-community-list { grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); }
.content-empty { margin:0; padding:24px 12px; color:var(--muted); font-size:9px; line-height:1.5; text-align:center; }
.content-search-empty { grid-column:1/-1; padding:60px 18px; border:1px dashed var(--line); border-radius:12px; }
.employee-dialog-results { max-height:230px; margin-top:-8px; display:grid; gap:6px; overflow-y:auto; }
.employee-dialog-result { width:100%; min-width:0; padding:9px 10px; display:grid; gap:3px; border:1px solid var(--line-soft); border-radius:9px; background:#171915; color:var(--text); cursor:pointer; text-align:left; }
.employee-dialog-result span { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.employee-dialog-selected { padding:10px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid rgba(217,255,87,.24); border-radius:10px; background:rgba(217,255,87,.05); }
.employee-dialog-selected > span { min-width:0; overflow:hidden; color:#c9d4a5; text-overflow:ellipsis; white-space:nowrap; }
.statistics-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.statistics-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.statistics-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.statistics-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.statistics-heading p:last-child { margin:8px 0 0; color:var(--muted); font-size:10px; }
.statistics-filters { margin:18px 0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; gap:9px; }
.statistics-filters label { min-width:0; display:grid; gap:6px; color:var(--muted); font-size:9px; font-weight:750; }
.statistics-filters input,
.statistics-filters select { width:100%; min-width:0; height:44px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--text); }
.statistics-show-button { min-height:44px; padding-inline:20px; grid-column:1/-1; }
.statistics-empty { min-height:220px; padding:30px; display:grid; place-items:center; border:1px dashed var(--line); border-radius:14px; color:var(--muted); font-size:10px; text-align:center; }
.statistics-results { display:grid; gap:14px; }
.statistics-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.statistics-summary article { min-width:0; padding:15px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.statistics-summary span,
.statistics-summary strong { display:block; }
.statistics-summary span { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.12em; }
.statistics-summary strong { margin-top:8px; overflow:hidden; color:var(--accent); font-size:20px; text-overflow:ellipsis; white-space:nowrap; }
.statistics-chart-card,
.statistics-list-card { min-width:0; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.statistics-card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.statistics-card-heading h3 { margin:0; font-size:14px; }
.statistics-card-heading small { color:var(--muted); font-size:8px; }
.statistics-chart { height:220px; min-width:0; margin-top:14px; padding:12px 4px 0; display:flex; align-items:stretch; gap:6px; overflow-x:auto; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); }
.statistics-chart-column { height:100%; min-width:26px; flex:1 0 26px; display:grid; grid-template-rows:minmax(0,1fr) 22px; gap:5px; }
.statistics-chart-bars { min-height:0; display:flex; align-items:flex-end; justify-content:center; gap:2px; }
.statistics-chart-bar { width:8px; min-height:2px; border-radius:5px 5px 0 0; background:var(--accent); }
.statistics-chart-bar.vk { background:#5b8def; }
.statistics-chart-bar.avito { background:#42c8a5; }
.statistics-chart-bar.join { background:var(--accent); }
.statistics-chart-bar.leave { background:#d36d60; }
.statistics-chart-column > small { overflow:hidden; color:var(--muted); font-size:7px; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.statistics-chart-empty { width:100%; display:grid; place-items:center; color:var(--muted); font-size:9px; }
.statistics-chart-legend { display:flex; flex-wrap:wrap; gap:12px; color:var(--muted); font-size:8px; }
.statistics-chart-legend span { display:flex; align-items:center; gap:5px; }
.statistics-chart-legend i { width:8px; height:8px; display:block; border-radius:3px; background:var(--accent); }
.statistics-chart-legend i.vk { background:#5b8def; }
.statistics-chart-legend i.avito { background:#42c8a5; }
.statistics-chart-legend i.leave { background:#d36d60; }
.statistics-breakdowns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.statistics-list { margin-top:12px; display:grid; gap:7px; }
.statistics-list-row { min-width:0; padding:10px 11px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--line-soft); border-radius:10px; background:rgba(255,255,255,.015); color:inherit; text-decoration:none; }
.statistics-list-row > span { min-width:0; display:grid; gap:3px; }
.statistics-list-row strong { overflow:hidden; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.statistics-list-row small { color:var(--muted); font-size:8px; }
.statistics-list-values { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; color:var(--muted); font-size:8px; white-space:nowrap; }
.statistics-list-values b { color:var(--text); }
.statistics-cohort-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.statistics-cohort-note { max-width:980px; margin:10px 0 0; color:var(--muted); font-size:9px; line-height:1.55; }
.statistics-cohort-kpis { margin-top:14px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.statistics-cohort-kpis article { min-width:0; padding:13px; border:1px solid var(--line-soft); border-radius:11px; background:rgba(255,255,255,.018); }
.statistics-cohort-kpis span,.statistics-cohort-kpis strong,.statistics-cohort-kpis small { display:block; }
.statistics-cohort-kpis span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.statistics-cohort-kpis strong { margin-top:7px; color:var(--accent); font-size:18px; }
.statistics-cohort-kpis small { margin-top:4px; color:var(--muted); font-size:7px; line-height:1.4; }
.statistics-funnel { margin-top:14px; display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; }
.statistics-funnel article { min-width:0; padding:12px; display:grid; gap:8px; border:1px solid var(--line-soft); border-radius:11px; background:rgba(255,255,255,.012); }
.statistics-funnel article > div:first-child { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.statistics-funnel strong { overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.statistics-funnel b { color:var(--accent); font-size:15px; }
.statistics-funnel article > div:nth-child(2) { height:7px; overflow:hidden; border-radius:999px; background:color-mix(in srgb,var(--line) 58%,transparent); }
.statistics-funnel article > div:nth-child(2) i { height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,color-mix(in srgb,var(--accent) 72%,#79910d),var(--accent)); }
.statistics-funnel small { min-height:2.8em; color:var(--muted); font-size:7px; line-height:1.4; }
.statistics-table-wrap { width:100%; margin-top:13px; overflow-x:auto; border:1px solid var(--line-soft); border-radius:11px; }
.statistics-cohort-table { width:100%; min-width:880px; border-collapse:collapse; font-size:8px; }
.statistics-cohort-table th,.statistics-cohort-table td { padding:10px 11px; border-bottom:1px solid var(--line-soft); color:var(--muted); text-align:right; white-space:nowrap; }
.statistics-cohort-table th { background:color-mix(in srgb,var(--surface) 88%,var(--line)); color:var(--text); font-size:7px; letter-spacing:.06em; text-transform:uppercase; }
.statistics-cohort-table th:first-child,.statistics-cohort-table td:first-child { position:sticky; left:0; z-index:1; min-width:145px; background:var(--surface); color:var(--text); font-weight:800; text-align:left; }
.statistics-cohort-table th:first-child { z-index:2; background:color-mix(in srgb,var(--surface) 88%,var(--line)); }
.statistics-cohort-table tr:last-child td { border-bottom:0; }
.statistics-table-empty { padding:26px !important; color:var(--muted) !important; text-align:center !important; }
.statistics-dimension-tabs { margin-top:13px; display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; }
.statistics-dimension-tabs::-webkit-scrollbar { display:none; }
.statistics-dimension-tabs button { min-height:34px; padding:0 13px; flex:0 0 auto; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--muted); font-size:8px; font-weight:800; }
.statistics-dimension-tabs button.active { border-color:color-mix(in srgb,var(--accent) 40%,var(--line)); background:color-mix(in srgb,var(--accent) 10%,transparent); color:var(--accent); }
.statistics-definitions { padding:14px 16px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.statistics-definitions summary { color:var(--text); font-size:9px; font-weight:850; cursor:pointer; }
.statistics-definitions > div { margin-top:11px; display:grid; gap:8px; }
.statistics-definitions p { margin:0; color:var(--muted); font-size:8px; line-height:1.5; }
.statistics-definitions strong { color:var(--text); }
.reports-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.reports-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.reports-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.reports-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.reports-heading p:last-child { margin:8px 0 0; color:var(--muted); font-size:10px; }
.reports-subnav { margin-top:20px; display:flex; gap:8px; }
.reports-subnav button { min-height:38px; padding:0 18px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--muted); font-weight:800; }
.reports-subnav button.active { border-color:rgba(217,255,87,.34); background:rgba(217,255,87,.08); color:var(--accent); }
.reports-filters { margin:14px 0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.reports-filters label { min-width:0; display:grid; gap:6px; color:var(--muted); font-size:9px; font-weight:750; }
.reports-filters input,.reports-filters select { width:100%; min-width:0; height:44px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--text); }
.reports-show-button { min-height:44px; grid-column:1 / -1; }
.reports-summary { margin:16px 0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
#reports-clients-pane > .form-help { margin:8px 0; font-size:13px; line-height:1.5; color:var(--muted); }
.reports-summary article { min-width:0; padding:15px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.reports-summary span,.reports-summary strong { display:block; }
.reports-summary span { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.12em; }
.reports-summary strong { margin-top:8px; overflow:hidden; color:var(--accent); font-size:18px; text-overflow:ellipsis; white-space:nowrap; }
.reports-list { display:grid; gap:9px; }
.report-client-card { min-width:0; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.report-client-card.linked-dialog { cursor:pointer; }
.report-client-card.linked-dialog:hover { border-color:rgba(217,255,87,.35); }
.report-client-card.attention { border-color:rgba(255,171,96,.55); box-shadow:inset 3px 0 0 #ffab60; }
.report-client-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.report-client-heading time,.report-client-heading strong { display:block; }
.report-client-heading time { color:var(--muted); font-size:9px; }
.report-client-heading strong { margin-top:4px; font-size:14px; }
.report-client-heading b { color:var(--accent); font-size:14px; white-space:nowrap; }
.report-client-main { margin-top:13px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.report-client-main span { min-width:0; }
.report-client-main small,.report-client-main strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-client-main small { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.report-client-main strong { margin-top:4px; color:#d6d2c7; font-size:10px; }
.report-client-meta { margin-top:13px; color:var(--muted); font-size:9px; line-height:1.45; }
.report-client-card > p { margin:10px 0 0; padding-top:10px; border-top:1px solid var(--line-soft); color:#aaa79f; font-size:9px; line-height:1.5; }
.report-visit-badge { width:max-content; margin-top:10px; padding:5px 8px; display:block; border:1px solid var(--line); border-radius:999px; color:var(--muted); font-size:8px; font-weight:800; }
.report-client-card .report-attention-note { color:#ffbd7f; }
.report-delete-button { margin-top:12px; padding:8px 0 0; border:0; border-top:1px solid var(--line-soft); background:transparent; color:#d6978b; font-size:9px; cursor:pointer; }
.reports-cashbox-form { margin:0 0 16px; padding:14px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.reports-cashbox-form label { display:grid; gap:6px; color:var(--muted); font-size:9px; font-weight:750; }
.reports-cashbox-form input { min-width:0; height:44px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--text); }
.cashbox-report-card { min-width:0; padding:16px; display:grid; grid-template-columns:minmax(160px,.8fr) minmax(0,1.5fr); gap:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.cashbox-report-card > div > span,.cashbox-report-card > div > strong { display:block; }
.cashbox-report-card > div > span { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.cashbox-report-card > div > strong { margin-top:5px; font-size:14px; }
.cashbox-report-values { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.cashbox-report-values span { padding:9px; border:1px solid var(--line-soft); border-radius:10px; }
.cashbox-report-values b { margin-top:4px; display:block; color:var(--accent); font-size:11px; }
.cashbox-report-card > p { grid-column:1/-1; margin:0; color:#ffbd7f; font-size:10px; font-weight:800; }
.finance-period-card { margin:0 0 14px; padding:15px; display:flex; align-items:center; justify-content:space-between; gap:16px; border:1px solid rgba(217,255,87,.28); border-radius:14px; background:linear-gradient(135deg,rgba(217,255,87,.075),var(--surface)); }
.finance-period-card.closed { border-color:rgba(255,171,96,.38); background:linear-gradient(135deg,rgba(255,171,96,.07),var(--surface)); }
.finance-period-card > div { min-width:0; display:grid; gap:5px; }
.finance-period-badge { width:max-content; padding:5px 8px; border-radius:999px; background:rgba(217,255,87,.12); color:var(--accent); font-size:8px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.finance-period-card.closed .finance-period-badge { background:rgba(255,171,96,.12); color:#ffbd7f; }
.finance-period-card strong { font-size:13px; }
.finance-period-card small { color:var(--muted); font-size:9px; line-height:1.45; }
.finance-management { margin:18px 0; display:grid; gap:12px; }
.finance-section-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; }
.finance-section-heading h3 { margin:5px 0 0; font-size:18px; }
.finance-section-heading > p { max-width:480px; margin:0; color:var(--muted); font-size:9px; line-height:1.5; text-align:right; }
.finance-operation-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:10px; }
.finance-operation-card { min-width:0; padding:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.finance-operation-card > div,.finance-operation-card .wide { grid-column:1/-1; }
.finance-operation-card > div { display:grid; gap:4px; }
.finance-operation-card > div span { color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.finance-operation-card > div strong { font-size:14px; }
.finance-operation-card label { min-width:0; display:grid; gap:6px; color:var(--muted); font-size:9px; font-weight:750; }
.finance-operation-card :is(input,select) { width:100%; min-width:0; height:42px; padding:0 11px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text); }
.finance-operation-card.finance-form-disabled { opacity:.55; }
.finance-operation-card.finance-form-disabled::after { grid-column:1/-1; content:"Выбранный период закрыт"; color:#ffbd7f; font-size:9px; font-weight:800; }
.finance-adjustments-section { margin:18px 0; }
.finance-frozen-commission { color:var(--muted) !important; font-weight:700 !important; }
.cashbox-report-card .finance-post-close-adjustment { color:var(--accent); }
.finance-close-dialog { width:min(560px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:0; overflow:auto; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--text); }
.finance-close-dialog::backdrop { background:rgba(0,0,0,.7); backdrop-filter:blur(4px); }
.finance-close-form { padding:22px; display:grid; gap:16px; }
.finance-close-form > p { margin:0; color:var(--muted); font-size:10px; line-height:1.6; }
.finance-close-form > label { display:grid; gap:7px; color:var(--muted); font-size:9px; font-weight:750; }
.finance-close-form textarea { width:100%; min-width:0; padding:11px; resize:vertical; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text); }
.finance-close-actions { display:grid; grid-template-columns:1fr 1.25fr; gap:9px; }
.booking-payment-facts,.booking-finance-details { width:100%; min-width:0; margin-top:14px; padding:12px; display:grid; gap:11px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.018); }
.booking-payment-date-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.booking-payment-date-grid label { min-width:0; display:grid; gap:6px; color:#cbc7bd; font-size:9px; font-weight:750; }
.booking-payment-date-grid input { width:100%; min-width:0; max-width:100%; }
.booking-finance-snapshots { display:grid; gap:7px; }
.booking-finance-payment-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.booking-finance-payment-summary span,.booking-finance-snapshots article { min-width:0; padding:9px; border:1px solid var(--line-soft); border-radius:9px; background:var(--surface-2); }
.booking-finance-payment-summary span { display:grid; gap:4px; color:var(--muted); font-size:8px; }
.booking-finance-payment-summary b { overflow:hidden; color:var(--text); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.booking-finance-snapshots article { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; }
.booking-finance-snapshots article span,.booking-finance-snapshots article small { color:var(--muted); font-size:8px; }
.booking-finance-snapshots article strong { color:var(--accent); font-size:10px; white-space:nowrap; }
.booking-finance-snapshots article small { grid-column:1/-1; }
.booking-finance-snapshots > p { margin:0; color:var(--muted); font-size:9px; line-height:1.45; }
.expenses-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.expenses-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.expenses-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.expenses-heading h2 { margin:7px 0; font-size:28px; } .expenses-heading > div > strong { color:var(--accent); font-size:18px; }
.expenses-heading-actions { display:flex; gap:8px; }
.expenses-filters { margin:20px 0 14px; display:grid; grid-template-columns:repeat(2,minmax(0,240px)); gap:10px; }
.expenses-list { display:grid; gap:9px; }
.expense-card { width:100%; padding:16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--text); text-align:left; cursor:pointer; }
.expense-card span,.expense-card strong,.expense-card small,.expense-card i { min-width:0; display:block; } .expense-card small,.expense-card i { margin-top:5px; color:var(--muted); font-size:10px; font-style:normal; } .expense-card b { color:var(--accent); white-space:nowrap; }
.training-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.training-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.training-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.training-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.training-heading p:last-child { margin:8px 0 0; color:var(--muted); font-size:10px; }
.training-subnav { margin-top:20px; display:flex; gap:8px; }
.training-subnav button { min-height:38px; padding:0 18px; border:1px solid rgba(217,255,87,.34); border-radius:999px; background:rgba(217,255,87,.08); color:var(--accent); font-weight:800; }
.training-guide { width:min(100%,980px); margin:24px auto 0; display:grid; gap:18px; }
.training-guide-intro { padding:22px; display:grid; grid-template-columns:minmax(0,.8fr) minmax(260px,1.2fr); align-items:end; gap:20px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(135deg,rgba(217,255,87,.08),var(--surface) 54%); }
.training-guide-intro > div { position:relative; padding-left:54px; }
.training-guide-number { position:absolute; left:0; top:0; color:var(--accent); font-size:34px; font-weight:900; line-height:1; opacity:.8; }
.training-guide-intro h3 { margin:7px 0 0; font-size:24px; }
.training-guide-intro > p { margin:0; color:var(--muted); font-size:11px; line-height:1.65; }
.training-guide-section { margin-top:8px; border-color:rgba(217,255,87,.34); background:linear-gradient(135deg,rgba(217,255,87,.12),var(--surface) 58%); }
.training-step { padding:20px; display:grid; grid-template-columns:minmax(210px,300px) minmax(0,1fr); align-items:center; gap:26px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.training-step.reverse { grid-template-columns:minmax(0,1fr) minmax(210px,300px); }
.training-step.reverse .training-shot { grid-column:2; }
.training-step.reverse .training-step-copy { grid-column:1; grid-row:1; }
.training-shot { width:100%; max-width:280px; margin:auto; padding:9px; display:grid; gap:8px; border:1px solid var(--line); border-radius:20px; background:#090a09; color:var(--muted); cursor:zoom-in; text-align:center; }
.training-shot img { width:100%; aspect-ratio:390/844; display:block; border-radius:13px; object-fit:cover; object-position:top; background:#0c0d0b; }
.training-shot span { padding:2px 4px 4px; font-size:8px; font-weight:750; }
.training-step-index { color:var(--accent); font-size:9px; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
.training-step-copy h4 { margin:8px 0 0; font-size:20px; }
.training-step-copy ol { margin:15px 0 0; padding-left:20px; display:grid; gap:9px; color:var(--muted); font-size:11px; line-height:1.55; }
.training-step-copy strong { color:var(--text); }
.training-note { margin:15px 0 0; padding:11px 13px; border-left:3px solid var(--accent); border-radius:0 10px 10px 0; background:rgba(217,255,87,.055); color:var(--muted); font-size:10px; line-height:1.5; }
.training-checklist { padding:22px; display:grid; grid-template-columns:minmax(190px,.65fr) minmax(0,1.35fr); gap:20px; border:1px solid rgba(217,255,87,.26); border-radius:18px; background:rgba(217,255,87,.045); }
.training-checklist h4 { margin:8px 0 0; font-size:19px; }
.training-checklist ul { margin:0; padding-left:19px; display:grid; gap:8px; color:var(--muted); font-size:11px; line-height:1.55; }
.training-image-dialog { width:min(430px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:0; border:0; background:transparent; color:var(--text); }
.training-image-dialog::backdrop { background:rgba(0,0,0,.88); backdrop-filter:blur(7px); }
.training-image-sheet { padding:14px; display:grid; gap:12px; border:1px solid var(--line); border-radius:20px; background:#10110e; }
.training-image-sheet header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.training-image-sheet h2 { margin:0; font-size:14px; }
.training-image-sheet header button { width:36px; height:36px; border:0; background:transparent; color:var(--muted); font-size:24px; cursor:pointer; }
.training-image-sheet img { width:100%; max-height:calc(100dvh - 140px); display:block; border-radius:13px; object-fit:contain; background:#080908; }
.training-image-sheet .secondary-button { display:grid; place-items:center; text-decoration:none; }
.estimation-panel { width:100%; max-width:100%; height:100%; min-width:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; background:rgba(10,10,10,.72); }
.estimation-content { min-height:0; padding:26px; overflow-y:auto; overscroll-behavior:contain; }
.estimation-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.estimation-heading > div { min-width:0; }
.estimation-heading h2 { margin:8px 0 0; font-size:clamp(24px,4vw,38px); }
.estimation-heading p:last-child { max-width:720px; margin:8px 0 0; color:var(--muted); font-size:10px; line-height:1.55; }
.estimation-status-tabs { margin-top:18px; display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.estimation-status-tabs::-webkit-scrollbar { display:none; }
.estimation-status-tabs button { min-height:42px; padding:0 16px; display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font-weight:850; white-space:nowrap; }
.estimation-status-tabs button.active { border-color:rgba(217,255,87,.42); background:rgba(217,255,87,.1); color:var(--accent); }
.estimation-status-tabs span { min-width:24px; height:24px; padding:0 7px; display:grid; place-items:center; border-radius:999px; background:rgba(255,255,255,.055); color:inherit; font-size:9px; }
.estimation-toolbar { margin:14px 0 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.estimation-toolbar p { margin:0; color:var(--muted); font-size:10px; line-height:1.5; }
.estimation-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.estimation-card { min-width:0; padding:12px; display:grid; gap:11px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.estimation-card-preview { position:relative; width:100%; padding:0; overflow:hidden; border:0; border-radius:12px; background:#090909; cursor:zoom-in; }
.estimation-card-preview img { width:100%; aspect-ratio:4/3; display:block; object-fit:cover; background:#0b0c0a; }
.estimation-card-preview span { position:absolute; right:8px; bottom:8px; padding:5px 8px; border-radius:999px; background:rgba(0,0,0,.74); color:#eee; font-size:8px; font-weight:800; }
.estimation-card.image-error .estimation-card-preview::before { content:"Изображение недоступно"; position:absolute; inset:0; z-index:1; display:grid; place-items:center; padding:12px; color:var(--muted); font-size:9px; text-align:center; }
.estimation-card.image-error .estimation-card-preview img { opacity:.08; }
.estimation-card-body { min-width:0; display:grid; gap:8px; }
.estimation-card-heading { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.estimation-card-heading strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.estimation-card-body > small { overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.estimation-status { flex:0 0 auto; padding:5px 8px; border-radius:999px; background:rgba(255,255,255,.055); color:var(--muted); font-size:7px; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }
.estimation-status-trained { background:rgba(217,255,87,.08); color:var(--accent); }
.estimation-status-archived { background:rgba(194,130,120,.08); color:#c19a92; }
.estimation-card-form { display:grid; gap:9px; }
.estimation-card label { display:grid; gap:6px; color:#b9b6ae; font-size:9px; font-weight:800; }
.estimation-card input,.estimation-card textarea { width:100%; min-width:0; padding:10px 11px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text); font-size:16px; }
.estimation-card input { height:44px; }
.estimation-card textarea { min-height:78px; resize:vertical; line-height:1.4; }
.estimation-card-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.estimation-card-actions button { min-height:42px; }
.estimation-archive-value,.estimation-archive-comment { margin:2px 0 0; color:#c9c6bd; font-size:9px; line-height:1.45; }
.estimation-archive-comment { color:var(--muted); white-space:pre-wrap; }
.estimation-card-action { width:100%; margin-top:4px; }
.estimation-empty { padding:32px 18px; border:1px dashed var(--line); border-radius:15px; color:var(--muted); text-align:center; }
.estimation-more { width:min(100%,360px); margin:18px auto 0; display:block; }
.inline-directory-form { padding:16px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.updates-header { padding: 20px 26px; border-bottom: 1px solid var(--line); background: rgba(14, 14, 13, .9); }
.updates-brand-row { max-width: 430px; }
.updates-brand-row h1 { margin: 4px 0 0; font-size: 22px; line-height: 1; letter-spacing: -.03em; }
.updates-header-actions { display: flex; align-items: center; gap: 8px; }
.updates-primary-nav { width: min(430px, 100%); }
.updates-content { min-height: 0; padding: 26px; overflow-y: auto; overscroll-behavior: contain; }
.updates-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.updates-heading h2 { margin: 8px 0 0; font-size: clamp(24px, 4vw, 38px); }
.updates-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.updates-list { margin-top: 24px; display: grid; gap: 12px; }
.update-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.update-card.latest { border-color: rgba(217,255,87,.34); background: linear-gradient(135deg, rgba(217,255,87,.065), var(--surface) 55%); }
.update-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.update-card-heading h3 { margin: 0; font-size: 16px; }
.update-card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.update-card-meta strong { color: var(--accent); }
.update-card ul { margin: 15px 0 0; padding-left: 19px; display: grid; gap: 8px; color: #cbc8c0; font-size: 10px; line-height: 1.5; }
.updates-empty { padding: 32px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }

.sections-dialog { width: min(480px, calc(100vw - 28px)); padding: 0; border: 0; background: transparent; color: var(--text); }
.sections-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.sections-sheet { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #11120f; box-shadow: var(--shadow); }
.sections-sheet-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.sections-sheet-heading h2 { margin: 8px 0 0; font-size: 24px; }
.sections-close { width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; }
.sections-help { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.sections-list { margin-top: 18px; display: grid; gap: 9px; }
.section-menu-card { padding: 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #171915; }
.section-menu-open { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.section-menu-open strong, .section-menu-open span { display: block; }
.section-menu-open strong { font-size: 13px; }
.section-menu-open span { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.section-menu-pin { min-width: 115px; }
.sections-empty { padding: 24px; color: var(--muted); text-align: center; }

.notification-dialog {
  width: min(430px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.notification-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(8px); }
.notification-card { position: relative; padding: 34px; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; line-height: 1; }
.dialog-close:hover { background: var(--surface-3); color: var(--text); }
.notification-illustration { width: 58px; height: 58px; margin-bottom: 24px; display: grid; place-items: center; border: 1px solid rgba(217, 255, 87, .35); border-radius: 19px; background: rgba(217, 255, 87, .08); color: var(--accent); }
.notification-card h2 { margin: 8px 0 10px; font-size: 24px; letter-spacing: -.04em; }
.notification-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.notification-steps { margin: 18px 0 0; padding-left: 21px; color: #c4c1b8; font-size: 13px; line-height: 1.55; }
.notification-steps li + li { margin-top: 8px; }
.notification-steps strong { color: var(--text); }
.dialog-action { margin-top: 24px; }

@media (max-width: 820px) {
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { min-width: 0; max-width: 100%; font-size: 16px !important; }
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); position: relative; }
  .dialogs-header { grid-column: 1; grid-row: 1; }
  .sidebar { position: relative; inset: auto; grid-column: 1; grid-row: 2; border: 0; }
  .chat-panel {
    position: absolute;
    inset: 0;
    grid-column: 1;
    grid-row: 1 / -1;
    width: 100%;
    max-width: 100%;
    height: 100%;
    z-index: 3;
  }
  .sidebar.mobile-hidden { display: none; }
  .workspace.mobile-chat-open { grid-template-rows: minmax(0, 1fr); }
  .workspace.mobile-chat-open .dialogs-header { display: none; }
  .chat-panel, .chat-panel.empty { display: none; }
  .chat-panel.mobile-visible { display: block; }
  .back-button { display: grid; }
  .chat-close-button { display: none; }
  .message { max-width: 86%; }
  .messages { padding: 20px 13px; }
  .typing-indicator { padding: 7px 13px; }
  .chat-header { padding: 12px; }
  .session-bar { padding: 8px 12px; }
  .message-history-tools { padding: 7px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .message-history-button { min-height: 36px; padding-inline: 9px; }
  .message-search-box { grid-column: 1 / -1; grid-row: 1; }
  .message-search-field { height: 38px; }
  .message-date-field { grid-column: 1; grid-row: 3; height: 36px; }
  .message-date-field input { width: 100%; }
  #message-older-button { grid-column: 1; grid-row: 2; }
  #message-latest-button { grid-column: 2; grid-row: 2; }
  #message-date-go { grid-column: 2; grid-row: 3; }
  .handoff-button { max-width: 112px; padding: 8px 9px; }
  .chat-secondary-button { min-height: 36px; padding: 0 9px; }
  .client-subline .line-chip { max-width: 100px; }
  .settings-dialog { width: 100%; height: 100%; border: 0; border-radius: 0; overscroll-behavior: none; }
  .settings-shell { width: 100%; max-width: 100%; overflow: hidden; }
  .settings-pane { display: block; overflow-y: auto; }
  .settings-general-shell { padding: 26px 18px calc(28px + env(safe-area-inset-bottom)); }
  .settings-list-column, .settings-form { overflow: visible; border-right: 0; }
  .settings-list-column { border-bottom: 1px solid var(--line); }
  .location-structure { padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); }
  .location-card-list { grid-template-columns: minmax(0, 1fr); }
  .automation-pane { display: block; }
  .automation-board-view { padding: 18px 18px 24px; }
  .automation-board-heading { align-items: stretch; flex-direction: column; }
  .automation-board-heading .secondary-button { width: 100%; }
  .automation-kanban { margin-inline: -18px; padding-inline: 18px; grid-auto-columns: calc(100vw - 36px); scroll-snap-type: x mandatory; }
  .automation-board-column { scroll-snap-stop: always; }
  .automation-row-controls { grid-template-columns: minmax(0, 1fr); }
  .automation-row-controls > label { grid-column: 1; }
  .automation-add-row, .automation-test-row { align-items: stretch; flex-direction: column; }
  .automation-add-row .secondary-button, .automation-test-row .secondary-button { width: 100%; }
  .automation-form-actions { position: sticky; bottom: 0; z-index: 2; margin: 18px -18px -24px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(16, 16, 15, .96); }
  .composer { padding: 10px 11px 12px; grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 6px; }
  .wait-shortcuts { left: 11px; right: auto; bottom: calc(100% + 7px); max-width: calc(100% - 22px); }
  .attach-button { width: 46px; height: 46px; }
  .quick-reply-button, .wait-shortcuts-toggle, .send-button { width: 46px; height: 46px; }
  .composer-field { min-height: 98px; }
  .composer textarea { min-height: 60px; }
  .attachment-preview { grid-column: 1 / -1; }
  .composer-note { display: none; }
  .workspace.calendar-mode .calendar-panel { display: grid; }
  .workspace.deals-mode .deals-panel { display: grid; }
  .workspace.today-mode .today-panel { display: grid; }
  .workspace.updates-mode .updates-panel { display: grid; }
  .workspace.statistics-mode .statistics-panel { display: grid; }
  .workspace.reports-mode .reports-panel { display: grid; }
  .workspace.expenses-mode .expenses-panel { display: grid; }
  .workspace.training-mode .training-panel { display: grid; }
  .workspace.estimation-mode .estimation-panel { display: grid; }
  .workspace.marketing-mode .marketing-panel { display: grid; }
  .workspace.content-mode .content-panel { display: grid; }
  .statistics-content { padding:18px 14px calc(30px + env(safe-area-inset-bottom)); }
  .statistics-heading { align-items:stretch; flex-direction:column; }
  .statistics-heading .secondary-button { width:100%; }
  .statistics-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .statistics-show-button { grid-column:1/-1; }
  .statistics-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .statistics-cohort-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .statistics-funnel { grid-template-columns:minmax(0,1fr); }
  .statistics-cohort-card,.statistics-chart-card,.statistics-list-card { padding:14px; }
  .statistics-card-heading { align-items:flex-start; flex-direction:column; }
  .statistics-breakdowns { grid-template-columns:minmax(0,1fr); }
  .statistics-list-row { align-items:flex-start; flex-direction:column; }
  .statistics-list-values { width:100%; justify-content:flex-start; }
  .reports-content { padding:18px 14px; }
  .reports-heading { align-items:stretch; flex-direction:column; }
  .reports-heading .secondary-button { width:100%; }
  .reports-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reports-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-client-main { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reports-cashbox-form,.cashbox-report-card { grid-template-columns:1fr; }
  .reports-cashbox-form button { width:100%; }
  .cashbox-report-values { grid-template-columns:1fr; }
  .finance-period-card,.finance-section-heading { align-items:stretch; flex-direction:column; }
  .finance-period-card > button { width:100%; }
  .finance-section-heading > p { max-width:none; text-align:left; }
  .finance-operation-grid { grid-template-columns:minmax(0,1fr); }
  .booking-payment-date-grid,.booking-finance-payment-summary { grid-template-columns:minmax(0,1fr); }
  .expenses-content { padding:18px 14px; }
  .training-content { padding:18px 14px calc(30px + env(safe-area-inset-bottom)); }
  .training-heading { align-items:stretch; flex-direction:column; }
  .training-heading .secondary-button { width:100%; }
  .training-guide { margin-top:18px; gap:14px; }
  .training-guide-intro,.training-checklist { grid-template-columns:minmax(0,1fr); }
  .training-step,.training-step.reverse { padding:14px; grid-template-columns:minmax(0,1fr); gap:18px; }
  .training-step.reverse .training-shot,.training-step.reverse .training-step-copy { grid-column:auto; grid-row:auto; }
  .training-shot { max-width:240px; }
  .marketing-content { padding:18px 14px calc(30px + env(safe-area-inset-bottom)); }
  .marketing-heading { align-items:stretch; flex-direction:column; }
  .marketing-heading .secondary-button { width:100%; }
  .mailing-layout { grid-template-columns:minmax(0,1fr); }
  .mailing-sidebar { position:static; }
  .mailing-form { padding:14px; }
  .mailing-preview-card { grid-template-columns:minmax(0,1fr); }
  .mailing-preview-card > * { grid-column:1; }
  .mailing-actions > button { width:100%; }
  .content-content { padding:18px 14px calc(30px + env(safe-area-inset-bottom)); }
  .content-heading { align-items:stretch; flex-direction:column; }
  .content-heading .secondary-button { width:100%; }
  .content-post-layout,.content-search-layout,.content-community-layout { grid-template-columns:minmax(0,1fr); }
  .content-post-sidebar,.content-source-sidebar { position:static; }
  .content-post-form,.content-post-sidebar,.content-source-sidebar,.content-search-main,.content-community-layout > div,.content-community-form { padding:14px; }
  .content-search-toolbar { grid-template-columns:minmax(0,1fr) auto; }
  .content-search-toolbar select,.content-search-toolbar input { grid-column:1/-1; }
  .content-search-toolbar .checkbox-row { grid-column:1; }
  .content-search-toolbar .secondary-button { grid-column:2; }
  .content-search-results { grid-template-columns:minmax(0,1fr); }
  .content-post-actions > button { width:100%; }
  .content-image-preview { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .training-step-copy h4 { font-size:18px; }
  .training-step-copy ol,.training-checklist ul { font-size:10px; }
  .estimation-content { padding:18px 14px calc(30px + env(safe-area-inset-bottom)); }
  .estimation-heading { align-items:stretch; flex-direction:column; }
  .estimation-heading .secondary-button { width:100%; }
  .estimation-toolbar { align-items:stretch; flex-direction:column; }
  .estimation-list { grid-template-columns:minmax(0,1fr); }
  .expenses-heading { align-items:stretch; flex-direction:column; }
  .expenses-heading-actions { display:grid; grid-template-columns:1fr 1fr; }
  .expenses-filters { grid-template-columns:1fr 1fr; }
  .expense-card { padding:14px; }
  .section-brand-row { max-width: none; grid-template-columns: auto minmax(0, 1fr) auto; }
  .section-header-actions { width: 76px; min-width: 76px; }
  .section-header-actions .settings-button { width: 36px; height: 36px; flex-basis: 36px; }
  .section-header-actions .sections-button { width: 36px; height: 36px; flex-basis: 36px; }
  .settings-header-actions .icon-button { width: 36px; height: 36px; flex-basis: 36px; }
  .calendar-header { padding: 17px 14px 13px; }
  .calendar-brand-row { width: 100%; max-width: 100%; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; }
  .calendar-header-actions { min-width: 0; flex: none; }
  .calendar-header-actions .icon-button { width: 36px; height: 36px; }
  .calendar-brand-row h1 { font-size: 19px; }
  .calendar-primary-nav { width: 100%; }
  .calendar-primary-nav button { min-width: 0; padding-inline: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-toolbar {
    padding: 12px 13px 13px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px 8px;
  }
  .calendar-period-controls {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 48px 32px minmax(64px, 1fr) 32px;
    gap: 5px;
  }
  .calendar-period-controls #calendar-today { grid-column: 1; grid-row: 1; }
  .calendar-period-controls #calendar-prev { grid-column: 2; grid-row: 1; }
  .calendar-period-controls #calendar-period { grid-column: 3; grid-row: 1; }
  .calendar-period-controls #calendar-next { grid-column: 4; grid-row: 1; }
  .calendar-period-controls .icon-button { width: 32px; height: 36px; }
  .calendar-today { width: 48px; min-height: 36px; padding: 0 3px; border: 1px solid var(--line); border-radius: 9px; background: #171915; font-size: 8px; }
  .calendar-back-month { grid-column: 1 / -1; grid-row: 1; width: 100%; min-height: 36px; padding-inline: 8px; font-size: 9px; }
  .calendar-back-month:not(.hidden) ~ #calendar-prev,
  .calendar-back-month:not(.hidden) ~ #calendar-today,
  .calendar-back-month:not(.hidden) ~ #calendar-next,
  .calendar-back-month:not(.hidden) ~ #calendar-period { grid-row: 2; }
  .calendar-period-controls strong { min-width: 0; margin: 0; overflow: hidden; font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-actions { display: contents; }
  .calendar-filter { width: 100%; min-width: 0; gap: 5px; }
  .calendar-filter > span { display: block; }
  .calendar-filter-user { grid-column: 2; grid-row: 2; }
  .calendar-filter-workplace { grid-column: 3; grid-row: 2; }
  .calendar-filter-city { grid-column: 1; grid-row: 2; }
  .calendar-view-create { grid-column: 1 / -1; grid-row: 3; gap: 5px; }
  .calendar-filter-view { flex: 1; width: auto; min-width: 0; }
  .calendar-filter-view > span { display: none; }
  .calendar-view-buttons { grid-template-columns: repeat(4, minmax(25px, 1fr)); gap: 3px; }
  .calendar-view-buttons button { height: 36px; border-radius: 8px; font-size: 10px; }
  .calendar-view-create #calendar-add-button { width: 36px; min-width: 36px; height: 36px; font-size: 21px; }
  #calendar-revenue-button { width: 36px; min-width: 36px; height: 36px; font-size: 21px; }
  .calendar-revenue-months { grid-template-columns: 1fr; }
  .calendar-dialog.calendar-summary-dialog { padding: 16px; border: 1px solid var(--line); border-radius: 18px; }
  .calendar-actions select { width: 100%; min-width: 0; }
  .calendar-week { width: 100%; max-width: 100vw; overscroll-behavior-x: none; }
  .calendar-time-view { grid-template-columns: 48px repeat(7, minmax(132px, 1fr)); }
  .calendar-day-view { grid-template-columns: 48px minmax(calc(100vw - 48px), 1fr); }
  .calendar-time-axis, .calendar-time-day { grid-template-rows: 50px 38px 1024px; }
  .calendar-month-view { grid-template-columns: repeat(7, minmax(0, 1fr)); overflow-x: hidden; }
  .calendar-month-weekday { padding-inline: 3px; text-align: center; }
  .calendar-month-day { min-height: 84px; padding: 3px; }
  .calendar-month-date { width: 25px; height: 25px; margin-inline: auto; }
  .calendar-month-events { gap: 2px; }
  .calendar-month-view .calendar-event.compact { min-height: 18px; padding: 2px 3px; display: block; border-left-width: 3px; border-radius: 4px; }
  .calendar-month-view .calendar-event.compact span { display: none; }
  .calendar-month-view .calendar-event.compact strong { display: block; font-size: 7px; }
  .calendar-month-more { font-size: 7px; }
  .calendar-agenda-view { max-width: 100%; padding: 14px 12px calc(28px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  .calendar-agenda-day + .calendar-agenda-day { margin-top: 20px; }
  .calendar-agenda-event { min-height: 74px; padding: 11px 9px; grid-template-columns: 94px minmax(0, 1fr); align-items: start; gap: 10px; }
  .calendar-agenda-leading { gap: 7px; }
  .calendar-agenda-sketch { width: 88px; height: 88px; border-radius: 10px; }
  .calendar-agenda-event > i { grid-column: 2; width: max-content; margin-top: -3px; }
  .calendar-agenda-body small { white-space: normal; line-height: 1.4; }
  .sketch-viewer-dialog { inset: 0; width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; }
  .sketch-viewer-shell { padding: 16px 13px calc(14px + env(safe-area-inset-bottom)); }
  .sketch-viewer-actions { grid-template-columns: 1fr; gap: 8px; }
  .calendar-drag-handle { min-width: 30px; min-height: 28px; font-size: 12px !important; }
  .calendar-resize-handle { height: 13px; }
  .calendar-dialog { width: 100%; max-height: 100%; border: 0; border-radius: 0; }
  .calendar-form { max-height: 100vh; padding: 20px 17px calc(22px + env(safe-area-inset-bottom)); }
  .booking-dialog { position: fixed; inset: 0; width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; overflow: hidden; overscroll-behavior: contain; }
  .booking-dialog .calendar-form { width: 100%; min-width: 0; max-width: 100%; height: 100%; max-height: 100vh; max-height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior-x: none; }
  .booking-dialog input[type="date"],
  .booking-dialog input[type="time"],
  .booking-dialog input[type="datetime-local"] { -webkit-appearance: none; appearance: none; }
  .booking-dialog .booking-master-track { touch-action: pan-x; }
  .booking-google-sync { align-items: stretch; flex-direction: column; }
  .booking-google-sync .secondary-button { width: 100%; }
  .confirmation-inbox { padding: 10px 13px; }
  .confirmation-inbox-heading > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .confirmation-card-list { grid-auto-columns: minmax(225px, 82vw); }
  .confirmation-dialog { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; overflow: hidden; }
  .confirmation-dialog .calendar-form { height: 100%; max-height: 100vh; max-height: 100dvh; overflow-y: auto; }
  .quick-reply-dialog,
  .quick-reply-dialog.parameter-mode { width: calc(100% - 24px); max-height: calc(100% - 28px); margin-bottom: 12px; border-radius: 18px; }
  .quick-reply-shell { padding: 18px 15px calc(18px + env(safe-area-inset-bottom)); }
  .quick-reply-dialog.parameter-mode .quick-reply-shell { padding: 19px 17px calc(17px + env(safe-area-inset-bottom)); }
  .quick-reply-dialog.parameter-mode .form-heading h2 { font-size: 24px; line-height: 1.08; }
  .quick-reply-dialog.parameter-mode .quick-reply-parameter-pane { margin-top: 18px; gap: 13px; }
  .quick-reply-parameter-row { grid-template-columns: minmax(0, 1fr) minmax(105px, .7fr) auto; }
  .quick-reply-parameter-row code { grid-column: 1 / 3; }
  .quick-reply-parameter-row .text-button { justify-self: start; }
  .booking-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .booking-choice-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .booking-price-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .booking-master-track { grid-auto-columns: 86%; }
  .booking-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deals-header { padding: 17px 14px 13px; }
  .deals-brand-row { max-width: none; }
  .deals-brand-row h1 { font-size: 19px; }
  .deals-primary-nav { width: 100%; }
  .deals-toolbar { padding: 11px 13px; grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .deals-filters, .deals-search { grid-column: 1; }
  .deals-summary { display: none; }
  .deals-kanban { padding: 12px 13px 18px; grid-auto-columns: calc(100vw - 26px); gap: 10px; scroll-snap-type: x mandatory; }
  .deal-column { scroll-snap-stop: always; }
}

.line-avito-fields {
  display: grid;
  gap: 14px;
}

@media (max-width: 460px) {
  .statistics-filters,.statistics-summary,.statistics-cohort-kpis { grid-template-columns:minmax(0,1fr); }
  .statistics-cohort-table { min-width:820px; }
  .finance-operation-card { grid-template-columns:minmax(0,1fr); }
  .finance-operation-card > div,.finance-operation-card .wide { grid-column:1; }
  .finance-close-actions { grid-template-columns:minmax(0,1fr); }
  .update-banner {
    top: calc(env(safe-area-inset-top, 0px) + 7px);
    width: calc(100% - 16px);
    min-height: 58px;
    padding: 10px 11px 12px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    border-radius: 12px;
  }
  .update-banner-symbol { width: 32px; height: 32px; border-radius: 9px; font-size: 19px; }
  .update-banner-copy strong { font-size: 12px; }
  .update-banner-copy small { font-size: 10px; }
  .update-banner-time { grid-column: 2; margin-top: -1px; font-size: 10px; }
  .sidebar-header { padding: 17px 14px 13px; }
  .conversation-list { padding-inline: 5px; }
  .conversation-filter { min-height: 29px; padding-inline: 10px; }
  .data-visibility-grid { grid-template-columns: minmax(0, 1fr); }
  .login-card { padding: 28px 23px; }
  .login-card h1 { font-size: 27px; }
  .notification-card { padding: 28px 23px 24px; }
  .settings-action-card { grid-template-columns: auto minmax(0, 1fr); }
  .settings-action-card .settings-action-button { grid-column: 1 / -1; width: 100%; }
  .line-sync-panel { align-items: stretch; flex-direction: column; }
  .line-sync-panel .secondary-button { width: 100%; }
  .vk-bot-draft { padding: 15px; }
  .vk-bot-draft-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .vk-draft-button { min-height: 38px; padding: 8px; font-size: 9px; }
  .vk-preview-message { font-size: 10px; }
  .vk-scenario-card h5 { font-size: 11px; }
  .vk-draft-flow-step strong { font-size: 9px; }
  .vk-draft-flow-step p { font-size: 8.5px; }
  .vk-bot-draft-actions { grid-template-columns: minmax(0, 1fr); }
  .vk-draft-enable-row, .vk-draft-save-row { grid-template-columns: minmax(0, 1fr); }
  .vk-draft-enable-state { justify-self: start; }
  .vk-draft-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .vk-draft-order-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vk-draft-order-actions .danger-outline { grid-column: 1 / -1; }
  .vk-draft-step-editor-head { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .vk-draft-step-editor-head .danger { grid-column: 4; }
  .brand-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; }
  .brand-mark.small { width: 38px; height: 38px; }
  .brand-row h1 { font-size: 19px; }
  .header-actions { gap: 4px; }
  .current-user { display: none; }
  .section-brand-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .section-header-actions { width: 72px; min-width: 72px; }
  .section-header-actions .settings-button { width: 34px; height: 34px; flex-basis: 34px; }
  .section-header-actions .sections-button { width: 34px; height: 34px; flex-basis: 34px; }
  .settings-header-actions .icon-button { width: 34px; height: 34px; flex-basis: 34px; }
  .chat-header { gap: 8px; }
  .chat-header .avatar { width: 38px; height: 38px; }
  .handoff-button { display: none; }
  .session-bar #session-history-button { display: none; }
  .booking-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking-choice-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking-section-heading { align-items: flex-start; }
  .booking-section-heading span { max-width: 62%; line-height: 1.35; }
  .booking-heading-actions { flex-wrap: wrap; }
  .booking-calendar-preview-dialog { width: 100%; height: 100%; max-height: 100%; }
  .booking-calendar-preview-shell { height: 100%; max-height: none; padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); }
  .booking-calendar-preview-day { min-height: 68px; padding: 4px; }
  .booking-calendar-preview-event { padding: 3px 4px; font-size: 6.5px; }
  .booking-availability-heading { align-items: flex-start; }
  .booking-availability-heading > div { flex: none; }
  .client-drawer { width: 100%; }
  .settings-header, .settings-tabs, .settings-list-column, .settings-form { padding-left: 18px; padding-right: 18px; }
  .updates-header { padding: 17px 14px 13px; }
  .updates-brand-row { width: 100%; max-width: 100%; }
  .updates-primary-nav { width: 100%; }
  .updates-content { padding: 20px 14px calc(28px + env(safe-area-inset-bottom)); }
  .today-content { padding:20px 14px calc(28px + env(safe-area-inset-bottom)); }
  .today-heading { align-items:flex-start; flex-direction:column; gap:14px; }
  .today-heading .secondary-button { width:100%; }
  .today-filters { grid-template-columns:1fr; }
  .today-grid { grid-template-columns:1fr; }
  .today-next { align-items:flex-start; flex-direction:column; }
  .today-next .primary-button { width:100%; }
  .booking-nearest-heading { align-items:stretch; flex-direction:column; }
  .booking-nearest-heading .secondary-button { width:100%; }
  .booking-nearest-results { grid-template-columns:1fr; max-height:360px; }
  .updates-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .updates-heading .secondary-button { width: 100%; }
  .update-card { padding: 16px; }
  .update-card-heading { flex-direction: column; gap: 8px; }
  .sections-dialog { width: 100%; max-width: 100%; margin: auto 0 0; }
  .sections-sheet { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .calendar-datetime-row { grid-template-columns: 1fr; }
  .calendar-details-grid { grid-template-columns: 1fr; }
  .schedule-day { grid-template-columns: auto minmax(92px, 1fr) 82px 82px; gap: 5px; }
  .schedule-day input[type="time"] { padding-inline: 3px; font-size: 16px; }
}

.booking-session-media {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
}
.booking-session-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.booking-session-media-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.booking-session-media-grid article > a:first-child {
  display: block;
  aspect-ratio: 4 / 3;
  background: #090b09;
}
.booking-session-media-grid img,
.booking-session-media-grid video { width: 100%; height: 100%; object-fit: contain; }
.booking-session-media-grid article > div { display: grid; gap: 6px; padding: 10px 12px; }
.booking-session-media-grid strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-session-media-grid article > div a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.session-payment-dialog .calendar-form { max-width: 660px; }
.session-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.session-payment-summary span {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
}
.session-payment-summary strong { color: var(--text); font-size: 20px; }
.session-payment-summary:has(#session-payment-certificate:not(.hidden)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#session-payment-certificate-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 0; }
#booking-certificate-section { display: grid; gap: 10px; margin: 12px 0; }
#booking-certificate-field:not(.hidden) { display: grid; gap: 8px; font-size: 13px; }
#booking-certificate-toggle { width: auto; justify-self: start; padding: 0 20px; color: var(--text); }
#booking-certificate-toggle.active { background: var(--accent); color: var(--accent-ink); }
.session-payment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.session-payment-custom { display: grid; gap: 14px; }
.session-payment-complete {
  align-self: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
html[data-theme="light"] body.ink-control-theme :is(.booking-session-media, .booking-session-media-grid article, .session-payment-summary span) {
  border-color: var(--line);
  background: #fffdf7;
}
@media (max-width: 640px) {
  .session-payment-summary,
  .session-payment-actions { grid-template-columns: 1fr; }
}

/* CRM operations: notification center, session actions and management reports. */
.section-header-actions:has(.notification-center-button) { min-width:126px; }
.notification-center-button { position:relative; }
.section-header-actions .nav-label { display: none; }
.notification-center-button .notification-glyph {
  display:block; width:17px; height:18px; border:2px solid currentColor;
  border-top-left-radius:10px; border-top-right-radius:10px; border-bottom:0;
}
.notification-center-button .notification-glyph::after {
  content:""; position:absolute; left:50%; bottom:8px; width:6px; height:2px;
  border-radius:2px; background:currentColor; transform:translateX(-50%);
}
.notification-center-count {
  position:absolute; top:-5px; right:-5px; display:grid; min-width:18px; height:18px;
  padding:0 4px; place-items:center; border:2px solid var(--bg); border-radius:10px;
  background:var(--accent); color:var(--accent-ink); font:800 9px/1 system-ui; font-style:normal;
}
.notification-center-dialog { width:min(580px,calc(100vw - 24px)); padding:0; border:0; background:transparent; color:var(--text); }
.notification-center-dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(4px); }
.notification-center-card { max-height:min(720px,calc(100dvh - 28px)); overflow:hidden; padding:22px; border:1px solid var(--line); border-radius:18px; background:#10110f; box-shadow:0 28px 80px rgba(0,0,0,.5); }
.notification-center-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; color:var(--muted); }
.notification-center-list { display:grid; gap:8px; max-height:560px; overflow:auto; overscroll-behavior:contain; }
.notification-center-item { display:grid; gap:7px; width:100%; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); text-align:left; }
.notification-center-item.unread { border-color:rgba(217,255,87,.5); background:#171d10; }
.notification-center-item > span { display:flex; justify-content:space-between; gap:12px; }
.notification-center-item time,.notification-center-item small { color:var(--muted); }
.notification-center-empty { padding:38px 18px; color:var(--muted); text-align:center; }

.client-overview { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:0 16px 12px; }
.client-overview article { min-width:0; padding:11px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.client-overview span,.client-overview strong { display:block; }
.client-overview span { color:var(--muted); font-size:9px; letter-spacing:.1em; text-transform:uppercase; }
.client-overview strong { margin-top:5px; overflow:hidden; color:var(--accent); text-overflow:ellipsis; white-space:nowrap; }
.client-quality { display:grid; gap:4px; margin:0 16px 12px; padding:12px; border:1px solid rgba(255,176,120,.45); border-radius:10px; color:#ffc69e; }
.client-quality span { color:var(--muted); font-size:12px; }

.session-quick-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.session-quick-actions button { min-height:30px; padding:6px 10px; border:1px solid var(--line); border-radius:9px; background:#171915; color:var(--muted); font-weight:750; }
.session-quick-actions button.active, .session-quick-actions button[aria-pressed="true"] { border-color:var(--accent); background:var(--accent); color:var(--accent-ink); box-shadow:inset 0 -2px rgba(0,0,0,.16); }
.session-quick-actions button:disabled { opacity:.55; }
.session-action-note { flex-basis:100%; color:var(--muted); font-size:9px; line-height:1.4; }

.report-insight-row,.finance-ledger-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px; border:1px solid var(--line); border-radius:11px; background:var(--surface); }
.report-insight-row span,.finance-ledger-row small { display:block; color:var(--muted); }
.finance-ledger-row > span { min-width:0; }
.finance-ledger-row b { flex:none; color:var(--accent); }
.finance-ledger-row.expense b { color:#ffa28f; }
.reports-ledger-title { margin:24px 0 10px; }
.quality-report-card { display:grid; gap:6px; width:100%; padding:15px; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--text); text-align:left; }
.quality-report-card span { color:#ffc69e; }

@media (max-width:820px) {
  .section-header-actions:has(.notification-center-button) { width:auto; min-width:104px; }
  .notification-center-card { padding:17px; border-radius:16px; }
  .notification-center-list { max-height:calc(100dvh - 170px); }
  .session-quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .session-quick-actions button { padding-inline:5px; font-size:11px; }
  .session-action-note { grid-column:1/-1; }
}

/* Ink Control — фирменная оболочка CRM */
body.ink-control-theme {
  --bg: #090a09;
  --sidebar: #10110f;
  --surface: #141613;
  --surface-2: #1a1c18;
  --surface-3: #22251f;
  --line: #30332c;
  --line-soft: rgba(231, 235, 222, .075);
  --text: #f2f0e9;
  --muted: #90938a;
  --accent: #d9ff57;
  --accent-ink: #111409;
  --warm: #e9b46f;
  --danger: #ff7466;
  --shadow: 0 28px 80px rgba(0, 0, 0, .48);
  background: #090a09;
}

.ink-control-theme * { scrollbar-color: #43473d #11120f; }
.ink-control-theme ::selection { background: var(--accent); color: var(--accent-ink); }
.ink-control-theme button,
.ink-control-theme input,
.ink-control-theme textarea,
.ink-control-theme select { border-color: var(--line); }
.ink-control-theme button:focus-visible,
.ink-control-theme input:focus-visible,
.ink-control-theme textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ink-control-theme .settings-close-button,
.ink-control-theme .settings-close-button:hover,
.ink-control-theme .settings-close-button:focus,
.ink-control-theme .settings-close-button:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.ink-control-theme .calendar-header-delete,
.ink-control-theme .calendar-header-delete:hover,
.ink-control-theme .calendar-header-delete:focus,
.ink-control-theme .calendar-header-delete:focus-visible {
  border: 1px solid #373a33 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
.ink-control-theme select:focus,
.ink-control-theme select:focus-visible {
  outline: 0;
  border-color: #4b4f45;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .035);
}

.brand-logo {
  width: 92px;
  height: 57px;
  display: block;
  flex: none;
  border: 1px solid #2f322c;
  border-radius: 9px;
  background: #17100f;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.brand-logo.login-logo { width: 222px; height: 137px; margin-bottom: 25px; border-radius: 12px; }
.brand-logo.small { width: 82px; height: 51px; border-radius: 8px; }

.ink-control-theme .eyebrow { color: #969a8f; letter-spacing: .16em; }
.ink-control-theme .login-screen {
  background:
    linear-gradient(rgba(9,10,9,.54), rgba(9,10,9,.9)),
    linear-gradient(90deg, transparent 31px, rgba(217,255,87,.025) 32px),
    linear-gradient(transparent 31px, rgba(217,255,87,.025) 32px),
    #090a09;
  background-size: auto, 32px 32px, 32px 32px, auto;
}
.ink-control-theme .login-card { width: min(470px, 100%); padding: 36px; border-radius: 16px; background: #10110f; box-shadow: 0 32px 100px rgba(0,0,0,.56); }
.ink-control-theme .login-card h1 { max-width: 330px; }
.ink-control-theme .login-copy { color: #a2a49c; }
.ink-control-theme .login-card input { border-radius: 9px; background: #191b17; }

.ink-control-theme .primary-button { border-radius: 9px; box-shadow: inset 0 -2px rgba(0,0,0,.17); letter-spacing: .01em; }
.ink-control-theme .secondary-button { border-style: solid; border-radius: 9px; }
.ink-control-theme .icon-button { border-radius: 9px; background: #151713; }
.ink-control-theme .settings-button { color: var(--accent); }
.ink-control-theme .text-button:hover { color: var(--accent); }

.ink-control-theme .workspace { grid-template-columns: 330px minmax(0, 1fr); background: #090a09; }
.ink-control-theme .sidebar { background: #10110f; }
.ink-control-theme .sidebar-header { padding: 18px 16px 15px; background: #10110f; }
.ink-control-theme .dialogs-header { padding: 16px 20px; }
.ink-control-theme .sidebar-toolbar { background: #10110f; }
.ink-control-theme .brand-row { gap: 11px; }
.ink-control-theme .brand-row h1 { margin-top: 5px; font-size: 20px; }
.ink-control-theme .primary-nav {
  margin-top: 15px;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.ink-control-theme .primary-nav button {
  min-height: 41px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.ink-control-theme .primary-nav button:hover { color: var(--text); background: rgba(255,255,255,.02); }
.ink-control-theme .primary-nav button.active { border-bottom-color: var(--accent); background: rgba(217,255,87,.045); color: var(--text); box-shadow: none; }
.ink-control-theme .nav-count { background: var(--accent); color: var(--accent-ink); }
.ink-control-theme .search { height: 41px; border: 1px solid var(--line); border-radius: 9px; background: #191b17; }
.ink-control-theme .list-heading { padding: 14px 16px 8px; }
.ink-control-theme .live-indicator i { box-shadow: 0 0 0 3px rgba(217,255,87,.1); }
.ink-control-theme .conversation-list { padding-inline: 8px; }
.ink-control-theme .conversation { padding: 11px 9px; border-radius: 10px; }
.ink-control-theme .conversation:hover { background: #151713; }
.ink-control-theme .conversation.active { border-color: #52602f; background: #1a2014; box-shadow: inset 3px 0 var(--accent); }
.ink-control-theme .conversation-avatar,
.ink-control-theme .avatar { border: 1px solid #33362e; border-radius: 10px; background: linear-gradient(145deg, #272a24, #191b17); color: var(--accent); }
.ink-control-theme .conversation-line { color: #777a72; }
.ink-control-theme .unread-badge { box-shadow: 0 0 0 3px rgba(217,255,87,.08); }

.ink-control-theme .chat-panel { background: #0b0c0a; }
.ink-control-theme .empty-symbol { border-radius: 13px; background: #151713; }
.ink-control-theme .chat-header { padding: 14px 18px; background: rgba(15,16,14,.96); backdrop-filter: none; }
.ink-control-theme .line-chip { border: 1px solid rgba(217,255,87,.13); border-radius: 6px; background: rgba(217,255,87,.055); color: #c6d695; }
.ink-control-theme .card-button,
.ink-control-theme .handoff-button { border-radius: 8px; background: #171915; }
.ink-control-theme .session-bar { padding: 8px 18px; background: #11120f; }
.ink-control-theme .messages {
  background-color: #0b0c0a;
  background-image:
    linear-gradient(rgba(217,255,87,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217,255,87,.014) 1px, transparent 1px);
  background-size: 32px 32px;
}
.ink-control-theme .day-divider { border-radius: 6px; background: rgba(9,10,9,.86); }
.ink-control-theme .message-bubble { border-radius: 12px; background: #181a17; }
.ink-control-theme .message.incoming .message-bubble { border-bottom-left-radius: 3px; }
.ink-control-theme .message.outgoing .message-bubble { border-color: #48552a; border-bottom-right-radius: 3px; background: #1a2014; }
.ink-control-theme .message.admin .message-bubble { background: #272119; }
.ink-control-theme .attachment-image,
.ink-control-theme .attachment-file { border-radius: 8px; }
.ink-control-theme .composer { padding-block: 12px 13px; background: rgba(15,16,14,.97); }
.ink-control-theme .attach-button,
.ink-control-theme .quick-reply-button,
.ink-control-theme .wait-shortcuts-toggle,
.ink-control-theme .send-button,
.ink-control-theme .composer-field { border-radius: 10px; }
.ink-control-theme .composer-field { background: #191b17; }
.ink-control-theme .composer-field:focus-within,
.ink-control-theme .quick-reply-search:focus-within,
.ink-control-theme .search:focus-within,
.ink-control-theme .deals-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,255,87,.09);
}
.ink-control-theme .composer-field textarea:focus-visible,
.ink-control-theme .quick-reply-search input:focus-visible,
.ink-control-theme .search input:focus-visible,
.ink-control-theme .deals-search input:focus-visible {
  outline: none;
}

.ink-control-theme .client-drawer { border-left-color: #3b3e35; background: #0f100e; }
.ink-control-theme .drawer-header { background: #12130f; }
.ink-control-theme .drawer-client-summary,
.ink-control-theme .session-list-item { border-radius: 10px; background: #171915; }
.ink-control-theme .field-control input,
.ink-control-theme .field-control textarea,
.ink-control-theme .field-control select,
.ink-control-theme .settings-form input:not([type="checkbox"]),
.ink-control-theme .settings-form textarea,
.ink-control-theme .settings-form select { border-radius: 9px; background: #1a1c18; }

.ink-control-theme .settings-dialog { border-radius: 15px; background: #0f100e; }
.ink-control-theme .settings-header { padding: 16px 20px; background: #11120f; }
.ink-control-theme .settings-tabs { background: #11120f; }
.ink-control-theme .settings-tab { border-bottom-width: 2px; }
.ink-control-theme .settings-tab.active { color: var(--accent); }
.ink-control-theme .settings-list-column,
.ink-control-theme .settings-form { background: #0f100e; }
.ink-control-theme .settings-list-item,
.ink-control-theme .settings-action-card,
.ink-control-theme .permission-row,
.ink-control-theme .line-sync-panel { border-radius: 10px; background: #161815; }
.ink-control-theme button.settings-list-item.active { border-color: #566431; background: #1a2014; box-shadow: inset 3px 0 var(--accent); }
.ink-control-theme .status-pill { border-radius: 5px; }

.ink-control-theme .calendar-panel,
.ink-control-theme .deals-panel,
.ink-control-theme .updates-panel,
.ink-control-theme .today-panel,
.ink-control-theme .statistics-panel,
.ink-control-theme .reports-panel,
.ink-control-theme .marketing-panel { background: #090a09; }
.ink-control-theme .content-panel { background: #090a09; }
.ink-control-theme .calendar-header,
.ink-control-theme .deals-header,
.ink-control-theme .updates-header { padding: 16px 20px; background: #10110f; }
.ink-control-theme .calendar-brand-row,
.ink-control-theme .deals-brand-row { max-width: none; }
.ink-control-theme .calendar-primary-nav,
.ink-control-theme .deals-primary-nav,
.ink-control-theme .dialogs-primary-nav,
.ink-control-theme .updates-primary-nav { width: 100%; }
.ink-control-theme .calendar-toolbar,
.ink-control-theme .deals-toolbar { background: #141613; }
.ink-control-theme .calendar-actions select,
.ink-control-theme .deals-search { border-radius: 9px; background: #1a1c18; }
.ink-control-theme .confirmation-inbox { background: #211c15; }
.ink-control-theme .confirmation-card { border-radius: 9px; background: #171815; }
.ink-control-theme .calendar-time-axis,
.ink-control-theme .calendar-time-axis > div:first-child,
.ink-control-theme .calendar-hour-labels { background: #10110f; }
.ink-control-theme .calendar-time-day > header { background: rgba(16,17,15,.98); }
.ink-control-theme .calendar-all-day-lane { background: #12130f; }
.ink-control-theme .calendar-time-lane { background: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(217,255,87,.025) 31px 32px); }
.ink-control-theme .calendar-working-window { border-color: rgba(217,255,87,.16); background: rgba(217,255,87,.04); }
.ink-control-theme .calendar-event { border-radius: 6px; background: color-mix(in srgb, var(--event-color, var(--accent)) 13%, #151713); }
.ink-control-theme .calendar-month-weekday { background: #10110f; }
.ink-control-theme .calendar-month-day { background: #0c0d0b; }
.ink-control-theme .calendar-agenda-event { background: #11130f; }

.ink-control-theme .deals-kanban { gap: 10px; }
.ink-control-theme .deal-column { border-radius: 12px; background: #10120f; }
.ink-control-theme .deal-column > header { background: #161815; }
.ink-control-theme .deal-card { border-radius: 9px; background: #191b17; }
.ink-control-theme .deal-card:hover { border-color: #4c572d; }
.ink-control-theme .deal-card-session { border-radius: 6px; }

.ink-control-theme .automation-board-column { border-radius: 12px; background: #11120f; }
.ink-control-theme .automation-board-card,
.ink-control-theme .automation-sequence-row { border-radius: 9px; background: #191b17; }
.ink-control-theme .automation-row-controls input,
.ink-control-theme .automation-row-controls select,
.ink-control-theme .automation-row-controls textarea,
.ink-control-theme .automation-block select,
.ink-control-theme .automation-config select,
.ink-control-theme .automation-add-row select,
.ink-control-theme .automation-test-row select { border-radius: 8px; background: #1a1c18; }

.ink-control-theme .calendar-dialog,
.ink-control-theme .quick-reply-dialog,
.ink-control-theme .notification-dialog { border-radius: 14px; background: #10110f; }
.ink-control-theme .calendar-form input:not([type="checkbox"]),
.ink-control-theme .calendar-form textarea,
.ink-control-theme .calendar-form select { border-radius: 9px; background: #1a1c18; }
.ink-control-theme .booking-client,
.ink-control-theme .booking-extra-fields,
.ink-control-theme .booking-availability,
.ink-control-theme .booking-money-panel,
.ink-control-theme .booking-payment-facts,
.ink-control-theme .booking-finance-details,
.ink-control-theme .booking-sketch-panel,
.ink-control-theme .confirmation-control { border-radius: 10px; background: #131512; }
.ink-control-theme .booking-master-card,
.ink-control-theme .booking-workplace-card { border-radius: 9px; background: #1a1c18; }
.ink-control-theme .booking-master-card.active,
.ink-control-theme .booking-workplace-card.active { border-color: var(--accent); background: #1a2014; }
.ink-control-theme .booking-choice-row button,
.ink-control-theme .slot-offset-button,
.ink-control-theme .booking-slots button,
.ink-control-theme .booking-price-grid button,
.ink-control-theme .booking-price-half button,
.ink-control-theme .confirmation-adjust-row button { border-radius: 7px; background: #1a1c18; }
.ink-control-theme .booking-choice-row button.active,
.ink-control-theme .booking-choice-row button[aria-pressed="true"],
.ink-control-theme .slot-offset-button.active,
.ink-control-theme .slot-offset-button[aria-pressed="true"],
.ink-control-theme .booking-slots button.active,
.ink-control-theme .booking-price-grid button.active,
.ink-control-theme .booking-price-grid button[aria-pressed="true"],
.ink-control-theme .booking-price-half button.active,
.ink-control-theme .booking-price-half button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 -2px rgba(0,0,0,.18), 0 0 0 1px rgba(217,255,87,.12);
  font-weight: 850;
}
.ink-control-theme .booking-total-row,
.ink-control-theme .booking-custom-time { border-radius: 8px; }
.ink-control-theme .quick-reply-item { border-radius: 9px; background: #171915; }
.ink-control-theme .toast { border-radius: 9px; background: #22251f; }

@media (max-width: 820px) {
  .ink-control-theme .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    background: #090a09;
  }
  .ink-control-theme .sidebar-header,
  .ink-control-theme .calendar-header,
  .ink-control-theme .deals-header,
  .ink-control-theme .settings-header { padding: 14px 13px 12px; }
  .ink-control-theme .section-brand-row { max-width: none; }
  .ink-control-theme .calendar-dialog,
  .ink-control-theme .booking-dialog,
  .ink-control-theme .confirmation-dialog,
  .ink-control-theme .settings-dialog { border-radius: 0; }
  .ink-control-theme .calendar-toolbar,
  .ink-control-theme .deals-toolbar { background: #11130f; }
  .ink-control-theme .deals-header {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .ink-control-theme .deals-toolbar {
    padding: 0 13px 12px;
    gap: 14px;
    background: #10110f;
  }
}

@media (max-width: 460px) {
  .brand-logo.small { width: 70px; height: 43px; }
  .brand-logo.login-logo { width: 190px; height: 118px; }
  .ink-control-theme .login-card { padding: 25px 21px; }
  .ink-control-theme .brand-row { gap: 8px; }
  .ink-control-theme .brand-row h1 { font-size: 18px; }
  .calendar-busy-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ink-control-theme .primary-nav button { min-height: 39px; }
  .ink-control-theme .conversation-filters { margin-top: 13px; }
  .ink-control-theme .conversation-list { padding-inline: 5px; }
  .ink-control-theme .conversation { padding-inline: 8px; }
  .ink-control-theme .chat-header { padding: 10px 11px; }
  .ink-control-theme .messages { background-size: 26px 26px; }
}
.report-insight-heading {
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Светлая тема Ink Control. Палитра намеренно остаётся тёплой и спокойной,
   чтобы интерфейс не превращался в ослепительно-белую административную панель. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1e8;
  --sidebar: #eee9dc;
  --surface: #fffdf7;
  --surface-2: #f5f1e7;
  --surface-3: #e8e2d4;
  --line: #d2ccbc;
  --line-soft: rgba(36, 40, 31, .09);
  --text: #1b1e19;
  --muted: #706f67;
  --accent: #788f13;
  --accent-ink: #fffef8;
  --warm: #a45d1d;
  --danger: #b7473c;
  --shadow: 0 28px 80px rgba(66, 57, 39, .18);
}

html[data-theme="light"] body.ink-control-theme {
  --bg: #f4f1e8;
  --sidebar: #eee9dc;
  --surface: #fffdf7;
  --surface-2: #f5f1e7;
  --surface-3: #e8e2d4;
  --line: #d2ccbc;
  --line-soft: rgba(36, 40, 31, .09);
  --text: #1b1e19;
  --muted: #706f67;
  --accent: #788f13;
  --accent-ink: #fffef8;
  --warm: #a45d1d;
  --danger: #b7473c;
  --shadow: 0 28px 80px rgba(66, 57, 39, .18);
  background:
    radial-gradient(circle at 84% 4%, rgba(120, 143, 19, .10), transparent 30%),
    #f4f1e8;
  color: var(--text);
}

html[data-theme="light"] body.ink-control-theme * { scrollbar-color: #b9b3a4 #ebe6da; }
html[data-theme="light"] body.ink-control-theme ::selection { background: #cfe08a; color: #202612; }
html[data-theme="light"] body.ink-control-theme .eyebrow { color: #73756c; }
html[data-theme="light"] body.ink-control-theme .brand-logo { border-color: #c6bfaf; box-shadow: 0 5px 18px rgba(69, 58, 39, .12); }

html[data-theme="light"] body.ink-control-theme .login-screen {
  background:
    linear-gradient(rgba(244,241,232,.35), rgba(244,241,232,.92)),
    linear-gradient(90deg, transparent 31px, rgba(120,143,19,.055) 32px),
    linear-gradient(transparent 31px, rgba(120,143,19,.055) 32px),
    #f4f1e8;
  background-size: auto, 32px 32px, 32px 32px, auto;
}
html[data-theme="light"] body.ink-control-theme .login-card {
  border-color: #d0c9b8;
  background: rgba(255,253,247,.96);
  box-shadow: 0 32px 100px rgba(66,57,39,.20);
}
html[data-theme="light"] body.ink-control-theme .login-copy { color: #707169; }

html[data-theme="light"] body.ink-control-theme :is(
  .workspace,
  .calendar-panel,
  .deals-panel,
  .updates-panel,
  .today-panel,
  .statistics-panel,
  .reports-panel,
  .marketing-panel,
  .content-panel,
  .training-panel,
  .estimation-panel,
  .expenses-panel
) { background: var(--bg); }

html[data-theme="light"] body.ink-control-theme :is(
  .sidebar,
  .sidebar-header,
  .sidebar-toolbar,
  .calendar-header,
  .deals-header,
  .updates-header,
  .section-header,
  .settings-header,
  .settings-tabs
) { background: rgba(255,253,247,.94); }

html[data-theme="light"] body.ink-control-theme .primary-nav button:hover { background: rgba(120,143,19,.06); }
html[data-theme="light"] body.ink-control-theme .primary-nav button.active {
  background: rgba(120,143,19,.10);
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme .primary-nav {
  border-color: var(--line);
  background: rgba(255,253,247,.56);
}
html[data-theme="light"] body.ink-control-theme .primary-nav button:has(.nav-count) {
  padding-right: 27px;
}
html[data-theme="light"] body.ink-control-theme .nav-count {
  top: 50%;
  right: 7px;
  border-color: #fffdf7;
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-50%);
}
html[data-theme="light"] body.ink-control-theme :is(.icon-button, .search, .deals-search, .composer-field) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme .conversation-filter {
  border-color: #c9c3b3;
  background: #fffdf7;
  color: #62645d;
  box-shadow: 0 1px 0 rgba(72,62,43,.04);
}
html[data-theme="light"] body.ink-control-theme .conversation-filter:hover {
  border-color: #9aa76c;
  background: #f5f1e7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme .conversation-filter.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}
html[data-theme="light"] body.ink-control-theme .search-clear {
  background: #e8e2d4;
  color: #66675f;
}
html[data-theme="light"] body.ink-control-theme .conversation:hover { background: rgba(120,143,19,.055); }
html[data-theme="light"] body.ink-control-theme .conversation.active {
  border-color: #9aa76c;
  background: #eef2dd;
  box-shadow: inset 3px 0 var(--accent);
}
html[data-theme="light"] body.ink-control-theme :is(.conversation-avatar, .avatar) {
  border-color: #cbc4b4;
  background: linear-gradient(145deg, #f9f6ed, #e8e2d4);
  color: #65790f;
}
html[data-theme="light"] body.ink-control-theme .conversation-line { color: #74746c; }
html[data-theme="light"] body.ink-control-theme .conversation-receipt { color: #7b806d; }
html[data-theme="light"] body.ink-control-theme .conversation-receipt.delivered { color: #788f13; }
html[data-theme="light"] body.ink-control-theme .conversation-receipt.read { color: #5f7500; }

html[data-theme="light"] body.ink-control-theme .chat-panel { background: #f8f5ed; }
html[data-theme="light"] body.ink-control-theme :is(.chat-header, .composer) {
  background: rgba(255,253,247,.96);
  border-color: var(--line);
}
html[data-theme="light"] body.ink-control-theme .session-bar { background: #eee9dc; }
html[data-theme="light"] body.ink-control-theme .message-history-tools { background: rgba(255,253,247,.97); }
html[data-theme="light"] body.ink-control-theme :is(.message-history-button, .message-search-field, .message-date-field) { border-color: #c9c2b0; background: #fffdf7; }
html[data-theme="light"] body.ink-control-theme .message-search-results { border-color: #c9c2b0; background: #fffdf7; box-shadow: 0 18px 45px rgba(66,57,39,.18); }
html[data-theme="light"] body.ink-control-theme .message-search-clear { background: #e8e2d4; }
html[data-theme="light"] body.ink-control-theme .message-date-field input { color-scheme: light; }
html[data-theme="light"] body.ink-control-theme .empty-symbol { background: #e8e2d4; }
html[data-theme="light"] body.ink-control-theme .line-chip {
  border-color: rgba(120,143,19,.25);
  background: rgba(120,143,19,.09);
  color: #5e710d;
}
html[data-theme="light"] body.ink-control-theme :is(.chat-secondary-button, .handoff-button) {
  border-color: #c9c2b0;
  background: #fffdf7;
  color: #55564e;
}
html[data-theme="light"] body.ink-control-theme :is(.chat-secondary-button, .handoff-button):hover:not(:disabled) {
  border-color: #aab876;
  background: #f4f5e8;
  color: #43500b;
}
html[data-theme="light"] body.ink-control-theme .messages {
  background-color: #f8f5ed;
  background-image:
    linear-gradient(rgba(120,143,19,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,143,19,.045) 1px, transparent 1px);
}
html[data-theme="light"] body.ink-control-theme .day-divider { background: rgba(238,233,220,.92); }
html[data-theme="light"] body.ink-control-theme .message-bubble { border-color: #d0cab9; background: #fffdf7; }
html[data-theme="light"] body.ink-control-theme .message.outgoing .message-bubble {
  border-color: #aebd78;
  background: #eef2dd;
}
html[data-theme="light"] body.ink-control-theme .message.admin .message-bubble { background: #f2eadf; }
html[data-theme="light"] body.ink-control-theme .quick-reply-dialog {
  border-color: #c9c2b0;
  background: #fffdf7;
  color: #1b1e19;
}
html[data-theme="light"] body.ink-control-theme .quick-reply-search {
  border-color: #c9c2b0;
  background: #f8f5ed;
  color: #74746c;
}
html[data-theme="light"] body.ink-control-theme .quick-reply-search input { color: #1b1e19; }
html[data-theme="light"] body.ink-control-theme .quick-reply-item {
  border-color: #d3cdbc;
  background: #fffdf7;
  color: #1b1e19;
}
html[data-theme="light"] body.ink-control-theme .quick-reply-item:hover {
  border-color: #9fad64;
  background: #f4f5e8;
}
html[data-theme="light"] body.ink-control-theme .quick-reply-item strong { color: #1b1e19; }
html[data-theme="light"] body.ink-control-theme .quick-reply-item i { color: #5f710f; }
html[data-theme="light"] body.ink-control-theme .quick-reply-item small { color: #74746c; }

html[data-theme="light"] body.ink-control-theme :is(
  .client-drawer,
  .settings-dialog,
  .settings-list-column,
  .settings-form,
  .calendar-dialog,
  .booking-dialog,
  .confirmation-dialog,
  .quick-reply-dialog,
  .notification-dialog,
  .sections-dialog
) { border-color: var(--line); background: var(--surface); }
html[data-theme="light"] body.ink-control-theme :is(
  .sections-sheet,
  .notification-center-card,
  .quick-reply-dialog,
  .training-image-sheet
) {
  border-color: var(--line);
  background: #fffdf7;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(66,57,39,.20);
}
html[data-theme="light"] body.ink-control-theme :is(
  .sections-sheet-heading h2,
  .notification-center-card h2,
  .notification-center-card .eyebrow,
  .section-menu-open strong
) { color: var(--text); }
html[data-theme="light"] body.ink-control-theme .section-menu-card {
  border-color: var(--line);
  background: #f5f1e7;
}
html[data-theme="light"] body.ink-control-theme :is(.sections-close, .notification-center-card .icon-button) {
  border-color: var(--line);
  background: #f5f1e7;
  color: #60635a;
}
html[data-theme="light"] body.ink-control-theme .drawer-header { background: #f5f1e7; }
html[data-theme="light"] body.ink-control-theme :is(
  .drawer-client-summary,
  .session-list-item,
  .settings-list-item,
  .settings-action-card,
  .permission-row,
  .line-sync-panel,
  .notification-center-item,
  .client-overview article,
  .quality-report-card,
  .report-insight-row,
  .finance-ledger-row
) { background: var(--surface-2); }
html[data-theme="light"] body.ink-control-theme button.settings-list-item.active {
  border-color: #9aa76c;
  background: #eef2dd;
}
html[data-theme="light"] body.ink-control-theme .notification-center-item.unread { background: #eef2dd; }
html[data-theme="light"] body.ink-control-theme .notification-center-toolbar,
html[data-theme="light"] body.ink-control-theme .notification-center-empty { color: #6b6d64; }
html[data-theme="light"] body.ink-control-theme .notification-center-item > span { align-items: flex-start; }
html[data-theme="light"] body.ink-control-theme .notification-center-item > span strong { min-width: 0; }
html[data-theme="light"] body.ink-control-theme .notification-center-item time { flex: none; }

html[data-theme="light"] body.ink-control-theme :is(
  .field-control input,
  .field-control textarea,
  .field-control select,
  .settings-form input:not([type="checkbox"]),
  .settings-form textarea,
  .settings-form select,
  .calendar-form input:not([type="checkbox"]),
  .calendar-form textarea,
  .calendar-form select,
  .automation-row-controls input,
  .automation-row-controls select,
  .automation-row-controls textarea,
  .automation-block select,
  .automation-config select,
  .automation-add-row select,
  .automation-test-row select,
  .calendar-actions select
) {
  border-color: var(--line);
  background: #fffdf7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme :is(
  .deal-stage-select,
  .quick-reply-parameter-input-wrap input,
  .mailing-form input:not([type="checkbox"]),
  .mailing-form textarea,
  .content-post-form input:not([type="checkbox"]),
  .content-post-form select,
  .content-post-form textarea,
  .content-community-form input:not([type="checkbox"]),
  .content-community-form select,
  .content-source-sidebar input,
  .content-search-toolbar input,
  .content-search-toolbar select,
  .estimation-card input,
  .estimation-card textarea
) {
  border-color: var(--line);
  background: #fffdf7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme :is(input, textarea, select)::placeholder { color: #929087; }
html[data-theme="light"] body.ink-control-theme select:focus,
html[data-theme="light"] body.ink-control-theme select:focus-visible {
  border-color: #8b9c4d;
  box-shadow: 0 0 0 3px rgba(120,143,19,.10);
}

html[data-theme="light"] body.ink-control-theme :is(.calendar-toolbar, .deals-toolbar) { background: #f5f1e7; }
html[data-theme="light"] body.ink-control-theme .confirmation-inbox { background: #fbefe0; }
html[data-theme="light"] body.ink-control-theme .confirmation-card { background: #fffaf2; }
html[data-theme="light"] body.ink-control-theme :is(.calendar-time-axis, .calendar-time-axis > div:first-child, .calendar-hour-labels) { background: #eee9dc; }
html[data-theme="light"] body.ink-control-theme .calendar-time-day > header { background: rgba(245,241,231,.98); }
html[data-theme="light"] body.ink-control-theme .calendar-all-day-lane { background: #f5f1e7; }
html[data-theme="light"] body.ink-control-theme .calendar-time-lane {
  background: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(79,88,47,.10) 31px 32px);
}
html[data-theme="light"] body.ink-control-theme .calendar-working-window {
  border-color: rgba(120,143,19,.28);
  background: rgba(120,143,19,.07);
}
html[data-theme="light"] body.ink-control-theme .calendar-event {
  border-color: color-mix(in srgb, var(--event-color, var(--accent)) 38%, #cfc8b7);
  background: color-mix(in srgb, var(--event-color, var(--accent)) 13%, #fffdf7);
}
html[data-theme="light"] body.ink-control-theme .calendar-month-weekday { background: #eee9dc; }
html[data-theme="light"] body.ink-control-theme .calendar-month-day { background: #fffdf7; }
html[data-theme="light"] body.ink-control-theme .calendar-agenda-event { background: #fffdf7; }
html[data-theme="light"] body.ink-control-theme :is(.calendar-today, .calendar-time-choice) {
  border-color: var(--line);
  background: #fffdf7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme .calendar-agenda-sketch { background: #fff; }
html[data-theme="light"] body.ink-control-theme .calendar-event.gesture-active::after {
  background: #fffdf7;
  color: #5f7500;
}

html[data-theme="light"] body.ink-control-theme :is(.deal-column, .automation-board-column) { background: #eee9dc; }
html[data-theme="light"] body.ink-control-theme :is(.deal-column > header, .automation-board-card, .automation-sequence-row) { background: #f5f1e7; }
html[data-theme="light"] body.ink-control-theme .deal-card { background: #fffdf7; }
html[data-theme="light"] body.ink-control-theme .deal-card:hover { border-color: #9aa76c; }
html[data-theme="light"] body.ink-control-theme .deal-stage-select { color: #55584f; }
html[data-theme="light"] body.ink-control-theme .deal-card-main:hover { background: rgba(120,143,19,.055); }
html[data-theme="light"] body.ink-control-theme .deal-card-meta { color: #75756d; }
html[data-theme="light"] body.ink-control-theme .deal-card-field { color: #687844; }
html[data-theme="light"] body.ink-control-theme .deal-card-session {
  background: rgba(120,143,19,.09);
  color: #5e710d;
}

/* Booking form: the light theme has its own complete state palette. Keeping
   normal, selected and disabled controls together prevents the generic light
   button rules from making selected values look empty. */
html[data-theme="light"] body.ink-control-theme .booking-dialog {
  border-color: #c8c1af;
  background: #fffdf7;
  box-shadow: 0 28px 80px rgba(66, 57, 39, .24);
}
html[data-theme="light"] body.ink-control-theme .booking-dialog .calendar-form { color: var(--text); }
html[data-theme="light"] body.ink-control-theme .booking-dialog .calendar-form > label,
html[data-theme="light"] body.ink-control-theme .booking-dialog .calendar-details-grid > label,
html[data-theme="light"] body.ink-control-theme .booking-dialog .booking-custom-time label,
html[data-theme="light"] body.ink-control-theme .booking-dialog .booking-payment-date-grid label {
  color: #4f5149;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(.form-heading h2, .booking-client strong) { color: var(--text); }
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(.booking-section-heading strong, .booking-money-heading span, .booking-total-row span) {
  color: #454840;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(.booking-section-heading span, .booking-availability p, .booking-custom-time p, .calendar-form small) {
  color: #74746b;
}
html[data-theme="light"] body.ink-control-theme :is(
  .booking-client,
  .booking-google-sync,
  .booking-extra-fields,
  .booking-availability,
  .booking-money-panel,
  .booking-payment-facts,
  .booking-finance-details,
  .booking-sketch-panel,
  .confirmation-control
) {
  border-color: #d2ccbc;
  background: #f5f1e7;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(.booking-extra-fields, .booking-availability, .booking-money-panel, .booking-payment-facts, .booking-finance-details, .booking-sketch-panel) {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 8px 22px rgba(78, 69, 49, .045);
}
html[data-theme="light"] body.ink-control-theme .booking-client {
  border-color: #cfc8b7;
  background: #f3efe5;
}
html[data-theme="light"] body.ink-control-theme .booking-google-sync {
  border-color: #c7d18c;
  background: #f2f5df;
}
html[data-theme="light"] body.ink-control-theme .booking-google-sync.failed {
  border-color: #d7aaa1;
  background: #fff0ed;
}
html[data-theme="light"] body.ink-control-theme .booking-google-sync.failed strong { color: #913f34; }
html[data-theme="light"] body.ink-control-theme .booking-client span { color: #77776e; }
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  select,
  textarea
) {
  border-color: #cbc4b2;
  background: #fffdf7;
  color: #1b1e19;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(input, select, textarea):focus {
  border-color: #8b9c4d;
  box-shadow: 0 0 0 3px rgba(120, 143, 19, .1);
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(
  .booking-service-grid button,
  .booking-choice-row button,
  .slot-offset-button,
  .booking-slots button,
  .booking-price-grid button,
  .booking-price-half button,
  .confirmation-adjust-row button
) {
  border-color: #c9c2b0;
  background: #fffdf7;
  color: #55584f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(
  .booking-service-grid button,
  .booking-choice-row button,
  .slot-offset-button,
  .booking-slots button,
  .booking-price-grid button,
  .booking-price-half button,
  .confirmation-adjust-row button
):not(:disabled):hover {
  border-color: #9aa76c;
  background: #f6f6e9;
  color: #3f4a16;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(
  .booking-service-grid button.active,
  .booking-service-grid button[aria-pressed="true"],
  .booking-choice-row button.active,
  .booking-choice-row button[aria-pressed="true"],
  .slot-offset-button.active,
  .slot-offset-button[aria-pressed="true"],
  .booking-slots button.active,
  .booking-price-grid button.active,
  .booking-price-grid button[aria-pressed="true"],
  .booking-price-half button.active,
  .booking-price-half button[aria-pressed="true"]
) {
  border-color: #6f8610;
  background: #788f13;
  color: #fffef8;
  box-shadow: inset 0 -2px rgba(0, 0, 0, .14), 0 0 0 1px rgba(120, 143, 19, .1);
  font-weight: 850;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog :is(
  .booking-service-grid button.active,
  .booking-service-grid button[aria-pressed="true"],
  .booking-choice-row button.active,
  .booking-choice-row button[aria-pressed="true"],
  .slot-offset-button.active,
  .slot-offset-button[aria-pressed="true"],
  .booking-slots button.active,
  .booking-price-grid button.active,
  .booking-price-grid button[aria-pressed="true"],
  .booking-price-half button.active,
  .booking-price-half button[aria-pressed="true"]
):hover {
  border-color: #667b0d;
  background: #718711;
  color: #fffef8;
}
html[data-theme="light"] body.ink-control-theme .booking-dialog button:disabled {
  border-color: #d8d2c4;
  background: #f0ece3;
  color: #8b8a82;
  opacity: .68;
}

/* Confirmation dialog: keep every control readable in the light theme. The
   generic Ink Control rules above intentionally use dark button surfaces. */
html[data-theme="light"] body.ink-control-theme .confirmation-dialog {
  border-color: #c8c1af;
  background: #fffdf7;
  color: #1b1e19;
  box-shadow: 0 28px 80px rgba(66, 57, 39, .24);
}
html[data-theme="light"] body.ink-control-theme .confirmation-dialog :is(.form-heading h2, .confirmation-client strong, .confirmation-summary strong, .confirmation-fields strong) {
  color: #1b1e19;
}
html[data-theme="light"] body.ink-control-theme .confirmation-client {
  border-color: #cfc8b7;
  background: #f3efe5;
}
html[data-theme="light"] body.ink-control-theme .confirmation-client span,
html[data-theme="light"] body.ink-control-theme .confirmation-summary span,
html[data-theme="light"] body.ink-control-theme .confirmation-fields span,
html[data-theme="light"] body.ink-control-theme .confirmation-note {
  color: #706f67;
}
html[data-theme="light"] body.ink-control-theme .confirmation-summary > div {
  border-color: #d7d1c2;
  background: #fffdf7;
}
html[data-theme="light"] body.ink-control-theme .confirmation-summary > div.wide {
  grid-column: 1 / -1;
}
html[data-theme="light"] body.ink-control-theme .confirmation-summary > div.wide strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}
html[data-theme="light"] body.ink-control-theme .confirmation-sketch span,
html[data-theme="light"] body.ink-control-theme .confirmation-control span {
  color: #4f5149;
}
html[data-theme="light"] body.ink-control-theme .confirmation-sketch img {
  border-color: #cbc4b2;
  background: #eee9dc;
}
html[data-theme="light"] body.ink-control-theme .confirmation-control {
  border-color: #d2ccbc;
  background: #f5f1e7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-theme="light"] body.ink-control-theme .confirmation-dialog :is(.confirmation-adjust-row button, .confirmation-rest-hours button) {
  border-color: #c9c2b0;
  background: #fffdf7;
  color: #55584f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .85);
}
html[data-theme="light"] body.ink-control-theme .confirmation-dialog :is(.confirmation-adjust-row button, .confirmation-rest-hours button):hover:not(:disabled) {
  border-color: #9aa76c;
  background: #f6f6e9;
  color: #3f4a16;
}
html[data-theme="light"] body.ink-control-theme .confirmation-dialog :is(.confirmation-rest-hours button.active, .confirmation-rest-hours button[aria-pressed="true"]) {
  border-color: #6f8610;
  background: #788f13;
  color: #fffef8;
  box-shadow: inset 0 -2px rgba(0, 0, 0, .14);
}
html[data-theme="light"] body.ink-control-theme .confirmation-dialog button:disabled {
  border-color: #d8d2c4;
  background: #ece7dc;
  color: #8b8a82;
  opacity: .72;
}
html[data-theme="light"] body.ink-control-theme .booking-calendar-preview-button:not(:disabled) {
  border-color: #aebd78;
  background: #eef2dd;
  color: #596b0d;
}
html[data-theme="light"] body.ink-control-theme :is(.booking-master-card, .booking-workplace-card) {
  border-color: #c9c2b0;
  background: #fffdf7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme :is(.booking-master-card, .booking-workplace-card):hover {
  border-color: #aab876;
  background: #f7f8ed;
}
html[data-theme="light"] body.ink-control-theme .session-quick-actions button {
  border-color: #c9c2b0;
  background: #fffdf7;
  color: #55564e;
}
html[data-theme="light"] body.ink-control-theme .session-quick-actions button:hover:not(:disabled) {
  border-color: #aab876;
  background: #f4f5e8;
  color: #43500b;
}
html[data-theme="light"] body.ink-control-theme .session-quick-actions button.active,
html[data-theme="light"] body.ink-control-theme .session-quick-actions button[aria-pressed="true"] {
  border-color: #6f8610;
  background: #788f13;
  color: #fffef8;
  box-shadow: inset 0 -2px rgba(0, 0, 0, .16);
}
html[data-theme="light"] body.ink-control-theme :is(.booking-master-card.active, .booking-workplace-card.active) {
  border-color: #8fa13f;
  background: #eef2dd;
  box-shadow: inset 0 0 0 1px rgba(120, 143, 19, .12);
}
html[data-theme="light"] body.ink-control-theme .booking-empty-choice {
  border-color: #cfc8b7;
  background: rgba(255, 253, 247, .56);
  color: #74746b;
}
html[data-theme="light"] body.ink-control-theme .booking-total-row {
  background: #e9efd0;
}
html[data-theme="light"] body.ink-control-theme .booking-total-row.remaining {
  background: #eee9dc;
}
html[data-theme="light"] body.ink-control-theme .booking-custom-time {
  border-color: #b5c482;
  background: #f2f5e5;
}
html[data-theme="light"] body.ink-control-theme :is(
  .booking-case-card,
  .booking-status-event,
  .mailing-campaign-card,
  .mailing-filter-card,
  .mailing-preview-card,
  .mailing-test-card,
  .mailing-image-block,
  .mailing-filter-chip span,
  .mailing-variable,
  .mailing-selected-recipient,
  .mailing-recipient-result,
  .content-post-card,
  .content-community-card,
  .content-image-block,
  .content-auth-details,
  .content-source-card,
  .content-search-card,
  .employee-dialog-result,
  .vk-scenario-card
) {
  border-color: var(--line);
  background: #f5f1e7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme :is(.mailing-campaign-card.active, .content-post-card.active) {
  border-color: #9aa76c;
  background: #eef2dd;
}
html[data-theme="light"] body.ink-control-theme .content-post-view-switch { background: #eee9dc; }
html[data-theme="light"] body.ink-control-theme .content-post-view-switch button.active {
  background: #fffdf7;
  color: #5f7500;
}
html[data-theme="light"] body.ink-control-theme .content-post-calendar-header button,
html[data-theme="light"] body.ink-control-theme .content-post-calendar-day {
  border-color: var(--line);
  background: #fffdf7;
  color: #686a61;
}
html[data-theme="light"] body.ink-control-theme .content-post-calendar-day.has-posts {
  border-color: #aebd78;
  background: #eef2dd;
  color: #4e5e0b;
}
html[data-theme="light"] body.ink-control-theme :is(.automation-board-bucket-heading i, .automation-status) {
  background: #e8e2d4;
  color: #66675f;
}
html[data-theme="light"] body.ink-control-theme .update-card ul { color: #53554e; }
html[data-theme="light"] body.ink-control-theme :is(.estimation-card, .estimation-empty) {
  border-color: var(--line);
  background: #fffdf7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme .estimation-card label,
html[data-theme="light"] body.ink-control-theme .estimation-archive-value { color: #55574f; }
html[data-theme="light"] body.ink-control-theme .sketch-viewer-dialog,
html[data-theme="light"] body.ink-control-theme .training-shot {
  border-color: var(--line);
  background: #fffdf7;
  color: var(--text);
}
html[data-theme="light"] body.ink-control-theme :is(.training-shot img, .training-image-sheet img) { background: #f5f1e7; }
html[data-theme="light"] body.ink-control-theme .toast { background: #fffdf7; box-shadow: 0 12px 42px rgba(66,57,39,.20); }
html[data-theme="light"] body.ink-control-theme .calendar-header-delete { border-color: #c8c1b1 !important; }

@media (max-width: 820px) {
  .ink-control-theme .section-brand-row { gap: 8px; }
  .ink-control-theme .section-brand-row > :nth-child(2) { min-width: 0; }
  .ink-control-theme .section-brand-row h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ink-control-theme .section-header-actions:has(.notification-center-button) {
    width: auto;
    min-width: 0;
    gap: 4px;
  }
  .ink-control-theme .section-header-actions:has(.notification-center-button) .icon-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .ink-control-theme .notification-center-count { top: -4px; right: -4px; }
  html[data-theme="light"] body.ink-control-theme .workspace { background: var(--bg); }
  html[data-theme="light"] body.ink-control-theme :is(.calendar-toolbar, .deals-toolbar) { background: #f5f1e7; }
  html[data-theme="light"] body.ink-control-theme .deals-toolbar { background: rgba(255,253,247,.94); }
}

@media (max-width: 460px) {
  html[data-theme="light"] body.ink-control-theme .notification-center-item > span {
    display: grid;
    gap: 3px;
  }
  html[data-theme="light"] body.ink-control-theme .notification-center-item time { font-size: 9px; }
}
/* Theme background shorthands reset background-size. Keep the whole avatar,
   including portrait/landscape sources, visible in every theme and layout. */
html[data-theme] body.ink-control-theme :is(.conversation-avatar, .avatar),
.conversation-avatar, .avatar {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.message-sticker img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}
.conversation-sync-feedback { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 6px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.conversation-sync-feedback > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.conversation-sync-feedback > button { flex: 0 0 auto; }
[data-conversation-sync][aria-busy="true"] svg { animation: conversation-sync-spin 1s linear infinite; }
@keyframes conversation-sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { [data-conversation-sync][aria-busy="true"] svg { animation: none; } }
/* Gesture feedback occupies no layout space and never intercepts a tap. */
@media (max-width: 820px) {
  #messages.swipe-back-enabled { touch-action: pan-y pinch-zoom; }
  #messages.swipe-back-ready::after {
    content: '←'; position: fixed; left: 22px; top: 55%; z-index: 20;
    display: grid; place-items: center; width: 44px; height: 44px;
    border-radius: 50%; background: #7e9011; color: white; font-size: 28px;
    pointer-events: none; box-shadow: 0 2px 12px #0003;
  }
}

.mailing-report-counts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; margin: 1rem 0; }
.mailing-report-counts dt { overflow-wrap: anywhere; }
.mailing-report-counts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
#mailing-delivery-report .form-heading { flex-wrap: wrap; gap: .5rem; }
