/* Visit Report Generator — Shady Waggers brand palette:
   teal #00A79D (fills/bars/buttons), deep teal #00776E (headings),
   gold #C1882D (accent / action buttons), black on light backgrounds.
   Matches the hiring and training tools. No green. */
:root {
  --teal: #00a79d;
  --teal-dark: #00776e;
  --gold: #c1882d;
  --gold-dark: #9c6d23;
  --ink: #000000;
  --muted: #5f676e;
  --line: #e2e7ec;
  --bg: #ffffff;
  --card: #ffffff;
  --paper: #ffffff; /* report "letter" card, separated from the page by its border */
  --danger: #b23b2e;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", system-ui, sans-serif;
  min-height: 100vh;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 28px 64px; }
.hidden { display: none !important; }
a { color: var(--teal-dark); }

/* top bar (shared pattern: #authBox / #signInForm / #userEmail / .navlink) */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 18px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 8px;
}
.topbar h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
}
.topbar .spacer { flex: 1; }
.navlink {
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--teal-dark);
}
.navlink:hover { color: var(--teal); }
#authBox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#authBox form { display: flex; gap: 6px; flex-wrap: wrap; }
#authBox input {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.85rem;
}
#authBox input::placeholder { color: var(--muted); }
#authBox input:focus { outline: none; border-color: var(--teal); }
#authBox button {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
#authBox button:hover { background: var(--teal-dark); }
#authBox button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
#authBox button.secondary:hover { background: transparent; border-color: var(--teal); }
#userEmail {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

header.intro { margin: 28px 0 36px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}
header.intro h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.08;
  margin: 0;
  max-width: 620px;
  color: var(--ink);
}
.sub { font-size: 15px; color: var(--muted); max-width: 520px; line-height: 1.5; }

.paw-divider { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; }
.paw-divider svg { width: 16px; height: 16px; flex-shrink: 0; }
.paw-divider .rule { flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.panel-title { font-family: "Fraunces", Georgia, serif; font-size: 19px; font-weight: 600; color: var(--teal-dark); }

.mic-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 100px;
  padding: 7px 14px;
  font-family: "Work Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.mic-btn:hover { border-color: var(--teal); }
.mic-btn.recording { background: var(--gold); border-color: var(--gold); color: #fff; }
.mic-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.mic-btn.recording .mic-dot { background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.field-label {
  display: block;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
input.text-field {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  font-size: 14.5px;
  padding: 11px 14px;
  outline: none;
  margin-bottom: 16px;
}
input.text-field:focus { border-color: var(--teal); }
input.text-field::placeholder { color: var(--muted); }

textarea {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  padding: 14px;
  outline: none;
}
textarea::placeholder { color: var(--muted); }
textarea:focus { border-color: var(--teal); }

.gen-btn {
  margin-top: 16px;
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 18px;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.gen-btn:hover { background: var(--gold-dark); }
.gen-btn:active { transform: translateY(1px); }
.gen-btn:disabled { opacity: 0.5; cursor: default; }

.hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.error-note { color: var(--danger); font-size: 13px; margin-top: 10px; display: none; }

/* Output card — styled like a clean note the pet parent receives */
.report-card {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.report-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 12px; }
.report-brand { font-family: "Fraunces", Georgia, serif; font-size: 17px; font-weight: 600; color: var(--teal-dark); }
.report-tag { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-btn, .ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--teal-dark);
  cursor: pointer;
  font-family: "Work Sans", sans-serif;
}
.copy-btn:hover, .ghost-btn:hover { border-color: var(--teal); }
.copy-btn:disabled, .ghost-btn:disabled { opacity: 0.5; cursor: default; }
.report-body { font-size: 15.5px; line-height: 1.7; flex: 1; }
.report-body p { margin: 0 0 14px; }
.report-body p:last-child { margin-bottom: 0; }

.edit-area {
  width: 100%;
  flex: 1;
  min-height: 200px;
  resize: vertical;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  padding: 12px 14px;
  outline: none;
}
.edit-area:focus { border-color: var(--teal); }

.empty-state {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  line-height: 1.6;
}

.paw-trail { display: flex; gap: 10px; align-items: center; justify-content: center; flex: 1; }
.paw-trail svg { width: 18px; height: 18px; fill: var(--teal); opacity: 0.25; animation: hop 1.1s infinite ease-in-out; }
.paw-trail svg:nth-child(2) { animation-delay: 0.15s; }
.paw-trail svg:nth-child(3) { animation-delay: 0.3s; }
.paw-trail svg:nth-child(4) { animation-delay: 0.45s; }
@keyframes hop { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }

/* Care log capture card */
.carelog { margin-top: 28px; }
.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .care-grid { grid-template-columns: 1fr; } }
.care-area {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  outline: none;
}
.care-area:focus { border-color: var(--teal); }
.care-area::placeholder { color: var(--muted); }

/* Care-log review page */
.log-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.log-controls input {
  flex: 1;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  font-size: 14.5px;
  padding: 10px 14px;
  outline: none;
}
.log-controls input:focus { border-color: var(--teal); }
.log-count { font-size: 13px; color: var(--muted); }

.log-list { display: flex; flex-direction: column; gap: 16px; }
.log-entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.log-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.log-pet { font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 600; color: var(--teal-dark); }
.log-meta { font-size: 12px; color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; }
.log-section { margin-top: 12px; }
.log-section h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dark);
}
.log-section ul { margin: 0; padding-left: 18px; }
.log-section li { font-size: 14.5px; line-height: 1.5; margin-bottom: 3px; }
.log-empty { color: var(--muted); font-style: italic; font-size: 14px; padding: 30px 0; text-align: center; }

footer { margin-top: 40px; font-size: 12px; color: var(--muted); text-align: center; }
