/* Praxis-App. Farben: Hauptfarbe (Standard Petrol #007A87, in den Einstellungen änderbar), sonst ruhige Grautöne. */
:root {
  --accent: #007A87; --accent-hover: #006974; --accent-ink: #fff; --accent-tint: rgba(0,122,135,.14); --accent-text: #007582;
  --bg: #F5F5F7; --card: #fff; --ink: #1D1D1F; --muted: #86868B; --soft-ink: #515154;
  --line: #E8E8ED; --line-strong: #D2D2D7; --hover: #FAFAFC;
  --warn: #C2410C; --warn-tint: #FDECE4; --open: #A16207; --open-tint: #FEF6DD; --ok-tint: #E0EFF1;
  --radius: 16px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-l: 0 20px 60px rgba(0,0,0,.18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.vorfuehrung { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #C2410C; color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }

/* ---------- Kopf und Menü: auf Handy und PC gleich. Praxis klein oben, Menü als Pille unten, Seltenes unter «Mehr» */
.app .top { max-width: 980px; margin: 0 auto; padding: 18px 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--muted); line-height: 1.25; cursor: pointer; user-select: none; -webkit-user-select: none; }   /* Logo = Link zur Startseite, nie Text markieren */
.brand img { -webkit-user-drag: none; }
#brand-logo { display: block; max-width: 210px; max-height: 46px; object-fit: contain; }   /* Logo der Praxis oben links */
.brand-mark { width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.pille { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 15; display: flex; gap: 4px;
  background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 999px; padding: 6px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.05); width: max-content; max-width: calc(100% - 24px); }
.pille a, .pille button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; padding: 7px 12px; border: 0; border-radius: 999px; background: none;
  font-size: 11.5px; font-weight: 600; color: var(--soft-ink); text-decoration: none; }
.pille a:hover, .pille button:hover { background: var(--bg); border: 0; }
.pille .on, .pille .on:hover { background: var(--accent-tint); color: var(--accent-text); }
.pille svg, .mehr-liste svg { width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .pille a, .pille button { flex-direction: row; gap: 8px; font-size: 15px; padding: 10px 18px; min-width: 0; } .pille svg { width: 20px; height: 20px; } }
.pille .pc-extra { display: none; }
@media (min-width: 1000px) {
  .pille .pc-extra { display: flex; }
  #mehr-auf { display: none; }
  .pille .abmelden { color: var(--warn); }
}
@media (min-width: 1000px) and (max-width: 1499px) {   /* alle Punkte: Symbol über dem Wort, damit es in die Breite passt */
  .pille a, .pille button { flex-direction: column; gap: 2px; font-size: 12px; padding: 7px 10px; }
  .pille svg { width: 22px; height: 22px; }
}
@media (min-width: 1500px) { .pille a, .pille button { padding: 10px 14px; gap: 7px; font-size: 14px; } }
/* Blatt: Handy von unten, PC als Fenster in der Mitte («Mehr» und Aktionsmenüs) */
dialog.blatt { margin: auto 0 0; width: 100%; max-width: none; border-radius: 22px 22px 0 0; padding: 10px 16px max(20px, env(safe-area-inset-bottom)); animation: blatt-hoch .22s ease-out; }
dialog.blatt::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
@keyframes blatt-hoch { from { transform: translateY(40%); opacity: 0; } }
@media (min-width: 900px) { dialog.blatt { margin: auto; width: 420px; border-radius: 22px; padding: 18px 22px; animation: none; } dialog.blatt::before { display: none; } }
.mehr-liste { display: flex; flex-direction: column; }
.mehr-liste a, .mehr-liste button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: none; font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; }
.mehr-liste a:hover, .mehr-liste button:hover { background: var(--hover); border-color: var(--line); }
.mehr-liste svg { color: var(--accent-text); }
.mehr-liste a.on { color: var(--accent-text); font-weight: 600; }
.mehr-liste .abmelden { border-bottom: 0; color: var(--warn); }
.mehr-liste .abmelden svg { color: var(--warn); }
main.bank { max-width: none; padding: 0; }
main { max-width: 980px; margin: 0 auto; padding: 12px 16px 120px; }
@media (min-width: 900px) { .app .top { padding: 28px 40px 0; } main { padding: 16px 40px 140px; } }
main.breit { max-width: none; }

/* ---------- Typografie und Grundbausteine */
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 20px; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > h1, .row > h2 { margin-bottom: 0; }
main > .row:first-child, main > p + .row { margin-bottom: 20px; }
.row.end { justify-content: flex-end; }
.card > .row:first-child { margin-bottom: 16px; }
.sp { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
main > p:first-child { margin: 0 0 8px; }
main > p:first-child a { text-decoration: none; font-size: 14px; font-weight: 500; }

button, .btn { font: inherit; font-size: 14px; font-weight: 500; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); padding: 8px 16px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s, box-shadow .15s; }
button:hover, .btn:hover { background: var(--hover); border-color: #C7C7CC; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover, .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { color: var(--warn); }
button.danger:hover { background: var(--warn-tint); border-color: #F5C2AE; }
button.link { border: none; background: none; color: var(--muted); padding: 6px 10px; }
button.link:hover { color: var(--ink); background: var(--bg); }
button.mail-pruefen { font-size: 12px; padding: 4px 0 0; text-align: left; }   /* Patienten-Dialog: unter dem E-Mail-Feld */
button.mail-pruefen:hover { background: none; text-decoration: underline; }
button.mail-pruefen.fehler { color: var(--warn); }
.tag.mail-geteilt { padding: 1px 7px; font-size: 11px; vertical-align: 1px; cursor: help; background: #F1EBFD; color: #6D28D9; }
#mail-hinweis { color: #6D28D9; }   /* gleiche Adresse bei mehreren Patienten: violett */   /* Adresse bei mehreren Patienten; Namen beim Darüberfahren */
.tag.mail-geteilt::before { display: none; }
button:disabled { opacity: .4; cursor: not-allowed; }
select:disabled { opacity: .4; cursor: not-allowed; }
button:disabled:hover { background: var(--card); border-color: var(--line-strong); }
button.primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent-tint); outline-offset: 2px; }

input, select, textarea { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--card); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
input, select { height: 42px; }
input[type="date"] { line-height: 22px; }
select { -webkit-appearance: none; appearance: none; padding-right: 36px; text-overflow: ellipsis;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
input[readonly] { background: var(--bg); border-color: transparent; font-weight: 600; }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); flex: none; }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--soft-ink); }
label > input, label > select, label > textarea { margin-top: 5px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid .w2 { grid-column: span 2; } .grid .w4 { grid-column: 1 / -1; }
.grid.small > div { line-height: 1.55; }
.grid.small .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

.klapp { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 16px; }
.klapp > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 0; font-weight: 600; }
.klapp > summary::-webkit-details-marker { display: none; }
.klapp > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.klapp[open] > summary::before { transform: rotate(45deg); }
.klapp > summary .small { font-weight: 400; margin-left: auto; }
.klapp > .grid { padding-bottom: 16px; }
.person { display: inline-flex; align-items: center; gap: 12px; }
.person a { color: inherit; text-decoration: none; } .person a:hover { color: var(--accent-text); }

/* ---------- Tabellen */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0 8px 10px; }
table.list td { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: middle; font-size: 14px; }
table.list td .person, table.list td > a { white-space: nowrap; }   /* Namen nicht umbrechen */
table.list tr:last-child td { border-bottom: none; }
table.list tr.click { cursor: pointer; transition: background .12s; }
table.list tr.click:hover td { background: var(--hover); }
table.list tr.click td:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
table.list tr.click td:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
table.list .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list tr.arch td { color: var(--muted); }
table.list tr.offen-zeile td { background: var(--hover); border-bottom: none; }
table.list td.aktionen { white-space: nowrap; padding-top: 5px; padding-bottom: 5px; padding-right: 0; }
table.list td.aktionen > * { vertical-align: middle; }
button.klein { padding: 5px 12px; font-size: 13px; margin-right: 4px; }
button.ib { border: none; background: none; color: var(--muted); width: 28px; height: 28px; padding: 0; justify-content: center; font-size: 18px; line-height: 1; }
button.ib:hover { background: var(--bg); color: var(--ink); }
button.ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
table.list tr.markiert td { animation: markiert 2.5s ease-out; }
@keyframes markiert { from { background: var(--accent-tint); } to { background: transparent; } }
.menue { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.menue button { justify-content: flex-start; }
.menue-titel { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 8px 0 -2px 4px; }
.menue-titel:first-child { margin-top: 0; }
.menue-titel:empty { margin: 4px 0 0; }
.card > table.list { margin: -4px 0; }

/* ---------- Etiketten, Kacheln, Hinweise */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--soft-ink); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.offen { background: var(--open-tint); color: var(--open); }
.tag.nichtv { background: #FDEBD8; color: #B45309; }   /* erstellt, aber nicht gemailt/gedruckt: Handlungsbedarf (orange) */
.tag.ueberf { background: #FCEBEB; color: #A32D2D; }   /* Rechnung überfällig (rot) */
.tag.ueber { background: var(--warn-tint); color: var(--warn); }
.tag.bezahlt { background: var(--ok-tint); color: var(--accent-text); }
.tag.mail { background: #E6F2E1; color: #3B6B2C; } .tag.post { background: #E7F0FB; color: #1D4F91; }
.tag.mail::before, .tag.post::before, .tag.ansprache::before { display: none; }
.tag.ansprache { align-self: center; font-size: 13px; padding: 4px 12px; background: var(--accent-tint); color: var(--accent-text); }
.tag.nur-symbol { padding: 3px 7px; }
.tag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Auswahl als Knöpfe (statt Dropdown): Symbol + Text, gewählte Möglichkeit farbig */
.feld { font-size: 13px; font-weight: 500; color: var(--soft-ink); }
.wahl { display: flex; margin-top: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--card); }
.wahl label { flex: 1; position: relative; }
.wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wahl span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 8px; font-size: 15px; font-weight: 500; color: var(--soft-ink); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.wahl label + label span { border-left: 1px solid var(--line-strong); }
.wahl span:hover { background: var(--hover); }
.wahl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wahl input:checked + span { background: var(--accent-tint); color: var(--accent-text); }
.wahl input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--accent); }
.wahl .gruen svg { stroke: #4C8A36; } .wahl .gruen input:checked + span { background: #E6F2E1; color: #3B6B2C; }   /* Mail grün, Post blau */
.wahl .blau svg { stroke: #2F6FC4; } .wahl .blau input:checked + span { background: #E7F0FB; color: #1D4F91; }
.wahl .orange input:checked + span { background: var(--warn-tint); color: var(--warn); }
.tag.storniert { color: var(--muted); text-decoration: line-through; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }   /* alle fünf Kacheln in einer Reihe */
.tile { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.tile:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 10px 24px rgba(0,0,0,.07); }
.tile .muted { font-size: 13px; font-weight: 500; }
.tile { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }   /* Titel, Zahl und Untertitel stehen in allen Kacheln auf gleicher Höhe */
.logo-zeile { flex-wrap: nowrap; }   /* Einstellungen: Logo, Hinweis und Knöpfe in einer Zeile */
.logo-zeile img { max-width: 140px; max-height: 44px; margin-left: 12px; }
.logo-zeile p { margin: 0 0 0 12px; flex: 1; min-width: 0; }
.tile .titel { line-height: 1.3; }
.tile .unten { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tile.gruen .unten { color: inherit; opacity: .85; }
.tile .z { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile.warn .z { color: var(--warn); }
.betrag-gross { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
div.r { text-align: right; }
.tile.gruen { background: var(--accent); color: var(--accent-ink); } .tile.gruen .muted { color: inherit; opacity: .85; }
.hinweis { background: var(--open-tint); color: #713F12; border-radius: var(--radius-s); padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }

/* ---------- Anmeldung */
.app .top[hidden] ~ main { max-width: none; }   /* Anmelden/Einrichten: ohne Menü, Fenster mittig */
.login { max-width: 400px; margin: 14vh auto; }
.login .card { padding: 32px; box-shadow: var(--shadow-l); }
.login .card > * + * { margin-top: 16px; }
.login h1 { margin: 0; }
.login button.primary { width: 100%; justify-content: center; padding: 11px; }
.login .row button.primary { width: auto; }
.login .notzugang summary { cursor: pointer; }
.login .notzugang > * + * { margin-top: 16px; }
.feld-fehler { display: block; color: var(--warn); font-size: 12px; margin-top: 4px; min-height: 0; }
.err { color: var(--warn); font-size: 14px; }
.err:empty { margin: 8px 0 0; }   /* leer: kein grosser Abstand vor dem Knopf */

/* ---------- Dialog, Meldung */
dialog { border: none; border-radius: 20px; padding: 0; width: min(580px, 94vw); box-shadow: var(--shadow-l); color: var(--ink); }
dialog::backdrop { background: rgba(29,29,31,.35); backdrop-filter: blur(4px); }
dialog form { padding: 26px 28px; }
dialog form > * + * { margin-top: 14px; }
dialog h2 { font-size: 20px; }
dialog .row.end { margin-top: 22px; }
/* Dialoge etwas kompakter (Patient bearbeiten passt ohne Scrollen) */
dialog form { padding: 18px 24px; }
dialog .grid { gap: 8px 14px; }
dialog .abschnitt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
dialog .abschnitt:first-child { border-top: none; padding-top: 0; margin-top: 0; }
#p-geschlecht-info .link { padding: 0 4px; font-size: inherit; text-decoration: underline; }
dialog input, dialog select { height: 38px; padding-top: 7px; padding-bottom: 7px; }
dialog .wahl span { height: 36px; }
dialog label > input, dialog label > select, dialog label > textarea, dialog .wahl { margin-top: 3px; }
dialog textarea { min-height: 78px; padding-top: 7px; padding-bottom: 7px; }   /* Notiz: mindestens 3 Zeilen */
dialog .row.end { margin-top: 14px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; z-index: 20; max-width: 90vw; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-l); animation: hoch .2s ease-out; }
@keyframes hoch { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Rechnungsansicht */
.actions { position: sticky; top: 0; z-index: 4; background: rgba(245,245,247,.85); backdrop-filter: blur(12px); padding: 14px 0; margin: -14px 0 16px; }
/* ---------- Patientenportal: schmale Kopfzeile statt Seitenleiste */
body.portal .top { position: sticky; top: 0; z-index: 6; display: flex; background: var(--card); width: auto; flex-direction: row; align-items: center; padding: 14px 24px; border-right: none; border-bottom: 1px solid var(--line); }
body.portal .brand { padding: 0; gap: 16px; font-size: 15px; font-weight: 500; color: var(--ink); }
body.portal .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.portal-logo { height: 60px; width: auto; display: block; }
body.portal main { margin: 0 auto; }

@media (max-width: 860px) {
  .logo-zeile { flex-wrap: wrap; } .logo-zeile p { order: 9; flex-basis: 100%; margin: 4px 0 0; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px; }
  .hide-m { display: none; }
}
/* Buchhaltung */
.btn .zahl { background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 2px; }
table.bank-zeilen td { vertical-align: middle; }
table.bank-zeilen tr.vorschlag td { background: var(--ok-tint); }
.bank-text { max-width: 340px; overflow-wrap: anywhere; font-size: 13px; }
td.minus { color: var(--warn); } td.plus { color: var(--accent-text); }
.bericht table.list tr.seite td { font-size: 20px; font-weight: 300; padding-top: 22px; border-bottom: 1px solid var(--line); }
.bericht table.list tr.bereich td { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 16px; }
.bericht table.list tr.gruppe td { font-size: 13px; color: var(--muted); padding-top: 10px; }
.bericht table.list tr.summe td { font-weight: 600; }
.bericht table.list tr.bereich-total td { border-top: 1px solid var(--line-strong); }
.bericht table.list tr.total td { font-weight: 700; border-top: 2px solid var(--line-strong); }
.bericht table.list tr.ergebnis td { font-size: 16px; }
.bericht table.list tr[data-konto] td:first-child { padding-left: 22px; }
.bericht table.list td.r, .bericht table.list th.r { width: 110px; font-variant-numeric: tabular-nums; }
.bericht table.list td:first-child { white-space: nowrap; }   /* Kontonamen nicht umbrechen */
.eroeffnung-seite { grid-template-columns: 1fr; gap: 8px; align-content: start; }
.eroeffnung-seite h3 { margin: 0; font-size: 14px; }
.eroeffnung-feld { display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: 10px; font-size: 13px; }
.eroeffnung-feld input { text-align: right; }
.nurdruck { display: none; }
.card.patient-daten { cursor: pointer; transition: box-shadow .15s; }
.card.patient-daten:hover { box-shadow: 0 0 0 2px var(--accent-tint), var(--shadow); }
button.link.danger { color: var(--warn); }
.anmeldung-vergleich { max-height: 60vh; overflow: auto; margin-top: 12px; }
.anmeldung-vergleich td { font-size: 13px; vertical-align: top; }
dialog:has(.anmeldung-vergleich) { width: min(760px, 94vw); }
table.list th.sortierbar { cursor: pointer; user-select: none; white-space: nowrap; }
table.list th.sortierbar:hover { color: var(--ink); }
table.list th.sortiert { color: var(--ink); }
table.list th.sortiert::after { content: " ▲"; font-size: 9px; }
table.list th.sortiert[data-richtung="ab"]::after { content: " ▼"; }
.pillen .btn { font-weight: 600; }   /* gleich breit, ob gewählt oder nicht: die Reiter hüpfen nicht */
.ib-platz { display: inline-block; width: 28px; }
/* Suchfeld mit Liste (Konten, Rechnungen) */
.suchliste { position: fixed; z-index: 50; max-height: 260px; overflow: auto; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-s); box-shadow: var(--shadow-l); padding: 4px 0; text-align: left; }
.such-eintrag { padding: 7px 12px; font-size: 13px; line-height: 1.35; cursor: pointer; }   /* lange Einträge brechen um statt abgeschnitten zu werden */
.such-eintrag.aktiv, .such-eintrag:hover { background: var(--accent-tint); }
.such-gruppe { padding: 8px 12px 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.bank-zeilen input.such { min-width: 240px; font-size: 13px; padding: 6px 10px; }
@media print {
  body { background: #fff; }
  .top, .actions, .noprint, #toast { display: none !important; }
  .nurdruck { display: block; }
  .card { box-shadow: none; padding: 0; }
  .app main, main { margin: 0; padding: 0; max-width: none; }
}
.login .code { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; text-align: center; font-size: 1.2em; }
.login .qr-setup { display: flex; justify-content: center; }
.login .qr-setup svg { width: 200px; height: 200px; }
.login .geheim { display: inline-block; margin-top: 6px; font-size: 0.95em; user-select: all; word-break: break-all; }
table.list td a { color: inherit; text-decoration: none; } table.list td a:hover { color: var(--accent-text); text-decoration: underline; }
.nowrap { white-space: nowrap; }
button.link.notiz { padding: 4px 8px; vertical-align: middle; }
button.link.notiz svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
button.link.notiz { color: var(--warn); } .link.notiz.hat { color: var(--accent-text); } .link.notiz.hat svg { fill: var(--accent-tint); }
/* Patientenportal, Anmeldung: grosser Knopf, darunter grauer Hinweis */
button.breit { width: 100%; justify-content: center; padding-top: 12px; padding-bottom: 12px; }
.unter-knopf { text-align: center; margin: 10px 0 0; } .unter-knopf button.link { font-size: 13px; }
/* Patientenportal: pro Rechnung ein Block (Handy: Knöpfe darunter, volle Breite) */
.p-rechnung { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.p-rechnung:first-child { padding-top: 2px; } .p-rechnung:last-child { border-bottom: none; padding-bottom: 2px; }
.p-titel { font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-info .small { margin-top: 2px; }
.p-betrag { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-knoepfe { display: flex; gap: 8px; } .p-knoepfe button { margin: 0; }
@media (max-width: 560px) {
  .p-rechnung { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; }
  .p-betrag { align-self: start; }
  .p-knoepfe { grid-column: 1 / -1; } .p-knoepfe button { white-space: nowrap; } .p-knoepfe button + button { flex: 1; }
}
/* Anmeldeformular: fehlende Pflichtfelder */
.fehlt { color: var(--warn); } .fehlt input, .fehlt .wahl { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
/* Patientenseite: Notiz hervorheben, kann Wichtiges enthalten */
.notiz-box { background: var(--open-tint); border-radius: var(--radius-s); padding: 10px 14px; font-weight: 500; }
.grid.small .notiz-box .muted { color: var(--open); }
/* Einstellungen: Sicherung/Karteikarten an eine fremde Adresse */
.fremde-adresse { color: var(--warn); margin-top: 4px; }
.fremde-adresse:empty { display: none; }
/* Buchhaltung › Journal: Werkzeugleiste in einer Zeile */
.journal-leiste { flex-wrap: nowrap; }
.journal-leiste input { flex: 1 1 160px; min-width: 0; max-width: 260px; }
.journal-leiste button { flex: none; }
@media (max-width: 760px) { .journal-leiste { flex-wrap: wrap; } }
.tag.gutschein { background: var(--ok-tint); color: var(--accent-text); }
.tag.gutschein::before { display: none; }
input[type=search] { -webkit-appearance: none; appearance: none; }   /* Suchfelder sehen aus wie normale Felder */

/* ---------- Einheitlicher Look Handy/PC (20.11.2026): Seitenkopf, Suche, Listen-Zeilen statt Tabellen */
.kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.kopf h1 { margin: 0; flex: 1; min-width: 0; }
.kopf .sp { display: none; }
h1 { font-size: 30px; line-height: 1.1; }
@media (min-width: 900px) { h1 { font-size: 34px; } }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-weight: 500; font-size: 15px; text-decoration: none; margin: 4px 0 2px; }
.zurueck svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button.rund { width: 48px; height: 48px; padding: 0; border-radius: 50%; justify-content: center; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); flex: none; }
button.rund:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.rund svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.suche { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 0 14px; min-height: 48px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; color: var(--muted); }
.suche svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.suche input { border: 0; box-shadow: none; padding: 0; height: 46px; background: none; font-size: 16px; }
.suche input:focus { box-shadow: none; }
.pillen { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.pillen::-webkit-scrollbar { display: none; }
.pillen button, .pillen .btn { flex: none; min-height: 40px; padding: 0 16px; font-size: 15px; border-color: var(--line); }
.pillen .an, .pillen .an:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }   /* gewählter Reiter/Filter in der Hauptfarbe */
.liste { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.card .liste, .liste.innen { box-shadow: none; border: 1px solid var(--line); border-radius: 14px; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: inherit; text-decoration: none; }
.zeile:last-child { border-bottom: 0; }
.zeile.click { cursor: pointer; transition: background .12s; }
.zeile.click:hover { background: var(--hover); }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .titel, .zeile .unter { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .titel { font-weight: 500; }
.zeile .unter { font-size: 14px; color: var(--muted); }
.zeile .haupt > .tag { margin-top: 4px; }
.zeile .rechts { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.zeile .betrag { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zeile .pfeil { width: 18px; height: 18px; flex: none; fill: none; stroke: #C7C7CC; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.zeile.arch { color: var(--muted); }
.zeile.total { font-weight: 600; min-height: 52px; background: var(--hover); }
.zeile.markiert { animation: markiert 2.5s ease-out; }
.tag.hinweis-tag { background: var(--accent-tint); color: var(--accent-text); }
.tag.hinweis-tag::before { display: none; }
.leer { color: var(--muted); padding: 18px 16px; margin: 0; }
.card { border-radius: 18px; }
.card h2 { font-size: 18px; }
/* Aktionsblatt (Rechnung, Gutschein): Einträge als grosse Zeilen, der nächste Schritt farbig zuoberst */
dialog.blatt form { padding: 0; }
dialog.blatt h2 { font-size: 18px; margin: 0; }
dialog.blatt form > p.muted { margin: 2px 0 0; font-size: 14px; }
dialog.blatt .menue { gap: 0; margin: 10px 0 0; }
dialog.blatt .menue button { min-height: 46px; border: 0; border-radius: 10px; background: none; font-size: 16px; padding: 8px; text-align: left; line-height: 1.3; }   /* keine Linie pro Eintrag, nur zwischen den Gruppen */
dialog.blatt .menue button:hover { background: var(--hover); }
dialog.blatt .menue button.primary { justify-content: center; text-align: center; border-radius: 14px; background: var(--accent); color: var(--accent-ink); border: 0; margin: 4px 0 6px; }
dialog.blatt .menue button.primary:hover { background: var(--accent-hover); }
dialog.blatt .menue-titel { margin: 10px 0 2px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
dialog.blatt .menue-titel:empty { margin: 8px 0 4px; padding: 0; }
dialog.blatt .menue-titel:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
dialog.blatt .row.end { margin-top: 10px; }
dialog.blatt .row.end button { width: 100%; justify-content: center; min-height: 48px; border-radius: 14px; }
/* Patient: Daten, Knöpfe darunter; am PC zwei Spalten (links erfassen, rechts Offenes und Rechnungen) */
.daten { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (min-width: 900px) { .daten { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tasten { display: flex; gap: 8px; overflow-x: auto; margin-top: 14px; scrollbar-width: none; }
.tasten .btn, .tasten button { flex: none; min-height: 40px; }
.patient-tasten { margin: -4px 0 14px; }   /* Patientenseite: Knöpfe direkt unter dem Namen */
.kopf.kopf-name h1 { flex: 0 1 auto; }   /* Du/Sie direkt neben dem Namen */
@media (min-width: 900px) { .zweispaltig { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; } }
.erfassen-kopf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 420px) { .erfassen-kopf { grid-template-columns: 1fr; } }
.leistung { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.leistung-kopf { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; min-height: 56px; text-align: left; border: 0; border-radius: 0; background: none; font-size: 15px; }
.leistung-kopf:hover { background: var(--hover); border: 0; }
.leistung-kopf .name { flex: 1; font-weight: 500; }
.leistung .minuten { display: none; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; }
.leistung.auf { border-color: var(--accent); }
.leistung.auf .minuten { display: grid; }
.minuten > button { flex-direction: column; gap: 0; justify-content: center; min-height: 54px; padding: 4px; border: 0; border-radius: 12px; background: var(--accent-tint); color: var(--accent-text); font-weight: 600; font-size: 17px; line-height: 1.15; }
.minuten > button:hover { background: var(--accent); color: var(--accent-ink); border: 0; }
.minuten small { display: block; font-size: 11px; font-weight: 500; opacity: .8; }
.minuten .e-frei { grid-column: 1 / -1; display: flex; gap: 8px; }
.minuten .e-frei input { flex: 1; }
.minuten .e-frei button { flex: none; border-radius: 12px; }
.zeile > input[type="checkbox"] { width: 22px; height: 22px; }
.alle-zeile { min-height: 48px; font-size: 14px; color: var(--soft-ink); cursor: pointer; }
.zeile button.link { flex: none; padding: 6px; }
button.gross { width: 100%; justify-content: center; min-height: 52px; border-radius: 14px; font-size: 16px; }
.card .liste + button.gross { margin-top: 4px; }
.unter-knopf { margin: 6px 0 0; }
button, .btn { border-radius: 12px; }
button.link, button.ib { border-radius: 8px; }
.tag { border-radius: 999px; }
.tarif { display: inline-block; flex: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--soft-ink); }
.tasten { flex-wrap: wrap; overflow: visible; }
.zeile .titel, .zeile .unter { white-space: normal; overflow-wrap: anywhere; }   /* lieber umbrechen als abschneiden */
#toast { bottom: calc(100px + env(safe-area-inset-bottom)); }   /* über der Menü-Pille */
/* Übersicht: Kacheln 2 nebeneinander (Handy), alle fünf in einer Reihe (PC); «Eingenommen» am Handy über die ganze Breite */
.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles .tile:last-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tiles .tile:last-child { grid-column: auto; } .zweispaltig.gleich { grid-template-columns: 1fr 1fr; } }
.tile .z { font-size: 24px; }
select.jahr { width: auto; flex: none; }
/* Einstellungen › Hauptfarbe */
.farbe-zeile { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.farbe-zeile input[type="color"] { width: 56px; height: 42px; padding: 3px; border-radius: 12px; cursor: pointer; flex: none; }
.farbe-zeile label { width: 150px; }
.farbe-zeile label input { font-variant-numeric: tabular-nums; text-transform: uppercase; }
.farbe-vorschau { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; padding: 14px; border-radius: 14px; background: var(--bg); }
.farbe-vorschau .btn { pointer-events: none; }
/* Buchhaltung, Einstellungen: breite Tabellen am Handy seitlich in ihrer Karte scrollen statt die Seite zu verbreitern */
main .card:has(table) { overflow-x: auto; }
/* Einstellungen › Gutscheine: Link zur Kaufseite, eigenes Bild */
.link-zeile { display: flex; gap: 8px; flex-wrap: wrap; }
.link-zeile input { flex: 1 1 240px; font-weight: 500; }
.gs-bild-vorschau img { display: block; max-height: 220px; max-width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
/* Patienten: Geburtstag-Erinnerung (bleibt bis «Erledigt») */
.geburtstage { background: var(--open-tint); box-shadow: none; padding: 16px; }
.geburtstage h2 { display: flex; align-items: center; gap: 8px; color: var(--open); margin-bottom: 10px; }
.geburtstage h2 svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.geburtstage .liste { border: 0; }
.geburtstage .zeile { min-height: 56px; }
.geburtstage .titel a { color: inherit; text-decoration: none; }
.geburtstage .unter a { color: var(--accent-text); }
.geburtstage button.klein { flex: none; margin: 0; }
.gb-knopf { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--soft-ink); }
.gb-knopf:hover { background: var(--hover); }
.gb-knopf svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gb-knopf.wa { color: #1FA855; }
.geburtstage .zeile { gap: 8px; }
/* Kalender */
.kal-leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.kal-nav { display: flex; gap: 4px; }
.kal-nav button { min-width: 40px; min-height: 40px; justify-content: center; font-size: 15px; }
.kal-nav button[aria-label] { font-size: 20px; padding: 0 10px; }
.kal-titel { flex: 1; min-width: 140px; font-size: 16px; }
.segment-klein { display: flex; background: #EAEAEF; border-radius: 12px; padding: 3px; }
.segment-klein button { border: 0; background: none; min-height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 500; }
.segment-klein button.an { background: var(--card); box-shadow: var(--shadow); color: var(--accent-text); font-weight: 600; }
.kal-tag h2 { font-size: 14px; font-weight: 600; color: var(--soft-ink); margin: 14px 0 6px 4px; cursor: pointer; }
.kal-tag.heute h2 { color: var(--accent-text); }
.kal-tag .liste { margin-bottom: 0; }
.zeile.termin .zeit { flex: none; width: 58px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.zeile.termin .zeit span { font-size: 12px; color: var(--muted); }
.zeile.termin.erfasst { opacity: .75; }
.zeile.termin button.klein { flex: none; margin: 0; }
@media (min-width: 900px) {
  .woche { display: grid; grid-template-columns: repeat(var(--spalten, 7), minmax(0, 1fr)); gap: 8px; align-items: start; }   /* ausgeblendete Wochentage fallen weg */
  .woche .kal-tag h2 { margin-top: 0; }
  .woche .zeile.termin { flex-wrap: wrap; gap: 4px 8px; padding: 10px; min-height: 0; }
  .woche .zeile.termin .zeit { width: auto; flex-direction: row; gap: 6px; align-items: baseline; }
  .woche .zeile.termin .haupt { flex-basis: 100%; }
  .woche .zeile.termin .titel { font-size: 14px; } .woche .zeile.termin .unter { font-size: 12px; }
  .woche .zeile.termin button.klein { padding: 4px 10px; font-size: 12px; }
  .woche .leer { padding: 12px; text-align: center; }
}
.dauer-zeile { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.termin-aktionen { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
/* Menü mit fünf Einträgen: am Handy etwas schmaler */
@media (max-width: 899px) { .pille a, .pille button { min-width: 0; padding: 7px 9px; } }
@media (max-width: 899px) { .woche .kal-tag .liste:has(> .leer) { background: none; box-shadow: none; } .woche .kal-tag .leer { padding: 0 4px; } .woche .kal-tag h2 { margin-top: 10px; } }   /* Handy: freie Tage kompakt */
/* Anmeldeformular: eingebettet in die Webseite der Praxis ohne Kopfzeile; Feld gegen Spam-Programme unsichtbar */
body.einbetten .top { display: none; }
body.einbetten main { padding-top: 8px; padding-bottom: 24px; }
body.einbetten { background: transparent; }
.versteckt { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.haken-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.link-zeile textarea { flex: 1 1 240px; min-height: 76px; font: 12px/1.4 Menlo, Consolas, monospace; }
.zeile a.titel { color: inherit; text-decoration: none; } .zeile a.titel:hover { color: var(--accent-text); text-decoration: underline; }
/* Praxis eröffnen (Startseite praxisbuch.ch) */
body.eroeffnen main { max-width: 520px; padding-top: 28px; }
.er-marke { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--soft-ink); margin-bottom: 26px; }
.er-logo { width: 32px; height: 32px; border-radius: 8px; display: block; }
.er-seite h1 { font-size: 32px; margin-bottom: 8px; }
.er-seite .lead { color: var(--soft-ink); font-size: 17px; margin: 0 0 18px; }
.er-punkte { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.er-punkte li { display: flex; gap: 10px; align-items: flex-start; }
.er-punkte svg { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.er-seite .card > label { margin-bottom: 14px; }
.er-seite .schritte { display: flex; gap: 6px; margin-bottom: 18px; }
.er-seite .schritte i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); } .er-seite .schritte i.an { background: var(--accent); }
.er-adresse { display: flex; align-items: center; margin-top: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--card); padding-left: 12px; }
.er-adresse span { color: var(--muted); white-space: nowrap; }
.er-adresse input { border: 0; margin: 0 !important; padding-left: 2px; box-shadow: none !important; }
.er-adresse:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.feld-fehler.ok { color: var(--accent-text); }
.er-agb { align-items: flex-start; flex-wrap: nowrap; margin: 4px 0 6px; }
.er-agb input { margin-top: 3px; }
.er-fuss { text-align: center; margin-top: 18px; }
.gratis-hinweis { max-width: 980px; margin: 12px auto 0; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 14px; background: var(--accent-tint); color: var(--accent-text); font-size: 15px; }
.gratis-hinweis span { flex: 1; min-width: 180px; }
.gratis-hinweis.vorbei { background: var(--warn-tint); color: var(--warn); }
@media (max-width: 1012px) { .gratis-hinweis { margin-left: 16px; margin-right: 16px; } }
/* Seitenkopf: Titel nie abschneiden; passt ein Knopf daneben nicht mehr, rutscht er in die nächste Zeile */
.kopf h1 { flex: 1 0 auto; max-width: 100%; }
.zeile .unter .nowrap { white-space: nowrap; }
/* Bearbeiten-Dialog am Handy: Abbrechen/Speichern oben, «Patient löschen» darunter links */
@media (max-width: 520px) { #dlg-form > .row.end:has(#p-loeschen) { flex-wrap: wrap; } #dlg-form > .row.end:has(#p-loeschen) .sp { display: none; } #p-loeschen { order: 2; margin-right: auto; } }
/* Kalender «Wochen»: Raster Mo–So (endlos nach unten), Balken über die Praxiszeit zeigt Belegung und Lücken */
.vw-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.vw-wtag { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.vw-tag { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 78px; padding: 8px; border: 0; border-radius: var(--radius-s); background: var(--card); box-shadow: var(--shadow); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.vw-tag:hover { background: var(--hover); }
.vw-tag.heute { box-shadow: 0 0 0 2px var(--accent); }
.vw-tag.vorbei { opacity: .5; }
.vw-datum { font-size: 13px; font-weight: 600; }
.vw-tag.erster { background: var(--accent-tint); }   /* 1. des Monats */
.vw-tag.erster:hover { background: var(--accent-tint); filter: brightness(.98); }
.vw-monat { color: var(--accent-text); font-weight: 700; }
.vw-balken { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.vw-balken i { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.vw-zeiten { font-size: 12px; color: var(--soft-ink); line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 600px) { .vw-raster { gap: 4px; } .vw-tag { padding: 6px 4px; min-height: 64px; } .vw-zeiten { font-size: 10.5px; } .vw-datum { font-size: 12px; } }
.vw-mehr { text-align: center; margin: 16px 0 90px; }
.frei-zeile { width: 100%; border: 0; border-radius: 0; background: none; text-align: left; font: inherit; color: inherit; justify-content: flex-start; }   /* Freie Termine: ganze Zeile antippbar */
/* Kalender: geschlossene Tage (Praxistage/gesperrt) schraffiert; Modus «Tage sperren oder freigeben» */
.vw-tag.zu { background: repeating-linear-gradient(-45deg, #F2F2F5 0 6px, #E9E9EE 6px 12px); box-shadow: none; }
.vw-tag.zu .vw-zeiten { color: var(--muted); }
.vw-sperren { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.frei-minuten { gap: 8px; }   /* Freie Termine: Minuten-Knöpfe und kleines Feld für andere Längen */
.frei-minuten button.an { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-text); }
.frei-minuten input { width: 96px; min-height: 36px; }
/* Einstellungen › Kalender: Praxiszeiten pro Wochentag */
.plan { display: grid; gap: 6px; margin-top: 4px; }
.plan-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.plan-haken { display: inline-flex; gap: 6px; }
.plan-haken input { width: auto; margin: 0; }
.plan-haken span { display: inline-flex; }   /* Erklärung auch über dem gesperrten Häkchen */
.plan-tag { width: 30px; font-size: 14px; font-weight: 500; }
.plan-zeile input[type=text] { width: 76px; min-height: 36px; text-align: center; padding: 0 6px; }
.plan-zeile.zu input[type=text], .plan-zeile.zu > span:not(.plan-haken):not(.plan-tag) { opacity: .35; }
.vw-balken b { position: absolute; top: 0; bottom: 0; background: #DADAE0; }   /* geschlossene Zeit / Mittag */
.kal-kopf { flex-wrap: wrap; gap: 8px; }   /* Kalender: Knöpfe neben dem + */
.kal-knoepfe { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 600px) {   /* Praxiszeiten am Handy: ein Tag pro Zeile */
  .plan-zeile { flex-wrap: nowrap; gap: 3px; }
  .plan-haken { gap: 3px; flex: none; }
  .plan-tag { width: 24px; flex: none; font-size: 13px; }
  .plan-zeile input[type=text] { width: 47px; padding: 0 1px; font-size: 14px; }
  .plan-zeile > span.muted { display: none; }
  .plan-zeile input[data-plan=z2v] { margin-left: 4px; }
}
/* Handy: nach unten ziehen = neu laden */
.neu-laden { position: fixed; top: 0; left: 50%; z-index: 40; width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-l); display: grid; place-items: center; font-size: 22px; color: var(--muted); transform: translate(-50%, -50px); transition: color .15s; pointer-events: none; }
.neu-laden.bereit, .neu-laden.laedt { color: var(--accent-text); }
.menue-zeile { gap: 10px; user-select: none; -webkit-user-select: none; }   /* Einstellungen › Menüleiste ordnen (ziehen) */
.menue-zeile .griff { cursor: grab; touch-action: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px 8px; margin-left: -6px; }
.menue-zeile.zieht { background: var(--accent-tint); box-shadow: var(--shadow-l); position: relative; z-index: 2; }
.menue-zeile.zieht .griff { cursor: grabbing; }
.menue-zeile.unten-leiste .titel::after { content: " · in der Leiste"; color: var(--muted); font-weight: 400; font-size: 12px; }
/* Eigener Kalender bei Datumsfeldern (PC): heute = Kreis in der Hauptfarbe, gewählter Tag gefüllt */
.dp { position: fixed; z-index: 60; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-l); border: 1px solid var(--line); padding: 10px; width: 272px; }
.dp-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-kopf b { font-size: 15px; text-transform: capitalize; }
.dp-kopf button { border: 0; background: none; min-height: 32px; width: 32px; font-size: 20px; border-radius: 8px; padding: 0; }
.dp-kopf button:hover { background: var(--hover); }
.dp-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-wt { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.dp-raster button { border: 0; background: none; height: 34px; min-height: 0; padding: 0; border-radius: 50%; font-size: 14px; color: var(--ink); }
.dp-raster button:hover { background: var(--accent-tint); }
.dp-raster button.aus { color: var(--line-strong); }
.dp-raster button.heute { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); font-weight: 700; }
.dp-raster button.an { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.dp-fuss { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.dp-raster button:disabled { color: var(--line-strong); opacity: .5; cursor: default; background: none; }
.rechnung-gruppe { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }   /* Verrechnen: Krankheit/Unfall getrennt */
.pillen .rechts { margin-left: auto; }   /* Rechnungen: Verlauf (Gemailt, Gedruckt) rechts */
.klein-pillen { justify-content: flex-end; margin-top: -6px; }   /* Verlauf: Heute / 7 Tage / Alle */
.klein-pillen button { min-height: 32px; font-size: 13px; padding: 0 12px; }
.klein-pillen button { background: transparent; }
.klein-pillen .an, .klein-pillen .an:hover { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-text); }   /* untere Filter heller als die oberen */

/* ------------------------------------------------------------------ Startseite praxisbuch.ch (start.php) */
body.landing main { max-width: 1040px; padding: 0 16px 40px; }
.ld-kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1040px; margin: 0 auto; padding: 14px 16px; background: rgba(245,245,247,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ld-kopf nav { display: flex; align-items: center; gap: 14px; }
.ld-marke, a.er-marke { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-decoration: none; }
.ld-marke img { width: 34px; height: 34px; border-radius: 9px; display: block; }
a.er-marke { color: var(--soft-ink); }
.ld-link { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.ld-link:hover { color: var(--accent-text); }
.btn.gross { font-size: 16px; padding: 12px 22px; }
.btn.breit { width: 100%; justify-content: center; }
.ld-held { text-align: center; padding: 56px 0 44px; }
.ld-held h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0 auto 16px; max-width: 760px; }
.ld-lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--soft-ink); max-width: 620px; margin: 0 auto 26px; }
.ld-knoepfe { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
body.landing section { margin-bottom: 44px; }
body.landing h2 { font-size: 26px; letter-spacing: -.01em; margin: 0 0 18px; }
body.landing section > h2 { text-align: center; }
.ld-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ld-karte { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.ld-karte svg { width: 30px; height: 30px; fill: none; stroke: var(--accent-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.ld-karte h3 { font-size: 17px; margin: 0 0 6px; }
.ld-karte p { margin: 0; color: var(--soft-ink); font-size: 15px; line-height: 1.5; }
.ld-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ld-zwei .card { margin: 0; padding: 26px; }
.ld-zwei .er-punkte { margin-bottom: 0; }
.ld-preis .er-punkte { margin-bottom: 22px; }
.ld-betrag { font-size: 40px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 16px; }
.ld-betrag span { font-size: 17px; font-weight: 500; color: var(--soft-ink); letter-spacing: 0; }
.ld-fragen { max-width: 720px; margin-left: auto; margin-right: auto; }
.ld-fragen details { background: var(--card); border-radius: var(--radius-s); padding: 0 20px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ld-fragen summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ld-fragen summary::-webkit-details-marker { display: none; }
.ld-fragen summary::after { content: '+'; color: var(--accent-text); font-size: 20px; line-height: 1; }
.ld-fragen details[open] summary::after { content: '–'; }
.ld-fragen details p { margin: -4px 0 0; color: var(--soft-ink); }
.ld-fragen details[open] { padding-bottom: 18px; }
.ld-fuss { max-width: 1040px; margin: 0 auto; padding: 22px 16px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.ld-fuss a { color: var(--soft-ink); text-decoration: none; }
.ld-fuss a:hover { color: var(--accent-text); }
.ld-anmelden { max-width: 440px; margin: 48px auto 0; }
.ld-anmelden h1 { font-size: 32px; margin-bottom: 18px; }
.ld-anmelden .card > label { margin-bottom: 14px; }
.ld-anmelden .card .muted { margin: 12px 0 0; }
.ld-zentriert { text-align: center; }
@media (max-width: 760px) {
  .ld-zwei { grid-template-columns: 1fr; }
  .ld-held { padding: 32px 0 32px; }
  .ld-kopf .btn.primary { padding: 7px 14px; }
}
@media (max-width: 380px) { .ld-kopf .ld-marke { font-size: 0; gap: 0; } }

/* ------------------------------------------------------------------ Admin-Bereich (admin.php) */
body.admin main { max-width: 1100px; padding-top: 12px; }
.ad-kopf { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 18px; }
.ad-kopf h1 { margin: 0; }
.ad-login { max-width: 420px; margin: 40px auto; }
.ad-login > label, .ad-preis label { display: block; margin-bottom: 14px; }
.ad-login canvas { display: block; margin: 8px auto; max-width: 220px; }
.ad-schluessel { text-align: center; font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }
.ad-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ad-zahlen .tile { display: flex; flex-direction: column; gap: 4px; }
.ad-zahlen b { font-size: 28px; }
.ad-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ad-zwei .card { margin: 0 0 20px; }
.ad-preis input[type=number] { max-width: 160px; display: block; }
.ad-farbe { display: flex; align-items: flex-end; gap: 12px; }
.ad-farbe input[type=color] { width: 48px; height: 42px; padding: 2px; margin-bottom: 14px; cursor: pointer; }
.ad-farbe label { flex: 1; max-width: 180px; }
.ad-tabelle { overflow-x: auto; }
.ad-tabelle td { vertical-align: top; }
.ad-stand { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--line); color: var(--soft-ink); }
.ad-stand.zahlt { background: var(--ok-tint); color: var(--accent-text); }
.ad-stand.gratis { background: #FFF4CC; color: #8A6D00; }
.ad-stand.lesen { background: #FDE2E1; color: #B42318; }
.ad-stand.gekuendigt { background: #FDEBD8; color: #B45309; }
.ok-meldung { background: var(--ok-tint); color: var(--accent-text); padding: 10px 14px; border-radius: var(--radius-s); }
.ad-passkey-neu { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.ad-passkey-neu label { flex: 1; min-width: 180px; }
.ad-pk-login { margin-top: 10px; }
.abo-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.abo-kopf h2 { margin: 0 6px 0 0; }
.ad-kopf-klein { margin: 0 0 10px; }
.ad-kopf-klein h2 { margin: 0; }
/* Praxisbuch-Symbol, solange die Praxis kein eigenes Logo hat */
.brand-mark.brand-icon { background: none; display: block; object-fit: cover; }
.brand-mark.brand-icon[hidden] { display: none; }
.ld-bald { cursor: default; color: var(--muted); border-style: dashed; background: transparent; }
