/**
 * Desktop site prototype — after auth, screens ≥1080px.
 * Mobile / tablet: always #cardRoot (unchanged).
 *
 * Rollback: remove #site-shell from index.html + this file.
 */

.site-shell {
  display: none;
}

@media (min-width: 1080px) {
  :root {
    --site-bg-0: #0a0b0e;
    --site-bg-1: #101114;
    --site-bg-2: #16171c;
    --site-bg-3: #1c1d23;
    --site-line: rgba(255, 255, 255, 0.06);
    --site-text: rgba(255, 255, 255, 0.88);
    --site-accent: #4ecdc4;
    --site-rail-w: clamp(280px, 22vw, 360px);
    --site-gap: 16px;
    --site-pad: 20px;
    --site-chelka-h: 52px;
    --site-radius: 16px;
    --site-radius-sm: 12px;
  }

  /* After login on wide screens (body.site-desktop-on set by auth.js) */
  body.site-desktop-on .site-shell {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100dvh;
    max-height: 100vh;
    overflow: hidden;
    z-index: 200;
    color: var(--site-text);
    background:
      radial-gradient(ellipse 80% 50% at 12% -8%, rgba(78, 205, 196, 0.07), transparent 55%),
      radial-gradient(ellipse 60% 40% at 88% 0%, rgba(120, 110, 180, 0.05), transparent 50%),
      linear-gradient(165deg, var(--site-bg-0) 0%, var(--site-bg-1) 42%, #0d0e12 100%);
  }

  /* cardRoot stays for overlays/modals; only hide in-card chrome */
  body.site-desktop-on #cardRoot {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  body.site-desktop-on #cardRoot > .brand,
  body.site-desktop-on #cardRoot > #auth-panel,
  body.site-desktop-on #cardRoot > #admin-panel,
  body.site-desktop-on #cardRoot > .wsch-toast-container,
  body.site-desktop-on #cardRoot > .action-bar {
    display: none !important;
  }

  body.site-desktop-on #cardRoot .action-overlay {
    pointer-events: none;
  }

  body.site-desktop-on #cardRoot .action-overlay.show {
    pointer-events: auto;
  }

  body.site-desktop-on {
    overflow: hidden;
    padding: 0 !important;
  }

  .site-chelka {
    position: relative;
    flex-shrink: 0;
    height: var(--site-chelka-h);
    background: linear-gradient(180deg, var(--site-bg-3) 0%, var(--site-bg-2) 100%);
    border-bottom: 1px solid var(--site-line);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.04) inset,
      0 8px 28px rgba(0, 0, 0, 0.28);
  }

  .site-chelka-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--site-accent) 18%,
      color-mix(in srgb, var(--site-accent) 55%, #a78bfa) 50%,
      var(--site-accent) 82%,
      transparent 100%
    );
    opacity: 0.85;
  }

  .site-chelka-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 calc(var(--site-pad) + 4px);
    gap: 12px;
  }

  .site-chelka-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .site-chelka-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .site-chelka-net {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.18);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    user-select: none;
  }

  .site-chelka-net-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.45);
    flex-shrink: 0;
  }

  .site-chelka-net[data-state="reconnecting"] .site-chelka-net-dot {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
    animation: site-chelka-net-pulse 1.2s ease-in-out infinite;
  }

  .site-chelka-net[data-state="offline"] .site-chelka-net-dot {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
    animation: none;
  }

  @keyframes site-chelka-net-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.92); }
  }

  .site-chelka-settings {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  }

  .site-chelka-settings:hover {
    color: var(--site-accent);
    border-color: rgba(78, 205, 196, 0.28);
    background: rgba(78, 205, 196, 0.08);
    box-shadow: 0 0 16px rgba(78, 205, 196, 0.12);
  }

  .site-chelka-settings:active {
    transform: scale(0.96);
  }

  .site-chelka-settings.is-open {
    color: var(--site-accent);
    border-color: rgba(78, 205, 196, 0.28);
    background: rgba(78, 205, 196, 0.08);
    box-shadow: 0 0 16px rgba(78, 205, 196, 0.12);
  }

  /* Settings: dropdown from chelka button (not centered modal) */
  body.site-desktop-on .settings-sheet.settings-sheet--drop {
    position: fixed;
    inset: 0;
    display: none;
    background: transparent;
    backdrop-filter: none;
    align-items: stretch;
    justify-content: stretch;
    z-index: 2100;
    pointer-events: auto;
  }

  body.site-desktop-on .settings-sheet.settings-sheet--drop.show {
    display: block;
  }

  body.site-desktop-on .settings-sheet.settings-sheet--drop .settings-panel {
    position: fixed;
    width: min(380px, calc(100vw - 24px));
    max-width: min(380px, calc(100vw - 24px));
    margin: 0;
    border-radius: 16px;
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-body {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: var(--site-gap) var(--site-pad) var(--site-pad);
    overflow: hidden;
  }

  .site-rail-col {
    flex: 0 1 var(--site-rail-w, 300px);
    width: var(--site-rail-w, 300px);
    min-width: min(200px, 28vw);
    max-width: min(520px, 48vw);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .site-main {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: var(--site-radius);
    border: 1px solid var(--site-line);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 28%),
      linear-gradient(165deg, var(--site-bg-2) 0%, var(--site-bg-1) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 12px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
  }

  .site-main-body {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }

  .site-rail {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-rows:
      minmax(0, var(--site-panel-nav-h, 252px))
      auto
      minmax(0, var(--site-panel-mid-h, 296px))
      auto
      minmax(0, var(--site-panel-bot-h, 238px));
    overflow: hidden;
    gap: 0;
  }

  .site-rail-panel {
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--site-radius-sm);
    border: 1px solid var(--site-line);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 24%),
      linear-gradient(165deg, var(--site-bg-3) 0%, var(--site-bg-2) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.035),
      0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
  }

  .site-panel-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  /* Panel chelka (rail + main workspace) */
  .site-panel-chelka {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%),
      linear-gradient(180deg, var(--site-bg-3) 0%, color-mix(in srgb, var(--site-bg-2) 88%, var(--site-bg-3)) 100%);
    border-bottom: 1px solid var(--site-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .site-panel-chelka-accent {
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--panel-chelka-accent, var(--site-accent)) 22%,
      color-mix(in srgb, var(--panel-chelka-accent, var(--site-accent)) 70%, #fff) 50%,
      var(--panel-chelka-accent, var(--site-accent)) 78%,
      transparent 100%
    );
    opacity: 0.9;
  }

  .site-panel-chelka-title {
    margin: 0;
    padding: 10px 0 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.2;
    width: 100%;
  }

  /* Soprovod path hoisted into the main chelka: back button + long-path clamp.
     The button returns to the soprovod list (closeEditEstimateModal). */
  .site-panel-chelka .site-chelka-back {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid var(--c-danger-soft, rgba(231, 76, 60, 0.25));
    background: var(--c-danger-soft, rgba(231, 76, 60, 0.12));
    color: var(--c-danger, #e74c3c);
    cursor: pointer;
    padding: 0;
    z-index: 5;
  }
  .site-panel-chelka .site-chelka-back:hover {
    background: var(--c-danger, #e74c3c);
    color: #fff;
  }
  .site-panel-chelka.site-chelka-has-back .site-chelka-back {
    display: flex;
  }
  .site-panel-chelka.site-chelka-has-back .site-panel-chelka-title {
    padding-left: 44px;
    padding-right: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Tools → document form: left back arrow in the main chelka (#siteMainTitle). */
  .site-panel-chelka .site-chelka-back-nav {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(52, 211, 153, 0.32);
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    cursor: pointer;
    padding: 0;
    z-index: 5;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  }
  .site-panel-chelka .site-chelka-back-nav:hover {
    background: rgba(52, 211, 153, 0.22);
    border-color: rgba(52, 211, 153, 0.55);
    color: #6ee7b7;
    transform: translateY(-50%) translateX(-1px);
  }
  .site-panel-chelka .site-chelka-back-nav:active {
    transform: translateY(-50%) scale(0.96);
  }
  .site-panel-chelka .site-chelka-back-nav svg {
    display: block;
    flex-shrink: 0;
  }
  .site-panel-chelka.site-chelka-has-back-nav .site-chelka-back-nav {
    display: flex;
  }
  .site-panel-chelka.site-chelka-has-back-nav .site-panel-chelka-title {
    padding-left: 42px;
    padding-right: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* When the soprovod path is shown in the chelka, drop the redundant
     in-card header strip (it used to carry the title + close). */
  body.site-desktop-on #modal-estimate-edit.est-edit-chelka-mode .est-edit-header {
    display: none;
  }

  .site-panel-chelka--graphs { --panel-chelka-accent: #4ecdc4; }
  .site-panel-chelka--bots { --panel-chelka-accent: #4ecdc4; }
  .site-panel-chelka--reports { --panel-chelka-accent: #60a5fa; }
  .site-panel-chelka--bots { --panel-chelka-accent: #4ecdc4; }
  .site-panel-chelka--workspace { --panel-chelka-accent: #4ecdc4; min-height: 44px; }

  .site-main.site-main--reports .site-panel-chelka--workspace { --panel-chelka-accent: #60a5fa; }
  .site-main.site-main--bot .site-panel-chelka--workspace { --panel-chelka-accent: #4ecdc4; }
  .site-main.site-main--bot[data-bot-action="a2"] .site-panel-chelka--workspace { --panel-chelka-accent: #a78bfa; }
  .site-main.site-main--bot[data-bot-action="a3"] .site-panel-chelka--workspace { --panel-chelka-accent: #fbbf24; }
  .site-main.site-main--bot[data-bot-action="a4"] .site-panel-chelka--workspace { --panel-chelka-accent: #34d399; }
  .site-main.site-main--reports[data-est-panel="soprovod"] .site-panel-chelka--workspace { --panel-chelka-accent: #a78bfa; }
  .site-main.site-main--reports[data-est-panel="current"] .site-panel-chelka--workspace { --panel-chelka-accent: #fbbf24; }
  .site-main.site-main--reports[data-est-panel="ready"] .site-panel-chelka--workspace { --panel-chelka-accent: #60a5fa; }

  .site-rail-panel--nav {
    grid-row: 1;
  }

  .site-rail-panel--mid {
    grid-row: 3;
  }

  .site-rail-panel--bot {
    grid-row: 5;
  }

  .site-rail > .site-grip--row:nth-of-type(1) {
    grid-row: 2;
  }

  .site-rail > .site-grip--row:nth-of-type(2) {
    grid-row: 4;
  }

  /* Icons in action nav (PNG inside same box as SVG icons above) */
  .site-nav-icon .site-nav-img {
    width: calc(var(--site-nav-icon-size, 36px) * 0.61);
    height: calc(var(--site-nav-icon-size, 36px) * 0.61);
    object-fit: contain;
    opacity: 0.88;
  }

  .site-nav-item.active .site-nav-icon .site-nav-img {
    opacity: 1;
  }

  .site-nav-item[data-action="a2"] { --nav-accent: #a78bfa; }
  .site-nav-item[data-action="a3"] { --nav-accent: #fbbf24; }
  .site-nav-item[data-action="a4"] { --nav-accent: #34d399; }
  .site-nav-item[data-action="a5"] { --nav-accent: #4ecdc4; }

  .site-nav-item[data-est-panel="soprovod"] { --nav-accent: #a78bfa; }
  .site-nav-item[data-est-panel="current"] { --nav-accent: #fbbf24; }
  .site-nav-item[data-est-panel="ready"] { --nav-accent: #60a5fa; }

  .site-nav-item[hidden] {
    display: none !important;
  }

  /* Resize grips */
  .site-grip {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    touch-action: none;
    user-select: none;
  }

  .site-grip--col {
    width: 10px;
    margin: 0 4px;
    cursor: col-resize;
    align-self: stretch;
    border-radius: 6px;
  }

  .site-grip--row {
    height: 8px;
    margin: 3px 0;
    cursor: row-resize;
    border-radius: 6px;
  }

  .site-grip::before {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    border-radius: inherit;
    transition: background 0.15s, box-shadow 0.15s;
  }

  .site-grip--col::before {
    inset: 8px 2px;
  }

  .site-grip--row::before {
    inset: 2px 10px;
  }

  .site-grip:hover::before,
  .site-grip:focus-visible::before {
    background: rgba(78, 205, 196, 0.22);
    box-shadow: 0 0 12px rgba(78, 205, 196, 0.2);
  }

  body.site-desktop-dragging {
    cursor: col-resize !important;
    user-select: none !important;
  }

  body.site-desktop-dragging.site-desktop-dragging--row {
    cursor: row-resize !important;
  }

  body.site-desktop-dragging * {
    cursor: inherit !important;
  }

  .site-chelka-logo {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.22);
    box-shadow: 0 4px 14px rgba(78, 205, 196, 0.12);
  }

  .site-chelka-logo svg {
    filter: drop-shadow(0 1px 4px rgba(78, 205, 196, 0.3));
  }

  .site-chelka-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* ── Left nav: кнопки и интервалы через CSS-переменные (JS подгоняет под высоту) ── */
  .site-nav {
    --site-nav-item-h: 58px;
    --site-nav-icon-size: 36px;
    --site-nav-title-size: 13px;
    --site-nav-desc-size: 11px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 100%;
    padding: var(--site-nav-gap, 6px) 12px;
    gap: var(--site-nav-gap, 6px);
    overflow: hidden;
    box-sizing: border-box;
  }

  .site-nav-list {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: var(--site-nav-gap, 6px);
    overflow: hidden;
  }

  .site-nav-item {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: calc(var(--site-nav-item-h, 58px) * 0.19);
    width: 100%;
    height: var(--site-nav-item-h, 58px);
    min-height: var(--site-nav-item-h, 58px);
    max-height: var(--site-nav-item-h, 58px);
    padding: 0 calc(var(--site-nav-item-h, 58px) * 0.19);
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: calc(var(--site-nav-item-h, 58px) * 0.21);
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
  }

  .site-nav-item:hover {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .site-nav-item.active {
    color: #fff;
    border-color: color-mix(in srgb, var(--nav-accent, var(--site-accent)) 42%, transparent);
    background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--nav-accent, var(--site-accent)) 14%, rgba(0, 0, 0, 0.35)) 0%,
      rgba(0, 0, 0, 0.22) 100%
    );
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--nav-accent, var(--site-accent)) 18%, transparent),
      0 6px 18px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .site-nav-item[data-ws="chess"] { --nav-accent: #4ecdc4; }
  .site-nav-item[data-ws="schedule"] { --nav-accent: #fbbf24; }
  .site-nav-item[data-ws="contractors"] { --nav-accent: #a78bfa; }
  .site-nav-item[data-ws="users"] { --nav-accent: #60a5fa; }

  .site-nav-icon {
    flex-shrink: 0;
    width: var(--site-nav-icon-size, 36px);
    height: var(--site-nav-icon-size, 36px);
    display: grid;
    place-items: center;
    border-radius: calc(var(--site-nav-icon-size, 36px) * 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: var(--nav-accent, var(--site-accent));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .site-nav-icon svg {
    width: calc(var(--site-nav-icon-size, 36px) * 0.5);
    height: calc(var(--site-nav-icon-size, 36px) * 0.5);
  }

  .site-nav-item.active .site-nav-icon {
    border-color: color-mix(in srgb, var(--nav-accent, var(--site-accent)) 45%, transparent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--nav-accent, var(--site-accent)) 28%, transparent);
  }

  .site-nav-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    flex: 1 1 0;
    overflow: hidden;
  }

  .site-nav-title {
    font-size: var(--site-nav-title-size, 13px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav-desc {
    font-size: var(--site-nav-desc-size, 11px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav-item.active .site-nav-desc {
    color: color-mix(in srgb, var(--nav-accent, var(--site-accent)) 55%, rgba(255, 255, 255, 0.5));
  }

  .site-nav-sub {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    background: rgba(167, 139, 250, 0.06);
    overflow: hidden;
  }

  .site-nav-sub[hidden] {
    display: none !important;
  }

  .site-nav-sub-label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.75);
  }

  .site-nav-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .site-nav-seg-btn {
    padding: 7px 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .site-nav-seg-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
  }

  .site-nav-seg-btn.active {
    color: #fff;
    background: rgba(167, 139, 250, 0.22);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 2px 10px rgba(167, 139, 250, 0.15);
  }

  .site-nav-divider {
    flex: 0 0 auto;
    height: 1px;
    margin: 0 6px;
    background: linear-gradient(90deg, transparent, var(--site-line), transparent);
  }

  .site-rail-panel.site-panel--compact .site-nav-desc {
    display: none;
  }

  .site-rail-panel.site-panel--compact .site-nav-sub {
    padding: 6px 8px;
  }

  .site-rail-panel.site-panel--compact .site-nav-sub-label {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .site-rail-panel.site-panel--compact .site-nav-seg-btn {
    padding: 5px 4px;
    font-size: 10px;
  }

  /* Main workspace mount */
  body.site-desktop-on .site-main-body {
    padding: 0;
  }

  body.site-desktop-on .site-main-body .admin-panel,
  body.site-desktop-on .site-main-workspace {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    gap: 0;
    padding: 10px 12px 12px;
    border-radius: 0 0 12px 12px;
  }

  body.site-desktop-on .site-main-workspace .workspace-row {
    display: none !important;
  }

  body.site-desktop-on #ws-contractors .contr-subtabs {
    display: none;
  }

  body.site-desktop-on .site-main-workspace > #ws-chess,
  body.site-desktop-on .site-main-workspace > #ws-schedule,
  body.site-desktop-on .site-main-workspace > #ws-contractors,
  body.site-desktop-on .site-main-workspace > #ws-users {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    border-radius: 12px;
    border: 1px solid var(--site-line);
    overflow: hidden;
  }

  /* Reports workspace (a1) — отступ сверху и сбоку как у pex (14px) */
  body.site-desktop-on .site-main.site-main--reports .site-main-body {
    padding: 14px 14px 0;
    box-sizing: border-box;
  }

  body.site-desktop-on .site-main.site-main--reports:is(.site-main--pex-dock, .site-main--pex-open) .site-main-pex {
    margin-top: 2px;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a1"] {
    position: relative;
    inset: auto;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: none;
    pointer-events: auto;
    z-index: 2;
  }

  body.site-desktop-on .site-main.site-main--reports .site-main-body > .action-overlay[data-action="a1"].show {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    align-self: stretch;
  }

  body.site-desktop-on .site-main.site-main--reports .site-main-body > .admin-panel,
  body.site-desktop-on .site-main.site-main--reports .site-main-body > .site-main-workspace {
    display: none !important;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a1"] .overlay-card {
    width: 100%;
    height: 100%;
    flex: 1 1 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: var(--site-radius-sm, 12px);
    border: 1px solid var(--site-line);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 28%),
      linear-gradient(165deg, rgba(255, 255, 255, 0.015) 0%, transparent 100%);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a1"] .overlay-header {
    display: none;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a1"] #estStatsBar {
    display: none;
  }

  body.site-desktop-on .site-main.site-main--reports .action-overlay[data-action="a1"] .overlay-content {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  body.site-desktop-on .site-main.site-main--reports .est-scroll-container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px 14px;
  }

  body.site-desktop-on .site-main.site-main--reports:is(.site-main--pex-dock, .site-main--pex-open) .action-overlay[data-action="a1"] .overlay-card {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }

  body.site-desktop-on .site-main.site-main--reports:is(.site-main--pex-dock, .site-main--pex-open) .photo-exchanger-inner {
    box-shadow: none;
  }

  body.site-desktop-on .site-main.site-main--reports .est-group.site-est-panel-active {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--reports .est-group.site-est-panel-active > .est-header {
    display: none;
  }

  body.site-desktop-on .site-main.site-main--reports .est-group.site-est-panel-active > .est-list {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
  }

  body.site-desktop-on .site-main.site-main--reports .est-sop-toolbar,
  body.site-desktop-on .site-main.site-main--reports .est-cur-toolbar,
  body.site-desktop-on .site-main.site-main--reports .est-rdy-toolbar {
    position: sticky;
    top: 0;
    z-index: 4;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Плашка бот (a5) в основной области */
  body.site-desktop-on .site-main-body > .action-overlay[data-action="a5"] {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: none;
    pointer-events: auto;
    z-index: 2;
  }

  body.site-desktop-on .site-main.site-main--bot .site-main-body > .action-overlay[data-action="a5"].show,
  body.site-desktop-on .site-main.site-main--bot .site-main-body > .action-overlay[data-action="a2"].show,
  body.site-desktop-on .site-main.site-main--bot .site-main-body > .action-overlay[data-action="a3"].show,
  body.site-desktop-on .site-main.site-main--bot .site-main-body > .action-overlay[data-action="a4"].show {
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--bot .site-main-body > .admin-panel,
  body.site-desktop-on .site-main.site-main--bot .site-main-body > .site-main-workspace {
    display: none !important;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a5"] .overlay-card {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a5"] .overlay-content {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-form-v2,
  body.site-desktop-on .site-main.site-main--bot .a5-workspace {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    width: 100%;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-workspace {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-workspace-side {
    flex: 1 1 0;
    min-width: clamp(300px, 38%, 440px);
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    align-content: flex-start;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-group .a5-field {
    width: 100%;
    flex-shrink: 0;
    padding: 10px 11px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-group .a5-field-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-group .a5-field-inline .a5-field-body {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-group .a5-field-inline .a5-field-body label {
    width: 56px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-group .a5-field-body input {
    padding: 7px 10px;
    font-size: 14px !important;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-address {
    flex: 0 0 auto;
    padding: 10px 11px;
    gap: 6px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-field-address .a5-field-input-full {
    flex: none;
    min-height: 88px;
    height: 88px;
    max-height: 88px;
    padding: 8px 10px;
    font-size: 14px !important;
    resize: none;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-controls-row-v2 {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-seg-v2,
  body.site-desktop-on .site-main.site-main--bot .a5-upload-v2 {
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-controls-row-v2,
  body.site-desktop-on .site-main.site-main--bot .a5-queue-wrap,
  body.site-desktop-on .site-main.site-main--bot .a5-btn-go {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-btn-go {
    margin-top: 0;
    padding: 12px;
    font-size: 14px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-queue-wrap {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-queue-v2 {
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
    align-items: center;
    padding: 14px;
    gap: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-queue-item {
    width: 192px;
    height: 192px;
    border-radius: 14px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-queue-remove {
    width: 28px;
    height: 28px;
    font-size: 16px;
    top: 6px;
    right: 6px;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-workspace-stage {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, #4ecdc4 20%, var(--site-line));
    background:
      radial-gradient(ellipse at 50% 0%, rgba(78, 205, 196, 0.08) 0%, transparent 52%),
      rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-workspace-stage::before {
    content: "Загрузите фото и нажмите «Готово» — предпросмотр займёт всю эту область";
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
    border-radius: 12px;
    border: 1px dashed color-mix(in srgb, #4ecdc4 24%, rgba(255, 255, 255, 0.12));
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.02em;
    pointer-events: none;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-workspace-stage:has(#resultArea[style*="display: grid"])::before,
  body.site-desktop-on .site-main.site-main--bot .a5-workspace-stage:has(#resultArea[style*="display:grid"])::before {
    display: none;
  }

  body.site-desktop-on .site-main.site-main--bot #resultArea {
    flex: 1 1 0;
    min-height: 0 !important;
    height: 100% !important;
    margin-top: 0 !important;
  }

  body.site-desktop-on .site-main.site-main--bot #resultArea[style*="display: grid"],
  body.site-desktop-on .site-main.site-main--bot #resultArea[style*="display:grid"] {
    grid-template-columns: minmax(0, 1fr) clamp(120px, 14vw, 168px) !important;
    gap: 12px !important;
    align-items: stretch;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-preview-box-v2 {
    min-height: 0;
    height: 100%;
  }

  body.site-desktop-on .site-main.site-main--bot .a5-gallery-strip {
    height: 100%;
    min-height: 0;
  }

  body.site-desktop-on .site-main.site-main--bot #downloadLinks {
    flex-shrink: 0;
    margin: 0;
    gap: 10px;
  }

  body.site-desktop-on .site-main.site-main--bot #downloadLinks .a5-actions-row {
    gap: 10px;
  }

  body.site-desktop-on .site-main.site-main--bot #downloadLinks .a5-action-btn {
    min-width: 0;
    flex: 1 1 0;
  }

  body.site-desktop-on .site-main.site-main--bot #downloadLinks .a5-action-btn--stack {
    min-width: 0;
    padding: 11px 14px;
  }

  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a5"] .overlay-header {
    display: flex !important;
    position: absolute;
    top: 8px;
    right: 12px;
    left: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    pointer-events: none;
    z-index: 12;
  }

  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a5"] .overlay-header .dock-controls,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a5"] .overlay-header .overlay-title,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a5"] .overlay-header .overlay-close,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a2"] .overlay-header .dock-controls,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a2"] .overlay-header .overlay-title,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a2"] .overlay-header .overlay-close,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a2"] .overlay-header .a5-info-btn,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a3"] .overlay-header,
  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a4"] .overlay-header {
    display: none !important;
  }

  /* Яндекс Диск (a2) в основной области */
  body.site-desktop-on .site-main-body > .action-overlay[data-action="a2"] {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: none;
    pointer-events: auto;
    z-index: 2;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a2"] .overlay-card {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a2"] .overlay-content {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-layout {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    padding: 14px 16px 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-tabs {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding: 4px;
    gap: 4px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(167, 139, 250, 0.12);
    border-radius: 12px;
    width: max-content;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-tab {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 12.5px;
    background: transparent;
    border-bottom: none;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-tab::after {
    display: none;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-tab svg {
    width: 16px;
    height: 16px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-tab.active {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.25);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-toolbar {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    padding: 0;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    border: none;
    background: transparent;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-tool-btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 11.5px;
    border-radius: 9px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.14);
  }

  /* Favorites as a card grid */
  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-panel--fav.active {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-content: start;
    gap: 10px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-panel--fav .yd-empty-state {
    grid-column: 1 / -1;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .fav-item {
    padding: 14px 16px;
    border-radius: 12px;
    gap: 10px;
    border-color: rgba(251, 191, 36, 0.12);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .fav-item:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .fav-star-icon {
    font-size: 15px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .fav-text {
    font-size: 12.5px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-empty-state {
    padding: 48px 20px;
    gap: 8px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-empty-text {
    font-size: 13.5px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-empty-hint {
    font-size: 11.5px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-folder-loader {
    padding: 48px;
    font-size: 13px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-panel:has(.yd-photo-gallery) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-photo-gallery {
    flex: 1 1 0;
    min-height: 200px;
    gap: 10px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-photo-gallery__body {
    min-height: 200px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-photo-gallery__page {
    min-height: 200px;
    gap: 10px;
    padding: 12px 10px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-photo-gallery__nav {
    flex-basis: 40px;
    width: 40px;
    height: 64px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    align-content: start;
    gap: 10px;
    padding: 2px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-folder-card {
    min-height: 58px;
    padding: 13px 15px;
    border-radius: 12px;
    border-color: rgba(167, 139, 250, 0.1);
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06) 0%, rgba(167, 139, 250, 0.02) 100%);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-folder-card:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-card-icon {
    width: 34px;
    height: 34px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-card-name {
    font-size: 13px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-path-bar {
    margin: 0 0 10px;
    padding: 9px 12px;
    gap: 3px;
    border-radius: 10px;
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid rgba(167, 139, 250, 0.1);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-path-part,
  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a2"] .yd-path-current {
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 6px;
  }

  body.site-desktop-on .site-main.site-main--bot .action-overlay[data-action="a2"] .overlay-header {
    display: flex !important;
    position: absolute;
    top: 8px;
    right: 12px;
    left: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    pointer-events: none;
    z-index: 12;
  }

  /* Прайс-лист (a3) в основной области */
  body.site-desktop-on .site-main-body > .action-overlay[data-action="a3"] {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: none;
    pointer-events: auto;
    z-index: 2;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a3"] .overlay-card {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a3"] .overlay-content {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] #plContent {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-screen {
    flex: 1 1 0;
    min-height: 0;
    padding: 28px 24px;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.07) 0%, transparent 55%),
      radial-gradient(ellipse at 80% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 45%),
      rgba(0, 0, 0, 0.12);
    border-radius: 0 0 12px 12px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-screen::before {
    inset: 14px;
    border-color: rgba(251, 191, 36, 0.16);
    border-radius: 16px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-screen.drag-over::before {
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: inset 0 0 40px rgba(251, 191, 36, 0.06);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-icon-ring {
    width: 88px;
    height: 88px;
    border-color: rgba(251, 191, 36, 0.28);
    color: #fbbf24;
    box-shadow: 0 0 32px rgba(251, 191, 36, 0.1);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-title {
    font-size: 22px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-hint {
    font-size: 13px;
    max-width: 360px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-upload-btn {
    padding: 13px 34px;
    font-size: 14px;
    border-radius: 13px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 22px rgba(251, 191, 36, 0.28);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-results {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    border-radius: 0 0 12px 12px;
    background: rgba(0, 0, 0, 0.1);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-top-bar {
    padding: 10px 16px;
    gap: 16px;
    min-height: 62px;
    border-bottom-color: rgba(251, 191, 36, 0.1);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.05) 0%, transparent 100%);
    grid-template-columns: 1fr auto 1fr;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-top-stats {
    gap: 22px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-ts {
    font-size: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-ts span {
    font-size: 18px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-legend-items {
    grid-template-columns: repeat(4, max-content);
    gap: 3px 14px;
    height: 38px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-leg-item {
    font-size: 10px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-top-progress {
    width: 184px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-top-zone--right {
    gap: 14px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-top-actions {
    --pl-action-h: 36px;
    min-width: 0;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-body {
    padding: 10px 14px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-sec-head {
    padding: 10px 8px 8px;
    margin-bottom: 2px;
    background: rgba(22, 22, 27, 0.72);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-sec-group {
    margin-bottom: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-d {
    padding: 10px 12px;
    border-radius: 0;
    border-left-width: 3px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-d-name {
    font-size: 13px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-d-right {
    max-width: min(100%, 420px);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-d-prices {
    max-width: 420px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a3"] .pl-sim-panel {
    height: min(36vh, 320px);
    max-height: 40%;
    border-top-color: rgba(251, 191, 36, 0.28);
  }

  /* Инструменты (a4) в основной области */
  body.site-desktop-on .site-main-body > .action-overlay[data-action="a4"] {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: none;
    pointer-events: auto;
    z-index: 2;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a4"] .overlay-card {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.site-desktop-on .site-main-body > .action-overlay[data-action="a4"] .overlay-content {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a4"] #notifContent {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a4"] .nv-selector {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom-color: rgba(52, 211, 153, 0.14);
    gap: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a4"] .nv-card {
    padding: 12px 14px;
    border-radius: 12px;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a4"] .nv-card-active {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.32);
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.06);
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a4"] .nv-card-active .nv-card-icon {
    background: rgba(52, 211, 153, 0.14);
    color: #34d399;
  }

  body.site-desktop-on .site-main.site-main--bot[data-bot-action="a4"] .nv-panel {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 8px;
    overscroll-behavior: contain;
  }

}

html[data-theme="light"] .site-panel-chelka {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, #f0f2f6 100%);
  border-bottom-color: rgba(15, 18, 24, 0.08);
}

html[data-theme="light"] .site-panel-chelka-title {
  color: rgba(15, 18, 24, 0.62);
}

html[data-theme="light"] .site-nav-item {
  background: rgba(255, 255, 255, 0.65);
  color: rgba(15, 18, 24, 0.72);
  border-color: rgba(15, 18, 24, 0.08);
}

html[data-theme="light"] .site-nav-item:hover {
  background: #fff;
  color: rgba(15, 18, 24, 0.9);
}

html[data-theme="light"] .site-nav-item.active {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--nav-accent, var(--site-accent)) 12%, #fff) 0%,
    #f8f9fb 100%
  );
  color: #111;
}

html[data-theme="light"] .site-nav-desc {
  color: rgba(15, 18, 24, 0.48);
}

html[data-theme="light"] .site-nav-icon {
  background: rgba(15, 18, 24, 0.04);
  border-color: rgba(15, 18, 24, 0.08);
}

html[data-theme="light"] .site-nav-sub {
  background: color-mix(in srgb, #a78bfa 8%, #fff);
  border-color: rgba(167, 139, 250, 0.22);
}

html[data-theme="light"] .site-nav-seg {
  background: rgba(15, 18, 24, 0.05);
}

html[data-theme="light"] .site-nav-seg-btn {
  color: rgba(15, 18, 24, 0.55);
}

html[data-theme="light"] .site-chelka-logo {
  background: rgba(78, 205, 196, 0.1);
  border-color: rgba(78, 205, 196, 0.28);
  box-shadow: 0 4px 14px rgba(78, 205, 196, 0.1);
}

html[data-theme="light"] .site-chelka-title {
  color: #1c1f24;
}

html[data-theme="light"] .site-chelka-net {
  background: rgba(15, 18, 24, 0.04);
  border-color: rgba(15, 18, 24, 0.08);
  color: rgba(15, 18, 24, 0.5);
}

html[data-theme="light"] .site-chelka-settings {
  background: rgba(15, 18, 24, 0.04);
  color: rgba(15, 18, 24, 0.55);
  border-color: rgba(15, 18, 24, 0.1);
}

html[data-theme="light"] .site-chelka-settings.is-open {
  color: #38a89d;
  background: rgba(78, 205, 196, 0.1);
  border-color: rgba(78, 205, 196, 0.3);
}

html[data-theme="light"] body.site-desktop-on .settings-sheet.settings-sheet--drop .settings-panel {
  box-shadow:
    0 16px 48px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 18, 24, 0.08);
}

html[data-theme="light"] body.site-desktop-on .site-main.site-main--bot .a5-workspace-stage {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(78, 205, 196, 0.1) 0%, transparent 52%),
    #f3f5f8;
  border-color: color-mix(in srgb, #4ecdc4 28%, rgba(15, 18, 24, 0.1));
}

html[data-theme="light"] body.site-desktop-on .site-main.site-main--bot .a5-workspace-stage::before {
  color: rgba(15, 18, 24, 0.42);
  border-color: color-mix(in srgb, #4ecdc4 32%, rgba(15, 18, 24, 0.12));
  background: rgba(255, 255, 255, 0.55);
}

@media (min-width: 1440px) {
  :root {
    --site-pad: 24px;
    --site-gap: 18px;
    --site-rail-w: clamp(300px, 20vw, 380px);
  }
}

@media (min-width: 1920px) {
  :root {
    --site-pad: 28px;
    --site-gap: 20px;
    --site-rail-w: 400px;
  }
}
