*,*::before,*::after{box-sizing:border-box}
:root{--bp-dark:#2b2b2b;--bp-dark2:#1f1f1f;--bp-red:#8c1b1b;--bp-red2:#6f1414;--bp-bg:#f5f5f5;--bp-card:#fff;--bp-text:#111;--bp-muted:#666;--bp-border:#d6d6d6}

body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;margin:0;background:var(--bp-bg);color:#111}
header{background:linear-gradient(180deg,var(--bp-dark),var(--bp-dark2));color:#fff;padding:16px}
.container{max-width:980px;margin:0 auto;padding:16px}
.card{background:#fff;color:#111;border-radius:12px;padding:16px;margin:12px 0;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
label{font-size:13px;color:#333;display:block;margin-bottom:6px}
input,select,textarea{width:100%;padding:10px;border:1px solid var(--bp-border);border-radius:10px;font-size:14px}
input[type="checkbox"],input[type="radio"]{width:auto;padding:0;}

button{background:var(--bp-red);color:#fff;border:0;border-radius:12px;padding:12px 16px;font-size:15px;cursor:pointer}button:hover{background:var(--bp-red2)}

button.secondary{background:#e9eef1;color:var(--bp-dark)}
.small{font-size:12px;color:#555}
.tiny{font-size:12px;color:#6a6a6a}
.warn{background:#fff3cd;border:1px solid #ffeeba;color:#856404;padding:10px;border-radius:10px;margin-top:8px;font-size:14px}


/* Checkbox rows: keep native checkbox look, but improve alignment/click area */
.checkline{display:flex;align-items:center;gap:10px;margin:10px 0;cursor:pointer}
.checkline input{margin:0;flex:0 0 auto}
.checkline span{display:block;line-height:1.35}
.checkline input[type="checkbox"]{width:auto;height:auto;margin:0}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.room{display:flex;gap:14px;align-items:flex-start}
.room img{width:110px;height:75px;border-radius:10px;object-fit:cover;background:#e8e8e8}
hr{border:0;border-top:1px solid #eee;margin:16px 0}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef3f6;color:var(--bp-dark);font-size:12px}
table{width:100%;border-collapse:collapse}
th,td{padding:8px;border-bottom:1px solid #eee;text-align:left;font-size:14px}

.grid>div{padding-bottom:8px}
.table-scroll{overflow-x:auto}
td.cell{min-width:110px;vertical-align:top}
.cell .mini{display:flex;gap:6px;align-items:center;justify-content:center;flex-direction:column}
.cell input[type=number]{width:80px}

/* Stepper */
.stepper{
  display:flex;
  align-items:center;
  gap:10px;
}

/* nicer + / - buttons */
.stepper-btn{
  width:48px;
  height:48px;
  border-radius:999px;
  border:2px solid #c7d8ff;
  background:#f3f7ff;
  color:#1f53ff;
  font-size:28px;
  line-height:1;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
}
.stepper-btn:active{transform:translateY(1px)}

/* centered value field */
.stepper-input{
  width:70px;
  height:48px;
  border-radius:14px;
  border:2px solid #e1e1e1;
  background:#fff;
  text-align:center;
  font-weight:700;
  font-size:18px;
  padding:0 6px;
}

/* hide number spinners (we have + / -) */
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.stepper-input{ -moz-appearance:textfield; }

/* Extras area */
.extras{background:#f8fafc;border:1px solid #e6edf3;border-radius:12px;padding:12px;margin-top:6px}
.extrasgrid{display:grid;grid-template-columns:repeat(12,1fr);gap:10px;align-items:end}

/* Admin matrix (booking-like) */
.matrix{border-collapse:separate;border-spacing:0}
.matrix th,.matrix td{border-bottom:1px solid #eee}
.matrix thead th{position:sticky;top:0;background:#fff;z-index:5}
.matrix .firstcol{position:sticky;left:0;background:#fff;z-index:6;min-width:180px}
.matrix td.weekend, .matrix th.weekend{background:#fafafa}
.matrix td.weekstart, .matrix th.weekstart{border-left:2px solid #dfe6ea}
.matrix td.zero{background:#ffecec}

/* Booking-like room cards */
.roomrow{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:start}
.roomthumb{width:110px;height:80px;border-radius:14px;background:#e9eef1;border:1px solid #d6dfe5;overflow:hidden}
.roomthumb img{width:100%;height:100%;object-fit:cover;display:block}

/* Combined admin cells */
.cellstack{display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center}
.cell-inv{width:84px}
.cell-rate{width:90px}

/* Wider layout (use more page width like Booking) */
.container.wide{max-width:1240px}

/* Matrix visual tuning */
.table-scroll{overflow-x:auto}
.matrix th,.matrix td{padding:10px 10px}
.matrix thead th{box-shadow:0 1px 0 rgba(0,0,0,.06)}
.matrix td{background:#fff}
.matrix td:hover{background:#f6fbff}
.matrix td.weekend, .matrix th.weekend{background:#f7f7f7}
.matrix td.weekstart, .matrix th.weekstart{border-left:3px solid #d3dde3}
.matrix td.zero{background:#ffecec}
.matrix .firstcol{box-shadow:1px 0 0 rgba(0,0,0,.06)}

/* Inputs inside matrix */
.cellstack{gap:8px}
.cell-inv{height:40px;border-radius:12px}
.cell-rate{height:40px;border-radius:12px}

/* Subtle booking-like accent for save button already uses primary */

/* Booking-like search bar */
.bookingbar{display:grid;grid-template-columns:1.1fr 1.1fr .7fr .7fr 1fr auto;gap:12px;align-items:end}
@media (max-width: 980px){
  .bookingbar{grid-template-columns:1fr 1fr; align-items:stretch}
}
.bookingbar .field label{margin:0 0 6px 0}
.bookingbar button{height:46px; padding:0 18px; border-radius:14px}

/* Room cards */
.roomcard{display:grid;grid-template-columns:120px 1fr auto;gap:16px;align-items:center;padding:16px;border:1px solid #eef2f4;border-radius:18px}
.roomcard + .roomcard{margin-top:12px}
.roomcard h3{margin:0;font-size:18px}
.roommeta{color:var(--bp-red);font-size:13px;margin-top:2px}
.priceblock{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:150px}
.priceblock .price{font-size:22px;font-weight:800;color:var(--bp-dark)}
.priceblock .per{font-size:12px;color:var(--bp-muted)}
.roomactions{display:flex;justify-content:flex-end}
.roomactions .stepper{justify-content:flex-end}
@media (max-width: 980px){
  .roomcard{grid-template-columns:120px 1fr}
  .priceblock{align-items:flex-start}
}

/* Full width admin pages */
.container.wide.full{max-width:none;width:95%}

/* Highlight today's column (booking-like subtle) */
.matrix td.today, .matrix th.today{background:#eef7ff}
.matrix td.today.weekend, .matrix th.today.weekend{background:#e8f3ff}

/* Slightly stronger weekend separation */
.matrix th.weekend{font-weight:700}

/* Make controls area not too wide and aligned */
.card .row{gap:12px}

/* Bookingbar compact */
.bookingbar input, .bookingbar select{height:46px;border-radius:14px}

/* iOS Safari: date inputs tend to render taller/wider; force compact, non-overlapping layout */
@supports (-webkit-touch-callout: none) {
  .bookingbar--search .field{min-width:0;}
  .bookingbar--search input, .bookingbar--search select{min-width:0;width:100%;box-sizing:border-box;}
  .bookingbar--search input[type="date"]{
    -webkit-appearance:none;
    appearance:none;
    height:46px;            /* keep consistent with other inputs */
    padding:0 14px;
    line-height:46px;
    text-align:center;
  }
}

/* Force availability to use almost full viewport width */
body .container.wide.full{max-width:none !important; width:95vw !important; margin-left:auto; margin-right:auto;}
body .container.wide.full .card{width:100%}

/* Booking-like grid interactions */
.matrix td{transition:background .12s ease}
.matrix tr:hover td{background:#f6fbff}
.matrix tr:hover td.firstcol{background:#fff}
.matrix td:hover{background:#eaf5ff !important}
.matrix td.zero{background:#ffecec !important}
.matrix td.zero input{opacity:.85}
.matrix td.zero::after{content:"";position:absolute;inset:0;border:1px solid rgba(180,0,0,.18);border-radius:12px;pointer-events:none}
.matrix td{position:relative}
.matrix thead th{background:#fff}
.matrix .firstcol{background:#fff}

.cell-inv,.cell-rate{font-weight:600}
.cell-rate{text-align:right}
.cell-inv{text-align:center}

/* Availability page: truly full width */
.availability-page .container{max-width:none !important; width:95vw !important; margin-left:auto; margin-right:auto;}
.availability-page .card{width:100% !important}
.availability-page header .container{width:95vw !important; max-width:none !important}


/* --- Booking frontend layout (step-based) --- */
.booking-layout{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:18px;
  align-items:start;
  margin-bottom:40px;
}
.booking-main{display:flex;flex-direction:column;gap:18px}
.booking-side{position:sticky; top:18px}
.booking-summary__title{font-weight:800;font-size:16px;margin-bottom:10px}
.booking-summary__row{display:flex;justify-content:space-between;gap:10px;margin:6px 0}
.sum-items{display:flex;flex-direction:column;gap:8px;margin:10px 0}
.sum-item{display:flex;justify-content:space-between;gap:10px}
.sum-item__left{flex:1;min-width:0}
.sum-item__right{white-space:nowrap;font-weight:700}
.sum-total{margin-top:10px}
.sum-total .total{font-size:20px;font-weight:900;margin-top:4px}
.tiny{font-size:12px;color:#627178}
.h2{font-size:18px;font-weight:900}
.booking-search{margin-bottom:18px}
.bookingbar--search{
  display:grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap:12px;
  align-items:end;
}
.bookingbar--search .bookingbar__actions{display:flex;justify-content:flex-start}
.booking-step__head{
  display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap;
}
.ratebox{min-width:220px;max-width:520px;width:100%;margin-top:12px}
.ratebox label{margin-bottom:6px}
.roomcards{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.roomcard{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:14px;
  border:1px solid rgba(0,0,0,0.06);
  border-radius:14px;
  padding:12px;
  background:#fff;
}
.roomcard__img img{
  width:110px;height:90px;object-fit:cover;border-radius:12px;
  background:#e6eaee;
}
.roomcard.is-unavailable{opacity:.72;}
.roomcard.is-unavailable .roomcard__img img{filter:grayscale(1);}
.avail-note{margin-top:6px; display:inline-block; font-weight:800; padding:4px 8px; border-radius:10px; background:rgba(255,193,7,.25); color:#2b2b2b;}
body.dark .avail-note{background:rgba(255,193,7,.20); color:#f2f2f2;}
.stepper.stepper--disabled .stepper-btn,
.stepper.stepper--disabled .stepper-input{opacity:.55; cursor:not-allowed;}
.stepper.stepper--disabled .stepper-btn{pointer-events:none;}
.roomcard__title{font-weight:900;font-size:16px}
.roomcard__top{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start}
.roomcard__top > div:first-child{min-width:0}
.roomcard__price{text-align:right;white-space:nowrap}

.roomcard__price{text-align:right}
.roomcard__price .price{display:flex;align-items:baseline;justify-content:flex-end;gap:8px}
.roomcard__price .price-new{font-size:18px;font-weight:900;line-height:1.05}
.roomcard__price .price-old{display:none;font-size:13px;font-weight:600;line-height:1.05;text-decoration:line-through;color:#b02a37;opacity:.95}

/* When "Garantiert" is selected: show both prices (Flex crossed out + new price) */
html.tariff-nonref .roomcard__price .price-old{display:inline-flex}
.roomcard__bottom{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:10px}
.booking-step__foot{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-top:14px}
.btn-primary{
  background:#0b3a4a;
  color:#fff;
  border:none;
  padding:12px 16px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
}
.btn-primary[disabled]{opacity:.45;cursor:not-allowed}
.btn-link{
  background:transparent;border:none;color:#0b3a4a;font-weight:800;cursor:pointer;padding:8px 10px;border-radius:10px;
}
.btn-link:hover{background:rgba(11,58,74,.08)}
.booking-step--hidden{display:none}

/* Responsive */
@media (max-width: 980px){
  .booking-layout{grid-template-columns:1fr}
  .booking-side{position:static}
  .bookingbar--search{grid-template-columns: repeat(2, minmax(0,1fr));}
  .bookingbar--search .bookingbar__actions{grid-column:span 2}
}
@media (max-width: 560px){
  .roomcard{grid-template-columns:1fr}
  .roomcard__img img{width:100%;height:140px}
  /* keep price on the top right even on small screens */
  .roomcard__top{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start}
  .roomcard__top > div:first-child{min-width:0}
  .roomcard__price{text-align:right;white-space:nowrap}
}

.roomcard__price{text-align:right;white-space:nowrap}
}
  .roomcard__img img{width:100%;height:140px}
  .roomcard__top{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start}
  .roomcard__price{text-align:right;white-space:nowrap}
}

/* Booking-style topbar */
.topbar{background:var(--bp-dark);color:#fff;padding:18px 0}
.topbar-inner{display:flex;align-items:center;justify-content:space-between}
.topbar-title{font-weight:800;font-size:20px;letter-spacing:.2px}
.topbar-badge{background:#fff;color:var(--bp-dark);text-decoration:none;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700}
main{background:var(--bp-dark);min-height:calc(100vh - 64px);padding:28px 0}

/* Extras + invoice sections */
.extras input[disabled]{opacity:.6; cursor:not-allowed}
.invoicebox{padding-top:4px}

.sum-breakdown{margin-left:24px;margin-top:2px;font-size:12px;color:#6b7280;line-height:1.25}

/* ---- Mobile layout fixes (Guest step) ----
   Keep important rows in 2-column layout on phones (iPhone Safari):
   - Vorname + Nachname stay side-by-side
   - Frühstück + Hunde stay side-by-side
   We avoid oversizing checkboxes; instead we enlarge the clickable label area.
*/

/* Shared checkbox row style (used by DSGVO + per-room checkboxes) */
.checkline{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 0;
}
.checkline input[type="checkbox"]{margin:0;}

@media (max-width: 760px){
  /* Keep 12-col grids so 6/6 spans remain two columns */
  .guest-grid, .roomextras-grid{grid-template-columns:repeat(12, minmax(0,1fr)) !important;}

  /* Prevent iOS flex/grid min-content quirks causing overflow */
  .guest-grid > div, .roomextras-grid > div{min-width:0;}

  /* Bigger tap targets without huge checkbox squares */
  .checkline{padding:12px 0;}
  .checkline span{line-height:1.3;}
}

/* ---- Make per-room Breakfast / Extra Bed more noticeable (safe UI bump) ----
   Guests sometimes overlook these two checkboxes.
   We keep the overall layout, but give the two "extra-big" blocks a subtle
   card/pill background, stronger typography and a clear checked state.
*/
.roomextras-grid .extra-big{
  border:1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
  border-radius:14px;
  padding:10px 12px;
}
.roomextras-grid .extra-big:hover{
  border-color: rgba(0,0,0,0.16);
}
.roomextras-grid .extra-big .checkline{
  padding:0;
  gap:12px;
}
.roomextras-grid .extra-big .checkline span{
  font-weight:800;
  letter-spacing:.1px;
}
.roomextras-grid .extra-big input[type="checkbox"]{
  transform: scale(1.15);
  transform-origin:left center;
}
.roomextras-grid .extra-big.is-checked{
  border-color: rgba(11,58,74,.35);
  background: rgba(11,58,74,.08);
}
.roomextras-grid .extra-big.is-checked .checkline span{
  color: var(--bp-dark);
}
.roomextras-grid .extra-big .tiny{margin-top:6px;}

@media (max-width: 760px){
  .roomextras-grid .extra-big{
    padding:12px 12px;
  }
  .roomextras-grid .extra-big input[type="checkbox"]{transform: scale(1.22);}
}


/* Room Unit Cards (Guest step) */
.roomunit-card{
  border:1px solid rgba(11,58,74,.16);
  box-shadow:0 2px 14px rgba(0,0,0,.08);
  position:relative;
  overflow:hidden;
}

/* Personen + Hunde row: keep the INPUTS aligned on iPhone Safari.
   Safari wraps "Personen in diesem Zimmer" into two lines, while "Hunde" stays one line.
   By reserving two-line height for BOTH labels, the inputs stay on the same baseline. */
.ru-persons-dogs label{
  display:block;
  line-height:1.2;
  min-height:2.4em; /* roughly 2 lines */
}
.roomunit-card::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:4px;
  background:#0b3a4a;
}
.roomunit-card{
  padding-left:16px; /* space for accent bar */
}
.roomunit-card:hover{
  border-color: rgba(11,58,74,.26);
  box-shadow:0 6px 18px rgba(0,0,0,.10);
}

/* Room Unit Cards – stronger separation (override) */
.roomunit-card{
  border:2px solid rgba(11,58,74,.22);
  box-shadow:0 4px 18px rgba(0,0,0,.10);
}
.roomunit-card:hover{
  border-color: rgba(11,58,74,.32);
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}
.roomunit-card::before{
  width:5px;
}

/* Tighter spacing between Early/Late checkboxes inside room cards */
.roomunit-card .checkline.checkline--tight{
  padding:4px 0;
  margin:0;
}


/* Room Unit Cards – spacing + separation tweaks */
.roomunit-card{
  border-color: rgba(11,58,74,.28);
  box-shadow:0 6px 22px rgba(0,0,0,.12);
}
.roomunit-card:hover{
  border-color: rgba(11,58,74,.36);
  box-shadow:0 10px 26px rgba(0,0,0,.14);
}
/* Reduce spacing between check-in/out lines inside room cards */
.roomunit-card .checkline{ margin:6px 0; }
.roomunit-card .checkline + .checkline{ margin-top:2px; }

/* Room unit cards – tighter spacing for check-in/out lines */
.roomunit-card .checkline{
  margin:4px 0;
  padding:4px 0;
}
.roomunit-card .checkline + .checkline{
  margin-top:2px;
}


/* NONREF / Garantiert Promo */
.ratepromo{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:14px;
  background: rgba(0,0,0,0.03);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.ratepromo__text{
  font-size:14px;
  line-height:1.35;
}
.ratepromo__btn{
  border:1px solid rgba(0,0,0,0.12);
  background:#fff;
  color:var(--bp-dark);
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.ratepromo__btn:hover{
  background:var(--bp-dark);
  border-color:var(--bp-dark);
  color:#fff;
}
.ratepromo__btn:hover{ filter: brightness(0.98); }
@media (max-width: 600px){
  .ratepromo__btn{ width:100%; justify-content:center; }
}
.save-badge{
  display:none;
  align-self:flex-start;
  font-size:12px;
  font-weight:800;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  margin-bottom:6px;
}
.tariff-nonref .save-badge{ display:inline-flex; }

/* =====================================
   Stepper Buttons – Homepage Style
   neutral + hellblau beim Hover
===================================== */

.stepper-btn{
  background:#f3f5f8;
  border:2px solid #cfd7e6;
  color:#2f5fd7;
  transition:all .18s ease;
}

/* Hover = hellblau */
.stepper-btn:hover{
  background:#e8f1ff;
  border-color:#9ec3ff;
  color:#2f5fd7;
}

/* Klickgefühl */
.stepper-btn:active{
  background:#dbe9ff;
  transform:scale(0.96);
}
