/* ---------- Design-Tokens ---------- */
:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #f0f0ed;
  --border: #e3e3de;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --accent: #4f6bed;
  --accent-soft: #eef1fe;
  --danger: #d14343;
  --danger-soft: #fdecec;
  --warn: #b7791f;
  --warn-soft: #fdf4e3;
  --ok: #2f855a;
  --ok-soft: #e7f6ee;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --sidebar: 232px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --surface: #1d1d1b; --surface-2: #262624; --border: #33332f;
    --text: #ececea; --muted: #9b9b95; --accent: #7b91ff; --accent-soft: #232a4a;
    --danger: #f07070; --danger-soft: #3a2020; --warn: #e2b04a; --warn-soft: #3a2f18;
    --ok: #5cc28c; --ok-soft: #1a3326; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413; --surface: #1d1d1b; --surface-2: #262624; --border: #33332f;
  --text: #ececea; --muted: #9b9b95; --accent: #7b91ff; --accent-soft: #232a4a;
  --danger: #f07070; --danger-soft: #3a2020; --warn: #e2b04a; --warn-soft: #3a2f18;
  --ok: #5cc28c; --ok-soft: #1a3326; --shadow: none; color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.brand { font-weight: 700; font-size: 1.05rem; padding: 4px 10px 18px; display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: .8rem; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav .count { margin-left: auto; font-size: .75rem; background: var(--danger); color: #fff; border-radius: 99px; padding: 0 7px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { flex: 1; min-width: 0; font-size: .85rem; }
.sidebar-foot .who a { color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 28px 36px 60px; max-width: 1280px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }

.mobile-bar { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { padding: 16px 16px 90px; }
  .mobile-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border);
    justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-bar a { display: flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--muted); padding: 4px 8px; gap: 2px; }
  .mobile-bar a.active { color: var(--accent); }
  h1 { font-size: 1.35rem; }
}

/* ---------- Karten & Raster ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-dash { grid-template-columns: repeat(12, 1fr); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1100px) { .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; } }
@media (max-width: 860px) { .grid-dash > * { grid-column: span 12 !important; } }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .82rem; }
.stat.alert .n { color: var(--danger); }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 500; overflow-wrap: anywhere; }
.list .meta { color: var(--muted); font-size: .82rem; display: flex; gap: 10px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 14px 0; text-align: center; font-size: .9rem; }

.task.done .title { text-decoration: line-through; color: var(--muted); }
.check {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border); background: transparent;
  cursor: pointer; flex: none; display: grid; place-items: center; padding: 0; color: #fff;
}
.check:hover { border-color: var(--accent); }
.task.done .check { background: var(--ok); border-color: var(--ok); }
.overdue { color: var(--danger) !important; font-weight: 600; }
.due-today { color: var(--warn) !important; font-weight: 600; }

/* ---------- Badges & Avatare ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.anfrage { background: var(--surface-2); }
.badge.geplant { background: var(--accent-soft); color: var(--accent); }
.badge.in_arbeit { background: var(--warn-soft); color: var(--warn); }
.badge.abnahme { background: #f3e8ff; color: #7e3ae0; }
.badge.abgeschlossen { background: var(--ok-soft); color: var(--ok); }
.badge.hoch { background: var(--danger-soft); color: var(--danger); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.abnahme { background: #2e2345; color: #c39bff; } }
.avatar { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Formulare & Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.icon-only { padding: 6px; }
form.inline { display: inline; margin: 0; }

label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=color] { width: 42px; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); }
textarea { min-height: 90px; resize: vertical; }
textarea.editor { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); font-size: .9rem; }

.quick-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.quick-add .more { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a.active { color: var(--text); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .92rem; }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.flash.ok { background: var(--ok-soft); color: var(--ok); }

details.disclosure > summary { cursor: pointer; list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }

/* ---------- Jobs ---------- */
.job-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.job-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.job-card:hover { border-color: var(--accent); text-decoration: none; }
.job-card .client { color: var(--muted); font-size: .85rem; }
.job-card .foot { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: .82rem; color: var(--muted); }
.progress { height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); }
.note { padding: 12px 0; border-top: 1px solid var(--border); }
.note:first-child { border-top: 0; }
.note-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 4px; }
.prose { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; } .prose > :last-child { margin-bottom: 0; }
.prose h1 { font-size: 1.4rem; margin: 1.2em 0 .5em; } .prose h2 { font-size: 1.15rem; margin: 1.2em 0 .5em; } .prose h3 { margin: 1em 0 .4em; }
.prose code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.prose pre { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.prose blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--border); color: var(--muted); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: .92rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Kalender ---------- */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: .75rem; color: var(--muted); font-weight: 600; padding: 6px; text-align: left; }
.cal td { border: 1px solid var(--border); vertical-align: top; height: 104px; padding: 4px; }
.cal td.other { background: var(--surface-2); }
.cal td.other .daynum { opacity: .45; }
.cal .daynum { font-size: .8rem; font-weight: 600; margin-bottom: 2px; display: inline-block; min-width: 22px; text-align: center; border-radius: 99px; }
.cal td.today .daynum { background: var(--accent); color: #fff; }
.cal .ev { display: block; font-size: .72rem; padding: 1px 5px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); border-left: 3px solid; background: var(--surface-2); }
.cal .ev:hover { text-decoration: none; filter: brightness(.97); }
.cal .more-ev { font-size: .7rem; color: var(--muted); }
@media (max-width: 860px) { .cal-wrap { display: none; } }
.agenda-day { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 4px; }
.agenda-day:first-child { margin-top: 0; }
.ev-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; }
.ev-row .time { width: 46px; flex: none; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-row .bar { width: 3px; align-self: stretch; border-radius: 2px; flex: none; }

/* ---------- Login ---------- */
.login-wrap { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 380px; }

/* Hintergrund: schwebende Farbflächen + Filmkorn, folgt leicht der Maus */
.login-bg { --mx: 0; --my: 0; position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.login-bg .orb {
  position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(70px); opacity: .55;
  translate: calc(var(--mx) * var(--d)) calc(var(--my) * var(--d)); transition: translate .6s ease-out;
}
.login-bg .o1 { --d: -60px; background: var(--accent); top: -25vmax; left: -15vmax; animation: orb1 22s ease-in-out infinite alternate; }
.login-bg .o2 { --d: 40px; background: #c86dd7; bottom: -30vmax; right: -20vmax; opacity: .35; animation: orb2 26s ease-in-out infinite alternate; }
.login-bg .o3 { --d: 90px; background: #3ec6c1; width: 30vmax; height: 30vmax; top: 55%; left: 10%; opacity: .25; animation: orb3 18s ease-in-out infinite alternate; }
.login-bg .grain {
  position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay; animation: grain 1s steps(4) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes orb1 { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes orb2 { to { transform: translate(-16vw, -10vh) scale(.9); } }
@keyframes orb3 { to { transform: translate(30vw, -25vh) scale(1.3); } }
@keyframes grain { 0% { transform: translate(0,0); } 25% { transform: translate(-5%,3%); } 50% { transform: translate(4%,-6%); } 75% { transform: translate(-3%,-2%); } }

/* Logo: öffnet sich wie eine Blende, danach Lichtreflex */
.login-logo { display: flex; justify-content: center; margin: 0 0 16px; }
.logo {
  --fly: none; position: relative; display: block; overflow: hidden; width: 140px; aspect-ratio: 400 / 568; background: var(--text);
  -webkit-mask: url("logo.png") center / contain no-repeat; mask: url("logo.png") center / contain no-repeat;
  animation: iris 1.1s cubic-bezier(.7,0,.2,1) .15s both;
}
.logo .shine {
  position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, var(--accent) 48%, #fff 50%, var(--accent) 52%, transparent 65%);
  background-size: 300% 100%; animation: shine 1.4s ease-in-out 1.1s both, shine 1.4s ease-in-out 7s infinite;
}
@keyframes iris {
  0% { clip-path: circle(0% at 50% 31%); transform: scale(.7); filter: blur(6px); }
  60% { filter: blur(0); }
  100% { clip-path: circle(120% at 50% 31%); transform: none; filter: blur(0); }
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Begrüßung nach erfolgreicher Anmeldung (Tageszeit + Vorname), Buchstaben tauchen einzeln auf */
.login { position: relative; }
.login-greet { position: absolute; left: 0; right: 0; display: none; flex-direction: column; align-items: center; text-align: center; pointer-events: none; }
.login-hello .login-greet { display: flex; }
.login-hello .login-sub, .login-hello .login-card { animation: drop .35s ease-in both !important; }
.greet-time { font-size: 1.15rem; color: var(--muted); letter-spacing: .02em; }
.greet-name { font-size: clamp(2.4rem, 11vw, 3.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.login-greet span span { display: inline-block; animation: letter .6s cubic-bezier(.2,.8,.2,1) both; }
.greet-name span { background: linear-gradient(120deg, var(--text) 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-go .login-greet { animation: past .5s cubic-bezier(.6,0,.9,.4) both; }
@keyframes letter { from { opacity: 0; transform: translateY(.5em) rotate(6deg); filter: blur(6px); } }
@keyframes past { to { opacity: 0; transform: scale(1.6); filter: blur(8px); } }

/* Anmeldung geklappt: Karte fällt weg, Kamera fliegt ins Logo, Bild blendet über ins Dashboard */
.login-fade { position: fixed; inset: 0; z-index: 5; background: var(--bg); opacity: 0; pointer-events: none; }
.login-go .login-sub, .login-go .login-card { animation: drop .35s ease-in both !important; }
.login-go .logo { animation: fly 1.15s cubic-bezier(.65,0,.85,.25) .2s both !important; }
.login-go .logo .shine { animation: none; }
.login-go .login-bg .orb { transition: scale 1.2s ease-in; scale: 1.6; }
.login-go .login-fade { animation: fadein .35s ease-in .95s both; }
@keyframes drop { to { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fly { from { transform: none; } to { transform: var(--fly); } }
@keyframes fadein { to { opacity: 1; } }

/* Dashboard nach dem Flug: taucht aus der Tiefe auf */
.welcome .layout { animation: welcome .8s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes welcome { from { opacity: 0; transform: scale(1.08); filter: blur(10px); } }

.login-sub { text-align: center; margin: 0 0 22px; color: var(--muted); font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
  animation: rise .7s ease 1.3s both; }

/* Karte: Glas-Effekt, fährt hoch, Felder nacheinander */
.login-card {
  background: color-mix(in srgb, var(--surface) 72%, transparent); border-color: color-mix(in srgb, var(--border) 70%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.35); padding: 22px; animation: rise .8s cubic-bezier(.2,.8,.2,1) 1s both;
}
.login-card form > * { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.login-card form > :nth-child(2) { animation-delay: 1.15s; }
.login-card form > :nth-child(3) { animation-delay: 1.25s; }
.login-card form > :nth-child(4) { animation-delay: 1.35s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Schwebende Feldbeschriftungen */
.field.float { position: relative; }
.field.float input { padding: 22px 12px 6px; background: color-mix(in srgb, var(--surface) 85%, transparent); transition: border-color .2s, box-shadow .2s; }
.field.float input:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field.float label {
  position: absolute; left: 13px; top: 16px; margin: 0; line-height: 1; pointer-events: none; font-weight: 500; font-size: .95rem;
  transform-origin: left top; transition: transform .2s ease, color .2s ease;
}
.field.float input:focus + label, .field.float input:not(:placeholder-shown) + label { transform: translateY(-9px) scale(.75); color: var(--accent); }
.field.float input:-webkit-autofill + label { transform: translateY(-9px) scale(.75); }

/* Button mit Lichtkante und Ladeanzeige */
.login-btn { position: relative; overflow: hidden; width: 100%; padding: 11px 14px; margin-top: 4px; font-weight: 600; transition: transform .15s ease, box-shadow .2s ease; }
.login-btn:hover { box-shadow: 0 8px 24px -8px var(--accent); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0) scale(.98); }
.login-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); translate: -100% 0; }
.login-btn:hover::after { translate: 100% 0; transition: translate .7s ease; }
.login-btn .spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.login-busy .login-btn span { opacity: .8; }
.login-busy .login-btn .spinner { display: block; }
.login-busy:not(.login-hello) .logo { animation: pulse 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

/* Falsches Passwort: Karte schüttelt */
.login-card.shake, .login-card.shake form > * { animation: shake .5s ease .15s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

@media (prefers-reduced-motion: reduce) {
  .login-bg *, .login-logo *, .login-sub, .login-card, .login-card form > *, .login-greet *, .welcome .layout { animation: none !important; }
  .login-hello .login-sub, .login-hello .login-card { visibility: hidden; }
}

/* ---------- Team ---------- */
.member { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.member form .row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---------- Druckkosten ---------- */
.druck { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .druck { grid-template-columns: 1fr; } }
.preis-haupt { font-size: 2.2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.preise { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.preise .stat .n { font-variant-numeric: tabular-nums; }
.preise .stat.main { border-color: var(--accent); background: var(--accent-soft); }
.preise .stat.main .n { color: var(--accent); }
table.calc { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.calc td { padding: 7px 0; border-top: 1px solid var(--border); }
table.calc td:last-child { text-align: right; white-space: nowrap; }
table.calc tr.sum td { font-weight: 700; }
table.calc tr.admin td:first-child::after { content: "Admin"; margin-left: 8px; font-size: .68rem; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); vertical-align: 1px; }
.table-wrap { overflow-x: auto; }
table.medien { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 820px; }
table.medien th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: 6px 4px; }
table.medien td { padding: 4px; border-top: 1px solid var(--border); vertical-align: middle; }
table.medien input[type=text], table.medien input[type=number] { padding: 6px 8px; }
table.medien td.calc-val { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.medien tr.inaktiv td { opacity: .55; }
.w-num { width: 90px; } .w-xs { width: 60px; }

/* Claude-Assistent: Aufgabenvorschläge */
.assist-task { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; border-top: 1px solid var(--border); padding-top: 10px; }
.assist-task .field { margin-bottom: 10px; }
.assist-check { padding-top: 9px; }
@media (max-width: 860px) { .assist-task .field[style] { grid-column: auto !important; } }
