/* CHEX · Formulare, Schalter, Buttons, Listen, Kontostand. */
/* ---------- Formulare ---------- */
label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 6px 4px; color: var(--text-2); }
.field { margin-bottom: 14px; }
input:not([type=checkbox]), select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 17px; color: var(--text);
  background-color: var(--fill-2); border: 0; border-radius: 12px;
  -webkit-appearance: none; appearance: none;
  transition: box-shadow .25s var(--ease), background-color .25s;
}
select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
input:focus, select:focus, textarea:focus {
  outline: none; background-color: var(--bg-elev);
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 5px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.row > .btn { flex: 0 0 auto; }

/* iOS-Schalter */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; cursor: pointer;
  width: 51px; height: 31px; margin: 0; border-radius: 980px; background: var(--fill-3);
  transition: background .3s var(--ease);
}
input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16);
  transition: transform .4s var(--spring);
}
input[type=checkbox]:checked { background: #34c759; }
input[type=checkbox]:checked::after { transform: translateX(20px); }
input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; }
.check.small { font-size: 13px; color: var(--text-2); }
.check.small input[type=checkbox] { width: 40px; height: 24px; }
.check.small input[type=checkbox]::after { width: 20px; height: 20px; }
.check.small input[type=checkbox]:checked::after { transform: translateX(16px); }

/* Wochentage als Chips */
.weekdays { display: flex; flex-wrap: wrap; gap: 8px; }
.weekdays label {
  margin: 0; min-width: 48px; padding: 9px 14px; border-radius: 980px; text-align: center; cursor: pointer;
  background: var(--fill-2); color: var(--text); font-size: 15px; font-weight: 600;
  transition: background .25s var(--ease), color .25s, transform .3s var(--spring);
}
.weekdays label:active { transform: scale(.94); }
.weekdays label:has(input:checked) { background: var(--accent-bg); color: #fff; }
.weekdays input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 12px 22px; border: 0; border-radius: 980px;
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -.01em; text-decoration: none;
  background: var(--fill); color: var(--accent); cursor: pointer;
  -webkit-user-select: none; user-select: none;
  transition: transform .3s var(--spring), background .2s, opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.95); transition-duration: .1s; }
.btn.primary { background: var(--accent-bg); color: #fff; }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.ok { background: var(--green-soft); color: var(--green); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--sep); }
@media (hover: hover) {
  .btn.primary:hover { background: var(--accent-bg-hover); }
  .btn:not(.primary):hover { background-color: var(--fill-3); }
}
.btn.small { min-height: 34px; padding: 6px 15px; font-size: 15px; }
.btn.lg { min-height: 54px; font-size: 17px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .38; cursor: default; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--accent); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--fill-2); color: var(--text-2); font-size: 14px; cursor: pointer; transition: background .2s, transform .3s var(--spring);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn:disabled { opacity: .35; }

/* ---------- Listen (gruppiert) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 13px 18px; transition: background .2s; }
.list > li + li::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: .5px; background: var(--sep); }
@media (hover: hover) { .list > li:has(> a.grow):hover { background: var(--fill-2); } }
.list .grow { flex: 1; min-width: 0; }
.list a.grow { color: var(--text); }
.list .sub { margin-top: 1px; font-size: 14px; color: var(--text-2); }
.list > li.pax { flex-wrap: wrap; }
.pax .btn-row:not(:empty) { flex-basis: 100%; align-items: center; }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.neg { color: var(--green); }
.amount.pos { color: var(--red); }

/* ---------- Kontostand ---------- */
.balance-card .eyebrow { margin-bottom: 2px; }
.balance { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 2px 0 8px; }
.balance.owe { color: var(--red); }
.balance.ok { color: var(--green); }
