:root {
    --background: #f7dadb;
    --card: #ffffff;
    --ink: #434343;
    --muted: #6b6262;
    --accent: #e38575;
    --accent-dark: #cf7163;
    --line: #efd0cf;
    --success: #e9f4e8;
    --error: #f9e6e1;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 14%, rgba(255,255,255,.42) 0 70px, transparent 71px),
        radial-gradient(circle at 94% 86%, rgba(227,133,117,.18) 0 115px, transparent 116px),
        var(--background);
    font-family: "Montserrat", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.page-shell {
    width: min(100% - 28px, 680px);
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 0 max(35px, env(safe-area-inset-bottom));
}

.brand {
    display: flex;
    justify-content: center;
    margin: 0 0 22px;
}

.brand img {
    display: block;
    width: min(320px, 72vw);
    height: auto;
}

.card {
    padding: clamp(22px, 5vw, 42px);
    background: var(--card);
    border: 0;
    border-radius: 30px;
    box-shadow: 0 20px 55px rgba(84, 56, 54, .12);
}

.eyebrow {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    margin: 8px 0 10px;
    color: var(--accent);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 8vw, 3.15rem);
    font-weight: 900;
    line-height: 1.02;
}

.intro > p, .piece-heading p, .privacy-note {
    color: var(--muted);
    line-height: 1.55;
}

form { margin-top: 30px; }

.field { margin-bottom: 19px; }

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: .92rem;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(155, 95, 73, .12);
}

.piece {
    margin-top: 30px;
    padding: 19px;
    background: #fff7f6;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.piece-heading { display: flex; align-items: flex-start; gap: 13px; }
.piece-heading > div { flex: 1; }
.piece-number {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    font-weight: 700;
}

.piece h2 { margin: 1px 0 2px; font-size: 1rem; }
.piece-heading p { margin: 0 0 16px; font-size: .87rem; }
.camera-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.photo-button {
    display: flex;
    min-height: 102px;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 18px;
    color: var(--accent);
    background: #fff;
    border: 2px dashed #e9aaa0;
    border-radius: 15px;
    cursor: pointer;
    text-align: left;
}

.photo-button:active { transform: scale(.99); }
.photo-button strong, .photo-button small { display: block; }
.photo-button small { margin-top: 3px; color: var(--muted); }
.camera-icon { width: 25px; height: 19px; color: var(--accent); border: 2px solid currentColor; border-radius: 5px; text-align: center; line-height: 12px; }

.preview { margin-top: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #eee7df; }
.preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; font-size: .82rem; }
.preview-actions span { max-width: 60%; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.preview-actions label { color: var(--accent-dark); cursor: pointer; font-weight: 750; }

.remove-piece {
    padding: 5px 0;
    color: #a24e43;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 700;
}

.add-piece {
    width: 100%;
    margin-top: 13px;
    padding: 14px;
    color: var(--accent-dark);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
}

.optional { color: var(--muted); font-size: .8rem; font-weight: 500; }

.privacy-note { margin: 18px 2px; font-size: .78rem; }

.submit-button {
    width: 100%;
    min-height: 55px;
    padding: 14px 20px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 30px;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.submit-button:hover { background: var(--accent-dark); }
.submit-button:disabled { cursor: wait; opacity: .65; }

.message { margin: 22px 0 -8px; padding: 14px 16px; border-radius: 12px; line-height: 1.45; }
.message.success { background: var(--success); }
.message.error { background: var(--error); }
.photo-instruction { display: grid; gap: 5px; margin: 22px 0; padding: 16px 18px; color: #6f4c32; background: #fff4da; border: 1px solid #efd392; border-radius: 14px; line-height: 1.45; }
.photo-instruction strong { font-size: .9rem; }
.photo-instruction span { font-size: .82rem; }

@media (max-width: 480px) {
    .page-shell { width: min(100% - 18px, 680px); }
    .card { padding: 22px 17px; border-radius: 20px; }
    .piece { padding: 15px; }
}

/* Beheerscherm */
.admin-body { background: #f8eeee; }
.admin-shell { width: min(100% - 32px, 1440px); margin: 0 auto; padding: 34px 0 60px; }
.live-indicator { display: flex; width: max-content; align-items: center; gap: 7px; margin: 0 0 14px auto; color: #39714f; font-size: .72rem; font-weight: 700; }
.live-indicator span { width: 8px; height: 8px; background: #45a66a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(69,166,106,.14); animation: livePulse 2s infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 7px rgba(69,166,106,0); } }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-header h1 { margin-bottom: 7px; }
.admin-header p { margin: 0; color: var(--muted); }
.admin-header-actions { display: flex; align-items: center; gap: 13px; }
.logout-link { color: var(--accent-dark); font-size: .8rem; font-weight: 700; text-decoration: none; }
.stats-link { padding: 9px 14px; color: var(--accent-dark); background: #fff; border: 1px solid var(--accent); border-radius: 22px; font-size: .8rem; font-weight: 700; text-decoration: none; }
.new-registration { padding: 13px 22px; color: #fff; background: var(--accent); border-radius: 30px; font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.admin-message { margin: 0 0 18px; }
.admin-tools { padding: 20px; background: #fff; border-radius: 18px; box-shadow: 0 12px 35px rgba(84,56,54,.07); }
.admin-tools label { display: block; margin-bottom: 8px; font-size: .82rem; font-weight: 700; }
.admin-tools input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.admin-tools input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(227,133,117,.12); }
.status-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.status-summary button { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 15px 20px; color: var(--ink); background: #fff; border: 0; border-radius: 17px; cursor: pointer; text-align: left; box-shadow: 0 10px 30px rgba(84,56,54,.06); }
.status-summary span { font-size: .82rem; font-weight: 700; }
.status-summary strong { display: grid; width: 35px; height: 35px; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; }
.order-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 18px; }
.order-column { padding: 16px; background: rgba(255,255,255,.55); border: 1px solid rgba(227,133,117,.16); border-radius: 20px; scroll-margin-top: 20px; }
.column-title { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 14px; }
.column-title h2 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 1.35rem; }
.column-title > span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.order-list { display: grid; gap: 12px; }
.order-card { padding: 16px; background: #fff; border-radius: 15px; box-shadow: 0 8px 22px rgba(84,56,54,.07); }
.order-card-top { display: flex; justify-content: space-between; gap: 12px; }
.order-card-top strong, .order-card-top span { display: block; }
.order-card-top > div > span { margin-top: 4px; color: var(--accent-dark); font-size: .78rem; font-weight: 700; }
.item-badge { align-self: flex-start; padding: 6px 9px; color: var(--accent-dark); background: #fff2f0; border-radius: 15px; font-size: .7rem; font-weight: 700; }
.order-card time { display: block; margin: 13px 0; color: var(--muted); font-size: .75rem; }
.card-stage { display: inline-block; margin: -5px 0 12px; padding: 5px 9px; border-radius: 13px; font-size: .68rem; font-weight: 700; }
.order-actions { display: flex; gap: 8px; }
.order-actions form { flex: 1; margin: 0; }
.order-actions button { min-height: 37px; padding: 8px 11px; border-radius: 20px; cursor: pointer; font-size: .7rem; font-weight: 700; }
.view-order { color: var(--accent-dark); background: #fff; border: 1px solid var(--accent); }
.advance-order { width: 100%; color: #fff; background: var(--accent); border: 1px solid var(--accent); }
.back-order { width: 100%; color: var(--accent-dark); background: #fff; border: 1px solid var(--line); }
.order-card.reminder-due { border: 2px solid #e3a23d; }
.reminder-alert { margin: -3px 0 12px; color: #8b5808; font-size: .75rem; font-weight: 700; }
.reminder-form { margin-top: 10px; }
.reminder-form button, .table-reminder-form button { width: 100%; padding: 9px 12px; color: #fff; background: #b66b18; border: 0; border-radius: 18px; cursor: pointer; font-size: .72rem; font-weight: 700; }
.reminder-sent { display: block; margin-top: 8px; color: #397451; font-size: .68rem; font-weight: 700; white-space: normal; }
.empty-column { display: none; margin: 18px 4px; color: var(--muted); font-size: .8rem; text-align: center; }
.order-dialog { width: min(92vw, 720px); max-height: 88vh; padding: 25px; color: var(--ink); background: #fff; border: 0; border-radius: 23px; box-shadow: 0 30px 80px rgba(50,35,34,.3); }
.order-dialog::backdrop { background: rgba(55,41,40,.55); backdrop-filter: blur(4px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-header h2 { margin: 5px 0 0; font-family: "Playfair Display", Georgia, serif; font-size: 2rem; }
.close-dialog { width: 38px; height: 38px; color: var(--ink); background: #f7eeee; border: 0; border-radius: 50%; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.customer-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.customer-details div { padding: 12px; background: #fff7f6; border-radius: 12px; }
.customer-details dt { margin-bottom: 5px; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.customer-details dd { margin: 0; overflow-wrap: anywhere; font-size: .8rem; }
.customer-details a { color: var(--accent-dark); }
.item-count-form { margin: 18px 0; padding: 14px; background: #fff7f6; border-radius: 12px; }
.item-count-form label { display: block; margin-bottom: 8px; font-size: .75rem; font-weight: 700; }
.item-count-form > div { display: flex; gap: 8px; }
.item-count-form input { width: 85px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.item-count-form button { padding: 9px 14px; color: #fff; background: var(--accent); border: 0; border-radius: 18px; cursor: pointer; font-weight: 700; }
.item-count-form small { display: block; margin-top: 8px; color: var(--muted); }
.order-dialog h3 { font-family: "Playfair Display", Georgia, serif; }
.order-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.order-photos figure { margin: 0; overflow: hidden; background: #fff7f6; border-radius: 13px; }
.order-photos img { display: block; width: 100%; height: 240px; object-fit: contain; background: #eee7df; }
.order-photos figcaption { padding: 9px 11px; font-size: .75rem; font-weight: 700; }
.login-shell { width: min(100% - 24px, 520px); margin: 0 auto; padding: 50px 0; }
.login-card > p { color: var(--muted); line-height: 1.55; }
.login-card form { margin-top: 24px; }
.statistics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { min-height: 190px; padding: 25px; background: #fff; border-radius: 22px; box-shadow: 0 12px 35px rgba(84,56,54,.08); }
.stat-card > span { display: block; color: var(--accent-dark); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.stat-card > strong { display: block; margin: 20px 0 13px; color: var(--accent); font-family: "Playfair Display", Georgia, serif; font-size: 3.8rem; line-height: 1; }
.stat-card > small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.stat-today { color: #fff; background: var(--accent); }
.stat-today > span, .stat-today > strong, .stat-today > small { color: #fff; }
.waiting-time-card { grid-column: span 4; min-height: 170px; background: #fff7f6; border: 1px solid var(--line); }
.waiting-time-card > strong { font-size: clamp(2.2rem, 6vw, 4rem); }
.statistics-note { margin-top: 18px; padding: 24px; background: rgba(255,255,255,.6); border-radius: 20px; }
.statistics-note h2 { margin: 0 0 9px; font-family: "Playfair Display", Georgia, serif; }
.statistics-note p { margin: 0; color: var(--muted); line-height: 1.65; }
.order-table-tools { position: relative; padding-right: 130px; }
.order-table-tools > span { position: absolute; right: 20px; bottom: 35px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.spreadsheet-wrap { margin-top: 18px; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 35px rgba(84,56,54,.07); }
.orders-table { width: 100%; min-width: 1280px; border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.orders-table th { position: sticky; top: 0; z-index: 1; padding: 14px 13px; color: #fff; background: var(--accent); border-right: 1px solid rgba(255,255,255,.25); text-align: left; white-space: nowrap; }
.orders-table th:first-child { border-top-left-radius: 17px; }
.orders-table th:last-child { border-top-right-radius: 17px; border-right: 0; }
.orders-table td { height: 48px; padding: 6px 10px; border-right: 1px solid #f1dddd; border-bottom: 1px solid #f1dddd; white-space: nowrap; vertical-align: middle; }
.orders-table td:last-child { border-right: 0; }
.orders-table th:nth-child(9), .orders-table td:nth-child(9) { min-width: 240px; }
.orders-table th:nth-child(11), .orders-table td:nth-child(11) { width: 82px; min-width: 82px; max-width: 82px; }
.orders-table tbody tr:nth-child(even) { background: #fff8f7; }
.orders-table tbody tr:hover { background: #fceceb; }
.orders-table a { color: var(--accent-dark); }
.numeric-cell { text-align: center; font-weight: 700; }
.table-count-form { display: flex; justify-content: center; gap: 4px; margin: 0; }
.table-count-form input { width: 48px; height: 28px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.table-count-form button { height: 28px; padding: 3px 7px; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; }
.corrected-count { display: block; margin-top: 4px; color: var(--muted); font-size: .6rem; white-space: normal; }
.table-status { display: inline-block; padding: 6px 9px; border-radius: 14px; font-size: .68rem; font-weight: 700; }
.status-processing { color: #925a00; background: #fff1cf; }
.status-glazed { color: #6c4883; background: #f1e4fa; }
.status-kiln { color: #9a452d; background: #ffe3db; }
.status-ready { color: #276442; background: #ddf4e6; }
.status-collected { color: #58606d; background: #edf0f4; }
.table-photo-button { display: inline-block; padding: 7px 10px; color: var(--accent-dark); background: #fff; border: 1px solid var(--accent); border-radius: 15px; cursor: pointer; font-size: .7rem; font-weight: 700; text-decoration: none; }
.table-status-actions { display: inline-flex; gap: 4px; margin: 0 0 0 5px; vertical-align: middle; }
.table-status-actions form { margin: 0; }
.table-status-actions button { height: 29px; padding: 3px 9px; color: var(--accent-dark); background: #fff; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.table-reminder-form { margin: 7px 0 0; }
.reminder-row { background: #fff3dc !important; }
.photo-page-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.photo-page-grid figure { margin: 0; overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(84,56,54,.08); }
.photo-page-grid img { display: block; width: 100%; height: 380px; object-fit: contain; background: #eee7df; }
.photo-page-grid figcaption { padding: 13px 16px; font-size: .78rem; font-weight: 700; }
.table-empty { padding: 25px; color: var(--muted); text-align: center; }
.compact-statistics .stat-card:not(.waiting-time-card) { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-radius: 17px; }
.compact-statistics .stat-card:not(.waiting-time-card) > span { color: var(--ink); font-size: .82rem; letter-spacing: 0; text-transform: none; }
.compact-statistics .stat-card:not(.waiting-time-card) > strong { display: grid; flex: 0 0 40px; width: 40px; height: 40px; margin: 0; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; font-family: "Montserrat", sans-serif; font-size: 1rem; }

@media (max-width: 900px) {
    .order-columns { grid-template-columns: 1fr; overflow: visible; }
    .order-column { scroll-margin-top: 12px; }
    .statistics-grid { grid-template-columns: repeat(2, 1fr); }
    .waiting-time-card { grid-column: span 2; }
}

@media (max-width: 600px) {
    .admin-shell { width: min(100% - 18px, 1440px); padding-top: 20px; }
    .admin-header { display: block; }
    .admin-header-actions { margin-top: 18px; }
    .new-registration { display: inline-block; }
    .status-summary { grid-template-columns: 1fr; }
    .status-summary button { min-height: 54px; }
    .customer-details { grid-template-columns: 1fr; }
    .order-photos { grid-template-columns: 1fr; }
    .order-photos img { height: auto; max-height: 380px; }
    .order-actions { align-items: stretch; }
    .order-table-tools { padding-right: 20px; padding-bottom: 52px; }
    .order-table-tools > span { left: 20px; right: auto; bottom: 20px; }
    .statistics-grid { grid-template-columns: 1fr; }
    .waiting-time-card { grid-column: span 1; }
    .stat-card { min-height: 155px; }
}

/* De bestaande beheerknoppen, identiek in elke paginaheader (geen nieuwe balk). */
.mok-header-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;max-width:830px}
.mok-header-actions .stats-link,.mok-header-actions .logout-link{display:inline-block;box-sizing:border-box;padding:9px 13px;border-radius:22px;border:1px solid #e9bdb6;background:#fff;color:#954b43;text-decoration:none;font:700 .8rem/1.2 Montserrat,Arial,sans-serif;white-space:nowrap}
.mok-header-actions .logout-link{background:#fff4f2}
.mok-header-actions a[aria-current="page"]{background:#e98575;color:#fff;border-color:#e98575}
.mok-header-actions a:hover{background:#fff1ed}
.mok-header-actions a[aria-current="page"]:hover{background:#bb675a}
@media(max-width:700px){.mok-header-actions{max-width:100%;justify-content:flex-start;gap:6px}.mok-header-actions .stats-link,.mok-header-actions .logout-link{font-size:.75rem;padding:8px 11px}}
