:root {
    --kleur-geel: #fee31a;
    --kleur-groen: #239e38;
    --kleur-donker: #050505;
    --kleur-donker-2: #0f2413;
    --kleur-donker-3: #0f5a28;
    --kleur-wit: #ffffff;
    --kleur-lichtgrijs: #f8f9fa;
    --kleur-grijs: #6c757d;
    --kleur-rood: #dc3545;
    --kleur-oranje: #fd7e14;
    --kleur-logo-groen: #169337;
    --kleur-logo-groen-diep: #063914;
    --kleur-logo-zwart: #050505;
    --kleur-succes: var(--kleur-groen);
    --kleur-accent: var(--kleur-geel);
    --backend-status-height: 34px;
    --radius: 12px;
    --schaduw: 0 4px 20px rgba(0,0,0,0.15);
    --rand: rgba(26, 26, 46, 0.14);
    --rand-sterk: rgba(26, 26, 46, 0.24);
    --focus: 0 0 0 4px rgba(254, 227, 26, 0.35);
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

html {
    min-height: 100%;
    background: var(--kleur-lichtgrijs);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--kleur-donker);
    background:
        radial-gradient(circle at 18% 0%, rgba(35, 158, 56, 0.18), rgba(35, 158, 56, 0) 310px),
        linear-gradient(180deg, rgba(254, 227, 26, 0.16), rgba(248, 249, 250, 0) 300px),
        var(--kleur-lichtgrijs);
    font-family: "Inter", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

main {
    padding-bottom: var(--backend-status-height);
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

button:not(:disabled) {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

input,
select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--rand);
    border-radius: 10px;
    padding: 0 14px;
    color: var(--kleur-donker);
    background: var(--kleur-wit);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
    border-color: var(--kleur-groen);
    box-shadow: var(--focus);
}

label {
    color: var(--kleur-donker-2);
    font-size: 0.9rem;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--rand);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

th {
    color: var(--kleur-grijs);
    background: var(--kleur-wit);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

tbody tr:nth-child(even) {
    background: var(--kleur-lichtgrijs);
}

tbody tr:hover {
    background: rgba(254, 227, 26, 0.14);
}

.hidden {
    display: none !important;
}

.backend-status {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    min-height: var(--backend-status-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 3px solid var(--kleur-geel);
    color: var(--kleur-wit);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}

.backend-status-local {
    background: var(--kleur-groen);
}

.backend-status-online {
    background: #1463d9;
}

.backend-status-connecting {
    background: var(--kleur-oranje);
}

.screen {
    min-height: 100vh;
}

.message {
    min-height: 22px;
    margin: 12px 0 0;
    color: var(--kleur-grijs);
    font-size: 0.9rem;
    font-weight: 700;
}

.error-message {
    color: var(--kleur-rood);
}

.success-message {
    color: var(--kleur-groen);
}

.button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 10px;
    padding: 0 18px;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: var(--schaduw);
}

.button-full {
    width: 100%;
}

.button-small {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.9rem;
}

.button-primary {
    color: var(--kleur-wit);
    background: linear-gradient(135deg, var(--kleur-logo-groen), var(--kleur-logo-groen-diep));
}

.button-primary:not(:disabled):hover {
    background: var(--kleur-logo-zwart);
}

.button-secondary {
    color: var(--kleur-wit);
    background: var(--kleur-donker-3);
}

.button-secondary:not(:disabled):hover {
    background: var(--kleur-donker-2);
}

.button-muted {
    color: var(--kleur-donker);
    background: rgba(108, 117, 125, 0.16);
}

.button-ghost {
    min-height: 42px;
    color: var(--kleur-wit);
    background: rgba(255, 255, 255, 0.12);
}

.button-ghost:not(:disabled):hover {
    color: var(--kleur-donker);
    background: var(--kleur-geel);
}

.paid-button {
    min-height: 64px;
    color: var(--kleur-wit);
    background: linear-gradient(135deg, var(--kleur-logo-groen), var(--kleur-logo-groen-diep));
    font-size: 1.02rem;
}

.free-button {
    color: var(--kleur-wit);
    background: var(--kleur-oranje);
}

.cancel-button {
    min-height: 48px;
    color: var(--kleur-wit);
    background: var(--kleur-rood);
}

.icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--kleur-donker);
    background: rgba(108, 117, 125, 0.14);
    font-size: 1.35rem;
    font-weight: 800;
}

.icon-button:not(:disabled):hover {
    color: var(--kleur-wit);
    background: var(--kleur-rood);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: var(--kleur-wit);
    border-radius: 999px;
    animation: spin 800ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.field-group {
    display: grid;
    gap: 7px;
}

.login-screen {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 12%, rgba(254, 227, 26, 0.28), rgba(254, 227, 26, 0) 36%),
        linear-gradient(135deg, var(--kleur-logo-zwart), var(--kleur-logo-groen-diep) 58%, var(--kleur-logo-groen));
}

.login-card {
    width: min(100%, 540px);
    display: grid;
    gap: 18px;
    padding: 34px;
    border: 3px solid var(--kleur-geel);
    border-radius: var(--radius);
    background: var(--kleur-wit);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.login-brand {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-bottom: 6px;
    text-align: center;
}

.login-logo-image {
    width: min(100%, 380px);
    height: auto;
    max-height: 108px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}

.login-brand p {
    margin: 4px 0 0;
    color: var(--kleur-grijs);
    font-weight: 700;
}

.app-screen {
    display: block;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 78px;
    padding: 10px clamp(14px, 3vw, 32px);
    color: var(--kleur-wit);
    background:
        linear-gradient(90deg, var(--kleur-logo-zwart) 0%, var(--kleur-logo-zwart) 34%, var(--kleur-logo-groen-diep) 100%);
    border-bottom: 4px solid var(--kleur-geel);
    box-shadow: var(--schaduw);
}

.topbar-brand {
    min-width: 188px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--kleur-geel);
    text-decoration: none;
}

.topbar-logo {
    width: clamp(150px, 14vw, 210px);
    height: auto;
    max-height: 60px;
    display: block;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.32));
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.nav-tab,
.admin-tab {
    min-height: 42px;
    border-radius: 999px;
    padding: 0 16px;
    color: var(--kleur-wit);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
    white-space: nowrap;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-tab:not(:disabled):hover,
.nav-tab.is-active,
.admin-tab:not(:disabled):hover,
.admin-tab.is-active {
    color: var(--kleur-donker);
    background: var(--kleur-geel);
}

.user-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: max-content;
}

.current-user {
    max-width: 180px;
    overflow: hidden;
    color: var(--kleur-wit);
    font-size: 0.92rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-queue-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--kleur-donker);
    background: var(--kleur-geel);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.checkout-layout,
.transactions-panel,
.admin-panel,
.log-panel {
    width: min(100% - 28px, 1480px);
    margin: 20px auto 32px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(330px, 3fr);
    gap: 18px;
    align-items: start;
}

.products-area,
.cart-panel,
.admin-section {
    border: 1px solid var(--rand);
    border-top: 4px solid rgba(254, 227, 26, 0.88);
    border-radius: var(--radius);
    background: var(--kleur-wit);
    box-shadow: 0 10px 28px rgba(26, 26, 46, 0.08);
}

.products-area,
.admin-section {
    padding: clamp(16px, 2.2vw, 24px);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title h2,
.admin-section h3,
.backup-box h4 {
    margin: 0;
    color: var(--kleur-donker);
    font-weight: 800;
    line-height: 1.1;
}

.section-title h2 {
    font-size: clamp(1.55rem, 4vw, 2.1rem);
}

.section-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--kleur-groen);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.product-groups {
    display: grid;
    gap: 26px;
}

.category-group h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--kleur-donker);
    font-size: 1.18rem;
    font-weight: 800;
}

.category-group h3::before {
    width: 12px;
    height: 28px;
    display: block;
    border-radius: 999px;
    background: var(--kleur-geel);
    content: "";
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.product-button {
    min-height: 88px;
    display: grid;
    align-content: center;
    gap: 8px;
    border: 2px solid var(--kleur-groen);
    border-radius: var(--radius);
    padding: 14px;
    color: var(--kleur-donker);
    background: linear-gradient(180deg, var(--kleur-wit), rgba(35, 158, 56, 0.07));
    text-align: left;
    box-shadow: 0 2px 0 rgba(35, 158, 56, 0.16);
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease;
}

.product-button:not(:disabled):hover {
    color: var(--kleur-wit);
    background: linear-gradient(135deg, var(--kleur-logo-groen), var(--kleur-logo-groen-diep));
    box-shadow: var(--schaduw);
    transform: translateY(-2px);
}

.product-button strong {
    overflow-wrap: anywhere;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.15;
}

.product-button span {
    color: var(--kleur-groen);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.product-button:hover span {
    color: var(--kleur-wit);
}

.cart-panel {
    position: sticky;
    top: 94px;
    align-self: start;
    overflow: hidden;
}

.cart-content {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.cart-mobile-toggle,
.cart-collapse {
    display: none;
}

.cart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-heading h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.cart-list {
    max-height: 44vh;
    min-height: 88px;
    display: grid;
    gap: 8px;
    overflow: auto;
    padding-right: 2px;
}

.cart-empty,
.empty-table {
    color: var(--kleur-grijs);
    font-weight: 700;
}

.cart-empty {
    display: grid;
    place-items: center;
    min-height: 78px;
    border: 1px dashed var(--rand-sterk);
    border-radius: var(--radius);
    text-align: center;
}

.cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--rand);
}

.cart-row:last-child {
    border-bottom: 0;
}

.cart-row strong {
    display: block;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.cart-meta {
    margin-top: 3px;
    color: var(--kleur-grijs);
    font-size: 0.9rem;
    font-weight: 700;
}

.cart-row-total {
    color: var(--kleur-donker);
    font-weight: 800;
}

.quantity-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.quantity-actions button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--kleur-donker);
    background: rgba(108, 117, 125, 0.14);
    font-size: 1.18rem;
    font-weight: 800;
}

.quantity-actions button:not(:disabled):hover {
    color: var(--kleur-wit);
    background: var(--kleur-rood);
}

.total-box {
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 18px 12px;
    border-radius: var(--radius);
    color: var(--kleur-donker);
    background: linear-gradient(135deg, var(--kleur-geel), rgba(254, 227, 26, 0.74));
    text-align: center;
}

.total-box span {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.total-box strong {
    font-size: clamp(3.5rem, 9vw, 4.8rem);
    font-weight: 800;
    line-height: 0.95;
}

.payment-actions {
    display: grid;
    gap: 10px;
}

.admin-panel {
    display: grid;
    gap: 16px;
}

.transactions-panel {
    width: min(100% - 28px, 1480px);
    display: grid;
    gap: 16px;
    margin: 20px auto 32px;
}

.transaction-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    align-items: end;
}

.transaction-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.pagination-summary {
    color: var(--kleur-grijs);
    font-size: 0.95rem;
    font-weight: 800;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-button {
    min-width: 46px;
    min-height: 44px;
    border: 1px solid var(--rand);
    border-radius: 10px;
    padding: 0 12px;
    color: var(--kleur-donker);
    background: var(--kleur-wit);
    font-weight: 800;
}

.pagination-button.is-active {
    color: var(--kleur-wit);
    border-color: var(--kleur-groen);
    background: var(--kleur-groen);
}

.pagination-gap {
    min-width: 24px;
    text-align: center;
    color: var(--kleur-grijs);
    font-weight: 800;
}

.transaction-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--rand);
    border-left: 6px solid var(--kleur-groen);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--kleur-wit);
    box-shadow: 0 6px 18px rgba(26, 26, 46, 0.08);
}

.transaction-card-header,
.transaction-meta,
.transaction-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.transaction-card-header div {
    display: grid;
    gap: 3px;
}

.transaction-card-header strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.transaction-card-header span,
.transaction-meta span {
    color: var(--kleur-grijs);
    font-size: 0.9rem;
    font-weight: 700;
}

.transaction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 0 12px;
    color: var(--kleur-wit);
    background: var(--kleur-groen);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.transaction-badge.is-free {
    background: var(--kleur-oranje);
}

.transaction-meta {
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(254, 227, 26, 0.2);
}

.transaction-meta strong {
    color: var(--kleur-donker);
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
}

.transaction-items {
    display: grid;
    gap: 8px;
}

.transaction-item-row {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rand);
}

.transaction-item-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.transaction-item-row span {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.transaction-item-row strong {
    white-space: nowrap;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--kleur-logo-zwart), var(--kleur-logo-groen-diep));
    border: 2px solid rgba(254, 227, 26, 0.72);
    box-shadow: var(--schaduw);
}

.admin-tab {
    flex: 0 0 auto;
}

.admin-section {
    display: grid;
    gap: 18px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-section h3 {
    font-size: 1.25rem;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    background: var(--kleur-lichtgrijs);
}

.admin-form-wide {
    grid-template-columns: 1.3fr 1.1fr 0.7fr 0.7fr auto auto;
}

.checkbox-line {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--kleur-donker);
    font-weight: 800;
}

.checkbox-line input {
    width: 22px;
    min-width: 22px;
    min-height: 22px;
    accent-color: var(--kleur-groen);
}

.form-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--rand);
    border-radius: var(--radius);
}

.empty-row td {
    padding: 28px 16px;
    color: var(--kleur-grijs);
    text-align: center;
    white-space: normal;
}

.inactive-row {
    color: var(--kleur-grijs);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 30px;
    border-radius: 999px;
    padding: 0 10px;
    color: var(--kleur-wit);
    background: var(--kleur-groen);
    font-size: 0.78rem;
    font-weight: 800;
}

.status-pill.is-off {
    background: var(--kleur-grijs);
}

.action-cell {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 280px;
}

.table-action {
    min-height: 38px;
    border-radius: 9px;
    padding: 0 10px;
    font-size: 0.83rem;
    font-weight: 800;
}

.action-edit {
    color: var(--kleur-wit);
    background: var(--kleur-donker-3);
}

.action-toggle {
    color: var(--kleur-wit);
    background: var(--kleur-oranje);
}

.action-delete {
    color: var(--kleur-wit);
    background: var(--kleur-rood);
}

.password-cell {
    min-width: 260px;
}

.password-cell input {
    min-height: 42px;
}

.import-box {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    background: var(--kleur-wit);
}

.import-box h4 {
    margin: 0;
    color: var(--kleur-donker);
    font-size: 1rem;
    font-weight: 800;
}

.import-actions {
    display: grid;
    grid-template-columns: minmax(190px, auto) minmax(220px, 1fr) minmax(150px, auto);
    gap: 10px;
    align-items: center;
}

.report-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-period {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 260px)) auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--rand);
    border-left: 6px solid var(--kleur-groen);
    border-radius: var(--radius);
    background: var(--kleur-lichtgrijs);
}

.report-button {
    min-height: 96px;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    color: var(--kleur-wit);
    background: linear-gradient(135deg, var(--kleur-logo-groen-diep), var(--kleur-logo-groen));
    text-align: left;
}

.report-button span {
    font-size: 1.1rem;
}

.report-button small {
    color: var(--kleur-geel);
    font-weight: 800;
}

.backup-box {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--rand);
    border-left: 6px solid var(--kleur-geel);
    border-radius: var(--radius);
    background: var(--kleur-lichtgrijs);
}

.backup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.backup-header h3,
.backup-header h4 {
    margin: 0;
}

.backup-box dl,
.log-status-list {
    display: grid;
    gap: 9px;
    margin: 0;
}

.backup-box dl div,
.log-status-list div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 10px;
}

.backup-box dt,
.log-status-list dt {
    color: var(--kleur-grijs);
    font-weight: 800;
}

.backup-box dd,
.log-status-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 0 12px;
    color: var(--kleur-wit);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-ok {
    background: var(--kleur-groen);
}

.status-wait {
    background: var(--kleur-oranje);
}

.status-error {
    background: var(--kleur-rood);
}

.log-panel {
    display: grid;
    gap: 16px;
}

.log-table-wrap {
    max-height: 62vh;
    overflow: auto;
}

#logs-table td:nth-child(4),
#logs-table td:nth-child(5) {
    max-width: 520px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.level-badge {
    display: inline-flex;
    min-width: 76px;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--kleur-wit);
    font-size: 0.76rem;
    font-weight: 800;
}

.level-info {
    background: var(--kleur-donker-3);
}

.level-warning,
.level-warn {
    background: var(--kleur-oranje);
}

.level-error {
    background: var(--kleur-rood);
}

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.modal-window {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 36px);
    display: grid;
    gap: 16px;
    overflow: auto;
    border-radius: var(--radius);
    padding: 24px;
    background: var(--kleur-wit);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.modal-window h2 {
    margin: 0;
    padding-right: 36px;
    color: var(--kleur-donker);
    font-size: 1.35rem;
    font-weight: 800;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.modal-body {
    color: var(--kleur-donker-2);
    font-weight: 600;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.reason-options {
    display: grid;
    gap: 10px;
}

.reason-option {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--rand);
    border-radius: var(--radius);
    padding: 0 14px;
    color: var(--kleur-donker);
    background: var(--kleur-wit);
    font-weight: 800;
    text-align: left;
}

.reason-option.is-selected,
.reason-option:not(:disabled):hover {
    border-color: var(--kleur-oranje);
    background: rgba(253, 126, 20, 0.12);
}

.toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    width: min(360px, calc(100vw - 36px));
    display: grid;
    gap: 10px;
}

.toast {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border-radius: var(--radius);
    padding: 14px 14px 14px 16px;
    color: var(--kleur-wit);
    box-shadow: var(--schaduw);
    animation: toast-in 180ms ease-out;
}

.toast-succes {
    background: var(--kleur-groen);
}

.toast-fout {
    background: var(--kleur-rood);
}

.toast-waarschuwing {
    background: var(--kleur-oranje);
}

.toast-message {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.toast-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--kleur-wit);
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.25rem;
    font-weight: 800;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .checkout-layout {
        grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
    }

    .admin-form,
    .admin-form-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.cart-open {
        overflow: hidden;
    }

    .login-card {
        padding: 26px 20px;
    }

    .topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
    }

    .topbar-brand,
    .user-area,
    .main-nav {
        justify-content: space-between;
    }

    .topbar-brand {
        min-width: 0;
        justify-content: flex-start;
    }

    .topbar-logo {
        width: min(60vw, 190px);
        height: auto;
        max-height: 54px;
    }

    .login-logo-image {
        width: min(100%, 320px);
        max-height: 92px;
    }

    .main-nav {
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .nav-tab {
        padding: 0 13px;
        font-size: 0.92rem;
    }

    .current-user {
        max-width: 52vw;
    }

    .user-area {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .transaction-queue-badge {
        order: 3;
        width: 100%;
    }

    .checkout-layout,
    .transactions-panel,
    .admin-panel,
    .log-panel {
        width: min(100% - 20px, 1480px);
        margin-top: 14px;
    }

    .checkout-layout {
        display: block;
        padding-bottom: calc(104px + var(--backend-status-height));
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-title .button {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-button {
        min-height: 82px;
        padding: 12px;
    }

    .product-button strong {
        font-size: 0.94rem;
    }

    .product-button span {
        font-size: 1.2rem;
    }

    .cart-panel {
        position: fixed;
        right: 0;
        bottom: var(--backend-status-height);
        left: 0;
        z-index: 50;
        top: auto;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
        transform: translateY(calc(100% - 88px));
        transition: transform 220ms ease;
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.22);
    }

    .cart-panel.is-open {
        transform: translateY(0);
    }

    .cart-mobile-toggle {
        width: 100%;
        min-height: 88px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px;
        color: var(--kleur-wit);
        background: var(--kleur-donker);
        font-weight: 800;
        text-align: left;
    }

    .cart-mobile-toggle strong {
        color: var(--kleur-geel);
        font-size: 1.1rem;
        white-space: nowrap;
    }

    .cart-content {
        max-height: calc(78vh - 88px);
        overflow: auto;
        padding: 16px;
    }

    .cart-collapse {
        display: inline-grid;
    }

    .cart-list {
        max-height: 28vh;
    }

    .total-box strong {
        font-size: 3.5rem;
    }

    .admin-tabs {
        padding: 7px;
    }

    .admin-form,
    .admin-form-wide,
    .transaction-toolbar,
    .import-actions,
    .report-period,
    .report-actions {
        grid-template-columns: 1fr;
    }

    .transaction-list {
        grid-template-columns: 1fr;
    }

    .form-actions,
    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .form-actions .button,
    .modal-actions .button {
        width: 100%;
    }

    .backup-box dl div,
    .log-status-list div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .toast-container {
        right: 10px;
        bottom: calc(100px + var(--backend-status-height));
        width: calc(100vw - 20px);
    }
}
