/* public/style.css — изолированные стили, компактная версия */

.donation-app {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #222;
    line-height: 1.4; /* чуть плотнее */
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.75rem 1rem; /* уменьшили внешние отступы */
    font-size: 0.95rem; /* общее уменьшение на 5% */
}

/* Заголовок */
.donation-app h1 {
    font-size: 1.4rem; /* был 1.6rem */
    font-weight: 500;
    margin-bottom: 0.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e0e0e0;
    color: #111;
}

/* Блок итогов — компактный */
.donation-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.2rem; /* меньше расстояние между элементами */
    padding: 0.2rem 0 0.4rem 0;
    margin-bottom: 0.1rem;
    border-bottom: 1px solid #ececec;
    font-size: 0.85rem; /* специально уменьшен */
}
.donation-totals strong {
    font-weight: 600;
    color: #222;
}
.donation-totals .text-muted {
    color: #777;
}
.donation-totals .small {
    font-size: 0.7rem; /* ещё мельче */
    color: #999;
}

/* Форма фильтра — компактная */
.donation-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem; /* уменьшен gap */
    padding: 0.1rem 0 0.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.3rem;
}
.donation-filter input,
.donation-filter .btn {
    font-size: 0.8rem; /* был 0.85rem */
    padding: 0.1rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    height: 28px; /* был 30px */
    box-sizing: border-box;
}
.donation-filter input:focus {
    border-color: #888;
    outline: none;
}
.donation-filter .btn {
    cursor: pointer;
    background: #f0f0f0;
    border-color: #ccc;
    font-weight: 400;
    height: 28px;
    line-height: 1.2;
    padding: 0 0.6rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.donation-filter .btn:hover {
    background: #e0e0e0;
}
.donation-filter .btn-outline {
    background: transparent;
    border-color: #ccc;
}
.donation-filter .btn-outline:hover {
    background: #f5f5f5;
}
.donation-filter .btn-archive {
    margin-left: auto;
    background: transparent;
    border-color: #ccc;
}
.donation-filter .btn-archive:hover {
    background: #f5f5f5;
}
.donation-filter input[type="date"] {
    width: 140px; /* чуть уже */
}
.donation-filter input[type="text"] {
    width: 160px; /* чуть уже */
}
@media (max-width: 600px) {
    .donation-filter input,
    .donation-filter .btn {
        width: 100% !important;
        flex: 1 1 100%;
    }
    .donation-filter .btn-archive {
        margin-left: 0;
    }
}

/* Список пожертвований — компактный */
.donation-list {
    margin-top: 0.3rem;
}
.donation-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0.3rem 0.8rem;
    align-items: center;
    padding: 0.3rem 0; /* был 0.5rem */
    border-bottom: 1px solid #ececec;
    font-size: 0.9rem; /* был 0.95rem */
}
.donation-item:last-child {
    border-bottom: none;
}
.donation-item .col-name {
    font-weight: 500;
    overflow-wrap: break-word;
    word-break: break-word;
}
.donation-item .col-amount {
    font-weight: 500;
}
.donation-item .col-date {
    color: #777;
    font-size: 0.8rem; /* уменьшен */
}
.donation-item .col-type {
    background: #f2f2f2;
    color: #444;
    padding: 0.05rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem; /* уменьшен */
    font-weight: 400;
    text-align: center;
    justify-self: start;
}

@media (max-width: 600px) {
    .donation-item {
        grid-template-columns: 1fr;
        gap: 0.1rem;
        padding: 0.4rem 0;
    }
    .donation-item .col-type {
        justify-self: start;
    }
}

/* Пагинация */
.donation-pagination {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 1rem;
}
.donation-pagination .page-link {
    display: inline-block;
    padding: 0.1rem 0.5rem; /* уменьшен */
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem; /* был 0.9rem */
    background: #fff;
}
.donation-pagination .page-link:hover {
    background: #f0f0f0;
    border-color: #bbb;
}
.donation-pagination .active .page-link {
    background: #555;
    border-color: #555;
    color: #fff;
}
.donation-pagination .disabled .page-link {
    color: #aaa;
    pointer-events: none;
}

/* Модальное окно — компактное */
.donation-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.donation-modal-overlay.active {
    display: flex;
}
.donation-modal {
    background: #fff;
    max-width: 750px; /* чуть меньше */
    width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.donation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.2rem; /* уменьшен */
    border-bottom: 1px solid #eee;
}
.donation-modal-header h5 {
    margin: 0;
    font-size: 1rem; /* был 1.1rem */
    font-weight: 500;
}
.donation-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: #999;
}
.donation-modal-close:hover {
    color: #333;
}
.donation-modal-body {
    padding: 1rem 1.2rem; /* уменьшен */
    overflow-y: auto;
    flex: 1;
}
.donation-modal-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: inherit;
    font-size: 0.9rem; /* был 0.95rem */
    line-height: 1.5;
}
.donation-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1.2rem; /* уменьшен */
    border-top: 1px solid #eee;
}
.donation-modal-footer .btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.1rem 0.7rem; /* меньше */
    font-size: 0.8rem; /* был 0.9rem */
    cursor: pointer;
}
.donation-modal-footer .btn:hover {
    background: #e0e0e0;
}
.donation-modal-footer .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.donation-modal-footer .page-info {
    font-size: 0.8rem; /* был 0.9rem */
    color: #555;
}

