/* Personal-Bereich – Ergänzungen zu style.css */
body.admin { padding-bottom: calc(86px + var(--safe-b)); }
.admin .wrap { max-width: 980px; }
.top .who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.top .who b { color: var(--text); font-weight: 600; }

.login { min-height: 80dvh; display: grid; place-items: center; padding: 30px 0; }
.login .card { width: 100%; max-width: 400px; }
.login h1 { font-size: 46px; margin: 8px 0 18px; }

/* Navigation unten */
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(23, 23, 29, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border: 0; background: none;
  color: var(--faint); font-size: 10.5px; font-weight: 600; cursor: pointer; border-radius: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
@media (max-width: 380px) { .tabbar button { font-size: 9.5px; letter-spacing: -.02em; } }

/* Nachrichten */
.msg-text { min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.45; }
.msg-count { text-align: right; font-size: 12px; color: var(--faint); margin-top: -4px; }
.phone-preview { border-radius: 22px; padding: 18px 14px; margin-top: 6px;
  background: linear-gradient(160deg, #3a2a52, #1f2a44 55%, #3b1d33); }
.pp-notif { display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px; border-radius: 18px;
  background: rgba(245, 245, 245, .78); color: #111; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pp-notif img { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.pp-notif > div { flex: 1; min-width: 0; }
.pp-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.pp-top span { color: #666; font-size: 13px; }
.pp-text { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.targets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.target { position: relative; cursor: pointer; }
.target input { position: absolute; opacity: 0; }
.target span { display: block; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); min-height: 64px; }
.target b { display: block; font-size: 14px; }
.target small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.target input:checked + span { border-color: var(--lime); background: rgba(206, 205, 17, .1); box-shadow: 0 0 0 3px rgba(206, 205, 17, .12); }
.target input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 99px; background: rgba(206,205,17,.14);
  color: var(--lime); font-size: 13px; font-weight: 600; border: 0; cursor: pointer; }
.chip-x::after { content: '×'; font-size: 16px; line-height: 1; opacity: .8; }
.row-item.picked { border-color: var(--lime); }
.send-progress { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.send-progress .progress i { transition: width .3s ease; }
.msg-item .row-main span, .msg-item .row-main b { white-space: normal; }
.seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 42px; padding: 0 4px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-2); font-size: 13px; font-weight: 600; text-align: center; line-height: 1.15; }
.seg input:checked + span { border-color: var(--lime); background: rgba(206, 205, 17, .12); color: var(--lime); }
.seg input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
/* Nachbau der unteren Kartenhälfte (Wallet) */
.card-preview { margin-top: 10px; border-radius: 16px; background: #24242d; border: 1px solid rgba(255,255,255,.12); padding: 14px 16px 16px; max-width: 360px; }
.cp-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cp-row > div { min-width: 0; }
.cp-row .r { text-align: right; }
.cp-row small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--lime); }
.cp-row b { display: block; font-size: 16px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-msg { width: 100%; }
.cp-qr { display: grid; place-items: center; margin-top: 6px; }
.cp-qr svg { width: 86px; height: 86px; background: #fff; padding: 7px; border-radius: 8px; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.active { color: var(--lime); background: rgba(206, 205, 17, .08); }
.badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 16px; }
.page-title h1 { font-size: 42px; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.kpi .l { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font-family: 'Bebas'; font-size: 48px; line-height: 1; margin-top: 6px; }
.kpi .s { font-size: 13px; color: var(--muted); }
.kpi.hl { background: linear-gradient(135deg, rgba(206,205,17,.16), rgba(206,205,17,.04)); border-color: rgba(206,205,17,.35); }
.kpi.hl .v { color: var(--lime); }
.kpi.alert { background: linear-gradient(135deg, rgba(206,0,68,.2), rgba(206,0,68,.05)); border-color: rgba(206,0,68,.45); cursor: pointer; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 14px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; position: relative; }
.chart .col i { display: block; border-radius: 4px; min-height: 0; }
.chart .col .a { background: var(--lime); }
.chart .col .r { background: rgba(255, 90, 122, .55); }
.chart .col .p { background: var(--warn); }
.chart .col span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--faint); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 28px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; color: inherit; }
.row-item:hover { border-color: var(--line-2); }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--lime); flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pts { font-family: 'Bebas'; font-size: 28px; line-height: 1; text-align: right; }
.pts small { font-size: 16px; color: var(--muted); }
.pts.ready { color: var(--lime); }

.row-main span.tag, .tag { display: inline-block; width: auto; vertical-align: 2px; margin-left: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 8px; }
.tag.approved { background: rgba(34,197,122,.15); color: var(--ok); }
.tag.pending { background: rgba(242,168,59,.15); color: var(--warn); }
.tag.rejected { background: rgba(255,90,122,.13); color: var(--bad); }

.thumb { width: 64px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.review-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.review-card .thumb { width: 96px; height: 130px; cursor: zoom-in; }
.review-card .meta { display: grid; gap: 3px; font-size: 14px; min-width: 0; }
.review-card .meta .reason { color: var(--warn); font-weight: 600; }
.review-card .btns { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.review-card .btns .btn { min-width: 0; }
.review-card .thumb[hidden] + .meta { grid-column: 1 / -1; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.filters button { flex: none; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.filters button.active { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

.search { position: relative; margin-bottom: 14px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--faint); }
.search .input { padding-left: 46px; }

/* Scanner */
.scanner { position: relative; border-radius: 24px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 62dvh; width: 100%; margin: 0 auto; display: grid; place-items: center; }
@media (min-width: 760px) { .scanner { aspect-ratio: 4 / 3; } }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 26px; box-shadow: 0 0 0 999px rgba(0,0,0,.45); border: 3px solid var(--lime); }
.scanner .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-row { display: flex; gap: 8px; }
.code-row .input { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* Kunden-Detail */
.cust-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cust-head .avatar { width: 56px; height: 56px; font-size: 22px; border-radius: 18px; }
.cust-head h3 { margin: 0; font-family: 'Bebas'; font-weight: 400; font-size: 36px; line-height: 1; }
.cust-head .chip { margin-top: 6px; display: inline-block; }
.big-points { display: flex; align-items: baseline; gap: 8px; font-family: 'Bebas'; font-size: 74px; line-height: .9; }
.big-points small { font-size: 30px; color: var(--muted); }
.mini-stamps { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; margin: 10px 0 16px; max-width: 420px; }
.mini-stamps img { width: 100%; height: auto; }
#sheetBody { min-width: 0; }
.cust-actions .btn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
@media (max-width: 480px) { .top .who .hi { display: none; } }
.cust-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.cust-actions .wide { grid-column: 1 / -1; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 12px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.items { font-size: 14px; border-top: 1px solid var(--line); margin-top: 8px; }
.items div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.items .food { color: var(--lime); }
.receipt-img { width: 100%; border-radius: 16px; background: #000; margin-bottom: 12px; }

.settings-grid { display: grid; gap: 4px; }
.setting { display: grid; grid-template-columns: 1fr 150px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting b { display: block; font-size: 15px; }
.setting span { display: block; font-size: 13px; color: var(--muted); }
.setting .input { min-height: 46px; font-size: 16px; }
.setting.wide { grid-template-columns: 1fr; }
.switch { position: relative; width: 56px; height: 32px; justify-self: end; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--lime); border-color: var(--lime); }
.switch input:checked + i::after { transform: translateX(24px); background: var(--lime-ink); }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status-dot.no { background: var(--warn); }
.log { font: 12px/1.5 ui-monospace, Consolas, monospace; color: var(--muted); max-height: 180px; overflow: auto; background: var(--bg); border-radius: 12px; padding: 10px; white-space: pre-wrap; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }

/* Punkte beim Freigeben (1 Punkt pro Gericht) */
.pts-step { display: inline-flex; align-items: center; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; }
.pts-step button { width: 36px; height: 100%; border: 0; background: transparent; color: var(--lime); font-size: 20px; font-weight: 700; cursor: pointer; }
.pts-step input { width: 34px; height: 100%; border: 0; background: transparent; color: inherit; text-align: center; font-size: 16px; font-weight: 800; -moz-appearance: textfield; appearance: textfield; }
.pts-step input::-webkit-outer-spin-button, .pts-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pts-step small { padding: 0 10px 0 2px; font-size: 12px; color: var(--muted); }
.cust-actions .pts-step { height: 52px; grid-column: 1 / -1; justify-self: center; }
.items .qty { color: var(--muted); font-weight: 700; margin-right: 6px; }

/* Fertige Nachrichten */
.tpl-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; scrollbar-width: none; }
.tpl-row::-webkit-scrollbar { display: none; }
.tpl { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tpl:hover, .tpl.active { border-color: var(--lime); color: var(--lime); background: rgba(206, 205, 17, .1); }
.msg-count.over { color: var(--warn); font-weight: 700; }
.cp-row > div { flex: 1 1 0; }
.cp-row > div.cp-msg { flex: 1 1 100%; }

/* Punkte-Aktion */
.promo-card { display: grid; gap: 12px; }
.promo-card.on { border-color: rgba(255, 120, 60, .55); background: linear-gradient(135deg, rgba(255, 120, 60, .16), rgba(206, 205, 17, .08)); }
.promo-head { display: flex; align-items: center; gap: 12px; }
.promo-head .flame { font-size: 30px; line-height: 1; }
.promo-head b { display: block; font-size: 17px; }
.promo-head span { display: block; font-size: 13px; color: var(--muted); }
.promo-card .seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promo-card #promoFactor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.promo-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.promo-row small { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Beliebteste Gerichte */
.dish-bars { display: grid; gap: 10px; }
.dish-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 14px; }
.dish-bar b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-bar em { font-style: normal; color: var(--lime); font-weight: 800; }
.dish-bar i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 99px; background: var(--lime); opacity: .85; }

/* Export + Sicherheit */
.export-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.export-row .btn { min-width: 0; text-decoration: none; }
.sec-log { display: grid; gap: 0; font-size: 13px; }
.sec-log div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sec-log div:last-child { border-bottom: 0; }
.sec-log .ok { color: var(--ok, #3ddc84); }
.sec-log .no { color: var(--danger, #ff5a7a); }
.sec-log span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-log small { color: var(--muted); }
.export-row .btn { white-space: nowrap; }

/* ---------------------------------------------------------------------- */
/* Handy zuerst */
.tabbar { padding-left: 4px; padding-right: 4px; }
.tabbar button { font-size: 11px; padding: 8px 0 6px; min-height: 52px; }
.admin .toast { bottom: calc(92px + var(--safe-b)); }
.top .who { min-width: 0; }
.top .who > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .top .who .hi { display: none; } }
.page-title { flex-wrap: wrap; }
.page-title h1 { min-width: 0; font-size: clamp(34px, 11vw, 42px); }

/* Start: Kunde suchen + Scannen */
.quick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 14px; }
.quick .search { margin: 0; }
.quick .btn { min-height: 54px; padding: 0 16px; }
@media (max-width: 420px) { .quick .btn span { display: none; } .quick .btn { padding: 0 15px; } }
#homeResults { margin-bottom: 18px; }
.row-main { min-width: 0; flex: 1; }
.row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Punkte von Hand */
.manual { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.manual .pts-step { height: 54px; grid-column: auto; justify-self: start; }
.manual .btn { min-width: 0; padding: 0 8px; }

/* Einstellungen auf schmalen Handys */
@media (max-width: 420px) {
  .setting { grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; }
  .setting .input { padding: 0 10px; text-align: center; }
  .setting.wide .input { text-align: left; padding: 0 14px; }
  .targets { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .seg span { font-size: 12px; }
  .kpi { padding: 14px; }
}
@media (max-width: 359px) {
  .review-card { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .review-card .thumb { width: 72px; height: 100px; }
  .export-row { grid-template-columns: minmax(0, 1fr); }
  .cust-actions { grid-template-columns: minmax(0, 1fr); }
  .manual { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .manual .pts-step { grid-column: 1 / -1; justify-self: center; }
  .big-points { font-size: 60px; }
}
.guide { padding-top: 0; }
.guide .menu-chips { margin-bottom: 8px; }
@media (max-width: 359px) { .admin .top .brand .pill { display: none; } }

/* ====================================================================== */
/* App-Rahmen im Personal-Bereich */
body.admin { padding-bottom: 0; }
body.admin.authed main { padding-bottom: calc(112px + var(--safe-b)); }
.admin .appbar { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.admin .appbar .brand { justify-self: center; gap: 8px; }
.admin .appbar .who { justify-self: end; display: block; }
.admin .appbar .who[hidden] { display: block !important; visibility: hidden; }
.admin .toast { bottom: calc(100px + var(--safe-b)); }
.tabs .badge { top: 5px; margin-left: 7px; }
.drawer-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.drawer-nav .count { background: var(--red); }
.drawer:focus { outline: none; }
@media (max-width: 359px) { .admin .top .brand .pill { display: none; } }

/* Tablet: Inhalt zentriert, Leiste schwebt (wie in der Kunden-App) */
@media (min-width: 700px) {
  .admin .appbar { padding-left: max(18px, calc(50vw - 490px)); padding-right: max(18px, calc(50vw - 490px)); }
  .admin .sheet { max-width: 620px; }
  body.admin.authed main { padding-bottom: 140px; }
}
/* PC: das Menü ist eine feste Seitenleiste, die Leiste unten entfällt */
@media (min-width: 1000px) {
  body.admin.authed { padding-left: 280px; }
  body.admin.authed .drawer, body.admin.authed .drawer[hidden] { display: flex !important; transform: none; width: 280px; box-shadow: none; z-index: 25; padding-top: 18px; }
  body.admin.authed .drawer-backdrop { display: none !important; }
  body.admin.authed .tabs { display: none; }
  body.admin.authed #menuBtn { visibility: hidden; }
  body.admin.authed .drawer [data-drawer-close] { display: none; }
  body.admin.authed main { padding-bottom: 60px; }
  .admin .appbar { padding-left: 18px; padding-right: 18px; }
  body.admin.authed .toast { bottom: 28px; left: calc(50% + 140px); }
  .admin .sheet { left: 280px; }
}
.tpl { min-height: 44px; }
@media (max-width: 420px) {
  .manual { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .manual .pts-step { grid-column: 1 / -1; justify-self: center; }
  .cust-actions .btn { padding: 0 6px; font-size: 15px; }
}
.block-box { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 90, 122, .12); border: 1px solid rgba(255, 90, 122, .5); }
.block-box b { display: block; color: var(--bad); }
.block-box span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.row-main b .tag { vertical-align: 2px; margin-left: 4px; }

/* ====================================================================== */
/* Rollen: Personal sieht keine Admin-Funktionen */
.role-staff .admin-only { display: none !important; }

/* Nachrichten – kompakt in 3 Schritten */
.msg-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-items: start; }
.msg-form { padding: 16px; }
.mstep { display: flex; align-items: center; gap: 9px; margin: 18px 0 9px; }
.mstep:first-child { margin-top: 0; }
.mstep b { font-size: 15px; }
.mstep .msg-count { margin: 0 0 0 auto; }
.mnum { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--lime); color: var(--lime-ink); font-size: 13px; font-weight: 800; }
.msg-form .tpl-row { padding-bottom: 8px; margin-bottom: 2px; }
.msg-form .msg-text { min-height: 84px; }
.front-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 8px; }
.front-row[hidden] { display: none; }
.front-row .msg-count { margin: 0; }
.mhint { margin: 6px 2px 0; }
.msg-form .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.msg-form .target span { min-height: 52px; padding: 9px 12px; }
@media (min-width: 560px) { .msg-form .targets { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pick-list { max-height: 300px; overflow: auto; }
.mpreview { margin-top: 14px; border: 1px dashed var(--line-2); border-radius: 14px; }
.mpreview summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mpreview summary::-webkit-details-marker { display: none; }
.mpreview summary::before { content: "\1F441"; }
.mpreview[open] summary { color: var(--text); }
.mpreview-in { display: grid; gap: 10px; padding: 0 12px 12px; }
.mpreview-in .phone-preview { margin: 0; }
.mpreview-in .card-preview { margin: 0; max-width: none; }
@media (min-width: 600px) { .mpreview-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.msend { margin-top: 14px; }
.msend #reachText { margin: 0 2px 8px; }
.msend .send-progress { margin-top: 10px; }
.msg-side .sec-head { margin-top: 26px; }
.msg-row { display: flex; align-items: flex-start; gap: 6px; padding: 11px 6px 11px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.msg-main { flex: 1; min-width: 0; }
.msg-main p { margin: 0; font-size: 14.5px; line-height: 1.38; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.mchip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-weight: 700; }
.mchip.live { background: rgba(206, 205, 17, .14); color: var(--lime); }
.msg-del { flex: none; color: var(--faint); width: 40px; height: 40px; }
.msg-del:hover, .msg-del:active { color: var(--bad); background: rgba(255, 90, 122, .1); }
.msg-del svg { width: 20px; height: 20px; }
@media (min-width: 1240px) {
  .msg-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
  .msg-side .sec-head { margin-top: 0; }
}

/* Einstellungen – aufklappbare Gruppen */
.me-card { padding: 16px; }
.me-row { display: flex; align-items: center; gap: 12px; }
.me-row .avatar { width: 48px; height: 48px; font-size: 20px; border-radius: 15px; }
.me-row .row-main span { white-space: normal; }
.me-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.me-btns .btn:first-child { grid-column: 1 / -1; }
@media (min-width: 700px) { .me-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); } .me-btns .btn:first-child { grid-column: auto; } }
.me-btns .btn { min-width: 0; padding: 0 10px; white-space: nowrap; }
.set-groups { display: grid; gap: 10px; }
.set-groups > h2.section { margin: 26px 2px 2px; }
.sgroup { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; }
.sgroup > summary::-webkit-details-marker { display: none; }
.sgroup > summary > i { font-style: normal; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); font-size: 19px; }
.sgroup > summary > span { flex: 1; min-width: 0; }
.sgroup > summary b { display: block; font-size: 15.5px; }
.sgroup > summary small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgroup > summary::after { content: ""; width: 9px; height: 9px; flex: none; margin: -4px 4px 0 0; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .2s ease; }
.sgroup[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.sgroup[open] > summary { border-bottom: 1px solid var(--line); }
.sbody { padding: 4px 16px 16px; }
.sbody > .setting:last-child { border-bottom: 0; }
.set-groups .setting { grid-template-columns: minmax(0, 1fr) auto; padding: 13px 0; }
.set-groups .setting.wide { grid-template-columns: minmax(0, 1fr); }
.set-groups .setting span { line-height: 1.35; }
.num-step { display: inline-flex; align-items: center; height: 46px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; justify-self: end; }
.num-step button { width: 40px; height: 100%; border: 0; background: transparent; color: var(--lime); font-size: 21px; font-weight: 700; cursor: pointer; }
.num-step button:active { background: rgba(206, 205, 17, .12); }
.set-groups .num-step .input { width: 52px; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: center; font-size: 17px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.num-step .input::-webkit-outer-spin-button, .num-step .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.save-bar { position: sticky; bottom: calc(76px + var(--safe-b)); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 18px;
  background: rgba(46, 46, 22, .96); border: 1px solid rgba(206, 205, 17, .5); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.save-bar[hidden] { display: none; }
.save-bar span { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.save-bar .btn { flex: none; }
@media (min-width: 1000px) { .save-bar { bottom: 14px; } }
@media (max-width: 440px) { .save-bar { padding-left: 10px; } .save-bar span { display: none; } .save-bar .btn { flex: 1; } }
.wlan-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.links-foot { margin: 18px 4px 0; }
.ulist .row-item.off { opacity: .55; }
.ulist .chev { width: 20px; height: 20px; color: var(--faint); flex: none; }
.rights { display: grid; gap: 6px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); line-height: 1.4; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.seg.seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pw-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pw-row .input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; }
@media (max-width: 420px) {
  .set-groups .num-step .input { width: 44px; }
}
@media (min-width: 1000px) { .msg-form .tpl-row { flex-wrap: wrap; overflow: visible; } }

/* Verlauf: Einträge entfernen */
.hdel { flex: none; width: 40px; height: 40px; margin: -4px -8px -4px -4px; border: 0; border-radius: 10px; background: transparent; color: var(--faint); font-size: 22px; line-height: 1; cursor: pointer; }
.hdel:hover, .hdel:active { color: var(--bad); background: rgba(255, 90, 122, .12); }

/* Halbe Punkte */
.pts-step input { width: 42px; }
.half-tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(206, 205, 17, .16); color: var(--lime); font-size: 12px; font-weight: 800; }

/* Kamera wechseln */
.cam-switch { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 99px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(0, 0, 0, .62); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; }
.cam-switch[hidden] { display: none; }
.cam-switch svg { width: 20px; height: 20px; }
