/* ─────────────────────────────────────────────────────────────────
   Assisplant · Calla Lily palette · 1855 botanical edition
   ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap');

:root {
  --cream:         #f7f5f0;  /* aged paper */
  --cream-card:    #ffffff;  /* pure white for elevated surfaces */
  --cream-mid:     #ede9e0;  /* inset, hover backgrounds */
  --green:         #3d6b4f;  /* Calla lily leaf — primary */
  --green-mid:     #6a9b80;  /* secondary, ornament strokes */
  --green-dark:    #264d38;  /* primary hover */
  --gold:          #b89a3a;  /* spadix gold — accent only */
  --ink:           #1a1914;  /* warm near-black */
  --ink-muted:     #5c5a52;  /* secondary text */
  --ink-faint:     #9c9890;  /* tertiary, labels, placeholders */
  --border:        #ccc9be;  /* warm rule */
  --border-light:  #e2dfd6;  /* inner dividers */
  --red-muted:     #8b3a2d;  /* overdue state */
}

/* ── SVG ornament strings — referenced by ::after pseudo-elements.
   Both are the same calla lily tailpiece; the header version is
   rendered in green, the section rule version in the border tone. */
:root {
  --ornament-green: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24' fill='none'%3E%3Cpath d='M8 22C5 18 1.5 13 2 7C2.5 2.5 5 0.5 8 0.5C11 0.5 13.5 2.5 14 7C14.5 13 11 18 8 22Z' stroke='rgb(106,155,128)' stroke-width='1.1'/%3E%3Cpath d='M8 21C7.5 17 6.5 12 6.5 8C6.5 5 7.5 2.5 8 1.5' stroke='rgb(106,155,128)' stroke-width='0.45' opacity='0.55'/%3E%3Cpath d='M9.5 20C10 16 10.5 10.5 10 7C9.7 5 9 3.5 8.5 4.5' stroke='rgb(184,154,58)' stroke-width='1.0' stroke-linecap='round'/%3E%3Cpath d='M8 22Q7.5 23 7 24' stroke='rgb(106,155,128)' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
  --ornament-muted: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24' fill='none'%3E%3Cpath d='M8 22C5 18 1.5 13 2 7C2.5 2.5 5 0.5 8 0.5C11 0.5 13.5 2.5 14 7C14.5 13 11 18 8 22Z' stroke='rgb(180,175,166)' stroke-width='1.1'/%3E%3Cpath d='M8 21C7.5 17 6.5 12 6.5 8C6.5 5 7.5 2.5 8 1.5' stroke='rgb(180,175,166)' stroke-width='0.45' opacity='0.55'/%3E%3Cpath d='M9.5 20C10 16 10.5 10.5 10 7C9.7 5 9 3.5 8.5 4.5' stroke='rgb(184,154,58)' stroke-width='0.85' stroke-linecap='round' opacity='0.75'/%3E%3Cpath d='M8 22Q7.5 23 7 24' stroke='rgb(180,175,166)' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Document ─────────────────────────────────── */
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* ── Header ───────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0 1.25rem;
}

.logo {
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--green);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover { color: var(--green); }

/* ── Header rule — thin line with botanical tailpiece at right end.
   The ornament sits on the rule like a printer's endpiece. ──────── */
.header-rule {
  position: relative;
  height: 0.5px;
  background: var(--border);
  margin-bottom: 2.5rem;
}

.header-rule::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 30px;
  background-image: var(--ornament-green);
  background-repeat: no-repeat;
  background-size: contain;
}

/* ── Section rule — same ornament, lighter tone ─── */
.botanical-rule {
  position: relative;
  height: 0.5px;
  background: var(--border-light);
  margin: 2rem 0;
}

.botanical-rule::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 21px;
  background-image: var(--ornament-muted);
  background-repeat: no-repeat;
  background-size: contain;
}

/* ── Typography ──────────────────────────────── */
h1 {
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

.caption {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 0.5px solid transparent;
  border-radius: 1px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.5;
}

.btn-primary {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-secondary:hover { background: var(--cream-mid); }

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}

/* ── Forms ────────────────────────────────────── */
label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: 1px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream-card);
  margin-bottom: 1rem;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

/* ── Custom radio buttons — clear checked/unchecked distinction ─ */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border: 0.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  background: var(--cream-card);
  transition: border-color 0.15s;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

input[type="radio"]:checked {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 3.5px var(--cream-card);
}

/* ── Labels wrapping radio inputs — reset the uppercase field-label style ─ */
label:has(input[type="radio"]),
label:has(input[type="checkbox"]) {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  cursor: pointer;
  width: fit-content;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
}

input::placeholder, textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='rgb(156,152,144)' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px 6px;
  padding-right: 2rem;
  cursor: pointer;
}

/* ── Status text ──────────────────────────────── */
.status-overdue   { color: var(--red-muted); }
.status-due-today { color: var(--gold); }
.status-ok        { color: var(--green); }

/* ── Back link ────────────────────────────────── */
.back-link {
  display: inline-block;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-faint);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.back-link:hover { color: var(--ink-muted); }

/* ── Data table — thin-ruled rows, italic labels ─ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.data-table td {
  padding: 0.55rem 0;
  border-bottom: 0.5px solid var(--border-light);
  vertical-align: top;
}

.data-table td:first-child {
  font-style: italic;
  color: var(--ink-muted);
  width: 42%;
  padding-right: 1rem;
}

.data-table tr:last-child td { border-bottom: none; }

/* ── Task list ────────────────────────────────── */
.task-list { list-style: none; }

.task-item {
  padding: 1.1rem 0;
  border-bottom: 0.5px solid var(--border-light);
}

.task-item:first-child {
  border-top: 0.5px solid var(--border-light);
}

.task-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.task-item-name { font-weight: 600; font-size: 1.05rem; }

.task-item-meta {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.task-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Plant list ───────────────────────────────── */
.plant-list { list-style: none; }

.plant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 0.5px solid var(--border-light);
}

.plant-item:first-child {
  border-top: 0.5px solid var(--border-light);
}

.plant-item-name { font-weight: 600; }

.plant-item-sub {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ── Small badges ─────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border: 0.5px solid;
}

.badge-attention {
  color: var(--gold);
  border-color: rgba(184,154,58,0.45);
}

.badge-pending {
  color: var(--ink-faint);
  border-color: var(--border);
}

/* ── Attention panel — walk complete, flagged plants ─ */
.panel-attention {
  border: 0.5px solid rgba(184,154,58,0.4);
  background: rgba(247,245,240,0.7);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.panel-attention-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.panel-attention-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 0.5px solid rgba(184,154,58,0.2);
}

.panel-attention-row:last-child { border-bottom: none; }

.panel-attention-links {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-style: italic;
}

/* ── Walk card ────────────────────────────────── */
.walk-card {
  border: 0.5px solid var(--border);
  background: var(--cream-card);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.walk-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.walk-card-divider {
  border: none;
  border-top: 0.5px solid var(--border-light);
  margin: 1.25rem 0 1rem;
}

/* ── Progress bar ─────────────────────────────── */
.progress-bar-track {
  flex: 1;
  height: 1px;
  background: var(--border-light);
  margin: 0 1rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--green-mid);
  transition: width 0.3s;
}

/* ── Empty states ─────────────────────────────── */
.empty {
  text-align: center;
  padding: 3.5rem 0;
  color: var(--ink-faint);
}

.empty p { font-style: italic; }

[x-cloak] { display: none !important; }

/* ── HTMX loading indicator — hidden unless its request is in flight ── */
.htmx-indicator { display: none; }
.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator { display: inline; }
