.card {
    background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, var(--surface) 35%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 12px 24px rgba(0,0,0,.18);
}
.card-header { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 9px; }
.card-title { font-size: 13px; font-weight: 500; color: var(--cream); flex: 1; }
.card-body { padding: 16px; }
.card-footer { padding: 12px 16px; border-top: 1px solid var(--border); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid transparent; font-family: var(--font); transition: all var(--t); text-decoration: none; white-space: nowrap; user-select: none; }
.btn:active { transform: scale(.97); }
.btn-gold    { background: var(--gold); color: var(--gold-contrast); border-color: var(--gold); box-shadow: 0 8px 22px rgba(214,163,79,.28); }
.btn-gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--gold-contrast); box-shadow: 0 10px 24px rgba(214,163,79,.34); }
.btn-gold i, .btn-gold .bi { color: inherit; }
.btn-ghost   { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--cream); border-color: var(--border-2); }
.btn-success { background: var(--success-lt); color: #4ADE80; border: 1px solid rgba(74,222,128,.2); }
.btn-danger  { background: var(--danger-lt); color: #F87171; border: 1px solid rgba(248,113,113,.2); }
.btn-warning { background: var(--warning-lt); color: #FBA94C; border: 1px solid rgba(251,169,76,.2); }
.btn-sm  { padding: 5px 10px; font-size: 11.5px; border-radius: 7px; }
.btn-lg  { padding: 11px 24px; font-size: 14.5px; border-radius: 11px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }

.form-group  { margin-bottom: 14px; }
.form-label  { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; letter-spacing: .05em; text-transform: uppercase; }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13.5px; font-family: var(--font); color: var(--cream); background: var(--surface-2); outline: none; transition: border-color var(--t), box-shadow var(--t); height: 38px; }
.form-control:focus { border-color: var(--gold-dk); box-shadow: 0 0 0 3px rgba(201,168,76,.12); }
.form-control::placeholder { color: var(--faint); }
.form-control option { background: var(--dark); }
textarea.form-control { height: auto; resize: vertical; }

select:not(.select2-hidden-accessible) {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238F6F59' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
}

select:not(.select2-hidden-accessible)::-ms-expand {
    display: none;
}

select.form-control:not(.select2-hidden-accessible) {
    background-color: var(--surface-2);
}

/* Number inputs — remove native spinner's white background box (covers/guests, qty, etc.) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Custom number stepper — up/down arrows inside the field's right edge (dark-theme friendly) */
.num-stepper {
    position: relative;
}
.num-stepper .form-control {
    padding-right: 34px;
}
.num-stepper__btns {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 28px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 0 7px 7px 0;
    overflow: hidden;
}
.num-stepper__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted, #b9a99b);
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, color 0.12s;
}
.num-stepper__btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--gold, #e0b877);
}
.num-stepper__btn:active {
    background: rgba(255, 255, 255, 0.12);
}
.num-stepper__btn[data-step="up"] {
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.12));
}

.venue-selector select:not(.select2-hidden-accessible) {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238F6F59' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 2px center !important;
    background-size: 10px !important;
    padding-right: 18px;
}

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.badge-gold    { background: var(--gold-bg2);    color: var(--gold-lt); }
.badge-success { background: var(--success-lt);  color: #4ADE80; }
.badge-warning { background: var(--warning-lt);  color: #FBA94C; }
.badge-danger  { background: var(--danger-lt);   color: #F87171; }
.badge-info    { background: var(--info-lt);     color: #60A5FA; }
.badge-muted   { background: var(--surface-3);   color: var(--muted); }

/* ── Global hover tooltip ── */
.app-tooltip {
    position: fixed;
    z-index: 4000;
    max-width: 260px;
    background: var(--surface-3);
    color: var(--cream);
    border: 1px solid var(--border-2);
    border-radius: 7px;
    padding: 5px 9px;
    font-size: 11.5px;
    font-weight: 500;
    font-family: var(--font);
    line-height: 1.35;
    pointer-events: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
}
.app-tooltip.show { opacity: 1; transform: translateY(0); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 10px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; text-align: left; }
.data-table td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--cream); vertical-align: middle; }
.data-table tbody tr { transition: background var(--t); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }

.rtbl { width: 100%; border-collapse: collapse; }
.rtbl th {
    font-size: 10px;
    font-weight: 700;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.rtbl td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--cream); }
.rtbl tbody tr { transition: background var(--t); }
.rtbl tbody tr:hover { background: var(--surface-2); }
.rtbl tbody tr:last-child td { border-bottom: none; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,.045) 0%, var(--surface) 40%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color var(--t), transform var(--t), box-shadow var(--t);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 20px rgba(0,0,0,.16);
}
.stat-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 14px 26px rgba(0,0,0,.24); }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.si-gold    { background: var(--gold-bg2);   color: var(--gold); }
.si-success { background: var(--success-lt); color: #4ADE80; }
.si-warning { background: var(--warning-lt); color: #FBA94C; }
.si-danger  { background: var(--danger-lt);  color: #F87171; }
.stat-label { font-size: 11px; color: var(--muted); margin-bottom: 3px; letter-spacing: .03em; }
.stat-value { font-size: 24px; font-weight: 500; color: var(--cream); font-family: var(--mono); letter-spacing: -.5px; }
.stat-change { font-size: 11.5px; margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.sc-up { color: #4ADE80; }
.sc-dn { color: #F87171; }

#toast-rack { position: fixed; bottom: calc(var(--footer-h) + 12px); right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface-3); border: 1px solid var(--border-2); color: var(--cream); padding: 10px 15px; border-radius: 11px; font-size: 13px; display: flex; align-items: center; gap: 9px; min-width: 230px; pointer-events: all; }
.toast.success { border-color: rgba(74,222,128,.25); background: rgba(45,159,107,.15); }
.toast.warning { border-color: rgba(251,169,76,.25); background: rgba(212,135,58,.15); }
.toast.danger  { border-color: rgba(248,113,113,.25); background: rgba(192,57,43,.15); }
.toast.gold    { border-color: var(--gold-dk); background: var(--gold-bg2); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-bg.open { display: flex; }
.modal { background: var(--dark); border: 1px solid var(--border-2); border-radius: var(--radius-lg); width: 100%; max-width: 500px; animation: modalUp var(--t-slow) ease both; }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-title { font-size: 14px; font-weight: 500; color: var(--cream); flex: 1; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 18px; transition: color var(--t); }
.modal-close:hover { color: var(--cream); }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

.kds-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kds-dot.new     { background: #60A5FA; }
.kds-dot.cooking { background: #FBA94C; animation: kdsPulse 1.2s ease infinite; }
.kds-dot.ready   { background: #4ADE80; }
.kds-dot.served  { background: var(--faint); }

.table-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 8px; cursor: pointer; transition: all var(--t); text-align: center; }
.table-tile:hover { transform: translateY(-2px); border-color: var(--border-2); }
.table-tile.occupied { border-color: rgba(226,161,74,.45); background: var(--state-occupied-bg); }
.table-tile.reserved { border-color: rgba(209,139,97,.45); background: var(--state-reserved-bg); }
.table-tile.dirty    { border-color: rgba(189,106,74,.45); background: var(--state-needs-clean-bg); }
.table-tile.blocked  { opacity: .4; pointer-events: none; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* Standard Page Header & Title block CSS */
.page-header-block {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.page-title-text h1 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--cream);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.page-title-text p {
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 0 0;
    line-height: 1.4;
}
.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: rgba(248, 113, 113, 0.6);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 11.5px;
    color: #FCA5A5; /* subtle red for dark backgrounds */
    letter-spacing: .02em;
}

/* Finance / report tables — horizontal scroll on small screens */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.finance-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 4px;
}

/* Finance daily-ops / VAT / AP section sub-navigation */
.finance-vat-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.finance-vat-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.finance-vat-subnav-link:hover,
.finance-vat-subnav-link:focus {
    color: var(--cream);
    background: var(--surface-2);
    text-decoration: none;
}

.finance-vat-subnav-link:visited {
    color: var(--muted);
}

.finance-vat-subnav-link:visited:hover,
.finance-vat-subnav-link:visited:focus {
    color: var(--cream);
}

.finance-vat-subnav-link.is-active,
.finance-vat-subnav-link.is-active:visited {
    color: var(--gold-contrast, var(--void));
    background: var(--gold);
    box-shadow: 0 4px 14px rgba(214, 163, 79, 0.25);
}

.finance-table { min-width: 560px; }
.finance-table tfoot td {
    border-top: 2px solid var(--border);
    font-size: 13px;
    color: var(--cream);
}

@media (max-width: 768px) {
    .finance-table th,
    .finance-table td,
    .data-table th,
    .data-table td {
        padding: 10px 10px;
        font-size: 12px;
    }
    .finance-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .finance-report-grid {
        grid-template-columns: 1fr !important;
    }
    .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .page-header-block { gap: 12px; }
    .page-actions { flex-wrap: wrap; }
    .modal-dialog { margin: 8px; max-height: calc(100vh - 16px); }
    .modal-body { max-height: calc(100vh - 140px); overflow-y: auto; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .page-title-text h1 { font-size: 20px; }
    .form-control { font-size: 14px; }
}

/* ══════════════════════════════════════════════════════════════════
   Checkboxes, radios & toggles — theme-aware, system-wide
   ══════════════════════════════════════════════════════════════════ */

@keyframes app-check-pop {
    0%   { transform: scale(0.82); }
    55%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}

@keyframes app-check-tick {
    0%   { transform: rotate(45deg) scale(0); opacity: 0; }
    100% { transform: rotate(45deg) scale(1); opacity: 1; }
}

@keyframes app-radio-pop {
    0%   { transform: scale(0.82); }
    55%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}

@keyframes app-radio-dot {
    0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Bare checkboxes — full themed box + animated tick */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex-shrink: 0;
    margin: 0;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: var(--surface-2);
    cursor: pointer;
    vertical-align: middle;
    transition:
        border-color var(--t),
        background-color var(--t),
        box-shadow var(--t),
        transform var(--t-spring);
    position: relative;
}

input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--border-2);
    background: color-mix(in srgb, var(--gold) 7%, var(--surface-2));
}

input[type="checkbox"]:checked {
    border-color: var(--gold-dk);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 38%, transparent);
    animation: app-check-pop var(--t-spring) both;
    background-color: var(--gold);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 5l3.2 3L11 1'/%3E%3C/svg%3E"),
        linear-gradient(145deg, var(--gold-dk), var(--gold));
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 9px, cover;
}

input[type="checkbox"]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--gold) 50%, transparent);
    outline-offset: 2px;
}

input[type="checkbox"]:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

/* Labels wrapping a bare checkbox */
label:has(> input[type="checkbox"]):not(.ts-card):not(.ds-card):not(.hub-theme-card):not(.cms-theme-card):not(.app-check):not(.app-check--card):not(.app-radio):not(.app-radio--card) {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    line-height: 1.45;
    color: var(--cream);
}

label:has(> input[type="checkbox"]):not(.ts-card):not(.ds-card):not(.hub-theme-card):not(.cms-theme-card):not(.app-check):not(.app-check--card):not(.app-radio):not(.app-radio--card) > input[type="checkbox"] {
    margin-top: 2px;
}

/* Bare radios — full themed ring + animated dot */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex-shrink: 0;
    margin: 0;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    cursor: pointer;
    vertical-align: middle;
    transition:
        border-color var(--t),
        background-color var(--t),
        box-shadow var(--t),
        transform var(--t-spring);
    position: relative;
}

input[type="radio"]:hover:not(:disabled) {
    border-color: var(--border-2);
    background: color-mix(in srgb, var(--gold) 7%, var(--surface-2));
}

input[type="radio"]:checked {
    border-color: var(--gold-dk);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 38%, transparent);
    animation: app-radio-pop var(--t-spring) both;
    background-color: var(--surface-2);
    background-image: radial-gradient(
        circle at center,
        var(--gold) 0%,
        var(--gold) 38%,
        transparent 40%
    );
}

input[type="radio"]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--gold) 50%, transparent);
    outline-offset: 2px;
}

input[type="radio"]:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

/* Labels wrapping a bare radio */
label:has(> input[type="radio"]):not(.ts-card):not(.ds-card):not(.hub-theme-card):not(.cms-theme-card):not(.app-check):not(.app-check--card):not(.app-radio):not(.app-radio--card) {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    line-height: 1.45;
    color: var(--cream);
}

label:has(> input[type="radio"]):not(.ts-card):not(.ds-card):not(.hub-theme-card):not(.cms-theme-card):not(.app-check):not(.app-check--card):not(.app-radio):not(.app-radio--card) > input[type="radio"] {
    margin-top: 2px;
}

/* Vertical radio groups */
.app-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-radio-group--card {
    gap: 8px;
}

/* Hidden card pickers & visually-hidden radios — skip global chrome */
.ts-card input[type="radio"],
.ds-card input[type="radio"],
input[type="radio"].visually-hidden {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    transform: none;
    animation: none;
    background-image: none;
    pointer-events: none;
}

/* Switch / toggle inputs — keep native input hidden */
.fm-switch input[type="checkbox"],
.menu-switch input[type="checkbox"],
.cms-toggle-input,
.form-switch .form-check-input {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    transform: none;
    animation: none;
    background-image: none;
    cursor: pointer;
}

/* App check — accessible custom checkbox with animated tick */
.app-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    line-height: 1.45;
    color: var(--cream);
    font-size: 13.5px;
    position: relative;
}

.app-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: none;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
    min-height: 0;
    background: none;
    box-shadow: none;
    animation: none;
    background-image: none;
}

.app-check__box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: var(--surface-2);
    position: relative;
    transition:
        border-color var(--t),
        background-color var(--t),
        box-shadow var(--t),
        transform var(--t-spring);
}

.app-check__box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid var(--gold-contrast);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: transform var(--t-spring), opacity var(--t);
}

.app-check:hover .app-check__box {
    border-color: var(--border-2);
    background: color-mix(in srgb, var(--gold) 7%, var(--surface-2));
}

.app-check input[type="checkbox"]:checked + .app-check__box {
    background: linear-gradient(145deg, var(--gold-dk), var(--gold));
    border-color: var(--gold-dk);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 38%, transparent);
    transform: scale(1.04);
}

.app-check input[type="checkbox"]:checked + .app-check__box::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
    animation: app-check-tick var(--t-spring) both;
}

.app-check input[type="checkbox"]:focus-visible + .app-check__box {
    outline: 2px solid color-mix(in srgb, var(--gold) 50%, transparent);
    outline-offset: 2px;
}

.app-check input[type="checkbox"]:disabled + .app-check__box {
    opacity: 0.42;
    cursor: not-allowed;
}

.app-check input[type="checkbox"]:disabled ~ .app-check__label {
    opacity: 0.55;
}

.app-check__label {
    flex: 1;
    min-width: 0;
}

/* Card-style checkbox option (filters, multi-select rows) */
.app-check--card {
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition:
        border-color var(--t),
        background-color var(--t),
        box-shadow var(--t);
}

.app-check--card:hover {
    border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
    background: color-mix(in srgb, var(--gold) 5%, var(--surface-2));
}

.app-check--card:has(input:checked) {
    border-color: var(--gold-dk);
    background: color-mix(in srgb, var(--gold) 10%, var(--surface-2));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 20%, transparent);
}

.app-check--card .app-check__box {
    margin-top: 0;
}

/* App radio — accessible custom radio with animated dot */
.app-radio {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    line-height: 1.45;
    color: var(--cream);
    font-size: 13.5px;
    position: relative;
}

.app-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: none;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
    min-height: 0;
    background: none;
    box-shadow: none;
    animation: none;
    background-image: none;
}

.app-radio__ring {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    position: relative;
    transition:
        border-color var(--t),
        background-color var(--t),
        box-shadow var(--t),
        transform var(--t-spring);
}

.app-radio__ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform var(--t-spring), opacity var(--t);
}

.app-radio:hover .app-radio__ring {
    border-color: var(--border-2);
    background: color-mix(in srgb, var(--gold) 7%, var(--surface-2));
}

.app-radio input[type="radio"]:checked + .app-radio__ring {
    border-color: var(--gold-dk);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--gold) 38%, transparent);
    transform: scale(1.04);
}

.app-radio input[type="radio"]:checked + .app-radio__ring::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: app-radio-dot var(--t-spring) both;
}

.app-radio input[type="radio"]:focus-visible + .app-radio__ring {
    outline: 2px solid color-mix(in srgb, var(--gold) 50%, transparent);
    outline-offset: 2px;
}

.app-radio input[type="radio"]:disabled + .app-radio__ring {
    opacity: 0.42;
    cursor: not-allowed;
}

.app-radio input[type="radio"]:disabled ~ .app-radio__label {
    opacity: 0.55;
}

.app-radio__label {
    flex: 1;
    min-width: 0;
}

/* Card-style radio option */
.app-radio--card {
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition:
        border-color var(--t),
        background-color var(--t),
        box-shadow var(--t);
}

.app-radio--card:hover {
    border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
    background: color-mix(in srgb, var(--gold) 5%, var(--surface-2));
}

.app-radio--card:has(input:checked) {
    border-color: var(--gold-dk);
    background: color-mix(in srgb, var(--gold) 10%, var(--surface-2));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 20%, transparent);
}

.app-radio--card .app-radio__ring {
    margin-top: 0;
}

/* Bootstrap-compatible form-check */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 1.25rem;
    margin-bottom: 0;
    padding-left: 0;
}

.form-check:not(.form-switch) .form-check-input {
    margin-top: 2px;
}

.form-check-label {
    font-size: 13.5px;
    color: var(--cream);
    cursor: pointer;
    line-height: 1.45;
}

/* Theme toggle switch (form-switch) */
.form-switch {
    display: inline-flex;
    align-items: center;
    padding-left: 0;
    min-height: 0;
}

.form-switch .form-check-input {
    position: relative;
    opacity: 1;
    width: 40px;
    height: 22px;
    min-width: 40px;
    min-height: 22px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color var(--t), border-color var(--t);
}

.form-switch .form-check-input::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cream);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
    transition: transform var(--t-spring);
}

.form-switch .form-check-input:checked {
    background: var(--gold);
    border-color: var(--gold-dk);
    background-image: none;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--gold) 35%, transparent);
    animation: none;
    transform: none;
}

.form-switch .form-check-input:checked::before {
    transform: translateX(18px);
}

.form-switch .form-check-input:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--gold) 50%, transparent);
    outline-offset: 2px;
}

/* Unified app switch (alias for fm-switch / menu-switch patterns) */
.app-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.app-switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    cursor: pointer;
    z-index: 1;
}

.app-switch__track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 22px;
    transition: background-color var(--t), border-color var(--t);
    pointer-events: none;
}

.app-switch__track::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cream);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
    transition: transform var(--t-spring);
}

.app-switch input:checked ~ .app-switch__track {
    background: var(--gold);
}

.app-switch input:checked ~ .app-switch__track::before {
    transform: translateX(18px);
}

@media (prefers-reduced-motion: reduce) {
    input[type="checkbox"],
    input[type="radio"],
    .app-check__box,
    .app-check__box::after,
    .app-radio__ring,
    .app-radio__ring::after,
    .form-switch .form-check-input::before,
    .app-switch__track::before {
        transition: none;
        animation: none !important;
    }

    input[type="checkbox"]:checked,
    input[type="radio"]:checked {
        transform: none;
    }
}

/* Laravel bootstrap-5 paginator (Bootstrap utility CSS is not loaded globally) */
nav[role="navigation"][aria-label="Pagination Navigation"] {
    display: block;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .d-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .d-none {
    display: none;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .flex-fill {
    flex: 1 1 auto;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .justify-content-between,
nav[role="navigation"][aria-label="Pagination Navigation"] .justify-content-sm-between {
    justify-content: space-between;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .align-items-sm-center {
    align-items: center;
}

@media (min-width: 576px) {
    nav[role="navigation"][aria-label="Pagination Navigation"] .d-sm-none {
        display: none !important;
    }

    nav[role="navigation"][aria-label="Pagination Navigation"] .d-sm-flex {
        display: flex !important;
    }

    nav[role="navigation"][aria-label="Pagination Navigation"] .flex-sm-fill {
        flex: 1 1 auto;
    }
}

nav[role="navigation"][aria-label="Pagination Navigation"] .small {
    font-size: 12px;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .text-muted {
    color: var(--muted);
}

nav[role="navigation"][aria-label="Pagination Navigation"] .fw-semibold {
    font-weight: 600;
    color: var(--cream);
}

nav[role="navigation"][aria-label="Pagination Navigation"] .pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: border-color var(--t), color var(--t), background var(--t);
}

nav[role="navigation"][aria-label="Pagination Navigation"] .page-item.active .page-link {
    background: var(--gold);
    color: var(--void);
    border-color: var(--gold);
    font-weight: 600;
}

nav[role="navigation"][aria-label="Pagination Navigation"] .page-item:not(.active):not(.disabled) .page-link:hover {
    background: var(--surface);
    color: var(--cream);
    border-color: var(--gold-dk);
}

nav[role="navigation"][aria-label="Pagination Navigation"] .page-item.disabled .page-link {
    opacity: 0.45;
    cursor: not-allowed;
}
