
    /* ============================================================
       ОБЩИЕ СТИЛИ
       ============================================================ */
    .reader-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }
    
    /* ============================================================
       ШАПКА
       ============================================================ */
    .reader-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid #e8e8e8;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .back-link {
        color: #1a73e8;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
    }
    
    .back-link:hover {
        text-decoration: underline;
    }
    
    .download-link {
        background: #1a73e8;
        color: #fff;
        padding: 10px 24px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 500;
        transition: background 0.2s;
    }
    
    .download-link:hover {
        background: #1557b0;
        color: #faeebbfb;
    }

    /* ============================================================
       ОБЕРТКА ДЛЯ PDF — фиксированная высота 1200px
       ============================================================ */
    .pdf-viewer-wrapper {
        width: 100%;
        height: 1200px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: auto;         /* скролл, если содержимое больше */
        background: #f5f5f5;
        position: relative;
    }

    /* ============================================================
       СТИЛИ ДЛЯ ВСЕХ КОНТЕЙНЕРОВ PDF.JS (Битрикс)
       ============================================================ */
    
    /* Все внутренние контейнеры — растягиваем на 100% */
    .pdf-viewer-wrapper > div,
    .pdf-viewer-wrapper .pdfViewerContainer,
    .pdf-viewer-wrapper .pdfViewerContainer > div,
    .pdf-viewer-wrapper .pdfViewer,
    .pdf-viewer-wrapper .pdfViewer > div,
    #pdf-viewer,
    #pdf-viewer > div,
    .bitrix-pdf-viewer,
    .bitrix-pdf-viewer > div {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        background: #f5f5f5 !important;
    }

    /* Сам canvas, на котором рисуется PDF — центрируем */
    .pdf-viewer-wrapper canvas,
    .pdfViewer canvas,
    #pdf-viewer canvas {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    }

    /* Контейнер для страниц PDF (внутри PDF.js) */
    .pdfViewer .page,
    .pdfViewerContainer .page {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
        background: #f5f5f5 !important;
    }

    /* Если внутри есть iframe */
    .pdf-viewer-wrapper iframe,
    .pdfViewerContainer iframe,
    #pdf-viewer iframe {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        display: block !important;
    }

    /* Панель инструментов PDF.js (если есть) */
    .pdf-viewer-wrapper .toolbar,
    .pdfViewerContainer .toolbar,
    #pdf-viewer .toolbar {
        flex-shrink: 0 !important;
        background: #f0f0f0 !important;
        padding: 8px 16px !important;
        border-bottom: 1px solid #ddd !important;
        z-index: 5 !important;
    }

    /* ============================================================
       АДАПТИВ — на мобилках высоту уменьшаем
       ============================================================ */
    @media (max-width: 768px) {
        .reader-container {
            padding: 10px;
        }
        
        .reader-header {
            padding: 10px 0;
            flex-direction: column;
            align-items: stretch;
            text-align: center;
        }
        
        .download-link {
            text-align: center;
        }
        
        .pdf-viewer-wrapper {
            height: 600px;      /* на мобилках меньше */
        }
        
        .pdfViewer .page,
        .pdfViewerContainer .page {
            padding: 10px !important;
        }
    }

    @media (max-width: 480px) {
        .pdf-viewer-wrapper {
            height: 400px;      /* на совсем маленьких экранах ещё меньше */
        }
    }

    /* Стили для списка выпусков */
    .journal-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 30px 20px;
    }
    
    .journal-container h1 {
        font-size: 32px;
        margin-bottom: 10px;
        color: #333;
    }
    
    .journal-subtitle {
        color: #666;
        font-size: 18px;
        margin-bottom: 40px;
    }
    
    .journal-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
    }
    
    .journal-item {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s;
        border: 1px solid #e8e8e8;
    }
    
    .journal-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    }
    
    .journal-cover {
        height: 280px;
        overflow: hidden;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .journal-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }
    
    .journal-item:hover .journal-cover img {
        transform: scale(1.03);
    }
    
    .journal-info {
        padding: 20px 24px 24px;
    }
    
    .journal-title {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 6px;
    }
    
    .journal-title a {
        color: #1a1a1a;
        text-decoration: none;
    }
    
    .journal-title a:hover {
        color: #0066cc;
    }
    
    .journal-date {
        font-size: 14px;
        color: #888;
        margin-bottom: 12px;
    }
    
    .journal-description {
        font-size: 15px;
        color: #555;
        line-height: 1.5;
        margin-bottom: 18px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 60px;
    }
    
    .journal-actions {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .journal-actions a {
        padding: 10px 20px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: background 0.2s, transform 0.1s;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
    
    .btn-download {
        background: #1a73e8;
        color: #fff;
    }
    
    .btn-download:hover {
        background: #1557b0;
        color: #faeebbfb;
    }
    
    .btn-read {
        background: #e8f0fe;
        color: #1a73e8;
        border: 1px solid #d2e3fc;
    }
    
    .btn-read:hover {
        background: #d2e3fc;
    }
    
    .journal-empty {
        text-align: center;
        padding: 60px 20px;
        color: #888;
        font-size: 18px;
    }
    
    @media (max-width: 768px) {
        .journal-grid {
            grid-template-columns: 1fr;
        }
        
        .journal-cover {
            height: 200px;
        }
        
        .journal-actions {
            flex-direction: column;
        }
        
        .journal-actions a {
            flex: unset;
        }
    }


        /* ============================================================
      Стили авторизации
       ============================================================ */
     .auth-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 70vh;
            padding: 40px 20px;
            background: #f5f7fa;
        }
        
        .auth-box {
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.08);
            padding: 48px 40px;
            max-width: 420px;
            width: 100%;
            border: 1px solid #e8e8e8;
        }
        
        .auth-box h2 {
            font-size: 26px;
            font-weight: 600;
            margin: 0 0 8px 0;
            color: #1a1a1a;
            text-align: center;
        }
        
        .auth-subtitle {
            color: #666;
            text-align: center;
            margin-bottom: 30px;
            font-size: 15px;
            line-height: 1.5;
        }
        
        /* ============================================================
           СТИЛИ ДЛЯ СТАНДАРТНОЙ ФОРМЫ БИТРИКС
           ============================================================ */
        .auth-box .bx-system-auth-form {
            width: 100%;
        }
        
        .auth-box .bx-system-auth-form form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        
        .auth-box .bx-system-auth-form .form-group {
            margin-bottom: 0;
        }
        
        .auth-box .bx-system-auth-form label {
            display: block;
            font-weight: 500;
            font-size: 14px;
            color: #333;
            margin-bottom: 5px;
        }
        
        .auth-box .bx-system-auth-form input[type="text"],
        .auth-box .bx-system-auth-form input[type="password"] {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 15px;
            transition: border-color 0.2s;
            box-sizing: border-box;
        }
        
        .auth-box .bx-system-auth-form input[type="text"]:focus,
        .auth-box .bx-system-auth-form input[type="password"]:focus {
            border-color: #1a73e8;
            outline: none;
            box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
        }
        
        .auth-box .bx-system-auth-form .checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .auth-box .bx-system-auth-form .checkbox input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        .auth-box .bx-system-auth-form .checkbox label {
            font-weight: 400;
            font-size: 14px;
            color: #555;
            cursor: pointer;
            margin-bottom: 0;
        }
        
        .auth-box .bx-system-auth-form .btn {
            width: 100%;
            padding: 14px;
            background: #1a73e8;
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .auth-box .bx-system-auth-form .btn:hover {
            background: #1557b0;
        }
        
        .auth-box .bx-system-auth-form .bx-auth-links {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            font-size: 14px;
        }
        
        .auth-box .bx-system-auth-form .bx-auth-links a {
            color: #1a73e8;
            text-decoration: none;
        }
        
        .auth-box .bx-system-auth-form .bx-auth-links a:hover {
            text-decoration: underline;
        }
        
        .auth-box .bx-system-auth-form .errortext {
            background: #fde8e8;
            color: #c62828;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            border-left: 4px solid #c62828;
        }
        
        @media (max-width: 480px) {
            .auth-box {
                padding: 30px 20px;
            }
            
            .auth-box h2 {
                font-size: 22px;
            }
            
            .auth-box .bx-system-auth-form .bx-auth-links {
                flex-direction: column;
                gap: 8px;
                text-align: center;
            }
        }

