/* ============================================================
   НОВОГОДНЯЯ ТЕМА ГЛАВНОЙ СТРАНИЦЫ
   Активна только на body.ny (index.html)
============================================================ */

/* ---------- Палитра зимней сказки ---------- */

body.ny {
    --ny-night-1: #0b1530;
    --ny-night-2: #14264d;
    --ny-night-3: #1d3a66;

    --ny-ice: #cfe4f5;
    --ny-ice-soft: #9fc3e0;

    --ny-gold: #e7d197;
    --ny-gold-bright: #f5e6b8;
    --ny-silver: #d6e2ec;

    --ny-text: #eef4fa;
    --ny-text-muted: #a8bdd4;

    --ny-ink: #24334d;      /* текст формы на светлом фоне */
}

/* ---------- Фон: ночное небо ---------- */

body.ny {
    background:
        radial-gradient(
            ellipse 120% 60% at 50% -12%,
            rgba(60, 100, 160, 0.35),
            transparent 60%
        ),
        radial-gradient(
            ellipse 90% 50% at 15% 110%,
            rgba(29, 58, 102, 0.5),
            transparent 65%
        ),
        linear-gradient(
            180deg,
            var(--ny-night-1) 0%,
            var(--ny-night-2) 42%,
            var(--ny-night-3) 100%
        );

    background-attachment: fixed;

    color: var(--ny-ink);
}

/* Звёзды на небе (тонкие, статичные) */

body.ny::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.7), transparent 100%),
        radial-gradient(1px 1px at 28% 8%,  rgba(255,255,255,0.5), transparent 100%),
        radial-gradient(1.5px 1.5px at 44% 22%, rgba(245,230,184,0.6), transparent 100%),
        radial-gradient(1px 1px at 62% 12%, rgba(255,255,255,0.55), transparent 100%),
        radial-gradient(2px 2px at 76% 26%, rgba(245,230,184,0.5), transparent 100%),
        radial-gradient(1px 1px at 88% 9%,  rgba(255,255,255,0.6), transparent 100%),
        radial-gradient(1.5px 1.5px at 8% 38%,  rgba(255,255,255,0.4), transparent 100%),
        radial-gradient(1px 1px at 94% 40%, rgba(255,255,255,0.45), transparent 100%);
}

/* ---------- Хиро ---------- */

.ny-hero {
    position: relative;
    z-index: 1;

    padding: 96px 0 84px;

    background: transparent;
    overflow: hidden;
}

.ny-eyebrow {
    color: var(--ny-gold);
    letter-spacing: 0.22em;
    font-weight: 600;
}

.ny-title {
    color: var(--ny-text);

    text-shadow:
        0 0 24px rgba(159, 195, 224, 0.25),
        0 2px 12px rgba(11, 21, 48, 0.4);
}

.ny-title .ny-gold {
    background: linear-gradient(
        100deg,
        #ffffff 0%,
        var(--ny-gold-bright) 45%,
        var(--ny-gold) 75%,
        #c9a75e 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    filter: drop-shadow(0 0 18px rgba(231, 209, 151, 0.35));
}

.ny-lead {
    color: var(--ny-text-muted);
}

/* CTA-кнопка */

.ny-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 28px;

    padding: 15px 28px;

    border-radius: 999px;

    background: linear-gradient(
        135deg,
        var(--ny-gold-bright),
        var(--ny-gold) 55%,
        #cfa95e
    );

    color: #2c2410;

    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.01em;
    text-decoration: none;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 8px 24px rgba(231, 209, 151, 0.28),
        0 2px 6px rgba(11, 21, 48, 0.3);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.ny-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 12px 32px rgba(231, 209, 151, 0.38),
        0 2px 6px rgba(11, 21, 48, 0.3);
}

.ny-cta:active {
    transform: translateY(0) scale(0.98);
}

.ny-cta svg {
    transition: transform .18s ease;
}

.ny-cta:hover svg {
    transform: translateY(2px);
}

/* ---------- Микро-искры CTA (главная) ---------- */

.ny-cta {
    position: relative;
    overflow: visible;
}

.ny-cta::before,
.ny-cta::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 4px;
    height: 4px;
    border-radius: 50%;

    background: #fff8e1;
    opacity: 0;
    pointer-events: none;
}

/* шесть искр через box-shadow (усиленные: крупнее, дальше) */
.ny-cta::before {
    box-shadow:
        -26px -18px 0 0 rgba(245, 230, 184, 0.95),
        30px -26px 0 0 rgba(190, 224, 246, 0.95),
        42px 12px 0 0 rgba(245, 230, 184, 0.95),
        -38px 22px 0 0 rgba(190, 224, 246, 0.95),
        -8px 38px 0 0 rgba(245, 230, 184, 0.95),
        12px -42px 0 0 rgba(255, 255, 255, 0.95),
        48px -8px 0 0 rgba(255, 248, 225, 0.9),
        -50px -6px 0 0 rgba(255, 248, 225, 0.9);
}

.ny-cta::after {
    box-shadow:
        20px 30px 0 0 rgba(245, 230, 184, 0.9),
        -48px -4px 0 0 rgba(255, 255, 255, 0.95),
        0 -34px 0 0 rgba(190, 224, 246, 0.9),
        52px -12px 0 0 rgba(245, 230, 184, 0.9),
        -18px -44px 0 0 rgba(255, 255, 255, 0.9),
        44px 34px 0 0 rgba(190, 224, 246, 0.9),
        -44px 30px 0 0 rgba(255, 248, 225, 0.85),
        8px 50px 0 0 rgba(245, 230, 184, 0.85);
}

.ny-cta.sparking::before,
.ny-cta:active::before {
    animation: ny-spark-a .6s ease-out;
}

.ny-cta.sparking::after,
.ny-cta:active::after {
    animation: ny-spark-b .6s .06s ease-out;
}

@keyframes ny-spark-a {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(.3);
    }

    40% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

@keyframes ny-spark-b {
    0% {
        opacity: .95;
        transform: translate(-50%, -50%) scale(.25);
    }

    50% {
        opacity: .85;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.7);
    }
}

/* Еловые ветви по углам хиро */

.ny-branch {
    position: absolute;
    top: 0;

    width: clamp(140px, 22vw, 260px);
    height: auto;

    opacity: 0.85;

    pointer-events: none;
    user-select: none;
}

.ny-branch-left {
    left: 0;
}

.ny-branch-right {
    right: 0;
}

/* ---------- Появление при загрузке ---------- */

.ny-hero .eyebrow,
.ny-hero h1,
.ny-hero .lead,
.ny-hero .ny-cta {
    opacity: 0;
    transform: translateY(16px);

    animation: ny-rise .8s cubic-bezier(.2, .7, .3, 1) forwards;
}

.ny-hero .eyebrow  { animation-delay: .1s; }
.ny-hero h1        { animation-delay: .25s; }
.ny-hero .lead     { animation-delay: .45s; }
.ny-hero .ny-cta   { animation-delay: .65s; }

@keyframes ny-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Снег ---------- */

.ny-snow {
    position: fixed;
    inset: 0;
    z-index: 2;

    overflow: hidden;
    pointer-events: none;
}

.ny-flake {
    position: absolute;
    top: -4vh;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0) 70%
    );

    will-change: transform;

    animation: ny-fall linear infinite;
}

@keyframes ny-fall {
    0% {
        transform: translate3d(0, -6vh, 0);
    }

    100% {
        transform: translate3d(var(--ny-drift, 20px), 106vh, 0);
    }
}

/* Лёгкое покачивание отдельными слоями (дешёвое, без второго keyframes на flakes) */

.ny-snow .ny-flake:nth-child(3n)   { animation-duration: 11s !important; }
.ny-snow .ny-flake:nth-child(3n+1) { animation-duration: 15s !important; }
.ny-snow .ny-flake:nth-child(3n+2) { animation-duration: 19s !important; }

/* ---------- Форма записи на тёмном фоне ---------- */

body.ny .intro {
    position: relative;
    z-index: 1;

    padding: 26px 0 80px;
}

/* «Тёмное стекло» — карточка как морозное окно в ночи */

body.ny .card {
    position: relative;

    background: linear-gradient(
        175deg,
        rgba(20, 38, 77, 0.82) 0%,
        rgba(16, 30, 62, 0.86) 100%
    );

    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);

    border: 1px solid rgba(159, 195, 224, 0.28);
    outline: 1px solid rgba(207, 228, 245, 0.09);
    outline-offset: -7px;

    box-shadow:
        inset 0 1px 0 rgba(207, 228, 245, 0.14),
        0 28px 72px rgba(3, 8, 20, 0.55);

    border-radius: 26px;

    overflow: hidden;

    color: var(--ny-text);
}

/* Иней в углах заменён на гирлянду + ленту (SVG .ny-card-decor) */

/* ---------- Новогодний декор карточки: гирлянда + лента ---------- */

.ny-card-decor {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 90px;

    pointer-events: none;
}

/* На iOS (Safari) SVG-свечения через drop-shadow рендерятся грубо —
   заменяем на мягкую радиальную подсветку и чуть крупные точки */
@supports (-webkit-touch-callout: none) {

    .ny-light.l1,
    .ny-light.l3,
    .ny-light.l5 {
        fill: rgba(245, 230, 184, 0.95);
        filter: url(#none); /* сброс */
        filter: none;
    }

    .ny-light.l2,
    .ny-light.l4,
    .ny-light.l6 {
        fill: rgba(190, 224, 246, 0.9);
        filter: none;
    }

    .ny-light {
        /* мягкий ореол вместо drop-shadow: тень цвета огонька */
        box-shadow: none;
    }

    /* Добавляем сияние вторым контуром — дешёво и мягко на iOS */
    .ny-lights circle {
        stroke: rgba(255, 255, 255, 0.35);
        stroke-width: 4;
        stroke-opacity: 0.4;
    }

    .ny-ribbon {
        filter: none;
    }

    .ny-ribbon-star {
        filter: none;
    }
}

.ny-ribbon {
    filter: drop-shadow(0 0 4px rgba(231, 209, 151, 0.35));
}

.ny-ribbon-star {
    fill: rgba(245, 230, 184, 0.9);

    filter: drop-shadow(0 0 5px rgba(231, 209, 151, 0.6));
}

/* Огоньки: тёплое золото и лёд поочерёдно, мягкое «дыхание» */

.ny-light {
    animation: ny-glow 3.6s ease-in-out infinite;
}

.ny-light.l1,
.ny-light.l3,
.ny-light.l5 {
    fill: rgba(245, 230, 184, 0.95);

    filter: drop-shadow(0 0 6px rgba(231, 209, 151, 0.75));
}

.ny-light.l2,
.ny-light.l4,
.ny-light.l6 {
    fill: rgba(190, 224, 246, 0.9);

    filter: drop-shadow(0 0 6px rgba(159, 195, 224, 0.7));

    animation-delay: 1.2s;
}

.ny-light.l3 { animation-delay: .6s; }
.ny-light.l5 { animation-delay: 1.8s; }
.ny-light.l6 { animation-delay: 2.4s; }

@keyframes ny-glow {
    0%, 100% { opacity: 1; }
    50%      { opacity: .45; }
}

/* Текст карточки: светлый, с ослабленной контрастностью вторичного */

body.ny .card h2,
body.ny .card .section-kicker,
body.ny .card label,
body.ny .card .step-title {
    color: var(--ny-text);
}

body.ny .booking-head .section-kicker {
    color: var(--ny-gold-bright);

    letter-spacing: 0.16em;
    font-weight: 750;
}

body.ny .booking-head .section-kicker::before,
body.ny .booking-head .section-kicker::after {
    content: "❄";
    color: rgba(159, 195, 224, 0.85);

    font-size: 12px;
}

body.ny .booking-head .section-kicker::after {
    margin-left: 2px;
}

body.ny .booking-sub {
    color: var(--ny-text-muted);
}

/* Шаги: золотые номера */

body.ny .step-number {
    background: linear-gradient(135deg, #e7d197, #c9a75e);

    color: #2c2410;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Поля: тёмное стекло, светлый текст */

body.ny .card select,
body.ny .card input:not([type="checkbox"]):not([type="radio"]),
body.ny .card textarea {
    background: rgba(11, 21, 48, 0.45);

    border-color: rgba(159, 195, 224, 0.3);

    color: var(--ny-text);
}

body.ny .card select:focus,
body.ny .card input:focus:not([type="checkbox"]):not([type="radio"]),
body.ny .card textarea:focus {
    border-color: var(--ny-gold);

    box-shadow: 0 0 0 4px rgba(231, 209, 151, 0.16);

    outline: none;
}

/* Плейсхолдеры и вторичный текст в полях */
body.ny .card ::placeholder {
    color: rgba(168, 189, 212, 0.7);
}

/* Дropdown-опции остаются системными (светлыми) — это нормально */

body.ny .calendar-day.selected,
body.ny .calendar-day.selected:hover {
    background: linear-gradient(160deg, #e7d197, #c9a75e) !important;
    border-color: #c9a75e !important;
    color: #2c2410 !important;

    box-shadow:
        0 6px 18px rgba(231, 209, 151, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

body.ny .calendar-day.selected .day-number {
    color: #2c2410 !important;
}

body.ny .slot.selected {
    background: linear-gradient(160deg, #e7d197, #c9a75e);
    border-color: #c9a75e;
    color: #2c2410;

    box-shadow: 0 5px 16px rgba(231, 209, 151, 0.28);
}

body.ny .slot.selected .slot-time {
    color: #2c2410;
}

/* Кнопка отправки — золото, как CTA в хиро */

body.ny .button {
    background: linear-gradient(135deg, var(--ny-gold-bright), var(--ny-gold) 55%, #cfa95e);

    color: #2c2410;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 6px 18px rgba(231, 209, 151, 0.28),
        0 2px 6px rgba(3, 8, 20, 0.35);
}

body.ny .button:hover {
    background: linear-gradient(135deg, var(--ny-gold), #cfa95e);

    filter: brightness(1.05);
}

/* Искры на кнопке формы «Записаться» */

body.ny .button {
    position: relative;
    overflow: visible;
}

body.ny .button::before,
body.ny .button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 4px;
    height: 4px;
    border-radius: 50%;

    background: #fff8e1;
    opacity: 0;
    pointer-events: none;
}

body.ny .button::before {
    box-shadow:
        -26px -18px 0 0 rgba(245, 230, 184, 0.95),
        30px -26px 0 0 rgba(190, 224, 246, 0.95),
        42px 12px 0 0 rgba(245, 230, 184, 0.95),
        -38px 22px 0 0 rgba(190, 224, 246, 0.95),
        -8px 38px 0 0 rgba(245, 230, 184, 0.95),
        12px -42px 0 0 rgba(255, 255, 255, 0.95);
}

body.ny .button::after {
    box-shadow:
        20px 30px 0 0 rgba(245, 230, 184, 0.9),
        -48px -4px 0 0 rgba(255, 255, 255, 0.95),
        0 -34px 0 0 rgba(190, 224, 246, 0.9),
        52px -12px 0 0 rgba(245, 230, 184, 0.9),
        -18px -44px 0 0 rgba(255, 255, 255, 0.9),
        44px 34px 0 0 rgba(190, 224, 246, 0.9);
}

body.ny .button.sparking::before,
body.ny .button:active::before {
    animation: ny-spark-a .6s ease-out;
}

body.ny .button.sparking::after,
body.ny .button:active::after {
    animation: ny-spark-b .6s .06s ease-out;
}

/* Шаги: вместо пунктирных линий — мягкие «утопленные» тени.
   Каждый шаг — тихая тёмная плитка; переход между шагами
   читается за счёт объёма, а не линий. */

body.ny .card .step {
    border-bottom: 0;

    padding: 18px 16px;

    background: rgba(11, 21, 48, 0.26);

    border-radius: 16px;

    margin-bottom: 12px;

    box-shadow:
        inset 0 1px 0 rgba(207, 228, 245, 0.07),
        0 2px 10px rgba(3, 8, 20, 0.22);
}

body.ny .card .step:last-of-type {
    margin-bottom: 0;
}

/* Шапка формы: пунктир заменён мягкой тенью-градиентом */

body.ny .booking-head {
    padding-top: 34px;

    border-bottom: 0;

    box-shadow: 0 10px 14px -12px rgba(3, 8, 20, 0.45);
}

/* Шапка календаря (навигация месяцами) — золото вместо белого */

body.ny .calendar-nav {
    background: linear-gradient(
        135deg,
        rgba(231, 209, 151, 0.14),
        rgba(201, 167, 94, 0.1)
    );

    border-color: rgba(231, 209, 151, 0.35);
}

body.ny .calendar-nav-title {
    color: var(--ny-gold-bright);
}

body.ny .calendar-nav-btn {
    background: linear-gradient(135deg, var(--ny-gold-bright), var(--ny-gold) 60%, #cfa95e);

    color: #2c2410;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 3px 10px rgba(231, 209, 151, 0.22);
}

body.ny .calendar-nav-btn:hover:not(:disabled) {
    filter: brightness(1.06);
}

body.ny .calendar-nav-btn:disabled {
    opacity: 0.35;
}

/* Легенда календаря на тёмном стекле */

body.ny .calendar-legend {
    color: var(--ny-text-muted);
}

/* Слоты времени: тёмное стекло, выбранный — золотой */

body.ny .slot {
    background: rgba(11, 21, 48, 0.4);

    border-color: rgba(159, 195, 224, 0.28);

    color: var(--ny-text);
}

body.ny .slot:hover {
    border-color: rgba(231, 209, 151, 0.6);
}

/* ---------- Дни календаря: ярче обводка ---------- */

/* Доступные дни: насыщенный зимне-зелёный на тёмном */
body.ny .calendar-day.available {
    background: rgba(88, 165, 103, 0.14);

    border-color: #6fbb7e;
    border-width: 1.5px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 2px 8px rgba(88, 165, 103, 0.2);
}

body.ny .calendar-day.available .day-number {
    color: #b9e4c0;
}

/* Недоступные дни: мягкий, но заметный контур */
body.ny .calendar-day.unavailable {
    background: rgba(217, 141, 141, 0.1);

    border-color: rgba(217, 141, 141, 0.55);
    border-width: 1.5px;

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.ny .calendar-day.unavailable .day-number {
    color: #e4b5b5;
}

body.ny .calendar-day.outside-range {
    background: transparent;

    border-color: rgba(159, 195, 224, 0.12);

    opacity: 0.4;
}

/* Hover на доступных — ярче */
body.ny .calendar-day.available:hover {
    border-color: #8ed49b;

    background: rgba(88, 165, 103, 0.24);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 5px 16px rgba(88, 165, 103, 0.32);
}

/* Праздничные акценты: подзаголовок и футер */

body.ny .booking-head .booking-sub::after {
    content: " ❄";

    color: rgba(159, 195, 224, 0.9);
}

body.ny .site-footer .wrap::before {
    content: "✦ ";

    color: var(--ny-gold);
}

body.ny .site-footer .wrap::after {
    content: " ✦";

    color: var(--ny-gold);
}

/* ---------- Футер ---------- */

body.ny .site-footer {
    position: relative;
    z-index: 1;

    border-top: 1px solid rgba(207, 228, 245, 0.14);

    background: transparent;

    color: var(--ny-text-muted);
}

/* ---------- Адаптив ---------- */

@media (max-width: 650px) {

    .ny-hero {
        padding: 64px 0 56px;
    }

    .ny-branch {
        width: 120px;
        opacity: 0.55;
    }

    .ny-cta {
        width: 100%;
        justify-content: center;
    }

    .ny-snow .ny-flake:nth-child(n+26) {
        display: none; /* на мобильных меньше снега */
    }

    /* Декор карточки: компактнее, гирлянда короче */
    .ny-card-decor {
        height: 64px;
    }

    body.ny .booking-head {
        padding-top: 26px;
    }

    body.ny .card .step {
        padding: 14px 12px;
    }
}

/* ---------- Параллакс: только на устройствах с мышью ---------- */

@media (hover: hover) and (pointer: fine) {

    .ny-hero .wrap {
        transition: transform .25s ease-out;
        transform: translate3d(var(--ny-px, 0), var(--ny-py, 0), 0);
    }

    .ny-branch-left {
        transition: transform .35s ease-out;
        transform: translate3d(calc(var(--ny-px, 0) * -1.6), calc(var(--ny-py, 0) * -1.6), 0);
    }

    .ny-branch-right {
        transition: transform .35s ease-out;
        transform: translate3d(calc(var(--ny-px, 0) * -1.6), calc(var(--ny-py, 0) * -1.6), 0);
    }
}

/* ---------- Доступность ---------- */

@media (prefers-reduced-motion: reduce) {

    .ny-flake {
        animation: none !important;
        opacity: 0; /* снег полностью скрыт */
    }

    .ny-hero .eyebrow,
    .ny-hero h1,
    .ny-hero .lead,
    .ny-hero .ny-cta {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .ny-light {
        animation: none;
        opacity: 1;
    }
}

/* ============================================================
   НОВОГОДНЯЯ ТЕМА АДМИНКИ (body.ny-admin)
   Единый стиль с главной: ночное небо + светлое стекло
============================================================ */

/* Фон: то же ночное небо, что на главной (со звёздами) */

body.ny-admin {
    background:
        radial-gradient(
            ellipse 120% 60% at 50% -12%,
            rgba(60, 100, 160, 0.35),
            transparent 60%
        ),
        radial-gradient(
            ellipse 90% 50% at 15% 110%,
            rgba(29, 58, 102, 0.5),
            transparent 65%
        ),
        linear-gradient(
            180deg,
            var(--ny-night-1) 0%,
            var(--ny-night-2) 42%,
            var(--ny-night-3) 100%
        );

    background-attachment: fixed;

    color: var(--ny-ink);
}

/* Звёзды на небе (как на главной) */

body.ny-admin::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.7), transparent 100%),
        radial-gradient(1px 1px at 28% 8%,  rgba(255,255,255,0.5), transparent 100%),
        radial-gradient(1.5px 1.5px at 44% 22%, rgba(245,230,184,0.6), transparent 100%),
        radial-gradient(1px 1px at 62% 12%, rgba(255,255,255,0.55), transparent 100%),
        radial-gradient(2px 2px at 76% 26%, rgba(245,230,184,0.5), transparent 100%),
        radial-gradient(1px 1px at 88% 9%,  rgba(255,255,255,0.6), transparent 100%),
        radial-gradient(1.5px 1.5px at 8% 38%,  rgba(255,255,255,0.4), transparent 100%),
        radial-gradient(1px 1px at 94% 40%, rgba(255,255,255,0.45), transparent 100%);
}

/* Ледяная кайма сверху страницы (сияние горизонта) */

body.ny-admin::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 120px;
    z-index: 0;
    pointer-events: none;

    background:
        radial-gradient(
            ellipse 70% 100% at 50% 0%,
            rgba(159, 195, 224, 0.18),
            transparent 70%
        );
}

/* Снежная шапка на шапке-стекле: светлая верхняя кромка */

body.ny-admin .admin-head {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 8px 24px rgba(3, 8, 20, 0.3);
}

/* Шапка — светлое морозное стекло, тёмный текст */

body.ny-admin .admin-head {
    position: relative; /* ветвь позиционируется от неё */

    background: rgba(246, 250, 253, 0.88);

    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);

    border-bottom-color: rgba(207, 228, 245, 0.8);

    color: var(--ny-ink);
}

body.ny-admin .admin-brand {
    color: var(--ny-ink);
}

body.ny-admin .admin-brand small {
    color: var(--adm-ink-2);
}

body.ny-admin .admin-nav .nav-pill {
    color: var(--adm-ink-2);
}

body.ny-admin .admin-nav .nav-pill:hover {
    background: rgba(157, 95, 85, 0.08);
    color: var(--ny-ink);
}

body.ny-admin .admin-nav .nav-pill.active {
    background: linear-gradient(135deg, var(--ny-gold-bright), var(--ny-gold) 60%, #cfa95e);
    color: #2c2410;

    box-shadow: 0 4px 14px rgba(231, 209, 151, 0.35);
}

/* Карточки — светлое тёплое стекло, тёмный текст внутри */

body.ny-admin .admin-card {
    background: linear-gradient(180deg, rgba(252, 251, 250, 0.97), rgba(246, 250, 253, 0.95));

    border-color: rgba(207, 228, 245, 0.6);

    box-shadow:
        0 20px 56px rgba(3, 8, 20, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Весь текст внутри карточек — тёмный, читаемый */

body.ny-admin .admin-card,
body.ny-admin .admin-card h1,
body.ny-admin .admin-card h2,
body.ny-admin .admin-card h3,
body.ny-admin .admin-card p,
body.ny-admin .admin-card label,
body.ny-admin .admin-card span,
body.ny-admin .admin-card div,
body.ny-admin .admin-card li {
    color: var(--adm-ink);
}

body.ny-admin .admin-card .muted,
body.ny-admin .admin-card .meta,
body.ny-admin .admin-card small {
    color: var(--adm-ink-2);
}

/* Поля ввода — светлые с тёмным текстом */

body.ny-admin .admin-card input,
body.ny-admin .admin-card select,
body.ny-admin .admin-card textarea {
    background: #fff;

    border-color: var(--adm-line);

    color: var(--adm-ink);
}

/* Кнопки — терракотовые (фирменные), как было до темы */

body.ny-admin .admin-card .button {
    background: linear-gradient(180deg, #a96a60, var(--adm-accent) 60%);

    color: #fff;
}

/* Вторичные кнопки — светлые с тёмным текстом */

body.ny-admin .admin-card .secondary {
    background: #fff;

    border-color: var(--adm-line);

    color: var(--adm-ink);
}

/* Сегмент-фильтр — как на iOS, тёмный текст вкладок */

body.ny-admin .filter-tab {
    color: var(--adm-ink-2);
}

body.ny-admin .filter-tab.active {
    background: #fff;
    color: var(--adm-accent-deep);
}

/* Аватары записей — фирменный градиент */

body.ny-admin .appointment .avatar {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 60%),
        linear-gradient(140deg, #c08d82, var(--adm-accent) 70%);
}

/* Снежинки в заголовках секций */

body.ny-admin .section-heading h2::after {
    content: " ❄";

    color: rgba(159, 195, 224, 0.8);

    font-size: 15px;
    font-weight: 400;
}

/* Кинкеры секций — золотые (в тон праздника) */

body.ny-admin .section-kicker {
    color: #8a6d35;
}

body.ny-admin .section-kicker::before {
    background: linear-gradient(90deg, #c9a75e, #8a6d35);
}

/* ---------- Падающая геометрическая снежинка ---------- */

.adm-flake {
    position: fixed;
    top: -90px;
    left: 78%;

    width: 44px;
    height: 44px;

    z-index: 50;

    pointer-events: none;

    filter: drop-shadow(0 0 8px rgba(190, 224, 246, 0.6));

    animation:
        adm-flake-fall 18s linear infinite,
        adm-flake-fade 18s ease-in infinite;
}

@keyframes adm-flake-fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(110vh) rotate(240deg);
    }
}

@keyframes adm-flake-fade {
    0%, 55%  { opacity: .85; }
    90%, 100% { opacity: 0; }
}

/* ---------- Абстрактная еловая ветвь с инеем (правый угол шапки) ---------- */

.adm-branch {
    position: absolute;
    top: 0;
    right: 0;

    width: 170px;
    height: auto;

    z-index: 5;

    pointer-events: none;

    transform-origin: top right;

    animation: adm-sway 6s ease-in-out infinite;

    opacity: .8;
}

@keyframes adm-sway {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(1.6deg); }
}

.adm-branch .hoarfrost {
    animation: adm-frost 3.2s ease-in-out infinite;
}

@keyframes adm-frost {
    0%, 100% { opacity: .95; }
    50%      { opacity: .5; }
}

/* ---------- Новогодний футер админки: гирлянда + шары ---------- */

.ny-admin-footer {
    position: relative;

    margin-top: 56px;
    padding: 0 0 42px;

    text-align: center;

    overflow: hidden;
}

.ny-footer-garland {
    position: relative;

    height: 60px;

    margin-bottom: 6px;
}

.ny-footer-garland svg {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.ny-footer-decor {
    position: relative;

    height: 74px;
}

/* Шары в футере: привязаны к своему контейнеру */

.ny-footer-decor .adm-bauble {
    top: -14px;
}

.ny-footer-decor .adm-bauble.b1 { left: 30%; }
.ny-footer-decor .adm-bauble.b2 { left: 46%; }
.ny-footer-decor .adm-bauble.b3 { left: 62%; }

.ny-footer-text {
    margin: 10px 0 0;

    color: var(--ny-text-muted);

    font-size: 13px;
    letter-spacing: 0.04em;
}

/* ---------- Страница входа ---------- */

body.ny-login .login-page {
    position: relative;
    z-index: 1;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 16px;
}

body.ny-login .login-card {
    background: linear-gradient(180deg, rgba(252, 251, 250, 0.97), rgba(246, 250, 253, 0.95));

    border-color: rgba(207, 228, 245, 0.6);

    box-shadow:
        0 24px 64px rgba(3, 8, 20, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    border-radius: 26px;
}

/* ---------- Ёлка (чистый CSS) ---------- */

.login-tree {
    position: fixed;
    bottom: 0;
    left: 6%;

    width: 150px;
    height: 260px;

    z-index: 1;

    pointer-events: none;
}

/* Ярус-«слой» ёлки: треугольник со скруглением и снегом на кромке */

.tree-layer {
    position: absolute;
    left: 50%;

    width: 0;
    height: 0;

    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 78px solid #1c4a33;

    transform: translateX(-50%);

    filter: drop-shadow(0 6px 12px rgba(3, 8, 20, 0.45));
}

.tree-layer.l1 {
    bottom: 26px;
}

.tree-layer.l2 {
    bottom: 84px;

    border-left-width: 48px;
    border-right-width: 48px;
    border-bottom-width: 66px;
}

.tree-layer.l3 {
    bottom: 134px;

    border-left-width: 34px;
    border-right-width: 34px;
    border-bottom-width: 52px;
}

/* Снег на ярусах: светлая полоса сверху каждого слоя */

.tree-layer::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -14px;
    right: -14px;

    height: 10px;

    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));

    border-radius: 50%;
}

/* Ствол */

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;

    width: 22px;
    height: 30px;

    transform: translateX(-50%);

    background: linear-gradient(90deg, #5a3d28, #7a5535);

    border-radius: 4px 4px 0 0;
}

/* Звезда на макушке */

.tree-star {
    position: absolute;
    bottom: 186px;
    left: 50%;

    width: 22px;
    height: 22px;

    transform: translateX(-50%);

    background: var(--ny-gold-bright);

    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );

    filter: drop-shadow(0 0 10px rgba(231, 209, 151, 0.8));

    animation: tree-star-glow 2.8s ease-in-out infinite;
}

@keyframes tree-star-glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(231, 209, 151, 0.8)); }
    50%      { filter: drop-shadow(0 0 18px rgba(231, 209, 151, 1)); }
}

/* Огоньки-гирлянда на ёлке */

.tree-light {
    position: absolute;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    animation: tree-blink 2.4s ease-in-out infinite;
}

.tree-light.tl1 { bottom: 60px;  left: 34%; background: #f5e6b8; box-shadow: 0 0 8px rgba(245,230,184,.9); }
.tree-light.tl2 { bottom: 66px;  left: 58%; background: #9fc3e0; box-shadow: 0 0 8px rgba(159,195,224,.9); animation-delay: .5s; }
.tree-light.tl3 { bottom: 112px; left: 40%; background: #9fc3e0; box-shadow: 0 0 8px rgba(159,195,224,.9); animation-delay: 1s; }
.tree-light.tl4 { bottom: 118px; left: 60%; background: #f5e6b8; box-shadow: 0 0 8px rgba(245,230,184,.9); animation-delay: 1.5s; }
.tree-light.tl5 { bottom: 158px; left: 46%; background: #f5e6b8; box-shadow: 0 0 8px rgba(245,230,184,.9); animation-delay: .8s; }
.tree-light.tl6 { bottom: 162px; left: 54%; background: #9fc3e0; box-shadow: 0 0 8px rgba(159,195,224,.9); animation-delay: 1.8s; }

@keyframes tree-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

/* На мобильных ёлка компактнее и не мешает карточке */

@media (max-width: 650px) {
    .login-tree {
        width: 100px;
        height: 180px;

        left: 4%;
        opacity: .85;

        transform: scale(.68);
        transform-origin: bottom left;
    }

    body.ny-login .login-page {
        align-items: flex-start;
        padding-top: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .tree-star,
    .tree-light {
        animation: none;
    }
}

.adm-bauble {
    position: absolute;
    top: -8px;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background:
        radial-gradient(circle at 32% 28%,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.35) 12%,
            transparent 26%
        ),
        radial-gradient(circle at 68% 78%,
            rgba(255, 255, 255, 0.25) 0%,
            transparent 40%
        ),
        radial-gradient(circle at 50% 50%, #c9a75e, #8a6d35 75%);

    box-shadow:
        inset -4px -6px 12px rgba(90, 60, 20, 0.55),
        inset 3px 4px 8px rgba(255, 255, 255, 0.35),
        0 6px 14px rgba(3, 8, 20, 0.4);

    transform-origin: 50% -22px;
}

/* петелька: ножка + дужка */
.adm-bauble::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 50%;

    width: 3px;
    height: 16px;

    background: linear-gradient(180deg, #f5e6b8, #c9a75e);

    border-radius: 2px;
}

.adm-bauble::after {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;

    width: 9px;
    height: 9px;

    border: 2px solid #f5e6b8;
    border-bottom: 0;

    border-radius: 9px 9px 0 0;

    transform: translateX(-50%);
}

.adm-bauble.b1 {
    left: 4%;

    animation: adm-swing 4.6s ease-in-out infinite;
}

.adm-bauble.b2 {
    left: 11%;

    width: 22px;
    height: 22px;

    background:
        radial-gradient(circle at 32% 28%,
            rgba(255,255,255,.95) 0%,
            rgba(255,255,255,.35) 12%,
            transparent 26%
        ),
        radial-gradient(circle at 50% 50%, #9fc3e0, #4a6f96 75%);

    animation: adm-swing 5.4s .8s ease-in-out infinite;
}

.adm-bauble.b3 {
    left: 17%;

    width: 26px;
    height: 26px;

    background:
        radial-gradient(circle at 32% 28%,
            rgba(255,255,255,.95) 0%,
            rgba(255,255,255,.35) 12%,
            transparent 26%
        ),
        radial-gradient(circle at 50% 50%, #e4b5b5, #9c5a5a 75%);

    animation: adm-swing 5s .4s ease-in-out infinite;
}

@keyframes adm-swing {
    0%, 100% { transform: rotate(4deg); }
    50%      { transform: rotate(-4deg); }
}

/* ---------- Кнопки админки: микро-искры при нажатии ---------- */

body.ny-admin .button {
    position: relative;
    overflow: visible;
}

body.ny-admin .button::before,
body.ny-admin .button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 3px;
    height: 3px;
    border-radius: 50%;

    background: #fff8e1;
    opacity: 0;
    pointer-events: none;
}

body.ny-admin .button::before {
    box-shadow:
        -26px -18px 0 0 rgba(245, 230, 184, 0.95),
        30px -26px 0 0 rgba(190, 224, 246, 0.95),
        42px 12px 0 0 rgba(245, 230, 184, 0.95),
        -38px 22px 0 0 rgba(190, 224, 246, 0.95),
        -8px 38px 0 0 rgba(245, 230, 184, 0.95),
        12px -42px 0 0 rgba(255, 255, 255, 0.95),
        48px -8px 0 0 rgba(255, 248, 225, 0.9);
}

body.ny-admin .button::after {
    box-shadow:
        20px 30px 0 0 rgba(245, 230, 184, 0.9),
        -48px -4px 0 0 rgba(255, 255, 255, 0.95),
        0 -34px 0 0 rgba(190, 224, 246, 0.9),
        52px -12px 0 0 rgba(245, 230, 184, 0.9),
        -18px -44px 0 0 rgba(255, 255, 255, 0.9),
        44px 34px 0 0 rgba(190, 224, 246, 0.9);
}

body.ny-admin .button.sparking::before,
body.ny-admin .button:active::before {
    animation: ny-spark-a .5s ease-out;
}

body.ny-admin .button.sparking::after,
body.ny-admin .button:active::after {
    animation: ny-spark-b .5s .05s ease-out;
}

/* ---------- Адаптив декора ---------- */

@media (max-width: 650px) {

    .adm-flake {
        width: 30px;
        height: 30px;
        left: 70%;
    }

    .adm-branch {
        width: 110px;
        opacity: .55;
    }

    .adm-bauble.b3 {
        display: none;
    }

    .ny-footer-decor .adm-bauble.b1 { left: 22%; }
    .ny-footer-decor .adm-bauble.b2 { left: 44%; }
}

/* Кнопка на всю ширину (Сохранить период) */

.button-block {
    display: block;

    width: 100%;
}

/* iOS: фон и так статичный (как на главной), доп. фиксов не нужно */

@media (prefers-reduced-motion: reduce) {

    .adm-flake,
    .adm-branch,
    .adm-bauble,
    .adm-branch .hoarfrost {
        animation: none;
    }

    .adm-flake {
        display: none;
    }
}
