.table input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
}

.table .item-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
}

.table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.receipts-table,
.invoices-table,
.quotes-table {
    table-layout: auto;
    /* key */
}

.table .num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Mobile table behaviour */
@media (max-width: 720px) {

    /* Wrapper to allow horizontal scroll on narrow screens */
    .table-wrap,
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Make table readable instead of crushed */
    .table {
        table-layout: auto;
        width: 100%;
        min-width: 640px;
        /* forces scroll instead of squashing */
    }

    .table thead th {
        white-space: nowrap;
        font-size: 13px;
        padding: 10px 10px;
    }

    .table td {
        vertical-align: middle;
        padding: 14px 10px;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .table tbody tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.14);
    }

    .table tbody tr:last-child {
        border-bottom: 0;
    }

    .table td:first-child {
        white-space: nowrap;
        font-size: 12px;
    }

    .text-left {
        text-align: left;
    }

    .text-right {
        text-align: right;
    }

    /* Action column: keep button sized */
    .table td:last-child {
        white-space: nowrap;
        padding-left: 14px;
    }

    .table td:last-child .button {
        width: auto;
        padding: 10px 14px;
        border-radius: 10px;
    }

    /* On mobile, force numeric columns to behave consistently */
    .table th.num,
    .table td.num {
        text-align: right;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
        font-variant-numeric: tabular-nums;
    }

    .table th.nowrap,
    .table td.nowrap {
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }
}