/* Kopf eines Screens: Titel links, Aktion rechts */
.page-head { display: flex; align-items: center; gap: var(--gap); margin-bottom: var(--pad); }
.page-head h1 { flex: 1; }
.back { font-size: 15px; }

.btn {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
}
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn-danger { color: var(--danger); }
.icon-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  font-size: 22px; line-height: 1;
  cursor: pointer;
}

.field { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.field input:not([type="checkbox"]), .field textarea, .search {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 11px 12px;
  /* unter 16px zoomt iOS Safari beim Fokus hinein */
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus, .search:focus { outline: none; border-color: var(--gold); }
.field-check { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text); margin: 8px 0; }
.field-check input { width: 20px; height: 20px; accent-color: var(--gold); }
.field-error { min-height: 18px; margin-bottom: 6px; font-size: 13px; color: var(--danger); }
.search { margin: 0 0 var(--pad); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: var(--pad); scrollbar-width: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chip.is-active { border-color: var(--gold); background: var(--gold); color: var(--on-gold); font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: var(--gap);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 14px; color: var(--muted); }
.row-end { color: var(--gold-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-dimmed { opacity: .45; }

.card { padding: var(--pad); margin-bottom: var(--gap); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-label { margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.tag { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: var(--gap); }
.stat { padding: 12px 8px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-value { font-size: 17px; font-weight: 600; color: var(--gold-strong); font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 2px; font-size: 12px; color: var(--muted); }
.section-title { margin: 20px 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.btn-block { display: block; width: 100%; margin-bottom: var(--gap); text-align: center; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tile {
  display: flex; align-items: flex-end;
  min-height: 96px;
  padding: var(--pad);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
}

.brand { padding: 28px 0 32px; text-align: center; font-family: var(--font-brand); color: var(--gold); }
.brand-small { font-size: 13px; letter-spacing: .5em; }
.brand-name { font-size: 30px; letter-spacing: .28em; }

.avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--gold); }
div.avatar { display: flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 600; }
.avatar-sm { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 96px; height: 96px; font-size: 30px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
/* display: flex würde das hidden-Attribut sonst überstimmen */
.tabbar[hidden] { display: none; }
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.tab.is-active { color: var(--gold); }
.tab-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dialog {
  width: min(520px, 94vw);
  padding: var(--pad);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog-text { margin: 0 0 var(--pad); color: var(--muted); }
.dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.spacer { flex: 1; }

.toasts {
  position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  z-index: 10;
}
.toast { max-width: 92vw; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.toast-error { border-color: var(--danger); color: var(--danger); }

/* Übersicht zum Vorzeigen: füllt das Display, große Schrift */
.summary { width: min(560px, 100vw); max-width: 100vw; min-height: min(640px, 100dvh); display: flex; flex-direction: column; padding: 28px 20px; }
.summary:not([open]) { display: none; }
.summary-title { margin: 0; font-family: var(--font-brand); font-size: 26px; font-weight: 400; letter-spacing: .06em; color: var(--gold); text-align: center; }
.summary-subtitle { margin: 6px 0 0; text-align: center; color: var(--muted); }
.summary-lines { flex: 1; list-style: none; margin: 28px 0 0; padding: 0; }
.summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--gap); padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 19px; }
.summary-label { min-width: 0; overflow-wrap: anywhere; }
.summary-value { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--gold); font-size: 28px; font-weight: 600; color: var(--gold-strong); }
.summary-actions { display: flex; gap: var(--gap); margin-top: 28px; }
.summary-actions .btn { flex: 1; padding: 14px 16px; font-size: 17px; }
.summary-footnote { margin: 18px 0 0; padding: 12px; text-align: center; font-size: 17px; color: var(--text); background: var(--surface-2); border-radius: var(--radius-sm); }
.summary-action { margin: 18px 0 0; padding: 14px 16px; font-size: 17px; border-color: var(--gold); color: var(--gold-strong); }
.summary-extra { list-style: none; margin: 10px 0 0; padding: 0; }
.summary-extra-line { display: flex; justify-content: space-between; gap: var(--gap); padding: 4px 0; font-size: 16px; color: var(--muted); }
.summary-choice { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); margin-top: 18px; }
.summary-choice-label { color: var(--muted); }
.summary-chips { margin-bottom: 0; }
.summary-chips .chip { padding: 9px 18px; font-size: 16px; }
/* Frei wählbarer Salonname: darf umbrechen, statt aus dem Bild zu laufen */
.brand-salon { font-size: clamp(22px, 7vw, 30px); letter-spacing: .12em; text-transform: uppercase; overflow-wrap: anywhere; text-wrap: balance; }
.reminder-hint { margin: 4px 0 var(--gap); font-size: 14px; color: var(--muted); }
.reminder-row .btn { flex: none; }
