/* ============================================================
   PlantMapper — application shell
   A software-style UI (sidebar + workspace) that hosts modules.
   Loads AFTER plantmapper.css (brand tokens/fonts) and
   plant-finder-app.css (the Plant Finder module's own styles).

   Everything is namespaced under .app* / .dash* / .mod* so it
   never collides with the marketing site's classes.
   ============================================================ */

:root {
  /* App chrome — a darker, premium identity distinct from the site */
  --app-chrome-1: #16241b;
  --app-chrome-2: #1e3325;
  --app-chrome-line: rgba(255,255,255,.10);
  --app-on-dark: rgba(255,255,255,.92);
  --app-on-dark-mut: rgba(255,255,255,.58);
  --app-canvas: #eef2ea;
  --app-surface: #ffffff;
  --app-accent: #6ea968;      /* brighter leaf for dark chrome */
  --app-accent-deep: #4f7b4a;
  --app-accent-soft: #eaf1e4;
  --app-gold: #e9b85a;
  --app-ink: #1f2a23;
  --app-ink-soft: #4a554c;
  --app-muted: #76817a;
  --app-line: #e4e9df;
  --app-radius: 16px;
  --app-radius-lg: 22px;
  --app-sidebar-w: 264px;
  --app-shadow: 0 1px 2px rgba(20,35,25,.05), 0 6px 22px rgba(20,35,25,.07);
  --app-shadow-lg: 0 10px 40px rgba(20,35,25,.16);
}

/* Reset the page for a full-height app canvas. plantmapper.css sets a
   site background; we take over the whole viewport here. */
html, body.app-body {
  height: 100%;
}
body.app-body {
  margin: 0;
  background: var(--app-canvas);
  color: var(--app-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;              /* the workspace scrolls, not the page */
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--app-sidebar-w) 1fr;
  height: 100vh;
  height: 100dvh;
}

/* ---------------- SIDEBAR ---------------- */
.app-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(185deg, var(--app-chrome-2), var(--app-chrome-1) 70%);
  color: var(--app-on-dark);
  border-right: 1px solid var(--app-chrome-line);
  padding: 18px 14px;
  z-index: 40;
}

.app-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 8px 16px;
  text-decoration: none; color: #fff;
  border-bottom: 1px solid var(--app-chrome-line);
  margin-bottom: 12px;
}
.app-brand-mark {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--app-chrome-line);
  border-radius: 12px;
}
.app-brand-text { line-height: 1.05; }
.app-brand-name { font-family: var(--font-serif); font-size: 1.18rem; font-weight: 600; letter-spacing: .01em; }
.app-brand-sub {
  display: inline-block; margin-top: 3px;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--app-gold);
}

.app-nav { flex: 1; overflow-y: auto; padding: 4px 0; margin: 0 -4px; }
.app-nav::-webkit-scrollbar { width: 6px; }
.app-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }

.app-nav-group { margin: 14px 4px 6px; }
.app-nav-group-label {
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--app-on-dark-mut); padding: 0 10px 6px;
}

.app-nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 9px 11px; margin: 2px 4px;
  border-radius: 11px;
  color: var(--app-on-dark-mut);
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: .93rem; font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.app-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav-item .app-nav-ic { flex: none; width: 20px; height: 20px; opacity: .85; }
.app-nav-item.is-active {
  background: rgba(110,169,104,.18);
  color: #fff;
}
.app-nav-item.is-active::before {
  content: ""; position: absolute; left: -4px; top: 8px; bottom: 8px; width: 3px;
  background: var(--app-accent); border-radius: 0 3px 3px 0;
}
.app-nav-item.is-active .app-nav-ic { opacity: 1; color: var(--app-accent); }
.app-nav-soon {
  margin-left: auto;
  font-size: .58rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--app-on-dark-mut);
  border: 1px solid var(--app-chrome-line); border-radius: 999px;
  padding: 2px 7px;
}

.app-sidebar-foot {
  border-top: 1px solid var(--app-chrome-line);
  padding-top: 12px; margin-top: 8px;
}
.app-back-site {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 11px;
  color: var(--app-on-dark-mut); text-decoration: none; font-size: .9rem;
  transition: background .15s ease, color .15s ease;
}
.app-back-site:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-version { padding: 8px 12px 2px; font-size: .68rem; color: var(--app-on-dark-mut); }

/* ---------------- MAIN / WORKSPACE ---------------- */
.app-main {
  display: flex; flex-direction: column;
  min-width: 0; height: 100vh; height: 100dvh;
  background: var(--app-canvas);
}

.app-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px; height: 64px; flex: none;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--app-line);
  position: sticky; top: 0; z-index: 30;
}
.app-hamburger {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--app-line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; color: var(--app-ink);
}
.app-crumb { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.app-crumb-home {
  color: var(--app-muted); text-decoration: none; font-size: .92rem;
  white-space: nowrap;
}
.app-crumb-home:hover { color: var(--app-accent-deep); }
.app-crumb-sep { color: var(--app-muted); }
.app-crumb-title {
  font-family: var(--font-serif); font-size: 1.12rem; color: var(--app-ink);
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-topbar-spacer { flex: 1; }
.app-topbar-actions { display: flex; align-items: center; gap: 10px; }
.app-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--app-line); background: #fff;
  color: var(--app-ink-soft); font-size: .88rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.app-chip:hover { border-color: var(--app-accent); color: var(--app-accent-deep); }
.app-chip-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent), var(--app-accent-deep));
  color: #fff; display: grid; place-items: center; font-size: .82rem; font-weight: 700;
}

.app-workspace {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 30px 26px 60px;
  scroll-behavior: smooth;
}

/* view container — every routed view lives here and fades in */
.app-view { max-width: 1160px; margin: 0 auto; animation: appViewIn .34s cubic-bezier(.2,.8,.3,1) both; }
@keyframes appViewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-hero {
  position: relative; overflow: hidden;
  border-radius: var(--app-radius-lg);
  padding: clamp(30px, 5vw, 52px) clamp(26px, 5vw, 46px);
  margin-bottom: 32px;
  color: #fff;
  min-height: 250px;
  display: flex; align-items: center;
  background:
    radial-gradient(120% 160% at 85% 0%, rgba(233,184,90,.22), transparent 55%),
    linear-gradient(135deg, #2c4a32, #1c3122);
  box-shadow: var(--app-shadow-lg);
}
/* photographic hero — real garden photo behind a light wash; the
   greeting text sits in the cream PlantMapper Hero Card (site standard) */
.dash-hero.has-photo {
  background:
    linear-gradient(180deg, rgba(10,18,13,.20) 0%, rgba(10,18,13,.34) 100%),
    var(--hero-img) center/cover no-repeat;
}
.dash-hero-inner {
  position: relative; z-index: 1; max-width: 458px;
  background: rgba(250,247,239,.80);            /* frosted warm cream */
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
          backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 22px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 10px 28px rgba(14,28,19,.13);
}
.dash-hero::after {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px;
  background: radial-gradient(circle at center, rgba(110,169,104,.3), transparent 65%);
  pointer-events: none;
}
.dash-greeting { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #1f5730; margin: 0 0 10px; font-weight: 700; }
.dash-hero h1 { font-family: var(--font-serif); font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 12px; line-height: 1.08; letter-spacing: -.01em; color: #14321d; text-shadow: none; }
.dash-hero p { margin: 0 0 24px; color: #33493b; max-width: 54ch; line-height: 1.6; font-size: clamp(1rem, 1.6vw, 1.12rem); }
.dash-hero-cta {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--app-accent-deep); color: #fff;
  font-weight: 650; font-size: 1.02rem; text-decoration: none;
  padding: 13px 24px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(20,40,29,.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.dash-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.3); }

.dash-section { margin-bottom: 38px; }
.dash-section-head {
  display: flex; align-items: baseline; gap: 12px; margin: 0 4px 17px;
  padding-bottom: 12px; border-bottom: 1px solid var(--app-line);
}
.dash-section-head h2 { font-family: var(--font-serif); font-size: 1.35rem; color: var(--app-ink); margin: 0; letter-spacing: -.01em; }
.dash-section-head span {
  font-size: .72rem; color: var(--app-accent-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--app-accent-soft, #eaf1e4); padding: 4px 11px; border-radius: 999px; margin-left: auto;
}

.dash-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ---- module card ---- */
.mod-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 22px;
  text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  box-shadow: var(--app-shadow);
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s ease, border-color .18s ease;
  animation: appCardIn .4s cubic-bezier(.2,.8,.3,1) both;
}
/* a slim coloured accent along the top edge, tinted per module */
.mod-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--mc-a, var(--app-accent)), var(--mc-b, var(--app-accent-deep)));
  opacity: 0; transition: opacity .18s ease;
}
.mod-card.mod-free::before { opacity: 1; }
@keyframes appCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mod-card:hover { transform: translateY(-5px); box-shadow: var(--app-shadow-lg); border-color: #d6e0cf; }
.mod-card:hover::before { opacity: 1; }
.mod-card:focus-visible { outline: 3px solid var(--app-accent); outline-offset: 2px; }

.mod-card-ic {
  width: 56px; height: 56px; border-radius: 15px;
  display: grid; place-items: center; margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--mc-a, var(--app-accent)), var(--mc-b, var(--app-accent-deep)));
  box-shadow: 0 8px 18px rgba(31,42,35,.2);
  transition: transform .18s ease;
}
.mod-card:hover .mod-card-ic { transform: scale(1.06) rotate(-3deg); }
.mod-card-ic svg { width: 28px; height: 28px; }
.mod-card h3 { font-size: 1.16rem; color: var(--app-ink); margin: 0 0 7px; font-weight: 650; letter-spacing: -.01em; }
.mod-card p { margin: 0 0 18px; color: var(--app-ink-soft); font-size: .93rem; line-height: 1.5; flex: 1; }

.mod-card-foot { display: flex; align-items: center; justify-content: space-between; }
.mod-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.mod-badge-live { background: #e4f1de; color: #3f6b41; }
.mod-badge-soon { background: #f1efe8; color: #8a7f5f; }
.mod-open {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .9rem; font-weight: 600; color: var(--app-accent-deep);
}
.mod-card:hover .mod-open svg { transform: translateX(3px); }
.mod-open svg { transition: transform .15s ease; }

/* "coming soon" cards read as calm placeholders, not broken buttons */
.mod-card.is-soon { cursor: pointer; background: #fbfcf9; }
.mod-card.is-soon .mod-card-ic { filter: saturate(.55); opacity: .9; }
.mod-card.is-soon h3 { color: var(--app-ink-soft); }

/* ============================================================
   MODULE VIEW HEADER (shared by module screens)
   ============================================================ */
.mod-head { margin-bottom: 22px; }
.mod-head h1 { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--app-ink); margin: 0 0 6px; }
.mod-head p { margin: 0; color: var(--app-ink-soft); font-size: 1.02rem; max-width: 64ch; line-height: 1.55; }

/* ---- generic Coming Soon screen ---- */
.soon-screen {
  max-width: 640px; margin: 4vh auto; text-align: center;
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-radius: var(--app-radius-lg); padding: 44px 34px;
  box-shadow: var(--app-shadow);
}
.soon-ic {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--mc-a, var(--app-accent)), var(--mc-b, var(--app-accent-deep)));
  box-shadow: 0 10px 26px rgba(31,42,35,.2);
}
.soon-ic svg { width: 38px; height: 38px; }
.soon-screen h1 { font-family: var(--font-serif); font-size: 1.8rem; color: var(--app-ink); margin: 0 0 6px; }
.soon-tag {
  display: inline-block; margin-bottom: 16px;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: #8a7f5f; background: #f1efe8; padding: 5px 12px; border-radius: 999px;
}
.soon-screen p { color: var(--app-ink-soft); line-height: 1.6; margin: 0 auto 24px; max-width: 46ch; }
.soon-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.soon-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1.5px solid transparent; text-decoration: none;
  transition: all .15s ease;
}
.soon-btn-primary { background: var(--app-accent-deep); color: #fff; }
.soon-btn-primary:hover { background: #3f6b41; }
.soon-btn-ghost { background: transparent; border-color: var(--app-line); color: var(--app-ink-soft); }
.soon-btn-ghost:hover { border-color: var(--app-accent); color: var(--app-accent-deep); }
.soon-roadmap {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--app-line);
  text-align: left;
}
.soon-roadmap h4 { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--app-muted); margin: 0 0 12px; }
.soon-roadmap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.soon-roadmap li { display: flex; align-items: flex-start; gap: 10px; font-size: .93rem; color: var(--app-ink-soft); }
.soon-roadmap li svg { flex: none; width: 18px; height: 18px; color: var(--app-accent); margin-top: 1px; }
.soon-tag svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ============================================================
   FREE-PLATFORM MESSAGING + MODULE CARD TREATMENT
   ============================================================ */

/* Dashboard free-version note */
.dash-free {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(180deg, #fbf7ec, #f7f2e4);
  border: 1px solid #ecdfc0;
  border-radius: var(--app-radius);
  padding: 16px 18px; margin-bottom: 30px;
  color: #6a5a34; font-size: .96rem; line-height: 1.5;
}
.dash-free-ic {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--app-gold), #c8912f);
}
.dash-free-ic svg { width: 19px; height: 19px; }
.dash-free strong { color: #4f4322; }

/* Sidebar "New" tag (matches the dashboard ribbon) */
.app-nav-new { color: #fff !important; background: linear-gradient(135deg, #e0952f, #c8712a); border-color: transparent !important; }

/* ---- module cards by access ---- */
.mod-badge-free { background: #e4f1de; color: #3f6b41; }

.mod-lock {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(31,42,35,.06); color: var(--app-muted);
}
.mod-lock svg { width: 16px; height: 16px; }

.mod-card.mod-preview .mod-card-ic { filter: saturate(.6); }
.mod-card.mod-preview h3 { color: var(--app-ink-soft); }

/* ============================================================
   APP POLISH — micro-interactions, focus, empty/scrollbar states
   ============================================================ */
.app-workspace::-webkit-scrollbar { width: 10px; }
.app-workspace::-webkit-scrollbar-thumb { background: #d5ddcd; border-radius: 8px; border: 3px solid var(--app-canvas); }
.app-workspace::-webkit-scrollbar-thumb:hover { background: #bcc9b0; }

.mod-card:active { transform: translateY(-1px) scale(.995); }
.dash-hero-cta:active, .soon-btn:active { transform: translateY(0); }

/* consistent keyboard focus ring across the app */
.app-nav-item:focus-visible, .soon-btn:focus-visible,
.dash-hero-cta:focus-visible, .app-chip:focus-visible, .prem-who-cta:focus-visible {
  outline: 3px solid var(--app-accent); outline-offset: 2px; border-radius: 12px;
}

/* gentle entrance for module (non-dashboard) views */
.mod-head { animation: appViewIn .3s ease both; }

/* "New" badges */
.mod-new-ribbon {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #e0952f, #c8712a);
  padding: 4px 9px; border-radius: 999px; box-shadow: 0 3px 8px rgba(200,113,42,.3);
}
.mod-new, .mod-head h1 .mod-new {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #e0952f, #c8712a);
  padding: 4px 9px; border-radius: 999px; position: relative; top: -3px;
}

/* ============================================================
   PLANT COMPARISON MODULE
   ============================================================ */
.cmp { max-width: 1000px; }
.cmp-picker { margin-bottom: 22px; position: relative; }
.cmp-search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--app-surface); border: 1.5px solid var(--app-line);
  border-radius: 14px; padding: 12px 16px; color: var(--app-muted);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cmp-search-box:focus-within { border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(110,169,104,.15); }
.cmp-search-box input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--app-ink); }
.cmp-hint { margin: 10px 2px 0; font-size: .9rem; color: var(--app-muted); }
.cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cmp-clear {
  margin-top: 8px; border: 1px solid var(--app-line); background: var(--app-surface);
  color: var(--app-ink); border-radius: 999px; padding: 6px 14px; font: inherit;
  font-size: .85rem; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.cmp-clear:hover { border-color: var(--app-accent); color: var(--app-accent); }
.cmp-max {
  margin: 10px 2px 0; font-size: .88rem; font-weight: 600; color: #9a5b2a;
  background: #fbeede; border: 1px solid #f0d6b6; border-radius: 10px; padding: 8px 12px;
}

.cmp-results {
  position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 6px;
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-radius: 14px; box-shadow: var(--app-shadow-lg); overflow: hidden; max-height: 340px; overflow-y: auto;
}
.cmp-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 14px; border: 0; background: transparent; cursor: pointer; font: inherit;
  border-bottom: 1px solid var(--app-line);
}
.cmp-opt:last-child { border-bottom: 0; }
.cmp-opt:hover { background: var(--app-canvas); }
.cmp-opt-dot { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.cmp-opt-name { font-weight: 600; color: var(--app-ink); }
.cmp-opt-bot { font-style: italic; color: var(--app-muted); font-size: .85rem; }
.cmp-opt-type { margin-left: auto; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.cmp-nohit { padding: 14px; color: var(--app-muted); text-align: center; }

/* empty state */
.cmp-empty { text-align: center; padding: 40px 20px; background: var(--app-surface); border: 1px dashed var(--app-line); border-radius: var(--app-radius-lg); }
.cmp-empty-ic { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #c9ab6b, #8f7a3c); }
.cmp-empty-ic svg { width: 30px; height: 30px; }
.cmp-empty h3 { font-family: var(--font-serif); color: var(--app-ink); margin: 0 0 6px; }
.cmp-empty p { color: var(--app-ink-soft); margin: 0 auto 16px; max-width: 42ch; }
.cmp-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cmp-quick-btn { cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; color: var(--app-accent-deep); background: #eef4ea; border: 1px solid #d6e4cd; padding: 8px 14px; border-radius: 999px; transition: all .13s ease; }
.cmp-quick-btn:hover { background: var(--app-accent); color: #fff; border-color: var(--app-accent); }

/* comparison table */
.cmp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp-table { min-width: 520px; border: 1px solid var(--app-line); border-radius: var(--app-radius); overflow: hidden; background: var(--app-surface); }
.cmp-row { display: grid; grid-template-columns: 150px repeat(var(--cols, 2), 1fr); border-bottom: 1px solid var(--app-line); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row:not(.cmp-row-head):nth-child(even) { background: #fafbf8; }
.cmp-col { padding: 12px 14px; min-width: 0; }
.cmp-col-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--app-muted); font-weight: 600; background: #f6f8f3; display: flex; align-items: center; }
.cmp-col-plant { font-size: .92rem; color: var(--app-ink); border-left: 1px solid var(--app-line); }

.cmp-row-head { background: var(--app-surface); position: sticky; top: 0; }
.cmp-row-head .cmp-col { padding: 0; }
.cmp-row-head .cmp-col-plant { padding: 0 0 12px; text-align: center; }
.cmp-phead { position: relative; aspect-ratio: 3 / 2; max-height: 150px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); background: linear-gradient(135deg, var(--a), var(--b)); overflow: hidden; }
.cmp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* accurate species photo lazy-loaded by window.PlantPhotos (Wikimedia) */
.cmp-phead .card-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.cmp-phead .card-photo.loaded { opacity: 1; }
.cmp-phead-glyph svg { width: 34px; height: 34px; }
.cmp-remove { position: absolute; top: 6px; right: 6px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.cmp-remove:hover { background: rgba(0,0,0,.55); }
.cmp-pname { font-family: var(--font-serif); font-weight: 600; color: var(--app-ink); font-size: 1.05rem; padding: 10px 8px 0; line-height: 1.15; }
.cmp-pbot { font-style: italic; color: var(--app-muted); font-size: .8rem; padding: 2px 8px 0; }
.cmp-pview { display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 600; color: var(--app-accent-deep); text-decoration: none; }
.cmp-pview:hover { text-decoration: underline; }

.cmp-pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.cmp-pill-low, .cmp-pill-hi { background: #e4f1de; color: #3f6b41; }
.cmp-pill-medium, .cmp-pill-mid { background: #fbf0d8; color: #8a6d1e; }
.cmp-pill-high { background: #f7e2df; color: #9c4a3c; }
.cmp-rating { font-weight: 600; }
.cmp-rating-hi { color: #3f6b41; }
.cmp-rating-mid { color: #8a6d1e; }
.cmp-rating-lo { color: #9c8f7a; }
.cmp-yes { color: #3f6b41; font-weight: 600; }
.cmp-no { color: var(--app-muted); }

@media (max-width: 560px) {
  .cmp-row { grid-template-columns: 116px repeat(var(--cols, 2), 1fr); }
  .cmp-col { padding: 10px; font-size: .86rem; }
}

/* ============================================================
   GARDEN DESIGNER MODULE
   ============================================================ */
.gd { max-width: 1000px; }
.gd-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.gd-add {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit;
  font-weight: 650; font-size: .98rem; color: #fff; border: 0;
  background: var(--app-accent-deep); padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 5px 14px rgba(66,101,68,.24); transition: transform .15s ease, background .15s ease;
}
.gd-add:hover { background: #3f6b41; transform: translateY(-1px); }
.gd-add svg { width: 18px; height: 18px; }
.gd-count { font-size: .92rem; color: var(--app-muted); font-weight: 600; }
.gd-spacer { flex: 1; }
.gd-saved { font-size: .82rem; color: var(--app-muted); display: inline-flex; align-items: center; gap: 6px; }
.gd-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--app-accent); }
.gd-clear { cursor: pointer; font: inherit; font-size: .9rem; color: var(--app-ink-soft); background: transparent; border: 1px solid var(--app-line); padding: 8px 14px; border-radius: 999px; }
.gd-clear:hover { border-color: #d98b7a; color: #a85641; }

.gd-plot { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }

/* empty state */
.gd-empty { flex: 1; text-align: center; padding: 44px 20px; background: var(--app-surface); border: 1px dashed var(--app-line); border-radius: var(--app-radius-lg); }
.gd-empty-ic { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--app-accent), var(--app-accent-deep)); }
.gd-empty-ic svg { width: 32px; height: 32px; }
.gd-empty h3 { font-family: var(--font-serif); color: var(--app-ink); margin: 0 0 8px; }
.gd-empty p { color: var(--app-ink-soft); max-width: 46ch; margin: 0 auto 18px; line-height: 1.55; }
.gd-add-first { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 650; color: #fff; border: 0; background: var(--app-accent-deep); padding: 11px 20px; border-radius: 999px; }
.gd-add-first:hover { background: #3f6b41; }
.gd-add-first svg { width: 18px; height: 18px; }

/* bed cards — width scales with chosen size */
/* overflow must stay VISIBLE so the plant-search dropdown is not clipped by the card */
.gd-bed { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: var(--app-radius); overflow: visible; box-shadow: var(--app-shadow); display: flex; flex-direction: column; }
.gd-size-s { width: 220px; }
.gd-size-m { width: 300px; }
.gd-size-l { width: 100%; max-width: 620px; }
.gd-bed-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); border-radius: var(--app-radius) var(--app-radius) 0 0; }
.gd-bed-name { flex: 1; min-width: 0; border: 0; background: rgba(255,255,255,.16); color: #fff; font: inherit; font-weight: 650; font-size: 1rem; padding: 6px 10px; border-radius: 8px; }
.gd-bed-name::placeholder { color: rgba(255,255,255,.7); }
.gd-bed-name:focus { outline: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.24); }
.gd-bed-del { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(0,0,0,.18); color: #fff; cursor: pointer; display: grid; place-items: center; }
.gd-bed-del:hover { background: rgba(0,0,0,.34); }
.gd-bed-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.gd-sizes { display: flex; gap: 6px; }
.gd-size { flex: 1; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; color: var(--app-ink-soft); background: var(--app-canvas); border: 1px solid var(--app-line); padding: 5px 8px; border-radius: 8px; }
.gd-size.is-on { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.gd-plants { display: flex; flex-wrap: wrap; gap: 6px; min-height: 20px; }
.gd-empty-note { font-size: .85rem; color: var(--app-muted); font-style: italic; }
.gd-plant { display: inline-flex; align-items: center; gap: 4px; background: var(--app-canvas); border: 1px solid var(--app-line); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: .85rem; }
.gd-plant a { color: var(--app-ink); text-decoration: none; }
.gd-plant a:hover { color: var(--app-accent-deep); text-decoration: underline; }
.gd-plant-x { width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: var(--app-muted); cursor: pointer; font-size: 14px; line-height: 1; }
.gd-plant-x:hover { background: #f0dcdc; color: #a85641; }
.gd-addplant { position: relative; }
.gd-psearch { width: 100%; box-sizing: border-box; border: 1px solid var(--app-line); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .9rem; color: var(--app-ink); }
.gd-psearch:focus { outline: 0; border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(110,169,104,.15); }
.gd-presults { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--app-surface); border: 1px solid var(--app-line); border-radius: 10px; box-shadow: var(--app-shadow-lg); overflow-y: auto; max-height: 320px; -webkit-overflow-scrolling: touch; }
.gd-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; font: inherit; padding: 8px 12px; border-bottom: 1px solid var(--app-line); }
.gd-opt:last-child { border-bottom: 0; }
.gd-opt:hover, .gd-opt.is-active { background: var(--app-canvas); }
.gd-opt-thumb { flex: none; width: 30px; height: 30px; border-radius: 7px; background: var(--app-canvas) center/cover no-repeat; border: 1px solid var(--app-line); }
.gd-opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.gd-opt-name { font-weight: 600; color: var(--app-ink); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-opt-bot { font-size: .74rem; font-style: italic; color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-opt-type { flex: none; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.gd-opt-msg { padding: 12px; color: var(--app-muted); font-size: .88rem; text-align: center; }

/* ---- Garden Bed Planner: free explainer + premium coming-soon (V1.1) ---- */
.gbp-eyebrow {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.gbp-eyebrow-free { background: var(--app-accent, #5e8a5a); color: #fff; }
.gbp-eyebrow-soon { background: rgba(255,255,255,.16); color: #fff; }
.gbp-info {
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-left: 4px solid var(--app-accent, #5e8a5a);
  border-radius: var(--app-radius); padding: 18px 20px; margin: 0 0 22px;
}
.gbp-info h2 { margin: 0 0 12px; font-size: 1.08rem; color: var(--app-ink); }
.gbp-info ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.gbp-info li { margin: 4px 0; color: var(--app-ink-soft, #4a554c); font-size: .92rem; break-inside: avoid; }
.gbp-soon {
  position: relative; margin: 26px 0 8px; padding: clamp(22px, 3vw, 32px);
  border-radius: var(--app-radius); color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 180% at 90% 0%, rgba(233,184,90,.22), transparent 55%),
    linear-gradient(135deg, #2c4a32, #17281c);
  box-shadow: var(--app-shadow-lg);
}
.gbp-soon h2 { margin: 0 0 8px; font-family: var(--app-serif, Georgia, serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: #fff; }
.gbp-soon > p { margin: 0 0 18px; color: rgba(255,255,255,.85); max-width: 60ch; }
.gbp-feat { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 22px; }
.gbp-feat li { position: relative; padding-left: 26px; color: rgba(255,255,255,.9); font-size: .92rem; line-height: 1.4; }
.gbp-feat li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 10px; height: 6px;
  border-left: 2px solid var(--app-sun, #e9b85a); border-bottom: 2px solid var(--app-sun, #e9b85a);
  transform: rotate(-45deg);
}
.gbp-soon-btn {
  display: inline-block; background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 9px 20px; font-weight: 700; font-size: .9rem; letter-spacing: .02em;
  cursor: default; user-select: none;
}
/* Studio waiting-list sign-up (within the coming-soon panel) */
.gbp-waitlist { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); }
.gbp-waitlist h3 { margin: 0 0 6px; font-size: 1.05rem; color: #fff; }
.gbp-waitlist > p { margin: 0 0 14px; color: rgba(255,255,255,.85); max-width: 60ch; font-size: .92rem; }
.gbp-wl-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.gbp-wl-input {
  flex: 1 1 220px; min-width: 0; padding: 11px 15px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.96);
  color: var(--app-ink); font: inherit;
}
.gbp-wl-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(233,184,90,.45); }
.gbp-wl-btn {
  flex: none; padding: 11px 24px; border-radius: 999px; border: 0;
  background: var(--app-gold, #e9b85a); color: #3a2b00; font: inherit; font-weight: 700;
  cursor: pointer; transition: filter .15s ease;
}
.gbp-wl-btn:hover { filter: brightness(1.06); }
.gbp-wl-note { margin: 10px 0 0; font-size: .76rem; color: rgba(255,255,255,.62); max-width: 62ch; }
.gbp-wl-msg { margin: 12px 0 0; font-size: .9rem; font-weight: 600; padding: 10px 14px; border-radius: 10px; max-width: 62ch; }
.gbp-wl-ok { background: rgba(255,255,255,.15); color: #fff; }
.gbp-wl-err { background: rgba(220,120,90,.24); color: #ffdccf; }
@media (max-width: 480px) { .gbp-wl-btn { flex: 1 1 auto; } }


.gd-add:focus-visible, .gd-add-first:focus-visible, .gd-size:focus-visible,
.gd-clear:focus-visible, .gd-companion-btn:focus-visible, .gd-opt:focus-visible {
  outline: 3px solid var(--app-accent); outline-offset: 2px;
}

@media (max-width: 560px) {
  .gd-size-s, .gd-size-m, .gd-size-l { width: 100%; max-width: none; }
}

/* ============================================================
   GARDEN PLANNER MODULE (season job board)
   ============================================================ */
.gp { max-width: 1000px; }
.gp-add { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gp-text { flex: 1 1 260px; min-width: 0; border: 1px solid var(--app-line); border-radius: 12px; padding: 11px 15px; font: inherit; font-size: 1rem; color: var(--app-ink); background: var(--app-surface); }
.gp-text:focus { outline: 0; border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(110,169,104,.15); }
.gp-season { border: 1px solid var(--app-line); border-radius: 12px; padding: 0 14px; font: inherit; font-size: .95rem; color: var(--app-ink); background: var(--app-surface); cursor: pointer; }
.gp-addbtn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit; font-weight: 650; color: #fff; border: 0; background: var(--app-accent-deep); padding: 11px 20px; border-radius: 12px; transition: background .15s ease; }
.gp-addbtn:hover { background: #3f6b41; }
.gp-addbtn svg { width: 16px; height: 16px; }
.gp-saved { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--app-muted); margin-bottom: 18px; }
.gp-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--app-accent); }

.gp-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 6px; }
.gp-col { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: var(--app-radius); overflow: hidden; box-shadow: var(--app-shadow); }
.gp-col-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; background: linear-gradient(135deg, var(--a), var(--b)); }
.gp-col-count { font-family: var(--font-sans); font-size: .78rem; font-weight: 600; background: rgba(0,0,0,.2); padding: 2px 8px; border-radius: 999px; }
.gp-list { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.gp-empty-note { color: var(--app-muted); font-size: .85rem; font-style: italic; padding: 6px 4px; }
.gp-task { display: flex; align-items: flex-start; gap: 9px; background: var(--app-canvas); border: 1px solid var(--app-line); border-radius: 10px; padding: 9px 10px; }
.gp-task-text { flex: 1; font-size: .92rem; color: var(--app-ink); line-height: 1.35; }
.gp-task.is-done .gp-task-text { text-decoration: line-through; color: var(--app-muted); }
.gp-check { position: relative; flex: none; width: 20px; height: 20px; cursor: pointer; }
.gp-check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.gp-check span { display: block; width: 20px; height: 20px; border: 2px solid var(--app-line); border-radius: 6px; background: #fff; transition: all .12s ease; }
.gp-check input:checked + span { background: var(--app-accent); border-color: var(--app-accent); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>"); background-size: 15px; background-repeat: no-repeat; background-position: center; }
.gp-check input:focus-visible + span { outline: 3px solid var(--app-accent); outline-offset: 2px; }
.gp-task-x { flex: none; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--app-muted); cursor: pointer; font-size: 15px; line-height: 1; }
.gp-task-x:hover { background: #f0dcdc; color: #a85641; }
.gp-addbtn:focus-visible, .gp-text:focus-visible, .gp-season:focus-visible { outline: 3px solid var(--app-accent); outline-offset: 2px; }

@media (max-width: 760px) { .gp-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .gp-board { grid-template-columns: 1fr; } }

/* ============================================================
   PLANT FINDER MODULE — host overrides
   The Plant Finder brings its own .pf-* styles. Inside the app we
   only need to neutralise the standalone page's hero offset and let
   it sit naturally in the workspace.
   ============================================================ */
.app-view .pf-wizard { margin-top: 0; box-shadow: var(--app-shadow); }
.app-view .pf-wrap { padding: 0; }
.app-view .pf-results { padding-top: 30px; }
/* toast is shared and positioned fixed — fine as-is */

/* ============================================================
   MOBILE / RESPONSIVE — sidebar becomes an off-canvas drawer
   ============================================================ */
.app-backdrop {
  position: fixed; inset: 0; background: rgba(15,25,18,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 35;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 280px;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.2,.8,.3,1);
    box-shadow: var(--app-shadow-lg);
  }
  body.app-body.nav-open .app-sidebar { transform: translateX(0); }
  body.app-body.nav-open .app-backdrop { opacity: 1; visibility: visible; }
  .app-hamburger { display: inline-flex; }
  .app-workspace { padding: 22px 16px 60px; }
  .dash-hero { padding: 26px 22px; }
}

@media (max-width: 560px) {
  .app-topbar { padding: 0 14px; height: 58px; }
  .app-topbar-actions .app-chip-label { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .app-view, .mod-card { animation: none; }
  .app-workspace { scroll-behavior: auto; }
}

/* ============================================================
   PHOTOGRAPHIC ACCENTS  (garden imagery, tastefully applied)
   Reuses verified Pexels photography from the website so the app
   feels alive while staying a clean software interface.
   ============================================================ */

/* Empty states — a faint garden behind a near-white wash (text stays crisp) */
.gd-empty.has-photo, .cmp-empty.has-photo {
  position: relative; overflow: hidden; border-style: solid; border-color: var(--app-line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.965)),
    var(--empty-img) center/cover no-repeat;
}

/* Coming-soon screens — a real photo banner with the icon straddling it */
.soon-screen.has-photo { padding-top: 0; overflow: hidden; }
.soon-photo {
  height: 156px; margin: 0 -34px 22px;
  border-radius: var(--app-radius-lg) var(--app-radius-lg) 0 0;
  background: var(--soon-img) center/cover no-repeat; position: relative;
}
.soon-photo::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(20,35,25,.22), rgba(20,35,25,.05) 45%, rgba(255,255,255,.0));
}
.soon-screen.has-photo .soon-ic {
  margin-top: -60px; position: relative; z-index: 1;
  border: 4px solid var(--app-surface);
  box-shadow: 0 12px 26px rgba(31,42,35,.22);
}
@media (max-width: 560px) {
  .soon-photo { margin: 0 -30px 20px; height: 130px; }
}

/* Softer, larger empty-state icon tiles for a premium feel */
.gd-empty-ic, .cmp-empty-ic { box-shadow: 0 10px 24px rgba(31,42,35,.18); }

/* Garden Bed Planner — accurate species thumbnails on selected-plant chips */
.gd-plant { padding-left: 4px; }
.gd-plant-thumb {
  position: relative; flex: none; width: 22px; height: 22px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(135deg, #7ba86f, #4c7a4a);
}
.gd-plant-thumb .card-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.gd-plant-thumb .card-photo.loaded { opacity: 1; }
.gd-plant-thumb .pm-photo-credit { display: none; }   /* too small for a caption; credit shows on the profile */
