/* ====== ЗЕРКАЛЬНЫЙ СТИЛЬ КАЛЕНДАРЯ ====== */
        body.page-calendar .calendar-page {
            min-height: calc(100vh - var(--header-height));
            padding: 30px 5%;
            background: transparent;
        }

        /* Заголовок */
        body.page-calendar .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 20px;
        }

        body.page-calendar .calendar-title {
            font-size: 2.2rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 15px;
        }

        body.page-calendar .calendar-title i {
            background: linear-gradient(135deg, #005a9c, #00c8ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Навигация по месяцам */
        body.page-calendar .month-nav {
            display: flex;
            align-items: center;
            gap: 20px;
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(10px);
            padding: 10px 20px;
            border-radius: 60px;
            border: 1px solid rgba(0, 128, 201, 0.2);
        }

        body.page-calendar .nav-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: rgba(0, 90, 156, 0.2);
            border: 1px solid rgba(0, 128, 201, 0.3);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        body.page-calendar .nav-btn:hover {
            background: rgba(0, 90, 156, 0.4);
            border-color: var(--secondary-blue);
            transform: scale(1.1);
        }

        body.page-calendar .current-month {
            font-size: 1.6rem;
            font-weight: 600;
            color: var(--text-primary);
            min-width: 200px;
            text-align: center;
            background: linear-gradient(135deg, #fff, #00c8ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* ====== КАЛЕНДАРЬ ====== */
        body.page-calendar .calendar-container {
            background: rgba(255, 255, 255, 0.02);
            backdrop-filter: blur(20px);
            border-radius: 30px;
            padding: 30px;
            border: 1px solid rgba(0, 128, 201, 0.15);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        }

        /* Дни недели */
        body.page-calendar .weekdays {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 15px;
        }

        body.page-calendar .weekday {
            text-align: center;
            font-weight: 600;
            color: var(--accent-teal);
            padding: 15px;
            background: rgba(0, 90, 156, 0.1);
            border-radius: 12px;
            border: 1px solid rgba(0, 128, 201, 0.2);
        }

        /* Сетка календаря */
        body.page-calendar .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 10px;
        }

        /* Ячейка дня */
        body.page-calendar .calendar-day {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(0, 128, 201, 0.15);
            border-radius: 18px;
            padding: 12px;
            min-height: 130px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        body.page-calendar .calendar-day:hover {
            transform: translateY(-3px);
            border-color: var(--secondary-blue);
            background: rgba(0, 90, 156, 0.1);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        }

        body.page-calendar .calendar-day.other-month {
            opacity: 0.3;
            background: rgba(0, 0, 0, 0.2);
        }

        body.page-calendar .calendar-day.today {
            border: 2px solid var(--accent-teal);
            background: rgba(49, 160, 152, 0.1);
        }

        body.page-calendar .calendar-day.has-event {
            background: rgba(0, 90, 156, 0.15);
            border-color: var(--primary-blue);
        }

        body.page-calendar .day-number {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        body.page-calendar .today .day-number {
            color: var(--accent-teal);
        }

        /* НАЗВАНИЯ МЕРОПРИЯТИЙ НА ЯЧЕЙКАХ */
        body.page-calendar .day-events {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
        }

        body.page-calendar .event-title {
            font-size: 0.75rem;
            padding: 4px 6px;
            border-radius: 4px;
            color: white;
            background: var(--primary-blue);
            border-left: 2px solid var(--accent-gold);
            border-top: none;
            border-right: none;
            border-bottom: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 500;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            width: 100%;
            min-width: 0;
            text-align: left;
            cursor: pointer;
        }

        body.page-calendar .event-title:focus-visible {
            outline: 2px solid rgba(123, 212, 255, 0.85);
            outline-offset: 1px;
        }

        body.page-calendar .event-title.excursion {
            background: linear-gradient(135deg, #0f7bc8, #1c9be5);
            border-left-color: #7bd4ff;
        }

        body.page-calendar .event-title.workshop {
            background: linear-gradient(135deg, #0f7bc8, #1c9be5);
            border-left-color: #7bd4ff;
        }

        body.page-calendar .event-title.olympiad {
            background: linear-gradient(135deg, #0f7bc8, #1c9be5);
            border-left-color: #7bd4ff;
        }

        body.page-calendar .event-title.open-day {
            background: linear-gradient(135deg, #0f7bc8, #1c9be5);
            border-left-color: #7bd4ff;
        }

        body.page-calendar .event-title.placeholder {
            background: linear-gradient(135deg, rgba(0, 128, 201, 0.35), rgba(49, 160, 152, 0.35));
            border-left-color: rgba(49, 160, 152, 0.85);
            color: rgba(231, 243, 255, 0.92);
            box-shadow: none;
        }

        /* ====== МОДАЛЬНОЕ ОКНО ====== */
        body.page-calendar .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            padding: clamp(10px, 2vh, 20px);
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(12px);
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            overflow-y: auto;
        }

        body.page-calendar .modal-overlay.active {
            display: flex;
        }

        body.page-calendar .event-modal {
            background: rgba(10, 25, 41, 0.95);
            backdrop-filter: blur(25px);
            border-radius: 40px;
            width: 90%;
            max-width: 500px;
            max-height: calc(100dvh - 2 * clamp(10px, 2vh, 20px));
            padding: 35px;
            border: 1px solid rgba(0, 128, 201, 0.3);
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
            position: relative;
            overflow-y: auto;
            animation: scaleIn 0.3s ease;
        }

        @keyframes scaleIn {
            from { transform: scale(0.9); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        body.page-calendar .event-modal .modal-close {
            position: absolute;
            top: 20px;
            right: 25px;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-size: 2rem;
            cursor: pointer;
            width: 34px;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0;
            box-shadow: none;
            line-height: 1;
        }

        body.page-calendar .event-modal .modal-close:hover {
            color: var(--accent-red);
            background: transparent;
        }

        body.page-calendar .modal-event-type {
            display: inline-block;
            padding: 6px 15px;
            background: rgba(0, 90, 156, 0.2);
            border: 1px solid var(--primary-blue);
            border-radius: 30px;
            color: var(--primary-blue);
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 20px;
        }

        body.page-calendar .modal-event-title {
            font-size: 1.8rem;
            color: white;
            margin-bottom: 20px;
            line-height: 1.3;
        }

        body.page-calendar .modal-event-detail {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 12px;
            color: var(--text-secondary);
        }

        body.page-calendar .modal-event-detail i {
            width: 20px;
            color: var(--primary-blue);
        }

        body.page-calendar .modal-event-description {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 16px;
            padding: 20px;
            margin: 20px 0;
            border-left: 4px solid var(--primary-blue);
            color: var(--text-secondary);
            line-height: 1.6;
        }

        body.page-calendar .modal-event-spots {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 25px;
            padding: 12px 15px;
            background: rgba(255, 209, 102, 0.1);
            border-radius: 12px;
            border: 1px solid rgba(255, 209, 102, 0.3);
            color: var(--accent-gold);
        }

        body.page-calendar .modal-actions {
            display: flex;
            gap: 15px;
        }

        body.page-calendar .modal-btn {
            flex: 1;
            padding: 14px;
            border: none;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        body.page-calendar .modal-btn-primary {
            background: linear-gradient(135deg, #005a9c, #0080c9);
            color: white;
        }

        body.page-calendar .modal-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(0, 90, 156, 0.4);
        }

        body.page-calendar .modal-btn-secondary {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-secondary);
        }

        body.page-calendar .modal-btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-primary);
        }

        body.page-calendar .modal-btn.registered {
            background: rgba(46, 204, 113, 0.1);
            border: 1px solid #2ecc71;
            color: #2ecc71;
            cursor: default;
        }

        /* Уведомление */
        body.page-calendar .glass-notification {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: rgba(10, 25, 41, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(0, 128, 201, 0.3);
            border-radius: 60px;
            padding: 15px 30px;
            color: white;
            display: none;
            align-items: center;
            gap: 15px;
            z-index: 3000;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            body.page-calendar .calendar-header {
                flex-direction: column;
                align-items: flex-start;
            }

            body.page-calendar .month-nav {
                width: 100%;
                justify-content: space-between;
            }

            body.page-calendar .current-month {
                font-size: 1.3rem;
                min-width: 150px;
            }

            body.page-calendar .weekdays {
                display: none;
            }

            body.page-calendar .calendar-day {
                min-height: 80px;
                padding: 6px;
                border-radius: 12px;
            }

            body.page-calendar .day-number {
                font-size: 1rem;
            }

            body.page-calendar .day-events {
                flex: 0 0 auto;
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                gap: 4px;
                margin-top: auto;
            }

            body.page-calendar .event-title {
                width: 9px;
                height: 9px;
                min-width: 9px;
                padding: 0;
                border: 0;
                border-radius: 999px;
                color: transparent;
                font-size: 0;
                line-height: 0;
                box-shadow: 0 0 0 3px rgba(33, 158, 235, 0.12);
            }

            body.page-calendar .event-modal {
                padding: 25px;
                width: 95%;
            }

            body.page-calendar .modal-event-title {
                font-size: 1.4rem;
            }

            body.page-calendar .modal-actions {
                flex-direction: column;
            }
        }

        @media (max-width: 640px) {
            body.page-calendar .calendar-page {
                padding: 18px 12px 28px;
            }

            body.page-calendar .calendar-title {
                font-size: 1.45rem;
                gap: 9px;
            }

            body.page-calendar .calendar-header {
                gap: 12px;
                margin-bottom: 16px;
            }

            body.page-calendar .month-nav {
                padding: 7px 10px;
                gap: 8px;
            }

            body.page-calendar .current-month {
                min-width: 0;
                flex: 1;
                font-size: 1.05rem;
            }

            body.page-calendar .calendar-container {
                padding: 10px;
                border-radius: 18px;
            }

            body.page-calendar .calendar-grid {
                gap: 4px;
            }

            body.page-calendar .calendar-day {
                min-height: 64px;
                padding: 5px;
                border-radius: 9px;
            }

            body.page-calendar .day-number {
                font-size: 0.85rem;
            }

            body.page-calendar .event-modal {
                width: calc(100% - 16px);
                padding: 18px 15px;
                border-radius: 20px;
            }
        }

        /* Стабильная раскладка карточки события */
        body.page-calendar .event-modal {
            box-sizing: border-box;
            width: min(560px, calc(100vw - 32px));
            max-width: 560px;
            padding: 32px clamp(20px, 3vw, 34px);
            border-radius: 26px;
        }

        body.page-calendar .modal-event-title {
            max-width: calc(100% - 28px);
            overflow-wrap: anywhere;
        }

        body.page-calendar .modal-event-detail,
        body.page-calendar .modal-event-spots {
            min-width: 0;
        }

        body.page-calendar .modal-event-detail span,
        body.page-calendar .modal-event-spots span {
            flex: 1 1 auto;
            min-width: 0;
            overflow-wrap: anywhere;
        }

        body.page-calendar .modal-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
            align-items: stretch;
        }

        body.page-calendar .modal-btn {
            min-width: 0;
            min-height: 56px;
            padding: 12px 10px;
            line-height: 1.25;
            text-align: center;
            overflow-wrap: anywhere;
        }

        @media (max-width: 760px) {
            body.page-calendar .modal-actions {
                grid-template-columns: 1fr;
            }

            body.page-calendar .modal-btn {
                min-height: 48px;
            }
        }

        @media (max-width: 640px) {
            body.page-calendar .event-modal {
                width: calc(100vw - 20px);
                padding: 22px 16px;
                border-radius: 22px;
            }
        }
