:root {
    --bg: #f4f5f1;
    --panel: #ffffff;
    --ink: #142521;
    --muted: #6d7771;
    --blue: #126cc8;
    --blue-dark: #003f7f;
		--lime: #8fca5a;
		--lime-lt: #9fd471;
		--lime-dark: #669240;
    --gold: #caa75a;
		--white: #ffffff;
    --line: #dfe4dc;
    --danger: #fa0000;
    --warning: #ffae00;
    --ok: #2e7042;
    --shadow: 0 16px 40px rgba(13, 59, 58, .09);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.tm-topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.tm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; }
.tm-brand-mark {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--blue), var(--blue-dark));
    color: #fff;
    font-size: 13px;
    letter-spacing: .04em;
}
.tm-brand-text { font-size: 21px; }
.tm-menu-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 20px; }
.tm-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 68px;
    z-index: 40;
}
.tm-nav a, .tm-user-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--ink);
    font-size: 14px;
}
.tm-nav a:hover { background: #eef4ef; text-decoration: none; }
.tm-nav-spacer { flex: 1; }
.tm-user-pill { background: #f2eee2; color: #6f5723; }
.tm-page { max-width: 1420px; margin: 0 auto; padding: 24px; }
.tm-footer { padding: 24px; color: var(--muted); text-align: center; font-size: 13px; }
.tm-hero, .tm-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.tm-hero h1, .tm-panel h1, .tm-panel h2 { margin: 0 0 10px; }
.tm-muted { color: var(--muted); }
.tm-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tm-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}
.tm-card strong { display: block; font-size: 26px; margin-top: 6px; }
.tm-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 6px 7px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: #fafbf8; }
tr:last-child td { border-bottom: 0; }
.tm-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tm-btn, button.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blue);
    background: var(--blue);
    color: #fff;
    border-radius: 12px;
    padding: 5px 10px;
    min-height: 40px;
    font-weight: 650;
    cursor: pointer;
		margin-bottom:0.5rem;
}
.tm-btn:hover { background: var(--blue-dark); text-decoration: none; }
.tm-btn.secondary { background: #fff; color: var(--blue); margin-bottom: 0.5rem;} 
.tm-btn.warning { background: var(--warning); border-color: var(--warning); }
.tm-btn.danger { background: var(--danger); border-color: var(--danger); }
.tm-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef4ef;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 700;
}
.tm-status.on_hold, .tm-status.refund_requested { background: #fff5da; color: #7e5c16; }
.tm-status.shipped, .tm-status.completed { background: #e8f3ea; color: var(--ok); }
.tm-status.deleted, .tm-status.cancelled { background: #f7e7e7; color: var(--danger); }
.tm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 6px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.tm-small { font-size: 12px; color: var(--muted); }
.flash { padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.flash-success { border-color: #b7d7be; background: #edf8ef; }
.flash-error { border-color: #e7b1b1; background: #fff0f0; }
.tm-login { max-width: 460px; margin: 40px auto; }
.tm-order-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; align-items: start; }
.tm-kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 14px; }
.tm-kv dt { color: var(--muted); }
.tm-kv dd { margin: 0; font-weight: 650; }
.tm-event { border-left: 3px solid var(--gold); padding: 10px 0 10px 12px; margin-bottom: 10px; }
.tm-scan-box { min-height: 320px; background: #0f1f1c; border-radius: 18px; overflow: hidden; display: grid; place-items: center; color: #fff; }
.tm-label { width: 100mm; min-height: 150mm; padding: 8mm; background: #fff; color: #111; }
.tm-label h1 { font-size: 20px; margin: 0 0 8px; }
.tm-qr-canvas { width: 160px; height: 160px; border: 1px solid #ddd; }
@media print {
    .tm-topbar, .tm-nav, .tm-footer, .no-print { display: none !important; }
    body { background: #fff; }
    .tm-page { padding: 0; margin: 0; }
    .tm-label { box-shadow: none; border: none; }
}
@media (max-width: 900px) {
    .tm-grid, .tm-form-grid, .tm-order-layout { grid-template-columns: 1fr; }
    .tm-menu-toggle { display: inline-flex; }
    .tm-nav { display: none; position: static; flex-direction: column; align-items: stretch; padding: 12px; }
    .tm-nav.is-open { display: flex; }
    .tm-nav-spacer { display: none; }
    .tm-page { padding: 16px; }
    .tm-kv { grid-template-columns: 1fr; }
}
.tm-sync-settings {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px auto minmax(220px, 1fr);
    gap: 12px;
    align-items: end;
    padding: 14px;
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fafbf8;
}
.tm-checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.tm-checkline input {
    width: auto;
}
.tm-sync-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 16px;
    align-items: start;
}
.tm-sync-result {
    white-space: pre-line;
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 13px;
    border: 1px solid var(--line);
    background: #fff;
}
.tm-sync-result.is-ok {
    border-color: #b7d7be;
    background: #edf8ef;
}
.tm-sync-result.is-error {
    border-color: #e7b1b1;
    background: #fff0f0;
}
.tm-status.ok { background: #e8f3ea; color: var(--ok); }
.tm-status.error { background: #f7e7e7; color: var(--danger); }
@media (max-width: 900px) {
    .tm-sync-settings,
    .tm-sync-grid {
        grid-template-columns: 1fr;
    }
}

/* /css/layout.css - mobiele orderafhandeling */

/* Basis: voorkom horizontaal schuiven door brede elementen */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
canvas,
video {
    max-width: 100%;
    height: auto;
}

/* Actieknoppen blijven bruikbaar op mobiel */
.tm-actions {
    min-width: 0;
}

.tm-actions .tm-btn,
.tm-actions button.tm-btn {
    white-space: nowrap;
}

/* Desktop behoudt bestaande layout */
.tm-nav {
    transition: transform .18s ease, opacity .18s ease;
}

/* Mobiel / tablet */
@media (max-width: 900px) {
    body.tm-menu-open {
        overflow: hidden;
    }

    .tm-topbar {
        height: 64px;
        padding: 0 14px;
        gap: 10px;
    }

    .tm-brand {
        min-width: 0;
        max-width: calc(100% - 58px);
    }

    .tm-brand-logo {
        height: 36px !important;
        max-width: 130px !important;
    }

    .tm-brand-copy {
        min-width: 0;
    }

    .tm-brand-text {
        font-size: .85rem !important;
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tm-brand-titel {
        display: none !important;
    }

    .tm-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,.35);
        background: rgba(255,255,255,.12);
        color: #fff;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        margin-left: auto;
    }

    .tm-menu-toggle.is-active {
        background: rgba(255,255,255,.24);
    }

    .tm-nav {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        padding: 14px;
        background: #ffffff;
        border-bottom: 0;
        box-shadow: 0 22px 50px rgba(0,0,0,.18);
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tm-nav.is-open {
        display: flex;
    }

    .tm-nav a,
    .tm-user-pill {
        width: 100%;
        min-height: 48px;
        justify-content: flex-start;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        font-size: 15px;
    }

    .tm-nav a:hover {
        background: #eef4ef;
    }

    .tm-user-pill {
        order: 98;
        background: #f2eee2;
    }

    .tm-nav a[href="/logout.php"] {
        order: 99;
        background: #fff5f5;
        color: var(--danger);
        border-color: #eed0d0;
    }

    .tm-nav-spacer {
        display: none !important;
    }

    .tm-page {
        width: 100%;
        max-width: 100%;
        padding: 12px;
    }

    .tm-hero,
    .tm-panel,
    .tm-card {
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 14px;
    }

    .tm-hero h1,
    .tm-panel h1 {
        font-size: 20px;
        line-height: 1.15;
    }

    .tm-panel h2 {
        font-size: 20px;
    }

    .tm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .tm-card {
        min-height: 86px;
    }

    .tm-card strong {
        font-size: 24px;
    }

    .tm-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tm-form-grid p {
        margin: 0;
    }

    input,
    select,
    textarea,
    .tm-btn,
    button.tm-btn {
        min-height: 46px;
        font-size: 16px;
    }

    .tm-actions {
        width: 100%;
        gap: 8px;
    }

    .tm-actions[style] {
        justify-content: flex-start !important;
    }

    .tm-actions .tm-btn,
    .tm-actions button.tm-btn {
        flex: 1 1 auto;
    }

    .tm-order-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tm-kv {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .tm-kv dt {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .tm-kv dd {
        margin-bottom: 10px;
    }

    .tm-sync-settings,
    .tm-sync-grid {
        grid-template-columns: 1fr !important;
    }

    .tm-checkline {
        align-items: flex-start;
    }

    .tm-checkline input {
        margin-top: 4px;
    }

    .tm-footer {
        padding: 18px 12px;
    }
}

/* Mobiele tabellen: geen layout breken */
@media (max-width: 760px) {
    .tm-table-wrap {
        overflow-x: visible;
        border-radius: 16px;
        border: 0;
        background: transparent;
    }

    .tm-table-wrap table,
    .tm-table-wrap thead,
    .tm-table-wrap tbody,
    .tm-table-wrap th,
    .tm-table-wrap td,
    .tm-table-wrap tr {
        display: block;
        width: 100%;
    }

    .tm-table-wrap thead {
        display: none;
    }

    .tm-table-wrap tr {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 16px;
        margin-bottom: 12px;
        padding: 10px 12px;
        box-shadow: 0 8px 24px rgba(13, 59, 58, .06);
    }

    .tm-table-wrap td {
        border-bottom: 1px solid #edf1eb;
        padding: 9px 0;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .tm-table-wrap td:last-child {
        border-bottom: 0;
    }

    .tm-table-wrap td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .tm-status {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .tm-label {
        width: 100%;
        min-height: auto;
        padding: 16px;
        border-radius: 16px;
    }

    .tm-qr-box {
        width: 100% !important;
        max-width: 260px;
        min-height: 220px;
    }
}

/* Kleine telefoons */
@media (max-width: 520px) {
    .tm-page {
        padding: 10px;
    }

    .tm-grid {
        grid-template-columns: 1fr;
    }

    .tm-hero,
    .tm-panel {
        padding: 14px;
    }

    .tm-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tm-actions .tm-btn,
    .tm-actions button.tm-btn,
    .tm-btn,
    button.tm-btn {
        width: 100%;
    }

    .tm-login {
        margin: 18px 0;
        max-width: none;
    }

    .tm-small {
        font-size: 12px;
    }
}

/* Print blijft schoon */
@media print {
    body {
        overflow: visible;
    }

    .tm-nav {
        display: none !important;
    }
}

    .tm-packlist-header {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem;
        align-items: start;
    }

    .tm-packlist-meta {
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: .35rem .75rem;
        margin-top: 1rem;
        font-size: .95rem;
    }

    .tm-packlist-meta dt {
        font-weight: 700;
        color: rgba(17, 24, 39, .72);
    }

    .tm-packlist-meta dd {
        margin: 0;
    }

    .tm-packlist {
        margin-top: 1rem;
        border: 1px solid rgba(0, 0, 0, .12);
        border-radius: 12px;
        overflow: hidden;
        background: #ffffff;
    }

    .tm-packlist-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 70px 115px 78px 92px;
        gap: .65rem;
        align-items: center;
        padding: .58rem .7rem;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
    }

    .tm-packlist-row:last-child {
        border-bottom: 0;
    }

    .tm-packlist-head {
        background: rgba(0, 0, 0, .035);
        font-size: .74rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: rgba(17, 24, 39, .62);
    }

    .tm-pack-product {
        font-weight: 700;
        line-height: 1.35;
    }

    .tm-pack-qty {
        font-weight: 900;
        font-size: 1rem;
        white-space: nowrap;
    }

    .tm-pack-location {
        font-size: .9rem;
        color: rgba(17, 24, 39, .72);
    }

    .tm-pack-status {
        display: flex;
        justify-content: center;
    }

    .tm-pack-check {
        display: inline-flex;
        width: 22px;
        height: 22px;
        align-items: center;
        justify-content: center;
        border: 1.7px solid #111827;
        border-radius: 4px;
        background: #ffffff;
        font-size: 15px;
        line-height: 1;
        font-weight: 900;
        cursor: pointer;
        user-select: none;
    }

    .tm-pack-check input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .tm-pack-check span {
        opacity: 0;
        transform: translateY(-1px);
    }

    .tm-pack-check input:checked + span {
        opacity: 1;
    }

    .tm-pack-check.ok input:checked + span {
        color: #155858;
    }

    .tm-pack-check.no input:checked + span {
        color: #b42318;
    }

    .tm-packlist-row.is-saving {
        opacity: .55;
    }

    .tm-pack-empty {
        padding: 1rem;
        color: rgba(17, 24, 39, .68);
    }

    .tm-pack-final {
        margin-top: 1rem;
        padding: 1rem;
        border: 1px solid rgba(0, 0, 0, .12);
        border-radius: 12px;
        background: rgba(0, 0, 0, .025);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .tm-pack-final-text {
        font-weight: 700;
        color: rgba(17, 24, 39, .72);
    }

    .tm-pack-final-btn {
        border: 0;
        border-radius: 10px;
        padding: .8rem 1rem;
        font-weight: 900;
        cursor: pointer;
        background: #b42318;
        color: #ffffff;
        min-width: 160px;
    }

    .tm-pack-final-btn.is-complete {
        background: var(--lime);
    }

    @media (max-width: 720px) {
        .tm-packlist-header {
            grid-template-columns: 1fr;
        }

        .tm-packlist-meta {
            grid-template-columns: 1fr;
            gap: .15rem;
            font-size: .92rem;
        }

        .tm-packlist-meta dt {
            margin-top: .55rem;
        }

        .tm-packlist-head {
            display: none;
        }

        .tm-packlist-row {
            grid-template-columns: minmax(0, 1fr) 42px 28px 28px;
            gap: .38rem;
            padding: .55rem .5rem;
        }

        .tm-pack-location {
            display: none;
        }

        .tm-pack-product {
            font-size: .88rem;
        }

        .tm-pack-qty {
            font-size: .9rem;
            text-align: center;
        }

        .tm-pack-check {
            width: 20px;
            height: 20px;
            font-size: 14px;
        }

        .tm-pack-final {
            display: block;
        }

        .tm-pack-final-btn {
            width: 100%;
            margin-top: .75rem;
        }
    }

    @media print {
        .tm-topbar,
        .tm-nav,
        .tm-footer,
        .no-print {
            display: none !important;
        }

        body {
            background: #ffffff !important;
            color: #000000 !important;
        }

        .tm-page {
            max-width: none !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        .tm-panel {
            box-shadow: none !important;
            border: 0 !important;
            padding: 0 !important;
        }

        .tm-packlist {
            border: 1px solid #000000;
        }

        .tm-packlist-row {
            border-bottom: 1px solid #000000;
        }

        .tm-pack-check {
            width: 20px;
            height: 20px;
            border: 2px solid #000000;
        }
    }
		
		    .tm-order-status-list {
        margin-top: 1rem;
        border: 1px solid rgba(0, 0, 0, .12);
        border-radius: 12px;
        overflow: hidden;
        background: #ffffff;
    }

    .tm-order-status-row {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr) 140px 150px 130px;
        gap: .75rem;
        align-items: center;
        padding: .75rem;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
    }

    .tm-order-status-row:last-child {
        border-bottom: 0;
    }

    .tm-order-status-head {
        background: rgba(0, 0, 0, .035);
        font-size: .76rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: rgba(17, 24, 39, .62);
    }

    .tm-status-danger {
        display: inline-block;
        border-radius: 999px;
        padding: .28rem .55rem;
        background: rgba(180, 35, 24, .12);
        color: #b42318;
        font-weight: 800;
        font-size: .82rem;
    }

    @media (max-width: 760px) {
        .tm-order-status-head {
            display: none;
        }

        .tm-order-status-row {
            grid-template-columns: 1fr;
            gap: .25rem;
        }
    }
		
		    .tm-order-status-list {
        margin-top: 1rem;
        border: 1px solid rgba(0, 0, 0, .12);
        border-radius: 12px;
        overflow: hidden;
        background: #ffffff;
    }

    .tm-order-status-row {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr) 140px 150px 130px;
        gap: .75rem;
        align-items: center;
        padding: .75rem;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
    }

    .tm-order-status-row:last-child {
        border-bottom: 0;
    }

    .tm-order-status-head {
        background: rgba(0, 0, 0, .035);
        font-size: .76rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: rgba(17, 24, 39, .62);
    }

    .tm-status-success {
        display: inline-block;
        border-radius: 999px;
        padding: .28rem .55rem;
        background: rgba(21, 88, 88, .12);
        color: #155858;
        font-weight: 800;
        font-size: .82rem;
    }

    @media (max-width: 760px) {
        .tm-order-status-head {
            display: none;
        }

        .tm-order-status-row {
            grid-template-columns: 1fr;
            gap: .25rem;
        }
    }
		
		/* /css/layout.css */

/* Order detail pagina */
.tm-order-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.tm-order-hero-main {
    min-width: 0;
}

.tm-order-title {
    margin: 0;
    line-height: 1.15;
    white-space: nowrap;
}

.tm-order-title span {
    white-space: nowrap;
}

.tm-order-subtitle {
    margin-top: .55rem;
}

.tm-order-hero-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.tm-btn.tm-btn-start {
    background: var(--lime) !important;
    border-color: var(--lime) !important;
    color: var(--white) !important;
		margin-bottom: 0.5rem;
}

.tm-btn.tm-btn-start:hover,
.tm-btn.tm-btn-start:focus {
    background: var(--lime-dark) !important;
    border-color: var(--lime-dark) !important;
    filter: brightness(.96);
}

.tm-order-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.25rem;
    align-items: start;
}

.tm-order-main,
.tm-order-side {
    min-width: 0;
}

.tm-order-side {
    display: grid;
    gap: 1rem;
}

.tm-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.tm-section-head h2 {
    margin: 0;
}

.tm-order-kv {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: .55rem 1rem;
    margin-top: 1rem;
}

.tm-order-kv dt {
    font-weight: 800;
    color: rgba(17, 24, 39, .68);
}

.tm-order-kv dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.tm-check-line {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.tm-check-line input {
    width: auto;
}

.tm-status {
    display: inline-block;
    border-radius: 999px;
    padding: .28rem .55rem;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.tm-status-gray {
    background: rgba(107, 114, 128, .14);
    color: #374151;
}

.tm-status-blue {
    background: rgba(0, 63, 127, .12);
    color: #003f7f;
}

.tm-status-green {
    background: rgba(21, 88, 88, .13);
    color: #155858;
}

.tm-status-red {
    background: rgba(180, 35, 24, .12);
    color: #b42318;
}

.tm-status-yellow {
    background: rgba(180, 83, 9, .14);
    color: #92400e;
}

@media (max-width: 900px) {
    .tm-order-page-grid {
        grid-template-columns: 1fr;
    }

    .tm-order-side {
        display: block;
    }
}

@media (max-width: 760px) {
    .tm-order-hero {
        display: block;
    }

    .tm-order-title {
        font-size: clamp(.92rem, 4.35vw, 1.18rem);
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tm-order-subtitle {
        font-size: .86rem;
    }

    .tm-order-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
        margin-top: .85rem;
    }

    .tm-order-hero-actions .tm-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: .62rem .7rem;
    }

    .tm-section-head {
        display: block;
    }

    .tm-section-head .tm-status {
        margin-top: .55rem;
    }

    .tm-order-kv {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    .tm-order-kv dt {
        margin-top: .65rem;
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .tm-order-products-table thead {
        display: none;
    }

    .tm-order-products-table,
    .tm-order-products-table tbody,
    .tm-order-products-table tr,
    .tm-order-products-table td {
        display: block;
        width: 100%;
    }

    .tm-order-products-table tr {
        border: 1px solid rgba(17, 24, 39, .12);
        border-radius: 12px;
        padding: .65rem;
        margin-bottom: .65rem;
        background: #ffffff;
    }

    .tm-order-products-table td {
        display: grid;
        grid-template-columns: 82px minmax(0, 1fr);
        gap: .5rem;
        border: 0;
        padding: .25rem 0;
    }

    .tm-order-products-table td::before {
        content: attr(data-label);
        font-size: .72rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: rgba(17, 24, 39, .55);
    }
}

/* Gebruikers en rollen */
.tm-admin-notice {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 10px;
    font-weight: 700;
}

.tm-admin-notice.success {
    background: rgba(21, 88, 88, .12);
    color: #155858;
}

.tm-admin-notice.error {
    background: rgba(180, 35, 24, .12);
    color: #b42318;
}

.tm-admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
    align-items: end;
}

.tm-admin-form-grid p {
    margin: 0;
}

.tm-admin-full {
    grid-column: 1 / -1;
}

.tm-admin-check-line {
    display: flex;
    align-items: center;
    min-height: 42px;
}

.tm-admin-check-line label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 700;
}

.tm-admin-check-line input,
.tm-permission-grid input {
    width: auto;
}

.tm-admin-form-actions {
    margin-top: 1rem;
}

.tm-admin-list {
    display: grid;
    gap: .75rem;
}

.tm-admin-list-row,
.tm-role-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) repeat(5, minmax(120px, 1fr)) auto;
    gap: .65rem;
    align-items: end;
    padding: .85rem;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 12px;
    background: #ffffff;
}

.tm-admin-list-row p,
.tm-role-card p {
    margin: 0;
}

.tm-admin-user-title {
    min-width: 0;
}

.tm-admin-user-title strong,
.tm-admin-user-title span {
    display: block;
}

.tm-admin-row-actions {
    display: flex;
    justify-content: flex-end;
}

.tm-admin-delete-form {
    display: flex;
    justify-content: flex-end;
    margin-top: -.5rem;
    padding: 0 .85rem .85rem;
}

.tm-role-list {
    display: grid;
    gap: 1rem;
}

.tm-role-card {
    display: block;
}

.tm-role-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.tm-role-card-head strong,
.tm-role-card-head span {
    display: block;
}

.tm-permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
}

.tm-permission-grid label {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    padding: .65rem;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .75);
}

.tm-permission-grid strong,
.tm-permission-grid em {
    display: block;
}

.tm-permission-grid em {
    margin-top: .15rem;
    font-size: .78rem;
    color: rgba(17, 24, 39, .62);
    font-style: normal;
}

@media (max-width: 1100px) {
    .tm-admin-list-row {
        grid-template-columns: 1fr 1fr;
    }

    .tm-permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tm-admin-form-grid,
    .tm-admin-list-row,
    .tm-permission-grid {
        grid-template-columns: 1fr;
    }

    .tm-admin-row-actions,
    .tm-admin-delete-form {
        justify-content: stretch;
    }

    .tm-admin-row-actions .tm-btn,
    .tm-admin-delete-form .tm-btn,
    .tm-admin-form-actions .tm-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Orders - row action buttons en printmodals */
.tm-order-row-actions {
    display: flex;
    gap: .4rem;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

.tm-btn.tm-btn-lime {
    background: var(--lime, #b7d939);
    border-color: var(--lime, #b7d939);
    color: #102020;
		margin-bottom: 0.5rem;
}

.tm-btn.tm-btn-lime:hover,
.tm-btn.tm-btn-lime:focus {
    background: var(--lime, #b7d939);
    border-color: var(--lime, #b7d939);
    color: #102020;
    filter: brightness(.96);
}

.tm-icon-btn {
    width: 2.35rem;
    min-width: 2.35rem;
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
}

.tm-icon-btn svg {
    display: block;
    width: 1.55rem;
    height: 1.55rem;
}

.tm-modal-open {
    overflow: hidden;
}

.tm-print-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, .62);
    padding: 1rem;
    overflow: auto;
}

.tm-order-modal {
    width: min(980px, 100%);
    margin: 2rem auto;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .32);
    overflow: hidden;
}

.tm-label-modal {
    width: min(760px, 100%);
}

.tm-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(17, 24, 39, .12);
}

.tm-modal-head h2 {
    margin: 0;
}

.tm-modal-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.tm-modal-body {
    padding: 1rem;
}

.tm-sendcloud-label {
    width: min(100%, 420px);
    min-height: 590px;
    margin: 0 auto;
    padding: .85rem;
    border: 2px solid #111827;
    background: #ffffff;
    color: #111827;
    font-size: .82rem;
}

.tm-label-brand-row,
.tm-packlist-print-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: .6rem;
    margin-bottom: .7rem;
    border-bottom: 2px solid #111827;
}

.tm-label-brand-row strong {
    text-transform: uppercase;
    letter-spacing: .06em;
}

.tm-label-main-grid,
.tm-label-info-grid,
.tm-label-bottom-grid,
.tm-packlist-print-meta {
    display: grid;
    gap: .55rem;
}

.tm-label-main-grid {
    grid-template-columns: 1fr 1fr;
}

.tm-label-info-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: .65rem 0;
    margin: .65rem 0;
    border-top: 1px solid #111827;
    border-bottom: 1px solid #111827;
}

.tm-label-bottom-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: .7rem;
}

.tm-label-block,
.tm-packlist-print-meta > div {
    display: grid;
    gap: .15rem;
    align-content: start;
}

.tm-label-caption {
    display: block;
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(17, 24, 39, .66);
}

.tm-label-warning {
    margin-top: .35rem;
    font-size: .72rem;
    font-weight: 800;
}

.tm-label-barcode-box {
    padding: .7rem;
    border: 1px solid #111827;
    text-align: center;
}

.tm-label-barcode-box strong,
.tm-label-barcode-box span {
    display: block;
}

.tm-barcode-lines {
    height: 64px;
    margin-bottom: .45rem;
    background:
        repeating-linear-gradient(
            90deg,
            #111827 0 2px,
            transparent 2px 5px,
            #111827 5px 7px,
            transparent 7px 11px,
            #111827 11px 14px,
            transparent 14px 18px
        );
}

.tm-sendcloud-check {
    max-width: 640px;
    margin: 1rem auto 0;
    padding: .85rem;
    border-radius: 12px;
    background: rgba(17, 24, 39, .04);
}

.tm-sendcloud-check h3 {
    margin-top: 0;
}

.tm-sendcloud-check ul {
    margin-bottom: 0;
}

.tm-packlist-print {
    color: #111827;
}

.tm-packlist-print-head h2 {
    margin: 0;
}

.tm-packlist-print-meta {
    grid-template-columns: 1fr 1fr;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(17, 24, 39, .2);
}

.tm-packlist-print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tm-packlist-print-table th,
.tm-packlist-print-table td {
    padding: .5rem;
    border-bottom: 1px solid rgba(17, 24, 39, .2);
    text-align: left;
    vertical-align: top;
}

.tm-packlist-print-table th {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

@media (max-width: 760px) {
    .tm-order-row-actions {
        flex-wrap: wrap;
    }

    .tm-print-modal-backdrop {
        padding: .5rem;
    }

    .tm-order-modal {
        margin: .5rem auto;
        border-radius: 12px;
    }

    .tm-modal-head {
        display: block;
    }

    .tm-modal-actions {
        margin-top: .75rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tm-modal-actions .tm-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .tm-label-main-grid,
    .tm-label-info-grid,
    .tm-label-bottom-grid,
    .tm-packlist-print-meta {
        grid-template-columns: 1fr;
    }

    .tm-sendcloud-label {
        min-height: auto;
    }
}

@media print {
    body.tm-modal-printing .tm-topbar,
    body.tm-modal-printing .tm-nav,
    body.tm-modal-printing .tm-footer,
    body.tm-modal-printing .tm-panel,
    body.tm-modal-printing .no-print {
        display: none !important;
    }

    body.tm-modal-printing {
        background: #ffffff !important;
    }

    body.tm-modal-printing .tm-print-modal-backdrop {
        display: block !important;
        position: static !important;
        inset: auto !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
    }

    body.tm-modal-printing .tm-order-modal {
        display: none !important;
    }

    body.tm-modal-printing .tm-order-modal.is-printing {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.tm-modal-printing .tm-modal-body {
        padding: 0 !important;
    }

    body.tm-modal-printing .tm-sendcloud-label {
        width: 100mm !important;
        min-height: 145mm !important;
        margin: 0 auto !important;
        page-break-after: always;
    }

    body.tm-modal-printing .tm-packlist-print {
        width: 100% !important;
        font-size: 11pt;
    }

    body.tm-modal-printing .tm-packlist-print-table th,
    body.tm-modal-printing .tm-packlist-print-table td {
        border-bottom: 1px solid #000000;
    }
}

/* Orders - QR icon vast 42px en printknoppen alleen actief bij complete orders */
.tm-order-row-actions .tm-icon-btn {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 !important;
    line-height: 0;
    overflow: hidden;
    flex: 0 0 42px !important;
}

.tm-order-row-actions .tm-icon-btn svg {
    display: block;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    flex: 0 0 42px;
}

.tm-order-row-actions .tm-btn:disabled,
.tm-order-row-actions .tm-btn.is-disabled {
    background: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: .75;
    filter: none !important;
    pointer-events: none;
}

.tm-order-row-actions .tm-btn:disabled svg,
.tm-order-row-actions .tm-btn.is-disabled svg {
    color: #9ca3af !important;
}

/* /css/layout.php - VMS toevoegingen */

.vms-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.vms-eyebrow {
    margin: 0 0 .45rem;
    color: var(--gold);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.vms-dashboard-grid {
    margin-bottom: 20px;
}

.vms-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px auto;
    gap: 12px;
    align-items: end;
}

.vms-filter p {
    margin: 0;
}

.vms-filter-actions {
    display: flex;
    align-items: end;
}

.vms-two-col {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
}

.vms-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.vms-product-main,
.vms-product-side {
    min-width: 0;
}

.vms-product-side {
    display: grid;
    gap: 16px;
}

.vms-textarea-small {
    min-height: 88px;
}

.vms-textarea-large {
    min-height: 220px;
}

.vms-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .5rem 0;
    font-weight: 750;
}

.vms-check input {
    width: auto;
}

.vms-category-checkboxes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: 1rem;
}

.vms-category-checkboxes label {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
}

.vms-category-checkboxes input {
    width: auto;
    margin-top: .2rem;
}

.vms-thumb {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.vms-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.vms-image-card {
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.vms-image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: .55rem;
}

.vms-product-cell {
    display: flex;
    gap: .7rem;
    align-items: center;
    min-width: 0;
}

.vms-stock-form {
    display: grid;
    grid-template-columns: 90px 90px minmax(120px, 1fr) auto;
    gap: .45rem;
    align-items: center;
}

.vms-stock-form input {
    min-width: 0;
}

.vms-low-stock-row {
    background: #fff9e8;
}

@media (max-width: 1100px) {
    .vms-product-layout,
    .vms-two-col {
        grid-template-columns: 1fr;
    }

    .vms-product-side {
        display: block;
    }

    .vms-category-checkboxes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .vms-hero {
        display: block;
    }

    .vms-hero .tm-actions {
        margin-top: 1rem;
    }

    .vms-filter {
        grid-template-columns: 1fr;
    }

    .vms-stock-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .vms-category-checkboxes,
    .vms-image-grid {
        grid-template-columns: 1fr;
    }

    .vms-product-cell {
        align-items: flex-start;
    }
}

/* /css/layout.php - VMS producten bewerken toevoegingen */

.vms-price-input {
    max-width: 130px;
    min-width: 110px;
}

.vms-price-input.is-saving {
    opacity: .65;
}

.vms-ajax-status {
    display: inline-block;
    margin-top: .3rem;
}

.vms-ajax-status.is-saving {
    color: var(--warning);
    font-weight: 800;
}

.vms-ajax-status.is-saved {
    color: var(--ok);
    font-weight: 800;
}

.vms-ajax-status.is-error {
    color: var(--danger);
    font-weight: 800;
}

@media (max-width: 760px) {
    .vms-price-input {
        max-width: none;
        width: 100%;
    }
}
/* /css/layout.php - VMS QR-code uitbreiding */
.vms-qr-link-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 1rem 0;
}
.vms-qr-link-form p { margin: 0; }
.vms-qr-code-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92rem;
    word-break: break-all;
}
.vms-qr-public-panel {
    max-width: 760px;
    margin: 40px auto;
}
.vms-qr-public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 1rem;
    align-items: center;
}
.vms-qr-public-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    padding: 8px;
}
@media (max-width: 760px) {
    .vms-qr-link-form,
    .vms-qr-public-hero {
        grid-template-columns: 1fr;
    }
    .vms-qr-public-image {
        width: 100%;
        max-width: 220px;
        height: auto;
    }
}
/* /css/layout.php - VMS QR tweetalig + SVG download */
.vms-qr-download-btn {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .vms-qr-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* /css/layout.php - VMS QR scan koppeling */
.vms-qr-cell {
    display: grid;
    gap: .45rem;
    min-width: 128px;
}

.vms-qr-linked-preview {
    display: inline-grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .45rem;
    align-items: center;
    max-width: 230px;
}

.vms-qr-linked-preview img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.vms-qr-linked-preview span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.25;
}

.vms-qr-empty {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.vms-qr-scan-btn {
    width: fit-content;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.vms-qr-modal-open {
    overflow: hidden;
}

.vms-qr-scan-modal[hidden] {
    display: none !important;
}

.vms-qr-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 16px;
}

.vms-qr-scan-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .68);
}

.vms-qr-scan-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(92vh, 860px);
    overflow: auto;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 28px 90px rgba(0,0,0,.35);
}

.vms-qr-scan-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.vms-qr-scan-head h2 {
    margin: 0;
}

.vms-qr-scan-body {
    padding: 18px;
}

.vms-qr-camera-box {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-height: 340px;
    border-radius: 18px;
    background: #0f1f1c;
    border: 1px solid rgba(255,255,255,.12);
}

.vms-qr-camera-box video {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
}

.vms-qr-scan-frame {
    position: absolute;
    width: min(62vw, 260px);
    height: min(62vw, 260px);
    border: 3px solid rgba(255,255,255,.92);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0,0,0,.22);
    pointer-events: none;
}

.vms-qr-scan-result {
    margin: .85rem 0;
    padding: .75rem .85rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fafbf8;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.vms-qr-scan-result.is-ok {
    border-color: #b7d7be;
    background: #edf8ef;
    color: var(--ok);
}

.vms-qr-scan-result.is-error {
    border-color: #e7b1b1;
    background: #fff0f0;
    color: var(--danger);
}

.vms-qr-scan-result.is-info {
    border-color: #bdd4ef;
    background: #eff6ff;
    color: var(--blue-dark);
}

.vms-product-qr-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .85rem;
    margin-top: 1rem;
}

.vms-product-qr-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .85rem;
    background: #fff;
}

.vms-product-qr-card img {
    display: block;
    width: 118px;
    height: 118px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    margin-bottom: .65rem;
}

.vms-product-qr-card code {
    display: block;
    overflow-wrap: anywhere;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: .65rem;
}

@media (max-width: 760px) {
    .vms-qr-scan-modal {
        padding: 8px;
        align-items: stretch;
    }

    .vms-qr-scan-dialog {
        width: 100%;
        max-height: 96vh;
        border-radius: 16px;
    }

    .vms-qr-scan-head {
        display: block;
    }

    .vms-qr-scan-head .tm-btn {
        width: 100%;
        margin-top: .75rem;
    }

    .vms-qr-camera-box,
    .vms-qr-camera-box video {
        min-height: 280px;
    }
}

/* /css/layout.php - VMS voorraad QR-scan modal */
.vms-stock-qr-modal[hidden] {
    display: none !important;
}

.vms-stock-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.vms-stock-qr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .66);
}

.vms-stock-qr-dialog {
    position: relative;
    width: min(980px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    margin: 12px auto;
    overflow: auto;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .36);
}

.vms-stock-qr-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.vms-stock-qr-head h2 {
    margin: .15rem 0 .3rem;
}

.vms-stock-qr-body {
    padding: 1rem;
}

.vms-stock-qr-camera-box {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 260px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f1f1c;
}

.vms-stock-qr-camera-box video {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.vms-stock-qr-scan-frame {
    position: absolute;
    width: min(58vw, 260px);
    height: min(58vw, 260px);
    border: 3px solid rgba(255, 255, 255, .88);
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .22);
    pointer-events: none;
}

.vms-stock-qr-manual {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: end;
    margin-top: 1rem;
}

.vms-stock-qr-manual p {
    margin: 0;
}

.vms-stock-qr-message {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    font-weight: 700;
}

.vms-stock-qr-message.is-ok {
    border-color: #b7d7be;
    background: #edf8ef;
    color: var(--ok);
}

.vms-stock-qr-message.is-error {
    border-color: #e7b1b1;
    background: #fff0f0;
    color: var(--danger);
}

.vms-stock-qr-message.is-info {
    border-color: #b7cce5;
    background: #f1f7ff;
    color: var(--blue-dark);
}

.vms-stock-qr-result {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.vms-stock-qr-product {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fafbf8;
}

.vms-stock-qr-image {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    overflow: hidden;
}

.vms-stock-qr-image:empty::before {
    content: 'Geen foto';
    color: var(--muted);
    font-size: 12px;
}

.vms-stock-qr-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vms-stock-qr-product h3 {
    margin: 0 0 .25rem;
}

.vms-stock-qr-numbers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.vms-stock-qr-numbers > div,
.vms-stock-qr-action-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    padding: .85rem;
}

.vms-stock-qr-numbers span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.vms-stock-qr-numbers strong {
    display: block;
    margin-top: .25rem;
    font-size: 1.55rem;
}

.vms-stock-qr-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.vms-stock-qr-action-card h3 {
    margin-top: 0;
}

.vms-stock-qr-action-card .tm-btn {
    width: 100%;
    margin-top: .75rem;
}

body.vms-stock-qr-modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .vms-stock-qr-dialog {
        width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .vms-stock-qr-head {
        display: block;
    }

    .vms-stock-qr-head .tm-btn {
        margin-top: .75rem;
        width: 100%;
    }

    .vms-stock-qr-camera-box {
        min-height: 230px;
    }

    .vms-stock-qr-manual,
    .vms-stock-qr-product,
    .vms-stock-qr-actions-grid {
        grid-template-columns: 1fr;
    }

    .vms-stock-qr-numbers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .vms-stock-qr-numbers {
        grid-template-columns: 1fr;
    }
}

/* /css/layout.php - VMS product basisgegevens QR groter */
.vms-basic-qr {
    min-width: 430px;
    max-width: 560px;
}

.vms-qr-linked-preview-compact {
    grid-template-columns: 162px minmax(0, 1fr);
    gap: 1rem;
}

.vms-qr-linked-preview-compact img {
    width: 162px;
    height: 162px;
    padding: 6px;
    border-radius: 14px;
}

.vms-qr-linked-preview-compact span {
    font-size: .95rem;
    line-height: 1.45;
		width: 22rem;
}

@media (max-width: 760px) {
    .vms-basic-qr {
        min-width: 0;
        max-width: none;
    }

    .vms-qr-linked-preview-compact {
        grid-template-columns: 1fr;
    }

    .vms-qr-linked-preview-compact img {
        width: 162px;
        height: 162px;
    }
}

/* /css/layout.php - users reorganisatie */
.tm-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tm-panel-head h1,
.tm-panel-head h2,
.tm-panel-head p {
    margin-top: 0;
}

.tm-block-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .5rem 0 0 auto;
}

.tm-block-actions .tm-btn,
.tm-block-actions button.tm-btn {
    margin: 0;
}

.tm-admin-clean-form p {
    margin: 0;
}

.tm-user-card-list,
.tm-role-card-list {
    display: grid;
    gap: 1rem;
}

.tm-user-card,
.tm-role-block {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(13, 59, 58, .06);
}

.tm-user-card.is-blocked {
    border-color: rgba(157, 47, 47, .28);
    background: #fffafa;
}

.tm-user-card-head,
.tm-role-card-head,
.tm-user-subcard-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tm-user-card-actions {
    flex-shrink: 0;
}

.tm-user-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
    gap: 1rem;
    align-items: start;
}

.tm-user-subcard {
    border: 1px solid rgba(17, 24, 39, .1);
    border-radius: 14px;
    padding: 1rem;
    background: rgba(250, 251, 248, .85);
}

.tm-user-subcard h3,
.tm-role-block h3 {
    margin: 0 0 .85rem;
}

.tm-user-subcard-head h3 {
    margin-bottom: 0;
}

.tm-user-subcard form + form {
    margin-top: 0;
}

.tm-btn:disabled,
button.tm-btn:disabled {
    background: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: .75;
}

@media (max-width: 1100px) {
    .tm-user-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tm-panel-head,
    .tm-user-card-head,
    .tm-role-card-head,
    .tm-user-subcard-head {
        display: block;
    }

    .tm-block-actions,
    .tm-user-card-actions {
        justify-content: stretch;
        width: 100%;
        margin-top: .5rem;
    }

    .tm-block-actions .tm-btn,
    .tm-block-actions button.tm-btn {
        width: 100%;
        justify-content: center;
    }

    .tm-user-card,
    .tm-role-block,
    .tm-user-subcard {
        padding: .85rem;
        border-radius: 14px;
    }
}

/* /css/layout.php - packlist statuskolommen en mobiele labels */
.tm-packlist-row {
    grid-template-columns: minmax(0, 1fr) 70px 115px 112px 124px;
}

.tm-pack-head-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-width: 0;
    white-space: nowrap;
}

.tm-pack-head-status > span {
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.tm-pack-check-legend {
    opacity: .55;
    cursor: default;
}

.tm-pack-mobile-label {
    display: none;
}

.tm-pack-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-width: 0;
}

@media (max-width: 720px) {
    .tm-packlist-row {
        grid-template-columns: minmax(0, 1fr) 48px minmax(96px, auto) minmax(112px, auto);
        align-items: center;
    }

    .tm-packlist-head {
        display: none !important;
    }

    .tm-pack-status {
        justify-content: flex-end;
        gap: .35rem;
    }

    .tm-pack-mobile-label {
        display: inline-block;
        font-size: .68rem;
        font-weight: 900;
        line-height: 1.1;
        color: rgba(17, 24, 39, .62);
        text-transform: uppercase;
        letter-spacing: .04em;
        white-space: nowrap;
    }

    .tm-pack-product {
        min-width: 0;
    }

    .tm-pack-qty {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .tm-packlist-row {
        grid-template-columns: minmax(0, 1fr) 42px 1fr 1fr;
    }

    .tm-pack-status {
        display: grid;
        justify-items: center;
        gap: .18rem;
    }

    .tm-pack-mobile-label {
        display: block;
        margin-bottom: .18rem;
        text-align: center;
        white-space: normal;
    }
}

/* /css/layout.php - packlist header herstel */
.tm-packlist-head .tm-pack-status {
    justify-content: center;
}

.tm-pack-check-legend {
    cursor: default;
    pointer-events: none;
}

.tm-pack-check-legend input {
    cursor: default;
}

/* /css/layout.php - order QR sticker knop */
.tm-btn-order-qr-label {
    gap: .55rem;
    background: #2e7042 !important;
    border-color: #2e7042 !important;
    color: #ffffff !important;
    min-height: 54px;
    padding: .7rem 1rem !important;
    font-weight: 900;
}

.tm-btn-order-qr-label:hover,
.tm-btn-order-qr-label:focus {
    background: #245a35 !important;
    border-color: #245a35 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.tm-order-qr-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #ffffff;
    color: #2e7042;
    flex: 0 0 34px;
}

.tm-order-qr-button-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@media (max-width: 760px) {
    .tm-order-hero-actions {
        grid-template-columns: 1fr !important;
    }

    .tm-btn-order-qr-label {
        width: 100%;
        justify-content: center;
    }
}

.tm-btn-icon{
	 padding: 6px 14px;
}


/* /css/layout.php - Send Control */

.tm-send-control-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.tm-send-control-panel-head .tm-actions {
    justify-content: flex-end;
    margin-top: .5rem;
}

.tm-vms-kicker {
    margin: 0 0 .35rem;
    color: var(--gold);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tm-send-batch-grid {
    display: grid;
    gap: .75rem;
}

.tm-send-batch-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    background: #ffffff;
}

.tm-send-batch-card strong,
.tm-send-batch-card span {
    display: block;
}

.tm-send-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    padding: 1rem;
    background: rgba(15, 23, 42, .62);
    overflow: auto;
}

.tm-send-scan-card {
    width: min(720px, 100%);
    margin: 2rem auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .32);
    padding: 1rem;
}

.tm-send-scan-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tm-send-scan-head h2 {
    margin: 0;
}

.tm-send-scan-video-wrap {
    display: grid;
    gap: .65rem;
    margin-bottom: 1rem;
}

#scScanVideo {
    display: block;
    width: 100%;
    max-height: 55vh;
    border-radius: 16px;
    background: #0f1f1c;
    object-fit: cover;
}

@media (max-width: 760px) {
    .tm-send-control-panel-head,
    .tm-send-batch-card,
    .tm-send-scan-head {
        display: block;
    }

    .tm-send-control-panel-head .tm-actions,
    .tm-send-batch-card .tm-actions {
        margin-top: .75rem;
        justify-content: stretch;
    }

    .tm-send-control-panel-head .tm-actions .tm-btn,
    .tm-send-batch-card .tm-actions .tm-btn {
        width: 100%;
    }

    .tm-send-scan-card {
        margin: .5rem auto;
        border-radius: 14px;
    }
}

/* /css/layout.php - wachtwoord oogje */
.tm-password-field {
    position: relative;
    display: block;
}

.tm-password-field input {
    padding-right: 3.25rem;
}

.tm-password-toggle {
    position: absolute;
    top: 50%;
    right: .45rem;
    transform: translateY(-50%);
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px #e8f0fe;
    border-radius: 10px;
    background: #e8f0fe;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}

.tm-password-toggle:hover,
.tm-password-toggle:focus {
    color: var(--blue);
    border-color: var(--blue);
    outline: none;
}

.tm-password-toggle svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}

.tm-password-toggle .tm-eye-closed {
    display: none;
}

.tm-password-toggle.is-visible .tm-eye-open {
    display: none;
}

.tm-password-toggle.is-visible .tm-eye-closed {
    display: block;
}

/* /css/layout.php - retourtraject */
.tm-return-link-box {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.tm-return-link-box input {
    width: 100%;
    font-weight: 700;
}

.tm-return-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.tm-return-summary-grid > div,
.tm-return-conditions {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 1rem;
}

.tm-return-summary-grid span,
.tm-return-summary-grid strong {
    display: block;
}

.tm-return-conditions ul {
    margin: .75rem 0 0;
    padding-left: 1.2rem;
}

.tm-return-table input,
.tm-return-table select {
    min-width: 7rem;
}

.tm-return-actions,
.tm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1rem;
}

.tm-return-checkboxes {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
}

.tm-return-checkboxes label {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.tm-return-checkboxes input {
    margin-top: .2rem;
}

@media (max-width: 900px) {
    .tm-return-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* /css/layout.php - ordernummer button in orders.php */
.tm-order-number-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 0;
    white-space: nowrap;
    text-decoration: none;
}

.tm-btn.tm-btn-white {
    background: #ffffff;
    border-color: var(--line, #dfe7e2);
    color: var(--blue, #1473d1);
    margin-bottom: 0.5rem;
}

.tm-btn.tm-btn-white:hover,
.tm-btn.tm-btn-white:focus {
    background: #ffffff;
    border-color: var(--blue, #1473d1);
    color: var(--blue, #1473d1);
}

/* /css/layout.php - VMS snelle hoofdfoto upload in products_edit.php */
.vms-inline-photo-upload {
    margin: 0;
}

.vms-image-upload-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;
}

.vms-image-upload-btn svg {
    width: 26px;
    height: 26px;
    display: block;
}

.vms-file-input-hidden {
    display: none;
}

/* /css/layout.php - WMS landentabel */
.wms-country-table td,
.wms-country-table th {
    vertical-align: middle;
}

.wms-country-table .tm-btn {
    white-space: nowrap;
}

.wms-country-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.wms-country-actions form {
    margin: 0;
    flex: 0 0 auto;
}

.wms-country-location-select {
    min-width: 260px;
}

.wms-country-rate-input {
    width: 105px;
    min-width: 105px;
    text-align: right;
}

.wms-country-table-wrap {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .wms-country-actions {
        flex-wrap: wrap;
    }

    .wms-country-location-select {
        min-width: 220px;
    }
}

/* /css/layout.php - WMS landentabel */
.wms-country-table td,
.wms-country-table th {
    vertical-align: middle;
}

.wms-country-table .tm-btn {
    white-space: nowrap;
}

.wms-country-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.wms-country-actions form {
    margin: 0;
    flex: 0 0 auto;
}

.wms-country-location-select {
    min-width: 260px;
}

.wms-country-rate-input {
    width: 105px;
    min-width: 105px;
    text-align: right;
}

.wms-country-table-wrap {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .wms-country-actions {
        flex-wrap: wrap;
    }

    .wms-country-location-select {
        min-width: 220px;
    }
}

/* /css/layout.php - WMS verzendlocaties voorraadregels */
.wms-location-table td,
.wms-location-table th {
    vertical-align: middle;
}

.wms-location-table input {
    margin: 0;
}

.wms-location-name-input {
    min-width: 230px;
}

.wms-location-code-input {
    width: 90px;
    min-width: 90px;
    text-transform: uppercase;
}

.wms-location-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.wms-location-action-form {
    margin: 0;
    flex: 0 0 auto;
}

.wms-location-table-wrap {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .wms-location-actions {
        flex-wrap: wrap;
    }
}
