/* Tenant history — payment table */
.tenant-payment-table-wrap {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tenant-payment-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tenant-payment-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    color: #334155;
}

.tenant-payment-table thead tr {
    background: #f8f9fa;
}

.tenant-payment-table th {
    padding: 14px 16px;
    font-weight: 600;
    color: #475569;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.tenant-payment-table th.tenant-payment-table__th--center {
    text-align: center;
}

.tenant-payment-table__th--sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.tenant-payment-table__th--sortable:hover {
    color: #2563eb;
    background: #f1f5f9;
}

.tenant-payment-table__th--sortable.is-active {
    color: #2563eb;
}

.tenant-payment-table__sort-icon {
    margin-left: 4px;
    font-size: 0.72rem;
    opacity: 0.45;
    vertical-align: middle;
}

.tenant-payment-table__th--sortable.is-active .tenant-payment-table__sort-icon {
    opacity: 1;
}

.tenant-payment-table__row {
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.tenant-payment-table__row--clickable {
    cursor: pointer;
}

.tenant-payment-table__row:last-child {
    border-bottom: none;
}

.tenant-payment-table__row--clickable:hover {
    background: #f0f7ff;
}

.tenant-payment-table__cell {
    padding: 16px;
    vertical-align: middle;
}

.tenant-payment-table__cell--amount {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.tenant-payment-table__cell--center {
    text-align: center;
}

.tenant-payment-table__badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: #e6f4ea;
    color: #1e7e34;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.tenant-payment-table__receipt-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #007bff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.15s, color 0.15s;
}

.tenant-payment-table__receipt-btn:hover {
    background: #eff6ff;
    color: #0056b3;
}

.tenant-payment-table__row--skeleton {
    pointer-events: none;
}

.tenant-payment-table__row--skeleton:hover {
    background: transparent;
}

.tenant-payment-skeleton {
    display: inline-block;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e8edf3 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: tenant-payment-skeleton-shimmer 1.25s ease-in-out infinite;
    vertical-align: middle;
}

.tenant-payment-skeleton--wide {
    width: 100%;
    max-width: 220px;
}

.tenant-payment-skeleton--medium {
    width: 120px;
}

.tenant-payment-skeleton--short {
    width: 72px;
}

.tenant-payment-skeleton--badge {
    width: 76px;
    height: 26px;
    border-radius: 999px;
}

.tenant-payment-skeleton--icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

@keyframes tenant-payment-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 640px) {
    .tenant-payment-table {
        min-width: 720px;
        font-size: 0.85rem;
    }

    .tenant-payment-table th,
    .tenant-payment-table__cell {
        padding: 12px 14px;
    }
}
