/* Основные стили */
.bp-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 2px solid #e8f5f0;
    border-bottom: 2px solid #e8f5f0;
    align-items: center;
}

.bp-btn {
    border: 2px solid #cbd8d4;
    background: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    color: #245a50;
    font: 600 14px Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bp-btn:hover {
    background: #edf8f4;
    border-color: #16806d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bp-btn-primary {
    background: #245a50;
    color: #fff;
    border-color: #1a4038;
}

.bp-btn-primary:hover {
    background: #16806d;
    border-color: #0e5a4a;
}

.bp-status {
    font: 13px Arial, sans-serif;
    color: #16806d;
    margin-left: auto;
}

/* Просмотрщик */
.bp-reader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    padding: 15px;
    backdrop-filter: blur(8px);
}

.bp-reader[hidden] {
    display: none !important;
}

.bp-reader-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #fff;
    font: 600 14px Arial, sans-serif;
    padding: 10px 15px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.bp-reader-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bp-reader iframe {
    border: 0;
    background: #fff;
    width: 100%;
    height: calc(100vh - 140px);
    margin: 0 auto;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.bp-reader-stats {
    display: flex;
    gap: 20px;
    padding: 8px 15px;
    background: rgba(255,255,255,0.06);
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-size: 13px;
    border-radius: 0 0 8px 8px;
    flex-wrap: wrap;
}

.bp-reader-btn {
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 6px;
    padding: 6px 14px;
    font: 600 12px Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.bp-reader-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
}

/* Модальное окно */
.bp-modal {
    position: fixed;
    inset: 0;
    z-index: 2147484000;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.bp-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.bp-modal-content h3 {
    color: #245a50;
    margin-top: 0;
    text-align: center;
}

.bp-export-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.bp-export-option {
    padding: 12px;
    border: 2px solid #e3ece9;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: #245a50;
    text-align: center;
}

.bp-export-option:hover {
    background: #edf8f4;
    border-color: #245a50;
}

.bp-modal-close {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    background: #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: background 0.3s;
}

.bp-modal-close:hover {
    background: #dee2e6;
}

/* Страница архива */
.bp-batch {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

.bp-batch h1 {
    color: #245a50;
    border-bottom: 2px solid #e8f5f0;
    padding-bottom: 10px;
}

.bp-form {
    margin: 20px 0;
    padding: 15px;
    background: #f5f9f8;
    border-radius: 8px;
}

.bp-form-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.bp-form-group label {
    font-weight: 600;
    color: #245a50;
}

.bp-form-group input[type="month"] {
    padding: 8px 12px;
    border: 2px solid #cbd8d4;
    border-radius: 6px;
    font-size: 14px;
}

.bp-form-group input[type="month"]:focus {
    border-color: #245a50;
    outline: none;
}

.bp-batch-item {
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e3ece9;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s;
}

.bp-batch-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.bp-batch-item h2 {
    color: #245a50;
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.bp-batch-item time {
    color: #888;
    font-size: 0.85em;
    display: block;
    margin-bottom: 10px;
}

.bp-batch-item p {
    color: #444;
    line-height: 1.6;
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .bp-reader {
        padding: 10px;
    }
    
    .bp-reader iframe {
        height: calc(100vh - 160px);
    }
    
    .bp-reader-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .bp-reader-actions {
        justify-content: center;
    }
    
    .bp-reader-stats {
        justify-content: center;
    }
    
    .bp-batch {
        padding: 0 10px;
    }
    
    .bp-form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bp-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bp-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bp-status {
        margin: 0;
        text-align: center;
    }
}

@media print {
    .bp-reader {
        position: static;
        background: none;
        padding: 0;
        backdrop-filter: none;
    }
    .bp-reader-bar, .bp-reader-stats {
        display: none !important;
    }
    .bp-reader iframe {
        height: auto;
        box-shadow: none;
        border-radius: 0;
    }
}