/* =============================
   БАЗА СТОРІНКИ БАЛАНСІВ
================================ */

.balances-title {
    font-size: 20px;
    font-weight: 600;
}

.balances-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.balances-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.balances-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.balances-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    font-size: 12px;
}

.balances-chip-label {
    color: #6b7280;
    margin-right: 4px;
}

.balances-chip-value {
    font-weight: 600;
    color: #1f2937;
}

/* =============================
   FILTER CARD
================================ */

.balances-filter-card {
    border-radius: 12px;
}

.balances-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
}

.balances-filter-group {
    min-width: 180px;
    flex: 1 1 180px;
}

.balances-filter-group--narrow {
    max-width: 160px;
}

.balances-filter-group--date {
    max-width: 180px;
}

.balances-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.balances-reset-link {
    padding-left: 0;
}

/* =============================
   SUMMARY CHIP
================================ */

.balances-summary-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    font-size: 13px;
}

.balances-summary-label {
    color: #166534;
    margin-right: 6px;
}

.balances-summary-value {
    font-weight: 600;
    color: #14532d;
}

/* =============================
   TABLE (DESKTOP/TABLET)
================================ */

.balances-table-card {
    border-radius: 12px;
}

.balances-table-header {
    border-bottom: 1px solid #e5e7eb;
}

.balances-table-title {
    font-weight: 600;
    font-size: 14px;
}

.balances-table-hint {
    font-size: 12px;
    color: #6b7280;
}

.balances-table-wrapper {
    max-height: 560px;
    overflow-y: auto;
}

.balances-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
    white-space: nowrap;
}

.balances-table tbody td {
    vertical-align: middle;
    font-size: 13px;
}

.balances-tl-name {
    font-weight: 500;
}

.balances-tl-email {
    font-size: 11px;
    color: #6b7280;
}

.balances-cabinet-cell {
    font-weight: 500;
    font-size: 13px;
}

.balances-amount-cell {
    font-weight: 600;
}

/* =============================
   SHIFT PILL
================================ */

.balances-shift-cell {
    white-space: nowrap;
}

.balances-shift-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.balances-shift-day {
    background: #eff6ff;
    color: #1d4ed8;
}

.balances-shift-evening {
    background: #fef3c7;
    color: #b45309;
}

.balances-shift-night {
    background: #e5e7eb;
    color: #111827;
}

/* =============================
   PAGINATION
================================ */

.balances-pagination {
    font-size: 13px;
}

/* =============================
   MOBILE CARDS
================================ */

.balances-mobile-list {
    display: none; /* показуємо тільки на мобайлі */
}

.balances-mobile-card {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: radial-gradient(circle at top left, #eef2ff 0, #ffffff 55%, #f9fafb 100%);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    margin-bottom: 8px;
}

.balances-mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.balances-mobile-head-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.balances-mobile-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.balances-mobile-date {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.balances-mobile-cab {
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
}

.balances-mobile-amount {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.balances-mobile-body {
    border-top: 1px dashed #e5e7eb;
    padding-top: 6px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balances-mobile-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.balances-mobile-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    min-width: 70px;
}

.balances-mobile-value {
    font-size: 12px;
    color: #111827;
}

/* =============================
   ADAPTIVE
================================ */

/* Планшет: фільтр розкладається стовпчиком, щоб не тісно */
@media (max-width: 991.98px) {
    .balances-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .balances-filter-group {
        min-width: 100%;
        flex: 1 1 100%;
    }

    .balances-filter-group--narrow,
    .balances-filter-group--date {
        max-width: 100%;
    }

    .balances-filter-actions {
        margin-left: 0;
        justify-content: flex-start;
    }

    .balances-table-wrapper {
        max-height: none;
    }
}

/* Мобілка: фільтр — як окрема форма, все по одному стовпчику, кнопки на всю ширину */
@media (max-width: 767.98px) {
    .balances-title {
        font-size: 18px;
    }

    .balances-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .balances-filter-card {
        padding: 10px 12px !important;
    }

    .balances-filter-form {
        gap: 10px;
    }

    .balances-filter-group label {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .balances-filter-group .form-control {
        font-size: 12px;
        height: 34px;
        padding: 4px 8px;
    }

    .balances-filter-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .balances-filter-actions .btn {
        width: 100%;
    }

    .balances-reset-link {
        width: 100%;
        text-align: center;
        padding-left: 0;
    }

    /* На мобілці ховаємо таблицю та показуємо картки */
    .balances-table-wrapper {
        display: none;
    }

    .balances-mobile-list {
        display: block;
    }
}

/* Дуже маленькі екрани */
@media (max-width: 575.98px) {
    .balances-chip {
        font-size: 11px;
    }

    .balances-summary-chip {
        width: 100%;
        justify-content: space-between;
    }

    .balances-mobile-label {
        min-width: 64px;
    }
}
