html, body.hzg-standalone { margin: 0; min-height: 100%; }
body.hzg-standalone { background: #f5f6f8; }
body.hzg-standalone * { box-sizing: border-box; }
:root {
    --hzg-pink: #ef5b93;
    --hzg-pink-dark: #d83f79;
    --hzg-black: #151515;
    --hzg-bg: #f5f6f8;
    --hzg-border: #e5e7eb;
    --hzg-muted: #68707d;
}

body.page-template-default:has(.hzg-portal),
body.page-template-default:has(.hzg-login-page) {
    background: var(--hzg-bg);
}

.hzg-login-page,
.hzg-portal {
    color: var(--hzg-black);
    font-family: inherit;
}

.hzg-login-page {
    min-height: 78vh;
    display: grid;
    place-items: center;
    padding: 36px 18px;
}

.hzg-login-card {
    width: min(440px, 100%);
    padding: 38px;
    background: #fff;
    border: 1px solid var(--hzg-border);
    border-top: 6px solid var(--hzg-pink);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(20, 25, 34, .12);
}

.hzg-login-brand,
.hzg-portal-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hzg-login-brand {
    justify-content: space-between;
    margin-bottom: 30px;
}

.hzg-login-brand > span:last-child {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .15em;
    color: var(--hzg-pink-dark);
}

.hzg-site-logo {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 62px;
    object-fit: contain;
}

.hzg-text-logo {
    display: inline-block;
    font-size: 23px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.hzg-text-logo b {
    color: var(--hzg-pink);
}

.hzg-login-card h1,
.hzg-page-heading h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -.035em;
}

.hzg-login-card h1 {
    font-size: 32px;
}

.hzg-login-intro {
    margin: 8px 0 25px;
    color: var(--hzg-muted);
}

.hzg-login-form label:not(.hzg-checkbox) {
    display: block;
    margin: 15px 0 7px;
    font-size: 13px;
    font-weight: 800;
}

.hzg-login-form input[type="text"],
.hzg-login-form input[type="password"],
.hzg-filter-form select,
.hzg-filter-form input[type="search"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    background: #fff;
    color: #151515;
    outline: 0;
}

.hzg-login-form input[type="text"],
.hzg-login-form input[type="password"] {
    padding: 13px 14px;
    font-size: 16px;
}

.hzg-login-form input:focus,
.hzg-filter-form select:focus,
.hzg-filter-form input[type="search"]:focus {
    border-color: var(--hzg-pink);
    box-shadow: 0 0 0 3px rgba(239, 91, 147, .14);
}

.hzg-checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--hzg-muted);
}

.hzg-forgot {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: var(--hzg-muted);
    font-size: 13px;
}

.hzg-portal {
    min-height: 75vh;
    background: var(--hzg-bg);
}

.hzg-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px max(24px, calc((100vw - 1460px) / 2));
    background: var(--hzg-black);
    color: #fff;
    border-bottom: 5px solid var(--hzg-pink);
}

.hzg-portal-brand .hzg-site-logo {
    max-width: 165px;
    max-height: 50px;
    filter: brightness(0) invert(1);
}

.hzg-portal-brand .hzg-text-logo {
    color: #fff;
}

.hzg-portal-brand > div {
    display: flex;
    flex-direction: column;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,.25);
}

.hzg-portal-brand strong {
    font-size: 16px;
}

.hzg-portal-brand div span,
.hzg-user-area span {
    color: rgba(255,255,255,.65);
    font-size: 12px;
}

.hzg-user-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hzg-user-area a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}

.hzg-portal-main {
    max-width: 1460px;
    margin: 0 auto;
    padding: 42px 24px 70px;
}

.hzg-page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.hzg-page-heading h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.hzg-page-heading p {
    max-width: 770px;
    margin: 7px 0 0;
    color: var(--hzg-muted);
}

.hzg-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--hzg-pink-dark);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .15em;
}

.hzg-filter-form {
    min-width: 210px;
}

.hzg-filter-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--hzg-muted);
    font-size: 12px;
    font-weight: 800;
}

.hzg-filter-form select {
    padding: 10px 36px 10px 12px;
}

.hzg-table-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hzg-border);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(28, 35, 48, .06);
}

.hzg-table-scroll {
    overflow-x: auto;
}

.hzg-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hzg-order-table th {
    padding: 15px 16px;
    background: #fbfbfc;
    border-bottom: 1px solid var(--hzg-border);
    color: #505866;
    text-align: left;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hzg-order-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf0f3;
    vertical-align: middle;
}

.hzg-order-table tbody tr:hover {
    background: #fffafd;
}

.hzg-order-link {
    display: block;
    color: #1746d1;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.hzg-edit-link {
    display: inline-block;
    margin-top: 4px;
    color: var(--hzg-muted);
    font-size: 11px;
    text-decoration: underline;
}

.hzg-money {
    text-align: right !important;
    white-space: nowrap;
}

.hzg-status {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 6px;
    background: #e8edf2;
    color: #344052;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.hzg-status-processing,
.hzg-status-completed {
    background: #cfe8d1;
    color: #185c20;
}

.hzg-status-on-hold,
.hzg-status-pending {
    background: #ffe5b2;
    color: #7a4c00;
}

.hzg-status-cancelled,
.hzg-status-failed,
.hzg-status-refunded {
    background: #f6d1d1;
    color: #811e1e;
}

.hzg-invoice-cell {
    min-width: 330px;
}

.hzg-invoice-number {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.hzg-invoice-warning,
.hzg-invoice-sent {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.hzg-invoice-warning {
    background: #fff0ca;
    color: #795100;
}

.hzg-invoice-sent {
    background: #ddf3e1;
    color: #21632d;
}

.hzg-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.hzg-inline-form {
    display: inline;
    margin: 0;
}

.hzg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 35px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none !important;
    transition: .15s ease;
}

.hzg-btn:hover {
    transform: translateY(-1px);
}

.hzg-btn-primary {
    background: var(--hzg-pink);
    color: #fff !important;
}

.hzg-btn-primary:hover {
    background: var(--hzg-pink-dark);
}

.hzg-btn-secondary {
    background: #171717;
    color: #fff !important;
}

.hzg-btn-light {
    background: #fff;
    border-color: #d8dde4;
    color: #20242a !important;
}

.hzg-btn-full {
    width: 100%;
    min-height: 47px;
    font-size: 14px;
}

.hzg-alert {
    margin: 0 0 20px;
    padding: 13px 15px;
    border-left: 5px solid;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.hzg-alert-success { border-color: #3c9a51; background: #edf8ef; }
.hzg-alert-warning { border-color: #d79a19; background: #fff8e8; }
.hzg-alert-error { border-color: #d64646; background: #fff0f0; }

.hzg-empty {
    padding: 55px !important;
    color: var(--hzg-muted);
    text-align: center;
}

.hzg-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
}

.hzg-pagination a {
    display: grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--hzg-border);
    border-radius: 8px;
    background: #fff;
    color: #20242a;
    text-decoration: none;
    font-weight: 800;
}

.hzg-pagination a.is-active {
    background: var(--hzg-pink);
    border-color: var(--hzg-pink);
    color: #fff;
}

@media (max-width: 820px) {
    .hzg-portal-header,
    .hzg-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .hzg-user-area {
        width: 100%;
        justify-content: space-between;
    }

    .hzg-filter-form {
        width: 100%;
    }

    .hzg-order-table thead {
        display: none;
    }

    .hzg-order-table,
    .hzg-order-table tbody,
    .hzg-order-table tr,
    .hzg-order-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .hzg-order-table tr {
        padding: 12px 0;
        border-bottom: 8px solid var(--hzg-bg);
    }

    .hzg-order-table td {
        display: grid;
        grid-template-columns: 115px minmax(0, 1fr);
        gap: 12px;
        padding: 8px 15px;
        border: 0;
        text-align: left !important;
    }

    .hzg-order-table td::before {
        content: attr(data-label);
        color: var(--hzg-muted);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .hzg-invoice-cell {
        min-width: 0;
    }

    .hzg-invoice-cell > * {
        grid-column: 2;
    }

    .hzg-login-card {
        padding: 28px 22px;
    }
}

.hzg-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #25d366;
    border-color: #25d366;
    color: #fff !important;
}

.hzg-btn-whatsapp:hover,
.hzg-btn-whatsapp:focus {
    background: #1fb95a;
    border-color: #1fb95a;
    color: #fff !important;
}

.hzg-btn-whatsapp svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}


/* Afgeschermde bestellingseditor */
.hzg-editor-main { max-width: 1240px; }
.hzg-back-link { display: inline-flex; margin-bottom: 22px; color: #4f5865; text-decoration: none; font-size: 13px; font-weight: 800; }
.hzg-back-link:hover { color: var(--hzg-pink-dark); }
.hzg-editor-heading { align-items: center; }
.hzg-order-total-box { min-width: 210px; padding: 18px 22px; background: #fff; border: 1px solid var(--hzg-border); border-radius: 14px; box-shadow: 0 8px 24px rgba(28,35,48,.05); text-align: right; }
.hzg-order-total-box span { display: block; margin-bottom: 4px; color: var(--hzg-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hzg-order-total-box strong { font-size: 24px; font-weight: 950; }
.hzg-invoice-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 22px 24px; background: #fff; border: 1px solid var(--hzg-border); border-left: 5px solid var(--hzg-pink); border-radius: 14px; box-shadow: 0 8px 24px rgba(28,35,48,.05); }
.hzg-invoice-panel.is-outdated { border-left-color: #e5a11a; background: #fffaf1; }
.hzg-invoice-panel h2, .hzg-editor-card h2 { margin: 3px 0 5px; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.hzg-invoice-panel p, .hzg-card-heading p { margin: 0; color: var(--hzg-muted); font-size: 13px; line-height: 1.5; }
.hzg-panel-label { color: var(--hzg-pink-dark); font-size: 10px; font-weight: 950; letter-spacing: .13em; }
.hzg-panel-actions { justify-content: flex-end; }
.hzg-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hzg-editor-grid .hzg-editor-card:first-child { grid-column: 1 / -1; }
.hzg-editor-card { padding: 24px; background: #fff; border: 1px solid var(--hzg-border); border-radius: 15px; box-shadow: 0 8px 24px rgba(28,35,48,.045); }
.hzg-items-card { margin-top: 20px; padding: 0; overflow: hidden; }
.hzg-items-card > .hzg-card-heading { padding: 24px; }
.hzg-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.hzg-form-grid { display: grid; gap: 15px; }
.hzg-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hzg-field-full { grid-column: 1 / -1; }
.hzg-field label { display: block; margin-bottom: 6px; color: #414957; font-size: 12px; font-weight: 850; }
.hzg-field input, .hzg-field select, .hzg-field textarea, .hzg-item-name, .hzg-item-qty, .hzg-item-price { width: 100%; border: 1px solid #cfd4dc; border-radius: 9px; background: #fff; color: #151515; outline: none; font: inherit; }
.hzg-field input, .hzg-field select, .hzg-item-name, .hzg-item-qty, .hzg-item-price { min-height: 43px; padding: 10px 12px; }
.hzg-field textarea { padding: 11px 12px; resize: vertical; }
.hzg-field input:focus, .hzg-field select:focus, .hzg-field textarea:focus, .hzg-item-name:focus, .hzg-item-qty:focus, .hzg-item-price:focus { border-color: var(--hzg-pink); box-shadow: 0 0 0 3px rgba(239,91,147,.13); }
.hzg-readonly-value { min-height: 43px; display: flex; align-items: center; padding: 10px 12px; background: #f7f8fa; border: 1px solid #e2e5e9; border-radius: 9px; color: #505866; }
.hzg-text-button { padding: 0; border: 0; background: transparent; color: var(--hzg-pink-dark); font-size: 12px; font-weight: 850; cursor: pointer; }
.hzg-editor-table-scroll { overflow-x: auto; border-top: 1px solid var(--hzg-border); }
.hzg-editor-items-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.hzg-editor-items-table th { padding: 13px 15px; background: #fafbfc; border-bottom: 1px solid var(--hzg-border); color: #596170; font-size: 10px; font-weight: 900; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.hzg-editor-items-table td { padding: 14px 15px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.hzg-editor-items-table tr.is-removed { opacity: .42; background: #fff2f2; }
.hzg-editor-items-table td small { display: block; margin-top: 5px; color: var(--hzg-muted); font-size: 10px; line-height: 1.4; }
.hzg-col-qty { width: 105px; }
.hzg-col-price { width: 190px; }
.hzg-col-vat { width: 90px; }
.hzg-col-remove { width: 110px; text-align: center; }
.hzg-money-input { display: flex; align-items: center; border: 1px solid #cfd4dc; border-radius: 9px; overflow: hidden; background: #fff; }
.hzg-money-input:focus-within { border-color: var(--hzg-pink); box-shadow: 0 0 0 3px rgba(239,91,147,.13); }
.hzg-money-input span { padding: 0 0 0 11px; color: #555f6d; font-weight: 800; }
.hzg-money-input .hzg-item-price { border: 0; box-shadow: none !important; }
.hzg-tax-pill { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eef1f5; color: #394454; font-size: 11px; font-weight: 850; }
.hzg-remove-check { display: inline-flex; align-items: center; gap: 6px; color: #8c2730; font-size: 11px; font-weight: 800; cursor: pointer; }
.hzg-remove-check input { margin: 0; }
.hzg-coupon-note { margin: 16px 20px 20px; padding: 12px 14px; border-radius: 9px; background: #f6f7f9; color: #596170; font-size: 12px; }
.hzg-save-bar { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 22px; padding: 16px 18px; background: rgba(21,21,21,.97); color: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(20,25,34,.22); }
.hzg-save-bar strong, .hzg-save-bar span { display: block; }
.hzg-save-bar strong { font-size: 13px; }
.hzg-save-bar span { margin-top: 3px; color: rgba(255,255,255,.66); font-size: 11px; }
.hzg-save-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.hzg-btn-large { min-height: 44px; padding-inline: 18px; }

@media (max-width: 850px) {
    .hzg-editor-grid { grid-template-columns: 1fr; }
    .hzg-editor-grid .hzg-editor-card:first-child { grid-column: auto; }
    .hzg-invoice-panel, .hzg-save-bar, .hzg-editor-heading { align-items: stretch; flex-direction: column; }
    .hzg-order-total-box { min-width: 0; text-align: left; }
    .hzg-panel-actions, .hzg-save-actions { justify-content: flex-start; flex-wrap: wrap; }
    .hzg-save-actions .hzg-btn { flex: 1; text-align: center; }
}

@media (max-width: 560px) {
    .hzg-form-grid-2 { grid-template-columns: 1fr; }
    .hzg-field-full { grid-column: auto; }
    .hzg-editor-card { padding: 19px; }
    .hzg-items-card { padding: 0; }
    .hzg-save-bar { bottom: 6px; }
}

/* Handmatige facturen en dynamische factuurregels */
.hzg-heading-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.hzg-heading-actions .hzg-filter-form {
    margin: 0;
}

.hzg-field-spaced {
    margin-top: 16px;
}

.hzg-remove-row-button {
    border: 0;
    padding: 6px 4px;
    background: transparent;
    color: #9b2531;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.hzg-remove-row-button:hover,
.hzg-remove-row-button:focus {
    color: #6f111a;
    text-decoration: underline;
}

@media (max-width: 820px) {
    .hzg-heading-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .hzg-heading-actions .hzg-btn,
    .hzg-heading-actions .hzg-filter-form {
        width: 100%;
        box-sizing: border-box;
    }

    .hzg-heading-actions .hzg-btn {
        text-align: center;
    }
}


/* Factuurnummer zoeken en handmatige facturen naar de prullenbak */
.hzg-invoice-search-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    min-width: 0;
}

.hzg-filter-field {
    min-width: 175px;
}

.hzg-filter-field-search {
    min-width: 190px;
}

.hzg-filter-form input[type="search"] {
    min-height: 39px;
    padding: 9px 12px;
    font: inherit;
}

.hzg-filter-reset {
    align-self: center;
    margin-top: 18px;
    color: var(--hzg-muted);
    font-size: 11px;
    font-weight: 800;
    text-decoration: underline;
}

.hzg-trash-heading,
.hzg-trash-cell {
    width: 42px;
    padding-left: 10px !important;
    padding-right: 4px !important;
    text-align: center !important;
}

.hzg-trash-form {
    display: inline-block;
    margin: 0;
}

.hzg-trash-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 1px solid #f0d4d8;
    border-radius: 8px;
    background: #fff7f8;
    color: #a32936;
    cursor: pointer;
    transition: .15s ease;
}

.hzg-trash-button:hover,
.hzg-trash-button:focus {
    border-color: #d79aa2;
    background: #ffecef;
    color: #74131e;
    transform: translateY(-1px);
}

.hzg-trash-button svg {
    width: 17px;
    height: 17px;
}

.hzg-trash-placeholder {
    color: #c6cbd2;
    font-size: 11px;
}

@media (max-width: 820px) {
    .hzg-invoice-search-form {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .hzg-filter-field,
    .hzg-filter-field-search {
        width: 100%;
        min-width: 0;
    }

    .hzg-filter-reset {
        align-self: flex-start;
        margin-top: 0;
    }

    .hzg-trash-cell {
        display: flex !important;
        justify-content: flex-end;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }

    .hzg-trash-cell::before {
        display: none;
    }
}
