/* MAXY Studio – Designsprache angelehnt an boltz.com:
   warmes Off-White, Salbei, Anthrazit, Haarlinien statt Schatten, Pillen-Buttons, eine Schriftstärke. */
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans.09d1eaa1672d.ttf") format("truetype"); font-weight: 100 1000; font-display: swap; }

:root {
  --surface: #FFFFFF;
  --surface-warm: #FBFAF7;
  --surface-2: #F0EFEC;
  --surface-3: #E8E7E3;
  --ink: #232323;
  --ink-2: #505050;
  --muted: #6E6E6E;
  --line: #D9D9D9;
  --line-warm: #EEE7DB;
  --sage-dark: #003014; --sage: #C6E5C6; --sage-light: #D9EED9; --sage-pale: #EDF7ED;
  --blue-dark: #142D36; --blue-deep: #165A75; --blue: #C7E3EE; --blue-light: #E5F2F7; --blue-pale: #EEF6FA;
  --tierra: #DACAB0; --tierra-200: #EEE7DB; --tierra-100: #F7F2E9;
  --error: #CC4444; --error-bg: #FDF2F2;
  --warning: #C97B22; --warning-bg: #FDF6ED;
  --success: #2D7A3F; --success-bg: #F0FAF2;
  --info: #2E6DA4; --info-bg: #EFF5FB;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 9999px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --sans: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1328px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.4; letter-spacing: -.01em;
  color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 400; margin: 0; }
h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -.04em; }
h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.02em; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
h4 { font-size: 17px; letter-spacing: -.01em; }
p { margin: 0 0 12px; color: var(--ink-2); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 20px; line-height: 1.4; letter-spacing: -.02em; color: var(--ink-2); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }
@media (max-width: 767px) { .container { padding: 0 16px; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: 64px; background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; letter-spacing: -.03em; white-space: nowrap; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: grid;
  place-items: center; font-size: 15px; letter-spacing: -.02em; flex: none; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { text-decoration: none; padding: 8px 14px; border-radius: var(--r-full); color: var(--ink-2);
  transition: background .2s var(--ease); white-space: nowrap; }
.nav-links a:hover { background: var(--surface-2); }
.nav-links a.active { background: var(--ink); color: #fff; }
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--sage); color: var(--sage-dark); font-size: 12px; margin-left: 6px; }
.nav-links a.active .badge-count { background: #fff; color: var(--ink); }
.nav-user { color: var(--muted); font-size: 14px; }
@media (max-width: 1023px) { .nav-user { display: none; } .nav .container { gap: 12px; } .nav-links a { padding: 8px 10px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: var(--r-full);
  border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 15px;
  text-decoration: none; cursor: pointer; transition: background .2s var(--ease), transform .1s var(--ease);
  white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #111; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { height: 56px; padding: 0 28px; font-size: 18px; }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn.danger:hover { background: var(--error-bg); }
.btn[disabled] { opacity: .4; pointer-events: none; }
/* Signatur-CTA: dunkle Pille mit weißem ↗-Kreis */
.btn.cta { background: var(--ink); color: #fff; padding: 0 5px 0 20px; }
.btn.cta:hover { background: #111; }
.btn.cta .arrow { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }
.btn.cta.lg .arrow { width: 46px; height: 46px; }
.btn-pair { display: inline-flex; align-items: center; }
.btn-pair .circle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center;
  text-decoration: none; transition: background .2s var(--ease); }
.btn-pair .circle:hover { background: var(--surface-2); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); display: inline-grid;
  place-items: center; text-decoration: none; background: transparent; cursor: pointer; font: inherit; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 36px; height: 36px; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ---------- Pills / Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-full);
  font-size: 13.5px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.botox { background: var(--sage-light); color: var(--sage-dark); }
.tag.radiesse { background: var(--blue-light); color: var(--blue-dark); }
.tag.hyaluron { background: var(--tierra-100); color: #5b4a2e; border: 1px solid var(--tierra-200); }
.tag.op { background: var(--surface-3); color: var(--ink); }
.tag.outline { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.tag.first { background: var(--blue-pale); color: var(--blue-deep); }
.tag.error { background: var(--error-bg); color: var(--error); }
.tag.warning { background: var(--warning-bg); color: var(--warning); }
.tag.success { background: var(--success-bg); color: var(--success); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.eyebrow { display: inline-flex; align-items: center; margin-bottom: 18px; }
.eyebrow .ic { width: 30px; height: 30px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; }
.eyebrow .lb { height: 30px; padding: 0 14px; border: 1px solid var(--ink); border-radius: var(--r-full); display: inline-flex;
  align-items: center; font-size: 14px; margin-left: -1px; }

.status { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--r-full);
  font-size: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); white-space: nowrap; }
.status .dot { color: var(--muted); }
.status.booked .dot { color: var(--line); }
.status.arrived, .status.checkin { background: var(--warning-bg); border-color: transparent; color: var(--warning); }
.status.arrived .dot, .status.checkin .dot { color: var(--warning); }
.status.ready { background: var(--sage-pale); border-color: var(--sage-dark); color: var(--sage-dark); }
.status.ready .dot { color: var(--success); }
.status.treating { background: var(--ink); border-color: var(--ink); color: #fff; }
.status.treating .dot { color: var(--sage); }
.status.treated { background: var(--blue-light); border-color: transparent; color: var(--blue-dark); }
.status.treated .dot { color: var(--blue-deep); }
.status.billed { background: var(--surface-2); border-color: transparent; color: var(--muted); }
.status.billed .dot { color: var(--success); }
.status.noshow, .status.cancelled { color: var(--muted); text-decoration: line-through; }

/* ---------- Flächen ---------- */
.band { background: var(--sage-pale); padding: 48px 0 40px; border-bottom: 1px solid var(--line); }
.band.blue { background: var(--blue-pale); }
.band.warm { background: var(--surface-warm); }
.band.plain { background: #fff; }
.band .lead { margin-top: 12px; }
.section { padding: 32px 0 80px; }
.card { background: var(--surface-warm); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; }
.card.white { background: #fff; }
.card.blue { background: var(--blue-light); border-color: transparent; }
.card.sage { background: var(--sage-pale); border-color: transparent; }
.card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card.dark p, .card.dark .muted { color: rgba(255,255,255,.7); }
.card.alert { background: var(--error-bg); border-color: #f1caca; }
.card.tight { padding: 20px; border-radius: var(--r-lg); }
.inset { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card h3 + p, .card h4 + p { margin-top: 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

.stats { display: flex; gap: 48px; margin-top: 28px; flex-wrap: wrap; }
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat b { font-weight: 400; font-size: 28px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 15px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.layout-side { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
@media (max-width: 1023px) { .layout-side, .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (min-width: 640px) and (max-width: 1023px) {
  .treat-aside { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
  .treat-aside > * + * { margin-top: 0; }
}
.sticky { position: sticky; top: 88px; }
@media (max-width: 1023px) { .sticky { position: static; } }

/* ---------- Tagesliste (editoriale Zeilen) ---------- */
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.list { border-top: 1px solid var(--line); }
.visit-row { display: grid; grid-template-columns: 72px 74px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line); }
.visit-row.done { opacity: .62; }
.visit-row .time { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.visit-row .time small { display: block; color: var(--muted); font-size: 12px; }
.visit-row > a { text-decoration: none; }
.visit-row .who { min-width: 0; }
.visit-row .who a { text-decoration: none; }
.visit-row .who .name { font-size: 22px; letter-spacing: -.02em; }
.visit-row .who .name:hover { text-decoration: underline; text-underline-offset: 4px; }
.visit-row .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.visit-row .actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) {
  .visit-row { grid-template-columns: 56px minmax(0, 1fr); }
  .visit-row .time { grid-column: 2; grid-row: 1; }
  .visit-row .avatar { grid-row: 1 / span 2; }
  .visit-row .who { grid-column: 2; }
  .visit-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.empty { padding: 64px 0; text-align: center; color: var(--muted); }

.avatar { width: 72px; height: 72px; border-radius: var(--r-lg); background: var(--tierra-100); overflow: hidden;
  display: grid; place-items: center; font-size: 22px; color: #8a7350; border: 1px solid var(--line-warm); flex: none; text-decoration: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.avatar.xl { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-xl); font-size: 64px; }

/* ---------- Tabellen ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-warm); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th a { text-decoration: none; }

/* ---------- Formulare ---------- */
label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number],
input[type=password], input[type=search], select, textarea {
  width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff; font: inherit; color: var(--ink); transition: border-color .2s var(--ease); -webkit-appearance: none; appearance: none; }
textarea { height: auto; padding: 12px 16px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23232323' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
.field { margin-bottom: 16px; }
.field .error, .errorlist { color: var(--error); font-size: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 16px; }
.form-grid .c2 { grid-column: span 2; } .form-grid .c3 { grid-column: span 3; } .form-grid .c4 { grid-column: span 4; }
.form-grid .c6 { grid-column: span 6; } .form-grid .c1 { grid-column: span 1; }
@media (max-width: 767px) { .form-grid > * { grid-column: span 6 !important; } }
.search { position: relative; }
.search input { padding-left: 46px; border-radius: var(--r-full); height: 52px; }
.search svg { position: absolute; left: 18px; top: 18px; }

/* Auswahlzeilen (wie „Secure deployment“) */
.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease); margin: 0; color: var(--ink); font-size: 16px; }
.option:hover { background: var(--surface-warm); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .radio { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ink); flex: none; display: grid; place-items: center; }
.option .check { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--ink); flex: none; display: grid; place-items: center; }
.option:has(input:checked) { background: var(--sage-pale); border-color: var(--sage-dark); }
.option:has(input:checked) .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sage-dark); }
.option:has(input:checked) .check { background: var(--sage-dark); border-color: var(--sage-dark); }
.option:has(input:checked) .check::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.option .sub { color: var(--muted); font-size: 14px; }
.option .right { margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; margin: 0; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; color: var(--ink); transition: all .2s var(--ease); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.segmented { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--r-full); padding: 3px; gap: 2px; }
.segmented label { margin: 0; position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; height: 42px; padding: 0 18px;
  border-radius: var(--r-full); cursor: pointer; color: var(--ink); font-size: 16px; transition: background .2s var(--ease); }
.segmented input:checked + span { background: var(--ink); color: #fff; }
.segmented input[value=ja]:checked + span { background: var(--error); }

/* ---------- Checkliste ---------- */
.steps { display: grid; gap: 6px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); }
.step .tick { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.step.done { background: var(--sage-pale); border-color: transparent; }
.step.done .tick { background: var(--sage-dark); border-color: var(--sage-dark); }
.step.done .tick::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.step .detail { margin-left: auto; color: var(--muted); font-size: 13.5px; text-align: right; }
.step.missing .detail { color: var(--warning); }

/* ---------- Warnungen ---------- */
.warn-list { display: grid; gap: 8px; }
.warn { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: #fff; border: 1px solid #f1caca; }
.warn .dot { color: var(--error); margin-top: 7px; flex: none; }
.warn.mittel { border-color: #f0dcc0; } .warn.mittel .dot { color: var(--warning); }
.warn b { font-weight: 500; }

/* ---------- Fotos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.photo { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cap { position: absolute; left: 8px; bottom: 8px; background: rgba(255,255,255,.9); border-radius: var(--r-full); padding: 3px 10px; font-size: 12px; }
.capture { aspect-ratio: 1; border: 1px dashed var(--ink); border-radius: var(--r-lg); display: grid; place-items: center; text-align: center;
  cursor: pointer; background: #fff; padding: 12px; transition: background .2s var(--ease); margin: 0; color: var(--ink); }
.capture:hover { background: var(--sage-pale); }
.capture input { display: none; }
.capture .plus { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 8px; font-size: 22px; }
.capture.has { border-style: solid; background: var(--sage-pale); }

/* ---------- Verlauf ---------- */
.timeline { border-top: 1px solid var(--line); }
.tl-item { display: grid; grid-template-columns: 130px 1fr auto; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.tl-item .date { font-family: var(--mono); font-size: 13.5px; color: var(--muted); padding-top: 3px; }
@media (max-width: 767px) { .tl-item { grid-template-columns: 1fr; gap: 6px; } }
details.acc { border-bottom: 1px solid var(--line); }
details.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 0; cursor: pointer; font-size: 20px; letter-spacing: -.02em; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-size: 28px; font-weight: 300; transition: transform .35s var(--ease); }
details.acc[open] summary::after { transform: rotate(45deg); }
details.acc .acc-body { padding: 0 0 20px; animation: acc .4s cubic-bezier(.16, 1, .3, 1); }
@keyframes acc { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Wochenraster ---------- */
.week { display: grid; grid-template-columns: 56px repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: #fff; }
.week .col-head { padding: 14px 12px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface-warm); }
.week .col-head.today { background: var(--sage-pale); }
.week .col-head b { font-weight: 400; font-size: 22px; letter-spacing: -.02em; display: block; }
.week .hours { position: relative; }
.week .hour { height: 88px; border-bottom: 1px solid var(--surface-2); font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 4px 8px; }
.week .day { position: relative; border-left: 1px solid var(--line); }
.week .slot { display: block; height: 44px; border-bottom: 1px solid var(--surface-2); }
.week .slot:hover { background: var(--sage-pale); }
.week .appt { position: absolute; left: 4px; right: 4px; border-radius: var(--r-md); padding: 4px 8px; font-size: 12.5px; line-height: 1.2;
  background: var(--sage-light); color: var(--sage-dark); text-decoration: none; overflow: hidden; border: 1px solid #fff; }
.week .appt.radiesse { background: var(--blue-light); color: var(--blue-dark); }
.week .appt.hyaluron { background: var(--tierra-100); color: #5b4a2e; }
.week .appt.billed, .week .appt.treated { opacity: .6; }
.week .appt .mono { font-size: 11px; }
@media (max-width: 900px) { .week { grid-template-columns: 44px repeat(6, minmax(110px, 1fr)); overflow-x: auto; } }

/* ---------- Rechnungsvorschau ---------- */
.paper { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.paper .line { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--surface-2); font-size: 15px; }
.paper .line .code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 2px; }
.paper .line .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper .sum { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; color: var(--ink-2); }
.paper .sum.total { font-size: 22px; color: var(--ink); border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 14px; letter-spacing: -.02em; }

/* ---------- Meldungen ---------- */
.messages { position: fixed; right: 20px; top: 76px; z-index: 100; display: grid; gap: 8px; max-width: 440px; }
.msg { padding: 14px 18px; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: 15px; cursor: pointer; animation: acc .4s cubic-bezier(.16, 1, .3, 1); }
.msg.error { background: var(--error); }
.msg.warning { background: var(--warning); }
.notice { padding: 14px 16px; border-radius: var(--r-md); background: var(--warning-bg); color: #7a4b14; font-size: 15px; }
.notice.info { background: var(--info-bg); color: var(--blue-dark); }
.notice.error { background: var(--error-bg); color: var(--error); }

/* ---------- Aktionsleiste ---------- */
.actionbar { position: sticky; bottom: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 14px 0; margin-top: 40px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth .side { background: var(--sage-pale); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .side svg.contour { position: absolute; right: -120px; bottom: -80px; width: 640px; opacity: .36; pointer-events: none; }
.auth .main { display: grid; place-items: center; padding: 40px; }
.auth form { width: 100%; max-width: 380px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth .side { min-height: 220px; } }

/* ---------- Tablet ---------- */
body.tablet { background: var(--surface-warm); font-size: 19px; }
.t-top { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: #fff; }
.t-progress { display: flex; gap: 6px; }
.t-progress span { width: 34px; height: 4px; border-radius: 4px; background: var(--line); }
.t-progress span.on { background: var(--ink); }
.t-wrap { max-width: 860px; margin: 0 auto; padding: 48px 32px 140px; }
.t-wrap h1 { font-size: 48px; margin-bottom: 14px; }
.t-wrap .lead { font-size: 22px; }
.t-q { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; }
.t-q .detail { grid-column: 1 / -1; }
.t-q .detail input { height: 52px; }
.t-bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 16px 32px; }
.t-bar .in { max-width: 860px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.doc-pages img { width: 100%; display: block; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 16px; background: #fff; }
.sigpad { position: relative; background: #fff; border: 1px solid var(--ink); border-radius: var(--r-lg); height: 240px; touch-action: none; }
.sigpad canvas { width: 100%; height: 100%; display: block; border-radius: var(--r-lg); }
.sigpad .base { position: absolute; left: 28px; right: 28px; bottom: 56px; border-top: 1px solid var(--line); pointer-events: none; }
.sigpad .hint { position: absolute; left: 28px; bottom: 22px; color: var(--muted); font-size: 15px; pointer-events: none; }
.sigpad .clear { position: absolute; right: 12px; top: 12px; }
.idle { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--sage-pale); position: relative; overflow: hidden; }
.idle h1 { font-size: 64px; }
.idle svg.contour { position: absolute; inset: auto -10% -20% -10%; width: 120%; opacity: .5; pointer-events: none; }

@media print { .nav, .actionbar, .messages, .btn { display: none !important; } }
