.main-content-card {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.dropdown-menu-end {
    min-width: 16rem;
}

.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* --- ОРИГИНАЛЬНЫЕ СТИЛИ КАРТОЧКИ, КОТОРЫЕ РАБОТАЛИ --- */
.merchant-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: grid;
    grid-template-areas:
        "header logo"
        "details logo"
        "balance balance";
    grid-template-columns: 1fr auto;
    gap: 1rem;
    
    /* Добавляем position и transition для кнопки и эффекта */
    position: relative;
    transition: box-shadow 0.2s ease-in-out;
}

.merchant-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.mc-header { grid-area: header; }
.mc-details { grid-area: details; }
.mc-balance { grid-area: balance; }
.mc-logo { grid-area: logo; }

.mc-header h3 {
    margin: 0;
    font-size: 1.25rem;
}
.mc-details small {
    color: #6c757d;
    font-family: monospace;
}

.mc-balance {
    margin-top: 1rem;
    border-top: 1px solid #e9ecef; /* ВОТ ОНА, ВОЗВРАЩЕННАЯ ЛИНИЯ! */
    padding-top: 1rem;
}
.mc-balance .label {
    font-size: 0.8rem;
    color: #6c757d;
}
.mc-balance .amount {
    font-size: 1.5rem;
    font-weight: 600;
}
.mc-logo {
    width: 80px;
    height: 80px;
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 0.8rem;
    border-radius: 6px;
    overflow: hidden;
}
.mc-logo img {
    width: 100%; height: 100%; object-fit: contain;
}

/* --- СТИЛИ ДЛЯ КНОПКИ РЕДАКТИРОВАНИЯ (ОСТАЮТСЯ ЗДЕСЬ) --- */
.edit-merchant-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.2s ease-in-out;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #343a40;
    border: 1px solid #dee2e6;
}

.merchant-card:hover .edit-merchant-btn {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.edit-merchant-btn:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.payment-button-icon {
    /* 1. Задаем иконкам одинаковый, фиксированный размер */
    height: 22px;
    width: 22px;

    /* 2. Это самая важная строка. Она вертикально выравнивает иконку по центру текста */
    vertical-align: middle;

    /* 3. Создает небольшой отступ (8px) справа от иконки */
    margin-right: 8px;

    /* 4. Особенно важно для тегов <img>. Гарантирует, что изображение впишется в заданные размеры, не искажаясь */
    object-fit: contain;
}

/* Уменьшаем размер шрифта для всей таблицы инвойсов */
#invoicesTable {
    font-size: 0.85rem; /* Вы можете подобрать значение, например 0.8rem или 13px */
}

/* Дополнительно: можно уменьшить отступы в ячейках, чтобы строки стали ниже */
#invoicesTable td, 
#invoicesTable th {
    padding: 0.4rem; /* Стандартное значение обычно 0.75rem */
}