:root {
  --bg: #f7f3eb;
  --surface: #fffaf3;
  --card: #ffffff;
  --ink: #1f2a24;
  --muted: #65746c;
  --brand: #2f4f2f;
  --brand-2: #765436;
  --brand-dark: #223a22;
  --accent: #c89b5e;
  --line: #e6d9c8;
  --danger: #9d2f2f;
  --shadow: 0 18px 45px rgba(78, 53, 33, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; }

.site-header {
  height: 82px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 243, 235, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 79, 47, 0.18);
}

.button.secondary {
  background: #fffaf5;
  color: var(--brand-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  padding: 82px 7% 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
  gap: 54px;
  align-items: center;
}

.eyebrow {
  color: #8c5b19;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  line-height: 0.9;
  margin: 0 0 24px;
  color: #51331f;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 720px;
  color: #51645b;
  font-size: 1.15rem;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.mini-note {
  color: #66756c;
  margin-top: 14px;
  font-size: 0.94rem;
}

.product-card {
  background: linear-gradient(145deg, #fffaf3, #f1e3cf);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.product-card-top {
  display: flex;
  justify-content: space-between;
  color: #53645d;
  margin-bottom: 24px;
}

.metric-large,
.metric-small {
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
}

.metric-large strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  color: #51331f;
  margin-top: 5px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.section {
  padding: 62px 7%;
}

.section h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: #51331f;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 16px;
}

.section-copy {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.feature-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 12px 28px rgba(78, 53, 33, 0.07);
}

.feature-card h3 {
  margin: 0 0 10px;
  color: var(--brand-dark);
}

.feature-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

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

.sidebar {
  background: #203820;
  color: #f9f2e8;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand-lockup {
  color: #fff;
  margin-bottom: 28px;
  padding: 0 6px;
}

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

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #e7dacb;
  font-weight: 700;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.sidebar-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 20px;
  color: #cdbfae;
  font-size: 0.9rem;
}

.app-main {
  min-width: 0;
  background: var(--bg);
}

.app-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: rgba(255, 250, 243, 0.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.page-content {
  padding: 34px;
}

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1;
  color: #51331f;
}

.page-title p {
  color: var(--muted);
  max-width: 780px;
  line-height: 1.6;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(78, 53, 33, 0.06);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.kpi-value {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  color: #51331f;
  margin-top: 8px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.panel h2 {
  margin: 0 0 16px;
  color: var(--brand-dark);
}

.placeholder-list {
  display: grid;
  gap: 12px;
}

.placeholder-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #fffaf5;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #efe5d6;
  color: #6b4b2b;
  font-weight: 800;
  font-size: 0.8rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.mobile-menu {
  display: none;
}

.form-message {
  min-height: 22px;
  font-weight: 800;
}

.form-message.error {
  color: #9d2f2f;
}

.form-message.success {
  color: #2f6f46;
}

.customer-card {
  align-items: flex-start;
}

.customer-meta {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

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

.badge.owner { background: #e6eef8; color: #2f4d75; }
.badge.trainer { background: #e5f1e8; color: #2f6f46; }
.badge.barn { background: #efe5d6; color: #765436; }
.badge.business { background: #ececec; color: #4c4c4c; }
.badge.veterinarian { background: #eee8f6; color: #5d3f7a; }
.badge.other { background: #f3eadf; color: #66513d; }

@media (max-width: 920px) {
  .hero,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .sidebar-footer {
    position: static;
    margin-top: 20px;
  }

  .side-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-header {
    height: auto;
    min-height: 78px;
    gap: 14px;
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .product-card {
    padding: 18px;
  }

  .metric-grid,
  .feature-grid,
  .kpi-grid,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .app-topbar,
  .page-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .page-title {
    flex-direction: column;
  }
}
