/* ============================================================
   parcelle.css — shared design system
   Hand-edited from the v2 design review · 25 May 2026
   ------------------------------------------------------------
   Owns: tokens, fonts, topbar, buttons, chips, search field,
         form primitives, modal shell, FAB, avatars, empty
         state, reminder banner, section headers.
   Page CSS keeps only page-specific components (tree, calendar,
   draw toolbar, year track, journal composer, etc.)
   ============================================================ */

@import url('fonts.css');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Colour — ink */
  --ink:           #1c1915;
  --ink-mid:       #443e35;
  --muted:         #7a6f60;

  /* Colour — surface */
  --parchment:     #f5ede0;
  --parchment-2:   #ede3d2;
  --parchment-3:   #e2d6c2;
  --canvas:        #e8e0d0;          /* body bg for full-bleed pages */
  --border:        #cfc4b2;

  /* Colour — brand */
  --forest:        #1b3515;
  --forest-mid:    #2c4f24;
  --forest-text:   #e8ddbf;          /* light text on forest */

  /* Colour — accents */
  --green:         #4a7c3f;          /* primary action */
  --green-hover:   #3b6732;
  --green-pale:    #e4eedf;
  --green-mid:     #d0e5c8;

  --amber:         #9c6f25;          /* seasonal / advisory */
  --amber-pale:    #fdf4e3;
  --amber-mid:     #ecd8a8;
  --amber-border:  rgba(156,111,37,0.30);

  --red:           #8b3a3a;          /* overdue / danger */
  --red-pale:      #fdf0ed;
  --red-border:    rgba(139,58,58,0.22);

  --blue:          #3a6b8b;          /* weather / informational */
  --blue-pale:     #eaf3f8;
  --blue-border:   rgba(58,107,139,0.25);

  /* Type stack — self-hosted, no Google Fonts */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Roboto', system-ui, -apple-system, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* Type scale */
  --t-eyebrow:     0.68rem;
  --t-meta:        0.72rem;
  --t-body:        0.82rem;
  --t-emphasis:    0.92rem;
  --t-h3:          1.05rem;
  --t-h2:          1.20rem;
  --t-h1:          1.65rem;
  --t-display:     2.60rem;

  /* Radius scale — 4-step */
  --r-xs:          3px;              /* inline pills, tags, qty pill */
  --r-sm:          5px;              /* buttons, inputs, small cards */
  --r-md:          8px;              /* cards, banners, modals */
  --r-pill:        999px;            /* filter chips, FAB, avatars-but-square */

  /* Spacing scale (use sparingly — most layouts still use raw rem) */
  --s-1:           0.25rem;
  --s-2:           0.5rem;
  --s-3:           0.75rem;
  --s-4:           1rem;
  --s-5:           1.25rem;
  --s-6:           1.5rem;

  /* Chrome */
  --bar-h:         56px;
  --shadow-card:   0 2px 12px rgba(0,0,0,0.07);
  --shadow-pop:    0 8px 24px rgba(0,0,0,0.18);
  --shadow-fab:    0 4px 16px rgba(74,124,63,0.40);

  /* Avatars */
  --avatar-sm:     22px;
  --avatar-md:     28px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Utility — available on every page via parcelle.css */
.hidden { display: none !important; }
/* Hidden file input — use instead of display:none inside flex containers */
.file-input-hidden { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; pointer-events: none; }
/* Version badge — fixed overlay, bottom-right */
#version-badge { position: fixed; bottom: 8px; right: 12px; font-size: 11px; color: #888; z-index: 9999; pointer-events: none; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--parchment-2);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bar-h);
  background: var(--forest); border-bottom: 2px solid var(--amber);
  display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem;
  z-index: 200;
}
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; flex-shrink: 0; }
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
.logo-word {
  font-family: var(--serif); font-style: italic; font-size: 1.3rem;
  color: var(--forest-text); letter-spacing: 0.01em; line-height: 1;
}
.topbar-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.12); }
.topbar-nav { display: flex; gap: 0.15rem; align-items: center; }
.topbar-nav a {
  color: rgba(232,221,191,0.62); text-decoration: none;
  font-size: var(--t-meta); font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.topbar-nav a:hover  { color: var(--forest-text); background: rgba(255,255,255,0.07); }
.topbar-nav a.active { color: var(--forest-text); background: rgba(255,255,255,0.11); }
.topbar-nav .nav-sep { width: 1px; height: 14px; background: rgba(232,221,191,0.20); margin: 0 0.4rem; flex-shrink: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; position: relative; }
.user-menu-contributions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.user-menu-contributions span { white-space: nowrap; }
.topbar-user { font-size: 0.75rem; color: rgba(232,221,191,0.5); }

.btn-signout, .lang-picker {
  background: none; border: 1px solid rgba(255,255,255,0.14);
  color: rgba(232,221,191,0.6);
  font-size: var(--t-meta); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.28rem 0.7rem; border-radius: var(--r-sm); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  font-family: var(--sans);
}
.btn-signout:hover, .lang-picker:hover {
  border-color: rgba(255,255,255,0.30); color: var(--forest-text);
}
.lang-picker { appearance: none; -webkit-appearance: none; padding: 0.28rem 0.45rem; }

/* ── Page header ────────────────────────────────────────── */
.page { padding-top: var(--bar-h); min-height: 100vh; }
.page-header {
  padding: 1.5rem 0 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.page-eyebrow {
  font-size: var(--t-eyebrow); font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 0.3rem;
}
.page-title {
  font-family: var(--serif); font-size: var(--t-h1); font-weight: 600;
  color: var(--ink); line-height: 1;
}
.page-title em, .page-title span { font-style: italic; color: var(--amber); }
.page-sub {
  font-size: var(--t-body); color: var(--muted);
  margin-top: 0.45rem; max-width: 56ch; line-height: 1.5;
}
.header-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ── Section header (the small "section · count ─────" thing) ── */
.section-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.5rem 0 0.6rem;
}
.section-header:first-child { margin-top: 0; }
.section-title {
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
}
.section-line  { flex: 1; height: 1px; background: var(--parchment-3); }
.section-count { font-size: var(--t-eyebrow); color: var(--muted); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: var(--t-body); font-weight: 500;
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Primary — the "commit" action */
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-hover); border-color: var(--green-hover); }

/* Secondary — dark, low-key (formerly Shelf's primary) */
.btn-secondary { background: var(--forest); color: var(--forest-text); border-color: var(--forest); }
.btn-secondary:hover { background: var(--forest-mid); border-color: var(--forest-mid); }

/* Outline — most common neutral action */
.btn-outline { background: #fff; color: var(--ink-mid); border-color: var(--border); }
.btn-outline:hover { background: var(--parchment); border-color: var(--amber); color: var(--ink); }

/* Ghost — quiet inline action */
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--parchment); color: var(--ink-mid); }

/* Amber — seasonal / advisory action */
.btn-amber { background: var(--amber); color: #fff; border-color: var(--amber); }
.btn-amber:hover { background: #7e5a1e; border-color: #7e5a1e; }
.btn-amber-outline { background: transparent; color: var(--amber); border-color: var(--amber-border); }
.btn-amber-outline:hover { background: var(--amber-pale); }

/* Danger */
.btn-danger { background: #fff; color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: var(--red-pale); }
.btn-ghost-danger { background: transparent; color: var(--red); border: 1px solid var(--red-border); }
.btn-ghost-danger:hover { background: var(--red-pale); }

/* Sizes */
.btn-sm { font-size: var(--t-meta); padding: 0.30rem 0.60rem; }
.btn-xs { font-size: 0.68rem;       padding: 0.20rem 0.50rem; }

/* Layout helpers */
.btn-full   { width: 100%; }
.btn-group  { display: flex; flex-direction: column; gap: 0.5rem; }
.btn-row    { display: flex; gap: 0.5rem; }
.btn-row .btn { flex: 1; }

/* ── Icon-only button (24/28/32 px square, for toolbars) ── */
.icon-btn {
  background: transparent; border: 1px solid transparent;
  border-radius: var(--r-sm);
  width: 28px; height: 28px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { background: var(--parchment-2); color: var(--ink-mid); }
.icon-btn.danger:hover { background: var(--red-pale); color: var(--red); border-color: var(--red-border); }

/* ── Floating Action Button ─────────────────────────────── */
.fab {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--green); color: #fff; border: none;
  border-radius: var(--r-pill);
  padding: 0.7rem 1.3rem 0.7rem 1rem;
  font-family: var(--sans); font-size: var(--t-body); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.5rem;
  box-shadow: var(--shadow-fab);
  cursor: pointer; z-index: 100;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74,124,63,0.45); background: var(--green-hover); }
.fab svg { width: 16px; height: 16px; }

/* Inline FAB group (multiple buttons on a canvas) */
/* Centred over the *canvas*, not the viewport — on the map page the side panel
   (--panel-w) eats the right edge, so plain 50% slides the last FAB under it.
   Same formula as map.css's .toast. Pages without a panel resolve the var to 0. */
.fab-group { position: fixed; bottom: 1.5rem; left: calc(50% - var(--panel-w, 0px) / 2); transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 100; }
.fab-group .fab { position: static; box-shadow: 0 2px 10px rgba(0,0,0,0.18); }
.fab-zone   { background: var(--amber); }
.fab-zone:hover  { background: #7e5a1e; }
.fab-plant  { background: var(--green); }
.fab-plant:hover { background: var(--green-hover); }
.fab-asset  { background: var(--ink-mid); }
.fab-asset:hover { background: var(--ink); }

/* ── Filter chip — true pill ────────────────────────────── */
.filter-chip {
  background: var(--parchment); border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0.28rem 0.80rem;
  font-size: var(--t-meta); font-weight: 500;
  color: var(--muted); cursor: pointer;
  font-family: var(--sans);
  display: inline-flex; align-items: center; gap: 0.32rem;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.filter-chip svg { width: 12px; height: 12px; opacity: 0.7; }
.filter-chip:hover { background: var(--parchment-2); color: var(--ink-mid); }
.filter-chip.active { background: var(--forest); color: var(--forest-text); border-color: var(--forest); }
.filter-chip.active svg { opacity: 1; }
.filter-chip .count { font-size: 0.65rem; opacity: 0.7; }

.filter-sep { width: 1px; height: 16px; background: var(--border); }

/* ── Search field ───────────────────────────────────────── */
.search-field {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--parchment-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.32rem 0.7rem;
  transition: border-color 0.12s, background 0.12s;
}
.search-field:focus-within { border-color: var(--green); background: #fff; }
.search-field svg { width: 14px; height: 14px; opacity: 0.45; flex-shrink: 0; color: var(--muted); }
.search-field input {
  border: none; background: transparent; outline: none;
  font-family: var(--sans); font-size: var(--t-meta);
  color: var(--ink); width: 100%; min-width: 0;
}
.search-field input::placeholder { color: var(--muted); }

/* ── Form primitives ───────────────────────────────────── */
.field { margin-bottom: 0.9rem; }
.field label, .form-label {
  display: block;
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.3rem;
}
.field input, .field select, .field textarea,
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.42rem 0.6rem;
  font-size: var(--t-body);
  color: var(--ink); font-family: var(--sans);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green);
}
.field textarea, .form-textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }

/* ── Modal shell ────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(28,25,21,0.55);
  align-items: center; justify-content: center;
  padding: 1.5rem;
  z-index: 500;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--parchment); border: 1px solid var(--parchment-3);
  border-radius: var(--r-md);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--parchment-3);
}
.modal-title {
  font-family: var(--serif); font-size: var(--t-h3); font-weight: 600;
  color: var(--ink); line-height: 1.2;
}
.modal-title em { font-style: italic; color: var(--amber); }
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  transition: background 0.12s, color 0.12s;
}
.modal-close:hover { background: var(--parchment-2); color: var(--ink); }
.modal-close svg { width: 14px; height: 14px; }
.modal-body { padding: 1.1rem 1.4rem; }
.modal-foot {
  padding: 0.85rem 1.4rem;
  border-top: 1px solid var(--parchment-3);
  display: flex; justify-content: flex-end; gap: 0.5rem;
  background: var(--parchment-2);
  border-radius: 0 0 var(--r-md) var(--r-md);
}

/* ── Avatars (gardener identity) ────────────────────────── */
.avatar {
  width: var(--avatar-sm); height: var(--avatar-sm); border-radius: 50%;
  font-size: 0.62rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-md         { width: var(--avatar-md); height: var(--avatar-md); font-size: 0.72rem; }
.avatar-jan        { background: #d4e8cf; color: #2d5224; }
.avatar-pieter     { background: #d4e0f0; color: #2d4060; }
.avatar-unassigned { background: var(--parchment-3); color: var(--muted); }

/* ── Reminder banner (seasonal / advisory) ──────────────── */
.reminder-banner {
  background: var(--amber-pale); border: 1px solid var(--amber-border);
  border-radius: var(--r-md); padding: 0.85rem 1rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.reminder-icon { flex-shrink: 0; margin-top: 1px; color: var(--amber); }
.reminder-icon svg { width: 18px; height: 18px; }
.reminder-body  { flex: 1; }
.reminder-label {
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 0.25rem;
}
.reminder-text  { font-size: var(--t-body); color: var(--ink-mid); line-height: 1.5; }
.reminder-actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.reminder-dismiss {
  background: none; border: none; cursor: pointer; color: var(--amber);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--r-sm); flex-shrink: 0;
  transition: background 0.12s, color 0.12s; opacity: 0.7;
}
.reminder-dismiss:hover { background: rgba(156,111,37,0.12); opacity: 1; }
.reminder-dismiss svg { width: 12px; height: 12px; }

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 2.5rem 1rem;
  color: var(--muted);
}
.empty-state .empty-mark {
  font-family: var(--serif); font-size: 1.6rem;
  color: var(--amber); margin-bottom: 0.5rem; opacity: 0.55;
  line-height: 1;
}
.empty-state .empty-title {
  font-family: var(--serif); font-size: var(--t-h3);
  color: var(--ink-mid); margin-bottom: 0.4rem;
}
.empty-state .empty-text {
  font-size: var(--t-body); line-height: 1.6;
  max-width: 38ch; margin: 0 auto;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--forest); color: var(--forest-text);
  padding: 0.65rem 1.2rem; border-radius: var(--r-sm);
  font-size: var(--t-body);
  box-shadow: var(--shadow-pop);
  z-index: 600;
  transition: transform 0.25s;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Inline chips (compact tags, not filter chips) ──────── */
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  border-radius: var(--r-xs);
  padding: 0.15rem 0.5rem;
  font-size: 0.67rem; font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.chip-green  { background: var(--green-pale); color: var(--green); border: 1px solid var(--green-mid); }
.chip-amber  { background: var(--amber-pale); color: var(--amber); border: 1px solid var(--amber-border); }
.chip-blue   { background: var(--blue-pale);  color: var(--blue);  border: 1px solid var(--blue-border); }
.chip-red    { background: var(--red-pale);   color: var(--red);   border: 1px solid var(--red-border); }
.chip-muted  { background: var(--parchment-2); color: var(--muted); border: 1px solid var(--border); }
.chip svg    { width: 11px; height: 11px; }

/* ── Visually-hidden (for accessible labels) ────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Topbar placeholder skeleton (before topbar.js renders) ── */
[data-topbar] {
  display: block; height: var(--bar-h);
  background: var(--forest); border-bottom: 2px solid var(--amber);
}

/* ── User trigger & menu ─────────────────────────────────── */
.user-trigger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-pill);
  padding: 0.22rem 0.55rem 0.22rem 0.3rem;
  color: var(--forest-text); cursor: pointer;
  font-family: var(--sans); font-size: var(--t-meta);
  transition: background 0.15s, border-color 0.15s;
}
.user-trigger:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.22); }
.user-trigger.open  { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.28); }

.user-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(156,111,37,0.45); color: var(--forest-text);
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.03em;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name  { color: rgba(232,221,191,0.78); font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { color: rgba(232,221,191,0.45); flex-shrink: 0; transition: transform 0.15s; }
.user-trigger.open .user-caret { transform: rotate(180deg); }

.user-menu {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  background: var(--parchment); border: 1px solid var(--parchment-3);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  width: 224px; z-index: 300;
  overflow: hidden;
}
.user-menu.hidden { display: none; }

.user-menu-head {
  padding: 0.8rem 1rem 0.65rem;
  border-bottom: 1px solid var(--parchment-3);
  background: var(--parchment-2);
}
.user-menu-name  { font-weight: 600; font-size: 0.82rem; color: var(--ink); margin-bottom: 0.1rem; }
.user-menu-email { font-size: 0.72rem; color: var(--muted); word-break: break-all; }

.user-menu-item {
  display: block; width: 100%; padding: 0.55rem 1rem;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 400;
  color: var(--ink-mid); text-decoration: none; background: none; border: none;
  cursor: pointer; text-align: left;
  transition: background 0.1s;
}
.user-menu-item:hover { background: var(--parchment-2); color: var(--ink); }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: var(--red-pale); }
[aria-current="page"].user-menu-item { font-weight: 500; color: var(--ink); background: var(--parchment-2); }

.user-menu-section-label {
  padding: 0.5rem 1rem 0.2rem;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted);
}
.user-menu-lang {
  display: flex; gap: 0.35rem; padding: 0.25rem 1rem 0.55rem;
}
.user-menu-lang-btn {
  flex: 1; padding: 0.28rem 0; border-radius: var(--r-sm);
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  background: var(--parchment-2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.user-menu-lang-btn.active { background: var(--forest); border-color: var(--forest); color: var(--forest-text); }
.user-menu-lang-btn:not(.active):hover { background: var(--parchment-3); color: var(--ink-mid); }

.user-menu-divider { height: 1px; background: var(--parchment-3); margin: 0.2rem 0; }

.menu-count {
  background: var(--amber); color: #fff; font-size: 0.6rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

.topbar-nav .nav-badge {
  background: var(--amber); color: #fff; font-size: 0.55rem; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 999px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center; margin-left: 0.15rem;
  vertical-align: middle;
}

/* ── Catalogue contribution — share nudge on shelf rows ──── */
.share-nudge {
  display: none; grid-column: 1 / -1;
  padding: 0.65rem 1rem; background: var(--amber-pale);
  border-top: 1px dashed var(--amber-border);
  align-items: center; gap: 0.75rem;
}
.share-nudge.open { display: flex; }
.share-nudge .sn-icon { color: var(--amber); flex-shrink: 0; }
.share-nudge .sn-text {
  flex: 1; font-size: var(--t-meta); color: var(--ink-mid); line-height: 1.45;
}
.share-nudge .sn-text b { color: var(--ink); font-weight: 600; }

/* icon btn amber variant — share toggle */
.icon-btn.share-toggle { color: var(--amber); }
.icon-btn.share-toggle:hover { background: var(--amber-pale); color: var(--amber); }
.icon-btn.share-toggle.active { background: var(--amber); color: #fff; }

/* ── Plan board — "plan this for next year" nudge on shelf rows ── */
.plan-nudge {
  display: none; grid-column: 1 / -1;
  padding: 0.65rem 1rem; background: var(--green-pale);
  border-top: 1px dashed var(--green);
  align-items: center; gap: 0.75rem;
}
.plan-nudge.open { display: flex; }
.plan-nudge .sn-icon { color: var(--green-hover); flex-shrink: 0; }
.plan-nudge .sn-text {
  flex: 1; font-size: var(--t-meta); color: var(--ink-mid); line-height: 1.45;
}

/* icon btn green variant — plan toggle */
.icon-btn.plan-toggle { color: var(--green-hover); }
.icon-btn.plan-toggle:hover { background: var(--green-pale); color: var(--green-hover); }
.icon-btn.plan-toggle.active { background: var(--green); color: #fff; }

/* ── Section tabs (garden panel) ─────────────────────────── */
.section-tabs {
  display: flex;
  border-bottom: 1px solid var(--parchment-3);
  padding: 0 1rem;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }

.section-tab {
  position: relative;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 0.76rem; font-weight: 500;
  color: var(--muted);
  padding: 0.65rem 0.6rem;
  white-space: nowrap;
  transition: color 0.15s;
  display: flex; align-items: center; gap: 0.32rem;
}
.section-tab:hover { color: var(--ink-mid); }
.section-tab.active { color: var(--ink); }
.section-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: var(--amber); border-radius: 1px 1px 0 0;
}

.tab-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.tab-dot-green { background: var(--green); }
.tab-dot-amber { background: var(--amber); }
.tab-dot-muted { background: var(--parchment-3); border: 1px solid var(--border); }

.tab-pane          { display: none; }
.tab-pane.active   { display: block; }

/* ── Role banner (member-only info) ──────────────────────── */
.role-banner {
  background: var(--parchment-2); border: 1px solid var(--parchment-3);
  border-radius: var(--r-md); padding: 0.7rem 0.9rem;
  font-size: 0.78rem; color: var(--muted); line-height: 1.5;
  margin-bottom: 1rem;
}

/* ── Seat card (plan tab) ────────────────────────────────── */
.seat-card {
  background: var(--parchment-2); border: 1px solid var(--parchment-3);
  border-radius: var(--r-md); overflow: hidden; margin-bottom: 1.1rem;
}
.seat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.85rem; gap: 0.5rem;
  font-size: 0.8rem; border-bottom: 1px solid var(--parchment-3);
}
.seat-row:last-child { border-bottom: none; }
.seat-label { color: var(--ink-mid); }
.seat-price { font-family: var(--serif); font-size: 0.88rem; color: var(--ink); font-weight: 600; }
.seat-row.total { background: var(--parchment); }
.seat-row.total .seat-label { font-weight: 600; color: var(--ink); }
.seat-renewal { font-size: 0.68rem; color: var(--muted); display: block; margin-top: 0.12rem; }

/* ── Account page ────────────────────────────────────────── */
.account-shell { min-height: 100vh; background: var(--canvas); padding-top: var(--bar-h); }
.account-content { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.account-card {
  background: var(--parchment); border: 1px solid var(--parchment-3);
  border-radius: var(--r-md); margin-bottom: 1.5rem; overflow: hidden;
}
.account-card-head {
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--parchment-3);
}
.account-card-title {
  font-family: var(--serif); font-size: var(--t-h3); font-weight: 600;
  color: var(--ink); margin-bottom: 0.15rem;
}
.account-card-sub { font-size: 0.78rem; color: var(--muted); }
.account-card-body { padding: 1.1rem 1.4rem; }

.pref-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.6rem 0;
  border-bottom: 1px solid var(--parchment-3);
}
.pref-row:last-child { border-bottom: none; }
.pref-label { font-size: 0.82rem; color: var(--ink-mid); font-weight: 500; }

.segmented {
  display: flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden;
  flex-shrink: 0;
}
.segmented-btn {
  padding: 0.28rem 0.75rem;
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  background: none; border: none; cursor: pointer; color: var(--muted);
  transition: background 0.1s, color 0.1s;
}
.segmented-btn.active { background: var(--forest); color: var(--forest-text); }
.segmented-btn:not(.active):hover { background: var(--parchment-2); color: var(--ink-mid); }
.segmented + .segmented { margin-left: 0.5rem; }

.hanko-note {
  font-size: 0.72rem; color: var(--muted); font-style: italic;
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--parchment-3);
}

/* ── Vertex drag handles (boundary / zone editing) ── */
.vertex-handle {
  background: #fff;
  border: 2px solid var(--forest-mid);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.vertex-handle:hover {
  background: var(--forest-mid);
  transform: scale(1.6);
  box-shadow: 0 0 0 4px rgba(44,79,36,0.25);
}
.vertex-handle:active { cursor: grabbing; }
.vertex-handle--zone         { border-color: #9c6f25; }
.vertex-handle--zone:hover   { background: #9c6f25; box-shadow: 0 0 0 4px rgba(156,111,37,0.25); }
.vertex-handle--area         { border-color: #4a7c3f; }
.vertex-handle--area:hover   { background: #4a7c3f; box-shadow: 0 0 0 4px rgba(74,124,63,0.25); }

/* ── Item name tooltip (plant / asset POINT markers) ── */
.item-tip {
  background: rgba(30, 30, 30, 0.82);
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 3px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  white-space: nowrap;
  pointer-events: none;
}
.item-tip::before { display: none; }

/* ══ Responsive & touch (decision 2026-07-15: web targets desktop + tablet) ══ */

/* Safety net: the nav may scroll horizontally rather than ever pushing the
   user menu off-screen (no visible scrollbar). */
.topbar-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }

/* iPad portrait and below: compress the topbar so all seven links + user menu fit. */
@media (max-width: 920px) {
  .topbar { padding: 0 0.75rem; gap: 0.6rem; }
  .topbar-nav a { padding: 0.3rem 0.45rem; letter-spacing: 0.06em; }
  .topbar-nav .nav-sep { margin: 0 0.2rem; }
  .user-name { display: none; }           /* avatar-only user trigger */
}
@media (max-width: 800px) {
  .logo-word, .topbar-sep { display: none; }
}

/* Touch devices: grow the small interactive controls toward the 44px guideline
   without reflowing the desktop design (pointer:coarse only). */
@media (pointer: coarse) {
  .btn      { padding: 0.55rem 1rem; }
  .btn-sm   { padding: 0.45rem 0.8rem; }
  .btn-xs   { padding: 0.35rem 0.6rem; font-size: var(--t-meta); }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .filter-chip { padding: 0.45rem 0.95rem; }
  .modal-close { width: 38px; height: 38px; }
  .reminder-dismiss { width: 36px; height: 36px; }
  .form-input, .form-select, .form-textarea,
  .field input, .field select, .field textarea { padding: 0.55rem 0.7rem; }
}
