/* Heelo / Haven Pet Care — warm, trust-first design */
:root {
  --teal: #008080;
  --teal-dark: #006666;
  --teal-light: #e6f4f4;
  --coral: #ff6b6b;
  --coral-dark: #e85555;
  --coral-light: #ffe4e4;
  --cream: #fff8e7;
  --cream-dark: #f4ecd6;
  --ink: #2a2f36;
  --ink-soft: #5b6470;
  --ink-faint: #8a93a0;
  --border: #ead9b6;
  --emergency: #c0392b;
  --warn: #d29435;
  --ok: #2e8a4f;
  --shadow: 0 4px 16px rgba(42, 47, 54, 0.06);
  --radius: 18px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

header.nav {
  background: var(--teal);
  color: white;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
header.nav .brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
header.nav .brand .paw { color: var(--coral); }
header.nav nav { display: flex; gap: 14px; flex-wrap: wrap; }
header.nav nav a {
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  padding: 6px 4px;
}
header.nav nav a:hover { color: white; text-decoration: none; }
header.nav .spacer { flex: 1; }
header.nav .auth { display: flex; gap: 10px; }
header.nav .auth button {
  background: var(--coral);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
header.nav .auth button.ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
}

/* Hamburger button — hidden on desktop */
header.nav .hamburger {
  display: none;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
header.nav .hamburger:active { background: rgba(255,255,255,0.12); }

/* Mobile breakpoint — collapse nav into hamburger drawer */
@media (max-width: 720px) {
  header.nav {
    padding: 12px 16px;
    gap: 10px;
  }
  header.nav .brand { font-size: 20px; flex: 1; }
  header.nav .spacer { display: none; }
  header.nav .hamburger { display: inline-flex; }

  /* Drawer: collapsed by default; toggled via .mobile-open on header */
  header.nav nav,
  header.nav .auth {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 4px;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 4px;
  }
  header.nav nav a {
    padding: 12px 6px;
    border-radius: 8px;
    font-size: 16px;
  }
  header.nav nav a:hover,
  header.nav nav a:active { background: rgba(255,255,255,0.08); }
  header.nav .auth {
    border-top: none;
    padding-top: 4px;
    gap: 10px;
  }
  header.nav .auth button {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
  }
  header.nav.mobile-open nav,
  header.nav.mobile-open .auth {
    display: flex;
  }
}

main { max-width: 1080px; margin: 0 auto; padding: 28px 22px 60px; }

h1 { font-size: 32px; letter-spacing: -0.6px; margin-bottom: 6px; }
h2 { font-size: 22px; letter-spacing: -0.3px; margin-top: 28px; margin-bottom: 12px; }
h3 { font-size: 17px; margin: 0 0 4px; }
.subtitle { color: var(--ink-soft); margin-bottom: 22px; }

.card {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}
.card + .card { margin-top: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

button.primary, .btn {
  background: var(--teal);
  color: white;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
}
button.primary:hover, .btn:hover { background: var(--teal-dark); }
button.coral { background: var(--coral); }
button.coral:hover { background: var(--coral-dark); }
button.ghost {
  background: white;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal);
}
button.danger { background: var(--emergency); }
button.danger:hover { background: #a02818; }

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: white;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-light);
}
label { display: block; margin-bottom: 16px; font-weight: 500; font-size: 14px; color: var(--ink-soft); }
label .lbl { display: block; margin-bottom: 6px; color: var(--ink); }

.pet-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.pet-card .avatar {
  width: 64px; height: 64px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 32px;
  flex-shrink: 0;
}
.pet-card .meta { color: var(--ink-soft); font-size: 13px; }

.badge {
  display: inline-block;
  background: var(--teal-light);
  color: var(--teal-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.badge.coral { background: var(--coral-light); color: var(--coral-dark); }
.badge.warn { background: #fdf2dc; color: var(--warn); }
.badge.ok { background: #e0f3e6; color: var(--ok); }
.badge.danger { background: #fae0dc; color: var(--emergency); }

.urgency-pill {
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.urgency-emergency { background: var(--emergency); color: white; }
.urgency-soon { background: var(--coral); color: white; }
.urgency-monitor { background: var(--warn); color: white; }
.urgency-normal { background: var(--ok); color: white; }

.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 40px 30px;
  margin-bottom: 24px;
}
.hero h1 { color: white; font-size: 38px; margin: 0 0 12px; }
.hero p { font-size: 17px; opacity: 0.95; max-width: 560px; }
.hero .cta { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero button { font-weight: 700; }
.hero .paw-bg { font-size: 130px; opacity: 0.08; position: absolute; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--ink-soft); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }

.stat { font-size: 28px; font-weight: 700; color: var(--teal-dark); }
.stat-label { color: var(--ink-soft); font-size: 13px; }

footer.foot { text-align: center; color: var(--ink-faint); padding: 26px 16px; font-size: 13px; }

.flash {
  background: var(--coral-light);
  color: var(--coral-dark);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-weight: 500;
}
.flash.ok { background: #e0f3e6; color: var(--ok); }
.flash.warn { background: #fdf2dc; color: var(--warn); }

.empty {
  text-align: center;
  color: var(--ink-faint);
  padding: 50px 20px;
  font-style: italic;
}
.empty .paw { font-size: 56px; opacity: 0.4; display: block; margin-bottom: 10px; }

.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
