/* jogPilot – Mobile-First-Stylesheet. Dunkelgrün, helle Flächen, Naturtöne, große Touchflächen. */
:root {
  --green-950: #12321e;
  --green-900: #173f27;
  --green-800: #1d4f2f;
  --green-700: #2a6b3d;
  --green-600: #33804a;
  --green-200: #cfe6cb;
  --green-100: #e3f1df;
  --green-50: #f1f8ee;
  --mint: #8fdcb0;
  --bg: #f4f6f2;
  --card: #ffffff;
  --text: #17261c;
  --muted: #5b6a60;
  --border: #d8e2d5;
  --danger: #b4321f;
  --warn-bg: #fff6e0;
  --warn: #8a5a00;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(16, 40, 24, .14);
  --shadow-sm: 0 1px 3px rgba(16, 40, 24, .12);
  --topbar: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --route-0: #2563eb;
  --route-1: #e8590c;
  --route-2: #9333ea;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; font-size: 16px; line-height: 1.4;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 28px; height: 28px; }
.ic-green { color: var(--green-700); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0;
  font-weight: 650; font-size: 17px; letter-spacing: .1px; transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 2px 0 var(--green-900); }
.btn-primary:not(:disabled):hover { background: var(--green-600); }
.btn-secondary { background: var(--green-100); color: var(--green-900); }
.btn-ghost { background: transparent; color: var(--green-800); border: 1.5px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 18px; }
.btn-sm { min-height: 40px; font-size: 15px; padding: 0 14px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn--light { color: var(--green-900); }
.icon-btn:active { background: rgba(255, 255, 255, .15); }
.link-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none;
  color: var(--green-700); font-weight: 600; font-size: 14px; padding: 8px 4px; min-height: 40px;
}

/* ---------- Login ---------- */
.page-login { min-height: 100%; background: var(--green-950); overflow-x: hidden; }
.login-bg {
  position: fixed; inset: 0; background: url("../img/forest.svg") center bottom / cover no-repeat, #2d5a35;
}
.login-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 30, 16, .55) 0%, rgba(8, 30, 16, .15) 45%, rgba(8, 30, 16, .35) 100%);
}
.login {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: calc(48px + var(--safe-t)) 20px calc(24px + var(--safe-b)); color: #fff;
}
.login-brand { text-align: center; margin-top: 4vh; }
.logo-mark { width: 40px; height: 30px; color: #fff; }
.logo-mark--xl { width: 116px; height: 84px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3)); }
.wordmark { font-weight: 800; font-style: italic; letter-spacing: -.5px; }
.login-brand .wordmark { font-size: 52px; margin: 6px 0 8px; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.tagline { margin: 0; font-size: 18px; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.login-card {
  width: 100%; max-width: 380px; margin-top: 7vh; background: rgba(255, 255, 255, .96); color: var(--text);
  border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 14px;
}
.field { position: relative; display: block; }
.field input {
  width: 100%; height: 52px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff;
  padding: 0 48px 0 50px; font-size: 17px; outline: none;
}
.field input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(51, 128, 74, .18); }
.field-ic { position: absolute; left: 16px; top: 15px; color: var(--muted); }
.field-btn { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.form-error { margin: 0; color: var(--danger); font-size: 15px; font-weight: 500; }
.login-foot { margin-top: auto; padding-top: 24px; font-size: 12px; opacity: .8; }

/* ---------- App-Layout ---------- */
.page-app { overflow: hidden; position: fixed; inset: 0; overscroll-behavior: none; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: calc(var(--topbar) + var(--safe-t));
  padding: var(--safe-t) 8px 0 14px; background: var(--green-800); color: #fff;
  display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand .wordmark { font-size: 24px; }
.map { position: fixed; top: calc(var(--topbar) + var(--safe-t)); left: 0; right: 0; bottom: 0; z-index: 1; background: #e8ece4; }
.map-fab {
  position: fixed; z-index: 900; right: 12px; top: calc(var(--topbar) + var(--safe-t) + 96px);
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: #fff; color: var(--green-800);
  box-shadow: var(--shadow-sm), 0 0 0 1.5px rgba(0, 0, 0, .12); display: flex; align-items: center; justify-content: center;
}
.map-fab.is-off { color: var(--muted); }
.map-fab.is-follow { background: var(--green-700); color: #fff; }
.banner {
  position: fixed; z-index: 950; left: 12px; right: 68px; top: calc(var(--topbar) + var(--safe-t) + 10px);
  background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.banner.is-error { background: #fde8e4; color: var(--danger); }

/* Leaflet-Anpassungen */
.leaflet-container { font: inherit; }
.leaflet-top.leaflet-right { top: 0; }
.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; color: var(--green-900); }
.leaflet-touch .leaflet-bar { border: 0; box-shadow: var(--shadow-sm), 0 0 0 1.5px rgba(0, 0, 0, .12); border-radius: 12px; overflow: hidden; }
.leaflet-control-attribution { font-size: 11px; }
.user-dot { position: relative; }
.user-dot .dot {
  position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: #1a73e8; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.user-dot .pulse {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(26, 115, 232, .25); animation: pulse 2s ease-out infinite;
}
.user-dot.is-stale .dot { background: #8a8f98; }
.user-dot.is-stale .pulse { display: none; }
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .user-dot .pulse { animation: none; } }
.start-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--green-800); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.route-arrow { width: 14px; height: 14px; }
.route-arrow i {
  display: block; width: 0; height: 0; margin: 2px auto 0; border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-bottom: 8px solid #fff;
}

/* ---------- Bottom Sheet ---------- */
.sheet {
  position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - var(--topbar) - var(--safe-t) - 12px);
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 28px rgba(16, 40, 24, .22);
  display: flex; flex-direction: column; height: 50vh; overflow: hidden;
  transition: height .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.is-dragging { transition: none; }
.sheet-grip { flex: none; padding: 10px 0 6px; display: flex; justify-content: center; cursor: grab; touch-action: none; }
.sheet-grip span { width: 44px; height: 5px; border-radius: 3px; background: #b9c4b6; }
.sheet-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  padding: 4px 16px calc(16px + var(--safe-b));
}
.view { display: grid; gap: 12px; }
.sticky-action { position: sticky; bottom: calc(-16px - var(--safe-b)); z-index: 2; margin: 0 -16px calc(-16px - var(--safe-b)); padding: 10px 16px calc(14px + var(--safe-b)); background: linear-gradient(rgba(244, 246, 242, 0), var(--bg) 14px); }
.view-title { margin: 2px 0 2px; font-size: 22px; font-weight: 750; letter-spacing: -.2px; }
.view-title.underline { justify-self: start; background: linear-gradient(transparent 70%, var(--green-200) 70%); padding: 0 2px; }
.view-head { display: flex; align-items: center; gap: 6px; margin-left: -8px; }
.view-head .view-title { flex: 1; }
.swatch { width: 18px; height: 6px; border-radius: 3px; background: var(--route-0); }
.card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.card-soft { background: var(--green-50); border-color: var(--green-200); }
.card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; display: flex; gap: 6px; align-items: flex-start; }
.hint .ic { margin-top: 1px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.step-btn {
  width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--green-50);
  color: var(--green-800); display: flex; align-items: center; justify-content: center;
}
.step-btn:active { background: var(--green-100); }
.step-field { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: 12px; height: 52px; padding: 0 14px; background: #fff; }
.step-field:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(51, 128, 74, .18); }
.step-field input { width: 64px; border: 0; outline: none; font-size: 24px; font-weight: 700; text-align: center; background: transparent; -moz-appearance: textfield; }
.step-field input::-webkit-outer-spin-button, .step-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-field span { color: var(--muted); font-weight: 600; }
.step-field.is-invalid { border-color: var(--danger); }
.loc-line { margin: 8px 0 0 32px; font-weight: 600; }
.loc-sub { margin: 2px 0 0 32px; color: var(--muted); font-size: 14px; }
.loc-line.is-warn { color: var(--warn); }
.loc-line.is-error { color: var(--danger); }
.card-soft .btn { margin: 10px 0 0 32px; }
.info-box { display: flex; gap: 12px; background: var(--green-50); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: #2c3b31; }
.info-box p { margin: 0; }

.progress { height: 10px; border-radius: 6px; background: var(--green-100); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--green-600), var(--mint)); border-radius: 6px; transition: width .3s; }
.status-text { margin: 0; font-weight: 600; color: var(--green-900); }

.notice { background: var(--warn-bg); color: #5c3d00; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.notice.is-error { background: #fde8e4; color: #7a1f12; }
.notice .btn { margin-top: 10px; }
.error-detail { margin: 8px 0 0; font-size: 12px; opacity: .8; word-break: break-word; font-family: ui-monospace, Menlo, monospace; }
.route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.route-card {
  width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 12px 12px 16px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.route-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.route-card.is-selected { background: var(--green-50); border-color: var(--green-600); box-shadow: 0 0 0 2px rgba(51, 128, 74, .2); }
.route-card .rc-name { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.route-card .rc-km { font-size: 22px; font-weight: 750; letter-spacing: -.3px; }
.route-card .rc-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.route-card .rc-tags { display: flex; gap: 6px; align-items: center; font-size: 14px; color: #2c3b31; }
.route-card .rc-chev { grid-row: 1 / span 4; grid-column: 2; color: var(--muted); }
.route-card .rc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); }
.stat { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; gap: 2px; text-align: center; }
.stat + .stat { border-left: 1.5px solid var(--border); }
.stat strong { font-size: 20px; font-weight: 750; }
.stat span { font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--green-50); border: 1px solid var(--green-200); color: var(--green-900); padding: 6px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.facts { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; text-align: right; }

/* Laufmodus */
.run-stats { display: grid; grid-template-columns: 1fr 1.3fr 1fr; text-align: center; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 10px 4px; }
.run-stats span { display: block; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.run-stats strong { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.run-stats .run-main strong { font-size: 28px; color: var(--green-800); }
.run-gps { margin: 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.run-gps.is-warn { color: var(--warn); font-weight: 600; }
.run-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.run-actions .btn { min-height: 56px; }
.run-hint { font-size: 12.5px; }
.run-track { stroke-dasharray: 2 6; }

/* Dialoge */
.dialog {
  border: 0; border-radius: 20px; padding: 18px 18px calc(18px + var(--safe-b)); width: min(440px, calc(100vw - 24px));
  box-shadow: var(--shadow); color: var(--text); background: var(--bg);
}
.dialog::backdrop { background: rgba(10, 25, 15, .45); }
.dialog h2 { margin: 0 0 8px; font-size: 20px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 6px 0; }
.dialog-head h2 { margin: 0; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.settings-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; font-weight: 650; text-align: right; }
.style-pick { border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 14px 12px; margin: 0 0 14px; display: grid; gap: 4px; }
.style-pick legend { padding: 0 6px; color: var(--muted); font-size: 14px; }
.style-pick label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.style-pick input { width: 20px; height: 20px; accent-color: var(--green-700); }
.fineprint { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.toast {
  position: fixed; z-index: 1300; left: 50%; transform: translateX(-50%); top: calc(var(--topbar) + var(--safe-t) + 12px);
  background: var(--green-900); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600;
  max-width: calc(100vw - 32px);
}

/* ---------- Header-Aktionen, Herz ---------- */
.topbar-actions { display: flex; gap: 2px; }
.heart-btn svg { transition: transform .15s; }
.heart-btn[aria-pressed="true"] svg { fill: #e11d48; stroke: #e11d48; transform: scale(1.08); }
.heart-btn[aria-pressed="true"] { color: #e11d48; }
.detail-sub { margin: -8px 0 0 30px; color: var(--muted); font-size: 14px; }
.view-head .swatch { margin-left: 4px; }

/* ---------- Vollbild-Dialoge (Historie, Favoriten) ---------- */
.dialog--full {
  width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; border-radius: 0;
  padding: calc(8px + var(--safe-t)) 0 0; display: none; flex-direction: column;
}
.dialog--full[open] { display: flex; }
.dialog--full .dialog-head { margin: 0; padding: 0 8px 6px 12px; gap: 4px; border-bottom: 1.5px solid var(--border); }
.dialog--full .dialog-head h2 { flex: 1; font-size: 21px; }
.dialog-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px calc(24px + var(--safe-b)); }
.empty { color: var(--muted); text-align: center; padding: 32px 12px; margin: 0; }
.item-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item {
  width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.item-title { font-weight: 700; }
.item-sub { color: var(--muted); font-size: 14px; }
.item-km { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 750; font-size: 18px; }
.item-km small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.place-group { margin: 4px 0 14px; }
.place-group h3 { margin: 6px 2px 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--green-800); }
.swipe { position: relative; border-radius: var(--radius); overflow: hidden; }
.swipe + .swipe { margin-top: 10px; }
.swipe-bg {
  position: absolute; inset: 0; background: var(--danger); color: #fff; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 20px; gap: 8px; font-weight: 700; border-radius: var(--radius);
}
.swipe .item { position: relative; touch-action: pan-y; transition: transform .2s; }
.swipe.is-dragging .item { transition: none; }
.mini-map { height: 46vh; min-height: 240px; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--border); background: #e8ece4; }
.map-legend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 8px 2px 12px; flex-wrap: wrap; }
.lg { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.lg-plan { background: #93b4f5; }
.lg-gps { background: var(--green-900); margin-left: 10px; }
#hist-detail-pane .stats { margin-bottom: 12px; }
.weight-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.weight-field small { display: block; color: var(--muted); font-size: 12px; }
.weight-input { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.weight-input input { width: 84px; height: 44px; border: 1.5px solid var(--border); border-radius: 10px; text-align: center; font-size: 17px; background: #fff; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast[hidden] { display: none; }
.toast.in-dialog { top: auto; bottom: calc(20px + var(--safe-b)); }
.toast-action { border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; padding: 8px 12px; border-radius: 8px; min-height: 36px; }
.run-restored { background: var(--green-50); border: 1px solid var(--green-200); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; margin: 0; }

/* ---------- Profil, Passwort, Benutzerverwaltung ---------- */
.pw-change { margin: 0 0 14px; border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 14px; }
.pw-change summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.pw-form, .admin-new { display: grid; gap: 10px; margin-top: 10px; }
.pw-form input, .admin-new input:not([type=checkbox]), .link-result input, .admin-pw input {
  height: 46px; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; width: 100%;
}
.pw-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.check input { width: 20px; height: 20px; accent-color: var(--green-700); }
.admin-new { margin: 0 0 14px; }
.link-result { background: var(--green-50); border: 1.5px solid var(--green-200); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; display: grid; gap: 8px; }
.link-result p { margin: 0; }
.link-result input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.link-actions { display: flex; gap: 8px; }
.admin-user { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.admin-user.is-inactive { opacity: .6; }
.admin-user-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-user-head strong { font-size: 17px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--green-100); color: var(--green-900); }
.badge.is-off { background: #f3e1de; color: var(--danger); }
.admin-meta { color: var(--muted); font-size: 13.5px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions .btn { min-height: 38px; font-size: 14px; padding: 0 12px; }
.admin-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.admin-links li { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); }
.admin-links li.is-revoked { text-decoration: line-through; opacity: .7; }
.admin-links button { border: 0; background: none; color: var(--danger); font-weight: 600; padding: 6px; min-height: 32px; }
.admin-pw { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn-danger-text { color: var(--danger); border-color: #f0cdc7; margin-top: 12px; }

/* ---------- Desktop: Seitenleiste statt Bottom Sheet ---------- */
@media (min-width: 900px) {
  .sheet {
    left: 16px; right: auto; top: calc(var(--topbar) + 16px); bottom: 16px; width: 400px; max-height: none;
    border-radius: 20px; height: auto !important; box-shadow: var(--shadow);
  }
  .sheet-grip { display: none; }
  .sheet-body { padding-top: 16px; }
  .banner { left: 432px; right: 68px; }
  .dialog--full { width: min(620px, 94vw); height: min(860px, 92vh); margin: auto; border-radius: 20px; padding-top: 10px; }
}
