:root {
  --green: #3b4d36; --green-dark: #2c3a29; --green-soft: #e4eadf; --cream: #f5f4ee; --white: #fff;
  --ink: #1c2119; --muted: #5e665a; --line: #d8dacf; --warn: #9a5a1e; --warn-soft: #f5e9d8; --red: #a23b2e; --red-soft: #f6e3e0; --ok: #3b6b3f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--green); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; margin-top: 1.4rem; } h3 { font-size: 1rem; }
p { margin: .4rem 0 .8rem; }
.muted { color: var(--muted); } .small { font-size: .88rem; }

.top { background: var(--green); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.brand .mark { font-weight: 800; letter-spacing: .22em; font-size: 1.15rem; }
.brand .sub { opacity: .85; font-size: .9rem; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .92rem; opacity: .9; }
.nav a:hover, .nav a.on { background: rgba(255,255,255,.14); opacity: 1; }
main.wrap { padding-top: 22px; padding-bottom: 60px; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 18px 0; }
.foot a { margin-right: 14px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.service { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: border-color .15s; }
.service:hover { border-color: var(--green); }
.service .name { font-weight: 700; font-size: 1.05rem; }
.service .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .92rem; margin-top: auto; }
.service .price { color: var(--ink); font-weight: 700; }

.cols { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } .sticky { position: static !important; } }
.sticky { position: sticky; top: 14px; }

.days { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.day { flex: 0 0 auto; text-align: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); min-width: 62px; line-height: 1.2; }
.day small { display: block; color: var(--muted); font-size: .75rem; }
.day.on { background: var(--green); color: #fff; border-color: var(--green); } .day.on small { color: #dfe6da; }
.day.off { opacity: .4; }
.daynav { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slots input { position: absolute; opacity: 0; width: 0; height: 0; }
.slots label { display: block; text-align: center; padding: 9px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-variant-numeric: tabular-nums; }
.slots input:checked + label { background: var(--green); color: #fff; border-color: var(--green); }
.slots input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 2px; }

label.f { display: block; font-size: .9rem; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=color], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
input[type=color] { padding: 2px; height: 42px; }
textarea { min-height: 80px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin: 12px 0; }
.check input { margin-top: 4px; flex: 0 0 auto; }
.btn { display: inline-block; background: var(--green); color: #fff; border: 0; border-radius: 8px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-dark); }
.btn.wide { width: 100%; }
.btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 7px 12px; font-size: .88rem; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; border-left: 4px solid var(--warn); background: var(--warn-soft); }
.alert.ok { border-color: var(--ok); background: var(--green-soft); }
.alert.err { border-color: var(--red); background: var(--red-soft); }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.grey { background: #eceee8; color: var(--muted); }

.sum dl { margin: 0; } .sum dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 10px; } .sum dd { margin: 0; font-weight: 600; }
.total { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; display: flex; justify-content: space-between; font-weight: 700; }

table { border-collapse: collapse; width: 100%; font-size: .93rem; background: #fff; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }

/* Admin Tagesansicht */
.cal { display: grid; gap: 12px; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
@media (max-width: 700px) { .cal { grid-template-columns: 1fr; } }
.col { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.col h3 { padding: 10px 12px; margin: 0; border-bottom: 4px solid var(--green); font-size: .95rem; display: flex; justify-content: space-between; }
.col h3 span { color: var(--muted); font-weight: 400; font-size: .85rem; }
.appt { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.appt:hover { background: var(--cream); }
.appt .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt .who { font-weight: 600; } .appt .what { color: var(--muted); font-size: .88rem; }
.appt.done { opacity: .75; } .appt.x { opacity: .55; text-decoration: line-through; }
.block { padding: 8px 12px; background: #eceee8; color: var(--muted); font-size: .85rem; border-bottom: 1px solid var(--line); }
.empty { padding: 20px 12px; color: var(--muted); font-size: .9rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kpi b { display: block; font-size: 1.3rem; } .kpi span { color: var(--muted); font-size: .82rem; }
.events { font-size: .85rem; color: var(--muted); } .events li { margin: 2px 0; }
