/* ============================================================
   OpenMelder – frontend management UI  [openmelder_admin]

   Ersetzt die wp-admin-Styles, auf die die Verwaltungsansichten
   angewiesen sind (.wrap, .button, .form-table, .wp-list-table,
   .notice …), und bindet sie an das Design-System
   des Themes an.

   Farben, Abstände, Radien und Schrift kommen aus den semantischen
   KERN-Tokens (--kern-*). Die kippen bei data-kern-theme="dark"
   bzw. prefers-color-scheme automatisch – deshalb gibt es hier
   keinen eigenen Dark-Mode-Block. Jeder Token hat einen hellen
   Fallback, damit die Verwaltung auch unter anderen Themes
   brauchbar aussieht.

   Alles ist unter .om-fe-admin gescoped. Wo das Theme mit
   .kux-prose a:visited / .kux-prose th, td / .kux-prose table
   hineinregiert, sind die Selektoren bewusst eine Stufe
   spezifischer.
   ============================================================ */

/* ── 0. Token-Brücke ────────────────────────────────────────── */
.om-fe-admin {
    --om-font:          var(--kern-typography-font-family-default, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    --om-text:          var(--kern-color-layout-text-default-contextual, #131525);
    --om-muted:         var(--kern-color-layout-text-muted-contextual, #5c6079);
    --om-bg:            var(--kern-color-layout-background-default-contextual, #fff);
    --om-surface:       var(--kern-color-layout-layer-surface-contextual, #f7f7f9);
    --om-border:        var(--kern-color-decorative-border-contextual, #c0c3d5);
    --om-border-strong: var(--kern-color-layout-border-contextual, #6e7597);

    --om-action:        var(--kern-color-action-default-contextual, #2044aa);
    --om-on-action:     var(--kern-color-action-on-default-contextual, #fff);
    --om-action-hover:  var(--kern-color-action-state-indicator-shade-hover, #1a378a);
    --om-action-tint:   var(--kern-color-action-state-indicator-tint-hover-opacity, rgba(32, 68, 170, .08));
    --om-focus:         var(--kern-color-action-focus-default-contextual, #454b6b);

    --om-danger:        var(--kern-color-feedback-danger-contextual, #bd0f09);
    --om-danger-bg:     var(--kern-color-feedback-danger-background-contextual, #fde7e6);
    --om-success:       var(--kern-color-feedback-success-contextual, #0b7a4b);
    --om-success-bg:    var(--kern-color-feedback-success-background-contextual, #dff7ec);
    --om-warning:       var(--kern-color-feedback-warning-contextual, #a35a00);
    --om-warning-bg:    var(--kern-color-feedback-warning-background-contextual, #fff1dc);
    --om-info:          var(--kern-color-feedback-info-contextual, #006b8c);
    --om-info-bg:       var(--kern-color-feedback-info-background-contextual, #c0f3ff);

    /* Meldungsstatus – von Liste und Detailansicht per var() referenziert */
    --om-status-new:          var(--om-info);
    --om-status-new-bg:       var(--om-info-bg);
    --om-status-progress:     var(--om-warning);
    --om-status-progress-bg:  var(--om-warning-bg);
    --om-status-done:         var(--om-success);
    --om-status-done-bg:      var(--om-success-bg);

    /* Priorität (Sterne) */
    --om-star:          #e0a100;
    --om-star-off:      var(--om-border);

    --om-input-bg:      var(--kern-color-layout-layer-surface-contextual, #f7f7f9);
    --om-input-border:  var(--kern-color-form-input-border-contextual, #171a2b);

    --om-radius:        var(--kern-metric-border-radius-default, 4px);
    --om-radius-sm:     var(--kern-metric-border-radius-small, 2px);
    --om-sp-xs:         var(--kern-metric-space-x-small, 4px);
    --om-sp-sm:         var(--kern-metric-space-small, 8px);
    --om-sp-md:         var(--kern-metric-space-default, 16px);
    --om-sp-lg:         var(--kern-metric-space-large, 24px);
    --om-sp-xl:         var(--kern-metric-space-x-large, 32px);

    --om-fs-sm:         .875rem;   /* 14px – Meta, Tabellenzellen */
    --om-fs-md:         1rem;      /* 16px – Basis (KERN small-static) */
    --om-fs-lg:         1.3125rem; /* 21px – Sektionstitel (KERN large-static) */
    --om-fs-xl:         1.625rem;  /* 26px – Seitentitel */

    /* Der Container des Themes (.kern-container / .kux-prose) übernimmt
       Zentrierung und Seitenabstand – hier bewusst kein margin/padding. */
    color: var(--om-text);
    font-family: var(--om-font);
    font-size: var(--om-fs-md);
    line-height: 1.5;
    text-align: left;
    /* Das Theme setzt overflow-wrap:anywhere auf .kux-prose – damit
       schrumpfen Tabellenspalten auf Zeichenbreite („Pri o"). break-word
       bricht nur im Notfall und laesst die Spaltenbreite in Ruhe. */
    overflow-wrap: break-word;
}

.om-fe-admin *,
.om-fe-admin *::before,
.om-fe-admin *::after {
    box-sizing: border-box;
}

/* hidden-Attribut muss gegen display-Regeln (z. B. .button { display:inline-flex }) gewinnen */
.om-fe-admin [hidden] {
    display: none !important;
}

/* ── Status-Auswahl (Detail + Liste) ────────────────────────── */
.om-fe-admin .om-status-select {
    font-weight: 600;
    border-left: 6px solid var(--om-muted);
}

.om-fe-admin .om-status-select[data-status="new"] {
    border-left-color: var(--om-status-new);
    background-color: var(--om-status-new-bg);
}

.om-fe-admin .om-status-select[data-status="in_progress"] {
    border-left-color: var(--om-status-progress);
    background-color: var(--om-status-progress-bg);
}

.om-fe-admin .om-status-select[data-status="done"] {
    border-left-color: var(--om-status-done);
    background-color: var(--om-status-done-bg);
}

.om-fe-admin .om-status-select option {
    background: var(--om-bg);
    color: var(--om-text);
}

/* ── Popup "Vorgang abschließen" (Detail + Liste) ───────────── */
.om-fe-admin .om-dialog {
    width: min(600px, 95vw);
    padding: 0;
    border: none;
    border-radius: 8px;
    background: var(--om-bg);
    color: var(--om-text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}

.om-fe-admin .om-dialog::backdrop {
    background: rgba(0, 0, 0, .55);
}

.om-fe-admin .om-dialog-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--om-border);
    font-weight: 700;
    font-size: 1.05em;
}

.om-fe-admin .om-dialog-body {
    padding: 14px 18px;
}

.om-fe-admin .om-dialog-body p {
    margin: 0 0 10px;
}

.om-fe-admin .om-dialog-body textarea {
    width: 100%;
    font: inherit;
}

.om-fe-admin .om-dialog-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--om-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ── Priorität als Sterne (openmelder_priority_stars_html) ──────────── */
.om-fe-admin .om-prio-stars {
    white-space: nowrap;
    letter-spacing: 1px;
}

.om-fe-admin .om-prio-on {
    color: var(--om-star);
}

.om-fe-admin .om-prio-off {
    color: var(--om-star-off);
}

/* Dringend: rot, pulsierend (nicht bei "Bewegung reduzieren") */
.om-fe-admin .om-prio-stars[data-prio="Dringend"] .om-prio-on,
.om-fe-admin .om-star-picker:not(:has(label:hover)):has(input[value="Dringend"]:checked) label {
    color: var(--om-danger);
}

@media (prefers-reduced-motion: no-preference) {
    .om-fe-admin .om-prio-stars[data-prio="Dringend"] .om-prio-on,
    .om-fe-admin .om-star-picker:not(:has(label:hover)):has(input[value="Dringend"]:checked) label {
        animation: om-urgent-blink 1s ease-in-out infinite;
    }
}

@keyframes om-urgent-blink {
    50% { opacity: .25; }
}

/* Auswahl in der Detailansicht: echte Radios, Sterne als Labels */
.om-fe-admin .om-star-picker {
    border: 0;
    padding: 0;
    margin: 0 0 var(--om-sp-sm);
    display: flex;
    align-items: center;
    gap: 2px;
}

.om-fe-admin .om-star-picker label {
    position: relative;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: var(--om-star-off);
}

.om-fe-admin .om-star-picker input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

/* Gewählter Stern + alle davor; beim Hovern gilt stattdessen die Vorschau. */
.om-fe-admin .om-star-picker:not(:has(label:hover)) label:has(input:checked),
.om-fe-admin .om-star-picker:not(:has(label:hover)) label:has(~ label input:checked),
.om-fe-admin .om-star-picker label:hover,
.om-fe-admin .om-star-picker label:has(~ label:hover) {
    color: var(--om-star);
}

.om-fe-admin .om-star-picker label:has(input:focus-visible) {
    outline: 2px solid var(--om-focus);
    outline-offset: 2px;
    border-radius: var(--om-radius-sm);
}

.om-fe-admin .om-star-picker--sm {
    margin: 0;
}

.om-fe-admin .om-star-name {
    margin-left: var(--om-sp-sm);
    font-weight: 600;
    font-size: var(--om-fs-sm);
}

/* ── 1. Lesebreite freigeben ────────────────────────────────── */
/* Das Theme deckelt Fließtext auf 50rem (.kux-prose). Eine Verwaltung
   mit Tabellen und Karten braucht die volle Containerbreite. */
.kux-prose:has(> .om-fe-admin),
.entry-content:has(> .om-fe-admin) {
    max-width: none;
}

/* ── 2. Bleed des Themes neutralisieren ─────────────────────── */
/* .kux-prose table { display:block } macht Tabellen zu Scroll-Containern */
.om-fe-admin table {
    display: table;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* .kux-prose th, td zieht Vollrahmen und 8/16px Padding ein */
.om-fe-admin table th,
.om-fe-admin table td {
    border: none;
    padding: 0;
    text-align: left;
    background: transparent;
}

/* .kux-prose a / a:visited (0,2,1) färbt Buttons lila ein */
.om-fe-admin a {
    color: var(--om-action);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.om-fe-admin a:visited {
    color: var(--om-action);
}

.om-fe-admin a:hover {
    text-decoration-thickness: 2px;
}

.om-fe-admin p {
    margin: 0 0 var(--om-sp-md);
}

/* ── 3. Navigation ──────────────────────────────────────────── */
.om-fe-nav {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: var(--om-sp-xs);
    margin: 0 0 var(--om-sp-lg);
    border-bottom: 1px solid var(--om-border);
}

.om-fe-nav > a {
    display: inline-flex;
    align-items: center;
    padding: var(--om-sp-sm) var(--om-sp-md);
    margin-bottom: -1px;
    color: var(--om-muted);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s, background-color .15s;
}

.om-fe-nav > a:visited {
    color: var(--om-muted);
}

.om-fe-nav > a:hover {
    color: var(--om-action);
    background: var(--om-action-tint);
    text-decoration: none;
    border-radius: var(--om-radius) var(--om-radius) 0 0;
}

.om-fe-nav > a.om-fe-nav-current,
.om-fe-nav > a.om-fe-nav-current:visited {
    color: var(--om-text);
    font-weight: 600;
    border-bottom-color: var(--om-action);
}

.om-fe-nav .om-fe-nav-right {
    display: flex;
    align-items: center;
    gap: var(--om-sp-sm);
    margin-left: auto;
    padding: 0 var(--om-sp-sm);
    font-size: var(--om-fs-sm);
    color: var(--om-muted);
}

.om-fe-nav .om-fe-nav-right a {
    padding: var(--om-sp-xs) var(--om-sp-sm);
    border-radius: var(--om-radius);
    text-decoration: none;
}

.om-fe-nav .om-fe-nav-right a:hover {
    background: var(--om-action-tint);
}

/* ── 4. Grundgerüst, Titel, Sektionen ───────────────────────── */
.om-fe-admin .wrap {
    margin: 0;
    max-width: none;
}

/* Editor- und Einstellungsseiten: lesbar, aber breiter als Fließtext */
.om-fe-admin .om-wrap-editor {
    max-width: 64rem;
}

.om-fe-admin .om-wrap-narrow {
    max-width: 40rem;
}

.om-fe-admin .wrap > h1,
.om-fe-admin .wp-heading-inline {
    display: inline-block;
    margin: 0 var(--om-sp-sm) 0 0;
    padding: 0;
    font-size: var(--om-fs-xl);
    font-weight: 600;
    line-height: 1.25;
    color: var(--om-text);
}

.om-fe-admin hr.wp-header-end {
    border: none;
    border-top: 1px solid var(--om-border);
    margin: var(--om-sp-md) 0 var(--om-sp-md);
}

/* Sektionstitel (Allgemein, Zugriff, Felder …) */
.om-fe-admin .wrap h2 {
    margin: var(--om-sp-xl) 0 var(--om-sp-sm);
    font-size: var(--om-fs-lg);
    font-weight: 600;
    line-height: 1.3;
    color: var(--om-text);
}

.om-fe-admin .wrap h2:first-of-type {
    margin-top: var(--om-sp-lg);
}

.om-fe-admin .om-optional {
    font-size: .7em;
    font-weight: 400;
    color: var(--om-muted);
}

.om-fe-admin .description,
.om-fe-admin p.description {
    margin: var(--om-sp-xs) 0 0;
    color: var(--om-muted);
    font-size: var(--om-fs-sm);
    font-style: normal;
    line-height: 1.45;
}

/* Beschreibung direkt unter einem Sektionstitel */
.om-fe-admin .wrap h2 + .description {
    margin: 0 0 var(--om-sp-md);
}

.om-fe-admin code {
    padding: .1em .35em;
    border-radius: var(--om-radius-sm);
    background: var(--om-surface);
    font-family: var(--kern-typography-font-family-fira-mono, ui-monospace, Consolas, monospace);
    font-size: .9em;
}

.om-fe-admin .om-muted        { color: var(--om-muted); }
.om-fe-admin .om-danger-text  { color: var(--om-danger); }
.om-fe-admin .om-status-on    { color: var(--om-success); font-weight: 600; }
.om-fe-admin .om-status-off   { color: var(--om-danger);  font-weight: 600; }
.om-fe-admin .om-status-warn  { color: var(--om-warning); font-weight: 600; }

.om-fe-admin .om-tag {
    display: inline-block;
    margin-left: var(--om-sp-sm);
    padding: 0 var(--om-sp-sm);
    border-radius: var(--om-radius);
    background: var(--om-surface);
    color: var(--om-muted);
    font-size: .8em;
    line-height: 1.7;
    white-space: nowrap;
}

/* ── 5. Buttons (Rezept: .kern-btn) ─────────────────────────── */
.om-fe-admin .button,
.om-fe-admin .button:visited,
.om-fe-admin .page-title-action,
.om-fe-admin .page-title-action:visited,
.om-fe-admin button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--om-sp-xs);
    min-height: 2.5rem;
    margin: 0;
    padding: 0 var(--om-sp-md);
    border: 1px solid var(--om-action);
    border-radius: var(--om-radius);
    background: transparent;
    color: var(--om-action);
    font-family: inherit;
    font-size: var(--om-fs-md);
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: top;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color .15s, border-color .15s, color .15s;
}

.om-fe-admin .button:hover,
.om-fe-admin .page-title-action:hover {
    background: var(--om-action-tint);
    color: var(--om-action);
    text-decoration: none;
}

.om-fe-admin .button:focus-visible,
.om-fe-admin .page-title-action:focus-visible {
    outline: 3px solid var(--om-focus);
    outline-offset: 1px;
}

.om-fe-admin .button:disabled,
.om-fe-admin .button[disabled] {
    opacity: .4;
    cursor: default;
    background: transparent;
}

/* button.button-primary: sonst gewinnt "button.button" (0,2,1) und der Button bleibt ungefüllt */
.om-fe-admin .button-primary,
.om-fe-admin .button-primary:visited,
.om-fe-admin button.button-primary,
.om-fe-admin .page-title-action,
.om-fe-admin .page-title-action:visited {
    background: var(--om-action);
    border-color: var(--om-action);
    color: var(--om-on-action);
}

.om-fe-admin .button-primary:hover,
.om-fe-admin button.button-primary:hover,
.om-fe-admin .page-title-action:hover {
    background: var(--om-action-hover);
    border-color: var(--om-action-hover);
    color: var(--om-on-action);
}

.om-fe-admin .button-primary:disabled {
    background: var(--om-action);
}

.om-fe-admin .button-small {
    min-height: 2rem;
    padding: 0 var(--om-sp-sm);
    font-size: var(--om-fs-sm);
}

.om-fe-admin .button-large {
    min-height: 3rem;
    padding: 0 var(--om-sp-lg);
}

.om-fe-admin .button.om-danger,
.om-fe-admin .button.om-danger:visited {
    color: var(--om-danger);
    border-color: var(--om-danger);
}

.om-fe-admin .button.om-danger:hover {
    background: var(--om-danger-bg);
    color: var(--om-danger);
}

.om-fe-admin .button-link,
.om-fe-admin .button-link:visited {
    display: inline;
    min-height: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--om-action);
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.om-fe-admin .button-link.om-danger,
.om-fe-admin .button-link.om-danger-text {
    color: var(--om-danger);
    text-decoration: none;
}

.om-fe-admin .page-title-action {
    position: relative;
    top: -.2em;
    min-height: 2.25rem;
    font-size: var(--om-fs-sm);
}

.om-fe-admin p.submit {
    display: flex;
    flex-wrap: wrap;
    gap: var(--om-sp-sm);
    margin: var(--om-sp-xl) 0 0;
    padding: var(--om-sp-md) 0 0;
    border-top: 1px solid var(--om-border);
}

.om-fe-admin p.submit .button {
    margin-left: 0 !important;
}

/* ── 6. Formularelemente (Rezept: .kern-form-input__input) ──── */
.om-fe-admin input[type="text"],
.om-fe-admin input[type="email"],
.om-fe-admin input[type="url"],
.om-fe-admin input[type="number"],
.om-fe-admin input[type="search"],
.om-fe-admin input[type="password"],
.om-fe-admin select,
.om-fe-admin textarea {
    display: inline-block;
    width: auto;
    max-width: 100%;
    min-height: 2.5rem;
    margin: 0;
    padding: 0 .75rem;
    border: none;
    border-bottom: 2px solid var(--om-input-border);
    border-radius: var(--om-radius-sm) var(--om-radius-sm) 0 0;
    background: var(--om-input-bg);
    color: var(--om-text);
    font-family: inherit;
    font-size: var(--om-fs-md);
    line-height: 1.5;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

.om-fe-admin select {
    padding-right: 2rem;
    cursor: pointer;
}

/* Das Kit setzt textarea-Padding mit !important – wir übernehmen es. */
.om-fe-admin textarea {
    min-height: 6rem;
    line-height: 1.5;
    resize: vertical;
}

.om-fe-admin input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.om-fe-admin select:hover,
.om-fe-admin textarea:hover {
    border-bottom-color: var(--om-action);
}

.om-fe-admin input:not([type="checkbox"]):not([type="radio"]):focus,
.om-fe-admin select:focus,
.om-fe-admin textarea:focus {
    outline: 3px solid var(--om-focus);
    outline-offset: 0;
    border-bottom-color: var(--om-input-border);
}

.om-fe-admin input[readonly] {
    border-bottom-color: var(--om-border);
    cursor: default;
}

.om-fe-admin ::placeholder {
    color: var(--om-muted);
    opacity: .8;
}

.om-fe-admin input[type="checkbox"],
.om-fe-admin input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0 var(--om-sp-sm) 0 0;
    vertical-align: -.2em;
    accent-color: var(--om-action);
    cursor: pointer;
}

.om-fe-admin input[type="file"] {
    font-size: var(--om-fs-sm);
}

.om-fe-admin label {
    font-weight: 400;
    cursor: pointer;
}

.om-fe-admin input.regular-text,
.om-fe-admin textarea.regular-text { width: 100%; max-width: 36rem; }
.om-fe-admin input.large-text,
.om-fe-admin textarea.large-text   { width: 100%; }
.om-fe-admin input.small-text      { width: 6em; }

/* In den Einstellungs-/Editor-Karten fuellen Felder die Zelle –
   kurze Felder (Prioritaet, Umkreis) behalten ihre Inline-Breite. */
.om-fe-admin .form-table td > input[type="text"],
.om-fe-admin .form-table td > input[type="email"],
.om-fe-admin .form-table td > input[type="url"],
.om-fe-admin .form-table td > textarea {
    width: 100%;
}

.om-fe-admin .form-table td > select {
    width: 100%;
    max-width: 36rem;
}

/* Upload-Zone (Logo, GeoJSON) */
.om-fe-admin .om-upload-label {
    display: inline-flex;
    align-items: center;
    gap: var(--om-sp-sm);
    padding: var(--om-sp-sm) var(--om-sp-md);
    border: 2px dashed var(--om-border-strong);
    border-radius: var(--om-radius);
    background: var(--om-surface);
    color: var(--om-text);
    font-size: var(--om-fs-sm);
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.om-fe-admin .om-upload-label:hover {
    border-color: var(--om-action);
    background: var(--om-action-tint);
}

/* ── 7. form-table als Karte ────────────────────────────────── */
.om-fe-admin .form-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--om-border);
    border-radius: var(--om-radius);
    background: var(--om-bg);
    overflow: hidden;
}

.om-fe-admin .form-table th,
.om-fe-admin .form-table td {
    padding: var(--om-sp-md) var(--om-sp-lg);
    border-bottom: 1px solid var(--om-border);
    vertical-align: top;
    line-height: 1.45;
}

.om-fe-admin .form-table th {
    width: 14rem;
    background: var(--om-surface);
    font-weight: 600;
    font-size: var(--om-fs-sm);
    color: var(--om-text);
    padding-top: calc(var(--om-sp-md) + .35rem); /* optisch auf Inputhöhe */
}

.om-fe-admin .form-table tr:last-child th,
.om-fe-admin .form-table tr:last-child td {
    border-bottom: none;
}

.om-fe-admin .form-table td .description:first-child {
    margin-top: 0;
}

.om-fe-admin .form-table td > label {
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-height: 2.5rem;
}

/* ── 8. Datentabellen (Rezept: .kern-table) ─────────────────── */
.om-fe-admin .widefat,
.om-fe-admin .wp-list-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--om-border);
    border-radius: var(--om-radius);
    background: var(--om-bg);
    font-size: var(--om-fs-sm);
}

.om-fe-admin .widefat thead th,
.om-fe-admin .wp-list-table thead th {
    padding: .625rem .75rem;
    background: var(--om-surface);
    border-bottom: 1px solid var(--om-border-strong);
    font-weight: 600;
    color: var(--om-text);
    line-height: 1.35;
    vertical-align: middle;
    white-space: nowrap;
}

.om-fe-admin .widefat thead th:first-child,
.om-fe-admin .wp-list-table thead th:first-child {
    border-top-left-radius: var(--om-radius);
}

.om-fe-admin .widefat thead th:last-child,
.om-fe-admin .wp-list-table thead th:last-child {
    border-top-right-radius: var(--om-radius);
}

.om-fe-admin .widefat td,
.om-fe-admin .wp-list-table td {
    padding: .625rem .75rem;
    border-bottom: 1px solid var(--om-border);
    vertical-align: middle;
    line-height: 1.45;
    word-wrap: break-word;
}

.om-fe-admin .widefat tbody tr:last-child td,
.om-fe-admin .wp-list-table tbody tr:last-child td {
    border-bottom: none;
}

.om-fe-admin .striped tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--om-surface) 55%, var(--om-bg));
}

.om-fe-admin .widefat tbody tr:hover,
.om-fe-admin .wp-list-table tbody tr:hover {
    background: var(--om-surface);
}

.om-fe-admin .wp-list-table.fixed {
    table-layout: auto;
}

.om-fe-admin .widefat tbody tr:last-child td:first-child,
.om-fe-admin .wp-list-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--om-radius);
}

.om-fe-admin .widefat tbody tr:last-child td:last-child,
.om-fe-admin .wp-list-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--om-radius);
}

/* Sortierlinks im Tabellenkopf */
.om-fe-admin .wp-list-table thead a,
.om-fe-admin .wp-list-table thead a:visited {
    color: inherit;
    text-decoration: none;
}

.om-fe-admin .wp-list-table thead a:hover {
    color: var(--om-action);
}

.om-fe-admin .om-actions {
    white-space: nowrap;
}

.om-fe-admin .om-actions form {
    display: inline-block;
    vertical-align: top;
    margin: 0;
}

.om-fe-admin .om-actions .button + form,
.om-fe-admin .om-actions .button + .button {
    margin-left: var(--om-sp-xs);
}

.om-fe-admin .om-icon-cell {
    font-size: 1.4em;
    line-height: 1;
}

/* Zugriffs-Matrix */
.om-fe-admin .om-access-matrix {
    max-width: 60rem;
    margin-bottom: var(--om-sp-lg);
}

.om-fe-admin .om-access-matrix .om-col-user {
    min-width: 14rem;
}

.om-fe-admin .om-access-matrix .om-col-check {
    width: 8.5rem;
    text-align: center;
}

.om-fe-admin .om-access-matrix .om-th-label {
    font-weight: 600;
}

.om-fe-admin .om-access-matrix thead th {
    white-space: normal;
    vertical-align: top;
}

.om-fe-admin .om-access-matrix .om-th-desc {
    margin-top: 2px;
    color: var(--om-muted);
    font-size: .8em;
    font-weight: 400;
    line-height: 1.3;
}

.om-fe-admin .om-access-matrix input[type="checkbox"] {
    margin: 0;
    width: 1.25rem;
    height: 1.25rem;
}

/* Feld-Editor */
.om-fe-admin #om-fields-table {
    margin-bottom: var(--om-sp-sm);
}

.om-fe-admin #om-fields-table td {
    padding: var(--om-sp-sm) var(--om-sp-xs);
}

.om-fe-admin #om-fields-table td:first-child {
    padding-left: var(--om-sp-sm);
}

.om-fe-admin #om-fields-table td:last-child {
    padding-right: var(--om-sp-sm);
}

.om-fe-admin #om-fields-table input[type="text"],
.om-fe-admin #om-fields-table select {
    width: 100%;
    min-height: 2.25rem;
    font-size: var(--om-fs-sm);
    padding: 0 .5rem;
}

.om-fe-admin #om-fields-table input[type="checkbox"] {
    margin: 0;
}

.om-fe-admin .om-drag {
    color: var(--om-muted);
    text-align: center;
    cursor: grab;
    user-select: none;
}

.om-fe-admin .om-field-row:hover .om-drag {
    color: var(--om-action);
}

.om-fe-admin #om-add-field {
    margin-bottom: var(--om-sp-md);
}

/* Hinweise zu Sondertypen unter dem Feld-Editor */
.om-fe-admin .om-field-hints {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--om-sp-sm) var(--om-sp-lg);
    margin: var(--om-sp-md) 0 0;
    padding: var(--om-sp-md) var(--om-sp-lg);
    border: 1px solid var(--om-border);
    border-radius: var(--om-radius);
    background: var(--om-surface);
    font-size: var(--om-fs-sm);
    line-height: 1.45;
}

.om-fe-admin .om-field-hints dt {
    margin: 0;
    font-weight: 600;
    color: var(--om-text);
    white-space: nowrap;
}

.om-fe-admin .om-field-hints dd {
    margin: 0;
    color: var(--om-muted);
}

.om-fe-admin .om-field-hints code {
    font-size: .95em;
}

@media (max-width: 782px) {
    .om-fe-admin .om-field-hints {
        grid-template-columns: 1fr;
        gap: var(--om-sp-xs);
    }

    .om-fe-admin .om-field-hints dt {
        white-space: normal;
        margin-top: var(--om-sp-sm);
    }

    .om-fe-admin .om-field-hints dt:first-child {
        margin-top: 0;
    }
}

/* ── 9. Hinweise (Rezept: .kern-alert) ──────────────────────── */
.om-fe-admin .notice {
    margin: var(--om-sp-md) 0;
    padding: var(--om-sp-sm) var(--om-sp-md);
    border: none;
    border-radius: var(--om-radius);
    outline: 2px solid var(--om-info);
    outline-offset: -2px;
    background: var(--om-info-bg);
    color: var(--om-text);
}

.om-fe-admin .notice p {
    margin: var(--om-sp-xs) 0;
    font-size: var(--om-fs-sm);
}

.om-fe-admin .notice-success { outline-color: var(--om-success); background: var(--om-success-bg); }
.om-fe-admin .notice-warning { outline-color: var(--om-warning); background: var(--om-warning-bg); }
.om-fe-admin .notice-error   { outline-color: var(--om-danger);  background: var(--om-danger-bg); }

.om-fe-admin .notice pre {
    margin: var(--om-sp-sm) 0;
    padding: var(--om-sp-sm) var(--om-sp-md);
    border-radius: var(--om-radius-sm);
    background: color-mix(in srgb, var(--om-bg) 60%, transparent);
    font-size: .85em;
    overflow: auto;
}

.om-fe-admin .om-inline-notice {
    margin: var(--om-sp-sm) 0 0;
}

.om-fe-admin .om-inline-form {
    display: inline-block;
    margin: var(--om-sp-xs) 0 0;
}

/* ── 10. Filterleiste der Meldungsliste ─────────────────────── */
.om-fe-admin .om-filter-bar {
    gap: var(--om-sp-sm) var(--om-sp-md) !important;
    align-items: center;
    margin-top: var(--om-sp-md) !important;
}

.om-fe-admin .om-filter-bar select,
.om-fe-admin .om-filter-bar input[type="text"] {
    min-height: 2.5rem;
    font-size: var(--om-fs-sm);
}

.om-fe-admin .om-filter-reset {
    align-self: center;
    white-space: nowrap;
    font-size: var(--om-fs-sm);
}

.om-fe-admin .om-filter-bar .om-count {
    color: var(--om-muted);
    font-size: var(--om-fs-sm);
}

/* Meldungsliste kompakt: weniger Zellenpolster, kleine Inline-Controls */
.om-fe-admin #om-list-results .wp-list-table thead th,
.om-fe-admin #om-list-results .wp-list-table td {
    padding: .5rem;
}

.om-fe-admin select.om-inline-select {
    width: 100%;
    min-height: 2rem;
    padding: 0 .25rem 0 .5rem;
    font-size: var(--om-fs-sm);
}

/* In der Liste färbt schon die Zeile nach Status – der Select bleibt ein normales
   Feld (sonst verschwindet er in der gleichfarbigen Zeile), nur der Balken zeigt den Status. */
.om-fe-admin select.om-inline-select.om-status-select {
    border-left-width: 4px;
    background-color: var(--om-input-bg);
    font-weight: 400;
}

.om-fe-admin .om-star-picker--sm {
    gap: 0;
}

.om-fe-admin .om-star-picker--sm label {
    font-size: 16px;
}

.om-fe-admin #om-admin-map {
    border: 1px solid var(--om-border) !important;
    border-radius: var(--om-radius) !important;
}

/* Breite Tabellen scrollen im eigenen Container statt die Seite zu sprengen */
.om-fe-admin .om-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--om-sp-md);
}

.om-fe-admin .om-table-scroll > table {
    margin-bottom: 0;
}

/* ── 11. Detailansicht: Brücke zur eigenen Kartenoptik ──────── */
.om-fe-admin .om-wrap {
    max-width: none;
    font-family: inherit;
}

/* ── 12. Login-/Zugriffshinweis ─────────────────────────────── */
.om-fe-login-notice {
    max-width: 30rem;
    margin: var(--om-sp-xl) auto;
    padding: var(--om-sp-xl);
    border: 1px solid var(--om-border);
    border-radius: var(--om-radius);
    background: var(--om-bg);
    text-align: center;
}

.om-fe-login-notice h2 {
    margin: 0 0 var(--om-sp-sm);
    font-size: var(--om-fs-lg);
}

.om-fe-login-notice p {
    margin: 0 0 var(--om-sp-lg);
    color: var(--om-muted);
}

/* ── 13. Formular-Editor: Layout-Reste ──────────────────────── */
.om-fe-admin .om-form-editor .form-table th {
    width: 12rem;
}

.om-fe-admin #om-emoji-picker {
    background: var(--om-bg) !important;
    border-color: var(--om-border) !important;
    color: var(--om-text);
}

.om-fe-admin #om-emoji-picker input[type="text"] {
    width: 100%;
}

/* ── 14. Mobil ──────────────────────────────────────────────── */
@media (max-width: 782px) {
    .om-fe-admin .form-table th,
    .om-fe-admin .form-table td {
        display: block;
        width: auto;
        padding: var(--om-sp-sm) var(--om-sp-md);
    }

    .om-fe-admin .form-table th {
        padding-bottom: var(--om-sp-xs);
        border-bottom: none;
    }

    .om-fe-admin .form-table td {
        padding-top: var(--om-sp-xs);
    }

    .om-fe-admin .regular-text,
    .om-fe-admin input[type="text"],
    .om-fe-admin input[type="email"],
    .om-fe-admin input[type="url"],
    .om-fe-admin select,
    .om-fe-admin textarea {
        width: 100%;
        max-width: 100%;
        font-size: 16px; /* verhindert iOS-Zoom */
    }

    .om-fe-admin input[type="number"] {
        font-size: 16px;
    }

    .om-fe-nav > a {
        padding: var(--om-sp-sm) var(--om-sp-sm);
        font-size: var(--om-fs-sm);
    }

    .om-fe-nav .om-fe-nav-right {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        padding: var(--om-sp-xs) 0;
    }

    .om-fe-admin .om-table-scroll table {
        min-width: 40rem;
    }

    .om-fe-admin p.submit .button {
        flex: 1 1 auto;
    }
}

/* --- admin list --- */
.om-admin-marker {
    background: var(--om-bg, #fff);
    border: 2px solid var(--om-danger, #d00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#om-list-results.om-loading,
#om-list-results tr.om-saving {
    opacity: .5;
    transition: opacity .15s;
}

#om-list-results tr.om-saving {
    pointer-events: none;
}

.om-row-new td {
    background: var(--om-status-new-bg, #fdecea) !important;
}

.om-row-progress td {
    background: var(--om-status-progress-bg, #fff8e1) !important;
}

.om-row-done td {
    background: var(--om-status-done-bg, #e8f5e9) !important;
}

/* Filter bar */
.om-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.om-filter-bar select,
.om-filter-bar input[type="text"] {
    height: 32px;
    font-size: .9em;
}

/* Mobile cards - hidden on desktop */
.om-mobile-cards {
    display: none;
}

.om-mobile-card {
    border-radius: 8px;
    border: 1px solid var(--om-border, #ddd);
    margin-bottom: 10px;
    overflow: hidden;
    font-size: .9em;
}

.om-mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--om-border, rgba(0,0,0,.07));
}

.om-mc-adresse {
    font-weight: 600;
    font-size: 1em;
}

.om-mc-badge {
    color: var(--om-on-action, #fff);
    font-size: .75em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.om-mc-row {
    display: flex;
    gap: 8px;
    padding: 5px 14px;
    border-bottom: 1px solid var(--om-border, rgba(0,0,0,.05));
}

.om-mc-row:last-of-type {
    border-bottom: none;
}

.om-mc-label {
    flex-shrink: 0;
    width: 120px;
    font-size: .8em;
    font-weight: 600;
    color: var(--om-muted, #888);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-top: 1px;
}

.om-mc-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--om-border, rgba(0,0,0,.07));
    text-align: right;
}

.om-mc-btn {
    display: inline-block;
    padding: 7px 16px;
    background: var(--om-action, #2563eb);
    color: var(--om-on-action, #fff);
    border-radius: 6px;
    text-decoration: none;
    font-size: .85em;
    font-weight: 500;
}

@media (max-width: 782px) {

    /* Filter bar stacks */
    .om-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .om-filter-bar select,
    .om-filter-bar input,
    .om-filter-bar .button {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        height: 40px;
    }

    .om-filter-bar .om-count {
        display: none;
    }

    /* Map smaller on mobile */
    #om-admin-map {
        height: 200px !important;
    }

    .om-desktop-table {
        display: none !important;
    }

    .om-mobile-cards {
        display: block;
    }
}

/* --- detail --- */
/* -- Reset for admin page -- */
.om-wrap {
    max-width: 1200px;
    padding: 0 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--om-text, #1a1a2e);
}

/* -- Page header -- */
.om-page-header {
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--om-border, #e5e7eb);
    margin-bottom: 24px;
}

.om-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85em;
    color: var(--om-muted, #6b7280);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color .15s;
}

.om-back-link:hover {
    color: var(--om-action, #2563eb);
}

.om-page-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.om-page-title {
    margin: 0;
    font-size: 1.6em;
    font-weight: 700;
    color: var(--om-text, #111827);
    line-height: 1.2;
}

.om-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .8em;
    font-weight: 600;
    white-space: nowrap;
}

.om-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* -- Alert -- */
.om-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .9em;
    margin-bottom: 20px;
}

.om-alert-success {
    background: var(--om-success-bg, #d1fae5);
    color: var(--om-success, #065f46);
}

/* -- Layout -- */
.om-detail-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.om-top-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

.om-autosave.om-saving {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s;
}

.om-col-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.om-col-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* -- Cards -- */
.om-card {
    background: var(--om-bg, #fff);
    border: 1px solid var(--om-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.om-card-flush .om-card-body {
    padding: 0;
}

.om-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: .9em;
    color: var(--om-text, #374151);
    border-bottom: 1px solid var(--om-border, #f3f4f6);
    background: var(--om-surface, #f9fafb);
}

.om-card-body {
    padding: 20px;
}

.om-card-footer {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--om-border, #f3f4f6);
}

/* -- Definition list -- */
.om-dl {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.om-dl-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--om-border, #f3f4f6);
    align-items: start;
}

.om-dl-row:last-child {
    border-bottom: none;
}

.om-dl-row dt {
    font-size: .82em;
    font-weight: 600;
    color: var(--om-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-top: 2px;
}

.om-dl-row dd {
    margin: 0;
    font-size: .92em;
    color: var(--om-text, #111827);
}

.om-mono {
    font-family: monospace;
    font-size: .88em;
    color: var(--om-muted, #6b7280);
}

/* -- Inputs -- */
.om-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--om-border, #d1d5db);
    border-radius: 6px;
    font-size: .9em;
    color: var(--om-text, #111827);
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    background: var(--om-bg, #fff);
}

.om-input:focus {
    outline: none;
    border-color: var(--om-action, #2563eb);
    box-shadow: 0 0 0 3px var(--om-action-tint, rgba(37,99,235,.1));
}

/* Kern-Kit setzt width:auto auf alle Inputs - hier volle Spaltenbreite erzwingen */
.om-fe-admin input.om-input,
.om-fe-admin select.om-input,
.om-fe-admin textarea.om-input {
    display: block;
    width: 100%;
    max-width: 100%;
}

.om-textarea {
    resize: vertical;
    min-height: 72px;
}

.om-textarea-sm {
    font-size: .82em;
    min-height: 140px;
}

/* -- Buttons -- */
.om-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: .88em;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
    line-height: 1;
    text-decoration: none;
}

.om-btn-primary {
    background: var(--om-action, #2563eb);
    color: var(--om-on-action, #fff);
    border-color: var(--om-action, #2563eb);
}

.om-btn-primary:hover {
    background: var(--om-action-hover, #1d4ed8);
    border-color: var(--om-action-hover, #1d4ed8);
    color: var(--om-on-action, #fff);
}

.om-btn-secondary {
    background: var(--om-bg, #fff);
    color: var(--om-text, #374151);
    border-color: var(--om-border, #d1d5db);
}

.om-btn-secondary:hover {
    background: var(--om-surface, #f9fafb);
    border-color: var(--om-muted, #9ca3af);
}

.om-btn-ghost {
    background: transparent;
    color: var(--om-muted, #6b7280);
    border-color: var(--om-border, #e5e7eb);
    padding: 4px 10px;
    font-size: .8em;
}

.om-btn-ghost:hover {
    background: var(--om-surface, #f3f4f6);
    color: var(--om-text, #374151);
    border-color: var(--om-border, #d1d5db);
}

.om-btn-xs {
    padding: 3px 8px;
    font-size: .78em;
}

.om-btn-full {
    width: 100%;
    justify-content: center;
}

/* -- Map -- */
.om-map {
    height: 280px;
    display: block;
}

/* -- Status picker -- */
/* .om-status-select und .om-dialog: in admin-frontend.css (auch von der Liste genutzt) */

/* -- Photos -- */
.om-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.om-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    display: block;
}

.om-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}

.om-photo-item:hover .om-photo-img {
    transform: scale(1.05);
}

.om-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}

.om-photo-item:hover .om-photo-overlay {
    opacity: 1;
}

/* Foto-Lightbox */
.om-photo-dialog {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 95vw;
    max-height: 95vh;
    overflow: visible;
}

.om-photo-dialog::backdrop {
    background: rgba(0, 0, 0, .8);
}

.om-photo-dialog img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    cursor: zoom-out;
}

.om-photo-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--om-bg, #fff);
    color: var(--om-text, #222);
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

/* -- Timeline -- */
.om-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}

.om-timeline-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--om-border, #f3f4f6);
}

.om-timeline-item:last-child {
    border-bottom: none;
}

.om-timeline-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.om-tl-system .om-timeline-icon {
    background: transparent;
}

.om-tl-note .om-timeline-icon {
    background: transparent;
}

.om-timeline-content {
    flex: 1;
    min-width: 0;
}

.om-timeline-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.om-timeline-meta strong {
    font-size: .88em;
    color: var(--om-text, #111827);
}

.om-timeline-meta time {
    font-size: .78em;
    color: var(--om-muted, #9ca3af);
}

.om-timeline-text {
    margin: 0;
    font-size: .88em;
    color: var(--om-text, #374151);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* -- Note form -- */
.om-note-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--om-border, #f3f4f6);
    margin-bottom: 16px;
}

/* -- Helpers -- */
.om-empty-state {
    color: var(--om-muted, #9ca3af);
    font-size: .88em;
    font-style: italic;
    margin: 0 0 16px;
}

.om-readonly-hint {
    color: var(--om-muted, #9ca3af);
    font-size: .82em;
    font-style: italic;
    margin: 8px 0 0;
}

.om-status-readonly {
    padding: 4px 0;
}

/* -- Modal -- */
#om-koord-modal {
    display: none;
}

.om-modal-pin {
    font-size: 22px;
    line-height: 1;
}

/* -- Responsive -- */
@media (max-width: 900px) {
    .om-detail-container,
    .om-top-cards {
        grid-template-columns: 1fr;
    }

    .om-col-side {
        order: -1;
    }
}

@media (max-width: 600px) {
    .om-page-title {
        font-size: 1.2em;
    }

    .om-dl-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .om-dl-row dt {
        padding-top: 0;
    }

    .om-map {
        height: 220px;
    }

    #om-koord-modal>div {
        width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
    }

    #om-modal-map {
        min-height: 250px !important;
    }

    .om-input,
    .om-btn {
        font-size: 16px;
    }
}

/* status select keyed by status code (detail + list) */
.om-fe-admin .om-status-select[data-status="new"] {
    border-left-color: var(--om-status-new);
    background-color: var(--om-status-new-bg);
}

.om-fe-admin .om-status-select[data-status="in_progress"] {
    border-left-color: var(--om-status-progress);
    background-color: var(--om-status-progress-bg);
}

.om-fe-admin .om-status-select[data-status="done"] {
    border-left-color: var(--om-status-done);
    background-color: var(--om-status-done-bg);
}

/* --- error flash (vetoed change) --- */
.om-alert-error {
    background: var(--om-danger-bg, #fdecea);
    color: var(--om-danger, #b32d2e);
}
