/* Focused responsive and layout corrections for the DUEDA production preview. */

@media (min-width: 721px) {
    .document-row {
        grid-template-columns:
            38px
            minmax(220px, 1fr)
            minmax(90px, max-content)
            minmax(82px, max-content)
            minmax(90px, max-content)
            max-content
            max-content;
    }

    .document-row > .status-badge,
    .document-row-actions {
        min-width: max-content;
    }
}

@media (max-width: 720px) {
    .app-shell {
        align-content: start;
        grid-template-rows: 62px auto;
    }

    .sidebar {
        height: 62px;
        min-height: 62px;
        max-height: 62px;
    }

    .topbar {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }

    .receivables-table-shell {
        overflow: visible;
    }

    .receivables-table,
    .receivables-table tbody,
    .receivables-table tr,
    .receivables-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .receivables-table thead {
        display: none;
    }

    .receivables-table tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 8px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 18px;
        margin-bottom: 12px;
        padding: 15px;
    }

    .receivables-table td {
        border: 0;
        overflow-wrap: anywhere;
        padding: 0;
    }

    .receivables-table td::before {
        color: var(--text-muted);
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 700;
        margin-bottom: 3px;
        text-transform: uppercase;
    }

    .receivables-table td:nth-child(2),
    .receivables-table .receivable-action {
        grid-column: 1 / -1;
    }

    .receivables-table .receivable-action::before {
        display: none;
    }

    .receivables-table .receivable-action .button {
        min-height: 44px;
        width: 100%;
    }
}
