/* Inselbuden Apps – Dashboard
   Schlichtes, freundliches Admin-Theme (Sand / Nordsee-Blau). */

:root {
    --bg:        #f4f1ea;
    --panel:     #ffffff;
    --ink:       #2b2b2b;
    --muted:     #7d7666;
    --line:      #e4ddcf;
    --navy:      #0f2744;
    --navy-2:    #1d3a57;
    --sand:      #c9a86a;
    --sand-dk:   #a9863f;
    --sidebar-bg:   #f7f4ec;   /* sehr helle Creme-Sidebar (aus Dennis-Vorlage) */
    --sidebar-line: #ebe5d8;
    --ok-bg:     #e6f4ea; --ok-ink: #2f7d46;
    --err-bg:    #fbe7e7; --err-ink: #b3261e;
    --info-bg:   #e8eef3; --info-ink: #1f3a4d;
    --radius:    12px;
    --shadow:    0 1px 3px rgba(31,58,77,.08), 0 1px 2px rgba(31,58,77,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: var(--navy-2); }
h1 { font-size: 1.5rem; margin: 0 0 .2rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
code { background: #f0ece2; padding: .05em .35em; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px; flex: 0 0 240px;
    background: var(--sidebar-bg); color: var(--navy);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    padding: 1.4rem 1rem 1.1rem;
    border-bottom: 1px solid var(--sidebar-line);
    flex: 0 0 auto;
}
.brand-logo { width: 90px; max-width: 60%; height: auto; display: block; }
.brand-sub { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: #a38f63; }
.nav { padding: .6rem; display: flex; flex-direction: column; gap: .15rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.nav-item {
    color: var(--navy); text-decoration: none; padding: .68rem .9rem; border-radius: 14px;
    font-size: .92rem;
    display: flex; align-items: center; gap: .7rem; position: relative;
}
.nav-ic { font-size: 1.2rem; line-height: 1; width: 1.4rem; text-align: center; flex: 0 0 auto; opacity: .75; }
.nav-label { flex: 1 1 auto; min-width: 0; }
.nav-item:hover { background: rgba(15,39,68,.07); }
.nav-item:hover .nav-ic { opacity: 1; }
/* Aktiv: abgerundete Karte (helleres Navy) + goldene Akzent-Pille am linken Rand + helle, fette Schrift */
.nav-item.active { background: var(--navy-2); color: #fff; font-weight: 700; box-shadow: 0 1px 5px rgba(0,0,0,.28); }
.nav-item.active .nav-ic { opacity: 1; color: var(--sand); }
.nav-item.active::before {
    content: ''; position: absolute; left: -.6rem; top: 50%; transform: translateY(-50%);
    width: 5px; height: 46%; border-radius: 5px; background: var(--sand);
}
.nav-item.disabled { color: #9a8a63; cursor: default; }
.nav-item.disabled em { font-style: normal; opacity: .7; font-size: .8em; }
.sidebar-foot { padding: .9rem 1.1rem; border-top: 1px solid var(--sidebar-line); font-size: .85rem; flex: 0 0 auto; }
.user { display: flex; flex-direction: column; margin-bottom: .5rem; }
.user-name { font-weight: 600; }
.user-role { color: var(--muted); font-size: .8rem; }
.logout { color: var(--navy); text-decoration: none; font-size: .85rem; display: flex; align-items: center; gap: .6rem; margin-top: .3rem; }
.logout:hover { text-decoration: underline; }
.main { flex: 1; padding: 1.6rem 2.4rem; max-width: none; min-width: 0; }

/* ---------- Head / buttons ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.back { font-size: .85rem; text-decoration: none; color: var(--muted); display: inline-block; margin-bottom: .2rem; }
.btn {
    display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink);
    padding: .5rem .9rem; border-radius: 8px; cursor: pointer; font-size: .9rem; text-decoration: none;
    transition: background .12s, border-color .12s;
}
.btn:hover { background: #faf7f0; }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; }
.btn-primary { background: var(--sand); border-color: var(--sand-dk); color: #2b2b2b; font-weight: 600; }
.btn-primary:hover { background: var(--sand-dk); color: #fff; }
.btn-secondary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Cards / stats ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card h2:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin-bottom: .4rem; }
.stat { text-align: center; padding: 1.1rem .6rem; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--navy); }
.stat-label { color: var(--muted); font-size: .82rem; margin-top: .2rem; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.tile { display: flex; flex-direction: column; gap: .25rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--sand); }
.tile-name { font-weight: 600; }
.tile-name em { font-style: normal; color: var(--sand-dk); font-size: .8em; }
.tile-desc { color: var(--muted); font-size: .85rem; }
.tile-disabled { opacity: .65; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.table th { background: #faf7f0; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table-objects tr:hover td { background: #faf8f2; }
.link-strong { font-weight: 600; text-decoration: none; }
.link-strong:hover { text-decoration: underline; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 20px; font-size: .76rem; font-weight: 600; }
.badge-type { background: #eef1f4; color: var(--navy); }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-off { background: #efe9dd; color: var(--muted); }
.badge-danger { background: var(--err-bg); color: var(--err-ink); }
.badge-sofa { background: #e7eef7; color: #1f3a4d; }
.badge-loft { background: #f3ecd9; color: #8a6d3b; }
.badge-mini { font-size: .68rem; margin-left: .35rem; vertical-align: middle; }
.bed-badges { margin: 0 0 .6rem; }
.bed-flags label { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; margin-right: .55rem; color: var(--ink); white-space: nowrap; }
.bed-flags input { width: auto; }
#manualBeds select { min-width: 150px; }
#manualBeds td { vertical-align: top; }
.count-badge { background: var(--sand); color: #2b2b2b; border-radius: 20px; font-size: .8rem; padding: .05rem .55rem; vertical-align: middle; }

/* ---------- Forms ---------- */
.filterbar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filterbar input[type=search] { flex: 1; min-width: 200px; }
input, select, textarea { font: inherit; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; }
.form label, .object-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .7rem; }
.form input { margin-top: .25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .9rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .2rem .9rem; }
.object-form label.block { display: block; }
.object-form label input, .object-form label textarea, .object-form label select { margin-top: .25rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin: 1rem 0 .4rem; }

/* Equipment grid */
.eq-group { color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .35rem .9rem; margin-bottom: .6rem; }
.eq-flag { display: flex !important; align-items: center; gap: .45rem; color: var(--ink) !important; margin-bottom: .25rem !important; font-size: .9rem; }
.eq-flag input { margin: 0; }
.eq-num { font-size: .82rem; }
.eq-num input { margin-top: .15rem; }

/* ---------- Alerts ---------- */
.alert { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert-error { background: var(--err-bg); color: var(--err-ink); }
.alert-info { background: var(--info-bg); color: var(--info-ink); }
.alert hr { border: none; border-top: 1px solid rgba(0,0,0,.1); margin: .5rem 0; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.rawbox { margin-top: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; }
.rawbox summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.rawbox pre { overflow: auto; max-height: 420px; font-size: .78rem; background: #2b2b2b; color: #e6e6e6; padding: 1rem; border-radius: 8px; }

/* ---------- Logo-Vorschau (Einstellungen) ---------- */
.logo-previews { display: flex; gap: 1rem; flex-wrap: wrap; margin: .6rem 0 1.2rem; }
.logo-prev { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; text-align: center; min-width: 200px; }
.logo-prev img { max-width: 160px; max-height: 80px; height: auto; display: block; margin: 0 auto .5rem; }
.logo-prev span { font-size: .76rem; color: var(--muted); }
.logo-prev-dark { background: var(--navy); }
.logo-prev-dark span { color: #9fb4c0; }
.logo-prev-light { background: #fff; }

/* ---------- Auth ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #0f2744, #1d3a57); }
.auth-card { background: #fff; padding: 2.2rem 2rem; border-radius: 16px; width: 360px; max-width: 92vw; box-shadow: 0 12px 40px rgba(0,0,0,.25); text-align: center; }
.auth-logo { width: 108px; max-width: 55%; height: auto; display: block; margin: 0 auto .6rem; }
.auth-card .brand, .brand { font-size: .9rem; letter-spacing: .16em; text-transform: uppercase; margin: .1rem 0 .4rem; color: var(--muted); font-weight: 600; }
.auth-card .form { text-align: left; margin-top: 1rem; }
.auth-card .btn-primary, .form .btn-primary { width: 100%; margin-top: .4rem; }

@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .sidebar { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .sidebar-brand { border: none; }
    .nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
    .sidebar-foot { border: none; }
    .main { padding: 1rem; }
    .grid-2, .grid-4 { grid-template-columns: 1fr 1fr; }
}

/* Reinigungsplanung – gemeinsame Reiter-Leiste (tag-zentrierte Struktur) */
.rp-subnav { display: flex; gap: 4px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 1rem; box-shadow: var(--shadow); }
.rp-subnav a { padding: .45rem 1.05rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.rp-subnav a:hover { background: #faf7f0; color: var(--navy); }
.rp-subnav a.active { background: var(--navy); color: #fff; }

/* Reinigungsplanung – Zeitraster-Board (E1b-1) */
.rp-board { display: flex; gap: .8rem; align-items: stretch; }
.rp-pool { flex: 0 0 210px; display: flex; flex-direction: column; background: #f4efe4; border: 1px dashed var(--sand); border-radius: var(--radius); padding: .6rem; max-height: 76vh; overflow-y: auto; }
.rp-pool h3 { position: sticky; top: -.6rem; background: #f4efe4; margin: -.2rem 0 .5rem; padding-top: .2rem; z-index: 1; }
/* Drop-/Listenbereich füllt die Pool-Karte, damit sie so hoch wie der Kalender ist (auch leer) */
.rp-pool > .rp-drop, .rp-pool > .rp-firmalist { flex: 1 1 auto; }
.rp-gridwrap { flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; max-height: 74vh; }
.rp-empty { flex: 1; border: 1px dashed var(--line); border-radius: var(--radius); background: #fcfaf6; padding: 2rem 1.5rem; color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.5; }
.rp-empty a { color: var(--sand-dk); font-weight: 600; }
.rp-grid { display: grid; min-width: 100%; }
.rp-gh { position: sticky; top: 0; z-index: 2; background: #faf7f0; font-weight: 700; font-size: .82rem; line-height: 1.2; color: var(--navy); padding: .45rem .4rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; white-space: normal; word-break: break-word; }
.rp-gh.off { color: var(--muted); font-weight: 600; }
.rp-gh.corner { left: 0; z-index: 3; }
.rp-time { font-size: .78rem; color: var(--muted); text-align: right; padding: .3rem .5rem 0; border-bottom: 1px dashed var(--line); border-right: 1px solid var(--line); background: #fcfaf6; white-space: nowrap; }
.rp-cell { border-bottom: 1px dashed var(--line); border-right: 1px solid var(--line); min-height: 38px; padding: 4px; }
.rp-cell.off { background: repeating-linear-gradient(45deg, #f6f4ef, #f6f4ef 6px, #efece5 6px, #efece5 12px); }
@media (max-width: 760px) { .rp-board { flex-direction: column; } .rp-pool { flex: 1 1 auto; width: 100%; } }

/* Apple-Zeitachse (Tag) – feste Stunden-Zeilen, Karten nach Dauer hoch, untere Kante ziehbar */
.rp-calwrap { flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; max-height: 76vh; }
.rp-calrow { display: flex; min-width: 100%; }
.rp-calhead { position: sticky; top: 0; z-index: 5; }
.rp-gut, .rp-nonelabel, .rp-gutbody { flex: 0 0 64px; width: 64px; min-width: 64px; max-width: 64px; box-sizing: border-box; background: #fcfaf6; border-right: 1px solid var(--line); overflow: hidden; }
.rp-gut { border-bottom: 1px solid var(--line); }
.rp-nonelabel { font-size: .7rem; line-height: 1.15; color: var(--muted); text-align: left; padding: .3rem .4rem; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }
.rp-colh { flex: 1 1 0; min-width: 165px; box-sizing: border-box; text-align: center; font-size: .82rem; font-weight: 700; line-height: 1.2; color: var(--navy); padding: .45rem .4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #faf7f0; white-space: normal; word-break: break-word; }
.rp-colh.staff { background: #edf1f7; }
.rp-colh.off { color: var(--muted); font-weight: 600; }
.rp-colh.firma { background: var(--fhead, #f1ece1); color: var(--fink, var(--sand-dk)); }
a.rp-colh.firma { text-decoration: none; cursor: pointer; }
a.rp-colh.firma:hover { filter: brightness(.96); text-decoration: underline; }
.rp-nonecell { flex: 1 1 0; min-width: 165px; box-sizing: border-box; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; min-height: 32px; background: #fcfbf8; }
.rp-nonecell.off { background: repeating-linear-gradient(45deg, #f6f4ef, #f6f4ef 6px, #efece5 6px, #efece5 12px); }
/* „ohne Zeit"-Karten kompakt halten, damit die Spur nicht ins Raster überläuft */
.rp-nonecell .rp-card, .rp-nonecell .firma-card { margin: 0 0 4px !important; padding: 3px 6px !important; }
.rp-nonecell .rp-card:last-child, .rp-nonecell .firma-card:last-child { margin-bottom: 0 !important; }
.rp-nonecell .rp-note, .rp-nonecell .rp-checks { display: none !important; }
.rp-gutbody .rp-hr { box-sizing: border-box; font-size: .72rem; color: var(--muted); text-align: right; padding: 1px .4rem 0; border-top: 1px solid var(--line); }
.rp-gutbody .rp-hr:first-child { border-top: 0; }
.rp-colbody { flex: 1 1 0; min-width: 165px; box-sizing: border-box; position: relative; border-right: 1px solid var(--line); }
.rp-colbody.off { background: repeating-linear-gradient(45deg, #f7f5f0, #f7f5f0 7px, #efece5 7px, #efece5 14px); }
.rp-slot { box-sizing: border-box; border-top: 1px solid #eee6d6; }
.rp-slot:first-child { border-top: 0; }
.rp-ev { position: absolute; box-sizing: border-box; padding: 0 3px; z-index: 1; display: flex; flex-direction: column; }
/* Karte füllt immer die ganze Kachel-Höhe (mind. die Dauer), wächst bei langem Text (kein Abschneiden);
   der Greifrand sitzt dadurch immer am Karten-Unterrand, nie im Leeren. */
.rp-ev > .rp-card, .rp-ev > .firma-card { position: relative; flex: 1 1 auto; min-height: 0; margin: 0 !important; padding: 3px 6px !important; box-sizing: border-box; overflow: visible; }
.rp-ev .rp-note, .rp-ev .rp-checks, .rp-ev .rp-addhint { display: none !important; }
.rp-ev .rp-card form { display: none; }
.rp-ev .rp-status { margin-top: 2px !important; }
.rp-nowline { position: absolute; left: 0; right: 0; border-top: 2px solid #e5484d; z-index: 4; pointer-events: none; }
.rp-nowline::before { content: ""; position: absolute; left: -1px; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; }
/* Während des Ziehens NUR die Live-Tooltip/Now-Line durchlässig lassen; Karten NICHT auf
   pointer-events:none setzen – das bricht in Chrome den Drag der absolut positionierten Karte ab.
   Drops landen über Event-Bubbling ohnehin auf der ganzen Spalte (.rp-coldrop). */
.rp-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; z-index: 3; }
.rp-resize::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 24px; height: 3px; margin-left: -12px; border-radius: 2px; background: rgba(15,39,68,.3); }
/* Live-Uhrzeit-Tooltip beim Ziehen */
#rp-dragtip { display: none; position: fixed; z-index: 200; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.rp-ev.rp-resizing { z-index: 6; }
.rp-coldrop.drop-ok { background: #fdf6e6; }
.rp-coldrop.drop-hot { background: #fae7be; box-shadow: inset 0 0 0 2px var(--sand-dk); }
/* „ohne Zeit"-Spur farblich, wenn ungeplante Aufträge da sind (Handlung nötig) */
.rp-calnone.rp-needs .rp-nonelabel { background: #fdf2dd; color: #8a5a12; font-weight: 700; }
.rp-nonecell.has-open { background: #fdf2dd; }
.rp-needbadge { display: inline-block; background: #e09a36; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 700; }

/* Reinigungsplanung – Aufgaben-Vorlagen */
.tpl-item { border-top: 1px solid var(--line); }
.tpl-item > summary { cursor: pointer; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .5rem .1rem; }
.tpl-name { font-weight: 600; }
.tpl-badge { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .08rem .65rem; }
.tpl-badge.imm { background: #eef1f4; color: var(--navy); }
.tpl-badge.iv { background: #e6f4ea; color: #2f7d46; }
.tpl-new > summary { color: var(--navy); }
.tpl-form { background: #faf7f0; border: 1px solid #eee4cf; border-radius: 10px; padding: .7rem .8rem; margin: .2rem 0 .5rem; }
.tpl-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .5rem; }
.tpl-modes { margin: .4rem 0 .7rem; }
/* Apple-Style Segmented-Control: Modus als auswählbare Kacheln */
.mode-seg { display: flex; gap: .6rem; flex-wrap: wrap; }
.mode-card { flex: 1 1 210px; min-width: 200px; border: 2px solid var(--line); border-radius: 14px; padding: .7rem .85rem; cursor: pointer; background: #fff; display: flex; flex-direction: column; gap: .2rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.mode-card:hover { border-color: var(--sand); }
.mode-card input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.mode-card.on { border-color: var(--navy); background: #f5f8fb; box-shadow: 0 3px 10px rgba(15,39,68,.13); }
.mode-title { font-weight: 700; color: var(--navy); }
.mode-desc { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.mode-card input[type=number], .mode-card select { width: auto; display: inline-block; padding: .15rem .35rem; }
/* Apple-Style Toggle-Switch */
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .9rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { width: 44px; height: 26px; border-radius: 999px; background: #cfc9bd; position: relative; transition: background .2s; flex: none; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.switch input:checked + .slider { background: #2f7d46; }
.switch input:checked + .slider::before { transform: translateX(18px); }
/* Schnell-Pool: Aufgaben-Chips + eigenes Anlegen */
.quick-bar { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.quick-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4rem .9rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--navy); cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .05s; }
.quick-chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.quick-chip:active { transform: scale(.96); }
.quick-chip .plus { font-weight: 800; color: var(--sand-dk); }
.quick-chip:hover .plus { color: var(--sand); }
.addtask { border-top: 1px solid var(--line); padding-top: .85rem; margin-top: .85rem; }
.addtask-head { font-weight: 700; color: var(--navy); margin-bottom: .65rem; }
.addtask-form { display: flex; flex-direction: column; gap: .65rem; max-width: 760px; background: #faf7f0; border: 1px solid #eee4cf; border-radius: 12px; padding: .8rem .9rem; }
.addtask-grid { display: flex; gap: .7rem; flex-wrap: wrap; }
.fld { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.fld select, .fld input, .fld textarea { font-weight: 400; color: var(--ink); }
.addtask-btn { align-self: flex-start; }
.type-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .35rem 0; }
.type-row input[type=color] { width: 40px; border: 1px solid var(--line); cursor: pointer; }
.rp-move { display: inline-flex; gap: 2px; }
.rp-move .btn { padding: 1px 8px; line-height: 1.1; }
/* Kalender-Leiste: Tag durchschalten + Takt + Sync-Ampel */
.cal-bar { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; box-shadow: var(--shadow); margin-bottom: .55rem; }
.takt-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: 0 .2rem; margin-bottom: 1rem; }
.takt-bar .muted { line-height: 1.3; }
.firma-stand { margin-left: auto; }
/* Datums-/Navigationszeile immer auf eigener Zeile, damit die Umschalter (Tag/Woche, Team/Firmen)
   beim Wechsel zwischen den Ansichten nicht springen (lange Wochen-Beschriftung). */
.cal-nav { display: inline-flex; align-items: center; gap: .35rem; flex: 1 1 100%; }
.cal-arrow { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--navy); font-size: 1.1rem; background: #fff; }
.cal-arrow:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.cal-date { font-weight: 700; color: var(--navy); min-width: 210px; text-align: center; white-space: nowrap; }
.cal-today { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: .35rem .85rem; text-decoration: none; color: var(--navy); font-weight: 600; background: #fff; }
.cal-today:hover { background: #faf7f0; }
.seg-takt { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-takt a { padding: .4rem .8rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .85rem; }
.seg-takt a.on { background: var(--navy); color: #fff; }
/* Ansicht-Umschalter Team/Firmen/Gesamt */
.seg-view { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-view a { padding: .4rem .85rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .85rem; }
.seg-view a.on { background: var(--sand-dk); color: #fff; }
/* Zeitraum-Umschalter Tag/Woche/Monat */
.seg-span { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-span a { padding: .4rem .85rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .85rem; }
.seg-span a.on { background: var(--navy); color: #fff; }
/* Wochen-/Monats-Matrix (Zeile = Wohnung, Spalte = Tag) */
.matrix-wrap { padding: 0; overflow: hidden; }
.matrix-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.matrix-scroll { overflow: auto; max-height: 76vh; }
table.matrix { border-collapse: collapse; width: 100%; min-width: max-content; font-size: .82rem; }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; }
table.matrix thead th { position: sticky; top: 0; background: #faf7f0; z-index: 2; white-space: nowrap; color: var(--navy); }
table.matrix th.col0, table.matrix td.rowhead { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; max-width: 230px; font-weight: 600; }
table.matrix thead th.col0 { z-index: 3; background: #faf7f0; }
/* heutiger Tag: Blau-Akzent (passt zum Navy); freie Tage grün, belegte gedämpft */
table.matrix td.today { background: #e3ebf7 !important; box-shadow: inset 3px 0 0 var(--navy); }
table.matrix th.today { background: #cdddf1 !important; color: var(--navy); box-shadow: inset 3px 0 0 var(--navy); }
.mx-cell { min-width: 92px; background: #dde8d6; }
.mx-wd { font-weight: 700; }
.mx-pill { border-radius: 7px; padding: 3px 6px; background: #fff; border: 1px solid #e3ddcf; border-left: 4px solid var(--fbar, var(--sand-dk)); line-height: 1.25; }
.mx-pill.mx-eigen { border-left-color: #2f7d46; }
.mx-pill.done { background: #f5faf6; }
.mx-pill .who { display: block; font-weight: 600; color: var(--navy); white-space: nowrap; }
.mxbadges { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 2px; }
.mxb { font-size: 9.5px; border-radius: 3px; padding: 0 4px; white-space: nowrap; }
.mxb.wechsel { background: var(--navy); color: #fff; }
.mxb.fertig { background: #e6f4ea; color: #2f7d46; }
.mxb.geplant { background: #e8eef6; color: #3a578a; }
.mxb.offen { background: #fbe4c2; color: #8a5a12; }
.mxb.vorbereitet { background: #e7ecf2; color: #4a5a72; }
.mxb.moved { background: #ece3f3; color: #6f428a; }
.mx-pill .mx-win { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mx-pill.st-vorbereitet { background: #f4f6f9; border-color: #d8e0ea; }
/* Belegung in der Matrix + Verschiebe-Ziele */
.mx-occ { background: repeating-linear-gradient(45deg, #f1eee8, #f1eee8 5px, #e8e3d9 5px, #e8e3d9 10px); }
.mx-drag { cursor: grab; }
.mx-drag:active { cursor: grabbing; }
.mx-cell.mx-target { outline: 2px dashed var(--sand-dk); outline-offset: -3px; background: #fdf6e6 !important; }
.mx-cell.mx-target.mx-hot { background: #fae7be !important; box-shadow: inset 0 0 0 2px var(--sand-dk); }
.mx-pill.st-offen { background: #fff8ec; border-color: #efd9b0; }
.mx-pill.st-offen .who { color: #8a5a12; }
/* Matrix-Filterleiste */
.matrix-filter { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: #fcfbf8; }
.mx-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.mx-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; font-weight: 600; color: var(--navy); cursor: pointer; }
.mx-chip:not(.on) { border-left: 4px solid var(--fbar, var(--line)); }
.mx-chip.mx-eigen:not(.on) { border-left-color: #2f7d46; }
.mx-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.mx-chip.on .muted { color: #dfe5ee !important; }
.mx-onlyopen { font-size: .85rem; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; white-space: nowrap; }
.mx-onlyopen input { width: auto; }
.mx-rowfirma { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: #f1ece1; color: var(--fink, var(--sand-dk)); vertical-align: middle; }
.mx-rowfirma.mx-eigen { background: #e6f4ea; color: #2f7d46; }
/* Eigenes Team dezent kühl, damit es sich von den Firmen abhebt */
.rp-gh.staff { background: #edf1f7; color: var(--navy); }
/* Firmen-Spalten (read-only) – je Firma eine dezente Farbe */
.f-besenflitzer { --fbar:#c79a4e; --fhead:#f2e8d0; --fink:#8a6a22; --fcell:#fdfaf2; }
.f-inselglanz   { --fbar:#5a9e7a; --fhead:#dcefe4; --fink:#2c7a52; --fcell:#f5fbf7; }
.f-hageller     { --fbar:#6a86b0; --fhead:#e1e8f4; --fink:#3a578a; --fcell:#f6f8fc; }
.f-hettling     { --fbar:#a279b3; --fhead:#eee0f3; --fink:#6f428a; --fcell:#fbf6fc; }
.rp-gh.firma { background: var(--fhead, #f1ece1); color: var(--fink, var(--sand-dk)); }
.firma-cell { border-bottom: 1px dashed var(--line); border-right: 1px solid var(--line); min-height: 38px; padding: 4px; background: var(--fcell, #fcfbf8); }
.firma-card { background: #fff; border: 1px solid #e9e2d2; border-left: 4px solid var(--sand-dk); border-radius: 8px; padding: 6px 8px; margin: 0 0 5px; }
.firma-cell .firma-card:not(.done) { border-left-color: var(--fbar, var(--sand-dk)); }
.firma-card.drag { cursor: grab; }
.firma-card.drag:active { cursor: grabbing; }
.rp-fromfirma { display: inline-block; font-size: 9.5px; font-weight: 600; background: #eef2f7; color: var(--navy); border-radius: 3px; padding: 0 4px; vertical-align: middle; }
/* Drag-and-drop: Ablage-Felder beim Ziehen sichtbar machen + Zielfeld kräftig hervorheben */
.drop-ok { outline: 2px dashed var(--sand-dk); outline-offset: -3px; background: #fdf6e6 !important; }
.drop-hot { background: #fae7be !important; box-shadow: inset 0 0 0 2px var(--sand-dk); border-radius: 4px; }
a.rp-gh.firma { text-decoration: none; cursor: pointer; }
a.rp-gh.firma:hover { filter: brightness(0.96); text-decoration: underline; }
.rp-firmalist .firma-card:not(.done) { border-left-color: var(--fbar, var(--sand-dk)); }
.firma-card.done { border-left-color: #2f7d46; background: #f5faf6; }
.firma-card .fc-top { font-size: 13px; line-height: 1.25; color: var(--navy); }
.firma-card .fc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* „gereinigt"-Toggle (manuelle Fertigmeldung) */
.rp-cleanmark { display: inline-block; margin-top: 4px; font-size: 11px; line-height: 1.4; border-radius: 10px; padding: 1px 9px; cursor: pointer; background: #eef2f6; color: #3a578a; border: 1px solid #d8e0ea; }
.rp-cleanmark:hover { background: #e3ebf3; }
.rp-cleanmark.on { background: #e6f4ea; color: #2f7d46; border-color: #bfe3c9; }
/* Karten-Streifen folgt der Firmen-/Abteilungsfarbe (aus den Einstellungen);
   Status (offen/geplant) steht im Text. „gereinigt/fertig" bleibt grün als klares Erledigt-Signal. */
.firma-card:not(.done) { border-left-color: var(--fbar, var(--sand-dk)); }
.rp-card.rs-gereinigt, .firma-card.rs-gereinigt, .mx-pill.rs-gereinigt { border-left-color: #2f7d46 !important; }
.firma-card.rs-gereinigt, .rp-card.rs-gereinigt { background: #f5faf6 !important; }
.mx-pill.rs-gereinigt { background: #eef6f0; }
.firma-card.done .fc-meta { color: #2f7d46; font-weight: 600; }
.dp-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600; border-radius: 999px; padding: .28rem .6rem; text-decoration: none; border: 1px solid var(--line); white-space: nowrap; }
.dp-pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cal-pills { display: inline-flex; gap: .4rem; flex-wrap: nowrap; align-items: center; }
.dp-pill.ok { background: #e6f4ea; color: #2f7d46; border-color: #cfe7d6; } .dp-pill.ok .dot { background: #2f7d46; }
.dp-pill.warn { background: #fdf1e3; color: #b25e00; border-color: #f0dcbf; } .dp-pill.warn .dot { background: #d4a017; }
.dp-pill.err { background: #fbe7e7; color: #b3261e; border-color: #eccac6; } .dp-pill.err .dot { background: #b3261e; }
.dp-pill.none { background: #eef0f3; color: #5b6470; } .dp-pill.none .dot { background: #9aa3ad; }
/* Hinweis/Notiz an einer Aufgaben-Karte (klickbar editierbar) */
.rp-note { font-size: 11px; line-height: 1.3; margin-top: 4px; border-radius: 6px; padding: 2px 6px; color: #3a2f17; background: #fbf4e3; border: 1px solid #efe1c4; }
/* Checkliste / Hinweise auf der Auftrags-Karte */
.rp-checks { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.rp-checks[hidden] { display: none !important; }
.rp-checktoggle { margin-top: 4px; }
.rp-chk { font-size: 11px; line-height: 1.3; color: #3a2f17; display: flex; align-items: flex-start; gap: 5px; }
.rp-chk .bx { flex: none; width: 12px; height: 12px; margin-top: 1px; border: 1.5px solid var(--sand-dk); border-radius: 3px; background: #fff; }
.rp-chk.done { color: #2f7d46; text-decoration: line-through; }
.rp-chk.done .bx { background: #2f7d46; border-color: #2f7d46; }
.rp-hint { font-size: 11px; line-height: 1.3; color: var(--muted); padding-left: 13px; position: relative; }
.rp-hint::before { content: ""; position: absolute; left: 3px; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.rp-addhint { margin-top: 4px; font-size: 10.5px; color: #bba76e; font-weight: 600; }
/* Detail-Editor (Doppelklick auf eine Karte) */
.rp-modal { display: none; position: fixed; inset: 0; background: rgba(15,39,68,.45); z-index: 90; align-items: flex-start; justify-content: center; padding: 6vh 1rem; }
.rp-modal.open { display: flex; }
.rp-modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 480px; padding: 1rem 1.1rem 1.1rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: 86vh; overflow: auto; }
.rp-modal-head { display: flex; justify-content: space-between; align-items: center; }
.rp-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.rp-modal-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.rpf-body { margin-top: .4rem; }
.rpf-row { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rpf-row:last-child { border-bottom: 0; }
.rpf-k { flex: 0 0 110px; color: var(--muted); }
.rpf-v { color: var(--navy); font-weight: 600; }
.rp-irow { display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem; }
.rp-itype { flex: none; width: 76px; border: 1px solid var(--line); background: #f3f0ea; color: var(--muted); border-radius: 8px; padding: .4rem 0; font-size: .8rem; font-weight: 600; cursor: pointer; }
.rp-itype.task { background: var(--navy); color: #fff; border-color: var(--navy); }
.rp-itext { flex: 1; min-width: 0; }
.rp-idel { flex: none; border: 0; background: none; color: #b3261e; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 .2rem; }
.btn-light { background: #f3f0ea; color: var(--navy); border: 1px solid var(--line); }

/* ===== Reinigungs-Übersicht (Arbeitsbrett offen/fertig) ===== */
.ub-sortbar { display: flex; align-items: center; gap: .5rem; }
.ub-grp { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); cursor: pointer; }
.ub-sort a { cursor: pointer; }
.ub-wrap { margin-top: .6rem; }
.ub-day { margin-bottom: 1.4rem; }
.ub-dayhead { display: flex; justify-content: space-between; align-items: baseline; padding: .2rem .1rem .35rem; }
.ub-dayhead.today .ub-dayname { color: var(--navy); }
.ub-dayname { font-weight: 700; font-size: .95rem; color: var(--navy); }
.ub-daycount { font-size: .8rem; color: var(--muted); }
.ub-daycount b { color: #2f7d46; }
.ub-prog { height: 6px; background: #eee8dc; border-radius: 6px; overflow: hidden; margin: 0 .1rem .6rem; }
.ub-progbar { height: 100%; background: #2f7d46; border-radius: 6px; transition: width .2s; }
.ub-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.ub-cols.ub-cols3 { grid-template-columns: 1fr 1fr 1fr; }
.ub-col { background: #faf8f3; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .6rem; }
.ub-colhead { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin: .1rem .15rem .5rem; display: flex; align-items: center; gap: .4rem; }
.ub-badge { font-size: .72rem; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.ub-badge.offen { background: #fde9e7; color: #c4332b; }
.ub-badge.geplant { background: #faedd6; color: #8a5a12; }
.ub-badge.fertig { background: #e7f1ea; color: #2f7d46; }
.ub-list { min-height: 28px; }
.ub-empty, .ub-none { font-size: .8rem; color: var(--muted); padding: .4rem .3rem; }
.ub-none { padding: .8rem .3rem; }

.ub-card { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 10px; padding: .42rem .55rem; margin-bottom: .4rem; cursor: pointer; transition: box-shadow .12s, transform .02s; }
.ub-card:hover { box-shadow: 0 2px 8px rgba(15,39,68,.1); }
.ub-card:active { transform: translateY(1px); }
.ub-card[data-portal="1"] { cursor: default; }
.ub-amp { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.ub-card.amp-offen { border-left-color: #e5484d; }
.ub-card.amp-offen .ub-amp { background: #e5484d; }
.ub-card.amp-geplant { border-left-color: #e0962f; }
.ub-card.amp-geplant .ub-amp { background: #e0962f; }
.ub-card.amp-fertig { border-left-color: #2f7d46; background: #f3f9f5; }
.ub-card.amp-fertig .ub-amp { background: #2f7d46; }
.ub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ub-nm { font-weight: 600; font-size: .9rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ub-sub { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ub-right { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.ub-time { font-size: .82rem; font-weight: 600; color: var(--navy); }
.ub-st { font-size: .68rem; color: var(--muted); }
.ub-portal { font-size: .64rem; background: #eef1f6; color: #4a5b78; border-radius: 4px; padding: 0 5px; margin-top: 1px; }
.ub-grphead { font-size: .72rem; font-weight: 700; color: var(--muted); padding: .45rem .15rem .2rem; border-top: 1px dashed var(--line); margin-top: .25rem; }
.ub-grphead:first-child { border-top: 0; margin-top: 0; }

/* ===== Wechsel-/Tage-Patch (Übersicht + Endreinigung) ===== */
.ub-card.cardB { position: relative; overflow: hidden; }
.ub-card.cardB .ub-main { padding-right: 86px; }
.ub-lead { flex: none; font-size: .8rem; font-weight: 700; color: var(--navy); background: #efe8d6; border: 1px solid #e2dac6; border-radius: 7px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.ub-lead.ub-lead2 { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.1; padding: 2px 7px; }
.ub-lead .ub-lday { font-size: .62rem; font-weight: 800; color: #8a6d1f; letter-spacing: .2px; white-space: nowrap; }
.ub-lead .ub-ltime { font-size: .8rem; font-weight: 700; }
.ub-corner { position: absolute; top: 0; right: 0; font-size: .62rem; font-weight: 800; letter-spacing: .3px; color: #fff; padding: 1px 8px; border-bottom-left-radius: 9px; text-transform: uppercase; white-space: nowrap; }
.ub-corner.red   { background: #a05047; }
.ub-corner.amber { background: #a8803f; }
.ub-corner.green { background: #5f7d52; }
.ub-corner.grey  { background: #928c7e; }
/* Board-Karten: DEFAULT kleiner Eck-Patch oben rechts (Pool, Listen, breite Events). */
.rp-corner { position: absolute; top: 0; right: 0; font-size: 9px; font-weight: 800; letter-spacing: .3px; color: #fff; padding: 1px 8px; border-radius: 0 0 0 9px; text-transform: uppercase; white-space: nowrap; z-index: 2; }
.rp-corner.red   { background: #a05047; }
.rp-corner.amber { background: #a8803f; }
.rp-corner.green { background: #5f7d52; }
.rp-corner.grey  { background: #928c7e; }
.rp-card.has-corner, .firma-card.has-corner { position: relative; overflow: hidden; }
.rp-card.has-corner .rp-ctitle { padding-right: 84px; }
.firma-card.has-corner .fc-top { padding-right: 84px; }
/* schmale Kalender-Events: Patch als vollbreiter Kopf-Streifen (überlagert sonst Zeit/Titel) */
.rp-card.corner-strip .rp-corner, .firma-card.corner-strip .rp-corner { left: 0; right: 0; width: auto; box-sizing: border-box; padding: 2px 8px; border-radius: 7px 7px 0 0; overflow: hidden; text-overflow: ellipsis; }
.rp-card.corner-strip .rp-ctitle { padding-right: 0; padding-top: 15px; }
.firma-card.corner-strip .fc-top { padding-right: 0; padding-top: 15px; }

/* 3-Spalten-Übersicht wird unter ~1000px zu eng → gestapelt (2 Klassen = höhere Spezifität). */
@media (max-width: 1000px) {
    .ub-cols.ub-cols3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .ub-cols { grid-template-columns: 1fr; }
    .ub-sortbar { flex-wrap: wrap; }
}

/* ===== Auslese-Fehler-Banner (Reinigungs-Connector hängt) ===== */
.rp-alerts { margin: .6rem 0 .2rem; display: flex; flex-direction: column; gap: .5rem; }
.rp-alert { display: flex; align-items: center; gap: .8rem; padding: .6rem .85rem; border-radius: 10px; font-size: .9rem; line-height: 1.35; }
.rp-alert-txt { flex: 1; min-width: 0; }
.rp-alert-err { background: #fbe7e7; color: #b3261e; border: 1px solid #f0c2c2; }
.rp-alert-warn { background: #fdf2dd; color: #8a5a12; border: 1px solid #ecd9a8; }
.rp-alert-btn { flex: none; background: #b3261e; color: #fff; border-radius: 8px; padding: .4rem .75rem; text-decoration: none; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.rp-alert-btn:hover { filter: brightness(1.08); }
.rp-alert-warn .rp-alert-btn { background: #8a5a12; }
