/* Hotel HBS – Buchungsseite & Verwaltung. Keine externen Schriften oder Ressourcen (DSGVO). */
:root {
  --green: #1f3a34;
  --green-2: #2c5148;
  --brass: #a9803c;
  --brass-dark: #8a6628;
  --cream: #f6f2ea;
  --paper: #ffffff;
  --ink: #26221e;
  --muted: #6d655c;
  --line: #e2dbcf;
  --ok: #1e6b45;
  --ok-bg: #e5f3ea;
  --warn: #8a5a00;
  --warn-bg: #fdf1d3;
  --err: #a12a22;
  --err-bg: #fbe6e3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(38, 34, 30, .06), 0 6px 20px rgba(38, 34, 30, .06);
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--cream); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--green-2); text-underline-offset: 2px; }
a:hover { color: var(--brass-dark); }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .92em; background: #f0ebe1; padding: .1em .35em; border-radius: 4px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lead { font-size: 1.1rem; color: #453f38; max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--brass-dark); font-weight: 600; margin-bottom: .6em; }
.crumbs { font-size: .9rem; margin-bottom: .6em; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8em; background: #ece5d8; padding: .1em .45em; border-radius: 6px; white-space: nowrap; }
.h-sub { font-family: var(--sans); font-size: .95rem; font-weight: 400; margin-left: .4em; }
.error-text { color: var(--err); }

/* ---------- Testbanner ---------- */
.testbar { background: #3a2f12; color: #fbe9b7; text-align: center; font-size: .85rem; padding: 6px 12px; letter-spacing: .01em; }

/* ---------- Kopf / Fuß ---------- */
.site-header { background: var(--green); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--brass); color: #e7cf9c; display: grid; place-items: center; font-family: var(--serif); font-size: 1.25rem; flex: none; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.15; }
.brand small { display: block; font-size: .78rem; opacity: .75; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { color: #e9efe9; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.main-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.main-nav a.on { background: rgba(255, 255, 255, .14); color: #fff; }
.site-footer { background: #1a2f2a; color: #c9d3cd; font-size: .9rem; padding: 28px 0; }
.site-footer a { color: #e7cf9c; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }

/* ---------- Karten ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.narrow { max-width: 620px; }
.center-box { margin: 40px auto; text-align: center; }
.empty { color: var(--muted); margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin: 0; }
.prose h2 { margin-top: 1.2em; }

/* ---------- Schaltflächen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--green); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--green-2); color: #fff; }
.btn-accent { background: var(--brass); }
.btn-accent:hover { background: var(--brass-dark); }
.btn-secondary { background: #fff; color: var(--green); border-color: #b9c4bd; }
.btn-secondary:hover { background: #eef2ee; color: var(--green); }
.btn-danger { background: #fff; color: var(--err); border-color: #dfb1ac; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); }
.btn-small { min-height: 34px; padding: 5px 12px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-2); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; min-height: 44px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #c9c0b2; border-radius: 8px;
}
input:disabled { background: #f2eee7; color: var(--muted); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--green); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.form h2 { margin-top: .4em; }
.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filter-bar label { flex: 1 1 150px; margin-bottom: 0; }
.filter-bar .btn { flex: none; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 220px; margin-bottom: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.choice { position: relative; margin: 0; font-weight: 600; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid #c9c0b2; border-radius: 8px; background: #fff; }
.choice input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }

/* ---------- Hinweise / Tags ---------- */
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.alert-ok { background: var(--ok-bg); border-color: #b5dcc4; color: #154d32; }
.alert-warn { background: var(--warn-bg); border-color: #ecd391; color: #5f3f00; }
.alert-error { background: var(--err-bg); border-color: #efbdb7; color: #7c1f19; }
.alert.big { font-size: 1.02rem; padding: 16px 18px; }
.alert.big strong { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 2px; }
.alert.big .small { display: block; margin-top: 6px; }
.secret { font-size: 1.1rem; background: #fff; padding: .2em .5em; user-select: all; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #ece5d8; color: #4d463d; white-space: nowrap; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-off { background: var(--err-bg); color: var(--err); }

/* ---------- Startseite ---------- */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 36px; }
.hero-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.search-card { margin: 0; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 28px; }
.room-card { padding: 0; overflow: hidden; margin: 0; }
.room-body { padding: 16px; }
.room-body p { font-size: .93rem; }
.meta { color: var(--muted); font-size: .9rem; margin: 0; }
.room-art { height: 120px; background: linear-gradient(135deg, #2c5148, #6f8f7c); position: relative; }
.room-art::after { content: ''; position: absolute; inset: auto 18px 0 18px; height: 46px; border-radius: 8px 8px 0 0; background: rgba(255, 255, 255, .22); }
.art-2 { background: linear-gradient(135deg, #7a5a2a, #c9a468); }
.art-3 { background: linear-gradient(135deg, #47586b, #9fb0bf); }
.art-4 { background: linear-gradient(135deg, #5b3340, #b98a8f); }
.promo { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: #fbf7ee; }
.promo h2 { margin-bottom: .2em; }
.promo p { margin: 0; }

/* ---------- Zimmerbilder ---------- */
.room-img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; background: #e9e2d5; }
.side-img { border-radius: 8px; margin-bottom: 16px; }
.thumb { display: block; width: 96px; height: 60px; object-fit: cover; border-radius: 6px; background: #e9e2d5; }
.room-preview { display: block; width: 100%; max-width: 360px; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 8px; margin-bottom: 8px; background: #e9e2d5; }
input[type=file] { display: block; width: 100%; margin-top: 5px; padding: 9px 10px; font: inherit; background: #fff; border: 1px dashed #b8ad9c; border-radius: 8px; }

/* ---------- Rollen ---------- */
.perm-list { display: grid; gap: 2px; }
.perm { padding: 9px 10px; border-radius: 8px; margin: 0; }
.perm:hover { background: #f7f3ea; }
.perm strong, .perm .muted { display: block; }

/* ---------- Suchergebnisse ---------- */
.result { display: grid; grid-template-columns: 220px 1fr auto; gap: 18px; padding: 0; overflow: hidden; align-items: stretch; }
.result .room-img { height: 100%; min-height: 140px; aspect-ratio: auto; }
.result-body { padding: 18px 0; }
.result-body h2 { margin-bottom: .3em; }
.result-body p { font-size: .95rem; margin-bottom: .5em; }
.result-side { padding: 18px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; text-align: right; min-width: 170px; border-left: 1px solid var(--line); }
.price { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.result.is-off { opacity: .7; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; min-height: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--green); color: var(--green); background: #fff; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
a.slot:hover { background: var(--green); color: #fff; }
.slot-off { border-color: var(--line); color: #a39a8e; background: #f4f0e8; text-decoration: line-through; }

/* ---------- Checkout ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.two-col.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col > * { min-width: 0; }
.facts { margin: 0 0 14px; }
.facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0eae0; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.totals { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.totals td { padding: 6px 0; }
.totals .discount td { color: var(--ok); }
.totals .grand td { border-top: 2px solid var(--ink); font-weight: 700; font-size: 1.1rem; padding-top: 10px; }
.voucher-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.voucher-form label { flex: 1; margin: 0; }
.voucher-applied { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--ok-bg); color: #154d32; border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; font-size: .93rem; }
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 18px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #ebe4d7; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-weight: 700; font-size: .78rem; }
.steps li.on { background: var(--green); color: #fff; }
.steps li.on::before { color: var(--green); }
.steps li.done { background: var(--ok-bg); color: var(--ok); }
.steps li.done::before { content: '✓'; }
.voucher-ticket { margin-top: 12px; border: 2px dashed var(--brass); border-radius: 10px; padding: 16px; text-align: center; background: #fbf7ee; display: grid; gap: 4px; }
.voucher-ticket strong { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: .08em; user-select: all; }
.voucher-ticket span { color: var(--muted); font-size: .9rem; }

/* ---------- Test-Zahlungsseite ---------- */
.paybox { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; }
.pay-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.pay-head strong { display: block; font-size: 1.15rem; letter-spacing: .02em; }
.pay-head span { color: var(--muted); font-size: .85rem; }
.pay-amount { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.testcards { background: #f7f3ea; border-radius: 8px; padding: 12px; margin-bottom: 10px; display: grid; gap: 6px; }
.testcards p { margin: 0 0 2px; }
.testcard { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; min-height: 44px; padding: 8px 12px; background: #fff; border: 1px solid #d6cdbd; border-radius: 8px; font: inherit; cursor: pointer; text-align: left; }
.testcard:hover { border-color: var(--green); }
.testcard code { background: none; padding: 0; font-size: .95rem; }
.testcard span { font-size: .85rem; font-weight: 600; }
.testcard.ok span { color: var(--ok); }
.testcard.bad span { color: var(--err); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 10px; border-bottom: 1px solid #f0eae0; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline-block; margin-left: 4px; }
.pager { display: flex; justify-content: center; gap: 16px; padding-top: 14px; font-size: .92rem; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; background: #f7f3ea; padding: 14px; border-radius: 8px; font-size: .9rem; margin: 0; }

/* ---------- Verwaltung ---------- */
body.admin { background: #f1eee8; }
.admin-header { background: var(--green); color: #fff; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.admin-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-user a { color: #fff; }
.admin-nav { display: flex; gap: 2px; padding: 0 14px; overflow-x: auto; background: #18302b; }
.admin-nav a { color: #cfd9d3; text-decoration: none; padding: 11px 12px; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.admin-nav a:hover { color: #fff; }
.admin-nav a.on { color: #fff; border-bottom-color: var(--brass); }
.admin-nav .nav-site { margin-left: auto; }
.admin-main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; font-size: .8rem; color: var(--muted); }
.stat strong { font-family: var(--serif); font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.stat small { font-family: var(--sans); font-size: .82rem; font-weight: 400; color: var(--muted); }
.login-card { max-width: 400px; margin: 8vh auto 0; }
.login-card .brand { color: var(--green); margin-bottom: 18px; }
.login-card .brand-mark { color: var(--brass-dark); }
.side h2:not(:first-child) { margin-top: 1.2em; }
.side form + form { margin-top: 12px; }
.sync-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sync-form p { margin: 8px 0 0; }

/* ---------- Mobil ---------- */
@media (max-width: 800px) {
  .two-col, .two-col.even { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr; gap: 0; }
  .result .room-img { height: auto; min-height: 0; aspect-ratio: 8 / 4; }
  .result-body { padding: 16px 16px 0; }
  .result-side { align-items: stretch; text-align: left; border-left: 0; padding: 12px 16px 16px; }
  .result-side .tag { align-self: flex-start; }
  .facts > div { grid-template-columns: 105px 1fr; }
  .admin-main { padding: 18px 14px 48px; }
  .voucher-form { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header, .site-footer, .testbar, .btn, .admin-header { display: none !important; } body { background: #fff; } }
