@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* ============================================================
   style.css — one stylesheet for both index.html and admin.html
   Light dashboard look: soft grey page, floating white cards,
   deep forest green as the only strong colour.
   ============================================================ */

:root {
  /* greens */
  --green-dark:  #0b3a26;
  --green:       #176b48;
  --green-mid:   #2f9e6b;
  --green-light: #e6f2ea;   /* mint fill — used everywhere as a soft tint */
  --green-tint:  #f3f9f5;
  --accent:      #2f9e6b;

  /* neutrals */
  --text:        #10201a;
  --text-soft:   #6f807a;
  --text-dim:    #9aa8a2;
  --line:        #e9eeeb;
  --line-soft:   #f1f5f3;
  --bg:          #eceeee;
  --card:        #ffffff;

  /* status */
  --red:         #b3261e;
  --red-light:   #fdecea;
  --amber:       #a4620a;
  --amber-light: #fdf3e2;
  --blue:        #0369a1;
  --blue-light:  #e4f1fb;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --pill:      999px;

  --shadow:    0 1px 2px rgba(13, 36, 25, .04), 0 6px 20px -14px rgba(13, 36, 25, .22);
  --shadow-md: 0 2px 6px rgba(13, 36, 25, .05), 0 16px 36px -22px rgba(13, 36, 25, .3);
  --shadow-lg: 0 30px 70px -28px rgba(13, 36, 25, .4);
}

* { box-sizing: border-box; }

/* IMPORTANT: any rule with `display` beats the HTML `hidden` attribute.
   This keeps hidden meaning hidden, for the modal, the filter chip and
   the wizard buttons. Do not remove. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

::selection { background: var(--green-light); color: var(--green-dark); }

/* ---------- brand mark (sidebar + login + header) ---------- */

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--green-mid) 0%, var(--green-dark) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px -6px rgba(11, 58, 38, .7);
}
.brand-mark svg { width: 20px; height: 20px; }

.brand-text { min-width: 0; }

.brand-name {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  display: block;
  font-size: .72rem;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   ADMIN SHELL — sidebar + main column
   ============================================================ */

.app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 14px;
  min-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
}

.sidebar .brand { padding: 6px 8px 10px; }

.nav-label {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 18px 10px 7px;
}

.adminnav { display: flex; flex-direction: column; gap: 3px; }

.navbtn,
.navlink {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  position: relative;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.navbtn svg,
.navlink svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }

.navbtn:hover,
.navlink:hover { background: var(--line-soft); color: var(--text); }

.navbtn.active {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
}
.navbtn.active svg { opacity: 1; }
.navbtn.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
}

.navlink.danger:hover { background: var(--red-light); color: var(--red); }

.sidebar-foot { margin-top: auto; padding-top: 18px; }

/* small promo block at the bottom of the sidebar */
.side-card {
  background: linear-gradient(155deg, #123f2b 0%, #062316 100%);
  color: #fff;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}
.side-card strong { display: block; font-size: .88rem; font-weight: 700; }
.side-card span {
  display: block;
  font-size: .74rem;
  color: rgba(255, 255, 255, .62);
  margin: 3px 0 12px;
  line-height: 1.4;
}
.side-card a {
  display: block;
  background: #fff;
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  padding: 9px;
  border-radius: var(--pill);
}
.side-card a:hover { background: var(--green-light); }

/* ---------- top bar inside the shell ---------- */

.app-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.appbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 11px 14px;
}

.appbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

/* square icon buttons beside the user chip */
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text-soft);
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--line-soft); color: var(--text); }
.icon-btn.danger:hover {
  background: var(--red-light);
  border-color: var(--red-light);
  color: var(--red);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.user-chip .who-wrap { min-width: 0; }
.user-chip .avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  display: grid;
  place-items: center;
}
.user-chip .avatar svg { width: 18px; height: 18px; }
.user-chip .who-label {
  display: block;
  font-size: .72rem;
  color: var(--text-dim);
  font-weight: 600;
  line-height: 1.2;
}

.who {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* ---------- page heading ---------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 4px 4px 0;
}
.page-head h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.page-head .sub { margin: 2px 0 0; font-size: .86rem; color: var(--text-soft); }

/* ============================================================
   HEADER / FOOTER (booking page)
   ============================================================ */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.topbar .sub { margin: 1px 0 0; font-size: .78rem; color: var(--text-dim); font-weight: 500; }

.topbar-btns { display: flex; gap: 8px; align-items: center; }

.footer {
  margin-top: 46px;
  padding: 26px 0;
  background: var(--green-dark);
  color: #fff;
  font-size: .84rem;
  text-align: center;
}
.footer p { margin: 2px 0; }
.footer .muted { color: rgba(255, 255, 255, .62); }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 18px 0;
}

.app-main .card { margin: 0; }

.card.narrow { max-width: 400px; margin: 7vh auto; }

h2 {
  margin: 0 0 13px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

h3 { margin: 0 0 10px; font-size: .92rem; font-weight: 700; color: var(--text); }

.step {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .85rem;
}

.pill {
  font-size: .76rem;
  font-weight: 600;
  background: var(--green-light);
  color: var(--green-dark);
  padding: 4px 12px;
  border-radius: var(--pill);
}

/* ---------- booking card with a picture attached on the left ---------- */

.card.has-photo {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 0;            /* the padding moves to .card-body */
  overflow: hidden;
}

/* steps 2, 3 and 4: no picture, full width */
.card.has-photo.no-photo { grid-template-columns: 1fr; }
.card.has-photo.no-photo .card-photo { display: none; }

.card-photo {
  /* shows if booking.jpg is missing, so it never looks broken */
  background: linear-gradient(160deg, var(--green-mid) 0%, var(--green-dark) 100%);
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body { padding: 22px 24px; min-width: 0; }

/* ---------- click a photo to see it full size ---------- */

.zoomable { cursor: zoom-in; }
.zoomable:hover { opacity: .9; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 18, 12, .88);
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
  padding: 50px 20px 24px;
  gap: 12px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
  box-shadow: var(--shadow-lg);
}

.lb-cap {
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  cursor: pointer;
}
.lb-close:hover { background: rgba(255, 255, 255, .3); }

/* ============================================================
   4-STEP PROGRESS BAR
   ============================================================ */

.stepper {
  display: flex;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  counter-reset: s;
}

.stepper li {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* the connecting line */
.stepper li::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.stepper li:first-child::before { display: none; }
.stepper li.active::before,
.stepper li.done::before { background: var(--green-mid); }

.stepper .num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin: 0 auto 7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  font-weight: 800;
  color: var(--text-dim);
  transition: transform .18s ease;
}

.stepper .txt { display: block; }

/* only used on a phone, where the names under the circles do not fit */
.step-label { display: none; }

.stepper li.active .num {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 8px 18px -8px rgba(23, 107, 72, .9);
}
.stepper li.active .txt { color: var(--green-dark); font-weight: 800; }

.stepper li.done .num {
  background: var(--green-light);
  border-color: var(--green-mid);
  color: var(--green-dark);
}
.stepper li.done .num::after { content: "\2713"; }
.stepper li.done .num { font-size: 0; }
.stepper li.done .num::after { font-size: .95rem; }

/* ---------- panels + wizard nav ---------- */

.panel { animation: fade .24s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.nav-row { display: flex; gap: 10px; margin-top: 18px; }
.nav-row .btn-ghost {
  flex: 0 0 118px;
  color: var(--text-soft);
  padding: 13px;
}
.nav-row .btn-primary { flex: 1; }

.panel-sub { font-size: .85rem; color: var(--text-soft); margin: -8px 0 14px; }

/* ---------- step 1: Public / Exclusive choice ---------- */

.type-cell { display: flex; align-items: center; gap: 12px; }

.type-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-light);
  color: var(--green);
}
.type-icon svg { width: 21px; height: 21px; }

.row-selected .type-icon { background: var(--green); color: #fff; }

.avail-yes { color: var(--green); font-weight: 700; white-space: nowrap; }
.avail-no  { color: var(--red);   font-weight: 700; white-space: nowrap; }

/* ============================================================
   COTTAGE TABLE (booking page)
   ============================================================ */

.section-bar {
  background: var(--green-dark);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 9px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.cottage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}
.cottage-table th {
  text-align: left;
  padding: 9px 14px;
  background: var(--green-tint);
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cottage-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.cottage-table tr:last-child td { border-bottom: none; }
.cottage-table .amount { font-weight: 800; color: var(--green-dark); white-space: nowrap; }

.cottage-table tr:hover:not(.row-booked) td { background: var(--green-tint); }

.cottage-table .row-selected td {
  background: var(--green-light) !important;
}
.cottage-table .row-booked td { opacity: .45; }

.cottage-table .nowrap { white-space: nowrap; }

/* photo box on the left of each row */
.thumb {
  width: 140px;
  height: 105px;   /* 4:3 — matches the recommended 800x600 photo */
  border-radius: 12px;
  overflow: hidden;
  background: var(--green-light);
  flex-shrink: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* shown when the picture file is not added yet */
.thumb.no-photo {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green-mid);
}

.cottage-name {
  display: block;
  font-size: .94rem;
  font-weight: 700;
  color: var(--text);
}

.cottage-desc {
  display: block;
  font-size: .78rem;
  font-weight: 400;
  color: var(--text-soft);
  margin-top: 2px;
  max-width: 560px;   /* wide enough to use the row, not so wide it sprawls */
  white-space: normal;
}

.btn-mini.picked-btn {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 700;
}

/* picked-cottage confirmation box */
.picked {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .88rem;
}
.picked strong { display: block; color: var(--green-dark); }
.picked span { color: var(--text-soft); font-size: .82rem; }

/* stands in for the old running total on step 3 — the money is
   deliberately not worked out until the review page */
.total-later {
  background: var(--green-tint);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
}

/* running total (kept for the admin pop-ups) */
.running-total {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--green-dark);
  text-align: right;
}
.running-total strong {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--green-dark);
}

/* ============================================================
   FORM
   ============================================================ */

.field { margin-bottom: 13px; }

label, legend {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

label small { font-weight: 500; color: var(--text-soft); }

.req { color: var(--red); }

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

textarea { resize: vertical; min-height: 58px; line-height: 1.5; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(47, 158, 107, .16);
}

/* a date or a clock time is never 900px wide — stop them stretching */
input[type="date"],
input[type="time"],
input[type="number"] { max-width: 240px; }
.grid-2 input, .grid-3 input { max-width: none; }

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 13px;
}

legend { padding: 0 6px; }

.note { display: block; font-size: .77rem; color: var(--text-soft); margin-top: 5px; }
.note.warn { color: var(--red); font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.half   { max-width: 220px; }

.error {
  background: var(--red-light);
  color: var(--red);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .86rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  font-size: .87rem;
  margin-top: 12px;
  cursor: pointer;
}
.check input { width: auto; margin-top: 3px; flex-shrink: 0; accent-color: var(--green); }

/* ---------- price box ---------- */

.price-box {
  background: var(--green-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}

.price-table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.price-table td, .price-table th { padding: 6px 0; text-align: left; }
.price-table .amount, .price-table .total { text-align: right; }

/* "Included" instead of a peso amount (exclusive bookings) */
.price-table .included { color: var(--green); font-weight: 700; font-style: italic; }

/* ---- the detailed breakdown on the review page ---- */

/* "COTTAGE", "ENTRANCE FEES", "DISCOUNT" */
.price-table tr.section th {
  text-align: left;
  padding: 14px 0 3px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.price-table tr.section:first-child th { padding-top: 0; }

/* the small grey explanation under a priced line */
.price-table tr.plain td {
  padding: 0 0 4px;
  font-size: .77rem;
  color: var(--text-dim);
}
.price-table tr.plain .amount {
  font-style: normal;
  font-weight: 600;
  color: var(--text-dim);
}

.price-table tr.subtotal td {
  border-top: 1px solid var(--line);
  padding-top: 9px;
  font-weight: 700;
}

.included-note {
  color: var(--green) !important;
  font-weight: 600;
  margin-top: 6px;
}
.price-table tfoot th {
  border-top: 1px solid var(--line);
  padding-top: 11px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--green-dark);
}

/* ---------- rules ---------- */

.rules-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--card);
}
.rules-box ol { margin: 0; padding-left: 20px; font-size: .85rem; color: var(--text-soft); }
.rules-box li { margin-bottom: 6px; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 13px 26px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  border-radius: var(--pill);
  cursor: pointer;
  width: 100%;
  box-shadow: 0 10px 22px -14px rgba(11, 58, 38, .95);
  transition: background .15s ease, transform .1s ease;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 16px;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  border-radius: var(--pill);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--line-soft); border-color: var(--text-dim); }

.btn-ghost.dark {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}
.btn-ghost.dark:hover { background: #062316; }

.btn-mini {
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 13px;
  font: inherit;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--pill);
  cursor: pointer;
  margin-right: 4px;
}
.btn-mini:hover { background: var(--green-light); border-color: var(--green-mid); color: var(--green-dark); }
.btn-mini.danger { color: var(--red); }
.btn-mini.danger:hover { background: var(--red-light); border-color: var(--red); color: var(--red); }

.btn-search {
  flex: 0 0 auto;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 10px 22px;
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  border-radius: var(--pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 22px -16px rgba(11, 58, 38, .95);
}
.btn-search:hover { background: var(--green-dark); }

.btn-danger {
  background: #fff;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 13px;
  font: inherit;
  font-weight: 700;
  border-radius: var(--pill);
  cursor: pointer;
}
.btn-danger:hover { background: var(--red); color: #fff; }

/* irreversible — looks different from "Cancel Booking", which is not */
.btn-danger.hard {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-danger.hard:hover { background: #8e1d16; border-color: #8e1d16; }

/* ============================================================
   CONFIRMATION (booking page)
   ============================================================ */

.card.success { text-align: center; }

.check-mark {
  width: 60px; height: 60px;
  margin: 4px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--green-mid) 0%, var(--green-dark) 100%);
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(11, 58, 38, .9);
}
.check-mark svg { width: 28px; height: 28px; }

.card.success h2 { justify-content: center; font-size: 1.3rem; font-weight: 800; }
.card.success .sub { color: var(--text-soft); font-size: .88rem; margin-top: 0; }

/* booking number — the most important thing on the page */
.ref-box {
  background: var(--green-light);
  border: 1px dashed var(--green-mid);
  border-radius: var(--radius);
  padding: 22px 16px;
  margin: 20px 0;
}

.ref-label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
}

.ref {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  color: var(--green-dark);
  margin: 8px 0;
  word-break: break-all;
}

.ref-hint {
  display: block;
  font-size: .79rem;
  color: var(--text-soft);
  max-width: 330px;
  margin: 0 auto;
}

.summary {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .89rem;
  margin-bottom: 18px;
}
.summary th, .summary td { padding: 10px 4px; border-bottom: 1px solid var(--line-soft); }
.summary th { width: 42%; color: var(--text-soft); font-weight: 600; }

.email-note { font-size: .85rem; color: var(--green); font-weight: 700; }

.success-actions { display: flex; gap: 10px; margin: 18px 0; }
.success-actions .btn-primary,
.success-actions .btn-ghost { flex: 1; }
.success-actions .btn-ghost { padding: 13px; }

.cancel-note {
  font-size: .83rem;
  color: var(--amber);
  background: var(--amber-light);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 0;
}

/* ============================================================
   ADMIN: STAT CARDS
   ============================================================ */

/* auto-fit so adding or removing a tile never breaks the row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
  overflow: hidden;
}

/* the first tile is the hero, like the dashboard it is modelled on */
.stat:first-child {
  background: linear-gradient(150deg, #19704b 0%, #0b3a26 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 18px 34px -22px rgba(11, 58, 38, .95);
}

.stat strong {
  order: 2;
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  color: var(--text);
}
.stat span {
  order: 1;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-soft);
}
.stat:first-child strong { color: #fff; }
.stat:first-child span { color: rgba(255, 255, 255, .72); }

/* ============================================================
   ADMIN: CALENDAR
   ============================================================ */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.cal-head h2 { margin: 0; }

.head-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.cal-nav { display: flex; align-items: center; gap: 8px; color: var(--text); }
.cal-nav strong { min-width: 160px; text-align: center; font-size: .92rem; font-weight: 700; }
.cal-nav .btn-ghost { padding: 7px 13px; line-height: 1; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .77rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 14px;
}
.legend span { display: flex; align-items: center; gap: 6px; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.free    { background: #fff; border: 1px solid var(--line); }
.dot.partial { background: #e8b04b; }
.dot.full    { background: #d9544a; }
.dot.excl    { background: var(--green-mid); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.cal-labels {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 6px;
}

.cal-cell {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 8px;
  font-size: .8rem;
  cursor: pointer;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cal-cell:hover { border-color: var(--green-mid); box-shadow: var(--shadow); }
.cal-cell.blank { border: none; background: transparent; cursor: default; box-shadow: none; }
.cal-cell.partial { background: var(--amber-light); border-color: #f0dcbb; }
.cal-cell.full    { background: var(--red-light);   border-color: #f6d6d2; }
.cal-cell.excl    { background: var(--green-light); border-color: #cde4d6; }
.cal-cell.is-today {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 158, 107, .25);
}

.cal-num  { font-weight: 700; }
.cal-info {
  font-size: .65rem;
  line-height: 1.3;
  color: var(--text-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-cell.partial .cal-info,
.cal-cell.full .cal-info,
.cal-cell.excl .cal-info { color: var(--text); font-weight: 600; }

.cal-hint { font-size: .78rem; color: var(--text-dim); margin: 12px 0 0; text-align: center; }
.cal-hint.left { text-align: left; margin: 0 0 14px; }
.cal-hint.settings-foot { margin: 14px 0 0; }

/* ============================================================
   ADMIN: FILTERS + TABLE
   ============================================================ */

.filters { display: flex; gap: 8px; }
.filters input, .filters select { width: auto; font-size: .85rem; }

.quick-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.qf {
  font: inherit;
  font-size: .81rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  border-radius: var(--pill);
  cursor: pointer;
}
.qf:hover { border-color: var(--green-mid); color: var(--green-dark); }

.qf.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
  font-weight: 700;
}

.qf-select {
  width: auto;
  font-size: .81rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--pill);
  margin-left: auto;
}

/* "Showing: 2026-10-25  (3 found)  x Clear" */
.filter-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-light);
  border-radius: 12px;
  padding: 9px 14px;
  margin: 0 0 14px;
  font-size: .83rem;
  color: var(--green-dark);
  font-weight: 700;
}
.filter-chip button {
  margin-left: auto;
  background: #fff;
  border: 1px solid transparent;
  color: var(--green-dark);
  border-radius: var(--pill);
  padding: 4px 12px;
  font: inherit;
  font-size: .77rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip button:hover { background: var(--green); color: #fff; }

.search-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 320px;
  min-width: 0;
  align-items: center;
}
.search-bar select { width: auto; flex: 0 0 auto; font-size: .83rem; border-radius: var(--pill); }
.search-bar input  { flex: 1 1 200px; min-width: 0; font-size: .85rem; border-radius: var(--pill); }

/* the search field sitting in the admin top bar */
.appbar .search-bar input {
  background: var(--line-soft);
  border-color: transparent;
}
.appbar .search-bar input:focus { background: #fff; }

.table-scroll { overflow-x: auto; }

/* No global nowrap: that is what forced the sideways scrollbar.
   Only the cells that genuinely must stay on one line keep it. */
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }

.data-table .mono,
.data-table .amount,
.data-table .actions,
.data-table .nowrap { white-space: nowrap; }

/* a main line with smaller grey detail stacked under it */
.data-table .cell-stack { display: block; min-width: 0; }
.data-table .cell-main  { display: block; font-weight: 600; }
.data-table .cell-sub {
  display: block;
  font-size: .73rem;
  line-height: 1.35;
  color: var(--text-dim);
  overflow-wrap: anywhere;   /* a long email must not widen the table */
}
.data-table th {
  text-align: left;
  padding: 11px 12px;
  background: var(--green-tint);
  color: var(--text-soft);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.data-table th:first-child { border-radius: 10px 0 0 10px; }
.data-table th:last-child  { border-radius: 0 10px 10px 0; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); }
.data-table tr:hover td { background: var(--green-tint); }
.data-table .mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .82rem;
  font-weight: 700;
  color: var(--green-dark);
}
.data-table .amount { text-align: right; font-weight: 700; }
.data-table .center { text-align: center; }
.data-table .actions { white-space: nowrap; }
.data-table .is-cancelled td { opacity: .5; text-decoration: line-through; }
.data-table .is-cancelled .actions { text-decoration: none; opacity: 1; }

/* the month total at the foot of the sales table */
.data-table tr.sum-row td {
  border-top: 2px solid var(--line);
  border-bottom: none;
  font-weight: 800;
  color: var(--green-dark);
  background: var(--green-tint);
}
.data-table tr.sum-row:hover td { background: var(--green-tint); }

/* today, so it is findable in a long month */
.data-table tr.is-today-row td { background: var(--green-light); }

/* clickable booking rows */
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: var(--green-light); }

.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: var(--pill);
}
.badge.confirmed { background: var(--green-light); color: var(--green-dark); }
.badge.cancelled { background: var(--red-light);   color: var(--red); }
.badge.upcoming  { background: var(--blue-light);  color: var(--blue); }

/* the guest actually turned up — solid, so it stands out against
   the pale "confirmed" badge sitting next to it */
.badge.arrived   { background: var(--green);       color: #fff; }

/* the headcount was changed at the gate */
.badge.adjusted  { background: var(--amber-light); color: var(--amber); }

.badge + .badge  { margin-left: 5px; }

/* one-press check-in in the bookings table */
.btn-mini.check-in {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 700;
}
.btn-mini.check-in:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* ============================================================
   GOOGLE SIGN-IN
   ============================================================ */

.login-card { text-align: center; padding: 34px 28px; }
.login-card .brand { justify-content: center; margin-bottom: 18px; }
.login-sub { font-size: .85rem; color: var(--text-soft); margin: -8px 0 22px; }
.login-card h2 { justify-content: center; font-size: 1.25rem; font-weight: 800; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 13px;
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  color: #3c4043;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  cursor: pointer;
}
.btn-google:hover { background: var(--line-soft); border-color: var(--text-dim); }
.btn-google svg { width: 19px; height: 19px; flex-shrink: 0; }

.login-note { font-size: .79rem; color: var(--text-soft); margin: 14px 0 0; }

/* small Google button, for the header */
.btn-google.small {
  width: auto;
  padding: 9px 16px;
  font-size: .82rem;
  gap: 8px;
}
.btn-google.small svg { width: 16px; height: 16px; }

/* who is signed in, in the booking page header */
.header-user {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: .83rem;
  font-weight: 600;
}
.header-user img {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
}
.header-user #headerName {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* guest sign-in on the booking form */
.signin-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  background: var(--green-tint);
}
.signin-row .btn-google { max-width: 290px; }
.signin-row .note { margin-top: 9px; }

.signed-in {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 18px;
}
.signed-in img { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.signed-in strong { display: block; font-size: .88rem; color: var(--green-dark); }
.signed-in .note { margin-top: 1px; }
.signed-in .btn-mini { margin-left: auto; flex-shrink: 0; }

/* ============================================================
   ADMIN: COTTAGE PHOTOS + POP-UPS
   ============================================================ */

.thumb.sm { width: 56px; height: 42px; border-radius: 8px; }
.thumb.sm.no-photo { font-size: 1rem; }

.thumb.lg { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: var(--radius); }
.thumb.lg.no-photo { font-size: 3rem; }

/* photo + name together in a table cell */
.cot-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cot-cell span { min-width: 0; }

/* big photo in the booking pop-up */
.view-photo { margin-bottom: 14px; }
.photo-caption {
  display: block;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-soft);
  margin-top: 8px;
}

/* photo preview under the cottage dropdown when editing */
.edit-photo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 9px;
  background: var(--green-light);
  border-radius: 12px;
  font-size: .8rem;
  color: var(--green-dark);
  font-weight: 700;
}

/* booking details pop-up */
.view-head {
  text-align: center;
  background: var(--green-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  margin-bottom: 18px;
}
.view-head .ref { font-size: 1.6rem; margin: 4px 0 10px; }

.view-meta {
  font-size: .74rem;
  color: var(--text-dim);
  white-space: pre-line;
  margin: 0 0 16px;
}

#viewTable th { width: 38%; }
#viewTable tr:last-child th,
#viewTable tr:last-child td {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green-dark);
  border-bottom: none;
}

/* ============================================================
   DISCOUNTS
   ============================================================ */

.promo-preview {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .8rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.promo-list { margin-bottom: 16px; }

/* ---------- the floating offer on the booking page ---------- */

.promo-ad {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: min(370px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 6px rgba(13, 36, 25, .06), 0 26px 54px -26px rgba(13, 36, 25, .55);
  padding: 16px;
  animation: adpop .38s cubic-bezier(.2, .85, .3, 1);
}

@keyframes adpop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.promo-ad-label {
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-light);
  padding: 4px 11px;
  border-radius: var(--pill);
  margin-bottom: 11px;
}

.promo-ad-close {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--text-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.promo-ad-close:hover { background: var(--line); color: var(--text); }

.promo-ad .promo-list { margin-bottom: 0; }
.promo-ad .promo-row { margin-bottom: 8px; padding: 11px 13px; }

.promo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--amber-light);
  border-left: 4px solid #e8b04b;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
}
.promo-row:last-child { margin-bottom: 0; }

.promo-tag {
  flex-shrink: 0;
  background: var(--amber);
  color: #fff;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 7px 13px;
  border-radius: var(--pill);
  white-space: nowrap;
}

.promo-row strong { display: block; font-size: .92rem; color: var(--amber); }

.promo-when {
  display: block;
  font-size: .76rem;
  color: var(--text-soft);
  margin-top: 1px;
}

/* old price, crossed out, above the discounted one */
.rate-was {
  display: inline-block;
  font-weight: 400;
  font-size: .76rem;
  color: var(--text-dim);
}

/* banner on the booking page when a promo is running */
.promo-banner {
  background: var(--amber-light);
  color: var(--amber);
  border-left: 4px solid #e8b04b;
  border-radius: 12px;
  padding: 12px 15px;
  font-size: .87rem;
  font-weight: 700;
  margin: 0 0 12px;
}

/* discount line in the price breakdown */
.price-table .discount { color: var(--amber); font-weight: 700; }

/* flag on a whole-resort booking */
.excl-flag {
  display: inline-block;
  margin-left: 6px;
  background: var(--amber-light);
  color: var(--amber);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: var(--pill);
  vertical-align: middle;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 24, 16, .5);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
  overflow-y: auto;
  animation: fade .18s ease;
}

.modal-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-box h2 { font-size: 1.2rem; font-weight: 800; }
.modal-box .sub {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .84rem;
  color: var(--text-soft);
  margin: -12px 0 18px;
}
.modal-box .sub.plain { font-family: inherit; }

.edit-total {
  background: var(--green-light);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: .89rem;
  font-weight: 600;
  color: var(--green-dark);
}
.edit-total strong { color: var(--green-dark); font-size: 1.1rem; font-weight: 800; }

.promo-note { font-weight: 600; color: var(--amber); }

/* ---------- check-in + payment pop-up ---------- */

.ci-section {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 20px 0 4px;
}

.ci-booked {
  font-size: .8rem;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.ci-warn {
  background: var(--amber-light);
  color: var(--amber);
  border-left: 4px solid #e8b04b;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .85rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.ci-box { margin: 4px 0 0; }

.ci-due {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.ci-due strong {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--green-dark);
}

/* cash / e-wallet, as two big tappable targets */
.pay-methods { display: flex; gap: 10px; margin-bottom: 16px; }

.pay-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
}
.pay-opt input { width: auto; margin: 0; accent-color: var(--green); }
.pay-opt.on {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}

/* the number the staff reads out loud */
.ci-change {
  margin: 4px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}
.ci-change:empty { display: none; }
.ci-change.give  { background: var(--green-dark); color: #fff; font-size: 1.5rem; letter-spacing: -.02em; }
.ci-change.exact { background: var(--green-light); color: var(--green-dark); }
.ci-change.short { background: var(--red-light);   color: var(--red); }

/* the line under the remarks box that previews what gets logged */
.note.changed { color: var(--amber); font-weight: 700; }

/* ---------- the remarks log on a booking ---------- */

.remarks {
  background: var(--green-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.remarks h3 {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.remark {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.remark:last-child { border-bottom: none; padding-bottom: 0; }
.remark:first-of-type { padding-top: 0; }

.remark-text {
  display: block;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text);
}
.remark-who {
  display: block;
  font-size: .72rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn-primary,
.modal-actions .btn-ghost { flex: 1; padding: 13px; text-align: center; }
.modal-actions.wrap { flex-wrap: wrap; padding: 0; max-width: none; }
.modal-actions.wrap button { flex: 1 1 140px; }

/* ---------- shared bits ---------- */

.muted { color: var(--text-soft); }

/* ============================================================
   MOBILE
   ============================================================ */

/* sidebar turns into a strip across the top */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; padding: 12px; gap: 14px; }
  .sidebar {
    position: static;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
  }
  .sidebar .brand { padding: 0; margin-right: auto; }
  .nav-label { display: none; }
  .adminnav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .navbtn, .navlink { width: auto; }
  .navbtn.active::before { display: none; }
  .sidebar-foot { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* the picture column steals room on a small screen — make it a banner */
@media (max-width: 820px) {
  .card.has-photo { grid-template-columns: 1fr; }
  .card-photo { height: 160px; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-user #headerName { max-width: 90px; }
  .btn-google.small span { display: none; }   /* icon only, saves room */
  .btn-google.small { padding: 10px 13px; }
  .card-photo { height: 130px; }
  .card-body { padding: 20px; }
  .stepper .txt { font-size: .68rem; }
  .stepper .num { width: 30px; height: 30px; }
  .stepper li::before { top: 14px; }
  .nav-row .btn-ghost { flex: 0 0 92px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 15px; min-height: 100px; }
  .stat strong { font-size: 1.6rem; }
  .card { padding: 18px; }
  .page-head h1 { font-size: 1.35rem; }
  .half { max-width: 100%; }
  .success-actions { flex-direction: column; }
  .filters { width: 100%; }
  .filters input { flex: 1; }
  .search-bar select, .search-bar input, .btn-search { flex: 1 1 100%; }
  .user-chip { margin-left: 0; padding-left: 0; border-left: none; }
  .qf { flex: 1 1 auto; text-align: center; padding: 9px 12px; }
  .qf-select { margin-left: 0; width: 100%; text-align: center; }

  /* 11 columns do not fit a phone — show each booking as a card */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }

  .data-table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 8px 14px;
    background: #fff;
  }
  .data-table tr:hover td { background: transparent; }

  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 0;
    white-space: normal;
    text-align: right;
  }
  .data-table td:last-child { border-bottom: none; }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-dim);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-align: left;
    flex-shrink: 0;
  }

  /* photo stays beside the name in the phone card layout */
  .cot-cell { justify-content: flex-end; }
  .cot-cell span { white-space: normal; text-align: right; }

  /* the stacked cells read right-aligned beside their label */
  .data-table .cell-stack { text-align: right; }

  /* booking number gets its own line, big */
  .data-table td.mono {
    font-size: 1rem;
    border-bottom: 2px solid var(--green-light);
    padding-bottom: 10px;
  }

  .data-table .actions { justify-content: flex-end; padding-top: 10px; }
  .data-table .btn-mini { padding: 8px 16px; font-size: .83rem; }

  /* the empty-state row must not look like a card */
  .data-table td.center { justify-content: center; text-align: center; }
  .data-table td.center::before { content: none; }
  .cal-cell { min-height: 54px; font-size: .72rem; padding: 5px 6px; }
  .cal-nav strong { min-width: 110px; font-size: .82rem; }
  .ref { font-size: 1.7rem; letter-spacing: 1px; }
  .stepper .txt { font-size: .6rem; }
  .type-icon { width: 34px; height: 34px; border-radius: 11px; }
  .type-icon svg { width: 17px; height: 17px; }
  .type-cell { gap: 9px; }
  .cottage-table { font-size: .8rem; }
  .cottage-table th, .cottage-table td { padding: 10px 9px; }
  .thumb { width: 96px; height: 72px; }
  .cottage-desc { display: none; }   /* too cramped on a phone */

  /* the offer spans the bottom of the screen instead of floating */
  .promo-ad { right: 12px; left: 12px; bottom: 12px; width: auto; padding: 14px; }
  .promo-ad .promo-row { flex-wrap: wrap; gap: 10px; }
}

/* ============================================================
   PHONE
   ============================================================
   The admin page is used standing at the gate, one-handed, so
   below this width it stops being a dashboard and behaves like
   an app: tabs along the bottom, pop-ups as sheets that slide
   up from the thumb, and nothing important out of reach.
   ============================================================ */

@media (max-width: 640px) {

  /* --- iOS zooms the whole page when a focused field is under
         16px. Exactly 16px stops that without looking oversized. --- */
  input, select, textarea { font-size: 16px; padding: 12px 14px; }

  /* --- thumb-sized targets. 46px is about a fingertip. --- */
  .btn-primary,
  .btn-search,
  .btn-google,
  .btn-danger { min-height: 46px; }
  .btn-ghost  { min-height: 42px; }
  .btn-mini   { min-height: 38px; padding: 8px 16px; }
  .icon-btn   { width: 42px; height: 42px; }

  /* --- admin: the sidebar becomes a bottom tab bar --- */
  .app { padding: 10px 10px 88px; gap: 12px; }

  .sidebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px -14px rgba(13, 36, 25, .4);
  }
  .sidebar .brand,
  .sidebar-foot,
  .nav-label { display: none; }

  .adminnav { flex-direction: row; width: 100%; gap: 2px; }

  /* icon over label, like every phone app */
  .navbtn {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-align: center;
    border-radius: 12px;
  }
  .navbtn svg { width: 21px; height: 21px; }
  .navbtn.active::before { display: none; }

  /* --- admin top bar: search on its own line --- */
  .appbar { padding: 10px; gap: 10px; border-radius: 18px; }
  .appbar .search-bar { flex: 1 1 100%; }
  .appbar-actions { width: 100%; margin-left: 0; }
  .user-chip { margin-left: auto; padding-left: 0; border-left: none; }
  .who { max-width: 44vw; }

  .page-head { padding: 0 2px; }

  /* --- pop-ups become sheets that slide up from the bottom --- */
  .modal {
    padding: 0;
    align-items: end;
    justify-items: stretch;
  }
  .modal-box {
    max-width: none;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    animation: sheetup .3s cubic-bezier(.2, .85, .3, 1);
  }
  @keyframes sheetup {
    from { transform: translateY(100%); }
    to   { transform: none; }
  }

  /* a grab handle, so it reads as a sheet */
  .modal-box::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin: -8px auto 14px;
    border-radius: 999px;
    background: var(--line);
  }

  .modal-actions.wrap button { flex: 1 1 100%; }

  /* --- check-in: the numbers staff read out loud --- */
  .pay-opt { padding: 15px; font-size: .95rem; }
  .ci-due strong { font-size: 1.8rem; }
  .ci-change.give { font-size: 1.8rem; padding: 18px; }

  /* --- booking page: Back / Next stay under the thumb --- */
  .nav-row {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 18px -20px 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--card);
    border-top: 1px solid var(--line);
  }

  /* the floating offer sits above that bar, not under it */
  .promo-ad { bottom: 84px; }
}

/* ============================================================
   PHONE — THE BOOKING PAGE
   ============================================================
   Nearly every guest books on a phone, so below this width the
   form stops pretending to be a desktop page: it runs edge to
   edge, the two tables become tappable cards, and the step
   names move out of the cramped row under the circles.
   ============================================================ */

@media (max-width: 640px) {

  /* --- edge to edge. The page gutter plus the card margin plus
         the card padding was costing ~70px of a 360px screen. --- */
  .booking-main { padding: 0; }
  .booking-main > .card {
    margin: 0 0 14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .booking-main .card-body { padding: 18px 16px; }
  .booking-main > .card.success { padding: 22px 16px; }

  /* the header and footer keep their gutter */
  .topbar .wrap, .footer .wrap { padding: 0 16px; }

  .card-photo { height: 150px; }

  /* --- stepper: circles only, with the name spelled out below --- */
  .stepper { margin-bottom: 6px; }
  .stepper .txt { display: none; }
  .stepper .num { width: 27px; height: 27px; font-size: .8rem; }
  .stepper li::before { top: 12px; }

  .step-label {
    display: block;
    margin: 0 0 16px;
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
    color: var(--green-dark);
  }

  /* --- the two tables become cards you can actually tap --- */
  .cottage-table thead { display: none; }
  .cottage-table,
  .cottage-table tbody { display: block; width: 100%; }
  .section-bar { border-radius: 14px; margin-bottom: 10px; }
  .table-scroll { overflow: visible; }

  #cottageRows tr,
  #typeRows tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 7px 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  #cottageRows td,
  #typeRows td { display: block; border: none; padding: 0; }
  .cottage-table tr:hover:not(.row-booked) td { background: transparent; }

  /* cottage card: photo, name+desc, then capacity | price, then button */
  #cottageRows td:nth-child(1),
  #cottageRows td:nth-child(2),
  #cottageRows td:nth-child(5) { grid-column: 1 / -1; }

  /* type card: icon+name+desc, then availability | rate, then button */
  #typeRows td:nth-child(1),
  #typeRows td:nth-child(4) { grid-column: 1 / -1; }

  /* the photo earns its place at full width */
  #cottageRows .thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }

  /* there is room for the description again inside a card */
  #cottageRows .cottage-desc,
  #typeRows .cottage-desc {
    display: block;
    max-width: none;
    font-size: .8rem;
  }
  #cottageRows .cottage-name,
  #typeRows .cottage-name { font-size: 1rem; }

  /* the price is what the eye looks for */
  #cottageRows td:nth-child(4),
  #typeRows td:nth-child(3) {
    text-align: right;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--green-dark);
    white-space: nowrap;
  }
  #cottageRows td:nth-child(3),
  #typeRows td:nth-child(2) { font-size: .82rem; }

  /* a thumb-sized Select, not a 70px pill */
  #cottageRows td:nth-child(5) .btn-mini,
  #typeRows td:nth-child(4) .btn-mini {
    width: 100%;
    margin: 3px 0 0;
    padding: 13px;
    font-size: .92rem;
    min-height: 46px;
  }
  #cottageRows td:nth-child(5) .badge,
  #typeRows td:nth-child(4) .badge {
    display: block;
    text-align: center;
    padding: 12px;
  }

  /* the chosen card is obvious at a glance */
  #cottageRows tr.row-selected,
  #typeRows tr.row-selected {
    background: var(--green-light);
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(47, 158, 107, .25);
  }
  #cottageRows tr.row-selected td,
  #typeRows tr.row-selected td { background: transparent !important; }
  #cottageRows tr.row-booked,
  #typeRows tr.row-booked { opacity: .5; }

  /* --- the sticky Back / Next bar follows the new padding --- */
  .booking-main .nav-row { margin: 18px -16px 0; padding-left: 16px; padding-right: 16px; }

  /* --- confirmation: the booking number is the whole point --- */
  .card.success .ref { font-size: 2.1rem; letter-spacing: 1px; }
  .ref-box { padding: 20px 14px; }
  .success-actions .btn-primary,
  .success-actions .btn-ghost { min-height: 48px; }
}

/* very narrow phones: five tabs still have to fit */
@media (max-width: 380px) {
  .navbtn { font-size: .56rem; padding: 7px 1px; }
  .navbtn svg { width: 19px; height: 19px; }
}

/* ---------- print (guest saves the confirmation) ---------- */

@media print {
  .topbar, .footer, .success-actions, .cancel-note, .promo-ad { display: none; }
  .card-photo { display: none; }   /* no photo on a printed confirmation */
  .card { border: none; box-shadow: none; }
  body { background: #fff; }
}
