* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #eef1f4;
    color: #1f2933;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    padding: 24px;
}

.app-form {
    width: 100%;
}

.toolbar {
    width: 1000px;
    max-width: 100%;
    margin: 0 auto 18px auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.page {
    width: 1000px;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px 34px 26px 34px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.page-header {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 22px;
    align-items: start;
    margin-bottom: 24px;
}

.header-left {
    min-width: 0;
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input {
    width: 100%;
    font-size: 14px;
    line-height: 1.35;
    padding: 8px 10px;
    border: 1px solid #cfd6df;
    border-radius: 7px;
    background: #fff;
    color: #222;
    outline: none;
    text-align: left;
}

input[type="date"].input {
    min-width: 150px;
}

.input:focus {
    border-color: #8da2bd;
    box-shadow: 0 0 0 2px rgba(141, 162, 189, 0.12);
}

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

.input-title {
    font-size: 18px;
    font-weight: 700;
    padding: 10px 12px;
}

.top-right-input {
    text-align: left;
}

.section {
    margin-bottom: 24px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #17212b;
}

.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.voucher-wrap {
    width: 100%;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}

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

.table-voucher .col-betrag {
    width: 34%;
}

.table-voucher .col-anzahl {
    width: 26%;
}

.table-voucher .col-total {
    width: 40%;
}

.col-delivery-date {
    width: 50%;
}

.col-delivery-amount {
    width: 50%;
}

.table th,
.table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.table th {
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #495766;
    border-bottom: 1px solid #cfd6df;
    white-space: nowrap;
}

.table th.text-right,
.table td.text-right {
    text-align: right;
}

.table td {
    font-size: 14px;
    border-bottom: 1px solid #e7ecf1;
}

.table .input {
    padding: 7px 8px;
    border: 1px solid #d7dee6;
    border-radius: 6px;
    font-size: 14px;
}

.sum-row td {
    border-top: 1.5px solid #3b3b3b;
    border-bottom: none;
    padding-top: 10px;
    font-weight: 700;
    font-size: 14px;
}

.sum-row .sum-label {
    text-align: left;
    white-space: nowrap;
}

.table-summary td {
    font-size: 14px;
    padding: 8px 4px;
}

.page-footer {
    display: none;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-secondary {
    background: #556270;
    color: #fff;
}

.btn-add {
    background: #2f9d62;
    color: #fff;
}

.btn-remove {
    background: #d34e4e;
    color: #fff;
}

.btn-small {
    padding: 7px 10px;
    font-size: 12px;
}

@media (max-width: 900px) {
    body {
        padding: 12px;
    }

    .page {
        padding: 18px;
        border-radius: 8px;
    }

    .page-header,
    .grid-two {
        grid-template-columns: 1fr;
    }

    .header-right {
        width: 100%;
    }
}

@page {
    size: A4;
    margin: 10mm 10mm 12mm 10mm;
}

@media print {
    html,
    body {
        background: #fff;
        color: #000;
        font-size: 10.5pt;
    }

    body {
        padding: 0;
    }

    .no-print,
    .toolbar,
    .row-actions {
        display: none !important;
    }

    .page {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        background: #fff;
    }

    .page-header {
        grid-template-columns: 1fr 46mm;
        gap: 14px;
        margin-bottom: 12px;
    }

    .input,
    .table .input {
        border: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 10.5pt;
        line-height: 1.25;
        color: #000;
        text-align: left;
    }

    input[type="date"].input {
        min-width: 0;
        width: 100%;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
    }

    .input.text-right {
        text-align: right !important;
    }

    .input-title {
        font-size: 15pt;
        font-weight: 700;
        padding: 0 !important;
    }

    .section {
        margin-bottom: 12px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .section-head {
        margin-bottom: 4px;
    }

    .section-head h2 {
        font-size: 11.5pt;
        font-weight: 700;
        letter-spacing: 0;
        color: #000;
    }

    .grid-two {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

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

    .table th {
        font-size: 8.5pt;
        font-weight: 700;
        color: #000;
        border-bottom: 0.8px solid #9a9a9a;
        white-space: nowrap;
    }

    .table th.text-right,
    .table td.text-right {
        text-align: right;
    }

    .table td {
        font-size: 9.5pt;
        border-bottom: 0.6px solid #d8d8d8;
    }

    .sum-row td {
        font-size: 9.7pt;
        font-weight: 700;
        border-top: 1px solid #333;
        padding-top: 4px;
    }

    .sum-row .sum-label {
        text-align: left;
        white-space: nowrap;
    }

    .page-footer {
        display: block;
        position: fixed;
        bottom: 8mm;
        left: 15mm;
        right: 15mm;
        font-size: 9px;
        color: #777;
    }

    .footer-inner {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

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