/* =====================================================================
   COMPASS CRM — каркас интерфейса (для обеих тем)
   Статус-строка, орнамент, виджеты, Ctrl+K, «Оформление», выпадающие
   списки, таблица, экран входа, обои и анимации.
   Тема задаётся классом body: .vx (CompassOS) или .classic (светлая).
   ===================================================================== */

/* ---------- Токены каркаса ---------- */
body {
    --sh-text: #14161f;
    --sh-muted: #687089;
    --sh-glass: rgba(255, 255, 255, .74);
    --sh-strong: rgba(255, 255, 255, .96);
    --sh-edge: rgba(15, 20, 40, .08);
    --sh-hover: rgba(15, 20, 40, .06);
    --sh-fill: rgba(15, 20, 40, .045);
    --sh-active-bg: #111318;
    --sh-active-fg: #fff;
    --sh-recess: rgba(15, 20, 40, .05);
    --sh-overlay: rgba(20, 24, 40, .28);
    --sh-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 12px 40px rgba(15, 20, 40, .08);
    --sh-shadow-lg: 0 1px 0 rgba(255,255,255,.9) inset, 0 30px 80px rgba(15, 20, 40, .18);
    --sh-blur: blur(24px) saturate(170%);
    --sh-w-clock: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.65));
    --sh-w-weather: linear-gradient(165deg, #7cb4ff, #4f7cf0);
    --sh-w-weather-fg: #fff;
    --sh-radius: 28px;
    --sh-ease: cubic-bezier(.2, .8, .2, 1);
    --sh-spring: cubic-bezier(.34, 1.4, .64, 1);
}
body.vx {
    --sh-text: rgba(255, 255, 255, .96);
    --sh-muted: rgba(235, 238, 255, .62);
    --sh-glass: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.06)), rgba(26, 30, 50, .3);
    --sh-strong: linear-gradient(160deg, rgba(74,78,98,.84), rgba(40,43,58,.86));
    --sh-edge: rgba(255, 255, 255, .18);
    --sh-hover: rgba(255, 255, 255, .12);
    --sh-fill: rgba(255, 255, 255, .08);
    --sh-active-bg: rgba(255, 255, 255, .94);
    --sh-active-fg: #0d0f17;
    --sh-recess: rgba(0, 0, 0, .22);
    --sh-overlay: rgba(8, 10, 24, .45);
    --sh-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 24px 60px rgba(5, 8, 25, .32);
    --sh-shadow-lg: 0 1px 0 rgba(255,255,255,.16) inset, 0 40px 100px rgba(5, 8, 25, .5);
    --sh-blur: blur(40px) saturate(180%);
    --sh-w-clock: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.06)), rgba(26,30,50,.2);
    --sh-w-weather: linear-gradient(165deg, rgba(110,170,255,.42), rgba(70,110,220,.16)), rgba(26,30,50,.2);
}
body.classic { background: radial-gradient(1200px 600px at 80% -10%, #e7ebff, transparent 60%), #f0f2f5; background-attachment: fixed; }
body.classic .vx-env { display: none; }

/* ---------- Обои ---------- */
.vx-env {
    --px: 0; --py: 0;
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    view-transition-name: vx-env;
    background: #1b2440;
}
.vx-env i { position: absolute; display: block; will-change: transform; }
.vx-env:not([data-wall="sochi"]) i { display: none; }
/* «Живой» блик поверх любых обоев */
.vx-env::before {
    content: ''; position: absolute; inset: -20%;
    background: radial-gradient(35% 30% at 30% 30%, rgba(255,255,255,.14), transparent 70%),
                radial-gradient(30% 25% at 75% 70%, rgba(255,255,255,.08), transparent 70%);
    animation: vxDrift 26s ease-in-out infinite alternate;
    transform: translate(calc(var(--px) * -30px), calc(var(--py) * -20px));
}
@keyframes vxDrift { to { translate: 6% 4%; rotate: 6deg; } }

.vx-env[data-wall="sochi"], .wall-sochi {
    background: linear-gradient(180deg, #24325c 0%, #4a5a92 34%, #c58aa2 56%, #f4b98a 64%, #2f4f7a 66%, #172848 100%);
}
.vx-env-sky {
    inset: -10%;
    background: radial-gradient(60% 40% at 20% 15%, rgba(130,160,255,.55), transparent 70%),
                radial-gradient(50% 35% at 85% 10%, rgba(190,140,255,.45), transparent 70%);
    transform: translate(calc(var(--px) * -14px), calc(var(--py) * -10px));
    transition: transform 1.2s var(--sh-ease);
}
.vx-env-sun {
    width: 46vmax; height: 46vmax; left: 50%; top: 58%; margin: -23vmax 0 0 -23vmax; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,214,160,.95) 0%, rgba(255,170,120,.55) 18%, rgba(255,140,140,.18) 45%, transparent 68%);
    animation: vxBreathe 14s ease-in-out infinite;
    transform: translate(calc(var(--px) * -24px), calc(var(--py) * -12px));
}
.vx-env-hills {
    left: -10%; right: -10%; top: 50%; height: 22%;
    background: radial-gradient(40% 120% at 18% 100%, #26335c 60%, transparent 61%),
                radial-gradient(35% 140% at 46% 100%, #2c3a66 60%, transparent 61%),
                radial-gradient(45% 110% at 80% 100%, #23305a 60%, transparent 61%);
    filter: blur(2px);
    transform: translate(calc(var(--px) * -36px), 0);
    transition: transform 1.2s var(--sh-ease);
}
.vx-env-sea {
    left: 0; right: 0; top: 64%; bottom: 0;
    background: repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px),
                linear-gradient(180deg, #3d5f95 0%, #1d3460 45%, #101d3a 100%);
}
.vx-env-sea::after {
    content: ''; position: absolute; left: 50%; top: 0; width: 18vmax; height: 70%; margin-left: -9vmax;
    background: linear-gradient(180deg, rgba(255,210,160,.55), transparent);
    filter: blur(18px); animation: vxShimmer 6s ease-in-out infinite;
}
.vx-env-glow {
    inset: 0;
    background: radial-gradient(120% 80% at 50% 120%, rgba(8,12,30,.65), transparent 60%),
                linear-gradient(180deg, rgba(10,14,32,.35), rgba(10,14,32,.15) 40%, rgba(10,14,32,.55));
}
@keyframes vxBreathe { 50% { opacity: .82; scale: 1.06; } }
@keyframes vxShimmer { 50% { opacity: .55; } }

/* Градиентные обои: фон больше экрана и медленно «плывёт» */
.vx-env[data-wall]:not([data-wall="sochi"]) { background-size: 160% 160%; animation: vxWallFlow 40s ease-in-out infinite alternate; }
@keyframes vxWallFlow { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.vx-env[data-wall="aurora"], .wall-aurora {
    background-color: #061226;
    background-image: radial-gradient(45% 55% at 20% 30%, rgba(25,230,164,.75), transparent 65%),
                      radial-gradient(45% 50% at 80% 20%, rgba(123,77,255,.8), transparent 65%),
                      radial-gradient(50% 50% at 60% 85%, rgba(26,162,255,.6), transparent 65%),
                      linear-gradient(180deg, #061226, #0b1f3d);
}
.vx-env[data-wall="ocean"], .wall-ocean {
    background-image: radial-gradient(50% 40% at 75% 20%, rgba(127,224,214,.55), transparent 70%),
                      linear-gradient(160deg, #0b2a5b 0%, #0e5f8a 45%, #16a0b5 78%, #7fe0d6 100%);
}
.vx-env[data-wall="lavender"], .wall-lavender {
    background-image: radial-gradient(45% 45% at 20% 20%, rgba(243,181,255,.85), transparent 65%),
                      radial-gradient(45% 45% at 85% 35%, rgba(158,140,255,.85), transparent 65%),
                      linear-gradient(170deg, #5b4bb7, #a77ad6 60%, #f0b6d9);
}
.vx-env[data-wall="sunset"], .wall-sunset {
    background-image: radial-gradient(45% 45% at 80% 20%, rgba(255,214,102,.75), transparent 65%),
                      linear-gradient(135deg, #ff5f6d 0%, #ff8a7a 30%, #ffc371 55%, #6a5af9 100%);
}
.vx-env[data-wall="mint"], .wall-mint {
    background-image: radial-gradient(50% 45% at 25% 25%, rgba(155,227,196,.7), transparent 65%),
                      linear-gradient(140deg, #0f3d3e, #1b8a7a 50%, #9be3c4);
}
.vx-env[data-wall="peach"], .wall-peach {
    background-image: radial-gradient(45% 45% at 20% 80%, rgba(255,226,180,.8), transparent 65%),
                      linear-gradient(150deg, #ffb88c, #ff7aa2 50%, #8e6bff);
}
.vx-env[data-wall="cosmos"], .wall-cosmos {
    background-color: #05060f;
    background-image: radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%),
                      radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 51%),
                      radial-gradient(1.5px 1.5px at 55% 35%, #fff 50%, transparent 51%),
                      radial-gradient(1px 1px at 75% 15%, #fff 50%, transparent 51%),
                      radial-gradient(1px 1px at 85% 60%, #fff 50%, transparent 51%),
                      radial-gradient(1.5px 1.5px at 40% 90%, #fff 50%, transparent 51%),
                      radial-gradient(1px 1px at 65% 80%, #fff 50%, transparent 51%),
                      radial-gradient(40% 35% at 70% 40%, rgba(146,70,255,.55), transparent 70%),
                      radial-gradient(35% 30% at 25% 65%, rgba(40,120,255,.45), transparent 70%),
                      linear-gradient(180deg, #05060f, #0d0b24);
}
.vx-env[data-wall="graphite"], .wall-graphite {
    background-image: radial-gradient(50% 40% at 30% 20%, rgba(255,255,255,.12), transparent 70%),
                      linear-gradient(160deg, #3a3e48, #1d1f25 60%, #121317);
}

/* ---------- Отступ контента под орнамент ---------- */
@media (min-width: 769px) {
    .page-content > .container,
    .page-content .container.fade-in { padding-left: 104px; max-width: 1304px; }
    .footer .container { padding-left: 104px; }
    body .vx-status-wrap { padding-left: calc(16px + 104px); }
    body .vx-status { max-width: 1176px; }
}
body .page-content { padding-top: 0; }

/* ---------- Статус-строка ---------- */
.vx-status-wrap { position: sticky; top: 0; z-index: 600; padding: 14px 16px 0; view-transition-name: vx-status; }
.vx-status {
    margin: 0 auto;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
    height: 62px; padding: 0 10px 0 12px;
    border-radius: 999px;
    background: var(--sh-glass);
    border: 1px solid var(--sh-edge);
    backdrop-filter: var(--sh-blur); -webkit-backdrop-filter: var(--sh-blur);
    box-shadow: var(--sh-shadow);
    color: var(--sh-text);
}
.vx-status-left, .vx-status-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vx-status-right { justify-content: flex-end; }
.vx-status-center { display: flex; align-items: baseline; gap: 10px; }
.vx-clock { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.vx-colon { animation: vxBlink 2s steps(1) infinite; }
@keyframes vxBlink { 50% { opacity: .25; } }
.vx-date { font-size: .85rem; color: var(--sh-muted); }
.vx-date::first-letter { text-transform: uppercase; }
.vx-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; letter-spacing: -.01em; padding: 0 10px; color: var(--sh-text); white-space: nowrap; }
.vx-round {
    position: relative; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sh-fill); border: 1px solid var(--sh-edge);
    color: var(--sh-text); cursor: pointer;
    transition: background .2s, transform .3s var(--sh-spring);
}
.vx-round:hover { background: var(--sh-hover); transform: scale(1.08); }
.vx-round:active { transform: scale(.94); }
.vx-badge-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ff5b5b; box-shadow: 0 0 0 2px rgba(255,255,255,.8); animation: vxPing 2.4s ease-out infinite; }
@keyframes vxPing { 0% { box-shadow: 0 0 0 0 rgba(255,91,91,.6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(255,91,91,0); } }
.vx-weather-mini {
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 14px; border-radius: 999px;
    background: var(--sh-fill); border: 1px solid var(--sh-edge);
    font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; color: var(--sh-text);
}
.vx-search-pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 8px 0 14px; margin-left: 4px; border-radius: 999px;
    background: var(--sh-fill); border: 1px solid var(--sh-edge);
    color: var(--sh-muted); font: inherit; font-size: .88rem; cursor: pointer;
    transition: background .2s, color .2s, transform .3s var(--sh-spring);
}
.vx-search-pill:hover { background: var(--sh-hover); color: var(--sh-text); }
.vx-search-pill:active { transform: scale(.96); }
.vx-kbd {
    display: inline-flex; align-items: center; gap: 2px;
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px;
    font: 600 .72rem/1 'Inter', sans-serif; color: var(--sh-muted);
    background: var(--sh-fill); border: 1px solid var(--sh-edge);
    box-shadow: 0 1px 0 var(--sh-edge);
}
.vx-status .user-menu { padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--sh-fill); border: 1px solid var(--sh-edge); }
.vx-status .user-menu:hover { background: var(--sh-hover); }
.vx-status .user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Орнамент навигации ---------- */
.vx-ornament {
    position: fixed; z-index: 550; left: 18px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px; border-radius: 999px;
    background: var(--sh-glass); border: 1px solid var(--sh-edge);
    backdrop-filter: var(--sh-blur); -webkit-backdrop-filter: var(--sh-blur);
    box-shadow: var(--sh-shadow-lg);
    view-transition-name: vx-ornament;
}
.vx-orn-item {
    position: relative; width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--sh-text); opacity: .82; background: transparent; border: none; cursor: pointer; font: inherit;
    transition: background .2s, opacity .2s, transform .35s var(--sh-spring);
}
.vx-orn-item:hover { background: var(--sh-hover); opacity: 1; transform: scale(1.1); }
.vx-orn-item:active { transform: scale(.92); }
.vx-orn-item.active { background: var(--sh-active-bg); color: var(--sh-active-fg); opacity: 1; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.vx-orn-label {
    position: absolute; left: calc(100% + 14px); top: 50%;
    transform: translate(-8px, -50%) scale(.96); opacity: 0; pointer-events: none;
    padding: 7px 14px; border-radius: 999px; white-space: nowrap;
    font-size: .84rem; font-weight: 600; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge);
    backdrop-filter: var(--sh-blur); -webkit-backdrop-filter: var(--sh-blur);
    box-shadow: var(--sh-shadow);
    transition: opacity .18s, transform .35s var(--sh-spring);
}
.vx-orn-item:hover .vx-orn-label, .vx-orn-item:focus-visible .vx-orn-label { opacity: 1; transform: translate(0, -50%) scale(1); }
.vx-orn-sep { width: 24px; height: 1px; background: var(--sh-edge); margin: 4px 0; }

/* ---------- Заголовок страниц (обе темы) ---------- */
body .page-header { padding-top: 26px; }
body .page-header h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; }
body.vx .page-header h1 { text-shadow: 0 2px 20px rgba(0,0,0,.25); }

/* ---------- Виджеты ---------- */
.vx-widgets { display: grid; grid-template-columns: 1.05fr 1fr 1.1fr 1.25fr; gap: 16px; margin-top: 24px; perspective: 1200px; }
.vx-widget {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    min-height: 170px; padding: 20px 22px;
    border-radius: 32px; overflow: hidden;
    color: var(--sh-text);
    background: var(--sh-glass); border: 1px solid var(--sh-edge);
    backdrop-filter: var(--sh-blur); -webkit-backdrop-filter: var(--sh-blur);
    box-shadow: var(--sh-shadow);
    transform: rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg)) translateZ(0);
    transition: transform .5s var(--sh-ease), box-shadow .4s;
    transform-style: preserve-3d;
}
.vx-widget::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.18), transparent 45%);
    opacity: 0; transition: opacity .3s;
}
.vx-widget:hover::after { opacity: 1; }
.vx-widget:hover { box-shadow: var(--sh-shadow-lg); }
.vx-w-label { font-size: .72rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--sh-muted); }
.vx-w-time { font-size: 3.6rem; font-weight: 200; letter-spacing: -.04em; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.vx-w-sub { font-size: .92rem; opacity: .85; }
.vx-w-clock { background: var(--sh-w-clock); }
.vx-w-weather { background: var(--sh-w-weather); }
body.classic .vx-w-weather { color: #fff; --sh-muted: rgba(255,255,255,.75); }
.vx-w-weather-main { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.vx-w-temp { font-size: 3.2rem; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.vx-w-icon { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); animation: vxFloat 6s ease-in-out infinite; }
@keyframes vxFloat { 50% { translate: 0 -5px; } }
.vx-w-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; font-size: .78rem; opacity: .8; }
.vx-w-big { font-size: 2.8rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.vx-w-big small { font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--sh-muted); margin-left: 8px; }
.vx-w-bar { height: 8px; border-radius: 4px; background: rgba(255,170,90,.6); overflow: hidden; margin-top: auto; }
.vx-w-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b9bff, #b8a6ff); border-radius: 4px; transform-origin: 0 50%; animation: vxGrow 1.2s .3s var(--sh-ease) both; }
@keyframes vxGrow { from { transform: scaleX(0); } }
.vx-w-legend { display: flex; justify-content: space-between; font-size: .8rem; opacity: .85; }
.vx-w-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-rent { background: #9aa6ff; }
.dot-sale { background: #ffb066; }
.vx-w-split { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 10px; padding: 14px; }
.vx-w-mini, .vx-w-last {
    display: flex; flex-direction: column; gap: 4px;
    padding: 12px 14px; border-radius: 22px;
    background: var(--sh-fill); border: 1px solid var(--sh-edge); color: var(--sh-text);
    transition: transform .4s var(--sh-spring), background .2s;
}
a.vx-w-mini:hover, .vx-w-last:hover { background: var(--sh-hover); transform: translateY(-2px); opacity: 1; }
.vx-w-mini .vx-w-big { font-size: 2rem; margin-top: 2px; }
.vx-w-violet { color: #8f7cff; }
.vx-w-green { color: #10b981; }
body.vx .vx-w-violet { color: #d4c8ff; }
body.vx .vx-w-green { color: #86efc0; }
.vx-w-last { grid-column: 1 / -1; }
.vx-w-last-name { font-weight: 600; }
.vx-w-last-time { font-size: .8rem; color: var(--sh-muted); }
a.vx-widget { color: var(--sh-text); }
a.vx-widget:hover { opacity: 1; }

/* ---------- Ctrl+K — палитра ---------- */
.vx-palette { position: fixed; inset: 0; z-index: 3000; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; visibility: hidden; pointer-events: none; }
.vx-palette.open { visibility: visible; pointer-events: auto; }
.vx-palette-backdrop {
    position: absolute; inset: 0; background: var(--sh-overlay);
    backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
    opacity: 0; transition: opacity .3s;
}
.vx-palette.open .vx-palette-backdrop { opacity: 1; }
.vx-palette-panel {
    position: relative; width: 100%; max-width: 680px;
    display: flex; flex-direction: column; max-height: 70vh;
    border-radius: 30px; overflow: hidden; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge);
    backdrop-filter: blur(50px) saturate(190%); -webkit-backdrop-filter: blur(50px) saturate(190%);
    box-shadow: var(--sh-shadow-lg), 0 0 0 1px rgba(255,255,255,.04);
    opacity: 0; transform: translateY(-14px) scale(.94); filter: blur(8px);
    transition: opacity .22s, transform .45s var(--sh-spring), filter .3s;
}
.vx-palette.open .vx-palette-panel { opacity: 1; transform: none; filter: none; }
.vx-palette-search { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--sh-edge); }
.vx-palette-search svg { color: var(--sh-muted); flex-shrink: 0; }
.vx-palette-search input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font: 500 1.15rem 'Inter', sans-serif; color: var(--sh-text);
}
.vx-palette-search input::placeholder { color: var(--sh-muted); }
.vx-palette-search .vx-kbd { cursor: pointer; }
.vx-palette-list { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.vx-pal-group { padding: 12px 12px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sh-muted); }
.vx-pal-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 12px; border-radius: 16px; cursor: pointer; color: var(--sh-text);
    opacity: 0; transform: translateY(6px);
    animation: vxItemIn .35s var(--sh-ease) forwards; animation-delay: calc(var(--n, 0) * 25ms);
}
@keyframes vxItemIn { to { opacity: 1; transform: none; } }
.vx-pal-item.sel { background: var(--sh-hover); box-shadow: inset 0 0 0 1px var(--sh-edge); }
.vx-pal-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--sh-fill); display: flex; align-items: center; justify-content: center; }
.vx-pal-thumb.round { border-radius: 50%; background-size: cover; background-position: center; }
.vx-pal-ico { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--sh-fill); }
.vx-pal-text { flex: 1; min-width: 0; }
.vx-pal-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-pal-title mark { background: rgba(255, 214, 102, .45); color: inherit; border-radius: 4px; padding: 0 1px; }
.vx-pal-sub { font-size: .82rem; color: var(--sh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-pal-meta { text-align: right; font-size: .82rem; color: var(--sh-muted); white-space: nowrap; }
.vx-pal-meta b { display: block; color: var(--sh-text); font-size: .92rem; }
.vx-pal-tag { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; background: rgba(139,92,246,.25); color: #8b5cf6; }
body.vx .vx-pal-tag { color: #d4c8ff; }
.vx-pal-empty { padding: 34px 16px; text-align: center; color: var(--sh-muted); }
.vx-pal-empty b { display: block; color: var(--sh-text); margin-bottom: 4px; }
.vx-palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--sh-edge); font-size: .76rem; color: var(--sh-muted); }
.vx-palette-foot .vx-kbd { margin-right: 3px; }
.vx-palette-hint { margin-left: auto; }
@keyframes vxSpin { to { rotate: 360deg; } }
.vx-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--sh-edge); border-top-color: var(--sh-text); animation: vxSpin .7s linear infinite; }

/* ---------- Модальное окно «Оформление» ---------- */
.vx-modal { position: fixed; inset: 0; z-index: 2900; display: flex; align-items: center; justify-content: center; padding: 16px; visibility: hidden; pointer-events: none; }
.vx-modal.open { visibility: visible; pointer-events: auto; }
.vx-modal-backdrop { position: absolute; inset: 0; background: var(--sh-overlay); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; }
.vx-modal.open .vx-modal-backdrop { opacity: 1; }
.vx-modal-panel {
    position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto;
    padding: 26px; border-radius: 34px; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge);
    backdrop-filter: blur(50px) saturate(190%); -webkit-backdrop-filter: blur(50px) saturate(190%);
    box-shadow: var(--sh-shadow-lg);
    opacity: 0; transform: perspective(1200px) rotateX(10deg) translateY(30px) scale(.94);
    transition: opacity .25s, transform .55s var(--sh-spring);
}
.vx-modal.open .vx-modal-panel { opacity: 1; transform: none; }
.vx-modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.vx-modal-head h2 { font-size: 1.6rem; letter-spacing: -.03em; margin-top: 2px; }
.vx-set-label { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-muted); }
.vx-set-note { font-weight: 500; letter-spacing: 0; text-transform: none; opacity: 0; transition: opacity .2s; }
body.classic .vx-set-note { opacity: 1; }
.vx-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vx-theme-card, .vx-wall-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
    padding: 10px; border-radius: 22px; cursor: pointer; font: inherit; color: var(--sh-text);
    background: var(--sh-fill); border: 2px solid transparent;
    transition: border-color .2s, transform .35s var(--sh-spring), background .2s;
}
.vx-theme-card:hover, .vx-wall-card:hover { transform: translateY(-3px); background: var(--sh-hover); }
.vx-theme-card[aria-checked="true"], .vx-wall-card[aria-checked="true"] { border-color: var(--sh-active-bg); }
.vx-theme-card b { margin: 6px 4px 0; }
.vx-theme-card small, .vx-wall-card small { margin: 0 4px 2px; font-size: .78rem; color: var(--sh-muted); }
.vx-theme-prev { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.vx-theme-prev i { position: absolute; border-radius: 6px; }
.prev-vision { background: linear-gradient(180deg, #2b3a6b, #b8869c 60%, #233a66); }
.prev-vision i { background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(4px); }
.prev-classic { background: #eef0f4; }
.prev-classic i { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.vx-theme-prev i:nth-child(1) { left: 8%; right: 8%; top: 10%; height: 14%; border-radius: 999px; }
.vx-theme-prev i:nth-child(2) { left: 8%; width: 40%; top: 32%; bottom: 10%; }
.vx-theme-prev i:nth-child(3) { right: 8%; width: 40%; top: 32%; bottom: 10%; }
.vx-walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
body.classic .vx-walls { opacity: .45; pointer-events: none; }
.vx-wall-prev { width: 100%; aspect-ratio: 16 / 10; border-radius: 14px; background-size: cover; }
.vx-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: var(--sh-fill); cursor: pointer; }
.vx-switch-row b { display: block; }
.vx-switch-row small { color: var(--sh-muted); font-size: .8rem; }
.vx-admin-note { margin-top: 14px; font-size: .8rem; color: var(--sh-muted); }
.vx-switch { appearance: none; -webkit-appearance: none; position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--sh-hover); cursor: pointer; flex-shrink: 0; transition: background .25s; }
.vx-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .35s var(--sh-spring); }
.vx-switch:checked { background: #34c759; }
.vx-switch:checked::after { transform: translateX(20px); }

/* ---------- Свои выпадающие списки ---------- */
.cselect { position: relative; }
.cselect > select { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; inset: 0; }
.cselect-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    text-align: left; font: inherit; cursor: pointer;
}
.cselect-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-btn svg { flex-shrink: 0; opacity: .6; transition: transform .3s var(--sh-spring); }
.cselect.open .cselect-btn svg { transform: rotate(180deg); }
.cselect.open .cselect-btn { border-color: var(--sh-active-bg); }
.cselect-menu {
    position: absolute; z-index: 700; left: 0; right: 0; top: calc(100% + 6px);
    min-width: 200px; max-height: 300px; overflow-y: auto; padding: 6px;
    border-radius: 18px; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: var(--sh-shadow-lg);
    opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top center; pointer-events: none;
    transition: opacity .16s, transform .3s var(--sh-spring);
}
.cselect.up .cselect-menu { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; transform: translateY(6px) scale(.97); }
.cselect.open .cselect-menu { opacity: 1; transform: none; pointer-events: auto; }
.cselect-opt {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px; border-radius: 12px; cursor: pointer; font-size: .92rem;
}
.cselect-opt.hl { background: var(--sh-hover); }
.cselect-opt.sel { font-weight: 600; }
.cselect-opt.sel::after { content: ''; width: 16px; height: 16px; flex-shrink: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center/contain no-repeat; }
.input-group .cselect { flex: 0 0 auto; min-width: 150px; }

/* ---------- Таблица объектов ---------- */
.data-table thead th { background: transparent; }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; transition: color .2s; }
.th-sort:hover { color: var(--sh-text) !important; }
.th-sort::after { content: '↕'; margin-left: 6px; opacity: .35; font-size: .9em; }
.th-sort[data-dir="asc"]::after { content: '↑'; opacity: 1; }
.th-sort[data-dir="desc"]::after { content: '↓'; opacity: 1; }
.data-table tbody tr.table-row[data-href] { cursor: pointer; transition: background .2s, transform .3s var(--sh-ease); }
.data-table.is-sorted .drag-handle { visibility: hidden; }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions > * { vertical-align: middle; }
.row-quick { display: inline-flex; gap: 4px; margin-right: 6px; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .3s var(--sh-spring); }
.row-quick form { margin: 0; }
tr.table-row:hover .row-quick, .row-quick:focus-within { opacity: 1; transform: none; }
.rq-btn {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sh-fill); border: 1px solid var(--sh-edge); color: var(--sh-text); cursor: pointer;
    transition: background .2s, transform .3s var(--sh-spring);
}
.rq-btn:hover { background: var(--sh-active-bg); color: var(--sh-active-fg); transform: scale(1.1); opacity: 1; }
.rq-btn.on { color: #8b5cf6; }
body.vx .rq-btn.on { color: #c4b5fd; }
.td-actions .dropdown { display: inline-block; }
.data-table tbody tr.table-row { animation: vxRowIn .5s var(--sh-ease) both; animation-delay: calc(var(--n, 0) * 22ms); }
@keyframes vxRowIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Кнопки в меню ---------- */
button.dropdown-item { font-family: inherit; font-size: .87rem; }
button.profile-nav-item { width: 100%; background: none; border: none; font: inherit; cursor: pointer; text-align: left; }

/* ---------- Экран входа ---------- */
.lock {
    position: relative; min-height: 100vh; min-height: 100svh;
    display: grid; grid-template-columns: 1fr minmax(360px, 420px); grid-template-rows: auto 1fr;
    gap: 24px 48px; padding: 32px clamp(24px, 5vw, 72px) 36px;
    color: var(--sh-text);
}
.lock-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.lock-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; padding: 12px 22px; border-radius: 999px; background: var(--sh-glass); border: 1px solid var(--sh-edge); backdrop-filter: var(--sh-blur); -webkit-backdrop-filter: var(--sh-blur); box-shadow: var(--sh-shadow); }
.lock-weather { width: 280px; min-height: 0; padding: 18px 20px; gap: 4px; border-radius: 28px; animation: vxRise .9s .15s var(--sh-ease) both; }
.lock-weather-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.lock-weather .vx-w-icon { font-size: 2.4rem; }
.lock-weather-temp { font-size: 2.8rem; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.lock-weather-cond { font-size: .95rem; font-weight: 500; }
.lock-weather .vx-w-meta { margin-top: 10px; }
.lock-form {
    grid-column: 2; grid-row: 2; align-self: center; margin-bottom: 28px;
    padding: 34px 32px !important; border-radius: 34px !important;
    color: var(--sh-text);
    animation: vxRise .9s .05s var(--sh-ease) both;
}
body.classic .lock-form { background: rgba(255,255,255,.8); border: 1px solid var(--sh-edge); box-shadow: var(--sh-shadow-lg); }
.lock-form-head { margin-bottom: 24px; }
.lock-form-head h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; }
.lock-form-head p { color: var(--sh-muted); margin-top: 4px; }
.lock-submit { height: 50px; margin-top: 6px; font-size: 1rem; }
.lock-forgot { display: block; margin: 14px auto 0; background: none; border: none; font: inherit; font-size: .85rem; color: var(--sh-muted); cursor: pointer; }
.lock-forgot:hover { color: var(--sh-text); text-decoration: underline; }
.lock-clock { grid-column: 1; grid-row: 2; align-self: end; animation: vxRise 1s var(--sh-ease) both; }
.lock-date { font-size: clamp(1.1rem, 1.6vw, 1.5rem); font-weight: 500; opacity: .9; margin-bottom: 4px; padding-left: .3em; }
.lock-time {
    /* влезает и в 1366×768, и в большие мониторы */
    font-size: min(11rem, 12vw, 22vh); font-weight: 200; letter-spacing: -.06em; line-height: .88;
    font-variant-numeric: tabular-nums;
}
body.vx .lock-time, body.vx .lock-date { text-shadow: 0 6px 40px rgba(0,0,0,.25); }
.lock-version { position: absolute; right: clamp(24px, 5vw, 72px); bottom: 22px; width: min(420px, 100%); text-align: center; font-size: .78rem; color: var(--sh-muted); letter-spacing: .05em; }
@keyframes vxRise { from { opacity: 0; transform: translateY(24px) scale(.98); filter: blur(6px); } }

/* «Забыл пароль» */
.forgot-modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: var(--sh-overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.forgot-modal.open { display: flex; }
.forgot-modal-body {
    max-width: 380px; width: calc(100% - 32px); padding: 28px 26px; text-align: center;
    border-radius: 30px; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); box-shadow: var(--sh-shadow-lg);
    animation: vxRise .45s var(--sh-spring);
}
.forgot-modal-body h3 { margin: 0 0 10px; font-size: 1.1rem; }
.forgot-modal-body p { margin: 0 0 18px; color: var(--sh-muted); font-size: .9rem; }

/* ---------- Движение: 3D-переходы между страницами ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vxPageOut .38s cubic-bezier(.4, 0, 1, 1) both; transform-origin: 50% 40%; }
::view-transition-new(root) { animation: vxPageIn .62s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 40%; }
::view-transition-group(vx-env), ::view-transition-group(vx-status), ::view-transition-group(vx-ornament) { animation-duration: .4s; }
@keyframes vxPageOut { to { opacity: 0; transform: perspective(1600px) translateZ(-140px) rotateX(6deg); filter: blur(8px); } }
@keyframes vxPageIn { from { opacity: 0; transform: perspective(1600px) translateZ(120px) rotateX(-8deg); filter: blur(10px); } }

/* Смена темы/обоев: новая тема раскрывается кругом от точки клика */
html.vx-swap .vx-env, html.vx-swap .vx-status-wrap, html.vx-swap .vx-ornament { view-transition-name: none; }
html.vx-swap::view-transition-old(root) { animation: none; }
html.vx-swap::view-transition-new(root) { animation: vxReveal .7s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes vxReveal { from { clip-path: circle(0 at var(--swap-x, 50%) var(--swap-y, 0)); } to { clip-path: circle(150vmax at var(--swap-x, 50%) var(--swap-y, 0)); } }

/* Появление контента */
body:not(.no-motion) .page-header,
body:not(.no-motion) .page-content .card:not(.filter-panel *),
body:not(.no-motion) .vx-widget,
body:not(.no-motion) .quick-chips,
body:not(.no-motion) .search-bar { animation: vxRise .8s var(--sh-ease) both; animation-delay: calc(var(--n, 0) * 60ms); }
.vx-widget:nth-child(1) { --n: 1; } .vx-widget:nth-child(2) { --n: 2; } .vx-widget:nth-child(3) { --n: 3; } .vx-widget:nth-child(4) { --n: 4; }
.page-header { --n: 4; }
.page-content .card { --n: 6; }

/* Рябь на кнопках */
.vx-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .25; transform: scale(0); animation: vxRipple .6s var(--sh-ease) forwards; }
@keyframes vxRipple { to { transform: scale(4); opacity: 0; } }
.btn, .vx-orn-item, .rq-btn, .vx-round, .qchip, .vx-search-pill { overflow: hidden; position: relative; isolation: isolate; }
.qchip:active, .btn:active { box-shadow: none; }
.vx-orn-item { overflow: visible; }

/* Отключение анимаций */
body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation: none !important; transition-duration: .01ms !important; }
html:has(body.no-motion)::view-transition-old(root), html:has(body.no-motion)::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    .vx-env::before, .vx-env-sun, .vx-env-sea::after, .vx-env[data-wall] { animation: none !important; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    .vx-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .lock { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; gap: 18px; padding: 18px 16px 28px; }
    .lock-top { flex-direction: row; align-items: center; }
    .lock-brand { font-size: 1rem; padding: 10px 18px; }
    .lock-weather { width: auto; min-height: 0 !important; padding: 8px 14px !important; border-radius: 20px !important; }
    .lock-weather .vx-w-meta, .lock-weather .vx-w-label, .lock-weather-cond { display: none; }
    .lock-weather-row { gap: 8px; margin: 0; }
    .lock-weather .vx-w-icon { font-size: 1.6rem; }
    .lock-weather-temp { font-size: 1.5rem; }
    .lock-clock { grid-column: 1; grid-row: 2; text-align: center; margin: 18px 0 6px; }
    .lock-time { font-size: clamp(4.5rem, 24vw, 7rem); }
    .lock-form { grid-column: 1; grid-row: 3; padding: 26px 22px !important; }
    .lock-version { position: static; width: auto; grid-column: 1; grid-row: 4; }
}
@media (max-width: 768px) {
    .vx-ornament { display: none; }
    .toast { left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: none; }
    .vx-status-wrap { padding: 10px 10px 0; }
    .vx-status { grid-template-columns: 1fr auto; height: 56px; }
    .vx-search-pill { padding: 0 12px; }
    .vx-widgets { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
    .vx-widget { min-height: 140px; padding: 16px; border-radius: 26px; }
    .vx-w-time { font-size: 2.6rem; }
    .vx-w-temp { font-size: 2.4rem; }
    .vx-w-icon { font-size: 2rem; }
    .vx-w-meta { flex-direction: column; gap: 2px; }
    .vx-w-stats, .vx-w-split { grid-column: 1 / -1; min-height: 0; }
    .vx-palette { padding-top: 10px; }
    .vx-palette-panel { max-height: 80vh; border-radius: 26px; }
    .vx-palette-foot { display: none; }
    .vx-walls { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .vx-modal-panel { padding: 20px; border-radius: 28px; }
    body .page-header h1 { font-size: 1.6rem; }
}

/* ---------- Скрытые скроллбары (прокрутка работает, полос не видно) ---------- */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; background: transparent; }

/* ---------- Фильтр объектов — модальное окно ---------- */
.quick-chips { align-items: center; }
.qcount { margin-left: auto; padding-left: 12px; font-size: .8rem; white-space: nowrap; }
html.filter-lock, html.filter-lock body { overflow: hidden; }
@media (min-width: 769px) {
    .filter-panel:not(.hidden) {
        position: fixed; inset: 0; z-index: 1500; margin: 0 !important;
        display: flex; align-items: flex-start; justify-content: center; padding: 12vh 24px 24px;
        background: var(--sh-overlay);
        backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
        animation: vxFade .3s ease both;
    }
    .filter-panel.closing { animation: vxFadeOut .22s ease both !important; }
    .filter-panel.closing > .card { animation: vxPalOut .22s ease both !important; }
    .filter-panel:not(.hidden) > .card {
        width: 100%; max-width: 820px;
        background: var(--sh-strong) !important; border: 1px solid var(--sh-edge);
        border-radius: 32px !important; box-shadow: var(--sh-shadow-lg);
        backdrop-filter: blur(50px) saturate(190%); -webkit-backdrop-filter: blur(50px) saturate(190%);
        animation: vxPalIn .45s var(--sh-spring) both !important;
    }
    .filter-panel:not(.hidden) .card-body { padding: 26px 28px; }
    .filter-panel .filter-grid { grid-template-columns: repeat(4, 1fr); }
}
@keyframes vxFade { from { opacity: 0; } }
@keyframes vxFadeOut { to { opacity: 0; } }
/* Та же анимация, что у палитры Ctrl+K */
@keyframes vxPalIn { from { opacity: 0; transform: translateY(-14px) scale(.94); filter: blur(8px); } }
@keyframes vxPalOut { to { opacity: 0; transform: translateY(-8px) scale(.97); filter: blur(6px); } }

/* ---------- Статусы в таблице: компактные, без переносов ---------- */
.status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.st {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 3px 9px 3px 7px; border-radius: 999px;
    font-size: .72rem; font-weight: 600; line-height: 1.3;
    background: var(--sh-fill); color: var(--sh-text);
}
.st i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.st-ok i { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.st-warn i { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.st-site i { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
body.vx .st-ok i { background: #34d399; }
body.vx .st-site i { background: #c4b5fd; }
.row-id, .addr-city { display: none; }
.addr-city { font-size: .78rem; margin-top: 2px; }
.data-table td.col-addr { max-width: 240px; }
.data-table td.col-addr .map-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Статус-строка плотнее, когда под ней прокручивается контент */
.vx-status-wrap.scrolled .vx-status { background: var(--sh-strong); box-shadow: var(--sh-shadow-lg); }

/* ---------- AI-ассистент — окно по центру (десктоп) ---------- */
.assistant-fab { display: none !important; }
@media (min-width: 769px) {
    .assistant-overlay {
        background: var(--sh-overlay) !important;
        backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
        transition: opacity .3s, visibility .3s;
    }
    .assistant-panel {
        top: 9vh !important; bottom: auto; left: 50% !important; right: auto !important;
        width: min(760px, calc(100vw - 48px)) !important; height: min(78vh, 760px) !important;
        margin-left: calc(min(760px, calc(100vw - 48px)) / -2);
        border-radius: 30px; overflow: hidden;
        border: 1px solid var(--sh-edge) !important;
        background: var(--sh-strong) !important; color: var(--sh-text);
        backdrop-filter: blur(50px) saturate(190%) !important; -webkit-backdrop-filter: blur(50px) saturate(190%) !important;
        box-shadow: var(--sh-shadow-lg) !important;
        opacity: 0; visibility: hidden; transform: translateY(-14px) scale(.94); filter: blur(8px);
        transition: opacity .22s, transform .45s var(--sh-spring), filter .3s, visibility .45s !important;
    }
    .assistant-panel.open { opacity: 1; visibility: visible; transform: none; filter: none; }
    .assistant-resize { display: none; }
    .assistant-header { padding: 18px 22px; }
    .assistant-messages { padding: 22px; }
    .assistant-input { padding: 14px 18px 18px; }
}

/* ---------- Плавная смена фильтров: виджеты и шапка стоят, таблица «перелистывается» ---------- */
.vx-widgets { view-transition-name: vx-widgets; }
.page-header { view-transition-name: vx-page-head; }
.quick-chips { view-transition-name: vx-chips; }
#objectsTable { view-transition-name: vx-table; }
#mobileGrid { view-transition-name: vx-grid; }
::view-transition-old(vx-table), ::view-transition-old(vx-grid) { animation: vxFlipOut .35s cubic-bezier(.4, 0, 1, 1) both; transform-origin: 50% 0; }
::view-transition-new(vx-table), ::view-transition-new(vx-grid) { animation: vxFlipIn .6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 0; }
::view-transition-group(vx-table), ::view-transition-group(vx-grid) { animation-duration: .5s; }
@keyframes vxFlipOut { to { opacity: 0; transform: perspective(1400px) rotateX(-14deg) translateY(-12px) scale(.97); filter: blur(6px); } }
@keyframes vxFlipIn { from { opacity: 0; transform: perspective(1400px) rotateX(16deg) translateY(24px) scale(.97); filter: blur(8px); } }
::view-transition-old(vx-widgets), ::view-transition-new(vx-widgets),
::view-transition-old(vx-page-head), ::view-transition-new(vx-page-head),
::view-transition-old(vx-chips), ::view-transition-new(vx-chips) { animation-duration: .35s; }
/* Активная чипса «перетекает» мягко */
.qchip { transition: background .3s, color .3s, transform .35s var(--sh-spring); }
.qchip:hover { transform: translateY(-1px); }
.qchip.active { transform: scale(1.03); }

/* ---------- Маленькие экраны (ноутбуки 1024–1366) ---------- */
@media (max-width: 1366px) and (min-width: 769px) {
    .data-table thead th, .data-table tbody td { padding-left: 10px; padding-right: 10px; }
    .data-table td.col-addr { max-width: 190px; }
    .vx-status-center .vx-date { display: none; }
}
@media (max-width: 1240px) and (min-width: 769px) {
    .col-id { display: none; }
    .row-id { display: inline; }
    .vx-status .user-info { display: none; }
    .vx-status .user-menu { padding: 4px; }
    .vx-widgets { gap: 12px; }
    .vx-widget { padding: 16px 18px; min-height: 150px; }
    .vx-w-time { font-size: 3rem; }
    .vx-w-temp { font-size: 2.7rem; }
    .vx-w-big { font-size: 2.3rem; }
}
@media (max-width: 1100px) and (min-width: 769px) {
    .col-city { display: none; }
    .addr-city { display: block; }
    .page-content > .container, .page-content .container.fade-in { padding-left: 84px; padding-right: 16px; }
    .footer .container { padding-left: 84px; }
    body .vx-status-wrap { padding-left: calc(10px + 84px); padding-right: 10px; }
    .vx-ornament { left: 10px; padding: 8px; }
    .vx-orn-item { width: 42px; height: 42px; }
    .vx-weather-mini { display: none !important; }
    .table-avatar { width: 40px; height: 40px; }
    .row-quick { display: none; }
}
@media (max-width: 960px) and (min-width: 769px) {
    .vx-search-pill span, .vx-search-pill .vx-kbd { display: none; }
    .data-table { font-size: .85rem; }
    .vx-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 760px) and (min-width: 769px) {
    .vx-ornament { gap: 2px; padding: 6px; }
    .vx-orn-item { width: 40px; height: 40px; }
    .vx-orn-sep { margin: 2px 0; }
}

/* ---------- Статистика сайта ---------- */
body { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --viz-grid: rgba(15,20,40,.08); --viz-ink: #52514e; }
body.vx { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --viz-grid: rgba(255,255,255,.1); --viz-ink: rgba(235,238,255,.62); }
.stats-range { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 22px; }
.kpi { min-height: 0 !important; padding: 18px 20px !important; gap: 4px; }
.kpi-num { font-size: 2.4rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi-num small { font-size: 1.1rem; font-weight: 600; margin-left: 2px; color: var(--sh-muted); }
.kpi-sub { font-size: .78rem; color: var(--sh-muted); line-height: 1.35; }
.kpi-delta { font-size: .78rem; font-weight: 600; margin-top: auto; padding-top: 6px; }
.kpi-delta.up { color: #10b981; }
.kpi-delta.down { color: #ef4444; }
.kpi-delta.flat { color: var(--sh-muted); font-weight: 500; }
body.vx .kpi-delta.up { color: #6ee7b7; }
body.vx .kpi-delta.down { color: #fca5a5; }
.viz { padding: 22px 24px; position: relative; }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.viz-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.viz-sub { font-size: .8rem; color: var(--sh-muted); margin-top: 2px; }
.viz-legend { display: flex; gap: 16px; font-size: .82rem; color: var(--sh-text); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend i { width: 14px; height: 3px; border-radius: 2px; }
.viz-plot { position: relative; height: 280px; }
.viz-plot-sm { height: 210px; }
.viz-plot svg { display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { font-size: 11px; fill: var(--viz-ink); font-variant-numeric: tabular-nums; }
.viz-label { font-size: 11px; font-weight: 700; fill: var(--sh-text); font-variant-numeric: tabular-nums; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--sh-ease); }
.viz-line.s1 { stroke: var(--series-1); }
.viz-line.s2 { stroke: var(--series-2); }
.viz-area.s1 { fill: var(--series-1); opacity: .12; }
.viz-cross { stroke: var(--sh-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-dot { stroke: var(--sh-strong); stroke-width: 2; }
body.vx .viz-dot { stroke: #2b2f40; }
.viz-dot.s1 { fill: var(--series-1); }
.viz-dot.s2 { fill: var(--series-2); }
.viz-bar.s3 { fill: var(--series-3); transform-box: fill-box; transform-origin: bottom; animation: vxBarUp .7s var(--sh-ease) both; }
@keyframes vxBarUp { from { transform: scaleY(0); } }
.viz-bar-g { cursor: default; outline: none; }
.viz-bar-g:hover .viz-bar, .viz-bar-g:focus .viz-bar { filter: brightness(1.15); }
.viz-tip {
    position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
    padding: 10px 12px; border-radius: 14px; font-size: .8rem; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge); box-shadow: var(--sh-shadow-lg);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.viz-tip-title { font-weight: 600; margin-bottom: 6px; color: var(--sh-muted); }
.viz-tip-row { display: flex; align-items: center; gap: 6px; line-height: 1.6; }
.viz-tip-row i { width: 10px; height: 10px; border-radius: 3px; }
.viz-tip-row b { font-variant-numeric: tabular-nums; }
.viz-table { margin-top: 12px; }
.viz-table summary { cursor: pointer; font-size: .82rem; color: var(--sh-muted); }
.viz-table summary:hover { color: var(--sh-text); }
.viz-table table { margin-top: 10px; font-size: .85rem; }
.stats-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.stats-grid-wide { grid-template-columns: 1.4fr 1fr; }
.hbar { height: 8px; border-radius: 4px; background: var(--sh-fill); overflow: hidden; margin-top: 6px; }
.hbar i { display: block; height: 100%; border-radius: 4px; transform-origin: 0 50%; animation: vxGrow 1s var(--sh-ease) both; }
.dev-split { display: flex; flex-direction: column; gap: 6px; }
.dev-row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.dev-row span { flex: 1; }
.dev-row b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.dev-row small { color: var(--sh-muted); font-size: .78rem; }
.rank { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.rank-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rank-title { font-weight: 600; color: var(--sh-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-title span { color: var(--sh-muted); font-weight: 500; }
.rank-vals { font-size: .8rem; color: var(--sh-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-vals b { color: var(--sh-text); }
.rank-place { font-size: .78rem; color: var(--sh-muted); }

/* Виджет «Сайт» на главной */
.vx-w-site .vx-w-site-top { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.vx-w-site .vx-w-big { margin-top: 0; }
.vx-w-site .kpi-delta { padding: 0; margin: 0; }
.vx-spark { display: block; width: 100%; height: 38px; margin-top: auto; overflow: visible; }
.vx-spark path.l { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vx-spark path.a { fill: var(--series-1); opacity: .16; }
.vx-w-site-foot { display: flex; justify-content: space-between; font-size: .78rem; color: var(--sh-muted); }
.vx-w-site-foot b { color: var(--sh-text); }

/* Сетка виджетов с пятым виджетом */
@media (min-width: 1501px) { .vx-widgets { grid-template-columns: 1fr 1fr 1.05fr 1.2fr 1.25fr; } }
@media (max-width: 1500px) and (min-width: 1101px) {
    .vx-widgets { grid-template-columns: repeat(6, 1fr); }
    .vx-w-clock, .vx-w-weather, .vx-w-site { grid-column: span 2; }
    .vx-w-stats, .vx-w-split { grid-column: span 3; }
    .vx-widget { min-height: 150px; }
}
@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(3, 1fr); }
    .stats-grid, .stats-grid-wide { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi-num { font-size: 1.9rem; }
    .viz { padding: 18px; }
    .viz-plot { height: 230px; }
    .vx-w-site { grid-column: 1 / -1; }
}

/* ---------- Вход на невысоких экранах (ноутбуки 1366×768, 1280×720, окна браузера) ---------- */
@media (max-height: 860px) and (min-width: 901px) {
    .lock { padding: 22px clamp(24px, 4vw, 56px) 22px; gap: 16px 40px; }
    .lock-brand { padding: 10px 20px; font-size: 1.05rem; }
    .lock-weather { width: 250px; padding: 14px 16px !important; }
    .lock-weather-temp { font-size: 2.3rem; }
    .lock-weather .vx-w-icon { font-size: 2rem; }
    .lock-weather .vx-w-meta { margin-top: 6px; }
    .lock-form { padding: 26px 28px !important; margin-bottom: 0; }
    .lock-form-head { margin-bottom: 16px; }
    .lock-form-head h1 { font-size: 1.45rem; }
    .lock-form .form-group { margin-bottom: 14px; }
    .lock-submit { height: 46px; }
    .lock-time { font-size: min(9rem, 11vw, 19vh); }
    .lock-date { font-size: 1.1rem; }
    .lock-version { bottom: 10px; }
}
@media (max-height: 700px) and (min-width: 901px) {
    .lock-weather .vx-w-meta, .lock-weather-cond { display: none; }
    .lock-form-head p { display: none; }
    .lock-form { padding: 22px 24px !important; }
    .lock-form .form-group { margin-bottom: 10px; }
    .lock-time { font-size: min(7.5rem, 10vw, 17vh); }
    .lock-version { display: none; }
}
.lock-weather { min-height: 0 !important; }
@media (max-width: 768px) {
    .page-header-actions:has(.stats-range) { width: 100%; flex-wrap: wrap; }
    .stats-range { flex: 1 1 100%; }
    .stats-range .qchip { flex: 1; justify-content: center; }
}

/* ---------- Меню «Действия» поверх соседних строк ---------- */
.data-table tbody tr.table-row:has(.dropdown.open) { position: relative; z-index: 60; }
.data-table tbody tr.table-row:has(.dropdown.open) td { position: relative; z-index: 60; }

/* ---------- Поиск в шапке — только на телефоне (на компьютере: орнамент и Ctrl+K) ---------- */
@media (min-width: 769px) { .vx-search-pill { display: none; } }

/* ---------- Смена темы без «просвечивания»: плавное перетекание цветов ---------- */
html.vx-swapping body, html.vx-swapping body *:not(.vx-env *) {
    transition: background-color .45s ease, color .45s ease, border-color .45s ease, box-shadow .45s ease, fill .45s ease, stroke .45s ease !important;
}
.vx-env { transition: opacity .45s ease; }
html.vx-swapping .vx-env { animation: vxEnvIn .6s ease both; }
@keyframes vxEnvIn { from { opacity: 0; } }

/* ---------- Папка «Приложения» в орнаменте ---------- */
.vx-folder { position: relative; }
.vx-folder-btn[aria-expanded="true"] { background: var(--sh-active-bg); color: var(--sh-active-fg); opacity: 1; }
.vx-folder-btn[aria-expanded="true"] .vx-orn-label { display: none; }
.vx-folder-panel {
    position: absolute; left: calc(100% + 18px); top: 50%; z-index: 20;
    width: 260px; padding: 18px; border-radius: 30px; color: var(--sh-text);
    background: var(--sh-strong); border: 1px solid var(--sh-edge);
    backdrop-filter: blur(50px) saturate(190%); -webkit-backdrop-filter: blur(50px) saturate(190%);
    box-shadow: var(--sh-shadow-lg);
    transform-origin: left center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-50%) translateX(-14px) scale(.6);
    transition: opacity .2s, transform .45s var(--sh-spring), visibility .45s;
}
.vx-folder.open .vx-folder-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(-50%); }
.vx-folder-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; text-align: center; }
.vx-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.vx-app { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; opacity: 0; transform: scale(.7); transition: opacity .3s, transform .45s var(--sh-spring); }
.vx-folder.open .vx-app { opacity: 1; transform: none; transition-delay: .08s; }
.vx-app-icon {
    position: relative; width: 58px; height: 58px; border-radius: 17px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.35);
}
.app-smm { background: linear-gradient(145deg, #ff8a5b, #f0437a 55%, #8b5cf6); }
.vx-app.is-soon { cursor: not-allowed; }
.vx-app.is-soon .vx-app-icon { filter: grayscale(.85) brightness(.85); opacity: .7; }
.vx-app-lock {
    position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sh-strong); color: var(--sh-text); border: 1px solid var(--sh-edge);
}
.vx-app-name { font-size: .74rem; font-weight: 600; line-height: 1.2; }
.vx-app-soon { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-muted); }
