/*
 * CHOA (Children's Healthcare of Atlanta) brand palette, pulled from choa.org's live
 * stylesheet: primary green #00a94f, deep green #285844, blue accent #0081c6/#005da4.
 * Variable names kept as teal-*/blue-* from the original palette to minimize the diff,
 * but the values now match CHOA's real brand colors.
 *
 * Font: CHOA's site uses "GothamRounded", a commercially licensed typeface (Hoefler &
 * Co.) — not something we can bundle here. "Poppins" (Google Fonts, free) is used as a
 * similar rounded-geometric sans-serif stand-in for the demo's look and feel.
 */
:root {
  --teal-900: #285844;
  --teal-700: #285844;
  --teal-600: #00a94f;
  --teal-500: #5bc766;
  --blue-700: #005da4;
  --blue-500: #0081c6;
  --green-500: #00a94f;
  --bg: #f7f8f9;
  --card-bg: #ffffff;
  --text: #272727;
  --text-subtle: #5a5a5a;
  --border: #e2e6e3;
  --danger-bg: #fdecec;
  --danger-border: #f3b9b9;
  --danger-text: #9b2c2c;
  --success-bg: #e9f8f0;
  --success-border: #b7e6cc;
  --success-text: #1e7047;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(40, 88, 68, 0.08), 0 1px 2px rgba(40, 88, 68, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { min-height: calc(100vh - 120px); }
.page-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-title { margin: 0 0 0.25rem; font-size: 1.85rem; color: var(--teal-900); }
.subtle { color: var(--text-subtle); font-size: 0.92rem; }

/* Top nav */
.topnav {
  background: linear-gradient(135deg, var(--teal-700), var(--blue-700));
  color: #fff;
  box-shadow: var(--shadow);
}
.topnav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand:hover { text-decoration: none; opacity: 0.9; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  font-weight: 800;
}
.brand-mark-lg { width: 3rem; height: 3rem; font-size: 1.6rem; color: var(--teal-600); background: #e6f7ec; margin: 0 auto 0.75rem; }

.nav-links { display: flex; gap: 1.25rem; flex: 1; flex-wrap: wrap; }
.nav-links a { color: rgba(255,255,255,0.85); font-weight: 500; font-size: 0.94rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; border-bottom-color: #fff; }

.nav-user { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; }
.nav-user-name { font-weight: 600; }
.logout-link { color: rgba(255,255,255,0.85); }
.logout-link:hover { color: #fff; }

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card h2 { margin-top: 0; font-size: 1.15rem; color: var(--teal-700); }
.card-narrow { max-width: 560px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Lists */
.stacked-list { list-style: none; margin: 0; padding: 0; }
.stacked-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.stacked-list li:last-child { border-bottom: none; }
.stacked-list li p { margin: 0.4rem 0 0; }
.stacked-list li.unread { background: #f7fffc; margin: 0 -0.5rem; padding: 0.85rem 0.5rem; border-radius: 6px; }
.stacked-list-title { font-weight: 600; color: var(--text); }

.badge {
  display: inline-block;
  background: var(--teal-500);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.empty-state { color: var(--text-subtle); font-style: italic; }

/* Vitals */
.vitals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.vital-tile {
  background: #f0faf8;
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}
.vital-value { font-size: 1.4rem; font-weight: 700; color: var(--teal-700); }
.vital-label { font-size: 0.75rem; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.02em; }
.vitals-recorded { margin-bottom: 1rem; }

.unread-count { font-size: 2.4rem; font-weight: 800; color: var(--blue-700); line-height: 1; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.data-table th { color: var(--text-subtle); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.03em; }

/* Forms */
.stacked-form { display: flex; flex-direction: column; gap: 0.35rem; }
.stacked-form label { font-weight: 600; font-size: 0.88rem; margin-top: 0.5rem; }
.stacked-form input, .stacked-form textarea, .stacked-form select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.stacked-form input:focus, .stacked-form textarea:focus, .stacked-form select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(26, 168, 156, 0.15);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--teal-600); color: #fff; margin-top: 1rem; }
.btn-primary:hover { background: var(--teal-700); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--teal-700); border: 1px solid var(--teal-500); margin-top: 0.75rem; }
.btn-secondary:hover { background: #f0faf8; text-decoration: none; }
.btn-block { width: 100%; }

/* Banners */
.banner {
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.banner-error { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger-text); }
.banner-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }

/* Login */
.login-wrap {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.login-brand h1 { font-size: 1.3rem; color: var(--teal-900); margin: 0 0 0.25rem; font-weight: 800; }
.brand-tagline { color: var(--teal-600); font-weight: 600; font-size: 0.85rem; margin: 0.75rem 0 0; }
.login-form { text-align: left; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }
.login-form label { font-weight: 600; font-size: 0.88rem; }
.demo-note { text-align: left; font-size: 0.8rem; color: var(--text-subtle); background: #f7f9f8; border-radius: 6px; padding: 0.75rem; margin-top: 1.5rem; }

.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.8rem;
  padding: 1.25rem 0;
  text-align: center;
}
