/* Brand palette from the original site: warm taupe accent, charcoal text,
   soft off-white backgrounds. */
:root {
  --bg: #faf8f5;
  --bg-alt: #efefee;
  --surface: #ffffff;
  --text: #3e3d3d;
  --ink: #252424;
  --muted: #6b6662;
  --accent: #a3826c;
  --accent-strong: #7d604d; /* accent for text and buttons (AA contrast on white) */
  --accent-soft: #f1e9e3;
  --border: #e3dfda;
  --dark: #2b2a2a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(37, 36, 36, .05), 0 12px 32px rgba(37, 36, 36, .08);
  --max: 1180px;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-serif: "Amiri", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* hidden always wins, even over a component's display: flex/grid. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
picture { display: block; }
a { color: var(--accent-strong); }
h1, h2, h3 {
  font-family: var(--font-display); font-weight: 500; line-height: 1.08;
  margin: 0 0 .45em; color: var(--ink); letter-spacing: .01em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.section.tight { padding-top: 0; }
.eyebrow {
  color: var(--accent-strong); text-transform: uppercase; letter-spacing: .22em;
  font-size: .76rem; font-weight: 600; margin-bottom: 1em;
}
/* An eyebrow inside an h1 keeps the small label look but puts its words in the heading. */
h1 .eyebrow { display: block; font-family: var(--font-body); line-height: 1.65; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.section-head h2 { margin: 0; }
.section-head .lead { margin: 0; }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 2px solid var(--accent-strong);
  background: var(--accent-strong); color: #fff; cursor: pointer; font-size: .95rem;
  letter-spacing: .04em; transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.light { background: #fff; border-color: #fff; color: var(--ink); }
.btn.light:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn.outline-light { background: transparent; border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn.outline-light:hover { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; color: var(--ink); }
.text-link:hover { color: var(--accent-strong); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { text-decoration: none; color: var(--ink); line-height: 1; display: inline-flex; align-items: baseline; gap: 8px; }
.logo b { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; letter-spacing: .12em; }
.logo span { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; color: var(--accent-strong); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent-strong); }
.nav-links .btn { padding: 10px 22px; color: #fff; white-space: nowrap; }
.logo { white-space: nowrap; }
/* Seven menu items: tighten the spacing before the menu collapses at 860px. */
@media (max-width: 1100px) { .nav-links { gap: 18px; } .nav-links .btn { padding: 10px 16px; } }
.nav-links .btn:hover, .nav-links .btn[aria-current="page"] { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.8rem; cursor: pointer; }

/* Hero: full-bleed photo with a dark gradient for legible text */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--dark); }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: center 35%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 18, 18, .7) 0%, rgba(20, 18, 18, .35) 55%, rgba(20, 18, 18, 0) 100%),
    linear-gradient(180deg, rgba(20, 18, 18, .1) 0%, rgba(20, 18, 18, .3) 50%, rgba(20, 18, 18, .85) 100%);
}
.hero .container { position: relative; z-index: 1; padding-top: 140px; padding-bottom: 72px; width: 100%; }
.hero h1 { color: #fff; max-width: 900px; }
.hero h1 .serif { display: block; font-size: .5em; color: #f1e9e3; margin-bottom: .2em; }
.hero .lead { color: rgba(255, 255, 255, .88); max-width: 600px; }
.hero .eyebrow { color: #e9dccf; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-facts { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .25); font-size: .92rem; color: rgba(255, 255, 255, .8); }
.hero-facts strong { display: block; color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; letter-spacing: .04em; }

/* Page header with an optional photo */
.page-header { padding: 88px 0 56px; background: var(--bg-alt); }
.page-header.photo { position: relative; color: #fff; padding: 160px 0 64px; overflow: hidden; background: var(--dark); }
.page-header.photo .hero-media img { object-position: center 30%; }
.page-header.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 18, 18, .2), rgba(20, 18, 18, .78)); }
.page-header.photo .container { position: relative; z-index: 1; }
.page-header.photo h1 { color: #fff; }
.page-header.photo .lead { color: rgba(255, 255, 255, .88); }
.page-header.photo .eyebrow { color: #e9dccf; }

/* Package cards */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative;
  scroll-margin-top: 100px;
}
.card-media { aspect-ratio: 4 / 3; background: var(--bg-alt); overflow: hidden; }
.card-media picture { height: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 28px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.card.featured { outline: 2px solid var(--accent); }
.card.featured::before {
  content: "Most popular"; position: absolute; top: 16px; left: 16px; z-index: 1;
  background: #fff; color: var(--accent-strong); font-size: .72rem; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .1em;
}
.card .tagline { color: var(--accent-strong); font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; margin-bottom: .3em; }
.card h3 { margin-bottom: .2em; }
.card .price { font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); margin: .1em 0 .5em; display: flex; align-items: baseline; gap: 8px; }
.card .price small { font-family: var(--font-body); font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.card ul { list-style: none; padding: 0; margin: 0 0 26px; flex: 1; }
.card li { padding: 7px 0 7px 26px; position: relative; color: var(--muted); font-size: .95rem; border-top: 1px solid var(--border); }
.card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.card .btn { text-align: center; }
.skeleton { min-height: 560px; background: var(--bg-alt); box-shadow: none; }

/* Photo + text split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.top { align-items: start; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-media img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; }
.split-media.stack { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; box-shadow: none; border-radius: 0; }
.split-media.stack picture { border-radius: var(--radius); overflow: hidden; }
.split-media.stack img { aspect-ratio: 3 / 4; }
.split-media.stack picture:last-child { margin-top: 48px; }

/* Event type tiles */
.events { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.event { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; color: #fff; background: var(--dark); }
.event picture { position: absolute; inset: 0; }
.event img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.event:hover img { transform: scale(1.05); }
.event::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 18, 18, .78)); }
.event span { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; font-family: var(--font-display); font-size: 1.45rem; text-transform: uppercase; letter-spacing: .04em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; }
.gallery picture { border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .wide { grid-column: span 2; }
.gallery .tall { grid-row: span 2; }

/* Backdrops */
.backdrops { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; list-style: none; padding: 0; margin: 0; }
.backdrops li { background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.backdrops img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--bg-alt); }
.backdrops span { display: block; padding: 12px 14px; font-size: .9rem; font-weight: 500; color: var(--ink); }

/* Feature tiles */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.feature { padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.feature .icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 16px; }
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.25rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 44px; }
.step { position: relative; padding-top: 64px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 0; left: 0; font-family: var(--font-display); font-size: 2.6rem;
  color: var(--accent); line-height: 1;
}
.step h3 { font-size: 1.3rem; }
.step p { color: var(--muted); }

/* CTA band on a photo */
.cta-band { position: relative; border-radius: 24px; overflow: hidden; color: #fff; text-align: center; padding: 96px 32px; background: var(--dark); }
.cta-band .hero-media img { object-position: center 30%; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: rgba(20, 18, 18, .6); }
.cta-band > :not(.hero-media) { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255, 255, 255, .88); margin: 0 auto 28px; }
.cta-band a:not(.btn) { color: #fff; }

/* Panels, contact list */
.panel { background: var(--surface); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--accent-strong); }

/* Forms */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field.invalid input, .field.invalid select { border-color: #c4363b; }
.field .err { color: #b4232a; font-size: .85rem; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); display: none; }
.form-status.ok { display: block; background: #e8f5ee; border: 1px solid #30a46c; color: #1d5c3d; }
.form-status.error { display: block; background: #fbecec; border: 1px solid #c4363b; color: #7d1c20; }

/* Footer */
.site-footer { background: var(--dark); color: #c9c4bf; padding: 72px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer .logo { color: #fff; }
.site-footer .logo span { color: #d9c6b7; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c9c4bf; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.copyright { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }
.admin-table select { background: var(--bg); color: var(--ink); border: 1px solid var(--border); border-radius: 6px; padding: 4px; }
.table-wrap { overflow-x: auto; }

@media (max-width: 960px) {
  .events { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); padding: 20px; border-bottom: 1px solid var(--border); gap: 18px;
  }
  .nav-links.open { display: flex; }
  .split, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  form .row { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .hero { min-height: 640px; }
  .hero .container { padding-bottom: 48px; }
  .hero-facts { gap: 24px; }
  .page-header.photo { padding: 120px 0 48px; }
  .container { padding: 0 16px; }
  .cta-band { padding: 64px 20px; }
}

@media (max-width: 520px) {
  .events { gap: 12px; }
  .event span { font-size: 1.15rem; left: 14px; bottom: 12px; }
  .gallery { grid-auto-rows: 150px; gap: 10px; }
  .backdrops { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .logo b { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card-media img, .event img { transition: none; }
}

/* Utilities (the CSP forbids inline style attributes) */
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 36px; }
.mt-lg { margin-top: 48px; }
.no-border { border: 0; }
.muted { color: var(--muted); }
.msg { max-width: 320px; white-space: pre-wrap; }
.narrow { max-width: 420px; }
.btn.btn-sm { padding: 6px 16px; margin-left: 12px; }
.center-actions { justify-content: center; }

/* Admin app */
.admin-section { padding-top: 40px; }
.admin h1 { font-size: 2rem; margin-bottom: 18px; }
.admin h2 { font-size: 1.15rem; }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.btn-xs { padding: 7px 14px; font-size: .85rem; }
.btn.danger { color: #b4232a; border-color: #d9a3a5; }
.btn.danger:hover { background: #b4232a; border-color: #b4232a; color: #fff; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-tabs { display: flex; gap: 4px; background: var(--bg-alt); padding: 4px; border-radius: 999px; flex-wrap: wrap; }
.admin-tabs button { white-space: nowrap; border: 0; background: transparent; font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.admin-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-panel { padding: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.stat-value { font-family: var(--font-display); font-weight: 500; font-size: 2rem; color: var(--ink); line-height: 1.2; }
.stat-sub { color: var(--muted); font-size: .85rem; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { border-bottom: 1px solid var(--border); }
.admin-list li:last-child { border-bottom: 0; }
.admin-list li.muted { padding: 10px 0; }
.link-row { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0; padding: 10px 6px; font: inherit; color: var(--text); cursor: pointer; border-radius: 8px; }
.link-row:hover, .link-row:focus-visible { background: var(--accent-soft); }
.link-row strong { color: var(--ink); }
.link-row span { font-size: .88rem; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.admin-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.admin-filters input, .admin-filters select { font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 180px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); vertical-align: middle; margin-left: 4px; }
.pill-new { background: #fdf0d5; color: #7a5200; }
.pill-quoted { background: #e6eefb; color: #23457a; }
.pill-booked { background: #e8f5ee; color: #1d5c3d; }
.pill-completed { background: var(--accent-soft); color: var(--accent-strong); }
.pill-lost { background: #f3e6e6; color: #7d1c20; }
.clash-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: #7d1c20; background: #fbecec; border-radius: 6px; padding: 1px 6px; }
.due { color: #7a5200; font-weight: 600; }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-head h1 { margin: 0; min-width: 220px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 14px 0 20px; }
.cal-dow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-cell { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-height: 96px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-blank { background: transparent; border-color: transparent; }
.cal-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-clash { background: #fdf3f3; border-color: #e0a9ab; }
.cal-num { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0 2px; }
.cal-chip { border: 0; border-radius: 6px; padding: 2px 6px; font: inherit; font-size: .75rem; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--accent-strong); color: #fff; }
.cal-chip.chip-quoted { background: transparent; color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-chip.chip-completed { background: var(--muted); }
@media (max-width: 700px) {
  .cal { display: none; }
}

/* Packages editor */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.pkg-form { padding: 22px; }
.pkg-flags { align-items: center; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--accent-strong); }

/* Inquiry editor dialog */
.admin-dialog { padding: 0; border: 0; border-radius: var(--radius); width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--shadow); background: var(--surface); color: var(--text); }
.admin-dialog::backdrop { background: rgba(37, 36, 36, .45); }
.admin-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.dialog-head, .dialog-foot { display: flex; align-items: center; gap: 8px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; flex: 1; font-size: 1.4rem; }
.dialog-foot { border-bottom: 0; border-top: 1px solid var(--border); }
.dialog-foot .spacer { flex: 1; }
.dialog-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.dialog-body { padding: 16px 22px; overflow-y: auto; }
.dialog-body fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.dialog-body legend { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-strong); margin-bottom: 8px; }
.dialog-body .field { margin-bottom: 12px; }
.dialog-body .field input, .dialog-body .field select, .dialog-body .field textarea { padding: 9px 11px; font-size: .95rem; }
.row.row-3 { grid-template-columns: repeat(3, 1fr); }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.customer-msg { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); white-space: pre-wrap; font-size: .95rem; }
.money-line { margin: 0 0 8px; font-size: .95rem; }
.conflict { background: #fbecec; border: 1px solid #e0a9ab; color: #7d1c20; border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; font-size: .92rem; }
@media (max-width: 520px) {
  .admin-tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; }
  .admin-tabs button { padding: 8px 12px; }
  .stat { padding: 16px; }
  .stat-value { font-size: 1.6rem; }
  .row.row-3 { grid-template-columns: 1fr 1fr; }
  .admin-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
  .admin-dialog form { max-height: 100dvh; }
}

/* Admin: sign-in, toolbar, settings */
.who { align-self: center; }
.label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; color: var(--ink); }
.row.row-4 { grid-template-columns: repeat(4, 1fr); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; align-items: start; }
.settings-grid textarea { font-size: .9rem; }
.addon-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border); }
.addon-row input:not([type="checkbox"]) { font: inherit; font-size: .92rem; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); }
.addon-row input[name="name"], .addon-row input[name="reason"] { flex: 1 1 160px; min-width: 0; }
.addon-row input[name="price"] { width: 90px; }
.addon-new { border-bottom: 0; }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; font: inherit; font-size: .85rem; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--muted); }
code { font-size: .88em; background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; }

/* Admin: staff */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.staff-card.inactive { opacity: .7; }
.staff-picks, .addon-picks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.addon-pick { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.addon-pick input[type="number"] { width: 56px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .9rem; }
.addon-pick input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-strong); }

/* Admin: price, quotes, calendar extras */
.price-box { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.price-table td { padding: 5px 0; border-bottom: 1px solid var(--border); }
.price-table td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.price-table .price-total td { font-weight: 700; color: var(--ink); border-bottom: 0; padding-top: 8px; }
.quote-state p { margin: 0 0 8px; }
.accepted { color: #1d5c3d; }
.cal-blocked { background: repeating-linear-gradient(135deg, var(--bg-alt) 0 6px, var(--surface) 6px 12px); }
.cal-block-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-alt); border-radius: 4px; padding: 0 4px; }
.agenda-day { padding: 8px 0; }
.agenda-date { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agenda-day .admin-list li { border-bottom: 0; }

/* Admin: reports */
.report-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.report-head h1 { margin-bottom: 12px; }
.report-year { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--muted); font-size: .9rem; }
.report-year select { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.bars { margin-top: 12px; }
.bars-plot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; height: 200px; align-items: end; border-bottom: 1px solid var(--border); }
.bar-slot { height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; border-radius: 4px; }
.bar-slot:hover, .bar-slot:focus-visible { background: var(--bg); outline: none; }
.bar { width: min(24px, 70%); background: var(--accent-strong); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars-axis { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; font-size: .75rem; color: var(--muted); text-align: center; padding-top: 4px; }
.bar-tip { position: absolute; z-index: 20; background: var(--ink); color: #fff; font-size: .82rem; padding: 6px 10px; border-radius: 8px; pointer-events: none; max-width: 260px; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .92rem; }
.hbar-track { height: 12px; }
.hbar { display: block; height: 12px; background: var(--accent-strong); border-radius: 0 4px 4px 0; }
.hbar-value { white-space: nowrap; }
.admin-table.compact td { padding: 6px 4px; }
.admin-table.compact td:last-child { text-align: right; font-weight: 600; }

/* Run sheet (printable) */
.runsheet main { padding: 24px 16px 48px; max-width: 820px; }
.sheet { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px; break-inside: avoid; }
.sheet h1 { font-size: 2.2rem; margin-bottom: 4px; }
.sheet h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 18px; }
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th, .sheet-table td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.sheet-table th { width: 32%; color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.pre { white-space: pre-wrap; margin: 0; }
@media print {
  .no-print { display: none; }
  body { background: #fff; }
  .sheet { box-shadow: none; padding: 0; break-after: page; }
}

/* Public quote page */
.quote-wrap { max-width: 920px; }
.nav-links.quote-nav { display: flex; position: static; flex-direction: row; padding: 0; border: 0; box-shadow: none; background: none; }
.quote-head { margin-bottom: 20px; }
.quote-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.quote-page .panel { padding: 24px; }
.quote-features { margin: 14px 0 0; padding-left: 18px; color: var(--muted); }
.terms { white-space: pre-wrap; max-height: 360px; overflow-y: auto; background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .92rem; }
.quote-banner { border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; }
.quote-banner.ok { background: #e8f5ee; border: 1px solid #30a46c; color: #1d5c3d; }
.quote-banner.warn { background: #fdf0d5; border: 1px solid #d9a441; color: #6b4a00; }
.check.field { display: flex; }

/* Quote form availability hint */
.availability { margin: -4px 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .95rem; }
.availability.ok { background: #e8f5ee; color: #1d5c3d; }
.availability.busy { background: #fdf0d5; color: #6b4a00; }

@media (max-width: 760px) {
  .quote-grid { grid-template-columns: 1fr; }
  .row.row-4 { grid-template-columns: 1fr 1fr; }
  .hbars li { grid-template-columns: 1fr auto; }
  .hbars .hbar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* Inventory */
.inv-alerts .alert-list { list-style: none; margin: 0 0 16px; }
.alert-list li, #list-equipment li { padding: 8px 0 8px 12px; border-left: 3px solid var(--border); margin-bottom: 4px; font-size: .92rem; }
.alert-bad { border-left-color: #c4363b !important; }
.alert-warn { border-left-color: #d9a441 !important; }
.alert-info { border-left-color: var(--accent) !important; }
.qty-input { width: 64px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .9rem; background: var(--bg); color: var(--ink); }
.pack-table td, .pack-table th { padding: 6px; vertical-align: middle; }
.pack-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-strong); }
.pack-problem { background: #fdf3f3; }
.addon-row select { font: inherit; font-size: .92rem; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); max-width: 100%; }
.repair { padding: 10px 0; }
.repair .addon-row { border-bottom: 0; padding-bottom: 0; }
.repair [data-repair-field="cost"] { width: 90px; }
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.checklist li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; break-inside: avoid; }
.checklist .box { flex: none; width: 14px; height: 14px; border: 1.5px solid var(--ink); border-radius: 3px; transform: translateY(2px); }
@media (max-width: 600px) { .checklist { columns: 1; } }

/* Print templates */
.t-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.t-tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.t-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.t-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.t-card { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px; background: var(--surface); border: 2px solid transparent; border-radius: var(--radius-sm); box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.t-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: var(--bg-alt); border-radius: 6px; }
.t-card:hover, .t-card:focus-visible { border-color: var(--accent); outline: none; }
.t-card.picked { border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.t-name { font-weight: 600; font-size: .9rem; color: var(--ink); line-height: 1.3; }
.t-layout { font-size: .78rem; color: var(--muted); }
.t-status { text-align: center; margin: 24px 0; }
.t-banner { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; }
.t-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(37, 36, 36, .12); padding: 14px 0; }
.t-sheet-inner { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.t-sheet img { width: 64px; height: 96px; object-fit: contain; background: var(--bg-alt); border-radius: 6px; }
.t-pick-body { flex: 1 1 240px; min-width: 0; }
.t-pick-body .eyebrow { margin: 0; }
.t-pick-title { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.t-text-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
#t-text { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .95rem; background: var(--bg); }
.t-pick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
body.has-sheet .site-footer { padding-bottom: 180px; }
.t-chosen { display: flex; gap: 12px; align-items: center; }
.t-chosen img { width: 72px; height: 108px; object-fit: contain; background: var(--bg-alt); border-radius: 6px; flex: none; }
#q-template .t-chosen img { width: 96px; height: 144px; }
.sheet-template { display: flex; gap: 14px; align-items: flex-start; }
.sheet-template img { width: 120px; height: auto; border-radius: 6px; background: var(--bg-alt); }
@media (max-width: 520px) {
  .t-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .t-sheet { padding: 10px 0; }
  .t-sheet-inner { gap: 10px; }
  .t-sheet img { width: 44px; height: 66px; }
  .t-pick-body { flex-basis: calc(100% - 60px); }
  .t-pick-body .eyebrow, .t-text-label { display: none; }
  .t-pick-title { font-size: .95rem; margin-bottom: 4px; }
  .t-pick-actions { width: 100%; flex-wrap: nowrap; }
  .t-pick-actions .btn { padding: 10px 14px; font-size: .88rem; }
  .t-pick-actions #t-use { flex: 1; }
  body.has-sheet .site-footer { padding-bottom: 150px; }
}
