  :root {
    --crm-locked-background: #f2f2f7;
    --crm-auth-overlay-background: rgba(242,243,247,.44);
    --crm-auth-card-background: rgba(255,255,255,.97);
    --crm-auth-card-border: rgba(27,30,38,.14);
    --crm-auth-card-color: #1b1d24;
    --crm-auth-card-shadow: 0 28px 80px rgba(35,39,51,.24);
    --crm-auth-muted: #686e7b;
    --crm-auth-label: #545a67;
    --crm-auth-field-background: #f7f8fa;
    --crm-auth-field-border: #cfd4de;
    --crm-auth-field-color: #17191f;
    --crm-auth-panel-background: #f4f6f8;
    --crm-auth-panel-border: #d7dce5;
    --crm-auth-accent-color: #217f73;
    --crm-auth-error-color: #c9372c;
    --crm-auth-info-color: #285d56;
    --crm-auth-recovery-color: #4e391b;
    --crm-auth-recovery-code: #845714;
    --crm-auth-empty-color: #777e8b;
    --crm-auth-secondary-color: #555b68;
    --crm-auth-secondary-hover: #1b1d24;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  [data-normalization-view][aria-hidden="true"] { display: none; }
  body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f2f2f7; color: #1a1a1a; }
  .crm { display: flex; min-height: 100vh; transition: filter .25s ease, opacity .25s ease, transform .25s ease; }
  body.crm-locked { overflow: hidden; background: var(--crm-locked-background); }
  body.crm-profile-editing { overflow: hidden; }
  body.crm-locked:not(.crm-auth-checking,.crm-entry-pending) .crm,
  body.crm-profile-editing .crm { filter: blur(5px) saturate(.76); opacity: .76; transform: scale(1.008); pointer-events: none; user-select: none; }
  body.crm-auth-checking .crm,
  body.crm-entry-pending .crm { visibility: hidden; }
  .crm-auth-overlay { position: fixed; z-index: 300; inset: 0; display: none; width: 100%; height: 100dvh; align-items: flex-start; justify-content: center; overflow-x: hidden; overflow-y: auto; padding: max(72px,9vh) 20px max(24px,env(safe-area-inset-bottom)); background: var(--crm-auth-overlay-background); backdrop-filter: blur(2px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  body.crm-locked .crm-auth-overlay,
  body.crm-profile-editing .crm-auth-overlay { display: flex; }
  body.crm-auth-checking .crm-auth-overlay { display: none; }
  body.crm-entry-pending .crm-auth-overlay { display: none; }
  .crm-login-card,
  .crm-profile-card { padding: 28px; border: 1px solid var(--crm-auth-card-border); border-radius: 20px; background: var(--crm-auth-card-background); color: var(--crm-auth-card-color); box-shadow: var(--crm-auth-card-shadow); }
  .crm-login-card { width: min(470px,100%); }
  .crm-profile-card { position: relative; width: min(760px,100%); }
  .crm-profile-close { position: absolute; top: 16px; right: 16px; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--crm-auth-field-border); border-radius: 50%; background: transparent; color: var(--crm-auth-secondary-color); font: inherit; font-size: 23px; line-height: 1; cursor: pointer; }
  .crm-profile-close:hover { border-color: #55c4b5; color: var(--crm-auth-accent-color); }
  .crm-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
  .crm-login-logo { width: 52px; height: 52px; border-radius: 50%; background: #f5f5f5; object-fit: contain; }
  .crm-login-brand-name { font-size: 16px; font-weight: 780; letter-spacing: .045em; }
  .crm-login-brand-sub { margin-top: 4px; color: var(--crm-auth-muted); font-size: 11px; }
  .crm-login-title { font-size: 25px; font-weight: 740; }
  .crm-login-copy { margin-top: 7px; color: var(--crm-auth-muted); font-size: 13px; line-height: 1.45; }
  .crm-profile-card.is-invite-registration { border-color: rgba(85,196,181,.46); box-shadow: var(--crm-auth-card-shadow), 0 0 0 1px rgba(85,196,181,.08); }
  .crm-profile-card.is-invite-registration .crm-login-brand { margin-bottom: 18px; }
  .crm-profile-card.is-invite-registration .crm-login-brand-sub { color: var(--crm-auth-accent-color); font-weight: 800; letter-spacing: .12em; }
  .crm-profile-card.is-invite-registration .crm-login-title { color: var(--crm-auth-accent-color); font-size: clamp(36px,4vw,46px); font-weight: 820; letter-spacing: -.035em; line-height: 1.04; }
  .crm-profile-card.is-invite-registration .crm-login-copy { margin-top: 14px; padding: 14px 16px; border-left: 4px solid #43b7a8; border-radius: 0 12px 12px 0; background: rgba(67,183,168,.12); color: var(--crm-auth-card-color); font-size: 16px; font-weight: 650; line-height: 1.5; }
  .crm-profile-card.is-invite-registration .crm-login-form { margin-top: 20px; }
  .crm-profile-card.is-invite-registration .crm-profile-user { border-color: rgba(85,196,181,.34); }
  .crm-profile-change-notice { margin-top: 14px; padding: 11px 13px; border: 1px solid rgba(85,196,181,.34); border-radius: 11px; background: rgba(67,183,168,.1); color: var(--crm-auth-info-color); font-size: 12px; font-weight: 650; line-height: 1.45; }
  .crm-profile-change-notice[hidden] { display: none; }
  .crm-profile-change-notice strong { color: var(--crm-auth-accent-color); }
  .crm-login-form { display: flex; flex-direction: column; gap: 13px; margin-top: 22px; }
  .crm-login-form[hidden] { display: none; }
  .crm-login-field { display: flex; flex-direction: column; gap: 7px; color: var(--crm-auth-label); font-size: 11px; font-weight: 700; }
  .crm-login-field input { width: 100%; padding: 13px 14px; border: 1px solid var(--crm-auth-field-border); border-radius: 11px; outline: none; background: var(--crm-auth-field-background); color: var(--crm-auth-field-color); font: inherit; font-size: 14px; }
  .crm-login-field input:focus { border-color: #55c4b5; box-shadow: 0 0 0 3px rgba(85,196,181,.14); }
  .crm-login-submit { min-height: 45px; margin-top: 3px; border: 0; border-radius: 11px; background: #43b7a8; color: #071411; font: inherit; font-size: 14px; font-weight: 780; cursor: pointer; }
  .crm-login-submit:hover { background: #55c4b5; }
  .crm-login-submit:disabled { cursor: wait; opacity: .65; }
  .crm-login-error { min-height: 18px; color: var(--crm-auth-error-color); font-size: 11px; line-height: 1.35; }
  .crm-mfa-setup { display: grid; gap: 8px; margin-top: 18px; padding: 13px; border: 1px solid rgba(85,196,181,.32); border-radius: 11px; background: rgba(67,183,168,.09); color: var(--crm-auth-label); font-size: 11px; }
  .crm-mfa-setup[hidden] { display: none; }
  .crm-mfa-setup code { overflow-wrap: anywhere; color: var(--crm-auth-accent-color); font-size: 15px; font-weight: 760; letter-spacing: .08em; }
  .crm-mfa-recovery { display: grid; gap: 12px; margin: 20px 0 14px; padding: 14px; border: 1px solid rgba(255,190,92,.34); border-radius: 11px; background: rgba(255,190,92,.09); color: var(--crm-auth-recovery-color); font-size: 12px; line-height: 1.45; }
  .crm-mfa-recovery[hidden] { display: none; }
  .crm-mfa-recovery code { white-space: pre-wrap; color: var(--crm-auth-recovery-code); font-size: 14px; font-weight: 760; letter-spacing: .04em; line-height: 1.7; }
  .crm-profile-card[hidden],
  .crm-login-card[hidden] { display: none; }
  .crm-profile-user { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--crm-auth-panel-border); border-radius: 13px; background: var(--crm-auth-panel-background); }
  .crm-profile-avatar-column { display: flex; width: 92px; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 8px; }
  .crm-profile-avatar { display: flex; width: 72px; height: 72px; flex: 0 0 auto; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: rgba(67,183,168,.16); color: var(--crm-auth-accent-color); font-size: 17px; font-weight: 800; }
  .crm-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .crm-profile-avatar-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .crm-profile-avatar-actions button,
  .crm-profile-avatar-upload { padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--crm-auth-accent-color); font: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
  .crm-profile-avatar-actions button { color: var(--crm-auth-error-color); }
  .crm-profile-avatar-actions button:hover,
  .crm-profile-avatar-upload:hover { background: rgba(67,183,168,.1); }
  .crm-profile-avatar-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .crm-profile-identity-fields { display: grid; min-width: 0; flex: 1; grid-template-columns: 1fr 1fr; gap: 9px; }
  .crm-profile-identity-field { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: var(--crm-auth-muted); font-size: 9px; font-weight: 700; }
  .crm-profile-identity-field:first-child { grid-column: 1/-1; }
  .crm-profile-identity-field input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--crm-auth-field-border); border-radius: 9px; outline: none; background: var(--crm-auth-field-background); color: var(--crm-auth-field-color); font: inherit; font-size: 12px; font-weight: 600; }
  .crm-profile-identity-field input:focus { border-color: #55c4b5; box-shadow: 0 0 0 3px rgba(85,196,181,.12); }
  .crm-profile-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .crm-profile-details select { width: 100%; padding: 13px 14px; border: 1px solid var(--crm-auth-field-border); border-radius: 11px; outline: none; background: var(--crm-auth-field-background); color: var(--crm-auth-field-color); font: inherit; font-size: 14px; }
  .crm-profile-details select:focus { border-color: #55c4b5; box-shadow: 0 0 0 3px rgba(85,196,181,.14); }
  .crm-profile-telegram { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 13px; border: 1px solid var(--crm-auth-panel-border); border-radius: 12px; background: var(--crm-auth-panel-background); }
  .crm-profile-telegram > div:first-child { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
  .crm-profile-telegram strong { color: var(--crm-auth-label); font-size: 12px; }
  .crm-profile-telegram span { color: var(--crm-auth-muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
  .crm-profile-telegram .crm-profile-telegram-help { max-width: 480px; }
  .crm-profile-telegram-help code { display: inline-block; max-width: 100%; color: var(--crm-auth-label); font-size: 10px; overflow-wrap: anywhere; user-select: all; }
  .crm-profile-telegram-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
  .crm-profile-telegram-actions button,
  .crm-profile-telegram-actions a { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 7px 10px; border: 1px solid #43b7a8; border-radius: 8px; background: transparent; color: var(--crm-auth-accent-color); font: inherit; font-size: 10px; font-weight: 750; text-decoration: none; cursor: pointer; }
  .crm-profile-telegram-actions .primary { background: #43b7a8; color: #071411; }
  .crm-profile-telegram-actions .danger { border-color: rgba(201,55,44,.42); color: var(--crm-auth-error-color); }
  [data-profile-self-only][hidden] { display: none !important; }
  .crm-profile-rights-label { margin-top: 4px; color: var(--crm-auth-label); font-size: 11px; font-weight: 700; }
  .crm-profile-rights { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
  .crm-profile-right { display: flex; min-height: 47px; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid rgba(67,183,168,.28); border-radius: 10px; background: rgba(67,183,168,.09); color: var(--crm-auth-info-color); font-size: 11px; font-weight: 650; line-height: 1.3; }
  .crm-profile-right::before { content: '✓'; display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 6px; background: #43b7a8; color: #071411; font-size: 12px; font-weight: 900; }
  .crm-profile-rights-empty { grid-column: 1/-1; padding: 12px; border: 1px dashed var(--crm-auth-field-border); border-radius: 10px; color: var(--crm-auth-empty-color); font-size: 11px; text-align: center; }
  .crm-profile-actions { display: grid; grid-template-columns: 1fr 1.45fr; gap: 9px; margin-top: 3px; }
  .crm-profile-back { min-height: 45px; border: 1px solid var(--crm-auth-field-border); border-radius: 11px; background: transparent; color: var(--crm-auth-secondary-color); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
  .crm-profile-back:hover { border-color: #555b68; color: var(--crm-auth-secondary-hover); }
  @media (min-width: 521px) and (max-height: 820px) {
    .crm-auth-overlay { padding: 16px 20px; }
    .crm-profile-card { padding: 20px 24px; }
    .crm-profile-card .crm-login-brand { margin-bottom: 14px; }
    .crm-profile-card .crm-login-logo { width: 44px; height: 44px; }
    .crm-profile-card .crm-login-title { font-size: 23px; }
    .crm-profile-card .crm-login-copy { margin-top: 5px; }
    .crm-profile-card.is-invite-registration .crm-login-title { font-size: 34px; }
    .crm-profile-card.is-invite-registration .crm-login-copy { margin-top: 9px; padding: 10px 13px; font-size: 13px; }
    .crm-profile-card .crm-profile-change-notice { margin-top: 10px; padding: 8px 11px; }
    .crm-profile-card .crm-login-form { gap: 9px; margin-top: 14px; }
    .crm-profile-card .crm-profile-user { padding: 10px; }
    .crm-profile-card .crm-login-field input { padding: 10px 12px; }
    .crm-profile-card .crm-profile-rights { gap: 6px; margin-top: 6px; }
    .crm-profile-card .crm-profile-right { min-height: 40px; padding: 7px 9px; }
    .crm-profile-card .crm-profile-actions { margin-top: 0; }
  }
  @media (max-width: 520px) {
    .crm-auth-overlay {
      height: 100%;
      max-height: 100dvh;
      justify-content: flex-start;
      overflow-y: scroll;
      scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom));
      padding: max(12px,env(safe-area-inset-top)) 10px calc(96px + env(safe-area-inset-bottom));
    }
    .crm-login-card,
    .crm-profile-card { width: 100%; flex: 0 0 auto; margin: 0 auto; padding: 18px 16px; border-radius: 16px; }
    .crm-login-brand { gap: 10px; margin-bottom: 17px; }
    .crm-login-logo { width: 44px; height: 44px; }
    .crm-login-brand-name { font-size: clamp(13px,4vw,16px); letter-spacing: .025em; }
    .crm-login-brand-sub { font-size: 10px; }
    .crm-login-title { font-size: clamp(22px,7vw,28px); line-height: 1.08; }
    .crm-login-copy { font-size: 12px; }
    .crm-profile-card.is-invite-registration .crm-login-title { font-size: clamp(30px,9vw,38px); }
    .crm-profile-card.is-invite-registration .crm-login-copy { padding: 12px 13px; font-size: 14px; }
    .crm-login-form { gap: 11px; margin-top: 17px; }
    .crm-profile-user { align-items: center; }
    .crm-profile-identity-fields { grid-template-columns: 1fr; }
    .crm-profile-identity-field:first-child { grid-column: auto; }
    .crm-profile-details { grid-template-columns: 1fr; gap: 11px; }
    .crm-profile-rights { grid-template-columns: 1fr; }
    .crm-invite-overlay { align-items: flex-end; padding: 8px; }
    .crm-invite-dialog { max-height: calc(100dvh - 16px); padding: 18px 16px max(18px,env(safe-area-inset-bottom)); border-radius: 16px; }
    .crm-invite-permissions { grid-template-columns: 1fr; }
    .crm-invite-sensitive-permissions { grid-template-columns: 1fr; }
    .crm-invite-result-row { flex-direction: column; }
    .crm-invite-copy { min-height: 40px; }
    .crm-invite-history-accepted { grid-template-columns: 1fr; }
    .crm-invite-history-profile { grid-column: 1; grid-row: auto; }
    .crm-profile-actions {
      position: static;
      z-index: auto;
      bottom: auto;
      grid-template-columns: .85fr 1.45fr;
      margin: 4px 0 0;
      padding: 0 0 max(12px,env(safe-area-inset-bottom));
      background: none;
    }
    .crm-profile-actions .crm-login-submit,
    .crm-profile-actions .crm-profile-back { min-height: 52px; }
  }

/* Recovery stays visible when a later stylesheet fails to load. */
.crm-release-session-notice, .crm-delivery-status {
  position: fixed;
  z-index: 2147483000;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(640px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #43b7a8;
  border-radius: 12px;
  background: var(--bg-card, #192124);
  color: var(--text-primary, #eef5f4);
  box-shadow: 0 8px 24px #0003;
  font: inherit;
  font-size: 13px;
}
.crm-release-session-notice button, .crm-delivery-status button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #43b7a8;
  color: #071b19;
  font: inherit;
}

crm-editor-layout { display: block; }
.crm-editor-field-region { display: contents; }

/* The shell alone owns root geometry, the viewport and the persistent sidebar. */
html,
body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.crm {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

/* Page-owned portals can outlive their lazy stylesheet during navigation. */
.pv2-retention-drawer[aria-hidden="true"] {
  display: none !important;
}

.sidebar { width: 230px; flex-shrink: 0; background: #fff; border-right: 1px solid #e5e5e5; padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-header { display: flex; align-items: center; gap: 5px; }
.sidebar-body { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 20px; }
.mobile-menu-button,
.mobile-menu-backdrop { display: none; }
.logo { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; padding: 4px 6px; border: 0; border-radius: 10px; background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.logo:hover { background: #f5f5f7; }
.logo:active { transform: translateY(1px); }
.logo:focus-visible { outline: 2px solid #43b7a8; outline-offset: 2px; }
.logo-mark { width: 48px; height: 48px; flex: 0 0 auto; object-fit: contain; }
.logo-wordmark { min-width: 0; color: #111; font-size: 12px; font-weight: 760; line-height: 1; letter-spacing: .07em; white-space: nowrap; }
.sidebar-navigation-settings,
.desktop-sidebar-toggle,
.desktop-sidebar-edge-trigger { display: none; }

@media (min-width: 701px) {
  body:is(.crm-auth-checking, .crm-entry-pending) .crm > :is(#crm-sidebar, #desktop-sidebar-edge-trigger) {
    display: none;
  }
  .crm { padding-left: 230px; transition: padding-left .22s ease, filter .25s ease, transform .25s ease; }
  .sidebar {
    position: fixed;
    z-index: 105;
    inset: 0 auto 0 0;
    height: 100dvh;
    overflow: visible;
    transform: translateX(0);
    visibility: visible;
    transition: width .22s ease, transform .22s ease, visibility 0s;
  }
  body.sidebar-navigation-editing .crm { padding-left: 360px; }
  body.sidebar-navigation-editing .sidebar { width: 360px; }
  .sidebar-header { position: relative; z-index: 3; min-height: 56px; background: #fff; }
  .sidebar-header .logo { gap: 7px; padding-right: 0; }
  .sidebar-body {
    /* Put the scroll track at the panel edge, outside the navigation controls. */
    margin-right: -14px;
    padding-right: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--crm-sidebar-nav-text) transparent;
  }
  .sidebar-body::-webkit-scrollbar { width: 4px; }
  .sidebar-body::-webkit-scrollbar-track { background: transparent; }
  .sidebar-body::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--crm-sidebar-nav-text); }
  .sidebar-navigation-settings,
  .desktop-sidebar-toggle {
    position: absolute;
    top: -8px;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe1e6;
    border-radius: 7px;
    background: #fff;
    color: #6f7480;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
  }
  .desktop-sidebar-toggle { right: -7px; }
  .sidebar-navigation-settings { right: 22px; }
  .sidebar-navigation-settings:hover,
  .desktop-sidebar-toggle:hover { border-color: #c6cbd3; background: #f5f5f7; color: #252830; }
  .sidebar-navigation-settings[aria-pressed="true"] { border-color: #43b7a8; background: rgba(67,183,168,.12); color: #258f82; }
  .sidebar-navigation-settings:active,
  .desktop-sidebar-toggle:active { transform: scale(.95); }
  .sidebar-navigation-settings:focus-visible,
  .desktop-sidebar-toggle:focus-visible { outline: 2px solid #43b7a8; outline-offset: 2px; }
  .sidebar-navigation-settings svg,
  .desktop-sidebar-toggle svg { width: 14px; height: 14px; }
  .sidebar-navigation-settings::after,
  .desktop-sidebar-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 4;
    top: 50%;
    left: calc(100% + 9px);
    width: max-content;
    max-width: 220px;
    padding: 7px 9px;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    background: #fff;
    color: #343741;
    box-shadow: 0 8px 24px rgba(18,21,29,.14);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    pointer-events: none;
    opacity: 0;
    transform: translate(4px,-50%);
    transition: opacity .14s ease, transform .14s ease;
  }
  .sidebar-navigation-settings::after { top: calc(100% + 9px); right: 0; left: auto; transform: translateY(-4px); }
  .sidebar-navigation-settings:hover::after,
  .sidebar-navigation-settings:focus-visible::after { opacity: 1; transform: translateY(0); }
  .desktop-sidebar-toggle:hover::after,
  .desktop-sidebar-toggle:focus-visible::after { opacity: 1; transform: translate(0,-50%); }
  body.desktop-sidebar-collapsed .crm { padding-left: 0; }
  body.desktop-sidebar-collapsed .sidebar {
    transform: translateX(calc(-100% - 2px));
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  body.desktop-sidebar-collapsed .desktop-sidebar-edge-trigger {
    position: fixed;
    z-index: 104;
    inset: 0 auto 0 0;
    display: block;
    width: 12px;
    height: 100dvh;
    padding: 0;
    border: 0;
    background: transparent;
  }
  body.desktop-sidebar-collapsed .desktop-sidebar-edge-trigger:focus-visible { outline: 2px solid #43b7a8; outline-offset: -2px; }
  body.desktop-sidebar-collapsed.desktop-sidebar-peek .sidebar {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 18px 0 48px rgba(18,21,29,.18);
    transition: transform .22s ease, visibility 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm,
  .sidebar,
  .sidebar-navigation-settings,
  .sidebar-navigation-settings::after,
  .desktop-sidebar-toggle,
  .desktop-sidebar-toggle::after { transition-duration: .01ms !important; }
}
.crm-page-load-error { display:flex; align-items:center; gap:16px; padding:16px; margin:12px 0; border:1px solid var(--crm-border-strong); border-radius:12px; background:var(--crm-surface-solid); color:var(--crm-text); }
.crm-page-load-error button { flex-shrink:0; padding:8px 12px; border:1px solid var(--crm-border-strong); border-radius:8px; background:var(--crm-surface-soft); color:var(--crm-text); cursor:pointer; }
.crm-page-load-error button:hover { background:var(--crm-surface-hover); }
.crm-page-load-error button:focus-visible { outline:2px solid var(--crm-focus-ring); outline-offset:2px; }

.crm-section-timing {
  position:fixed; inset:auto 16px 16px auto; z-index:8000;
  width:min(680px, calc(100vw - 32px)); max-height:36vh; overflow:auto;
  padding:12px; border:1px solid var(--crm-border-strong); border-radius:12px;
  background:var(--crm-surface-solid); color:var(--crm-text); font-size:13px; line-height:1.5;
  overflow-wrap:anywhere;
}
.crm-section-timing button { margin:0 6px 8px 0; }
.crm-section-timing summary { cursor:pointer; }

  .nav-group { display: flex; flex-direction: column; gap: 3px; }
  .sidebar-nav-group[hidden] { display: none; }
  .nav-section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #aaa; padding: 0 10px; margin: 8px 0 4px; font-weight: 600; }
  .sidebar-group-title { display: flex; align-items: center; gap: 6px; }
  .sidebar-group-title-edit-only { display: none; }
  body.sidebar-navigation-editing .sidebar-group-title-edit-only { display: flex; }
  .sidebar-group-drag-handle,
  .sidebar-item-drag-handle,
  .sidebar-visibility,
  .sidebar-startup { display: none; border: 0; background: transparent; color: #9499a3; }
  .sidebar-group-drag-handle,
  .sidebar-item-drag-handle { cursor: grab; }
  body.sidebar-navigation-editing .sidebar-group-drag-handle { display: inline-flex; width: 19px; height: 19px; flex: 0 0 auto; align-items: center; justify-content: center; margin: -5px 0 -5px -6px; padding: 2px; border-radius: 5px; }
  .sidebar-group-drag-handle:hover { background: #eef0f3; color: #5d626d; }
  .sidebar-group-drag-handle svg { width: 13px; height: 13px; }
  .sidebar-group-drag-handle:active,
  .sidebar-item-drag-handle:active { cursor: grabbing; }
  .sidebar-group-drag-handle:focus-visible,
  .sidebar-item-drag-handle:focus-visible,
  .sidebar-visibility:focus-visible,
  .sidebar-startup:focus-visible { outline: 2px solid #43b7a8; outline-offset: 1px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: #666; cursor: pointer; transition: all 0.15s; border: none; background: transparent; width: 100%; text-align: left; }
  .nav-item:hover { background: #f5f5f7; color: #1a1a1a; }
  .nav-item.active { background: #1a1a1a; color: #fff; font-weight: 500; }
  .nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
  .nav-item-symbol { display: inline-flex; width: 17px; height: 17px; flex: 0 0 auto; align-items: center; justify-content: center; font-size: 16px; line-height: 1; }
  .sidebar-nav-list { display: flex; flex-direction: column; gap: 3px; }
  .sidebar-nav-row { position: relative; border-radius: 8px; }
  .sidebar-nav-row[hidden] { display: none; }
  .sidebar-nav-row .nav-item { padding-right: 10px; }
  body.sidebar-navigation-editing .sidebar-nav-row .nav-item { padding-right: 121px; }
  body.sidebar-navigation-editing .sidebar-nav-row.is-user-hidden { opacity: .5; }
  body.sidebar-navigation-editing .sidebar-nav-row.is-user-hidden .nav-item { color: #9296a0; }
  .sidebar-nav-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-item-drag-handle,
  .sidebar-visibility,
  .sidebar-startup { position: absolute; z-index: 3; top: 50%; width: 26px; height: 26px; align-items: center; justify-content: center; padding: 4px; border-radius: 7px; transform: translateY(-50%); }
  .sidebar-item-drag-handle { right: 89px; }
  .sidebar-startup { right: 61px; cursor: pointer; }
  .sidebar-visibility { right: 33px; cursor: pointer; }
  .sidebar-item-drag-handle:hover,
  .sidebar-visibility:hover,
  .sidebar-startup:hover { background: #eef0f3; color: #4f5560; }
  .sidebar-startup.is-startup { background: rgba(67,183,168,.13); color: #258f82; }
  .sidebar-visibility.is-hidden { color: #b2605b; }
  .sidebar-item-drag-handle svg,
  .sidebar-visibility svg,
  .sidebar-startup svg { width: 16px; height: 16px; }
  body.sidebar-navigation-editing .sidebar-item-drag-handle,
  body.sidebar-navigation-editing .sidebar-visibility,
  body.sidebar-navigation-editing .sidebar-startup { display: inline-flex; }
  body.sidebar-navigation-editing .sidebar-favorite { visibility: visible; pointer-events: auto; opacity: 1; transition-delay: 0s; }
  .sidebar-favorite { position: absolute; z-index: 2; top: 50%; right: 0; display: inline-flex; width: 27px; height: 27px; align-items: center; justify-content: center; transform: translateY(-50%); visibility: hidden; border: 0; border-radius: 7px; background: transparent; color: #a3a6ae; font: inherit; font-size: 17px; line-height: 1; cursor: pointer; pointer-events: none; opacity: 0; transition: visibility 0s linear .15s, background .15s ease, color .15s ease, opacity .15s ease, transform .15s ease; }
  body.sidebar-navigation-editing .sidebar-favorite { right: 6px; }
  .sidebar-nav-row:hover .sidebar-favorite,
  .sidebar-nav-row .nav-item:focus-visible ~ .sidebar-favorite,
  .sidebar-nav-row .sidebar-favorite:focus-visible,
  .sidebar-nav-row.is-dragging .sidebar-favorite { visibility: visible; pointer-events: auto; opacity: 1; transition-delay: 0s; }
  .sidebar-favorite:hover { background: rgba(236,174,45,.12); color: #d99b16; }
  .sidebar-favorite:active { transform: translateY(-50%) scale(.92); }
  .sidebar-favorite.is-favorite { color: #e3a11c; }
  .sidebar-favorite:focus-visible,
  .sidebar-nav-toggle:focus-visible { outline: 2px solid #43b7a8; outline-offset: 1px; }
  .sidebar-nav-row.is-dragging { z-index: 3; background: rgba(67,183,168,.1); box-shadow: 0 7px 18px rgba(22,33,38,.15); opacity: .84; }
  .sidebar-nav-row.is-dragging .nav-item { cursor: grabbing; }
  .sidebar-nav-row.is-drop-before::before,
  .sidebar-nav-row.is-drop-after::after { content: ''; position: absolute; z-index: 4; right: 8px; left: 8px; height: 2px; border-radius: 2px; background: #43b7a8; pointer-events: none; }
  .sidebar-nav-row.is-drop-before::before { top: -2px; }
  .sidebar-nav-row.is-drop-after::after { bottom: -2px; }
  .sidebar-nav-group.is-group-dragging { z-index: 3; border-radius: 10px; background: rgba(67,183,168,.08); box-shadow: 0 8px 22px rgba(22,33,38,.14); opacity: .84; }
  .sidebar-nav-group.is-group-drop-before::before,
  .sidebar-nav-group.is-group-drop-after::after { content: ''; display: block; height: 3px; flex: 0 0 auto; border-radius: 3px; background: #43b7a8; }
  body.sidebar-navigation-dragging,
  body.sidebar-navigation-group-dragging { cursor: grabbing; user-select: none; }
  .sidebar-favorites-empty { padding: 7px 10px; color: #a0a4ad; font-size: 10px; line-height: 1.35; }
  .sidebar-favorites-empty[hidden] { display: none; }
  .sidebar-nav-toggle { display: flex; width: 100%; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; border: 1px dashed #d8dbe2; border-radius: 8px; background: transparent; color: #8c909a; font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
  .sidebar-nav-toggle:hover { border-color: #bfc4cd; background: #f5f5f7; color: #555a65; }
  .sidebar-nav-toggle[hidden] { display: none; }
  .sidebar-nav-toggle-arrow { font-size: 13px; transition: transform .18s ease; }
  .sidebar-nav-toggle[aria-expanded="true"] .sidebar-nav-toggle-arrow { transform: rotate(180deg); }
  .sidebar-navigation-status { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* Main */
  .main { flex: 1; padding: 20px 28px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
  .topbar { display: flex; align-items: flex-start; justify-content: flex-end; gap: 10px; min-width: 0; }
  .crm-online { display: flex; min-height: 38px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 4px 13px; border: 1px solid #dfe8e6; border-radius: 11px; background: #f4fbf9; font: inherit; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
  .crm-online:hover { border-color: rgba(47,186,131,.5); background: #ecf8f5; }
  .crm-online:active { transform: translateY(1px); }
  .crm-online:focus-visible { outline: 2px solid #43b7a8; outline-offset: 2px; }
  .crm-online-status { display: flex; align-items: center; gap: 6px; color: #55716c; font-size: 12px; font-weight: 700; white-space: nowrap; }
  .crm-online-value { min-width: 20px; color: #1b9d6f; font-size: 23px; font-weight: 750; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
  .crm-online.is-loading .crm-online-value { color: #91a19e; }
  .icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e5e5e5; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; position: relative; }
  .icon-btn:hover { background: #f5f5f7; }
  .icon-btn svg { width: 17px; height: 17px; }
  .user-chip { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 24px; border: 1px solid #e5e5e5; background: #fff; font-size: 12px; font-weight: 500; cursor: pointer; }
  .avatar { width: 30px; height: 30px; border-radius: 50%; background: #e5e5e5; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #666; }
  .settings-stack { display: flex; flex: 0 0 auto; flex-direction: row; align-items: flex-start; gap: 7px; }
  .settings { position: relative; flex: 0 0 auto; }
  .settings-button { margin-top: 0; }
  .settings-portal-anchor { position: fixed; z-index: 520; top: var(--settings-portal-top, 0); right: var(--settings-portal-right, 12px); width: 0; height: 0; }
  .settings-portal-anchor .settings-menu { z-index: 1; }
  .access-header-add { display: none; width: auto; min-width: max-content; padding: 0 13px; gap: 7px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
  .access-header-invite,
  .access-header-invite-history { display: none; width: auto; min-width: max-content; padding: 0 13px; gap: 7px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
  .access-header-invite-symbol { color: #43b7a8; font-size: 17px; font-weight: 750; line-height: 1; }
  .access-header-invite-history-symbol { color: #7d8b9f; font-size: 18px; font-weight: 750; line-height: 1; }
  .access-header-add-plus { color: #24b77d; font-size: 22px; font-weight: 650; line-height: 1; }
  #page-access.active #global-topbar .access-header-invite,
  #page-access.active #global-topbar .access-header-invite-history,
  #page-access.active #global-topbar .access-header-add { display: flex; }
  #page-access.active #global-topbar .access-header-invite.permission-denied,
  #page-access.active #global-topbar .access-header-invite-history.permission-denied,
  #page-access.active #global-topbar .access-header-add.permission-denied { display: none; }
  #page-access.active #global-topbar .period-control { display: none; }
  #page-access.active .access-page-heading { order: 1; }
  #page-access.active #global-topbar { order: 2; margin-left: auto; }
  #page-access.active .access-page-close { order: 3; }
  #page-audit.active #global-topbar .period-control,
  #page-audit.active #global-topbar .access-header-add { display: none; }
  #page-audit.active .audit-page-heading { order: 1; }
  #page-audit.active #global-topbar { order: 2; margin-left: auto; }
  #page-audit.active .audit-page-close { order: 3; }
  .crm-invite-overlay { position: fixed; z-index: 360; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5,7,11,.7); backdrop-filter: blur(3px); }
  .crm-invite-overlay.open { display: flex; }
  .crm-invite-dialog { width: min(560px,100%); max-height: min(720px,calc(100dvh - 32px)); overflow-y: auto; padding: 24px; border: 1px solid #343945; border-radius: 18px; background: #171a21; box-shadow: 0 28px 80px rgba(0,0,0,.52); color: #f2f4f7; }
  .crm-invite-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
  .crm-invite-dialog h2 { margin: 0; font-size: 21px; line-height: 1.2; }
  .crm-invite-dialog-copy { margin: 7px 0 0; color: #999fab; font-size: 12px; line-height: 1.5; }
  .crm-invite-dialog-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #373c47; border-radius: 9px; background: #111318; color: #aeb4c0; font: inherit; font-size: 20px; cursor: pointer; }
  .crm-invite-permissions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
  .crm-invite-permission { display: flex; min-height: 48px; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #343945; border-radius: 10px; background: #12151b; color: #d7dbe2; font-size: 11px; font-weight: 650; cursor: pointer; }
  .crm-invite-sensitive-permissions { display: grid; grid-column: 1/-1; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
  .crm-invite-sensitive-permissions .crm-invite-permission { color: #ff756b; }
  .crm-invite-permission input { width: 18px; height: 18px; accent-color: #43b7a8; }
  .crm-invite-permission:has(input:disabled) { cursor: not-allowed; opacity: .45; }
  .crm-invite-permissions.is-readonly { opacity: .62; }
  .crm-invite-rights-note { margin-top: 10px; color: #8f95a2; font-size: 10px; line-height: 1.45; }
  .crm-invite-generate { width: 100%; min-height: 46px; margin-top: 18px; border: 0; border-radius: 11px; background: #43b7a8; color: #071411; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
  .crm-invite-generate:disabled { opacity: .55; cursor: wait; }
  .crm-invite-result { display: none; margin-top: 15px; padding: 12px; border: 1px solid rgba(67,183,168,.35); border-radius: 11px; background: rgba(67,183,168,.08); }
  .crm-invite-result.visible { display: block; }
  .crm-invite-result-label { color: #62cdbf; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
  .crm-invite-result-row { display: flex; gap: 8px; margin-top: 7px; }
  .crm-invite-result input { min-width: 0; flex: 1; padding: 10px; border: 1px solid #39404b; border-radius: 8px; background: #0f1116; color: #f2f4f7; font: inherit; font-size: 11px; }
  .crm-invite-copy { padding: 0 14px; border: 1px solid #43b7a8; border-radius: 8px; background: transparent; color: #64d0c1; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
  .crm-invite-expiry { margin-top: 8px; color: #9298a5; font-size: 10px; }
  .crm-invite-error { min-height: 17px; margin-top: 10px; color: #ff716d; font-size: 11px; }
  .crm-invite-history-dialog { width: min(900px,100%); overflow: hidden; }
  .crm-invite-history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; color: #858b97; font-size: 10px; }
  .crm-invite-history-toolbar button { padding: 7px 11px; border: 1px solid #373c47; border-radius: 8px; background: #111318; color: #b8bec8; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
  .crm-invite-history-list { display: grid; max-height: min(620px,calc(100dvh - 190px)); gap: 10px; margin-top: 10px; overflow-y: auto; padding-right: 4px; }
  .crm-invite-history-card { padding: 16px; border: 1px solid #303540; border-radius: 13px; background: #111318; }
  .crm-invite-history-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
  .crm-invite-history-card-head > div { display: flex; min-width: 0; flex-direction: column; }
  .crm-invite-history-card-head > .crm-invite-history-card-actions { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 7px; }
  .crm-invite-history-card-head small,
  .crm-invite-history-permissions-label,
  .crm-invite-history-accepted-label { color: #7f8591; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
  .crm-invite-history-card-head strong { margin-top: 4px; color: #eceef2; font-size: 13px; }
  .crm-invite-history-card-head > div > span { margin-top: 2px; color: #858b97; font-size: 10px; overflow-wrap: anywhere; }
  .crm-invite-history-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 99px; background: rgba(221,154,46,.13); color: #e5a23b; font-size: 9px; font-weight: 750; }
  .crm-invite-history-card.is-used .crm-invite-history-status { background: rgba(47,186,131,.13); color: #55d39e; }
  .crm-invite-history-card.is-expired .crm-invite-history-status { background: rgba(137,143,154,.13); color: #9aa0ab; }
  .crm-invite-history-delete { display: inline-flex; width: 27px; height: 27px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #737985; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
  .crm-invite-history-delete:hover { border-color: #343944; background: #1b1e25; color: #a6acb6; }
  .crm-invite-history-delete:focus-visible { outline: 2px solid #43b7a8; outline-offset: 2px; }
  .crm-invite-history-delete:disabled { cursor: wait; opacity: .45; }
  .crm-invite-history-delete svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .crm-invite-history-dates { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: #7f8591; font-size: 10px; }
  .crm-invite-history-dates b { color: #bfc4cd; font-weight: 650; }
  .crm-invite-history-link { margin-top: 13px; }
  .crm-invite-history-link-label { color: #7f8591; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
  .crm-invite-history-link-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 7px; }
  .crm-invite-history-link-row input { min-width: 0; padding: 9px 10px; border: 1px solid #39404b; border-radius: 8px; outline: none; background: #0f1116; color: #d9dde4; font: inherit; font-size: 10px; }
  .crm-invite-history-link-row input:focus { border-color: #55c4b5; box-shadow: 0 0 0 3px rgba(85,196,181,.12); }
  .crm-invite-history-link-row button { padding: 0 13px; border: 1px solid #43b7a8; border-radius: 8px; background: transparent; color: #64d0c1; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; }
  .crm-invite-history-link-row button:hover { background: rgba(67,183,168,.09); }
  .crm-invite-history-link-row button:focus-visible { outline: 2px solid #43b7a8; outline-offset: 2px; }
  .crm-invite-history-link.is-unavailable p { margin: 7px 0 0; color: #6f7580; font-size: 10px; }
  .crm-invite-history-permissions-label { margin-top: 14px; }
  .crm-invite-history-permissions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
  .crm-invite-history-permissions span { padding: 5px 7px; border-radius: 7px; background: rgba(67,183,168,.11); color: #66cabc; font-size: 9px; font-weight: 680; }
  .crm-invite-history-permissions span.is-empty { background: #1b1e25; color: #858b97; }
  .crm-invite-history-accepted { display: grid; grid-template-columns: minmax(150px,1fr) minmax(220px,1.35fr); gap: 3px 16px; margin-top: 14px; padding: 12px; border: 1px solid rgba(47,186,131,.22); border-radius: 10px; background: rgba(47,186,131,.07); }
  .crm-invite-history-accepted-label { grid-column: 1/-1; color: #4dbb91; }
  .crm-invite-history-accepted > strong { color: #edf2ef; font-size: 12px; }
  .crm-invite-history-accepted > span { grid-column: 1; color: #8f9995; font-size: 9px; overflow-wrap: anywhere; }
  .crm-invite-history-profile { grid-column: 2; grid-row: 2/4; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; color: #aeb6b2; font-size: 10px; }
  .crm-invite-history-profile b { color: #68716d; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
  .crm-invite-history-accepted time { grid-column: 1/-1; margin-top: 5px; color: #6f7974; font-size: 9px; }
  .crm-invite-history-waiting { margin-top: 14px; padding: 11px 12px; border: 1px dashed #343944; border-radius: 10px; color: #858b97; font-size: 10px; line-height: 1.45; }
  .crm-invite-history-state { display: flex; min-height: 180px; align-items: center; justify-content: center; padding: 28px; border: 1px dashed #343944; border-radius: 12px; color: #858b97; font-size: 11px; text-align: center; }
  .crm-invite-history-state.is-error { color: #ff827a; }
  .settings-menu { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; display: none; width: min(360px, calc(100vw - 24px)); padding: 10px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff; box-shadow: 0 16px 38px rgba(20,22,28,.16); }
  .settings-menu.open { display: block; }
  .settings-account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px; }
  .settings-account { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; padding: 6px; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .settings-account:hover { background: #f3f5f7; }
  .settings-account:focus-visible { outline: 2px solid #43b7a8; outline-offset: 2px; }
  .settings-account .avatar { overflow: hidden; }
  .settings-account .avatar img { width: 100%; height: 100%; object-fit: cover; }
  .settings-account-name { font-size: 13px; font-weight: 650; }
  .settings-account-role { margin-top: 2px; color: #999; font-size: 10px; }
  .settings-divider { height: 1px; margin: 7px 0; background: #ececf0; }
  .settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 7px; color: #777; font-size: 12px; font-weight: 550; }
  .settings-link { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; color: #444; text-align: left; cursor: pointer; }
  .settings-link[hidden] { display: none; }
  .settings-link:hover { background: #f3f5f7; color: #1a1a1a; }
  .settings-link svg { width: 18px; height: 18px; flex: 0 0 auto; color: #43a99c; }
  .settings-link-symbol { display: inline-flex; width: 18px; height: 18px; flex: 0 0 auto; align-items: center; justify-content: center; color: #43a99c; font-size: 18px; font-weight: 750; }
  .settings-link-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; }
  .settings-link-title { display: block; font-size: 12px; font-weight: 700; line-height: 1.25; }
  .settings-link-sub { display: block; margin-top: 3px; color: #999; font-size: 9px; line-height: 1.3; }
  .settings-link-arrow { color: #aaa; font-size: 15px; }
  .settings-access-section[hidden] { display: none; }
  .settings-logout { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: #d65c55; font: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
  .settings-logout svg { width: 17px; height: 17px; flex: 0 0 auto; color: currentColor; }
  .settings-logout:hover { background: rgba(214,92,85,.09); color: #ef6d65; }

  .page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: nowrap; }
  .page-header > .period-control { display: none; }
  .page-title { font-size: 22px; font-weight: 600; }
  .page-sub { font-size: 13px; color: #999; margin-top: 3px; }

  .period-control { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 100%; }
  .topbar .period-control { min-width: 0; }
  .period-tabs { display: flex; gap: 3px; max-width: 100%; overflow-x: auto; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 4px; scrollbar-width: none; }
  .period-tabs::-webkit-scrollbar { display: none; }
  .period-tab { padding: 7px 13px; border-radius: 9px; border: none; background: transparent; font-size: 12px; color: #999; cursor: pointer; font-weight: 500; transition: all 0.15s; white-space: nowrap; }
  .period-tab:hover { color: #1a1a1a; }
  .period-tab.active { background: #1a1a1a; color: #fff; }
  .period-tab-custom { display: inline-flex; align-items: center; gap: 6px; }
  .period-tab-custom svg { width: 13px; height: 13px; }
  .period-compare-button { display: inline-flex; align-items: center; gap: 5px; margin-left: 3px; padding: 7px 10px; border: 0; border-left: 1px solid #e5e5e5; border-radius: 0 8px 8px 0; background: transparent; color: #777b86; font-size: 11px; font-weight: 650; white-space: nowrap; cursor: pointer; }
  .period-compare-button:hover { color: #1a1a1a; }
  .period-compare-button.active { color: #168c6a; background: rgba(39,174,96,.08); }
  .period-compare-button-symbol { font-size: 14px; line-height: 1; }
  .period-selection { min-height: 15px; padding-right: 4px; color: #999; font-size: 11px; }
  .export-button { position: relative; }
  .export-button[hidden] { display: none; }
  .export-button-icon { position: relative; display: block; width: 17px; height: 17px; }
  .export-button-icon::before { content: ''; position: absolute; left: 8px; top: 1px; width: 1.8px; height: 9px; border-radius: 2px; background: currentColor; }
  .export-button-icon::after { content: ''; position: absolute; left: 3px; bottom: 1px; width: 11px; height: 4px; border: 1.8px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
  .export-button-arrow { position: absolute; left: 5px; top: 6px; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); }
  .export-button.active { color: #43b7a8; border-color: rgba(67,183,168,.55); background: rgba(67,183,168,.1); }
  .export-overlay { position: fixed; z-index: 120; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(15,17,22,.48); backdrop-filter: blur(3px); }
  .export-overlay.open { display: flex; }
  .export-dialog { width: min(600px,100%); max-height: min(760px,calc(100vh - 48px)); overflow-y: auto; border: 1px solid #dedfe5; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(12,14,20,.3); }
  .export-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 16px; border-bottom: 1px solid #eceef1; }
  .export-dialog-title { color: #202229; font-size: 20px; font-weight: 760; }
  .export-dialog-sub { margin-top: 5px; color: #8a8e98; font-size: 12px; line-height: 1.45; }
  .export-dialog-close { width: 32px; height: 32px; flex: 0 0 auto; border: 0; border-radius: 9px; background: transparent; color: #9296a0; font-size: 24px; line-height: 1; cursor: pointer; }
  .export-dialog-close:hover { background: #f1f2f5; color: #25272d; }
  .export-dialog-body { display: grid; gap: 18px; padding: 20px 24px 24px; }
  .export-section-title { margin-bottom: 9px; color: #555a64; font-size: 10px; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
  .export-format { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; padding: 4px; border: 1px solid #e3e5e9; border-radius: 11px; background: #f7f8fa; }
  .export-format-button { padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: #7d818a; font-size: 12px; font-weight: 720; cursor: pointer; }
  .export-format-button.active { background: #fff; color: #202229; box-shadow: 0 1px 5px rgba(20,23,30,.1); }
  .export-period-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; padding: 10px 12px; border: 1px solid rgba(67,183,168,.28); border-radius: 10px; background: rgba(67,183,168,.07); }
  .export-period-summary span { color: #646974; font-size: 11px; }
  .export-period-summary strong { color: #258f81; font-size: 11px; text-align: right; }
  .export-period-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .export-field { display: grid; gap: 5px; color: #8a8e98; font-size: 9px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
  .export-field input,
  .export-field select { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid #dedfe5; border-radius: 9px; background: #fafafa; color: #23262d; font: inherit; font-size: 11px; text-transform: none; outline: none; }
  .export-field input:focus,
  .export-field select:focus { border-color: #43b7a8; box-shadow: 0 0 0 3px rgba(67,183,168,.12); }
  .export-data-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .export-data-option { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid #e4e6ea; border-radius: 10px; background: #fafafa; color: #3e424b; font-size: 11px; font-weight: 650; cursor: pointer; }
  .export-data-option[hidden] { display: none; }
  .export-data-option:has(input:checked) { border-color: rgba(67,183,168,.5); background: rgba(67,183,168,.08); color: #236f66; }
  .export-data-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #43b7a8; }
  .export-data-option.disabled { opacity: .45; cursor: not-allowed; }
  .export-data-option small { display: block; margin-left: auto; color: #a2a5ad; font-size: 8px; font-weight: 600; }
  .export-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
  .export-dialog-hint { max-width: 330px; color: #9296a0; font-size: 9px; line-height: 1.4; }
  .export-download { min-width: 170px; padding: 11px 16px; border: 0; border-radius: 10px; background: #43b7a8; color: #071512; font-size: 12px; font-weight: 780; cursor: pointer; }
  .export-download:hover { background: #50c8b8; }
  .export-download:disabled { opacity: .55; cursor: wait; }
  .period-preset-popover { position: absolute; z-index: 24; top: calc(100% - 12px); right: 0; display: none; width: min(350px, calc(100vw - 32px)); padding: 13px; border: 1px solid #e1e3e8; border-radius: 12px; background: #fff; box-shadow: 0 16px 38px rgba(20,22,28,.16); }
  .period-preset-popover.open { display: block; }
  .period-preset-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 1px 2px 10px; }
  .period-preset-title { color: #292b32; font-size: 13px; font-weight: 720; }
  .period-preset-sub { margin-top: 3px; color: #9296a1; font-size: 9px; line-height: 1.35; }
  .period-preset-close { width: 25px; height: 25px; flex: 0 0 auto; border: 0; border-radius: 7px; background: transparent; color: #999; font-size: 17px; cursor: pointer; }
  .period-preset-close:hover { background: #f1f2f5; color: #333; }
  .period-preset-options { display: flex; flex-direction: column; gap: 5px; }
  .period-preset-option { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 9px; align-items: center; width: 100%; padding: 9px 10px; border: 1px solid #e6e7eb; border-radius: 9px; background: #fafafa; color: #343740; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
  .period-preset-option:hover { border-color: rgba(67,183,168,.48); background: rgba(67,183,168,.06); }
  .period-preset-option.active { border-color: rgba(67,183,168,.62); background: rgba(67,183,168,.1); }
  .period-preset-radio { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border: 1.5px solid #b7bbc4; border-radius: 50%; }
  .period-preset-option.active .period-preset-radio { border-color: #43b7a8; }
  .period-preset-option.active .period-preset-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #43b7a8; }
  .period-preset-copy { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; }
  .period-preset-name { display: block; color: inherit; font-size: 11px; font-weight: 730; }
  .period-preset-range { display: block; overflow: hidden; color: #8d929c; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
  .custom-period-popover { position: absolute; z-index: 20; top: calc(100% - 12px); right: 0; display: none; width: 310px; padding: 14px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff; box-shadow: 0 14px 35px rgba(20,22,28,.14); }
  .custom-period-popover.open { display: block; }
  .custom-period-title { margin-bottom: 11px; font-size: 13px; font-weight: 600; }
  .custom-period-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .custom-period-field { display: flex; flex-direction: column; gap: 5px; color: #999; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .035em; }
  .custom-period-field input { width: 100%; padding: 8px 9px; border: 1px solid #dedfe5; border-radius: 8px; background: #fafafa; color: #1a1a1a; font: inherit; color-scheme: light; outline: none; }
  .custom-period-field input:focus { border-color: #43b7a8; box-shadow: 0 0 0 3px rgba(67,183,168,.12); }
  .custom-period-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
  .custom-period-action { padding: 7px 11px; border: 1px solid #dedfe5; border-radius: 8px; background: transparent; color: #666; font-size: 11px; font-weight: 600; cursor: pointer; }
  .custom-period-action.primary { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
  .period-compare-popover { position: absolute; z-index: 22; top: calc(100% - 12px); right: 0; display: none; width: min(420px, calc(100vw - 32px)); padding: 14px; border: 1px solid #e1e3e8; border-radius: 12px; background: #fff; box-shadow: 0 16px 38px rgba(20,22,28,.16); }
  .period-compare-popover.open { display: block; }
  .period-compare-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .period-compare-title { color: #292b32; font-size: 13px; font-weight: 720; }
  .period-compare-sub { margin-top: 3px; color: #9296a1; font-size: 9px; line-height: 1.35; }
  .period-compare-close { width: 25px; height: 25px; border: 0; border-radius: 7px; background: transparent; color: #999; font-size: 17px; cursor: pointer; }
  .period-compare-close:hover { background: #f1f2f5; color: #333; }
  .period-compare-modes { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; margin-top: 12px; padding: 3px; border: 1px solid #e4e5e9; border-radius: 9px; background: #f7f7f9; }
  .period-compare-mode { padding: 7px 5px; border: 0; border-radius: 6px; background: transparent; color: #7d818b; font-size: 10px; font-weight: 680; cursor: pointer; }
  .period-compare-mode.active { background: #fff; color: #202229; box-shadow: 0 1px 4px rgba(25,28,35,.1); }
  .period-compare-preset { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 12px; }
  .period-compare-preset-card { padding: 9px 10px; border: 1px solid #e4e5e9; border-radius: 8px; background: #fafafa; }
  .period-compare-preset-card small { display: block; color: #999; font-size: 8px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
  .period-compare-preset-card strong { display: block; margin-top: 3px; color: #333; font-size: 10px; }
  .period-compare-arrow { color: #aaa; font-size: 15px; }
  .period-compare-custom { display: none; margin-top: 12px; }
  .period-compare-custom.visible { display: block; }
  .period-compare-range { display: grid; grid-template-columns: 68px 1fr 1fr; align-items: end; gap: 7px; }
  .period-compare-range + .period-compare-range { margin-top: 8px; }
  .period-compare-range-name { padding-bottom: 9px; color: #757985; font-size: 9px; font-weight: 700; }
  .period-compare-range .custom-period-field { font-size: 8px; }
  .period-compare-range .custom-period-field input { padding: 7px 8px; }
  .period-compare-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #eceef1; }
  .period-compare-reset { border: 0; background: transparent; color: #9a6767; font-size: 10px; font-weight: 650; cursor: pointer; }
  .period-compare-apply { padding: 7px 12px; border: 0; border-radius: 8px; background: #25272e; color: #fff; font-size: 10px; font-weight: 700; cursor: pointer; }
  .goal-chart-compare-total { color: #8d929e; font-size: 8px; font-weight: 650; }
  .goal-chart-delta.comparison-hidden { display: none; }
  .chart-comparison-legend { display: none; align-items: center; justify-content: flex-end; gap: 12px; margin: -4px 2px 9px; color: #8a8f9a; font-size: 9px; }
  .chart-comparison-legend.visible { display: flex; }
  .chart-comparison-key { display: inline-flex; align-items: center; gap: 5px; }
  .chart-comparison-line { width: 19px; height: 0; border-top: 2px solid #43b7a8; }
  .chart-comparison-line.previous { border-top: 2px dashed #9499a5; }


.crm-favorite-full-name {
  position: fixed; inset: auto; margin: 0; z-index: 2147483001; pointer-events: none;
  max-width: min(560px, calc(100vw - 16px)); padding: 8px 12px;
  border: 1px solid var(--crm-border-strong); border-radius: var(--crm-control-radius);
  background: var(--crm-surface-solid); color: var(--crm-text); box-shadow: var(--crm-panel-shadow);
  font-family: var(--crm-ui-font); white-space: normal; overflow-wrap: anywhere;
}

.crm-favorite-context-menu {
  position: fixed; inset: auto; margin: 0; z-index: 2147483000; max-width: calc(100vw - 16px); padding: 5px;
  border: 1px solid var(--crm-border-strong); border-radius: var(--crm-control-radius);
  background: var(--crm-surface-solid); color: var(--crm-text); box-shadow: var(--crm-panel-shadow);
  font-family: var(--crm-ui-font);
}
.crm-favorite-context-menu button {
  display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--crm-control-radius);
  background: transparent; color: var(--crm-text); font: inherit; text-align: left; cursor: pointer;
}
.crm-favorite-context-menu button:hover { background: var(--crm-surface-soft); color: var(--crm-accent); }
.crm-favorite-context-menu button:focus-visible { outline: 2px solid var(--crm-accent); outline-offset: -2px; box-shadow: var(--crm-focus-ring); }

body.sidebar-navigation-editing .sidebar-nav-bookmark .nav-item { padding-right: 65px; }
body.sidebar-navigation-editing .sidebar-nav-bookmark .sidebar-item-drag-handle { right: 33px; }

/* Role policy wins over sidebar editing and local visibility preferences. */
body:not(.crm-administrator) [data-crm-admin-navigation],
body:not(.crm-administrator) [data-admin-only] { display: none !important; }

.nav-item[data-nav-key="agreements"] .crm-agreements-nav-label{display:grid;min-width:0;line-height:1.35}
.nav-item[data-nav-key="agreements"] .crm-agreements-nav-label>span{white-space:nowrap}

  .crm-onboarding-layer { position: fixed; z-index: 420; inset: 0; display: none; pointer-events: none; }
  .crm-onboarding-layer.open { display: block; }
  body.crm-onboarding-open { overflow: hidden; }
  .crm-onboarding-spotlight { position: fixed; z-index: 1; border: 2px solid #62d3c4; border-radius: 14px; background: rgba(67,183,168,.06); box-shadow: 0 0 0 9999px rgba(9,12,18,.68), 0 0 0 6px rgba(67,183,168,.15), 0 12px 34px rgba(0,0,0,.3); transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease; pointer-events: none; }
  .crm-onboarding-spotlight[hidden] { display: none; }
  .crm-onboarding-hand { position: absolute; z-index: 3; left: 50%; top: 50%; display: block; width: 30px; height: 36px; color: #fff; filter: drop-shadow(0 5px 8px rgba(0,0,0,.42)); transform-origin: 50% 16%; animation: crm-onboarding-hand-tap 2.35s cubic-bezier(.2,.75,.3,1) infinite; }
  .crm-onboarding-hand svg { display: block; width: 100%; height: 100%; overflow: visible; }
  .crm-onboarding-hand path { fill: #fff; stroke: #27313a; stroke-width: 1.35; stroke-linejoin: round; }
  .crm-onboarding-ripple { position: absolute; z-index: 2; left: 50%; top: 50%; width: 12px; height: 12px; border: 2px solid rgba(98,211,196,.94); border-radius: 50%; opacity: 0; transform: translate(-50%,-50%) scale(.4); animation: crm-onboarding-ripple 2.35s ease-out infinite; }
  .crm-onboarding-ripple-two { animation-delay: .18s; }
  .crm-onboarding-annotations { position: fixed; z-index: 3; inset: 0; pointer-events: none; }
  .crm-onboarding-annotation-ring { position: fixed; border: 4px solid #ffc34f; border-radius: 50%; background: rgba(255,195,79,.14); box-shadow: 0 0 0 8px rgba(255,189,69,.18), 0 0 38px rgba(255,189,69,.76); animation: crm-onboarding-annotation-pulse 1.65s ease-in-out infinite; }
  .crm-onboarding-annotation-line { position: fixed; height: 4px; border-radius: 4px; background: linear-gradient(90deg,#ffbd45,#ffdc83); box-shadow: 0 0 13px rgba(255,189,69,.62); transform-origin: 0 50%; }
  .crm-onboarding-annotation-line::after { content: ''; position: absolute; top: 50%; right: -1px; width: 9px; height: 9px; border-top: 3px solid #ffdc83; border-right: 3px solid #ffdc83; transform: translateY(-50%) rotate(45deg); }
  .crm-onboarding-annotation-label { position: fixed; display: flex; width: 310px; flex-direction: column; gap: 7px; padding: 16px 18px; border: 3px solid #ffbd45; border-radius: 15px; background: #fff3c6; color: #5c3a00; box-shadow: 0 16px 38px rgba(15,12,4,.3), 0 0 0 6px rgba(255,189,69,.15); font-size: 14px; font-weight: 700; line-height: 1.42; }
  .crm-onboarding-annotation-label strong { color: #8a4e00; font-size: 18px; font-weight: 850; line-height: 1.18; }
  .crm-onboarding-annotation-label.is-major { width: 360px; padding: 18px 20px; border-width: 4px; }
  .crm-onboarding-annotation-label.is-major strong { font-size: 21px; line-height: 1.14; }
  .crm-onboarding-callout { position: fixed; z-index: 4; width: min(340px,calc(100vw - 24px)); padding: 20px; border: 1px solid #dfe3e8; border-radius: 17px; background: #fff; color: #20242b; box-shadow: 0 24px 70px rgba(6,10,18,.34); pointer-events: auto; }
  .crm-onboarding-callout.is-prominent { width: min(390px,calc(100vw - 24px)); padding: 24px; }
  .crm-onboarding-callout.is-readable { width: min(490px,calc(100vw - 24px)); padding: 28px; }
  .crm-onboarding-callout.is-complete { width: min(390px,calc(100vw - 24px)); text-align: center; transform: translate(-50%,-50%); }
  .crm-onboarding-close { position: absolute; top: 10px; right: 10px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #949aa5; font: inherit; font-size: 21px; line-height: 1; cursor: pointer; }
  .crm-onboarding-close:hover { background: #f0f2f5; color: #343840; }
  .crm-onboarding-close:focus-visible,
  .crm-onboarding-skip-step:focus-visible,
  .crm-onboarding-skip:focus-visible,
  .crm-onboarding-done:focus-visible { outline: 2px solid rgba(67,183,168,.55); outline-offset: 2px; }
  .crm-onboarding-step { padding-right: 28px; color: #279b8c; font-size: 10px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
  .crm-onboarding-title { margin-top: 8px; padding-right: 22px; font-size: 20px; font-weight: 760; line-height: 1.2; }
  .crm-onboarding-callout.is-prominent .crm-onboarding-title { font-size: 28px; line-height: 1.08; }
  .crm-onboarding-callout.is-readable .crm-onboarding-title { margin-top: 10px; font-size: 28px; font-weight: 820; line-height: 1.12; }
  .crm-onboarding-copy { margin-top: 9px; color: #69707b; font-size: 12px; line-height: 1.55; }
  .crm-onboarding-callout.is-readable .crm-onboarding-copy { margin-top: 13px; color: #565e69; font-size: 17px; line-height: 1.55; }
  .crm-onboarding-hint { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 10px 11px; border: 1px solid rgba(67,183,168,.28); border-radius: 10px; background: rgba(67,183,168,.08); color: #287c71; font-size: 11px; font-weight: 720; line-height: 1.35; }
  .crm-onboarding-hint-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #43b7a8; box-shadow: 0 0 0 4px rgba(67,183,168,.14); animation: crm-onboarding-hint-pulse 1.5s ease-in-out infinite; }
  .crm-onboarding-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 15px; }
  .crm-onboarding-navigation { display: none; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 9px; }
  .crm-onboarding-callout.is-manual .crm-onboarding-navigation { display: grid; }
  .crm-onboarding-previous,.crm-onboarding-next { min-height: 46px; padding: 10px 16px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
  .crm-onboarding-previous { border: 1px solid #d8dde2; background: #f3f5f6; color: #5f6670; }
  .crm-onboarding-next { border: 1px solid #43b7a8; background: #43b7a8; color: #071714; }
  .crm-onboarding-previous:hover { border-color: #c8ced5; background: #e9ecef; color: #343940; }
  .crm-onboarding-next:hover { background: #55c4b5; }
  .crm-onboarding-previous:disabled { cursor: default; opacity: .42; }
  .crm-onboarding-skip-step,
  .crm-onboarding-skip { min-height: 36px; padding: 9px 14px; border: 1px solid #e0e3e7; border-radius: 9px; background: #f0f2f4; color: #737985; font: inherit; font-size: 11px; font-weight: 720; cursor: pointer; }
  .crm-onboarding-skip-step:hover,
  .crm-onboarding-skip:hover { border-color: #d5d9de; background: #e7e9ec; color: #4e545d; }
  .crm-onboarding-done { display: none; min-width: 110px; padding: 10px 16px; border: 0; border-radius: 9px; background: #43b7a8; color: #071411; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
  .crm-onboarding-done:hover { background: #55c4b5; }
  .crm-onboarding-callout.is-complete .crm-onboarding-close,
  .crm-onboarding-callout.is-complete .crm-onboarding-navigation,
  .crm-onboarding-callout.is-complete .crm-onboarding-skip-step,
  .crm-onboarding-callout.is-complete .crm-onboarding-skip { display: none; }
  .crm-onboarding-callout.is-complete .crm-onboarding-title { padding-right: 0; }
  .crm-onboarding-callout.is-complete .crm-onboarding-hint { justify-content: center; }
  .crm-onboarding-callout.is-complete .crm-onboarding-actions { align-items: center; justify-content: center; }
  .crm-onboarding-callout.is-complete .crm-onboarding-done { display: inline-flex; align-items: center; justify-content: center; }
  .crm-onboarding-spotlight.is-hover-gesture .crm-onboarding-ripple { display: none; }
  .crm-onboarding-spotlight.is-hover-gesture .crm-onboarding-hand { left: 58%; animation: crm-onboarding-hand-hover-left 2.2s ease-in-out infinite; }
  .crm-onboarding-spotlight.is-passive-gesture .crm-onboarding-ripple,
  .crm-onboarding-spotlight.is-passive-gesture .crm-onboarding-hand { display: none; }
  body.sidebar-navigation-editing #crm-sidebar .crm-onboarding-active-action { color: #c66d00 !important; background: transparent !important; box-shadow: none !important; filter: brightness(1.22) drop-shadow(0 0 5px rgba(255,189,69,.95)); text-shadow: 0 0 8px rgba(255,189,69,.9); opacity: 1 !important; }

  html[data-theme="dark"] .crm-onboarding-annotation-label { border-color: #ffc85f; background: #2d2413; color: #ffe5a9; box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 4px rgba(255,189,69,.13); }
  html[data-theme="dark"] .crm-onboarding-annotation-label strong { color: #ffd06f; }
  html[data-theme="dark"] .crm-onboarding-callout.is-readable .crm-onboarding-copy { color: #bec3cc; }
  html[data-theme="dark"] .crm-onboarding-previous { border-color: #3a3e48; background: #252830; color: #c2c6ce; }
  html[data-theme="dark"] .crm-onboarding-previous:hover { border-color: #484d58; background: #2d3039; color: #f2f3f6; }
  html[data-theme="dark"] body.sidebar-navigation-editing #crm-sidebar .crm-onboarding-active-action { color: #ffe39a !important; background: transparent !important; box-shadow: none !important; filter: brightness(1.28) drop-shadow(0 0 6px rgba(255,195,79,1)); text-shadow: 0 0 9px rgba(255,195,79,.95); }

  @keyframes crm-onboarding-hand-tap {
    0%,18% { opacity: 0; transform: translate(24px,22px) rotate(-9deg) scale(.92); }
    34%,56% { opacity: 1; transform: translate(-5px,-5px) rotate(-9deg) scale(1); }
    62% { opacity: 1; transform: translate(-5px,-1px) rotate(-9deg) scale(.92); }
    70%,84% { opacity: 1; transform: translate(-5px,-5px) rotate(-9deg) scale(1); }
    100% { opacity: 0; transform: translate(11px,9px) rotate(-9deg) scale(.96); }
  }
  @keyframes crm-onboarding-ripple {
    0%,55% { opacity: 0; transform: translate(-50%,-50%) scale(.4); }
    61% { opacity: .95; }
    82%,100% { opacity: 0; transform: translate(-50%,-50%) scale(4.2); }
  }
  @keyframes crm-onboarding-hand-hover-left {
    0%,14% { opacity: 0; transform: translate(28px,-5px) rotate(-12deg) scale(.96); }
    30%,66% { opacity: 1; transform: translate(-14px,-5px) rotate(-12deg) scale(1); }
    78%,100% { opacity: 0; transform: translate(-20px,-5px) rotate(-12deg) scale(.98); }
  }
  @keyframes crm-onboarding-hint-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(67,183,168,.12); }
    50% { box-shadow: 0 0 0 7px rgba(67,183,168,.03); }
  }
  @keyframes crm-onboarding-annotation-pulse {
    0%,100% { box-shadow: 0 0 0 5px rgba(255,189,69,.15), 0 0 24px rgba(255,189,69,.42); }
    50% { box-shadow: 0 0 0 9px rgba(255,189,69,.04), 0 0 34px rgba(255,189,69,.7); }
  }

  @media (prefers-reduced-motion: reduce) {
    .crm-onboarding-spotlight { transition: none; }
    .crm-onboarding-hand { animation: none; opacity: 1; transform: translate(-5px,-5px) rotate(-9deg); }
    .crm-onboarding-spotlight.is-hover-gesture .crm-onboarding-hand { animation: none; transform: translate(-14px,-5px) rotate(-12deg); }
    .crm-onboarding-ripple,
    .crm-onboarding-hint-dot,
    .crm-onboarding-annotation-ring { animation: none; }
    .crm-onboarding-ripple { display: none; }
  }


  /* KPI */
  .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .kpi-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
  .kpi-header { display: flex; align-items: center; justify-content: space-between; }
  .kpi-label { font-size: 12px; color: #999; }
  .kpi-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
  .kpi-icon svg { width: 17px; height: 17px; }
  .kpi-value { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
  .kpi-delta { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
  .kpi-delta.up { color: #27ae60; }
  .kpi-delta.down { color: #e74c3c; }
  .goals-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: stretch; }
  .goal-cluster { display: flex; min-width: 0; flex-direction: column; gap: 10px; }
  .goal-pair { position: relative; display: grid; min-width: 0; min-height: 132px; flex: 1; grid-template-columns: 178px minmax(0,1fr); overflow: hidden; border: 1px solid #e5e5e5; border-left: 3px solid var(--goal-color); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(24,27,34,.035); }
  .goal-pair[role="button"] { cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
  #page-main .goal-pair[data-goal-reorder-ready="1"] { cursor: grab; }
  #page-main .goal-pair[data-goal-reorder-ready="1"]:active { cursor: grabbing; }
  #page-main .goal-pair.goal-pair-dragging { opacity: .46; transform: none; cursor: grabbing; }
  #page-main .goal-pair.goal-pair-drop-before { box-shadow: inset 0 3px 0 #43b7a8, 0 10px 28px rgba(67,183,168,.14); }
  #page-main .goal-pair.goal-pair-drop-after { box-shadow: inset 0 -3px 0 #43b7a8, 0 10px 28px rgba(67,183,168,.14); }
  .goal-pair[role="button"]:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--goal-color) 58%, #d9dbe2); box-shadow: 0 10px 28px color-mix(in srgb, var(--goal-color) 12%, transparent); }
  .goal-pair[role="button"]:focus-visible { outline: 2px solid color-mix(in srgb, var(--goal-color) 72%, #fff); outline-offset: 3px; }
  .goal-pair .kpi-card { min-width: 0; padding: 12px 13px; border: 0; border-right: 1px solid #ececf0; border-radius: 0; background: color-mix(in srgb, var(--goal-color) 4%, #fff); gap: 6px; }
  .goal-pair .kpi-header { gap: 8px; }
  .goal-pair .kpi-icon { width: 28px; height: 28px; flex: 0 0 auto; }
  .goal-pair .kpi-icon svg { width: 14px; height: 14px; }
  .goal-pair .kpi-label { color: #30313a; font-size: 14px; font-weight: 780; line-height: 1.25; }
  .goal-pair .kpi-value { color: color-mix(in srgb, var(--goal-color) 76%, #222); font-size: 32px; font-weight: 650; }
  .goal-pair .kpi-delta { font-size: 12px; font-weight: 650; line-height: 1.3; }
  .goal-chart-card { min-width: 0; padding: 12px 14px 2px; border: 0; border-radius: 0; background: transparent; }
  .goal-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .goal-chart-title { color: #30313a; font-size: 13px; font-weight: 780; line-height: 1.2; }
  .goal-chart-head-actions { display: flex; align-items: center; gap: 8px; }
  .goal-chart-summary { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
  .goal-chart-total { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
  .goal-chart-delta { color: #27ae60; font-size: 9px; font-weight: 700; }
  .goal-chart-period { display: flex; align-items: center; gap: 3px; margin-top: 2px; color: #aaa; font-size: 8px; }
  .goal-chart-period-separator { color: #6f737e; }
  .goal-chart-aggregation-select { max-width: 82px; padding: 0 11px 0 0; border: 0; background-color: transparent; background-image: linear-gradient(45deg, transparent 50%, #7e838f 50%), linear-gradient(135deg, #7e838f 50%, transparent 50%); background-position: calc(100% - 4px) 46%, 100% 46%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; color: #579b90; font: inherit; font-weight: 700; line-height: 1.2; appearance: none; cursor: pointer; outline: none; }
  .goal-chart-aggregation-select:hover { color: #2d8578; }
  .goal-chart-aggregation-select:focus-visible { border-radius: 3px; box-shadow: 0 0 0 2px rgba(67,183,168,.24); }
  .chart-type-toggle { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 2px; border: 1px solid #dfe2e8; border-radius: 7px; background: rgba(255,255,255,.64); }
  .chart-type-button { display: inline-flex; width: 24px; height: 22px; align-items: center; justify-content: center; border: 0; border-radius: 5px; background: transparent; color: #9a9faa; cursor: pointer; transition: background .15s ease,color .15s ease,box-shadow .15s ease; }
  .chart-type-button:hover { color: #4d535d; }
  .chart-type-button.active { background: #fff; color: #43a99c; box-shadow: 0 1px 4px rgba(17,24,39,.13); }
  .chart-type-button:focus-visible { outline: 2px solid rgba(67,183,168,.45); outline-offset: 1px; }
  .chart-type-icon { position: relative; display: block; width: 13px; height: 11px; }
  .chart-type-icon.line::before { content: ''; position: absolute; top: 5px; left: 0; width: 13px; height: 5px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: skewY(-25deg); }
  .chart-type-icon.bar { background: linear-gradient(to top,currentColor 0 100%) 0 100%/3px 5px no-repeat,linear-gradient(to top,currentColor 0 100%) 5px 100%/3px 9px no-repeat,linear-gradient(to top,currentColor 0 100%) 10px 100%/3px 7px no-repeat; }
  .goal-chart-wrap { height: 112px; margin-top: 5px; }
  .goal-chart-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }

  .content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .panel { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
  .panel-header { display: flex; align-items: center; justify-content: space-between; }
  .panel-title { font-size: 15px; font-weight: 600; }
  .panel-action { font-size: 12px; color: #999; cursor: pointer; border: none; background: transparent; font-weight: 500; }
  .panel-action:hover { color: #1a1a1a; }
  .user-stats-panel { min-width: 0; }
  .user-stats-period { margin-top: 3px; color: #999; font-size: 10px; }
  .user-stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .user-stat-card { position: relative; display: flex; width: 100%; min-width: 0; min-height: 148px; padding: 16px 18px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; overflow: hidden; border: 1px solid #e6e7eb; border-radius: 11px; background: #fff; color: inherit; font: inherit; text-align: left; appearance: none; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
  .user-stat-card::after { display: none; }
  .user-stat-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--user-accent) 58%, #e6e7eb); box-shadow: 0 12px 28px color-mix(in srgb, var(--user-accent) 12%, transparent); }
  .user-stat-card:focus-visible { outline: 2px solid color-mix(in srgb, var(--user-accent) 74%, #fff); outline-offset: 3px; }
  .user-stat-label { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--user-accent) 46%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--user-accent) 13%, transparent); color: var(--user-accent); font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; }
  .user-stat-mark { display: none; }
  .user-stat-value-block { min-width: 0; text-align: left; }
  .user-stat-value { color: #1a1a1a; font-size: 36px; font-weight: 790; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.03em; }
  .user-stat-share { margin-top: 5px; color: #858a96; font-size: 11px; font-weight: 650; }
  .user-stat-delta { font-size: 12px; font-weight: 680; line-height: 1.35; }
  .user-stat-delta.up { color: #27ae60; }
  .user-stat-delta.down { color: #e74c3c; }
  .user-tab-share { color: #999; font-size: 11px; font-weight: 600; }
  .journey-user-filter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .journey-user-filter-label { color: #999; font-size: 10px; font-weight: 650; }
  .journey-user-filter-button { padding: 7px 10px; border: 1px solid #dedfe5; border-radius: 8px; background: #fff; color: #777; font-size: 10px; font-weight: 680; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
  .journey-user-filter-button:hover { border-color: #79cfc4; color: #248f83; }
  .journey-user-filter-button.active { border-color: #43b7a8; background: rgba(67,183,168,.12); color: #218e82; box-shadow: inset 0 0 0 1px rgba(67,183,168,.12); }
  .journey-user-filter-button:focus-visible { outline: 2px solid rgba(67,183,168,.45); outline-offset: 2px; }

  /* Main KPI dashboard — reference composition. Compatibility blocks stay inert for other modules. */
  #page-main > .chart-comparison-legend,
  #page-main > .goals-overview,
  #page-main > .content-grid { display: none !important; }
  html[data-theme="light"] body:has(#page-main.active) #page-main { background: #f4f7fa !important; }
  #page-main .main-kpi-dashboard { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
  #page-main .main-kpi-grid { display: grid; gap: 12px; min-width: 0; }
  #page-main .main-kpi-grid-primary { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #page-main .main-kpi-grid-secondary { grid-template-columns: repeat(5,minmax(0,1fr)); }
  #page-main .main-kpi-card,
  #page-main .main-kpi-wide { position: relative; min-width: 0; border: 1px solid #e8edf4 !important; border-radius: 15px; background: #fff !important; box-shadow: 0 5px 22px rgba(31,55,84,.045) !important; }
  #page-main .main-kpi-card { display: flex; min-height: 278px; padding: 19px 20px 15px; flex-direction: column; }
  #page-main .main-kpi-card > header,
  #page-main .main-kpi-wide > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  #page-main .main-kpi-card h2,
  #page-main .main-kpi-wide h2 { margin: 0; color: #172235; font-size: 16px; font-weight: 720; line-height: 1.24; letter-spacing: -.012em; }
  #page-main .main-kpi-card header p { min-height: 16px; margin: 4px 0 0; color: #8a94a3; font-size: 11px; font-weight: 540; line-height: 1.35; }
  #page-main .main-kpi-info { position: relative; z-index: 2; display: inline-flex; width: 18px; height: 18px; padding: 0; flex: 0 0 auto; align-items: center; justify-content: center; border: 1.5px solid #b9c2ce; border-radius: 50%; background: transparent; color: #9ba6b4; font: 760 11px/1 system-ui,sans-serif; cursor: help; appearance: none; }
  #page-main .main-kpi-info::after { content: attr(data-main-info); position: absolute; top: calc(100% + 8px); right: -1px; box-sizing: border-box; width: 250px; padding: 10px 11px; border: 1px solid #dfe5ed; border-radius: 9px; background: #fff; box-shadow: 0 9px 26px rgba(25,42,64,.16); color: #334054; font-size: 11px; font-weight: 550; line-height: 1.4; text-align: left; pointer-events: none; opacity: 0; transform: translateY(-3px); transition: opacity .12s ease,transform .12s ease; }
  #page-main .main-kpi-grid > .main-kpi-card:first-child .main-kpi-info::after { right: auto; left: -1px; }
  #page-main .main-kpi-info:hover::after,
  #page-main .main-kpi-info:focus::after { opacity: 1; transform: translateY(0); }
  #page-main .main-kpi-info:focus-visible { outline: 2px solid rgba(23,111,232,.4); outline-offset: 2px; }
  #page-main .main-kpi-card:has(.main-kpi-info:hover),
  #page-main .main-kpi-card:has(.main-kpi-info:focus),
  #page-main .main-kpi-wide:has(.main-kpi-info:hover),
  #page-main .main-kpi-wide:has(.main-kpi-info:focus) { z-index: 4; }
  #page-main .main-kpi-value { min-height: 44px; margin-top: 15px; color: #111c2d; font-size: 34px; font-weight: 520; font-variant-numeric: tabular-nums; line-height: 1.12; letter-spacing: .005em; }
  #page-main .main-kpi-value.is-multi { font-size: 27px; line-height: 1.22; }
  #page-main .main-kpi-currencies { min-height: 0; color: #657184; font-size: 10px; font-weight: 650; line-height: 1.35; }
  #page-main .main-kpi-currencies:empty { display: none; }
  #page-main .main-kpi-delta { min-height: 17px; margin-top: 5px; color: #1aa968; font-size: 11px; font-weight: 700; line-height: 1.35; }
  #page-main .main-kpi-delta.is-down { color: #e05252; }
  #page-main .main-kpi-delta.is-empty { color: #9aa4b1; font-weight: 580; }
  #page-main .main-kpi-plan { margin-top: 16px; color: #6f7a89; font-size: 11px; line-height: 1.3; }
  #page-main .main-kpi-plan strong { color: #3b4656; font-weight: 680; }
  #page-main .main-kpi-progress { height: 4px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #e9edf2; }
  #page-main .main-kpi-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--main-kpi-accent); }
  #page-main .main-kpi-chart { position: relative; height: 64px; margin-top: 11px; color: #9aa4b1; font-size: 11px; }
  #page-main .main-kpi-chart canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
  #page-main .main-kpi-chart.is-empty { display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #edf0f4; }
  #page-main .main-kpi-axis { display: flex; min-height: 14px; justify-content: space-between; margin-top: 3px; color: #7f8998; font-size: 8px; font-weight: 600; line-height: 1; }
  #page-main .main-nps-touchpoints { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; margin-top: auto; padding-top: 7px; }
  #page-main .main-nps-touchpoints span { display: flex; height: 31px; align-items: center; justify-content: center; border: 1px solid #e4e8ee; border-radius: 7px; color: #687486; font-size: 15px; }
  #page-main .main-kpi-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  #page-main .main-kpi-wide { min-height: 285px; padding: 19px 20px; }
  #page-main .main-nps-layout { display: grid; grid-template-columns: 228px minmax(0,1fr); gap: 18px; align-items: center; margin-top: 6px; }
  #page-main .main-nps-gauge { display: grid; width: 170px; height: 170px; place-items: center; margin: 7px auto 0; border-radius: 50%; background: conic-gradient(#dfe5ec 0 100%); }
  #page-main .main-nps-gauge::before { content: ''; grid-area: 1/1; width: 142px; height: 142px; border-radius: 50%; background: #fff; }
  #page-main .main-nps-gauge > div { z-index: 1; grid-area: 1/1; text-align: center; }
  #page-main .main-nps-gauge strong { display: block; color: #172235; font-size: 36px; font-weight: 600; }
  #page-main .main-nps-gauge span { display: block; max-width: 90px; margin-top: 3px; color: #176fe8; font-size: 13px; font-weight: 700; }
  #page-main .main-nps-touchpoint-title { color: #485468; font-size: 11px; font-weight: 700; text-align: center; }
  #page-main .main-nps-touchpoint-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
  #page-main .main-nps-touchpoint-cards span { display: flex; min-height: 52px; padding: 6px; align-items: center; justify-content: center; border: 1px solid #e4e8ee; border-radius: 8px; color: #637084; font-size: 9px; font-weight: 600; line-height: 1.25; text-align: center; }
  #page-main .main-nps-details > p { margin: 8px 0; color: #8b95a4; font-size: 9px; text-align: center; }
  #page-main .main-nps-empty-detail { display: flex; min-height: 83px; align-items: center; justify-content: center; border: 1px solid #edf0f4; border-radius: 9px; color: #9aa4b1; font-size: 11px; }
  #page-main .main-okr-summary { position: relative; min-height: 112px; padding-top: 25px; }
  #page-main .main-okr-summary > strong { color: #176fe8; font-size: 25px; font-weight: 600; }
  #page-main .main-okr-summary > span { display: block; margin-top: 5px; color: #8b95a4; font-size: 10px; }
  #page-main .main-okr-ring { position: absolute; top: 0; right: 12px; display: grid; width: 90px; height: 90px; place-items: center; border: 7px solid #dfe5ec; border-radius: 50%; color: #8b95a4; font-size: 22px; font-weight: 600; }
  #page-main .main-okr-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
  #page-main .main-okr-cards > span { display: grid; min-height: 94px; padding: 10px 8px 8px; grid-template-columns: 25px 1fr; align-content: start; border: 1px solid #e5e9ef; border-radius: 10px; color: var(--okr); font-size: 21px; }
  #page-main .main-okr-cards b { align-self: center; color: #556174; font-size: 10px; font-weight: 650; }
  #page-main .main-okr-cards strong { grid-column: 1/-1; margin-top: 10px; color: #172235; font-size: 24px; font-weight: 520; text-align: center; }

  html[data-theme="dark"] #page-main .main-kpi-card,
  html[data-theme="dark"] #page-main .main-kpi-wide { border-color: var(--crm-border) !important; background: var(--crm-surface) !important; box-shadow: var(--crm-panel-shadow) !important; }
  html[data-theme="dark"] #page-main .main-kpi-card h2,
  html[data-theme="dark"] #page-main .main-kpi-wide h2,
  html[data-theme="dark"] #page-main .main-kpi-value,
  html[data-theme="dark"] #page-main .main-nps-gauge strong,
  html[data-theme="dark"] #page-main .main-okr-cards strong { color: #f1f4f8; }
  html[data-theme="dark"] #page-main .main-kpi-card header p,
  html[data-theme="dark"] #page-main .main-kpi-plan,
  html[data-theme="dark"] #page-main .main-kpi-axis,
  html[data-theme="dark"] #page-main .main-okr-summary > span { color: #929cac; }
  html[data-theme="dark"] #page-main .main-kpi-plan strong { color: #c9d0da; }
  html[data-theme="dark"] #page-main .main-kpi-progress { background: #363d48; }
  html[data-theme="dark"] #page-main .main-kpi-info::after { border-color: var(--crm-border); background: var(--crm-surface-solid); color: #d8dee7; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
  html[data-theme="dark"] #page-main .main-kpi-chart.is-empty,
  html[data-theme="dark"] #page-main .main-nps-touchpoints span,
  html[data-theme="dark"] #page-main .main-nps-touchpoint-cards span,
  html[data-theme="dark"] #page-main .main-nps-empty-detail,
  html[data-theme="dark"] #page-main .main-okr-cards > span { border-color: #252832; }
  html[data-theme="dark"] #page-main .main-nps-gauge::before { background: var(--crm-surface-solid); }
  html[data-theme="dark"] #page-main .main-nps-touchpoint-title,
  html[data-theme="dark"] #page-main .main-okr-cards b { color: #b3bdca; }

  @media (max-width: 1500px) {
    #page-main .main-kpi-card { min-height: 258px; padding: 16px 15px 13px; }
    #page-main .main-kpi-card h2 { font-size: 14px; }
    #page-main .main-kpi-value { font-size: 30px; }
    #page-main .main-kpi-chart { height: 56px; }
    #page-main .main-kpi-wide { min-height: 262px; padding: 16px; }
    #page-main .main-nps-layout { grid-template-columns: 190px minmax(0,1fr); }
    #page-main .main-nps-gauge { width: 146px; height: 146px; }
    #page-main .main-nps-gauge::before { width: 122px; height: 122px; }
  }
