:root {
    --bg: #f5efe0;
    --surface: #ffffff;
    --surface-strong: #1f1715;
    --text: #1f1715;
    --muted: #706a66;
    --line: #d8d2cb;
    --primary: #cd2653;
    --primary-dark: #a61d42;
    --accent: #cd2653;
    --danger: #cd2653;
    --warning: #fff7dd;
    --ok: #2f6b46;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14.333px/1.45 "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

summary::marker {
    color: var(--muted);
    font-size: 19.333px;
}

summary::-webkit-details-marker {
    color: var(--muted);
    font-size: 19.333px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 19px;
    padding: 13px 24px;
    background: var(--primary);
    border-bottom: 0;
    color: white;
    box-shadow: 0 12px 30px rgba(33, 22, 20, .18);
    transition: padding .18s ease, gap .18s ease, box-shadow .18s ease;
    will-change: padding;
}

.topbar.is-condensed {
    gap: 14px;
    padding-top: 8px;
    padding-bottom: 8px;
    box-shadow: 0 8px 22px rgba(33, 22, 20, .16);
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    line-height: 0;
    max-width: 264px;
    overflow: hidden;
    opacity: 1;
    transition: max-width .18s ease, opacity .14s ease;
}

.brand img {
    display: block;
    width: auto;
    height: 53px;
    max-width: 264px;
    object-fit: contain;
    transition: height .18s ease, max-width .18s ease;
}

.topbar.is-condensed .brand {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
}

.topbar.is-condensed .brand img {
    height: 0;
    max-width: 0;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 5px;
    background: rgba(255, 255, 255, .10);
    color: #ffffff;
    cursor: pointer;
}

.nav-toggle span:not(.visually-hidden) {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.topbar nav a,
.nav-menu summary {
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 5px 7px;
    color: #ffffff;
    opacity: .92;
    font-weight: 650;
}

.topbar nav a:hover,
.nav-menu summary:hover {
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    text-decoration: none;
    opacity: 1;
}

.nav-menu {
    position: relative;
    min-width: 0;
}

.nav-menu summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nav-menu summary::-webkit-details-marker {
    display: none;
}

.nav-menu summary::after {
    content: "▾";
    display: inline-block;
    margin-left: 6px;
    font-size: 19.333px;
    line-height: 1;
}

.nav-menu[open] summary::after {
    transform: rotate(180deg);
}

.nav-menu div {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 10;
    min-width: 190px;
    display: grid;
    gap: 1px;
    padding: 5px;
    background: var(--surface);
    border: 1px solid rgba(31, 23, 21, .12);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(31, 23, 21, .2);
}

.topbar .nav-menu div a {
    display: block;
    min-height: 26px;
    padding: 4px 7px;
    border-radius: 4px;
    color: var(--text);
    opacity: 1;
    white-space: nowrap;
    line-height: 1.25;
}

.topbar .nav-menu div a:hover {
    background: #f5efe0;
    color: var(--text);
}

.nav-menu-separator {
    display: block;
    height: 1px;
    margin: 4px 2px;
    background: var(--line);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 45px;
}

.page-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0 auto;
}

.app-version {
    position: fixed;
    right: 12px;
    bottom: 8px;
    color: var(--muted);
    font-size: 12.333px;
    opacity: .58;
}

.app-version a {
    color: inherit;
    text-decoration: none;
}

.app-version a:hover {
    color: var(--primary);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

h1, h2 { margin: 0; line-height: 1.15; }
h1, h2 {
    font-family: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    color: var(--text);
}
h1 { font-size: 28.333px; }
h2 { font-size: 19.333px; }
p { color: var(--muted); margin: 6px 0 0; }

.button, button {
    border: 1px solid #cdbb98;
    background: var(--surface);
    color: var(--text);
    border-radius: 4px;
    padding: 5px 8px;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

.button.primary, button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.button.danger, button.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.button.ok, button.ok {
    background: var(--ok);
    border-color: var(--ok);
    color: white;
}

.button.primary:hover, button.primary:hover {
    background: var(--primary-dark);
}

.button.ok:hover, button.ok:hover {
    background: #25583a;
}

.button:hover { text-decoration: none; }

p + .button,
p + button,
.alert + .button,
.alert + button,
.notice-success + .button,
.notice-success + button,
.help-text + .button,
.help-text + button {
    margin-top: 12px;
}

.button.is-loading::before,
button.is-loading::before {
    content: "";
    width: 13px;
    height: 13px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

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

.table-wrap, .panel, .login-card, .empty {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 23, 21, .06);
}

.panel, .login-card, .empty { padding: 18px; }
.empty { text-align: center; }

.compact-page-head {
    margin-top: 28px;
}

.section-page-head {
    margin-bottom: 12px;
}

.subsection-title {
    margin: 16px 0 6px;
    font-size: 16.333px;
}

.registration-date-line {
    font-weight: 700;
}

.registration-time-line {
    color: var(--text);
    font-weight: 400;
}

.registration-success-event {
    display: grid;
    gap: 3px;
    margin-top: 10px;
}

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

th, td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #ffffff;
    font-size: 12.333px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #1f1715;
}

tr:last-child td { border-bottom: 0; }
.row-warning { background: var(--warning); }
.muted-row { opacity: .55; }
.booking-row-complete { background: #f0f8f1; }
.booking-row-incomplete { background: #fff2f0; }

.actions {
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
}

.actions a, .actions form {
    display: inline-block;
    margin-left: 8px;
}

.actions .booking-move-form {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    vertical-align: middle;
}

.actions .icon-button,
.actions .action-icon-form {
    margin-left: 0;
    vertical-align: middle;
}

.actions a.icon-button {
    display: inline-grid;
}

.action-button-group {
    display: inline-flex;
    align-items: center;
    justify-content: end;
    gap: 8px;
    max-width: 100%;
}

.action-button-group > * {
    margin-left: 0;
}

.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    min-height: auto;
    color: var(--danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 2px 6px;
    background: #ece7e1;
    color: var(--text);
    font-size: 12.333px;
    font-weight: 650;
}

.badge.danger { background: #f8dedb; color: var(--danger); }
.badge.ok { background: #dff3e8; color: var(--ok); }
.badge.neutral { background: #e7dfd2; color: #5a5148; }
.badge.todo-status-new { background: #f8dedb; color: var(--danger); }
.badge.todo-status-in-progress { background: #ddeaf8; color: #24639b; }
.badge.todo-status-waiting-feedback { background: #e7e3dd; color: #5c5a58; }
.badge.todo-status-done { background: #dff3e8; color: var(--ok); }

.badge-stack {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.compact-cell-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12.333px;
    line-height: 1.2;
}

.booking-contact-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.booking-contact-line strong {
    overflow-wrap: anywhere;
}

.inline-copy-button {
    width: 22px;
    min-width: 22px;
    min-height: 22px;
    height: 22px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    color: var(--primary);
    font-size: 14.333px;
    line-height: 1;
}

.inline-copy-button:hover {
    background: #f8edf1;
    text-decoration: none;
}

.booking-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.danger-note {
    color: var(--danger);
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(44, 31, 25, .07);
}

.form-stack {
    display: grid;
    gap: 10px;
}

label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 13.333px;
    font-weight: 400;
}

.booking-edit label,
.capacity-edit-form label,
.confirm-dialog label,
.event-filter-row label,
.public-registration-form label,
.registration-participant-fields label {
    font-weight: 400;
}

.required-marker {
    display: inline;
    margin-left: 0.15rem;
    padding: 0;
    background: transparent;
    color: var(--danger);
    font-weight: 700;
}

.required-legend {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 0.92em;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #cdbb98;
    border-radius: 4px;
    padding: 3px 6px;
    color: var(--text);
    font: 15.333px/1.45 "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    background: white;
	min-height: 28px;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    min-height: 28px;
    line-height: 1.45;
    appearance: none;
    -webkit-appearance: none;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
    min-height: 0;
    text-align: left;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(143, 29, 29, .12);
    outline: 0;
}

input:required:invalid,
select:required:invalid,
textarea:required:invalid {
    border-color: var(--danger);
    background: #fff6f5;
}

input:required:invalid:focus,
select:required:invalid:focus,
textarea:required:invalid:focus {
    box-shadow: 0 0 0 3px rgba(205, 38, 83, .14);
}

.number-input {
    appearance: textfield;
    -moz-appearance: textfield;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

textarea { resize: vertical; }

textarea[data-auto-grow] {
    min-height: 92px;
    overflow: hidden;
    resize: none;
}
.wide, .form-actions { grid-column: 1 / -1; }

.location-edit-layout {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.15fr);
    gap: 18px;
    align-items: stretch;
}

.location-field-column,
.location-contact-section,
.location-contact-grid {
    display: grid;
    gap: 13px;
}

.location-contact-section {
    padding-top: 3px;
}

.location-contact-section h2 {
    font-size: 18.333px;
}

.location-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.location-map-panel {
    display: grid;
    gap: 10px;
    grid-template-rows: auto minmax(0, 1fr);
}

.location-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.location-map-toolbar h2 {
    font-size: 16.333px;
}

.location-map-toolbar p {
    margin-top: 3px;
}

.location-map-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.location-map-canvas {
    position: relative;
    z-index: 0;
    min-height: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8f1e7;
    overflow: hidden;
}

.location-map-canvas.leaflet-container,
.registration-map-canvas.leaflet-container {
    z-index: 0;
}

.location-map-canvas .leaflet-pane,
.registration-map-canvas .leaflet-pane {
    z-index: 1;
}

.location-map-canvas .leaflet-top,
.location-map-canvas .leaflet-bottom,
.registration-map-canvas .leaflet-top,
.registration-map-canvas .leaflet-bottom {
    z-index: 2;
}

.location-map-canvas .location-map-standard-tile {
    filter: saturate(.68) sepia(.18) hue-rotate(326deg) brightness(.98) contrast(.96);
}

.location-map-canvas .leaflet-control-zoom a {
    border-color: var(--line);
    color: var(--text);
}

.location-map-canvas .leaflet-popup-content-wrapper,
.location-map-canvas .leaflet-popup-tip {
    background: var(--surface);
    color: var(--text);
}

.location-map-pin {
    position: relative;
    width: 26px;
    height: 34px;
}

.location-map-pin::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 24px;
    height: 24px;
    border: 2px solid #ffffff;
    border-radius: 50% 50% 50% 0;
    background: var(--primary);
    box-shadow: 0 3px 8px rgba(31, 23, 21, .28);
    transform: translateX(-50%) rotate(-45deg);
}

.location-map-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    transform: translateX(-50%);
}

.location-map-canvas .leaflet-control-attribution {
    font-size: 11.333px;
}

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

.form-action-hint {
    color: var(--muted);
    font-size: 14.333px;
    margin-right: auto;
}

.booking-edit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 14px;
}

.booking-edit label {
    gap: 4px;
}

.booking-edit input,
.booking-edit select,
.booking-edit textarea {
    padding: 5px 7px;
    min-height: 28px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.participant-editor {
    display: grid;
    gap: 12px;
}

.compact-participant-editor {
    gap: 0;
}

.booking-participant-head {
    display: grid;
    grid-template-columns: 32px minmax(180px, 1.35fr) minmax(120px, .65fr) minmax(180px, 1.25fr) 34px;
    gap: 8px;
    padding: 0 0 5px;
    color: var(--muted);
    font-size: 13.333px;
}

.participant-row {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
    background: #faf8f5;
}

.compact-participant-row {
    display: grid;
    grid-template-columns: 32px minmax(180px, 1.35fr) minmax(120px, .65fr) minmax(180px, 1.25fr) 34px;
    gap: 8px;
    align-items: end;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

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

.participant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.compact-participant-row .participant-head {
    display: grid;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 5px;
    margin-bottom: 0;
}

.compact-participant-row .participant-head strong {
    font-size: 14.333px;
}

.compact-participant-row .participant-number {
    align-self: center;
    color: var(--muted);
    font-size: 13.333px;
}

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

.compact-participant-row .participant-fields {
    display: contents;
}

.compact-participant-row label {
    gap: 4px;
    font-size: 0;
}

.compact-participant-row input,
.compact-participant-row select {
    width: 100%;
    height: 34px;
    min-height: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 17.333px;
}

.compact-participant-row .icon-button {
    height: 34px;
    min-height: 28px;
}

.login-card {
    width: min(420px, 100%);
    border-top: 4px solid var(--accent);
    text-align: center;
}

.login-card form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
    text-align: left;
}

.login-logo {
    display: block;
    width: min(450px, 100%);
    height: auto;
    margin: 0 auto 10px;
}

.alert {
    background: #f8dedb;
    color: var(--danger);
    border: 1px solid #edb8b3;
    border-radius: 7px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.error-panel .alert {
    margin-bottom: 16px;
}

.notice-success {
    background: #edf8f0;
    color: var(--ok);
    border: 1px solid #bfe5cb;
    border-radius: 7px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-weight: 650;
    scroll-margin-top: 78px;
}

.notice.error {
    background: #fdecec;
    color: var(--danger);
    border: 1px solid #efb8b8;
    border-radius: 7px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-weight: 650;
}

.password-rules {
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
}

.password-rules h2 {
    font-size: 19.333px;
}

.password-rules ul {
    margin: 10px 0 0;
    padding-left: 0;
    display: grid;
    gap: 6px;
    list-style: none;
}

.password-rules li {
    color: var(--muted);
}

.password-rules li::before {
    content: "×";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 7px;
    border-radius: 999px;
    background: #f8dedb;
    color: var(--danger);
    font-size: 14.333px;
    font-weight: 800;
}

.password-rules li.is-ok {
    color: var(--ok);
}

.password-rules li.is-ok::before {
    content: "✓";
    background: #dff3e8;
    color: var(--ok);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.metrics div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px;
    border-top: 2px solid var(--primary);
}

.metrics strong {
    display: block;
    font-size: 19.333px;
    color: var(--text);
}

.metrics span { color: var(--muted); }

.metrics div.metric-warning {
    background: #fdecec;
    border-top-color: var(--danger);
}

.metrics div.metric-warning strong,
.metrics div.metric-warning span {
    color: var(--danger);
}

.split {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.split > :first-child {
    grid-column: span 1;
}

.split > .booking-tables {
    grid-column: span 3;
}

.dashboard-layout > .panel {
    grid-column: span 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.compact-list {
    display: grid;
    gap: 8px;
}

.compact-list a {
    display: grid;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

.compact-list a:last-child {
    border-bottom: 0;
}

.compact-list span {
    color: var(--muted);
}

.head-actions, .toolbar-panel, .inline-form, .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.toolbar-panel {
    justify-content: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 18px;
}

.toolbar-panel .inline-form {
    flex-wrap: nowrap;
}

.toolbar-panel .inline-form input[name="name"] {
    width: clamp(300px, 34vw, 500px);
}

.toolbar-panel .inline-form .capacity-input {
    width: 76px;
    flex: 0 0 76px;
    text-align: right;
    appearance: textfield;
    -moz-appearance: textfield;
}

.toolbar-panel .inline-form .capacity-input::-webkit-outer-spin-button,
.toolbar-panel .inline-form .capacity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.toolbar-panel .inline-form .button {
    white-space: nowrap;
}

.field-label-below {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14.333px;
}

.page-head .head-actions {
    align-items: flex-start;
}

.page-head .inline-form {
    align-items: flex-start;
}

.todo-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    align-items: end;
    gap: 12px;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 10px;
}

.todo-filter-panel label {
    min-width: 0;
    gap: 4px;
}

.todo-filter-panel input,
.todo-filter-panel select {
    width: 100%;
    height: 28px;
    min-height: 28px;
    padding: 4px 7px;
    text-transform: none;
}

.checkbox-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 42px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: #fff;
}

.checkbox-filter label {
    display: inline-flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    margin: 0;
    text-transform: none;
    white-space: nowrap;
}

.checkbox-filter input {
    width: auto;
}

.multi-select-dropdown {
    position: relative;
}

.multi-select-dropdown summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    padding: 4px 7px;
    border: 1px solid #cdbb98;
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font: 15.333px/1.45 "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
}

.multi-select-dropdown summary::-webkit-details-marker {
    display: none;
}

.multi-select-dropdown summary::after {
    content: none;
}

.multi-select-dropdown[open] summary {
    border-color: #cdbb98;
}

.multi-select-options {
    position: absolute;
    z-index: 20;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    display: grid;
    gap: 0px;
    max-height: 280px;
    overflow: auto;
    padding: 0px;
    border: 1px solid #cdbb98;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(44, 31, 25, .14);
}

.multi-select-options label {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    min-width: 0;
    height: 22px;
    min-height: 22px;
    max-height: 22px;
    margin: 0;
    padding: 0 6px;
    text-transform: none;
    line-height: 22px;
    font-size: 14.333px;
    overflow: hidden;
}

.multi-select-options input {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin: 0;
    accent-color: var(--primary);
}

.multi-select-options span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-filter-panel .form-actions {
    margin: 0;
    align-self: end;
}

.todo-section-spaced {
    margin-top: 28px;
}

.todo-settings-grid {
    margin-bottom: 24px;
}

.todo-list-wrap .todo-col-title { width: auto; }
.todo-list-wrap .todo-col-due { width: 120px; }
.todo-list-wrap .todo-col-status { width: 170px; }
.todo-list-wrap .todo-col-assignees { width: 230px; }
.todo-list-wrap .todo-col-created { width: 170px; }
.todo-list-wrap .todo-col-action { width: 230px; }

.todo-date-warning {
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f8dedb;
    color: var(--danger);
}

[data-new-todo-form] {
    overflow: visible;
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row-start {
    grid-column-start: 1;
}

.field-block > span {
    color: var(--muted);
    font-size: 14.333px;
}

.assignee-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.assignee-picker input[readonly] {
    background: #fff;
}

.assignee-dialog {
    margin-top: 8px;
    box-shadow: none;
}

.assignee-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 12px;
}

.assignee-options label {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.assignee-options input {
    width: auto;
}

.todo-detail-panel {
    margin-top: 14px;
}

.inline-comment-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.inline-comment-form input {
    min-width: min(260px, 100%);
}

.mention-field-wrap {
    position: relative;
    display: grid;
}

.mention-highlight {
    pointer-events: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text);
}

.mention-highlight mark {
    padding: 0;
    background: transparent;
    color: var(--primary);
}

.mention-highlight-field {
    position: relative;
    z-index: 1;
    background: transparent;
    color: transparent;
    caret-color: var(--text);
}

.mention-highlight-field::placeholder {
    color: var(--muted);
}

.mention-suggestions {
    position: absolute;
    z-index: 90;
    display: grid;
    min-width: 160px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: 148px;
    overflow: auto;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(31, 23, 21, .16);
}

.mention-suggestion {
    width: 100%;
    min-height: 26px;
    padding: 3px 7px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mention-suggestion:hover,
.mention-suggestion.is-active {
    background: rgba(205, 38, 83, .11);
    text-decoration: none;
}

.list-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.inline-form input {
    width: min(320px, 100%);
}

.table-plan {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

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

.table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(44, 31, 25, .07);
}

.table-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.compact-table-form {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 76px 76px auto;
    gap: 8px;
    margin-bottom: 12px;
}

.participant-list {
    display: grid;
    gap: 10px;
}

.seat-card {
    display: grid;
    gap: 6px;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.seat-card span {
    color: var(--muted);
    font-size: 15.333px;
}

.seat-card form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.has-intolerance {
    border-left: 4px solid #3a76a8;
}

.group-list, .compact-groups {
    display: grid;
    gap: 8px;
}

.group-card, .table-group-row {
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px;
}

.group-card.group-complete,
.table-group-row.group-complete {
    background: #f0f8f1;
}

.group-card.group-incomplete,
.table-group-row.group-incomplete {
    background: #fff2f0;
}

.group-card header, .table-group-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.group-card p, .table-group-row p {
    margin: 3px 0 0;
    font-size: 14.333px;
    line-height: 1.25;
}

.table-group-row .booking-note {
    color: var(--text);
    font-weight: 800;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--text);
    color: #ffffff;
    font-size: 14.333px;
    font-weight: 800;
}

.group-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.group-actions form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
}

.group-actions form:last-child {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
}

.table-dropzone.is-drop-target {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    background: #f5e9e9;
}

[draggable="true"] {
    cursor: grab;
}

[draggable="true"]:active {
    cursor: grabbing;
}

.needs-split {
    border-left: 4px solid var(--primary);
}

.table-card.compact {
    padding: 10px;
}

.table-title-row {
    margin-bottom: 8px;
}

.table-name-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, 34px);
    gap: 8px;
    align-items: center;
}

.table-name-line.is-editing {
    grid-template-columns: minmax(0, 1fr);
}

.table-name-line.is-editing > h2,
.table-name-line.is-editing > .table-edit-toggle,
.table-name-line.is-editing > form:not(.name-edit-form) {
    display: none;
}

.table-name-line h2 {
    font-size: 20.333px;
}

.name-edit-form {
    display: grid;
    grid-template-columns: minmax(70px, 1fr) 34px;
    gap: 6px;
}

.name-edit-form[hidden],
.table-edit-toggle[hidden] {
    display: none !important;
}

.table-name-line.is-editing .name-edit-form {
    grid-column: 1 / -1;
}

.table-capacity-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 7px;
    overflow-x: auto;
}

.table-capacity-row form {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

.table-capacity-row .badge {
    flex: 0 0 auto;
}

.capacity-edit-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
}

.capacity-edit-form label {
    display: inline-flex;
    grid-auto-flow: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 13.333px;
    font-weight: 400;
}

.capacity-edit-form input {
    width: 54px;
    min-height: 28px;
    padding: 3px 6px;
    text-align: right;
    appearance: textfield;
    -moz-appearance: textfield;
}

.capacity-edit-form input::-webkit-outer-spin-button,
.capacity-edit-form input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.inline-split-form {
    display: grid;
    grid-template-columns: minmax(54px, 90px) 34px;
    gap: 6px;
    margin-top: 5px;
}

.inline-split-form input {
    min-height: 28px;
    padding: 3px 6px;
    font-size: 14.333px;
}

.name-edit-form input {
    min-height: 28px;
    padding: 5px 7px;
}

.table-name-line.is-editing .name-edit-form input {
    background: transparent;
    border-color: var(--line);
    font-family: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 20.333px;
    font-weight: 800;
    color: var(--text);
}

.icon-button {
    width: 34px;
    min-width: 34px;
    min-height: 28px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 4px;
    border: 1px solid #cdbb98;
    background: #ffffff;
    color: #2b1a16;
    font-weight: 800;
    text-decoration: none;
}

.icon-button:hover {
    background: #faf8f5;
    text-decoration: none;
}

.icon-button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.icon-button.primary:hover {
    background: var(--primary-dark);
}

.icon-button.ok {
    background: #ffffff;
    border-color: #9acfae;
    color: var(--ok);
}

.icon-button.ok:hover {
    background: #dff3e8;
}

.icon-button.danger {
    background: #ffffff;
    border-color: #edb8b3;
    color: var(--danger);
}

.icon-button.danger:hover {
    background: #f8dedb;
}

.lock-button {
    border-color: var(--line);
    background: #faf8f5;
    color: var(--muted);
}

.lock-button.is-locked {
    background: #ece7e1;
    color: #5a5148;
}

.compact-actions {
    justify-content: flex-end;
    margin-top: 8px;
}

.checkin-tools {
    margin-bottom: 14px;
}

.checkin-list {
    display: grid;
    gap: 12px;
}

.checkin-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
}

.checkin-card[open] {
    display: grid;
    gap: 12px;
}

.checkin-card span {
    display: block;
    color: var(--muted);
}

.checkin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.checkin-group-head {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.checkin-group-head::-webkit-details-marker {
    display: none;
}

.checkin-group-head::before {
    content: "▸";
    color: var(--muted);
    font-size: 19.333px;
    line-height: 1;
}

.checkin-card[open] .checkin-group-head::before {
    content: "▾";
}

.checkin-group-badges {
    display: grid;
    gap: 4px;
    justify-items: end;
}

.checkin-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.checkin-participants {
    display: grid;
    gap: 7px;
    padding-left: 22px;
}

.checkin-person-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
}

.checkin-person-row strong {
    font-size: 15.333px;
}

.small-button {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 14.333px;
}

.reminder-list {
    display: grid;
    gap: 16px;
}

.reminder-card {
    display: grid;
    gap: 14px;
}

.reminder-card summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    cursor: pointer;
    list-style: none;
}

.reminder-card summary::-webkit-details-marker {
    display: none;
}

.reminder-card-sent {
    opacity: .82;
}

.reminder-card form {
    margin-top: 12px;
}

.reminder-card label {
    font-weight: 400;
}

.mail-workflow-table {
    display: grid;
    gap: 8px;
}

.mail-table-head,
.mail-table-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) 70px minmax(320px, 3fr) minmax(120px, .75fr);
    gap: 10px;
    align-items: start;
}

.mail-table-head {
    padding: 0 12px 4px;
    color: var(--muted);
    font-size: 13.333px;
    font-weight: 400;
    text-transform: uppercase;
}

.mail-table-item {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.mail-table-item.booking-row-complete {
    background: #f0f8f1;
}

.mail-table-item.booking-row-incomplete {
    background: #fff2f0;
}

.mail-table-item[open] {
    border-color: #cdbb98;
}

.mail-table-row {
    padding: 12px;
    cursor: pointer;
    list-style: none;
}

.mail-table-row::-webkit-details-marker {
    display: none;
}

.mail-table-row > span {
    min-width: 0;
}

.mail-cell-booking,
.mail-log-lines,
.mail-log-lines > span {
    display: grid;
    gap: 3px;
}

.mail-cell-booking strong,
.mail-log-lines strong {
    overflow-wrap: anywhere;
}

.mail-cell-booking small,
.mail-log-lines small,
.muted-text {
    color: var(--muted);
    font-size: 14.333px;
    overflow-wrap: anywhere;
}

.mail-cell-meal {
    display: flex;
    align-items: flex-start;
}

.mail-cell-action {
    display: flex;
    justify-content: flex-end;
}

.mail-table-detail {
    display: grid;
    gap: 14px;
    padding: 0 12px 12px;
}

.mail-send-grid {
    display: grid;
    grid-template-columns: minmax(180px, .75fr) minmax(0, 1.25fr);
    gap: 12px;
}

.mail-template-form {
    margin-bottom: 18px;
}

.mail-template-list {
    display: grid;
    gap: 14px;
}

.mail-template-card {
    display: grid;
    gap: 18px;
}

.mail-template-card > .form-actions {
    margin-top: 14px;
}

.placeholder-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #faf8f5;
}

.placeholder-picker button {
    min-height: 28px;
    padding: 4px 7px;
    border: 1px solid #cdbb98;
    border-radius: 4px;
    background: #ffffff;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 13.333px;
    font-weight: 700;
}

.placeholder-picker button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mail-template-card summary,
.sent-mail-card summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    cursor: pointer;
    list-style: none;
}

.mail-template-card summary::-webkit-details-marker,
.sent-mail-card summary::-webkit-details-marker {
    display: none;
}

.sent-mail-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.sent-mail-card {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #faf8f5;
    padding: 10px;
}

.sent-mail-card summary span {
    color: var(--muted);
    font-size: 14.333px;
}

.sent-mail-body {
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid var(--line);
    background: #ffffff;
    overflow-wrap: anywhere;
}

.sent-mail-body img {
    max-width: 100%;
    height: auto;
}

.export-section-title {
    padding: 14px;
}

.export-gap {
    margin-top: 18px;
}

.dropzone {
    min-height: 180px;
    border: 2px dashed var(--line);
    border-radius: 6px;
    background: #faf8f5;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    cursor: pointer;
}

.dropzone input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dropzone strong {
    display: block;
    font-family: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 25.333px;
}

.dropzone span {
    color: var(--muted);
}

.dropzone.is-dragging {
    background: #f5e9e9;
    border-color: var(--primary);
}

.dropzone.has-file {
    border-style: solid;
    background: #f5e9e9;
}

.compact-dropzone {
    min-height: 118px;
    padding: 18px;
}

.compact-dropzone strong {
    font-size: 21.333px;
}

.import-proposal {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.quick-event {
    margin-top: 18px;
}

.quick-event summary {
    cursor: pointer;
    font-weight: 750;
    color: var(--primary);
}

.quick-event form {
    margin-top: 14px;
}

.event-select-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
}

.mail-preview {
    margin-top: 18px;
}

.mail-preview pre {
    white-space: pre-wrap;
    overflow: auto;
    max-height: 420px;
    margin: 12px 0 0;
    background: #1f1715;
    color: #ffffff;
    border-radius: 6px;
    padding: 14px;
    font-size: 14.333px;
}

.mail-editor {
    display: grid;
    gap: 8px;
}

.mail-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.mail-editor-button {
    min-height: 28px;
    padding: 4px 8px;
    border-color: #cdbb98;
    background: #ffffff;
    color: var(--text);
    font-size: 14.333px;
    font-weight: 400;
}

.mail-editor-button[data-action="bold"] {
    font-weight: 750;
}

.mail-editor-button[data-action="italic"] {
    font-style: italic;
}

.mail-editor-button[data-action="underline"] {
    text-decoration: underline;
}

.mail-editor-button:hover {
    border-color: var(--primary);
    color: var(--text);
}

.mail-editor-button:focus,
.mail-editor-button:active {
    border-color: #cdbb98;
    color: var(--text);
    outline: 0;
}

.mail-editor-color {
    min-height: 28px;
    display: inline-flex;
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid #cdbb98;
    border-radius: 4px;
    background: #ffffff;
    color: var(--text);
    font-size: 14.333px;
    font-weight: 750;
}

.mail-editor-color input {
    width: 26px;
    min-height: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
}

.mail-editor-color-apply {
    min-height: 22px;
    padding: 1px 5px;
    border: 1px solid var(--line);
    background: #faf8f5;
    font-size: 13.333px;
    font-weight: 800;
}

.mail-editor-frame {
    width: 100%;
    min-height: 260px;
    border: 1px solid #cdbb98;
    border-radius: 4px;
    background: #ffffff;
}

.mail-editor-frame:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(143, 29, 29, .12);
}

.mail-editor-html textarea,
.mail-editor-source {
    min-height: 210px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 14.333px;
    line-height: 1.45;
}

.mail-editor-preview {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fffdf8;
}

.mail-editor-preview > strong {
    color: var(--muted);
    font-size: 13.333px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mail-editor-preview-body {
    min-height: 76px;
    color: var(--text);
    overflow-wrap: anywhere;
}

.mail-editor-preview-body p {
    margin: 0 0 10px;
}

.mail-editor-preview-body img {
    max-width: 100%;
    height: auto;
}

.event-list {
    display: grid;
    gap: 14px;
}

.event-list-header {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(95px, .6fr) minmax(105px, .65fr) minmax(145px, 1fr) minmax(100px, .7fr) minmax(130px, .85fr);
    gap: 12px;
    padding: 0 16px 2px;
    color: var(--muted);
    font-size: 13.333px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.event-sections {
    display: grid;
    gap: 22px;
}

.event-period {
    display: grid;
    gap: 10px;
}

.event-period > h2 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 21.333px;
}

.event-period > h2 span {
    color: var(--muted);
    font-size: 14.333px;
    font-weight: 650;
}

.event-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(31, 23, 21, .06);
    overflow: hidden;
}

.event-card-public {
    background: #fffdf7;
}

.event-card-private {
    background: #e8f2fb;
}

.event-card-request {
    background: #e3e0dc;
    border-color: #c9c3bd;
}

.event-card-today {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(205, 38, 83, .16), 0 10px 28px rgba(31, 23, 21, .08);
}

.event-card-today .event-info-row {
    border-left: 5px solid var(--primary);
}

.event-info-row {
    display: grid;
    grid-template-columns: 1.2fr .75fr 1fr .9fr .95fr .72fr .82fr;
    gap: 12px;
    padding: 16px;
    align-items: start;
}

.event-card-compact .event-info-row {
    grid-template-columns: minmax(180px, 1.4fr) minmax(95px, .6fr) minmax(105px, .65fr) minmax(145px, 1fr) minmax(100px, .7fr) minmax(130px, .85fr);
}

.event-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    align-items: end;
    background: #faf8f5;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 10px;
}

.event-filter-row label {
    gap: 4px;
}

.event-filter-row input,
.event-filter-row select {
    min-height: 28px;
    padding: 4px 7px;
}

.log-filter-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.event-info-row > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.event-info-row strong {
    font-size: 18.333px;
}

.event-info-row span:not(.event-label):not(.badge) {
    color: var(--muted);
}

.event-label {
    color: var(--muted);
    font-size: 13.333px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.event-filter-row .event-label,
.event-card .event-label,
.registration-filter .event-label {
    font-weight: 400;
}

.event-list .event-card .event-label {
    display: none;
}

.event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: #faf8f5;
}

.event-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px;
}

.event-detail-actions .button {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.event-detail-actions .button.is-active {
    border-color: var(--primary);
    box-shadow: inset 0 -2px 0 var(--primary);
}

.event-detail-actions .button.is-ok {
    background: #dff3e8;
    border-color: #9acfae;
    color: var(--ok);
}

.event-detail-actions .button.is-danger {
    background: #f8dedb;
    border-color: #edb8b3;
    color: var(--danger);
}

.event-detail-actions .button.is-active.is-ok,
.event-detail-actions .button.is-active.is-danger {
    box-shadow: inset 0 -2px 0 currentColor;
}

.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 16px;
}

.link-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

.participant-summary strong {
    color: var(--text);
}

.restaurant-link-panel {
    grid-column: 1 / -1;
}

.restaurant-info-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.restaurant-link-panel .copy-field + h2 {
    margin-top: 24px;
}

.restaurant-link-panel .link-copy-row + h2 {
    margin-top: 24px;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.event-detail-grid > .panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.event-detail-grid > .event-notes {
    margin-top: 0;
}

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

.help-section-head {
    margin-top: 28px;
}

.changelog-grid {
    display: grid;
    gap: 18px;
}

.changelog-grid h3 {
    margin: 8px 0 0;
    font-size: 19.333px;
}

.changelog-list {
    margin: 6px 0 10px;
    padding-left: 24px;
}

.changelog-list li {
    margin: 2px 0;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: 13.333px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
    font-weight: 650;
}

.event-notes {
    margin-top: 18px;
}

.form-subsection {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #faf8f5;
    margin-top: 8px;
}

.form-subsection h2 {
    font-size: 19.333px;
}

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

.past-events,
.cancelled-events {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.past-year {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
}

.past-year summary {
    cursor: pointer;
    font-weight: 800;
}

.past-year summary span {
    color: var(--muted);
    font-weight: 600;
    margin-left: 8px;
}

.past-year .event-list {
    margin-top: 12px;
}

.cancelled-year {
    opacity: .86;
}

.public-bookings {
    margin-top: 18px;
}

.public-booking-summary {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 16px;
    color: #1f1714;
}

.public-booking-participants {
    display: grid;
    gap: 0;
}

.public-booking-participant-head {
    display: grid;
    grid-template-columns: 28px repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 5px;
    color: var(--muted);
    font-size: 13.333px;
}

.public-booking-participant {
    display: grid;
    grid-template-columns: 28px repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.public-booking-participant:last-child {
    border-bottom: 0;
}

.public-booking-participant > strong {
    align-self: center;
    color: var(--muted);
    font-size: 13.333px;
}

.public-booking-participant .public-booking-field-label {
    display: none;
}

.participant-table-band-0 {
    background: #fffdf8;
}

.participant-table-band-1 {
    background: #f3f8f4;
}

.restaurant-participant-table {
    table-layout: fixed;
}

.restaurant-col-group {
    width: 20%;
}

.restaurant-col-table {
    width: 7%;
}

.restaurant-col-participant {
    width: 25%;
}

.restaurant-col-meal {
    width: 10%;
}

.restaurant-col-intolerances {
    width: 25%;
}

.restaurant-col-notes {
    width: 13%;
}

.internal-participant-table .restaurant-col-group {
    width: 15%;
}

.internal-participant-table .restaurant-col-table {
    width: 5%;
}

.restaurant-col-mail {
    width: 16%;
}

.restaurant-col-phone {
    width: 12%;
}

.internal-participant-table .restaurant-col-participant {
    width: 18%;
}

.internal-participant-table .restaurant-col-meal {
    width: 8%;
}

.internal-participant-table .restaurant-col-intolerances {
    width: 16%;
}

.internal-participant-table .restaurant-col-notes {
    width: 10%;
}

.restaurant-participant-table td:nth-child(2),
.internal-participant-table td:nth-child(4) {
    white-space: nowrap;
}

.export-tables {
    margin-top: 18px;
}

@page {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    .topbar, .button, button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .page {
        width: 100%;
        margin: 0;
    }

    .table-wrap, .panel, .metrics div {
        box-shadow: none;
    }

    .export-head {
        margin-bottom: 8px;
    }

    .export-head h1 {
        font-size: 25.333px;
    }

    .export-head p,
    .metrics span,
    .table-card p,
    .table-group-row p {
        color: #222;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
        margin-bottom: 8px;
    }

    .metrics div {
        border: 1px solid #bbb;
        border-top: 2px solid #1f1715;
        padding: 7px 8px;
    }

    .metrics strong {
        font-size: 17.333px;
    }

    .export-tables {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        margin-top: 8px;
        break-after: page;
        page-break-after: always;
    }

    .table-card {
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 8px;
    }

    .table-name-line h2,
    .table-card h2 {
        font-size: 17.333px;
    }

    .table-card header {
        margin-bottom: 5px;
    }

    .table-group-row {
        padding: 3px 6px;
    }

    .table-group-row strong {
        font-size: 13.333px;
        line-height: 1.2;
    }

    .count-pill {
        min-width: 20px;
        height: 20px;
        font-size: 12.333px;
    }

    .export-participants-page {
        margin-top: 0;
    }

    .export-section-title {
        padding: 8px 10px;
        font-size: 19.333px;
    }

    th, td {
        padding: 5px 7px;
        font-size: 12.333px;
    }

    th {
        background: #1f1715 !important;
        color: #fff !important;
    }
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

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

.reminder-template-panel {
    margin-bottom: 24px;
}

.option-list {
    display: grid;
    gap: 10px;
}

.option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4.5ch auto 34px;
    gap: 10px;
    align-items: center;
}

.case-option-row {
    grid-template-columns: minmax(80px, .7fr) minmax(0, 1fr) 4.5ch auto 34px;
}

.sort-input {
    text-align: right;
    width: 4.5ch;
    min-width: 4.5ch;
    padding-left: 4px;
    padding-right: 4px;
}

.active-choice {
    display: inline-flex;
    grid-auto-flow: column;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.active-choice input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: var(--primary);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
}

.backup-settings {
    margin-bottom: 18px;
}

.backups-head > div {
    max-width: 58ch;
}

.confirm-dialog {
    width: min(460px, calc(100% - 28px));
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 22px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(31, 23, 21, .28);
}

.confirm-dialog::backdrop {
    background: rgba(31, 23, 21, .45);
}

.confirm-dialog p {
    overflow-wrap: anywhere;
}

.confirm-dialog label {
    display: grid;
    gap: 6px;
}

.confirm-dialog .active-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.confirm-dialog .active-choice input {
    flex: 0 0 auto;
}

.confirm-dialog textarea {
    width: 100%;
}

.confirm-dialog textarea[readonly] {
    min-height: 8rem;
    background: #faf8f5;
    color: var(--text);
}

#booking-move-notes {
    min-height: 8rem;
}

.dialog-hint {
    color: var(--muted);
    font-size: 1.033rem;
}

.user-create-form {
    margin-bottom: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-create-form h2,
.user-create-form .form-actions {
    grid-column: 1 / -1;
}

.user-table input,
.user-table select {
    min-height: 28px;
    padding: 4px 7px;
}

.user-table .actions {
    text-align: right;
    white-space: nowrap;
}

.user-table .actions button {
    margin-left: 12px;
}

.backup-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 34px;
    gap: 8px;
    align-items: center;
    justify-content: end;
    justify-items: end;
    width: 100%;
}

.backup-actions form,
.backup-actions a,
.backup-actions button {
    margin: 0;
}

.feature-request-form {
    margin-bottom: 18px;
}

.feature-request-form h2,
.feature-request-form .form-actions {
    grid-column: 1 / -1;
}

.feature-request-done-title {
    margin-top: 24px;
}

.feature-request-details summary {
    display: list-item;
    cursor: pointer;
    color: var(--primary);
}

.feature-request-details summary::marker {
    color: var(--muted);
}

.feature-request-details div {
    margin-top: 8px;
    max-width: 620px;
    color: var(--muted);
    white-space: normal;
    overflow-wrap: anywhere;
}

.feature-request-thumb {
    display: inline-flex;
    margin-top: 8px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    cursor: pointer;
}

.feature-request-thumb:hover,
.feature-request-thumb:focus-visible {
    border-color: var(--primary);
}

.feature-request-thumb img {
    display: block;
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
}

.feature-request-image-dialog {
    width: min(960px, calc(100vw - 32px));
}

.feature-request-image-dialog img {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.context-menu {
    position: fixed;
    z-index: 80;
    display: grid;
    min-width: 170px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(31, 23, 21, .18);
}

.context-menu[hidden] {
    display: none;
}

.context-menu button {
    width: 100%;
    min-height: 28px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    color: var(--text);
    text-align: left;
}

.context-menu button:last-child {
    border-bottom: 0;
}

.context-menu button:hover,
.context-menu button:focus-visible {
    background: #faf0f3;
    color: var(--primary);
}

.feature-request-table table {
    table-layout: fixed;
}

.feature-request-table .actions {
    text-align: left;
    white-space: nowrap;
}

.feature-request-table .actions > *,
.feature-request-action-buttons > * {
    flex: 0 0 auto;
    margin-left: 0;
}

.feature-request-action-buttons {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 32px;
    align-items: center;
    justify-content: start;
    gap: 8px;
    margin-left: 0;
}

.feature-request-table .feature-request-action-buttons > * {
    margin-left: 0;
}

.feature-request-table .feature-request-action-buttons .icon-button {
    margin-left: 0;
}

.feature-request-table .actions .badge,
.feature-request-table .actions .compact-cell-note {
    text-align: left;
}

.feature-request-table .actions .compact-cell-note {
    flex-basis: 100%;
}

.feature-request-action-buttons .icon-button,
.feature-request-action-buttons .action-icon-form {
    width: 32px;
    min-width: 32px;
}

.feature-request-action-buttons .action-icon-form {
    display: grid;
    place-items: center;
}

.feature-request-action-buttons .action-icon-form .icon-button {
    width: 100%;
}

.feature-request-edit-form {
    margin-top: 12px;
    gap: 10px;
}

.feature-request-col-id { width: 62px; }
.feature-request-col-type { width: 88px; }
.feature-request-col-area { width: 190px; }
.feature-request-col-title { width: auto; }
.feature-request-col-created { width: 118px; }
.feature-request-col-status { width: 108px; }
.feature-request-col-actions { width: 168px; }

.feature-request-table td[data-label="Bereich"] {
    white-space: nowrap;
}

body.embed-page {
    --bg: #f5efe0;
    --surface: #ffffff;
    --text: #1f1715;
    --muted: #5f5a56;
    --line: #e3ddd6;
    --primary: #cd2653;
    --primary-dark: #a61d42;
    background: var(--bg);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.embed-page .page {
    max-width: 1120px;
    padding: 0;
}

.embed-page .page-head {
    margin-bottom: 22px;
}

.embed-page .page-head h1 {
    font-size: 35.333px;
    line-height: 1.15;
}

.embed-page .page-head p,
.embed-page p {
    color: #5f5a56;
}

.embed-page .panel,
.embed-page .empty,
.embed-page .table-wrap {
    border-color: #e3ddd6;
    border-radius: 0;
    box-shadow: none;
}

.embed-page .button,
.embed-page button {
    border-radius: 0;
    font-weight: 700;
}

.embed-page input,
.embed-page select,
.embed-page textarea {
    border-radius: 0;
}

.public-registration-head {
    margin-bottom: 18px;
}

.public-registration-head p {
    color: var(--text);
}

.registration-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.registration-filter-toggle {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    color: var(--text);
    white-space: nowrap;
}

.registration-filter-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.registration-filter .form-actions {
    flex-wrap: wrap;
    align-items: center;
}

.registration-view-toggle {
    display: inline-flex;
    justify-content: flex-end;
    justify-self: end;
    overflow: hidden;
    border: 1px solid var(--primary);
    border-radius: 4px;
    margin-bottom: 18px;
    background: #f8dedb;
}

.registration-view-toggle a {
    min-width: 104px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 3px 6px;
    color: var(--primary);
    border-right: 1px solid var(--primary);
    font-weight: 400;
}

.registration-view-toggle a:last-child {
    border-right: 0;
}

.registration-view-toggle a:hover {
    text-decoration: none;
    background: #f5cfd4;
}

.registration-view-toggle a.is-active {
    background: var(--primary);
    color: #ffffff;
}

.registration-map-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
}

.registration-map-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.registration-map-head h2 {
    font-size: 19.333px;
}

.registration-map-head p {
    margin: 0;
    color: var(--text);
}

.registration-map-canvas {
    position: relative;
    z-index: 0;
    min-height: 430px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8f1e7;
    overflow: hidden;
}

.registration-map-canvas .location-map-standard-tile {
    filter: saturate(.68) sepia(.18) hue-rotate(326deg) brightness(.98) contrast(.96);
}

.registration-map-popup {
    display: grid;
    gap: 8px;
    min-width: 240px;
    max-width: 310px;
}

.registration-map-popup h3 {
    margin: 0;
    font-size: 16.333px;
}

.registration-map-popup p {
    margin: 0;
    color: var(--muted);
}

.registration-map-popup ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.registration-map-popup li {
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.registration-map-popup li:first-child {
    padding-top: 0;
    border-top: 0;
}

.registration-map-popup span {
    color: var(--text);
}

.registration-map-popup .button {
    justify-self: flex-start;
    margin-top: 3px;
}

.registration-popup-action {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.registration-popup-action .button {
    margin-top: 0;
}

.registration-calendar-panel {
    display: grid;
    gap: 8px;
    overflow: visible;
}

.registration-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.registration-calendar-toolbar h2 {
    margin: 0;
}

.registration-calendar-nav {
    display: flex;
    gap: 8px;
}

.registration-calendar-info {
    display: grid;
    gap: 6px;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    background: #fff;
}

.registration-calendar-info h3,
.registration-calendar-info p {
    margin: 0;
}

.registration-calendar-info .button {
    justify-self: flex-start;
    margin-top: 2px;
}

.registration-calendar-info-popover {
    position: absolute;
    z-index: 35;
    left: 4px;
    bottom: calc(100% + 5px);
    width: max-content;
    max-width: min(330px, calc(100vw - 32px));
    box-shadow: 0 14px 34px rgba(31, 23, 21, .18);
}

.registration-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.registration-calendar-head {
    overflow: hidden;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: var(--surface-strong);
}

.registration-calendar-head span {
    min-width: 0;
    padding: 7px 8px;
    border-right: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    text-align: center;
    text-transform: uppercase;
}

.registration-calendar-head span:last-child {
    border-right: 0;
}

.registration-calendar-panel > .registration-calendar-grid:not(.registration-calendar-head) {
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 0 0 6px 6px;
    background: var(--surface);
    overflow: visible;
}

.registration-calendar-day {
    position: relative;
    display: grid;
    align-content: start;
    gap: 3px;
    min-height: 46px;
    padding: 4px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.registration-calendar-day.is-outside {
    background: #faf8f5;
    color: var(--muted);
}

.registration-calendar-date {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 5px;
    min-height: 18px;
}

.registration-calendar-date strong {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: var(--text);
    font-size: 12.333px;
    line-height: 1;
}

.registration-calendar-day.is-outside .registration-calendar-date strong {
    color: var(--muted);
}

.registration-calendar-date span {
    min-width: 0;
    padding: 1px 4px;
    border-radius: 4px;
    background: #f5efe0;
    color: var(--muted);
    font-size: 11.333px;
    line-height: 1.15;
    text-align: right;
}

.registration-calendar-event {
    display: block;
    min-width: 0;
    padding: 3px 5px;
    border-radius: 5px;
    background: var(--primary);
    color: #fff;
    font-size: 12.333px;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
}

.registration-calendar-event:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

.registration-calendar-event.is-sold-out {
    background: #e7e3dd;
    color: #6f6862;
}

.registration-calendar-event.is-sold-out:hover {
    background: #ded8cf;
    color: #5c5650;
}

.registration-list {
    display: grid;
    gap: 18px;
}

.registration-card {
    display: grid;
    gap: 12px;
}

.registration-event-summary {
    display: grid;
    grid-template-columns: 1fr 1.6fr .8fr .8fr 118px;
    gap: 14px;
    align-items: center;
    padding-bottom: 14px;
}

.registration-event-cell {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.registration-event-cell span:not(.badge) {
    color: var(--text);
    overflow-wrap: anywhere;
}

.registration-event-cell .registration-date-line {
    color: var(--text);
    font-weight: 700;
}

.registration-event-cell .registration-time-line {
    color: var(--text);
    font-weight: 400;
}

.registration-location-cell a,
.registration-map-popup h3 a {
    color: var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.registration-event-cell .badge {
    justify-self: flex-start;
    margin-top: 4px;
}

.registration-place {
    display: none;
}

.registration-event-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    justify-content: flex-end;
    min-width: 118px;
}

.registration-action-note {
    color: var(--text);
    font-size: 14.333px;
    line-height: 1.2;
    text-align: right;
}

.public-registration-form h3,
.registration-participants h3 {
    margin: 0;
    grid-column: 1 / -1;
}

.public-registration-form {
    gap: 10px 12px;
    padding: 14px;
}

.public-access-form {
    max-width: 520px;
}

.registration-detail-back {
    margin-bottom: 10px;
}

.public-registration-form input,
.public-registration-form select,
.public-registration-form textarea {
    min-height: 28px;
    padding: 5px 7px;
}

.public-registration-form label {
    gap: 4px;
}

.public-registration-form .wide textarea {
    min-height: 58px;
}

.registration-participant-list {
    display: grid;
    gap: 8px;
}

.registration-participant {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #faf8f5;
}

.registration-participant-fields {
    grid-template-columns: minmax(120px, 1fr) minmax(100px, .7fr) minmax(140px, 1.1fr) minmax(140px, 1.1fr);
    gap: 8px;
}

.registration-participant-fields label {
    min-width: 0;
}

.registration-participant-fields input,
.registration-participant-fields select {
    min-width: 0;
}

.compact-empty {
    padding: 14px;
    box-shadow: none;
}

.audit-log-table table {
    table-layout: fixed;
}

.audit-log-table th:nth-child(1),
.audit-log-table td:nth-child(1) {
    width: 96px;
}

.audit-log-table th:nth-child(2),
.audit-log-table td:nth-child(2) {
    width: 76px;
}

.audit-log-table th:nth-child(3),
.audit-log-table td:nth-child(3) {
    width: 140px;
}

.audit-log-table th:nth-child(4),
.audit-log-table td:nth-child(4) {
    width: 150px;
}

.audit-log-table th:nth-child(6),
.audit-log-table td:nth-child(6) {
    width: 110px;
}

.audit-log-table td {
    white-space: nowrap;
}

.audit-log-table .log-details {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-log-table code {
    display: block;
    max-width: 520px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13.333px;
}


@media (max-width: 820px) {
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 10px;
        padding: 9px 12px;
    }

    .topbar.is-condensed {
        gap: 6px 10px;
        padding: 7px 12px;
    }

    .brand img {
        height: 36px;
        max-width: min(310px, calc(100vw - 44px));
    }

    .topbar.is-condensed .brand {
        max-width: 264px;
        opacity: 1;
        pointer-events: auto;
    }

    .topbar.is-condensed .brand img {
        height: 30px;
        max-width: min(250px, calc(100vw - 78px));
    }

    .nav-toggle {
        display: inline-flex;
        justify-self: end;
        align-self: center;
        width: 36px;
        height: 32px;
        gap: 4px;
    }

    .nav-toggle span:not(.visually-hidden) {
        width: 18px;
    }

    .topbar nav {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        width: 100%;
        font-size: 14.333px;
        line-height: 1.25;
    }

    .topbar nav:not(.is-open) {
        display: none;
    }

    .topbar nav > a,
    .nav-menu summary {
        width: 100%;
        min-height: 28px;
        justify-content: center;
        padding: 5px 8px;
        border: 1px solid rgba(255, 255, 255, .18);
        background: rgba(255, 255, 255, .08);
    }

    .nav-menu {
        grid-column: 1 / -1;
        display: grid;
        gap: 5px;
    }

    .nav-menu summary {
        justify-content: space-between;
        padding-left: 10px;
        padding-right: 10px;
    }

    .nav-menu div {
        position: static;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .topbar .nav-menu div a {
        min-height: 29px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px 8px;
        border: 1px solid rgba(255, 255, 255, .14);
        background: rgba(31, 23, 21, .1);
        color: #ffffff;
        opacity: .9;
        text-align: center;
        white-space: normal;
    }

    .topbar .nav-menu div a:hover {
        background: rgba(255, 255, 255, .12);
        color: #ffffff;
    }

    .page {
        width: min(100% - 28px, 1180px);
        margin-top: 22px;
    }

    h1 {
        font-size: 32.333px;
    }

    .form-grid, .split, .metrics, .participant-fields, .settings-grid, .option-row, .table-plan, .tables-grid, .compact-table-form, .checkin-card, .event-filter-row, .event-detail-grid, .help-grid, .detail-list div, .private-contact-grid, .registration-filter, .location-edit-layout, .location-contact-grid, .location-coordinate-grid {
        grid-template-columns: 1fr;
    }

    .location-map-canvas {
        min-height: 300px;
    }

    .split > :first-child,
    .split > .booking-tables {
        grid-column: auto;
    }

    .public-booking-participant {
        grid-template-columns: 24px 1fr 1fr;
    }

    .public-booking-participant-head {
        display: none;
    }

    .public-booking-participant .public-booking-field-label {
        display: inline;
    }

    .booking-participant-head {
        display: none;
    }

    .compact-participant-row {
        grid-template-columns: 28px minmax(0, 1fr) 34px;
        align-items: start;
    }

    .compact-participant-row .participant-fields {
        display: grid;
        grid-template-columns: 1fr;
        grid-column: 2;
        gap: 8px;
    }

    .compact-participant-row .icon-button {
        grid-column: 3;
    }

    .compact-participant-row label {
        font-size: 12.333px;
    }

    .public-booking-participant label:nth-of-type(3),
    .public-booking-participant label:nth-of-type(4) {
        grid-column: 2 / -1;
    }

    .registration-event-summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .registration-card {
        gap: 4px;
        padding: 7px 8px;
        background: #ffffff;
    }

    .registration-calendar-panel {
        padding: 8px;
        gap: 6px;
    }

    .registration-calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .registration-calendar-nav {
        justify-content: flex-start;
    }

    .registration-calendar-head span {
        padding: 5px 2px;
        font-size: 12.333px;
    }

    .registration-calendar-day {
        min-height: 42px;
        padding: 4px;
        gap: 3px;
    }

    .registration-calendar-date {
        min-height: 18px;
        gap: 2px;
    }

    .registration-calendar-date strong {
        width: 18px;
        height: 18px;
        font-size: 12.333px;
    }

    .registration-calendar-date span {
        max-width: 100%;
        padding: 1px 3px;
        font-size: 10.333px;
    }

    .registration-calendar-event {
        padding: 3px 4px;
        font-size: 11.333px;
        line-height: 1.1;
    }

    .registration-event-summary {
        grid-template-columns: minmax(0, 1fr) 100px;
        grid-template-rows: repeat(3, minmax(16px, auto));
        gap: 2px 7px;
        padding-bottom: 4px;
    }

    .registration-event-cell {
        gap: 0;
        min-width: 0;
    }

    .registration-location-cell {
        grid-column: 1;
        grid-row: 2;
    }

    .registration-address {
        display: none;
    }

    .registration-place {
        display: inline;
    }

    .registration-date-cell,
    .registration-case-cell,
    .registration-price-cell {
        display: flex;
        align-items: baseline;
        flex-wrap: nowrap;
        gap: 2px 6px;
    }

    .registration-date-cell {
        grid-column: 1;
        grid-row: 1;
    }

    .registration-case-cell {
        grid-column: 1;
        grid-row: 3;
    }

    .registration-date-cell strong,
    .registration-location-cell strong,
    .registration-case-cell strong,
    .registration-price-cell strong {
        font-size: 13.333px;
        line-height: 1.1;
    }

    .registration-date-cell span,
    .registration-location-cell span:not(.badge),
    .registration-case-cell span:not(.badge) {
        font-size: 13.333px;
        line-height: 1.1;
    }

    .registration-date-cell > *,
    .registration-location-cell > *,
    .registration-case-cell > * {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .registration-location-cell {
        margin-top: 0;
        display: flex;
        align-items: baseline;
        flex-wrap: nowrap;
        gap: 2px 6px;
    }

    .registration-location-cell strong::after {
        content: ",";
    }

    .registration-price-cell {
        grid-column: 2;
        grid-row: 2 / 4;
        align-self: start;
        display: grid;
        gap: 5px;
        justify-content: flex-end;
        justify-items: end;
    }

    .registration-price-cell .badge {
        margin-top: 0;
        padding: 3px 4px;
        font-size: 11.333px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .registration-price-cell strong {
        white-space: nowrap;
    }

    .registration-event-action {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        align-self: start;
        min-width: 100px;
        gap: 2px;
    }

    .registration-event-action .button,
    .registration-event-action button,
    .public-registration-form .button,
    .public-registration-form button {
        min-height: 28px;
        padding: 4px 8px;
        font-size: 13.333px;
    }

    .registration-action-note {
        font-size: 11.333px;
        line-height: 1.1;
        max-width: 100px;
    }

    .registration-filter {
        gap: 7px;
        padding: 10px;
        margin-bottom: 10px;
    }

    .registration-map-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .registration-map-canvas {
        min-height: 240px;
        height: 240px;
        touch-action: pan-y !important;
    }

    .registration-map-canvas.leaflet-container {
        touch-action: pan-y !important;
    }

    .registration-list {
        gap: 9px;
    }

    .public-registration-head {
        margin-bottom: 10px;
    }

    .public-registration-head h1 {
        font-size: 25.333px;
    }

    .public-registration-head p {
        margin-top: 5px;
        font-size: 14.333px;
        line-height: 1.32;
    }

    .public-registration-form {
        gap: 6px;
        padding: 8px;
    }

    .public-registration-form input,
    .public-registration-form select,
    .public-registration-form textarea {
        min-height: 29px;
        padding: 3px 6px;
    }

    .public-registration-form label {
        font-size: 13.333px;
        gap: 3px;
    }

    .public-registration-form h3,
    .registration-participants h3 {
        font-size: 16.333px;
    }

    .registration-participant {
        gap: 6px;
        padding: 7px;
    }

    .registration-participant-fields {
        gap: 6px;
    }

    .registration-card-detail {
        padding: 9px;
    }

    .registration-card-detail .registration-event-summary {
        margin-bottom: 0;
    }

    .registration-card-detail .registration-event-action {
        align-self: start;
    }

    .toolbar-panel .inline-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        width: 100%;
    }

    .toolbar-panel .inline-form input[name="name"] {
        grid-column: 1 / -1;
        width: 100%;
    }

    .toolbar-panel .inline-form .capacity-input {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
    }

    .toolbar-panel .inline-form .button {
        width: 100%;
    }

    .toolbar-panel > form:not(.inline-form),
    .toolbar-panel > form:not(.inline-form) .button {
        width: 100%;
    }

    .head-actions {
        width: 100%;
    }

    .copy-field {
        grid-template-columns: 1fr;
    }

    .checkin-group-head {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 8px 10px;
    }

    .checkin-group-badges,
    .checkin-group-actions {
        grid-column: 2;
        min-width: 0;
        width: 100%;
    }

    .checkin-group-badges {
        justify-items: start;
    }

    .checkin-group-badges .badge {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .checkin-group-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        justify-content: flex-start;
    }

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

    .checkin-participants {
        padding-left: 0;
    }

    .checkin-person-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .checkin-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
    }

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

    .small-button {
        min-width: 0;
        padding-left: 5px;
        padding-right: 5px;
        line-height: 1.15;
        white-space: normal;
    }

    .event-info-row,
    .event-card-compact .event-info-row {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .event-list-header {
        display: none;
    }

    .event-list .event-card .event-label {
        display: block;
    }

    .restaurant-info-links {
        grid-template-columns: 1fr;
    }

    .event-card {
        overflow: hidden;
    }

    .event-info-row > div {
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
    }

    .event-info-row > div:last-child {
        border-bottom: 0;
    }

    .event-card-today .event-info-row {
        border-left: 5px solid var(--primary);
    }

    .event-card-today .event-info-row > div {
        border-left: 0;
    }

    .event-info-row strong,
    .event-info-row span {
        overflow-wrap: anywhere;
    }

    .event-period > h2 {
        flex-wrap: wrap;
    }

    .event-filter-row {
        padding: 12px;
    }

    .table-wrap {
        overflow-x: auto;
    }

    th, td {
        white-space: nowrap;
    }

    .location-table,
    .user-table,
    .feature-request-table {
        overflow: visible;
    }

    .location-table,
    .feature-request-table {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .location-table table,
    .location-table tbody,
    .location-table tr,
    .location-table td,
    .user-table table,
    .user-table tbody,
    .user-table tr,
    .user-table td,
    .feature-request-table table,
    .feature-request-table tbody,
    .feature-request-table tr,
    .feature-request-table td {
        display: block;
        width: 100%;
    }

    .location-table thead,
    .user-table thead,
    .feature-request-table thead {
        display: none;
    }

    .location-table tbody,
    .user-table tbody,
    .feature-request-table tbody {
        display: grid;
        gap: 10px;
    }

    .location-table tr,
    .feature-request-table tr {
        display: grid;
        gap: 0;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--surface);
        box-shadow: 0 8px 24px rgba(31, 23, 21, .06);
        overflow: hidden;
    }

    .user-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
        gap: 8px;
        padding: 10px;
        border-bottom: 1px solid var(--line);
        background: #faf8f5;
    }

    .user-table tr:last-child {
        border-bottom: 0;
    }

    .location-table td,
    .user-table td,
    .feature-request-table td {
        border-bottom: 0;
        padding: 0;
        white-space: normal;
        min-width: 0;
    }

    .location-table td,
    .feature-request-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
    }

    .location-table td:last-child,
    .feature-request-table td:last-child {
        border-bottom: 0;
    }

    .location-table td::before,
    .feature-request-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 12.333px;
        font-weight: 400;
        text-transform: uppercase;
    }

    .location-table td:first-child {
        grid-column: auto;
    }

    .location-table td:nth-child(2) {
        grid-column: auto;
        justify-self: stretch;
    }

    .location-table td:nth-child(3),
    .location-table td:nth-child(4),
    .location-table .actions {
        grid-column: auto;
    }

    .location-table td:nth-child(3),
    .location-table td:nth-child(4) {
        overflow-wrap: anywhere;
    }

    .location-table .actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        background: #faf8f5;
        text-align: left;
    }

    .feature-request-table .actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        background: #faf8f5;
        text-align: left;
    }

    .feature-request-table .actions > *,
    .feature-request-action-buttons > * {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .feature-request-action-buttons {
        display: inline-grid;
        grid-auto-flow: column;
        grid-auto-columns: 32px;
        flex: 0 0 auto;
        align-items: center;
        justify-content: start;
        gap: 8px;
        margin-left: 0;
    }

    .feature-request-table .feature-request-action-buttons > * {
        margin-left: 0;
    }

    .feature-request-table .actions .badge,
    .feature-request-table .actions .compact-cell-note {
        text-align: left;
    }

    .feature-request-table .actions .compact-cell-note {
        flex-basis: 100%;
    }

    .user-table td:nth-child(3) {
        grid-column: 1;
    }

    .user-table td:nth-child(4) {
        grid-column: 2;
    }

    .user-table .actions {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .user-table .actions a,
    .user-table .actions form,
    .user-table .actions button {
        margin-left: 0;
    }

    .mail-table-head {
        display: none;
    }

    .mail-table-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .mail-table-row > span::before {
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 12.333px;
        font-weight: 400;
        text-transform: uppercase;
    }

    .mail-cell-booking::before {
        content: "Buchung";
    }

    .mail-cell-meal::before {
        content: "Menü";
    }

    .mail-cell-history::before {
        content: "Versand";
    }

    .mail-cell-action {
        justify-content: flex-start;
    }

    .mail-send-grid {
        grid-template-columns: 1fr;
    }
}
