    body.cabinet-mode .site-header,
    body.cabinet-mode .site-footer,
    body.cabinet-mode #cabinet-guest { display: none !important; }
    .cabinet-app.cabinet-hidden { display: none !important; }
    #cabinet-guest.cabinet-hidden { display: none !important; }
    body.cabinet-mode .wrap {
      max-width: none; width: 100%; padding: 0; margin: 0;
    }
    body.cabinet-mode.cosmic-body::before,
    body.cabinet-mode.cosmic-body::after { display: none; }
    body.cabinet-mode {
      background: var(--bg); color: var(--text); min-height: 100dvh;
    }

    .cabinet-app {
      display: grid !important;
      grid-template-columns: 72px minmax(0, 1fr) !important;
      grid-template-rows: minmax(100dvh, auto) !important;
      gap: 0 !important;
      width: 100%;
      min-height: 100dvh;
      margin: 0 !important;
      padding: 0 !important;
      border: none !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      background: var(--bg);
      overflow: visible;
    }
    .cabinet-app::before { display: none !important; }

    @media (max-width: 960px) {
      .cabinet-app { grid-template-columns: 1fr !important; overflow: hidden; }
      .cabinet-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 120;
        width: min(280px, 88vw) !important; transform: translateX(-105%);
        transition: transform 0.28s var(--ease-out);
        box-shadow: var(--shadow);
        padding: 18px 12px 14px !important;
      }
      .cabinet-app.sidebar-open .cabinet-sidebar { transform: translateX(0); }
      .cabinet-sidebar-backdrop {
        display: none; position: fixed; inset: 0; z-index: 110;
        background: #000000aa; backdrop-filter: blur(3px);
      }
      .cabinet-app.sidebar-open .cabinet-sidebar-backdrop { display: block; }
      .cabinet-nav-label,
      .cabinet-nav-label-row,
      .cabinet-sidebar-foot-text,
      .cabinet-sidebar-user { opacity: 1 !important; max-width: none !important; width: auto !important; }
      .cabinet-nav-item { justify-content: flex-start !important; padding: 10px 12px !important; }
    }

    .cabinet-sidebar {
      grid-column: 1;
      grid-row: 1;
      width: 72px;
      background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
      color: var(--text-soft);
      display: flex; flex-direction: column;
      padding: 18px 8px 14px;
      border-right: 1px solid var(--border);
      min-height: 100dvh;
      overflow-x: hidden;
      overflow-y: auto;
      z-index: 40;
      transition: width 0.22s var(--ease-out), padding 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
    }
    .cabinet-sidebar-brand {
      display: flex; align-items: center; gap: 10px;
      padding: 4px 10px 16px; margin-bottom: 6px;
      border-bottom: 1px solid var(--border);
    }
    .cabinet-sidebar-brand img { width: 36px; height: 36px; object-fit: contain; }
    .cabinet-sidebar-brand strong {
      display: block; font-size: 0.92rem; font-weight: 700;
      color: var(--text); line-height: 1.2;
    }
    .cabinet-sidebar-brand span {
      display: block; font-size: 0.72rem; color: var(--muted); margin-top: 2px;
    }
    .cabinet-nav-group { margin-bottom: 16px; }
    .cabinet-nav-label {
      display: block; padding: 0 12px 8px;
      font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--muted-2);
    }
    .cabinet-nav-item {
      display: flex; align-items: center; gap: 10px;
      width: 100%; padding: 10px 12px; margin-bottom: 4px;
      border: 1px solid transparent; border-radius: var(--radius-sm);
      background: transparent; color: var(--muted);
      font: inherit; font-size: 0.88rem; font-weight: 600;
      text-align: left; cursor: pointer;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
      position: relative;
    }
    .cabinet-nav-item:hover {
      background: var(--surface-hover); color: var(--text-soft);
      border-color: var(--border);
    }
    .cabinet-nav-item.active {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: var(--border-glow);
      box-shadow: 0 0 20px #FFB02018;
    }
    .cabinet-nav-icon {
      width: 20px; height: 20px; flex-shrink: 0; opacity: 0.85;
    }
    .cabinet-nav-item.active .cabinet-nav-icon { opacity: 1; }
    .cabinet-nav-label-row {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; flex: 1; min-width: 0;
    }
    .cabinet-nav-badge {
      width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
      background: var(--warn); box-shadow: 0 0 8px #fbbf2488;
    }
    .cabinet-nav-badge[hidden] { display: none !important; }

    @media (min-width: 961px) {
      /* Только :hover — :focus-within оставлял меню открытым после клика */
      .cabinet-sidebar:hover {
        width: 260px;
        padding: 18px 12px 14px;
        box-shadow: 10px 0 36px #00000066;
      }
      .cabinet-nav-label,
      .cabinet-nav-label-row,
      .cabinet-sidebar-foot-text,
      .cabinet-sidebar-user {
        opacity: 0;
        max-width: 0;
        overflow: hidden;
        white-space: nowrap;
        pointer-events: none;
        transition: opacity 0.15s ease, max-width 0.2s ease;
      }
      .cabinet-sidebar:hover .cabinet-nav-label,
      .cabinet-sidebar:hover .cabinet-nav-label-row,
      .cabinet-sidebar:hover .cabinet-sidebar-foot-text,
      .cabinet-sidebar:hover .cabinet-sidebar-user {
        opacity: 1;
        max-width: 200px;
        pointer-events: auto;
      }
      .cabinet-nav-item {
        justify-content: center;
        padding: 10px;
      }
      .cabinet-sidebar:hover .cabinet-nav-item {
        justify-content: flex-start;
        padding: 10px 12px;
      }
      .cabinet-nav-label {
        height: 0; padding-top: 0; padding-bottom: 0; margin: 0;
      }
      .cabinet-sidebar:hover .cabinet-nav-label {
        height: auto; padding: 0 12px 8px;
      }
      .cabinet-ai-status { justify-content: center; }
      .cabinet-sidebar:hover .cabinet-ai-status { justify-content: flex-start; }
      .cabinet-nav-item:focus { outline: none; }
      .cabinet-nav-item:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }
    }

    .cabinet-sidebar-footer {
      margin-top: auto; padding: 12px 10px 4px;
      border-radius: var(--radius-sm);
      background: var(--surface); border: 1px solid var(--border);
    }
    .cabinet-ai-status {
      display: flex; align-items: center; gap: 10px;
      font-size: 0.82rem; color: var(--muted);
    }
    .cabinet-ai-pulse {
      width: 10px; height: 10px; border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 10px var(--accent);
      animation: cabinetPulse 1.6s ease-in-out infinite;
    }
    @keyframes cabinetPulse {
      0%, 100% { opacity: 0.45; transform: scale(0.92); }
      50% { opacity: 1; transform: scale(1.08); }
    }
    .cabinet-sidebar-user {
      margin-top: 10px; font-size: 0.78rem; color: var(--muted); line-height: 1.4;
    }
    .cabinet-sidebar-user strong {
      display: block; color: var(--text-soft); font-size: 0.85rem;
    }
    .cabinet-logout-btn {
      display: flex; align-items: center; justify-content: center; gap: 10px;
      width: 100%; margin-top: 10px; padding: 10px;
      border: 1px solid transparent; border-radius: var(--radius-sm);
      background: transparent; color: var(--muted);
      font: inherit; font-size: 0.85rem; font-weight: 600;
      cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
    }
    .cabinet-logout-btn:hover {
      background: #7f1d1d44; color: #fca5a5; border-color: #ef444444;
    }
    .cabinet-logout-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
    @media (min-width: 961px) {
      .cabinet-sidebar:hover .cabinet-logout-btn { justify-content: flex-start; padding: 10px 12px; }
      .cabinet-logout-btn .cabinet-sidebar-foot-text {
        opacity: 0; max-width: 0; overflow: hidden; white-space: nowrap;
      }
      .cabinet-sidebar:hover .cabinet-logout-btn .cabinet-sidebar-foot-text {
        opacity: 1; max-width: 160px;
      }
    }

    .cabinet-main {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
      overflow-x: hidden;
      padding: 20px 24px 40px;
      background: var(--bg);
    }
    @media (max-width: 960px) {
      .cabinet-main { grid-column: 1; padding: 16px 14px 32px; }
    }

    .cabinet-topbar {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
      gap: 12px 16px; margin-bottom: 20px;
    }
    .cabinet-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .cabinet-menu-toggle {
      display: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
      border: 1px solid var(--border); background: var(--surface);
      color: var(--text-soft); cursor: pointer;
      align-items: center; justify-content: center;
    }
    @media (max-width: 960px) { .cabinet-menu-toggle { display: inline-flex; } }
    .cabinet-topbar h1 {
      margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 800;
      color: var(--text); letter-spacing: -0.02em;
    }
    .cabinet-topbar-sub {
      margin: 4px 0 0; font-size: 0.88rem; color: var(--muted);
    }
    .cabinet-topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .cabinet-topbar-actions .btn { font-size: 0.85rem; padding: 9px 14px; }

    .crm-kpi-grid {
      display: grid; gap: 14px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      margin-bottom: 20px;
    }
    @media (min-width: 900px) { .crm-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
    .crm-kpi-card {
      background: linear-gradient(160deg, var(--surface) 0%, var(--graphite) 100%);
      border-radius: var(--radius); padding: 16px 14px 14px;
      border: 1px solid var(--border-glow);
      box-shadow: var(--shadow-soft);
      position: relative; overflow: hidden;
    }
    .crm-kpi-card::after {
      content: ""; position: absolute; right: -24px; top: -24px;
      width: 80px; height: 80px; border-radius: 50%;
      background: radial-gradient(circle, #FFB02022, transparent 70%);
    }
    .crm-kpi-card .kpi-label {
      font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px;
    }
    .crm-kpi-card .kpi-value {
      font-size: 1.75rem; font-weight: 800; line-height: 1;
      color: var(--text); font-variant-numeric: tabular-nums;
    }
    .crm-kpi-card .kpi-hint {
      margin-top: 8px; font-size: 0.78rem; color: var(--muted-2); line-height: 1.35;
    }
    .crm-kpi-card.success .kpi-value { color: var(--ok); }
    .crm-kpi-card.warning .kpi-value { color: var(--warn); }
    .crm-kpi-card.info .kpi-value { color: var(--accent); }

    .crm-dash-grid {
      display: grid; gap: 16px; grid-template-columns: 1fr;
      margin-bottom: 16px;
    }
    @media (min-width: 960px) {
      .crm-dash-grid.two-col { grid-template-columns: 1.2fr 1fr; }
    }
    .crm-panel {
      background: linear-gradient(160deg, var(--surface) 0%, var(--graphite) 100%);
      border-radius: var(--radius); padding: 18px 16px 14px;
      border: 1px solid var(--border-glow);
      box-shadow: var(--shadow-soft);
    }
    .crm-panel-head { margin-bottom: 14px; }
    .crm-panel-head h3 {
      margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--text-soft);
    }
    .crm-panel-head p {
      margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.4;
    }

    .cabinet-app .onboarding-card { border-color: var(--border-glow); }
    .cabinet-app .onboarding-step-pill.active {
      border-color: var(--accent); color: var(--text); background: var(--accent-soft);
    }
    .cabinet-app .onboarding-complete-card {
      max-width: 640px; margin-bottom: 16px;
      border-color: #22c55e44;
    }
    .cabinet-app .onboarding-complete-card.is-dismissed { display: none !important; }
    .onboarding-complete-dismiss {
      margin-top: 10px; font-size: 0.82rem; padding: 6px 12px;
    }

    .onboarding-locked .cabinet-sidebar-nav .cabinet-nav-item:not([data-tab="profile"]),
    .onboarding-locked .cabinet-panel {
      display: none !important;
    }
    .onboarding-locked #panel-profile { display: block !important; }
    .onboarding-locked .onboarding-card { margin-bottom: 16px; }

    .home-dashboard { display: flex; flex-direction: column; gap: 16px; }
    .home-kpi-strip {
      display: grid; gap: 12px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    @media (min-width: 900px) {
      .home-kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    }
    .home-dash-grid {
      display: grid; gap: 14px;
      grid-template-columns: 1fr;
    }
    @media (min-width: 960px) {
      .home-dash-mid { grid-template-columns: 1fr 1fr; }
      .home-dash-bottom { grid-template-columns: 1fr 1fr; }
    }
    .home-widget, .dash-widget {
      display: flex; flex-direction: column;
      min-height: 220px; max-height: 340px;
      background: linear-gradient(160deg, var(--surface) 0%, var(--graphite) 100%);
      border: 1px solid var(--border-glow);
      border-radius: 14px;
      box-shadow: var(--shadow-soft);
      overflow: hidden;
    }
    .home-widget-simulator {
      max-height: none;
      min-height: 420px;
      overflow: hidden;
    }
    .home-sim-chat-body {
      display: flex;
      flex-direction: column;
      padding: 0 !important;
      overflow: hidden;
      min-height: 0;
      flex: 1;
    }
    .home-sim-chat {
      flex: 1;
      min-height: 260px;
      max-height: 420px;
      overflow-x: hidden;
      overflow-y: auto;
      padding: 14px 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      background: #080808;
      scroll-behavior: smooth;
    }
    .home-sim-empty {
      margin: auto;
      text-align: center;
      font-size: 0.84rem;
      color: var(--muted);
      line-height: 1.5;
      max-width: 28ch;
    }
    .home-sim-msg-row {
      display: flex;
      flex-direction: column;
      width: 100%;
    }
    .home-sim-msg-row.buyer {
      align-items: flex-end;
    }
    .home-sim-msg-row.ai {
      align-items: stretch;
    }
    .home-sim-msg {
      font-size: 0.9rem;
      line-height: 1.55;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .home-sim-msg-row.buyer .home-sim-msg {
      max-width: 85%;
      padding: 10px 14px;
      border-radius: 16px 16px 4px 16px;
      background: linear-gradient(135deg, var(--accent), #e09a18);
      color: #0a0a0a;
      font-weight: 600;
    }
    .home-sim-msg-row.ai .home-sim-msg {
      width: 100%;
      max-width: none;
      box-sizing: border-box;
      padding: 12px 14px;
      border-radius: 8px;
      background: linear-gradient(90deg, #1a1408 0%, #121212 40%, #121212 100%);
      border: 1px solid var(--border-glow);
      border-left: 3px solid var(--accent);
      color: var(--text);
    }
    .home-sim-msg-row.typing .home-sim-msg {
      color: var(--muted);
      font-style: italic;
      border-left-color: var(--muted-2);
    }
    .home-sim-compose {
      display: flex;
      gap: 8px;
      align-items: center;
      padding: 10px 12px 12px;
      border-top: 1px solid var(--border);
      flex-shrink: 0;
    }
    .home-sim-compose .home-sim-input {
      flex: 1;
      min-height: 40px;
      max-height: 40px;
      resize: none;
      margin: 0;
    }
    .home-sim-compose .btn-sm {
      flex-shrink: 0;
      font-size: 0.82rem;
      padding: 8px 12px;
    }
    .home-widget-status {
      min-height: auto; max-height: none;
    }
    .home-widget-head, .dash-widget-head {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      padding: 14px 16px 10px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .home-widget-head h3, .dash-widget-head h3 {
      margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text-soft);
    }
    .home-widget-link, .dash-widget-link {
      border: none; background: transparent; padding: 0;
      font: inherit; font-size: 0.78rem; font-weight: 600;
      color: var(--accent); cursor: pointer; white-space: nowrap;
    }
    .home-widget-link:hover, .dash-widget-link:hover { color: var(--accent-deep); text-decoration: underline; }
    .home-widget-body, .dash-widget-body {
      flex: 1; min-height: 0; padding: 12px 16px 16px;
      overflow: hidden;
    }
    .home-widget-scroll, .dash-widget-scroll { overflow-y: auto; }
    .home-widget-chart, .dash-widget-chart { overflow: hidden; }
    .home-widget-hint {
      margin: 0 0 8px; font-size: 0.78rem; color: var(--muted); line-height: 1.4;
    }
    .home-sim-input {
      width: 100%;
      padding: 10px 12px; border-radius: var(--radius-sm);
      border: 1px solid var(--border); background: var(--bg-elevated);
      color: var(--text-soft); font: inherit; font-size: 0.85rem;
    }
    .home-status-text {
      margin: 0; font-size: 0.88rem; color: var(--text-soft); line-height: 1.45;
    }
    .home-widget-status-body { padding-bottom: 14px; }
    @media (max-width: 639px) {
      .home-widget, .dash-widget { max-height: none; }
    }
    .analytics-dashboard { display: flex; flex-direction: column; gap: 16px; }
    .analytics-dash-row {
      display: grid; gap: 14px; grid-template-columns: 1fr;
    }
    @media (min-width: 960px) {
      .analytics-dash-row { grid-template-columns: 1fr 1fr; }
    }
    .analytics-dash-roi { max-height: 300px; }
    .analytics-dash-roi .dash-widget-body { overflow-y: auto; }
    .analytics-rec-collapse {
      border: 1px solid var(--border); border-radius: 12px;
      background: var(--surface); padding: 0 14px 12px;
    }
    .analytics-rec-collapse summary {
      cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 0.92rem; color: var(--text-soft);
    }
    .analytics-rec-collapse .rec-grid { margin-top: 8px; }
    .home-orders-list li { padding: 10px 0; }
    .home-orders-list .order-status-pill { font-size: 0.68rem; padding: 3px 8px; }
    .profile-header-card { margin-bottom: 16px; }
    .profile-header-row {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
      gap: 10px 16px; margin-bottom: 4px;
    }
    .profile-meta-grid {
      display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      margin-top: 12px;
    }
    .profile-meta-item {
      padding: 10px 12px; border-radius: var(--radius-sm);
      border: 1px solid var(--border); background: var(--bg-elevated);
      font-size: 0.82rem; color: var(--muted);
    }
    .profile-meta-item strong {
      display: block; color: var(--text-soft); font-size: 0.92rem; margin-top: 2px;
    }
    .profile-alerts-list {
      list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
    }
    .profile-alerts-list li {
      padding: 10px 12px; border-radius: var(--radius-sm);
      border: 1px solid #fbbf2444; background: #fbbf2410;
      font-size: 0.88rem; color: var(--text-soft);
    }
    .profile-complete-summary { margin-top: 16px; }

    .cabinet-panel { display: none; animation: fadeInUp 0.35s var(--ease-out) both; }
    .cabinet-panel.active { display: block; }

    .crm-list { list-style: none; margin: 0; padding: 0; }
    .crm-list li {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem;
    }
    .crm-list li:last-child { border-bottom: none; }
    .crm-list-title { font-weight: 600; color: var(--text-soft); }
    .crm-list-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
    .crm-badge {
      display: inline-flex; padding: 4px 10px; border-radius: 999px;
      font-size: 0.72rem; font-weight: 700; white-space: nowrap;
    }
    .crm-badge.blue { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border-glow); }
    .crm-badge.green { background: #14532d55; color: #86efac; border: 1px solid #22c55e44; }
    .crm-badge.amber { background: #78350f55; color: #fcd34d; border: 1px solid #f59e0b44; }
    .crm-badge.red { background: #7f1d1d55; color: #fca5a5; border: 1px solid #ef444444; }

    .cabinet-app .period-tab.active {
      border-color: var(--accent); color: var(--text-soft); background: var(--accent-soft);
    }
    .cabinet-app .donut::after { background: var(--surface, var(--graphite)); }
    .cabinet-app #dash-expires { color: var(--muted); }
