/* ============================================================
   Brenna's Home Cleaning — styles
   Palette: fresh teal + warm cream, clean and trustworthy.
   Mobile-first; sticky call/text bar on small screens.
   ============================================================ */

:root {
  --teal-900: #0f3d3e;
  --teal-700: #1b6b6d;
  --teal-600: #1f8487;
  --teal-500: #2aa9ad;
  --teal-100: #d7efef;
  --teal-050: #eef8f8;
  --cream:    #fbf7f0;
  --ink:      #14302f;
  --ink-soft: #45605f;
  --line:     #e3ded4;
  --white:    #ffffff;
  --amber:    #f0a830;
  --shadow-sm: 0 2px 8px rgba(15, 61, 62, 0.08);
  --shadow-md: 0 12px 32px rgba(15, 61, 62, 0.14);
  --radius:   16px;
  --radius-sm: 10px;
  --maxw:     1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-card-big, .price {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 760px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-600);
  margin: 0 0 0.5rem;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-700);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
  min-height: 48px; /* generous tap target */
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.btn-icon { font-size: 1.05em; }

.btn-call {
  background: var(--teal-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-call:hover { background: var(--teal-700); color: #fff; }

.btn-text {
  background: #fff;
  color: var(--teal-700);
  border-color: var(--teal-500);
}
.btn-text:hover { background: var(--teal-050); color: var(--teal-700); }
.btn-text--invert {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-text--invert:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn-lg { font-size: 1.08rem; padding: 0.95rem 1.6rem; min-height: 56px; }
.btn-block { display: flex; width: 100%; }

/* ============================ HEADER ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.2rem; }
.top-nav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
}
.top-nav a { color: var(--ink-soft); font-weight: 500; }
.top-nav a:hover { color: var(--teal-700); text-decoration: none; }
.header-call { margin-left: auto; }

/* ============================ HERO ============================ */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, var(--teal-100), transparent 60%),
    linear-gradient(180deg, var(--teal-050), var(--cream));
  padding: 3rem 0 3.5rem;
}
.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin: 0.4rem 0 1rem;
  color: var(--teal-900);
}
.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 0 1.6rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}
.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  padding: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-card { display: flex; }
.hero-card-inner {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  width: 100%;
}
.hero-card-kicker {
  display: inline-block;
  background: var(--amber);
  color: #4a2c00;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin: 0 0 1rem;
}
.hero-card-big { font-size: 1.7rem; margin: 0 0 0.75rem; color: var(--teal-900); }
.hero-card-sub { color: var(--ink-soft); margin: 0 0 1.25rem; }
.hero-card-hours { font-size: 0.85rem; color: var(--ink-soft); text-align: center; margin: 0.75rem 0 0; }

/* ============================ SECTIONS ============================ */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--white); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.25rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 0.6rem; color: var(--teal-900); }
.section-sub { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }

/* ---- Service cards ---- */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.section-alt .card { background: var(--cream); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon {
  font-size: 1.8rem;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--teal-050);
  border-radius: 14px;
  margin-bottom: 0.9rem;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.25rem; }
.card p { margin: 0; color: var(--ink-soft); }

/* ---- Two column (why me) ---- */
.two-col { display: grid; gap: 2.5rem; align-items: center; }
.two-col h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 1rem; color: var(--teal-900); }
.check-list { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; display: grid; gap: 0.8rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--ink-soft); }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--teal-600);
  font-weight: 800;
  background: var(--teal-050);
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.85rem;
}
.check-list strong { color: var(--ink); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat {
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-num { display: block; font-family: "Fraunces", serif; font-size: 1.7rem; font-weight: 600; color: var(--teal-700); }
.stat-label { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.25rem; }

/* ---- Pricing ---- */
.price-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.price-card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.price-card--featured {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-md);
  position: relative;
}
.price-badge {
  position: absolute;
  top: -0.8rem; left: 50%; transform: translateX(-50%);
  background: var(--teal-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}
.price { font-size: 2.2rem; color: var(--teal-900); margin: 0.25rem 0 1rem; }
.price-unit { font-family: "Inter", sans-serif; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.price-prefix { font-family: "Inter", sans-serif; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.price-desc { color: var(--ink-soft); margin: 0 0 1.5rem; }
.price-card .price-desc + .btn { margin-top: auto; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.55rem; color: var(--ink-soft); }
.price-card li { position: relative; padding-left: 1.4rem; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-500); font-weight: 800; }
.price-card .btn { margin-top: auto; }
.price-note { text-align: center; color: var(--ink-soft); font-size: 0.95rem; margin: 1.5rem auto 0; max-width: 620px; }
.price-fineprint { display: block; font-size: 0.82rem; font-style: italic; color: #9a8f7c; margin-bottom: 0.35rem; }

/* ---- Recurring-frequency savings strip ---- */
.freq-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}
.freq {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  text-align: center;
}
.freq-label { font-weight: 700; color: var(--teal-900); }
.freq-save { font-weight: 700; color: var(--teal-600); font-size: 0.9rem; min-height: 1.2em; }
.freq-note { color: var(--ink-soft); font-size: 0.85rem; }

/* ---- Add-ons menu ---- */
.addons { margin-top: 3rem; }
.addons-head { margin-bottom: 1.5rem; }
.addons-head h3 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 0 0 0.4rem; color: var(--teal-900); }
.addon-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  max-width: 760px;
  margin-inline: auto;
}
.addon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
}
.section-alt .addon { background: var(--cream); }
.addon-icon {
  font-size: 1.2rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--teal-050);
  border-radius: 10px;
  flex: none;
}
.addon-name { font-weight: 600; display: flex; flex-direction: column; }
.addon-name small { font-weight: 400; color: var(--ink-soft); font-size: 0.82rem; }
.addon-price {
  font-weight: 700;
  color: var(--teal-700);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- Testimonials ---- */
.quotes {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.quote {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.section-alt .quote { background: var(--teal-050); border-color: var(--teal-100); }
.quote blockquote { margin: 0 0 0.85rem; font-size: 1.05rem; color: var(--ink); font-style: italic; }
.quote figcaption { color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; }
.review-cta { text-align: center; margin-top: 2rem; }
.demo-note, .demo-flag { font-size: 0.82rem; color: #9a8f7c; }
.demo-note { text-align: center; margin-top: 1.5rem; }

/* ---- FAQ ---- */
.faq { display: grid; gap: 0.75rem; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.25rem 1.1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.9rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal-600); font-size: 1.4rem; font-weight: 400; transition: transform 0.15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ============================ CTA BAND ============================ */
.cta-band {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}
.cta-inner h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 0.75rem; }
.cta-inner p { color: rgba(255,255,255,0.85); margin: 0 auto 1.75rem; max-width: 50ch; }
.cta-inner .hero-cta { justify-content: center; margin-bottom: 0; }

/* ============================ FOOTER ============================ */
.site-footer {
  background: var(--teal-900);
  color: rgba(255,255,255,0.8);
  padding: 2.5rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { font-family: "Fraunces", serif; font-size: 1.25rem; color: #fff; margin: 0 0 0.35rem; }
.footer-tag { margin: 0; color: rgba(255,255,255,0.7); }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer-contact a { color: #fff; font-weight: 500; }
.footer-contact a:hover { color: var(--teal-100); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom p { margin: 0; }

/* ============================ MOBILE STICKY BAR ============================ */
.mobile-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom, 0));
  background: rgba(251, 247, 240, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 16px rgba(15,61,62,0.1);
}
.mobile-bar-btn { flex: 1; }

/* Keep content clear of the sticky bar on mobile */
body { padding-bottom: 76px; }

/* ============================ RESPONSIVE ============================ */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: repeat(3, 1fr); }
  .price-cards { grid-template-columns: repeat(3, 1fr); }
  .freq-strip { grid-template-columns: repeat(4, 1fr); }
  .addon-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 880px) {
  .top-nav { display: flex; }
  .header-call { margin-left: 0; }
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
  .two-col { grid-template-columns: 1.1fr 0.9fr; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }

  /* Desktop has visible header + footer contact; hide the sticky bar */
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ============================================================
   ADMIN SCREEN
   ============================================================ */
body.admin { padding-bottom: 0; background: var(--teal-050); }

/* Login gate — full-screen cover until signed in */
.login-gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
}
.login-gate[hidden] { display: none; }
.login-box {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem; width: 100%; max-width: 380px; text-align: center;
}
.login-mark { font-size: 2rem; margin: 0 0 0.25rem; }
.login-box h1 { font-family: "Fraunces", serif; font-size: 1.6rem; color: var(--teal-900); margin: 0 0 0.35rem; }
.login-sub { color: var(--ink-soft); margin: 0 0 1.25rem; }
.login-box input {
  font: inherit; width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.85rem;
}
.login-box input:focus { outline: 2px solid var(--teal-500); border-color: var(--teal-500); }
.login-submit { width: 100%; }
.login-error { color: #c0392b; font-weight: 600; min-height: 1.3em; margin: 0.85rem 0 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.admin-header {
  background: var(--teal-900);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
}
.admin-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.admin-header .brand, .admin-header strong { color: #fff; }
.admin-saved { color: #bdebd0; font-weight: 600; font-size: 0.95rem; }
.admin-main { padding-top: 1.5rem; padding-bottom: 4rem; max-width: 980px; }
.admin-intro {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal-500);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.admin-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.admin-card h2 { margin: 0 0 1rem; font-size: 1.4rem; color: var(--teal-900); }
.admin-card-head { margin-bottom: 1rem; }
.admin-card-head h2 { margin-bottom: 0.35rem; }
.admin-hint, .admin-intro strong { color: var(--ink-soft); }
.admin-hint { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-grid label, .admin-grid-full {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.admin-grid-full { grid-column: 1 / -1; }
.admin input, .admin textarea, .admin select {
  font: inherit; font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink);
  width: 100%;
}
.admin input:focus, .admin textarea:focus, .admin select:focus {
  outline: 2px solid var(--teal-500); outline-offset: 1px; border-color: var(--teal-500);
}

/* Table */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th, .admin-table td {
  padding: 0.5rem 0.5rem; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.admin-table thead th {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-soft); background: var(--teal-050); position: sticky; top: 60px;
}
.admin-table .col-show, .admin-table .col-star, .admin-table .col-x { text-align: center; width: 46px; }
.admin-table .col-price { width: 110px; }
.admin-table .col-basis { width: 180px; }
.admin-table .col-name { width: 180px; }
.admin-table input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal-600); }
.admin-x {
  border: none; background: none; color: #c0392b; font-size: 1.3rem; line-height: 1;
  cursor: pointer; padding: 0.2rem 0.45rem; border-radius: 6px;
}
.admin-x:hover { background: #fbe9e7; }
.admin-x-txt { display: none; } /* shown only in mobile card layout */
.admin-empty { text-align: center; color: var(--ink-soft); padding: 1.5rem; }
.admin-add { margin-top: 1rem; }

/* Actions */
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.admin-key { width: auto; min-width: 180px; max-width: 240px; }
.admin-reset { background: #fff; color: #c0392b; border: 2px solid #e7b7b1; }
.admin-reset:hover { background: #fbe9e7; color: #c0392b; }
.admin-status { min-height: 1.4em; font-weight: 600; margin: 0 0 1.5rem; }
.admin-status--ok { color: var(--teal-700); }
.admin-status--warn { color: #b9770a; }
.admin-status--error { color: #c0392b; }
.admin-publish { background: var(--cream); }
.admin-publish code {
  background: #fff; border: 1px solid var(--line); border-radius: 5px;
  padding: 0.1rem 0.35rem; font-size: 0.9em;
}

/* Testimonials editor */
.admin-subhead { margin: 1.5rem 0 0.75rem; font-size: 1.1rem; color: var(--teal-900); }
.testi-row {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); padding: 0.85rem; margin-bottom: 0.75rem;
}
.testi-foot { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.testi-foot input { flex: 1 1 auto; width: auto; }

/* Price calculator */
.calc-inputs { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.calc-inputs label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.calc-inputs input { width: 120px; }
.calc-adjust { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; }
.calc-adjust label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; }
.calc-adjust input { width: 80px; }
.calc-sqft { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; max-width: 240px; margin-bottom: 1rem; }
.calc-table { width: 100%; border-collapse: collapse; max-width: 460px; }
.calc-table th, .calc-table td { padding: 0.45rem 0.5rem; text-align: left; border-bottom: 1px solid var(--line); }
.calc-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.calc-table td:first-child { font-weight: 600; white-space: nowrap; }
.calc-table input { width: 90px; }
.calc-out-h, .calc-out { text-align: right; }
.calc-out { font-weight: 700; color: var(--teal-700); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-apply { margin-top: 1rem; }
.calc-note { margin: 0.75rem 0 0; }

/* Quote builder */
.admin-header-right { display: inline-flex; align-items: center; gap: 1rem; }
.admin-headerlink { color: #cdece9; font-weight: 600; font-size: 0.95rem; }
.admin-headerlink:hover { color: #fff; }

.q-list { display: grid; gap: 0.55rem; }
.q-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.q-row--on { border-color: var(--teal-500); background: var(--teal-050); }
.q-row-main { flex: 1 1 200px; display: flex; align-items: center; gap: 0.7rem; cursor: pointer; min-width: 0; }
/* .q-row prefix beats the global ".admin input { width:100% }" rule */
.q-row .q-include { width: 22px; height: 22px; accent-color: var(--teal-600); flex: none; }
.q-name { display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.q-name small { font-weight: 400; color: var(--ink-soft); font-size: 0.8rem; }
.q-control { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.q-row .q-qty { width: 64px; padding: 0.45rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.q-cur { color: var(--ink-soft); font-weight: 600; }
.q-unit { color: var(--ink-soft); font-size: 0.85rem; }
.q-line { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 0.25rem; }
.q-row .q-total-input {
  width: 92px; padding: 0.45rem 0.5rem;
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
  font-weight: 700; color: var(--teal-700); text-align: right;
}

.q-total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0.25rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
  font-weight: 600;
}
.q-total { font-family: "Fraunces", serif; font-size: 2rem; color: var(--teal-900); }
.q-preview {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; margin: 0 0 1rem;
  white-space: pre-wrap; word-break: break-word;
  max-height: 300px; overflow: auto;
  font-family: "Inter", sans-serif; font-size: 0.92rem; color: var(--ink); line-height: 1.55;
}

@media (max-width: 620px) {
  .admin-grid { grid-template-columns: 1fr; }
  /* Force the name onto its own line; controls wrap beneath, total stays right. */
  .q-row-main { flex-basis: 100%; }
  .q-control { margin-left: 2.05rem; }  /* line up under the name, past the checkbox */
}

/* ---- Mobile: stack the services table into labeled cards (no sideways scroll) ---- */
@media (max-width: 760px) {
  .admin-table-wrap { overflow-x: visible; }
  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr {
    border: 1px solid var(--line); border-radius: 12px;
    background: #fff; padding: 0.4rem 0.85rem; margin-bottom: 0.85rem;
    box-shadow: var(--shadow-sm);
  }
  .admin-table td {
    border: none; border-bottom: 1px solid var(--teal-050);
    padding: 0.55rem 0; display: flex; align-items: center;
    justify-content: space-between; gap: 0.85rem; text-align: left;
  }
  .admin-table tr td:last-child { border-bottom: none; }
  .admin-table td::before {
    content: attr(data-label); flex: 0 0 auto;
    font-weight: 600; font-size: 0.82rem; color: var(--ink-soft);
  }
  .admin-table td[data-label=""]::before { content: none; }
  /* Short fields stay inline; their control sits to the right */
  .admin-table td input[type="number"],
  .admin-table td input[type="checkbox"] { flex: 0 0 auto; }
  .admin-table .col-price input { width: 120px; max-width: 50%; }
  /* Wide fields stack full-width under their label so nothing is cut off */
  .admin-table .col-name,
  .admin-table .col-desc,
  .admin-table .col-basis {
    flex-direction: column; align-items: stretch; gap: 0.3rem;
  }
  .admin-table .col-name input,
  .admin-table .col-desc input,
  .admin-table .col-basis select { width: 100%; max-width: none; }
  .admin-table .col-name input { font-weight: 600; }
  .admin-table .col-show, .admin-table .col-star, .admin-table .col-x { width: 100%; }
  .admin-table .col-x { justify-content: flex-end; }
  .admin-x {
    font-size: 0.95rem; font-weight: 600;
    border: 1px solid #e7b7b1; border-radius: 8px; padding: 0.4rem 0.8rem;
  }
  .admin-x-txt { display: inline; }
  .admin-table input[type="checkbox"] { width: 24px; height: 24px; }
}
