/* CampSystem – Oberfläche. Farben und Schrift aus dem Markenpaket. */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('/static/fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('/static/fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/static/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }

:root {
  --green: #0F3D2E; --green-2: #1B5641; --green-tint: #E8EFEB;
  --gold: #C4A263; --gold-text: #8A6A22; --gold-tint: #F5EEDD;
  --creme: #F6F4EA; --bg: #F7F7F4; --white: #FFFFFF;
  --text: #1D2320; --muted: #5C6560; --line: #E2E4DF; --line-2: #EEF0EC;
  --short: #DCEAF7; --short-text: #173F66;
  --seasonal: #E3ECE6; --seasonal-text: #0F3D2E;
  --option: #FBEACB; --option-text: #6B4708;
  --danger: #A32D2D; --danger-tint: #FCEBEB; --ok: #2F6B4F; --ok-tint: #E5F4E4;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Montserrat', system-ui, sans-serif; font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--green); }
a:hover { color: var(--green-2); }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
h2 { font-size: 15px; color: var(--muted); margin: 20px 0 8px; }
h3 { font-size: 16px; margin-bottom: 10px; }
.big { font-size: 22px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* Grundgerüst */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--white); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: block; padding: 4px 8px 6px; }
.brand img { display: block; width: 170px; height: auto; }
.tenant { padding: 0 10px 14px; font-size: 12px; color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: #46504B; font-weight: 500; }
.sidebar nav a:hover { background: var(--bg); color: var(--text); }
.sidebar nav a.on { background: var(--green-tint); color: var(--green); font-weight: 600; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.me-name { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 8px; }
.me-name small { display: block; color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 17px; background: var(--green); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.me form { padding: 0 8px; }
.main { flex: 1; min-width: 0; padding: 20px 28px 40px; max-width: 1400px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; flex: 1; min-width: 0; }
.topbar-logo { display: none; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabbar { display: none; }

/* Bedienelemente */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid #CBD0CA; background: var(--white); color: var(--text); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); color: var(--text); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--white); font-weight: 600; }
.btn.primary:hover { background: var(--green-2); color: var(--white); }
.btn.danger { color: var(--danger); border-color: #E7B9B9; }
.btn.big { min-height: 52px; font-size: 16px; }
.btn.icon { width: 44px; padding: 0; }
.btn.wide { width: 100%; margin-top: 16px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
.link.danger { color: var(--danger); }
.ic { flex-shrink: 0; }
input, select, textarea { font: inherit; color: var(--text); background: var(--white); border: 1px solid #CBD0CA; border-radius: 8px; min-height: 44px; padding: 8px 12px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: #3E4743; }
label.block-label { display: block; font-size: 14px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; }
label.inline input, label.inline select { width: auto; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; font-size: 14px; }
label.check input { width: 20px; min-height: 20px; height: 20px; }
.checks { display: flex; gap: 24px; flex-wrap: wrap; margin: 4px 0 12px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.compact { gap: 6px; margin-top: 6px; }
.grid2, .grid3 { display: grid; gap: 12px; margin-bottom: 12px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid3.compact { align-items: end; margin-top: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; grid-column: 1 / -1; }
form.inline { display: inline; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.narrow { max-width: 560px; }
.card.form { max-width: 980px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--ok-tint); color: #1E4D33; }
.flash.error { background: var(--danger-tint); color: #7A1F1F; }
.note { background: var(--gold-tint); border-radius: 8px; padding: 10px 12px; white-space: pre-line; }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: #46504B; white-space: nowrap; }
.pill.confirmed { background: var(--short); color: var(--short-text); }
.pill.option { background: var(--option); color: var(--option-text); }
.pill.checkedin { background: var(--ok-tint); color: #1E4D33; }
.pill.done { background: var(--line-2); color: var(--muted); }
.pill.cancelled { background: var(--danger-tint); color: var(--danger); }
.pill.seasonal { background: var(--seasonal); color: var(--seasonal-text); }
.pill.power { background: var(--gold-tint); color: var(--gold-text); }
.pill.water { background: var(--short); color: var(--short-text); }
.pill.gas { background: var(--option); color: var(--option-text); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* Listen und Tabellen */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { width: auto; }
.toolbar .range { padding: 0 6px; }
.search { flex-direction: row; align-items: center; gap: 8px; background: var(--white); border: 1px solid #CBD0CA; border-radius: 8px; padding: 0 12px; flex: 1; min-width: 220px; max-width: 460px; }
.search input { border: 0; padding: 8px 0; min-height: 42px; }
.search input:focus { outline: 0; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFAF8; white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr[data-href]:hover { background: #FAFAF8; }
.table tr:last-child td { border-bottom: 0; }
.row-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 10px 14px; margin-bottom: 8px; text-decoration: none; color: inherit; }
.row-main { min-width: 0; text-decoration: none; color: inherit; flex: 1; display: flex; flex-direction: column; }
.row-main small { color: var(--muted); font-size: 13px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
dl.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0 0 10px; }
dl.facts dt { font-size: 12px; color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }

/* Heute */
.dayswitch { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dayswitch-label { display: flex; flex-direction: column; padding: 0 8px; }
.dayswitch-label small { color: var(--muted); font-size: 12px; }
.dayswitch-label strong { font-size: 18px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; max-width: 760px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 26px; }
.kpi small { font-size: 12px; color: var(--muted); }

/* Belegungsplan */
.plan-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.plan { min-width: calc(90px + var(--days) * 56px); }
.plan-head, .plan-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); }
.plan-head { position: sticky; top: 0; z-index: 3; background: #FAFAF8; border-bottom: 1px solid var(--line); }
.plan-pitch { padding: 0 12px; display: flex; align-items: center; font-weight: 600; font-size: 13px; position: sticky; left: 0; background: inherit; z-index: 2; border-right: 1px solid var(--line-2); }
.plan-row .plan-pitch { background: var(--white); }
.plan-head .plan-pitch { font-weight: 500; color: var(--muted); font-size: 12px; background: #FAFAF8; }
.plan-days, .plan-cells { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); position: relative; }
.plan-day { padding: 9px 2px; text-align: center; font-size: 12px; color: var(--muted); border-left: 1px solid var(--line-2); white-space: nowrap; }
.plan-day.we { background: #F3F3EE; }
.plan-day.today { background: var(--green-tint); color: var(--green); font-weight: 600; }
.plan-row { border-bottom: 1px solid var(--line-2); height: 42px; }
.plan-area { background: var(--creme); border-bottom: 1px solid var(--line); height: 30px; }
.plan-area span { position: sticky; left: 0; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .4px; }
.plan-cell { border-left: 1px solid var(--line-2); display: block; }
.plan-cell.we { background: #FAFAF6; }
.plan-cell.today { background: #F1F6F2; }
a.plan-cell:hover { background: var(--gold-tint); }
.bar { position: absolute; top: 6px; height: 30px; border-radius: 6px; padding: 0 8px; display: flex; align-items: center; font-size: 12px; font-weight: 600; text-decoration: none; overflow: hidden; z-index: 1; }
.bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.short { background: var(--short); color: var(--short-text); }
.bar.seasonal { background: var(--seasonal); color: var(--seasonal-text); border-left: 3px solid var(--gold); }
.bar.option { background: var(--option); color: var(--option-text); }
.bar:hover { filter: brightness(0.96); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: #46504B; margin-top: 10px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw.short { background: var(--short); } .sw.seasonal { background: var(--seasonal); border-left: 3px solid var(--gold); } .sw.option { background: var(--option); }
.show-sm { display: none !important; }
.pad { padding: 16px; }

/* Buchung */
.booking-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.booking-head h2 { margin: 2px 0 8px; color: var(--text); }
.booking-head h2 a { text-decoration: none; color: inherit; }
.booking-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.guest-picker .picked { display: flex; align-items: center; gap: 16px; padding: 10px 12px; background: var(--green-tint); border-radius: 8px; margin-bottom: 8px; }
.suggest { list-style: none; margin: 4px 0 10px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--white); max-width: 520px; }
.suggest:empty { display: none; }
.suggest li button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 10px 12px; font: inherit; cursor: pointer; }
.suggest li button:hover { background: var(--bg); }
.suggest small { color: var(--muted); }

/* Zähler */
.meter-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 8px; min-width: 200px; }
.progress span { display: block; height: 100%; background: var(--green); }
.reader { max-width: 520px; }
.reader-progress { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.reader-pitch { display: flex; justify-content: space-between; align-items: center; }
input.reading { font-size: 28px; font-weight: 600; min-height: 64px; border: 2px solid var(--green); letter-spacing: 0.5px; }
.reading-info { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #46504B; }
.reading-info strong { color: var(--ok); }
.reading-info strong.warn { color: var(--danger); }

/* Mehr (Smartphone) */
.more-list { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.more-list a { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--text); font-weight: 500; }
.more-list a:last-child { border-bottom: 0; }
.inline-details { display: inline-block; margin-left: 10px; }
.inline-details summary { list-style: none; display: inline; }
.logout-mobile { display: none; margin-top: 16px; }

/* Anmeldung */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--creme); }
.login-card { background: var(--white); border-radius: 16px; padding: 32px 28px; width: 100%; max-width: 400px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border: 1px solid var(--line); }
.login-logo { display: block; margin: 0 auto 24px; width: 220px; height: auto; }

/* Preise und Rechnungen */
/* zwei Kennzahlen */
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.mt { margin-top: 18px; }
.num { text-align: right; }
.warn { color: var(--danger) !important; }
.table.lines td, .table.lines th { padding: 8px 10px; }
.table.lines tr.sum td { font-weight: 600; border-top: 1.5px solid var(--text); font-size: 16px; }
.table.lines tr.sub td { color: var(--muted); font-size: 13px; border-bottom: 0; padding-top: 2px; padding-bottom: 2px; }
.table-scroll { overflow-x: auto; }
.add-line { margin-top: 14px; }
.add-line summary { list-style: none; display: inline-flex; }
.add-line summary::-webkit-details-marker { display: none; }
.add-line[open] summary { margin-bottom: 10px; }
.price-list { display: flex; flex-direction: column; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 84px auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.price-row.head { font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 0; }
.price-row.off { opacity: .55; }
.price-name { display: flex; flex-direction: column; gap: 4px; }
.price-name small { font-size: 12px; }
.price-flags { display: flex; gap: 12px; white-space: nowrap; }
.table th.num { text-align: right; }
.mini { min-height: 34px; padding: 4px 8px; width: auto; max-width: 260px; font-size: 13px; }
.inline-mini { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.inline-mini input { width: 60px; }
.show-sm-label { display: none; }
li.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

/* Tablet */
@media (max-width: 1100px) {
  .sidebar { width: 76px; padding: 14px 8px; }
  .brand img { width: 44px; height: 50px; object-fit: cover; object-position: left center; }
  .tenant, .sidebar nav a span, .me-name > span:last-child, .me form { display: none; }
  .sidebar nav a { justify-content: center; padding: 12px; }
  .me-name { justify-content: center; padding: 4px; }
  .main { padding: 18px 20px 40px; }
}

/* Smartphone */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .sidebar { display: none; }
  .main { padding: 12px 14px 96px; }
  .topbar { margin-bottom: 12px; position: sticky; top: 0; background: var(--bg); z-index: 5; padding: 6px 0; }
  .topbar h1 { font-size: 20px; }
  .topbar-logo { display: block; }
  .topbar-actions .btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font-size: 11px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .tabbar a.on { color: var(--green); font-weight: 600; }
  .cols, .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { gap: 8px; }
  .kpi { padding: 10px; text-align: center; }
  .kpi strong { font-size: 22px; }
  .kpi small { display: none; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline-flex !important; }
  .plan { min-width: calc(56px + var(--days) * 64px); }
  .plan-head, .plan-row { grid-template-columns: 56px minmax(0, 1fr); }
  .plan-pitch { padding: 0 8px; }
  .toolbar label.block-label { display: block; font-size: 14px; }
label.inline { display: none; }
  .search { min-width: 0; max-width: none; flex-basis: 100%; }
  .card { padding: 14px; }
  .dayswitch-label strong { font-size: 16px; }
  .table th, .table td { padding: 10px; }
  .logout-mobile { display: block; }
  .form-actions { position: sticky; bottom: 70px; background: var(--white); padding: 8px 0; }
  .price-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-row .price-name { grid-column: 1 / -1; }
  .price-row .price-flags { grid-column: 1 / -1; }
  .price-row > .btn { grid-column: 1 / -1; }
  .table.lines td, .table.lines th { padding: 8px 4px; font-size: 14px; }
  .table.lines td.num { padding-left: 8px; }
  .show-sm-label { display: block; font-size: 12px; color: var(--muted); }
}
