:root {
  --bg: #f6f7f1;
  --surface: #ffffff;
  --surface-soft: #eef2e8;
  --ink: #17211d;
  --muted: #62706a;
  --line: #d9e0d5;
  --green: #1f5c4c;
  --green-2: #2f8068;
  --terracotta: #b85f3d;
  --gold: #d6a23a;
  --blue: #406a8d;
  --shadow: 0 18px 45px rgba(34, 45, 39, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #fbfcf8;
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: white;
  border-radius: 8px;
  background: var(--green);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
}

.nav-item:hover,
.nav-item:focus-visible,
.nav-item.is-active {
  color: var(--ink);
  background: var(--surface-soft);
  outline: none;
}

.assigned-gardener {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding-top: 20px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.assigned-gardener small,
.assigned-gardener strong {
  display: block;
}

.assigned-gardener small {
  color: var(--muted);
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  font-weight: 700;
  border-radius: 50%;
  background: var(--terracotta);
}

.workspace {
  width: min(1180px, 100%);
  padding: 28px;
}

.topbar,
.section-title,
.panel-header,
.dialog-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary-action,
.ghost-action,
.icon-button,
.action-tile,
.segmented-control button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: white;
  font-weight: 750;
  background: var(--green);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--green-2);
}

.ghost-action {
  padding: 0 13px;
  color: var(--green);
  font-weight: 750;
  background: transparent;
  border-color: var(--line);
}

.ghost-action:hover,
.ghost-action:focus-visible {
  background: var(--surface-soft);
}

.icon-button {
  display: grid;
  width: 42px;
  padding: 0;
  place-items: center;
  color: var(--green);
  background: var(--surface);
  border-color: var(--line);
}

.view {
  display: none;
}

.view.is-visible {
  display: grid;
  gap: 22px;
}

.summary-grid,
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel,
.visit-card,
.action-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 132px;
  padding: 18px;
}

.metric-card strong,
.metric-card small,
.metric-label {
  display: block;
}

.metric-label {
  color: var(--muted);
  font-size: 0.86rem;
}

.metric-card strong {
  margin: 14px 0 8px;
  font-size: 1.35rem;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.45;
}

.metric-card.accent {
  color: white;
  background: var(--blue);
  border-color: transparent;
}

.metric-card.accent .metric-label,
.metric-card.accent small {
  color: rgba(255, 255, 255, 0.8);
}

.content-grid,
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.panel {
  padding: 20px;
}

.garden-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 94px);
  gap: 12px;
  min-height: 306px;
  padding: 16px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(31, 92, 76, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 92, 76, 0.06) 1px, transparent 1px),
    #fbfcf8;
  background-size: 44px 44px;
}

.bed {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 14px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: var(--green);
}

.bed span,
.bed small {
  overflow-wrap: anywhere;
}

.bed small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
}

.bed-tall {
  grid-column: 1 / 3;
  grid-row: 1 / 4;
  background: var(--green);
}

.bed-round {
  grid-column: 3 / 5;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: var(--terracotta);
}

.bed-wide {
  grid-column: 3 / 7;
  grid-row: 3 / 4;
  background: var(--blue);
}

.bed-small {
  grid-column: 5 / 7;
  grid-row: 1 / 3;
  background: var(--gold);
}

.timeline {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}

.timeline p,
.visit-card p,
.message p,
.recommendation-list p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 2px solid var(--green);
  border-radius: 50%;
}

.timeline-dot.complete {
  background: var(--green);
}

.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.action-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 18px;
  color: var(--ink);
  font-weight: 750;
  text-align: left;
}

.action-tile:hover,
.action-tile:focus-visible {
  color: var(--green);
  transform: translateY(-1px);
}

.section-title {
  margin-bottom: 2px;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.segmented-control button.is-selected {
  color: white;
  background: var(--green);
}

.visit-list,
.recommendation-list {
  display: grid;
  gap: 14px;
}

.visit-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px;
}

.visit-card.is-hidden {
  display: none;
}

.visit-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  background: var(--surface-soft);
}

.status-pill.confirmed {
  color: white;
  background: var(--green);
}

.status-pill.planned {
  color: white;
  background: var(--blue);
}

.status-pill.complete {
  color: #173727;
  background: #cbe7d5;
}

.checklist {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.checklist label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checklist input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
}

.recommendation-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.message-layout {
  max-width: 760px;
}

.message-thread {
  display: grid;
  gap: 14px;
}

.message {
  max-width: 640px;
  padding: 14px;
  border-radius: 8px;
}

.message.from-team {
  background: var(--surface-soft);
}

.message.from-client {
  justify-self: end;
  background: #e8eef3;
}

.message small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.message-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.message-form label,
.request-dialog label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 750;
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

textarea {
  padding: 12px;
  resize: vertical;
}

select {
  min-height: 42px;
  padding: 0 10px;
}

.invoice-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.request-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.request-dialog::backdrop {
  background: rgba(23, 33, 29, 0.35);
}

.request-dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .nav-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
  }

  .nav-item span {
    display: none;
  }

  .assigned-gardener {
    display: none;
  }

  .workspace {
    padding: 20px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .plan-layout,
  .visit-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar,
  .section-title,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .primary-action,
  .section-title .primary-action {
    flex: 1;
  }

  .summary-grid,
  .action-grid,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .nav-item {
    justify-content: flex-start;
  }

  .nav-item span {
    display: inline;
  }

  h1 {
    font-size: 2.2rem;
  }

  .garden-visual {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .bed,
  .bed-tall,
  .bed-round,
  .bed-wide,
  .bed-small {
    grid-column: auto;
    grid-row: auto;
    min-height: 92px;
    border-radius: 8px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }
}

