:root {
    /* ==================== COLOR TOKENS ==================== */

    /* Brand Palette - Rederij Cascade (huisstijlkaart) */
    --brand-primary: #092D61;
    /* Marineblauw */
    --brand-accent: #B49253;
    /* Goud */

    /* Status Palette - Operationeel */
    --status-ok: #059669;
    /* Groen - functioneel */
    --status-warn: #d97706;
    /* Amber - functioneel */
    --status-deny: #dc2626;
    /* Rood - functioneel */
    --status-info: #1D5577;
    /* Huisstijl teal */

    /* Status Backgrounds */
    --status-ok-bg: #ecfdf5;
    --status-warn-bg: #fffbeb;
    --status-deny-bg: #fef2f2;
    --status-info-bg: #DAE0E8;
    /* Huisstijl events-bg */

    /* Neutral Palette - Huisstijl */
    --bg-primary: #F9F7F5;
    /* Huisstijl achtergrond */
    --bg-secondary: #ffffff;
    --bg-tertiary: #EDECEA;
    /* Huisstijl achtergrond secundair */

    --text-primary: #092D61;
    /* Marineblauw */
    --text-secondary: #49648A;
    /* Huisstijl blauw gedempt */
    --text-muted: #9A8F79;
    /* Huisstijl warm grijs */
    --text-inverse: #ffffff;

    --border-subtle: #EDECEA;
    /* Huisstijl cream-dark */
    --border-focus: #B49253;
    /* Goud */

    /* Shadows */
    --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    /* shadow-sm */
    --shadow-float: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    /* shadow-md */

    /* Dimensions */
    --radius-card: 16px;
    /* rounded-2xl */
    --radius-button: 2em;
    /* rounded-xl */
    --radius-pill: 999px;
    --radius-input: 12px;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Typography */
    --font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}


/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    scrollbar-gutter: stable;
    overflow-x: hidden;
    width: 100%;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 90px;
}

/* ==================== BRANDING & LOGOS ==================== */
.brand-logo {
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.login-logo {
    width: 280px;
    height: auto;
    margin-bottom: var(--spacing-lg);
}

.header-logo {
    height: auto;
    max-height: 38px;
    width: 150px;
    margin-right: 12px;
}

h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1, h2 {
    font-family: 'Baloo Thambi 2', system-ui, sans-serif;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
    cursor: pointer;
}

input {
    font-family: inherit;
}

/* ==================== LAYOUT COMPONENTS ==================== */

.screen {
    display: none;
    padding: var(--spacing-lg);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    animation: fadeIn 0.2s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen-header {
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.screen-header h1 {
    font-size: 24px;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ==================== NAVIGATION ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 2px;
    padding: 12px var(--spacing-md) max(12px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.03);
}

.nav-item {
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    flex: 1 1 0%;
    min-width: 0;
    transition: color 0.2s;
    overflow: hidden;
}

.nav-item.active {
    color: var(--brand-primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.sidebar-logo {
    display: none;
}

/* Hide cascade tools on mobile */
.cascade-tools-divider,
.cascade-tool-link {
    display: none;
}

.qr-nav-icon {
    object-fit: contain;
}

.nav-item.active .qr-nav-icon {
    filter: brightness(0) saturate(100%) invert(12%) sepia(96%) saturate(2847%) hue-rotate(206deg) brightness(91%) contrast(101%);
}

.nav-item span {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    /* Touch target */
    border-radius: 2em;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.15s ease, opacity 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--brand-accent);
    color: var(--text-inverse);
    box-shadow: 0 2px 4px rgba(180, 146, 83, 0.3);
}

.btn-primary:hover {
    background-color: #8E7649;
    box-shadow: 0 4px 8px rgba(180, 146, 83, 0.35);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-success {
    background-color: var(--status-ok);
    color: white;
}

.btn-warning {
    background-color: var(--status-warn);
    color: black;
}

.btn-error {
    background-color: var(--status-deny);
    color: white;
}

/* ==================== INPUTS ==================== */
.input-field {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: var(--spacing-md);
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--brand-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(180, 146, 83, 0.15);
}

/* ==================== SEARCH DROPDOWN ==================== */
.search-wrapper {
    position: relative;
}

.search-wrapper .search-input {
    padding-right: 40px;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    z-index: 2;
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

.search-result-count {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0 2px;
}

/* ==================== CARDS ==================== */
.reservation-card,
.history-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-card);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.reservation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
    background-color: var(--bg-primary);
}

.reservation-card:active {
    transform: translateY(0);
}

.reservation-card.status-no_show {
    background: #f3f4f6;
    border-color: #9ca3af;
    border-width: 2px;
    box-shadow: none;
    color: var(--text-muted);
}

.reservation-card.status-no_show::before,
.reservation-card.status-no_show::after {
    content: '';
    position: absolute;
    left: -14%;
    top: 50%;
    width: 128%;
    height: 3px;
    background: rgba(75, 85, 99, 0.62);
    border-radius: 999px;
    pointer-events: none;
    z-index: 3;
}

.reservation-card.status-no_show::before {
    transform: rotate(-12deg);
}

.reservation-card.status-no_show::after {
    transform: rotate(12deg);
}

.reservation-card.status-no_show:hover {
    background: #f3f4f6;
    transform: none;
    box-shadow: none;
}

.reservation-card.status-no_show .reservation-name,
.reservation-card.status-no_show .reservation-contact,
.reservation-card.status-no_show .reservation-time,
.reservation-card.status-no_show .reservation-meta {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #4b5563;
    opacity: 0.62;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* ==================== SCANNER ==================== */
.scanner-container {
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    background: black;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-float);
}

#qr-reader {
    width: 100%;
    /* Force clean edges */
    transform: translateZ(0);
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scan-frame {
    width: 260px;
    height: 260px;
    border: 2px solid white;
    border-radius: 20px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    position: relative;
}

.scan-frame::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid var(--brand-accent);
    border-radius: 20px;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.4;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.scan-hint {
    text-align: center;
    margin-top: var(--spacing-sm);
    color: white;
    font-size: 14px;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ==================== RESULT MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    align-items: flex-end;
    /* Sheet style on mobile */
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    /* Top rounded for sheet */
    padding: var(--spacing-lg);
    padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
    box-shadow: var(--shadow-float);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: min(90vh, calc(100dvh - 40px));
    overflow-y: auto;
}

@media (min-width: 600px) {
    .modal {
        align-items: center;
    }

    .modal-content {
        border-radius: 24px;
        padding-bottom: var(--spacing-lg);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.modal-header h2 {
    font-size: 20px;
    color: var(--brand-primary);
}

@media (prefers-color-scheme: dark) {
    .modal-header h2 {
        color: var(--text-primary);
    }
}

.modal-close {
    background: var(--bg-tertiary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
}

/* ==================== STATUS UTILS ==================== */

.result-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Status Colors & Badges */
.text-success {
    color: var(--status-ok) !important;
}

.text-warning {
    color: var(--status-warn) !important;
}

.text-error {
    color: var(--status-deny) !important;
}

.text-primary {
    color: var(--brand-accent) !important;
}

/* Warning Box */
.warning-box {
    background: var(--status-warn-bg);
    border: 1px solid var(--status-warn);
    color: #92400E;
    /* Darker amber for readability */
    padding: 12px;
    border-radius: var(--radius-button);
    font-weight: 500;
    font-size: 14px;
    /* Geen margin — parent .result-info regelt spacing via gap */
}

/* Persons Input */
.persons-input-group {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    /* Slightly distinct background */
    border-radius: var(--radius-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.persons-input-group label {
    font-weight: 600;
    font-size: 14px;
}

.persons-input-group input {
    width: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    padding: 8px;
    border-radius: 8px;
}

/* ==================== RESERVATION LIST ==================== */
.ship-toggle {
    display: flex;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-button);
    margin-bottom: var(--spacing-md);
}

.toggle-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle-btn.active {
    background: var(--bg-secondary);
    color: var(--brand-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .toggle-btn.active {
        color: var(--text-primary);
    }
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
    min-width: 0;
}

.reservation-header > div:first-child {
    min-width: 0;
    overflow: hidden;
}

.reservation-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.reservation-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.reservation-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

/* Status Badges (Pills) */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-success {
    background: var(--status-ok-bg);
    color: #15803d;
}

/* Darker green text */
.status-warning {
    background: var(--status-warn-bg);
    color: #b45309;
}

.status-info {
    background: var(--status-info-bg);
    color: #1D5577;
}

.status-error {
    background: var(--status-deny-bg);
    color: #b91c1c;
}

.status-muted {
    background: #e5e7eb;
    color: #4b5563;
}



/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--brand-accent);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-fill.complete {
    background: var(--status-ok);
}

.progress-fill.overcapacity {
    background: var(--status-deny);
}

.progress-fill.over-capacity {
    background: var(--status-deny) !important;
}

.no-show-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 0 2px;
}

.no-show-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #6b7280;
}

.no-show-confirm-card {
    background: #f3f4f6;
    border: 2px solid #9ca3af;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.no-show-confirm-card::before,
.no-show-confirm-card::after {
    content: '';
    position: absolute;
    left: -12%;
    top: 50%;
    width: 124%;
    height: 3px;
    background: rgba(75, 85, 99, 0.54);
    border-radius: 999px;
    pointer-events: none;
}

.no-show-confirm-card::before {
    transform: rotate(-10deg);
}

.no-show-confirm-card::after {
    transform: rotate(10deg);
}

.no-show-confirm-title {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #4b5563;
}

.no-show-confirm-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== LOADING & EMPTY ==================== */
.loading,
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ==================== COLLAPSIBLE PRODUCTS ==================== */
.products-collapsible summary::-webkit-details-marker {
    display: none;
}

.products-collapsible summary {
    list-style: none;
    outline: none;
    transition: background-color 0.2s;
}

.products-collapsible summary:hover {
    background-color: var(--bg-tertiary);
    opacity: 0.9;
}

.products-collapsible[open] .toggle-icon {
    transform: rotate(180deg);
}

.products-collapsible .toggle-icon {
    transition: transform 0.2s;
    font-size: 10px;
}

/* ==================== COLLAPSIBLE NOTES ==================== */
.notes-collapsible summary::-webkit-details-marker {
    display: none;
}

.notes-collapsible summary {
    list-style: none;
    outline: none;
    transition: background-color 0.2s;
}

.notes-collapsible summary:hover {
    opacity: 0.9;
}

.notes-collapsible[open] .toggle-icon {
    transform: rotate(90deg);
}

.notes-collapsible .toggle-icon {
    transition: transform 0.2s;
    display: inline-block;
}

/* ==================== REFRESH BUTTON ==================== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.refreshing {
    opacity: 0.7;
    cursor: default;
}

/* ==================== FLOORPLAN SCREEN ==================== */
.floorplan-departure-selector {
    margin-bottom: var(--spacing-md);
}

.floorplan-selector-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.floorplan-download-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.floorplan-download-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* -- Board: lijst + kaart naast elkaar -- */
.floorplan-view-toggle {
    display: none;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: var(--spacing-md);
}

.floorplan-view-btn {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 9px;
    padding: 9px 12px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
}

.floorplan-view-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.floorplan-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-md);
    align-items: start;
}

@media (min-width: 900px) {
    .floorplan-board {
        grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    }
}

.floorplan-list-pane {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    min-width: 0;
}

.floorplan-map-pane {
    min-width: 0;
    position: relative;
}

/* Op smalle schermen wisselt de toggle tussen kaart en lijst */
@media (max-width: 899px) {
    .floorplan-view-toggle {
        display: flex;
    }

    .floorplan-board.view-map .floorplan-list-pane {
        display: none;
    }

    .floorplan-board.view-list .floorplan-map-pane {
        display: none;
    }
}

/* -- Dek-tabs -- */
.floorplan-deck-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: var(--spacing-sm);
}

.floorplan-deck-tab {
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 8px 16px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.floorplan-deck-tab.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #fff;
}

/* -- Canvas met tafelkaarten -- */
.floorplan-canvas-outer {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.floorplan-canvas {
    position: relative;
}

.floorplan-deck-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
}

/* -- Volledig scherm voor de kaart -- */
.floorplan-fs-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--brand-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: var(--shadow-float);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.floorplan-fs-btn:hover {
    background: var(--bg-tertiary);
}

.floorplan-fs-btn:active {
    transform: scale(0.94);
}

.floorplan-fs-btn .fs-icon-compress {
    display: none;
}

.floorplan-map-pane.is-fullscreen .floorplan-fs-btn .fs-icon-expand {
    display: none;
}

.floorplan-map-pane.is-fullscreen .floorplan-fs-btn .fs-icon-compress {
    display: block;
}

/* CSS-overlay fullscreen. z-index ligt boven de navigatie (100) maar ONDER de
   incheck-sheet/detail-modals (999/1000), zodat het volledige incheckproces
   bovenop de fullscreen-kaart blijft werken. Geen native Fullscreen API: die
   zou alleen descendants tonen en de externe modals verbergen. */
.floorplan-map-pane.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 500;
    margin: 0;
    padding: 12px;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.floorplan-map-pane.is-fullscreen .floorplan-container {
    flex: 1;
    min-height: 0;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.floorplan-fs-active {
    overflow: hidden;
}

.floorplan-table-anchor {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floorplan-table-card {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--text-primary);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    padding: 6px;
    display: flex;
    flex-direction: column;
    min-width: 75px;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

.floorplan-table-card.status-complete {
    background: rgba(236, 253, 245, 0.95);
    border-color: var(--status-ok);
}

.floorplan-table-card.status-partial {
    background: rgba(255, 251, 235, 0.95);
    border-color: var(--status-warn);
}

.floorplan-table-card.status-no_show {
    background: rgba(243, 244, 246, 0.92);
    border-color: #d1d5db;
}

.floorplan-table-card.is-empty {
    border: 1px solid var(--border-subtle);
    opacity: 0.5;
    cursor: default;
    z-index: 1;
}

.floorplan-table-card.is-highlighted {
    animation: floorplan-pulse 0.8s ease-in-out 3;
    z-index: 20;
}

@keyframes floorplan-pulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.35); }
}

.floorplan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2px;
    margin-bottom: 4px;
}

.floorplan-card-title {
    font-weight: 800;
    font-size: 15px;
    line-height: 1.1;
    color: #000;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.floorplan-card-capacity {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-radius: 4px;
    padding: 1px 4px;
    white-space: nowrap;
}

.floorplan-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.floorplan-card-row.is-no-show .floorplan-card-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.floorplan-card-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.15;
    color: #000;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.floorplan-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.fp-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.fp-count-ok { color: var(--status-ok); }
.fp-count-partial { color: var(--status-warn); }
.fp-count-noshow { color: var(--text-muted); font-style: italic; }

.fp-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0 4px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.fp-pay-paid { background: var(--status-ok-bg); color: var(--status-ok); }
.fp-pay-open { background: var(--status-deny-bg); color: var(--status-deny); }
.fp-pay-deferred { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.fp-pay-kassa { background: var(--status-info-bg); color: var(--status-info); }

.floorplan-card-empty {
    text-align: center;
    font-size: 11px;
    font-style: italic;
    color: var(--text-muted);
    padding: 2px 0;
}

/* Meerdere groepen aan één tafel: visuele markering (accent-rand + scheidingslijnen) */
.floorplan-table-card.is-multi-group {
    box-shadow: 0 0 0 2px rgba(180, 146, 83, 0.45), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.floorplan-table-card.is-multi-group .floorplan-card-row + .floorplan-card-row {
    border-top: 1px dashed var(--border-subtle);
    margin-top: 4px;
    padding-top: 4px;
}

/* -- Tafel-popup (bottom sheet) -- */
.floorplan-table-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.floorplan-table-sheet[hidden] {
    display: none;
}

.floorplan-table-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.floorplan-table-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    padding: var(--spacing-md);
    max-height: 80dvh;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .floorplan-table-sheet-panel {
        left: 50%;
        right: auto;
        bottom: 50%;
        transform: translate(-50%, 50%);
        width: min(560px, calc(100vw - 48px));
        border-radius: 18px;
        max-height: 80vh;
    }
}

.floorplan-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: var(--spacing-md);
}

.floorplan-sheet-header h3 {
    font-size: 20px;
    margin: 0;
}

.floorplan-sheet-header p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.floorplan-sheet-close {
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.floorplan-sheet-checkall {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

.floorplan-sheet-groups {
    display: grid;
    gap: 10px;
}

.floorplan-sheet-group {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-primary);
    padding: 12px;
}

.floorplan-sheet-group.is-no-show {
    background: #f3f4f6;
}

.floorplan-sheet-group.is-no-show .floorplan-sheet-group-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.floorplan-sheet-group-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.floorplan-sheet-group-name {
    font-weight: 800;
    color: var(--text-primary);
}

.floorplan-sheet-group-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.floorplan-sheet-group-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.floorplan-sheet-group-actions .btn {
    width: auto;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

.floorplan-sheet-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.floorplan-sheet-stepper .btn {
    min-width: 40px;
    padding: 8px 0;
}

.floorplan-sheet-persons {
    width: 56px;
    min-height: 40px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.floorplan-checkin-header {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.floorplan-checkin-header h2 {
    font-size: 20px;
    line-height: 1.1;
    margin: 0;
}

.floorplan-checkin-header p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

.floorplan-checkin-header .btn {
    width: auto;
    flex: 0 0 auto;
}

.floorplan-checkin-search {
    margin-bottom: var(--spacing-md);
}

.floorplan-checkin-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding-right: 2px;
}

.floorplan-checkin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}

.floorplan-checkin-card.is-inside {
    border-color: rgba(5, 150, 105, 0.35);
    background: var(--status-ok-bg);
}

.floorplan-checkin-card.is-partial {
    border-color: rgba(217, 119, 6, 0.3);
    background: var(--status-warn-bg);
}

.floorplan-checkin-card.is-no-show {
    border-color: #d1d5db;
    background: #f3f4f6;
    color: var(--text-muted);
}

.floorplan-checkin-card.is-no-show .floorplan-checkin-name,
.floorplan-checkin-card.is-no-show .floorplan-checkin-meta {
    text-decoration: line-through;
    opacity: 0.72;
}

.floorplan-checkin-main {
    min-width: 0;
}

.floorplan-checkin-name {
    font-weight: 800;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.floorplan-checkin-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.floorplan-table-badge {
    background: var(--brand-accent);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
}

.floorplan-checkin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floorplan-checkin-actions .btn {
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
}

.floorplan-checkin-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 22px 12px;
    font-size: 14px;
}

.floorplan-date-picker {
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--brand-accent);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-top: 4px;
}

.floorplan-date-picker:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 2px rgba(180, 146, 83, 0.15);
}



.block-selector {
    display: flex;
    gap: 8px;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.block-selector .block-btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.block-selector .block-btn .block-name,
.block-selector .block-btn .block-time {
    display: block;
    line-height: 1.25;
}

.block-selector .block-btn .block-time {
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 11px;
}

.block-selector .block-btn.active {
    background: var(--bg-secondary);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.floorplan-departure-selector select {
    margin-bottom: 0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B6777' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.floorplan-departure-selector select option[data-grouped="true"] {
    font-weight: 700;
}

.floorplan-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    min-height: 400px;
    position: relative;
}

.floorplan-container iframe {
    width: 100%;
    height: calc(100dvh - 300px);
    min-height: 300px;
    border: none;
    display: block;
}

@supports not (height: 100dvh) {
    .floorplan-container iframe {
        height: calc(100vh - 320px);
    }
}

.floorplan-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    min-height: 300px;
    color: var(--text-muted);
    text-align: center;
}

.floorplan-placeholder p {
    font-size: 14px;
    max-width: 240px;
}

.floorplan-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    min-height: 300px;
    color: var(--text-muted);
}

.floorplan-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.floorplan-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    min-height: 300px;
    color: var(--status-deny);
    text-align: center;
    font-size: 14px;
}

/* ==================== STATS CARD ==================== */
.stats-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 12px 16px;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-card-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.stats-card-clickable:hover {
    transform: translateY(-1px);
    border-color: rgba(29, 85, 119, 0.28);
    box-shadow: var(--shadow-float);
}

.stats-card-clickable:focus-visible {
    outline: 3px solid rgba(29, 85, 119, 0.25);
    outline-offset: 3px;
}

.stats-drilldown-hint {
    margin-top: 4px;
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 800;
}

.walk-on-stats-summary {
    margin-top: 4px;
    color: var(--brand-accent);
    font-size: 12px;
    font-weight: 800;
}

/* ==================== BUTTON VARIANTS ==================== */
.btn-sm {
    width: auto;
    padding: 8px 12px;
    font-size: 14px;
}

.btn-counter {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border-radius: 12px;
    flex-shrink: 0;
}

/* ==================== SCREEN HEADER VARIANT ==================== */
.screen-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

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

.walk-on-trigger-btn {
    margin-top: 8px;
}

.field-label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.walk-on-info-box {
    background: var(--status-info-bg);
    border-color: var(--status-info);
    color: var(--status-info);
}

.walk-on-ship-toggle {
    margin-bottom: 0;
}

.walk-on-persons-group {
    margin-top: 0;
}

.walk-on-timeslot-help {
    min-height: 18px;
    margin-top: -6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.walk-on-timeslot-help.is-error {
    color: var(--status-deny);
}

.walk-on-custom-timeslot {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.walk-on-custom-time-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.walk-on-custom-time-field input {
    color: var(--text-primary);
    font-weight: 700;
}

.timeslot-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeslot-fallback-note {
    padding: 10px 12px;
    background: var(--status-info-bg);
    color: var(--status-info);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}

.timeslot-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
}

.timeslot-summary-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.timeslot-summary-number {
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 800;
}

.timeslot-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeslot-stat-row {
    padding: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
}

.timeslot-stat-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.timeslot-stat-time {
    color: var(--brand-primary);
    font-size: 16px;
    font-weight: 800;
}

.timeslot-stat-meta {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.timeslot-stat-count {
    flex-shrink: 0;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.timeslot-stat-divider {
    color: var(--text-muted);
}

.timeslot-progress {
    height: 8px;
    margin-top: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: 999px;
}

.timeslot-progress-fill {
    height: 100%;
    background: var(--brand-primary);
    border-radius: inherit;
}

.timeslot-empty-state {
    padding: 22px 16px;
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
}

.timeslot-empty-state.is-error {
    border-color: var(--status-deny-bg);
    background: var(--status-deny-bg);
}

.timeslot-empty-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
}

.timeslot-empty-copy {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

/* ==================== USER CARD ==================== */
.user-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-card);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==================== HISTORY CARD SUB-ELEMENTS ==================== */
.history-name {
    font-weight: 800;
    color: var(--brand-primary);
}

.history-contact {
    font-size: 14px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-details {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.history-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.walk-on-history-card {
    border-color: rgba(180, 146, 83, 0.35);
    background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
}

.walk-on-history-card.is-deleted {
    opacity: 0.72;
}

/* ==================== MODAL FORM ==================== */
.modal-form .form-group {
    margin-bottom: 12px;
}

.modal-form .form-group:last-of-type {
    margin-bottom: var(--spacing-md);
}

.modal-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.modal-form .input-field {
    margin-bottom: 0;
}

/* ==================== MOBILE REFINEMENTS ==================== */
@media (max-width: 400px) {
    .screen {
        padding: var(--spacing-md);
    }

    .floorplan-selector-row {
        grid-template-columns: 1fr;
    }

    .floorplan-download-btn {
        width: 100%;
    }

    .floorplan-checkin-header,
    .floorplan-checkin-card {
        grid-template-columns: 1fr;
    }

    .floorplan-checkin-header {
        display: grid;
    }

    .floorplan-checkin-actions {
        justify-content: stretch;
    }

    .floorplan-checkin-actions .btn {
        width: 100%;
    }

}

/* ==================== DESKTOP LAYOUT ==================== */
@media (min-width: 768px) {

    /* -- Top Header Bar -- */
    .screen-header {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-bottom: var(--spacing-lg);
        border-bottom: 1px solid var(--border-subtle);
        margin-bottom: var(--spacing-lg);
    }

    .screen-header-with-action {
        align-items: flex-start;
    }

    /* -- App Shell: sidebar + content -- */
    #app {
        display: flex;
        flex-direction: row;
        min-height: 100vh;
    }

    /* -- Sidebar Navigation -- */
    .bottom-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: auto;
        width: 220px;
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-xl) var(--spacing-md);
        padding-top: 32px;
        border-top: none;
        border-right: 1px solid var(--border-subtle);
        background: var(--bg-primary);
        box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04);
        gap: 4px;
        overflow-y: auto;
        z-index: 100;
    }

    .nav-item {
        flex: 0 0 auto;
        flex-direction: row;
        justify-content: flex-start;
        min-width: auto;
        width: 100%;
        gap: 12px;
        padding: 10px 14px;
        border-radius: var(--radius-button);
        transition: background 0.15s, color 0.2s;
        overflow: visible;
    }

    .nav-item:hover {
        background: var(--bg-tertiary);
    }

    .nav-item.active {
        background: var(--status-info-bg);
        color: var(--brand-primary);
    }

    .nav-item span {
        font-size: 14px;
        font-weight: 500;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    /* -- Sidebar Logo -- */
    .sidebar-logo {
        display: block;
        width: 160px;
        max-height: 40px;
        object-fit: contain;
        margin: 0 auto 20px auto;
    }

    /* -- Cascade Tools divider & links -- */
    .cascade-tools-divider {
        width: calc(100% - 32px);
        height: 1px;
        background: var(--border-subtle);
        margin: 12px auto 8px;
    }

    .cascade-tools-divider {
        display: block;
    }

    .cascade-tool-link {
        display: flex;
        font-size: 13px;
        opacity: 0.6;
    }

    .cascade-tool-link:hover {
        opacity: 1;
    }

    /* -- Hide scanner header logo on desktop -- */
    .scanner-header-logo {
        display: none;
    }

    /* -- Content Area -- */
    .screen {
        flex: 1;
        max-width: none;
        width: calc(100% - 220px);
        margin: 0;
        margin-left: 220px;
        padding: var(--spacing-xl) 40px;
        padding-bottom: 40px;
        min-height: 100vh;
        background: var(--bg-tertiary);
    }

    body {
        background-color: var(--bg-tertiary);
        padding-bottom: 0;
    }

    /* -- Cards and containers inside screens -- */
    .scanner-container,
    .manual-input,
    .ship-toggle,
    #stats-container,
    .floorplan-container,
    .floorplan-departure-selector,
    .floorplan-ship-toggle {
        background: var(--bg-primary);
        border-radius: var(--radius-card);
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-card);
        border: 1px solid var(--border-subtle);
        margin-bottom: var(--spacing-md);
    }

    /* Het kaartpaneel meet zijn eigen breedte: vaste, voorspelbare padding */
    .floorplan-container {
        padding: 16px;
    }

    .reservations-list {
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

    .history-list {
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

    /* -- Reservation cards standalone -- */
    .reservation-card {
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-card);
        border: 1px solid var(--border-subtle);
        margin-bottom: var(--spacing-sm);
        width: 100%;
    }

    .reservation-card:last-child {
        margin-bottom: 0;
    }

    /* -- History cards standalone -- */
    .history-card {
        border-radius: var(--radius-card);
        margin-bottom: var(--spacing-sm);
    }

    .history-card:last-child {
        margin-bottom: 0;
    }

    /* -- Modal tweaks -- */
    .modal-content {
        max-width: 520px;
    }

    /* -- Header logo sizing for desktop -- */
    .header-logo {
        width: 180px;
        max-height: 44px;
    }

    /* -- Search bar full width in card -- */
    #reservation-search {
        max-width: none;
    }
}

/* ==================== PAYMENT / SETTLE ==================== */
.payment-banner {
    animation: fadeIn 0.2s ease-out;
}

.payment-method-btn {
    transition: all 0.15s ease;
    border: 2px solid var(--border-subtle, #ddd) !important;
}

.payment-method-btn.active {
    border-color: var(--brand-accent) !important;
    background: rgba(180, 146, 83, 0.1) !important;
    color: var(--brand-accent) !important;
    font-weight: 700 !important;
}

.payment-badge-open {
    background: var(--status-deny-bg);
    color: var(--status-deny);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.payment-badge-paid {
    background: var(--status-ok-bg);
    color: var(--status-ok);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* ==================== OFFLINE ERROR STATE ==================== */
.offline-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.offline-error-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 16px;
    margin-bottom: 4px;
}

.offline-error-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 260px;
    line-height: 1.4;
}

.offline-retry-btn {
    padding: 10px 24px;
    background: var(--brand-accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.offline-retry-btn:active {
    opacity: 0.7;
}

.offline-banner {
    background: var(--status-warn);
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
    z-index: 1000;
    position: sticky;
    top: 0;
}
