/* zwrm Voliere – Stil angelehnt an zwrm.eu */
@font-face { font-family: Geist; src: url(fonts/Geist-Variable.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(fonts/GeistMono-Variable.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f4f4f2; --bg2: #ebebe7; --card: #fff; --ink: #1a1a1a; --ink2: #3d3d3a; --muted: #6f6c66; --faint: #9b9892;
  --line: #e3e2dd; --line2: #d3d1cb; --accent: #2563eb; --eyebrow: #a8552b;
  --good: #15803d; --good-bg: #e8f5ec; --warn: #a16207; --warn-bg: #fdf6dd; --bad: #c0262d; --bad-bg: #fde9e9; --info-bg: #eef2fd;
  --r: 18px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.08);
  --mono: 'Geist Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.5 Geist, system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.08; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- Kopfzeile ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(244,244,242,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 12px 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.zwrm-logo { height: 22px; width: auto; color: var(--ink); }
.brand .tag { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: #fff; }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a { text-decoration: none; padding: 7px 14px; border-radius: 999px; color: var(--ink2); font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.nav a:hover { background: var(--bg2); }
.nav a.on { background: var(--ink); color: #fff; }
.nav a .bird { margin: -4px -2px -4px -6px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.searchbtn { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line2); background: #fff; border-radius: 999px; padding: 6px 8px 6px 14px; color: var(--muted); cursor: pointer; font-size: 14px; min-width: 210px; }
.searchbtn kbd { margin-left: auto; font: 11px var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--bg); }
.me { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #e7dccf; color: #6b4a2b; display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.me a { color: var(--muted); font-size: 13px; text-decoration: none; }
.me a:hover { color: var(--ink); }

main { max-width: 1280px; margin: 0 auto; padding: 36px 28px 80px; }

/* ---------- Bausteine ---------- */
.eyebrow { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--eyebrow); }
.hero h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 600; }
.hero h1 span { display: block; color: #7a7670; }
.hero p { color: var(--muted); max-width: 640px; margin: 14px 0 0; font-size: 16px; }
.pagehead { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.pagehead .hero { flex: 1; min-width: 300px; }
.pagehead .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.icon-tile { width: 64px; height: 64px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; margin-bottom: 18px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #333; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 24px; }
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.card-head .right { margin-left: auto; }
.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 380px; }
section + section { margin-top: 22px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line2); color: var(--ink2); background: #fff; white-space: nowrap; }
.pill.working { color: #1d4ed8; border-color: #bfd0fb; background: var(--info-bg); }
.pill.idle { color: var(--muted); }
.pill.stopped { color: var(--faint); border-style: dashed; }
.pill.error { color: var(--bad); border-color: #f3b8b8; background: var(--bad-bg); }
.pill.pro { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.enterprise { background: linear-gradient(90deg, #b45309, #d97706); color: #fff; border-color: transparent; }
.pill.trial { color: var(--warn); border-color: #ecd68d; background: var(--warn-bg); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill.working .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.chip.on::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.chip.off { color: var(--faint); border-style: dashed; }
button.chip { cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.stat { padding: 18px 20px; }
.stat .k { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 34px; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 13px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.missing { color: var(--bad); font-size: 13px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 500; }
.list .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .when { font: 12px var(--mono); color: var(--faint); white-space: nowrap; }
.clickable { cursor: pointer; }
.list > li.clickable:hover { background: linear-gradient(90deg, transparent, var(--bg) 8%, var(--bg) 92%, transparent); }

.sev { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.sev.critical { background: var(--bad-bg); color: var(--bad); }
.sev.warning { background: var(--warn-bg); color: var(--warn); }
.sev.info { background: var(--bg); color: var(--muted); }
.sev.good { background: var(--good-bg); color: var(--good); }

/* ---------- Monogramm / Logo ---------- */
.logo-tile { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-tile img { max-width: 80%; max-height: 70%; }
.logo-tile.mono-tile { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.02em; border: 0; }
.logo-tile.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 22px; }

/* ---------- Vogel ---------- */
.bird { display: block; flex: none; overflow: visible; }
.bird .eye { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
.bird:nth-of-type(3n) .eye { animation-delay: 1.7s; }
@keyframes blink { 0%, 96%, 100% { transform: scaleY(1); } 98% { transform: scaleY(.1); } }
.bird-tile { border-radius: 14px; display: grid; place-items: center; flex: none; }

/* ---------- Die Stromleitung ---------- */
.wire-scroll { margin: 6px -28px 26px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.wire-scroll::-webkit-scrollbar { display: none; }
.wire-wrap { position: relative; height: 210px; min-width: 960px; }
.wire-wrap svg.wire { position: absolute; inset: 0; width: 100%; height: 100%; }
.perch { position: absolute; transform: translate(-50%, -100%); cursor: pointer; text-align: center; transition: transform .25s; }
.perch .bird { margin: 0 auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.08)); }
.perch.working .bird { animation: bob 1.4s ease-in-out infinite; }
.perch:nth-child(2n).working .bird { animation-duration: 1.9s; }
.perch .zz { position: absolute; right: -4px; top: -6px; font: 600 11px var(--mono); color: var(--faint); animation: zz 3s infinite; }
.perch .bang { position: absolute; right: -6px; top: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--bad); color: #fff; font: 700 11px/18px Geist; }
.perch .nm { font-size: 12px; font-weight: 600; margin-top: 2px; position: absolute; left: 50%; transform: translateX(-50%); top: 100%; padding-top: 8px; white-space: nowrap; }
.perch .rl { font-size: 11px; color: var(--muted); font-weight: 400; display: block; }
.perch:hover { transform: translate(-50%, -100%) scale(1.12); z-index: 3; }
.perch.hop .bird { animation: hop .5s ease-out; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-3deg); } }
@keyframes hop { 40% { transform: translateY(-16px) rotate(-8deg); } }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -10px); } }
.pole-label { position: absolute; transform: translateX(-50%); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); white-space: nowrap; }
.bubble { position: absolute; transform: translateY(-100%); --ax: 50%; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; padding: 8px 14px; font-size: 13px; font-weight: 500; max-width: 300px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.25); transition: left .5s, top .5s, opacity .3s; z-index: 5; pointer-events: none; }
.bubble::after { content: ''; position: absolute; left: var(--ax); bottom: -8px; width: 12px; height: 12px; background: #fff; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.bubble b { font-weight: 600; }

/* ---------- Kunden-Nester ---------- */
.nest { cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 14px; position: relative; }
.nest:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 16px 32px -16px rgba(0,0,0,.18); }
.nest-top { display: flex; gap: 14px; align-items: center; }
.nest h3 { font-size: 20px; }
.flock { display: flex; align-items: flex-end; gap: 0; min-height: 46px; padding: 0 4px; border-bottom: 2px solid #c9b79c; border-radius: 0 0 40% 40% / 0 0 14px 14px; }
.flock .bird { margin-right: -6px; }
.nest-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 13px; }
.nest-meta b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.nest-meta span { color: var(--muted); }
.nest .flag { position: absolute; top: 18px; right: 18px; }
.nest.add { border: 2px dashed var(--line2); background: transparent; box-shadow: none; align-items: center; justify-content: center; text-align: center; min-height: 260px; color: var(--muted); }
.nest.add:hover { border-color: var(--ink); color: var(--ink); }
.nest.add .bird { margin: 0 auto; }

.meter { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.meter.low i { background: var(--bad); }

/* ---------- Agenten-Karten ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--ink); color: #fff; }
.filters input { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14px; min-width: 220px; margin-left: auto; }
.agent-card { cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: transform .15s; }
.agent-card:hover { transform: translateY(-2px); }
.agent-card:hover .bird { animation: hop .5s; }
.agent-head { display: flex; gap: 14px; align-items: center; }
.agent-head h3 { font-size: 19px; margin: 0; }
.agent-head .r { font-size: 13px; color: var(--muted); }
.agent-card .about { font-size: 14px; color: var(--ink2); margin: 0; min-height: 42px; }
.agent-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.agent-foot .spark { margin-left: auto; }

/* ---------- Detailseiten ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.detail-head { display: flex; gap: 20px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.detail-head h1 { font-size: 42px; font-weight: 600; }
.detail-head .sub { color: var(--muted); margin-top: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.detail-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.note { border-left: 2px solid var(--line2); padding: 2px 0 2px 14px; margin: 0 0 14px; }
.note .m { font: 12px var(--mono); color: var(--faint); }
.note p { margin: 2px 0 0; font-size: 14px; }
.addnote { display: flex; gap: 8px; margin-bottom: 18px; }
.addnote input { flex: 1; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; }
.runlog { font-size: 14px; }
.runlog li .ok { color: var(--good); }
.runlog li .ask { color: var(--warn); }
.runlog li .err { color: var(--bad); }

/* ---------- Diagramme ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .axis-t { font: 11px var(--mono); fill: var(--faint); }
.chart .bar { fill: var(--ink); }
.chart .bar.today { fill: #2563eb; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart g:hover .bar { opacity: .75; }
.chart .lbl { font: 500 12px Geist; fill: var(--ink2); }
.chart .val { font: 500 12px var(--mono); fill: var(--ink2); }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.tip b { font-family: var(--mono); font-weight: 500; }
.legend-note { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; gap: 14px; }
.legend-note i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Dashboard (dunkel, wie das zwrm-Dashboard) ---------- */
.dash { background: #0d0d0d; color: #e8e8e6; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); --dl: #232323; --dm: #8a8a86; }
.dash-top { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--dl); }
.dash-top .zwrm-logo { color: #f5f0eb; height: 20px; --logo-eye: #0d0d0d; }
.org-switch { display: flex; align-items: center; gap: 8px; border: 1px solid #333; border-radius: 8px; padding: 5px 10px; background: #161616; color: #e8e8e6; cursor: pointer; font-size: 13px; position: relative; }
.org-switch select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.org-switch .sq { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.dash-top .ask { margin-left: auto; background: #fff; color: var(--ink); font-size: 12px; border-radius: 10px; padding: 6px 12px; max-width: 360px; line-height: 1.35; }
.dash-top .ask small { display: block; font: 10px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.dash-body { display: grid; grid-template-columns: 190px 1fr; min-height: 560px; }
.dash-nav { border-right: 1px solid var(--dl); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.dash-nav button { text-align: left; background: transparent; border: 0; color: var(--dm); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.dash-nav button:hover { color: #fff; }
.dash-nav button.on { background: #1d1d1d; color: #fff; }
.dash-nav .sep { border-top: 1px solid var(--dl); margin: 10px 4px; }
.dash-main { display: grid; grid-template-columns: 1fr 1fr; align-content: start; }
.dash-main.single { grid-template-columns: 1fr; }
.dpanel { padding: 18px 20px; border-bottom: 1px solid var(--dl); border-right: 1px solid var(--dl); min-width: 0; }
.dpanel.wide { grid-column: 1 / -1; border-right: 0; }
.dpanel h4 { margin: 0; font-size: 15px; font-weight: 500; color: #fff; }
.dpanel .dsub { font-size: 12px; color: var(--dm); margin: 2px 0 12px; }
.dpanel .dhead { display: flex; align-items: flex-start; gap: 10px; }
.dpanel .dhead .btn { margin-left: auto; background: transparent; color: #e8e8e6; border-color: #3a3a3a; }
.dlist { list-style: none; margin: 0; padding: 0; }
.dlist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #1c1c1c; font-size: 14px; }
.dlist li:first-child { border-top: 0; }
.dlist .n { color: #fff; }
.dlist .m { color: var(--dm); }
.dlist .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlist .cron { font: 11px var(--mono); color: #bdbdb8; min-width: 92px; text-transform: uppercase; }
.dlist .who { font: 11px var(--mono); color: var(--dm); }
.dpill { font: 500 10px var(--mono); letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; border: 1px solid #3a3a3a; color: var(--dm); text-transform: uppercase; }
.dpill.working { color: #7aa2ff; border-color: #2c4aa0; background: #111a33; }
.dpill.error { color: #ff8a8a; border-color: #7a2626; background: #2a1111; }
.dpill.stopped { border-style: dashed; color: #5f5f5b; }
.dint { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dint div { background: #161616; border: 1px solid #222; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #fff; }
.dint small { display: flex; align-items: center; gap: 6px; font: 500 10px var(--mono); letter-spacing: .06em; color: #4ade80; margin-top: 4px; text-transform: uppercase; }
.dint small::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 1px; }
.dint div.off small { color: var(--dm); }
.dint div.off small::before { display: none; }
.dash-cmd { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 10px 10px 10px 16px; margin-top: 16px; box-shadow: var(--shadow); }
.dash-cmd input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; min-width: 0; }
.dash-cmd select { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: var(--bg); font-size: 13px; }
.cmd-hint { font-size: 13px; color: var(--muted); margin: 8px 6px 0; }
.new-flag { font: 500 10px var(--mono); color: #fbbf24; margin-left: 6px; }

/* Eingebundene Tools */
.embed { display: block; width: 100%; height: 760px; border: 0; border-top: 1px solid var(--line); margin-top: 14px; background: var(--bg); }
.embed-note { font-size: 12px; color: var(--muted); padding: 10px 24px 14px; border-top: 1px solid var(--line); }
.dash-ext { color: var(--dm); text-decoration: none; font-size: 13px; padding: 8px 12px; border-radius: 8px; }
.dash-ext:hover { color: #fff; background: #1d1d1d; }

/* ---------- Fenster ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20,20,18,.35); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 22px; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); animation: rise .2s; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 24px 6px; }
.modal-h h2 { font-size: 24px; font-weight: 600; }
.modal-h .x { margin-left: auto; border: 0; background: var(--bg); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.modal-b { padding: 14px 24px 8px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 24px 22px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form input, .form select, .form textarea { border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px; font-size: 14px; color: var(--ink); background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #93b4f8; border-color: #2563eb; }
.form h4 { grid-column: 1 / -1; margin: 10px 0 -4px; font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--eyebrow); font-weight: 500; }

/* Brutkasten */
.hatch { display: grid; grid-template-columns: 1fr 230px; gap: 22px; }
.species { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.species button { border: 2px solid transparent; background: var(--bg); border-radius: 14px; padding: 8px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); }
.species button:hover { background: var(--bg2); }
.species button.on { border-color: var(--ink); background: #fff; color: var(--ink); }
.incubator { background: radial-gradient(circle at 50% 70%, #fff6e5, #f4ecdc 60%, #ece2cf); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 18px; position: relative; min-height: 280px; overflow: hidden; }
.incubator .nestbowl { width: 170px; height: 34px; background: #c9a77a; border-radius: 0 0 90px 90px; position: relative; z-index: 2; box-shadow: inset 0 6px 0 #b08a5a; }
.incubator .stage { position: relative; height: 170px; width: 170px; display: grid; place-items: end center; margin-bottom: -14px; z-index: 1; }
.egg { width: 96px; height: 120px; background: #fbf7ef; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; box-shadow: inset -10px -8px 0 rgba(0,0,0,.05); position: relative; animation: wobble 2.4s ease-in-out infinite; transform-origin: bottom center; }
.egg::after { content: ''; position: absolute; left: 30%; top: 30%; width: 10px; height: 10px; border-radius: 50%; background: #e8dcc8; box-shadow: 30px 14px 0 -2px #e8dcc8, 8px 40px 0 1px #e8dcc8; }
@keyframes wobble { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-6deg); } 82% { transform: rotate(5deg); } 88% { transform: rotate(-3deg); } }
.incubator.cracking .egg { animation: shake .12s 6; }
@keyframes shake { 50% { transform: translateX(3px) rotate(4deg); } }
.incubator.hatched .egg { display: none; }
.incubator .chick { position: absolute; bottom: 4px; left: 50%; transform: translate(-50%, 40px) scale(.4); opacity: 0; transition: transform .5s cubic-bezier(.3,1.6,.5,1), opacity .2s; }
.incubator.hatched .chick { transform: translate(-50%, 0) scale(1); opacity: 1; }
.incubator .shell { position: absolute; bottom: 0; width: 60px; height: 40px; background: #fbf7ef; opacity: 0; transition: .5s; clip-path: polygon(0 30%, 18% 0, 34% 28%, 52% 0, 70% 30%, 86% 4%, 100% 30%, 100% 100%, 0 100%); }
.incubator .shell.l { left: 10px; transform: rotate(-24deg); }
.incubator .shell.r { right: 10px; transform: rotate(20deg) scaleX(-1); }
.incubator.hatched .shell { opacity: 1; }
.incubator .who { text-align: center; z-index: 3; margin-top: 12px; }
.incubator .who b { display: block; font-size: 18px; }
.incubator .who span { font-size: 12px; color: var(--muted); }

/* Suche */
.search-box { width: min(620px, 100%); align-self: start; margin-top: 10vh; }
.search-box input { width: 100%; border: 0; outline: 0; font-size: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); border-radius: 22px 22px 0 0; }
.search-box .list li { padding: 10px 22px; }
.search-box .list li.sel { background: var(--bg); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; z-index: 200; display: flex; align-items: center; gap: 10px; animation: rise .2s; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .bird { margin: 0 auto 8px; }
.foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 50px; display: flex; justify-content: center; gap: 8px; align-items: center; }
.foot button { border: 0; background: none; color: var(--faint); text-decoration: underline; cursor: pointer; font-size: 12px; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: min(420px, 100%); text-align: center; }
.login .wire-mini { height: 90px; position: relative; margin-bottom: 8px; }
.login form { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 28px; text-align: left; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.login label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.login input { border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.login .err { color: var(--bad); font-size: 14px; }

@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side { grid-template-columns: minmax(0, 1fr); }
  .dash-main { grid-template-columns: minmax(0, 1fr); }
  .dint { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .searchbtn { min-width: 0; }
  .searchbtn span { display: none; }
}
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  main { padding: 24px 16px 60px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .dash-body { grid-template-columns: minmax(0, 1fr); }
  .dash-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--dl); }
  .dash-top .ask { display: none; }
  .hatch { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .me .name { display: none; }
  .wire-scroll { margin-left: -16px; margin-right: -16px; }
  .nav { scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .detail-head h1 { font-size: 32px; }
  .detail-head .actions { margin-left: 0; }
  .btn { white-space: normal; }
  .dash-top { flex-wrap: wrap; }
}
