/* Centralized styling for Shepherd's Pulse — matches The Dry Bones Project.
   Palette: bone #d7ceb2 (accent), #a59e8c (hover), #93a8ac (link) on near-black.
   Tailwind utilities handle layout; this file defines the shared components. */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --bone: #d7ceb2;
  --bone-hover: #a59e8c;
  --link: #93a8ac;
  --muted: rgba(255, 255, 255, 0.65);
  --line: rgba(255, 255, 255, 0.12);
}

body {
  background: #111111;
  color: #ffffff;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

h1 { font-size: 1.6rem; }
h1, h2, h3 { color: var(--bone); font-weight: 700; }

/* brand wordmark: "Shepherd's Pulse" + sheep mark */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-icon { width: 1.05em; height: 1.05em; fill: currentColor; flex: 0 0 auto; }
h2 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
h2.section {
  font-size: 1.2rem;
  border-top: 2px solid rgba(215, 206, 178, 0.4);
  padding-top: .8rem;
  margin-top: 2rem;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--bone); }

.muted { color: var(--muted); font-size: .9rem; }
.hidden { display: none; }
code {
  background: rgba(255, 255, 255, 0.08);
  padding: .05rem .3rem;
  border-radius: 4px;
  font-size: .85em;
}

/* ---------- buttons ---------- */
button {
  background: var(--bone);
  color: #111111;
  border: 2px solid var(--bone-hover);
  padding: .6rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  transition: background .2s;
}
button:hover { background: var(--bone-hover); }
button.secondary {
  background: transparent;
  color: var(--bone);
  border: 1px solid rgba(215, 206, 178, 0.45);
  font-weight: 600;
}
button.secondary:hover { background: rgba(215, 206, 178, 0.12); }
button.tiny { padding: .28rem .6rem; font-size: .85rem; }

/* ---------- form fields ---------- */
label { font-weight: 600; font-size: .82rem; color: rgba(255, 255, 255, 0.8); }
input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 8px;
  padding: .55rem .7rem;
  margin: .25rem 0 .7rem;
  font-family: inherit;
  font-size: 1rem;
}
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bone); }
input[readonly] { opacity: .7; }
option { color: #111111; }

/* ---------- cards & tables ---------- */
.card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0;
}
.card.inactive { opacity: .55; }

table { border-collapse: collapse; width: 100%; }
td, th { border: 1px solid rgba(255, 255, 255, 0.15); padding: .5rem; text-align: left; }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: 1rem; align-items: flex-end; }
.row > div { flex: 1; }
.cat-col { max-width: 160px; }
.chk { display: flex; align-items: center; gap: .4rem; }
.chk input { width: auto; margin: 0; }
.toolbar { display: flex; gap: .6rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  color: var(--bone);
  font-weight: 700;
}

/* ---------- formation dashboard (category cards) ---------- */
.tb-block { margin-top: .6rem; }
.tb-label { text-transform: uppercase; letter-spacing: .06em; font-size: .66rem; color: var(--bone); }
.tb-block p { margin: .15rem 0 0; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }

.overall-card {
  background: linear-gradient(135deg, rgba(215, 206, 178, 0.16), rgba(215, 206, 178, 0.04));
  border: 1px solid rgba(215, 206, 178, 0.3);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .6rem;
  margin: 1rem 0 1.2rem;
}
.domain-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: .6rem .8rem;
  text-align: center;
}
.domain-name { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; }
.domain-avg { font-size: 1.5rem; font-weight: 800; margin-top: .15rem; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.cat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.cat-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cat-card-title { font-size: 1.05rem; font-weight: 700; color: #ffffff; }
.domain-pill {
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid;
  border-radius: 999px;
  padding: .12rem .5rem;
  white-space: nowrap;
}
.cat-card-score { display: flex; align-items: baseline; gap: .4rem; margin: .4rem 0 .1rem; }
.score-num { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.score-unit { font-size: .8rem; color: var(--muted); }
.trend { font-size: .76rem; margin-left: auto; white-space: nowrap; }
.score-bar { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; margin: .15rem 0 .3rem; }
.score-bar-fill { display: block; height: 100%; border-radius: 999px; }
.cat-chart { width: 100%; height: 46px; display: block; margin: .35rem 0 .1rem; }
.spark { display: block; margin: .3rem 0 .1rem; }

/* ---------- follower rows (dashboard) ---------- */
.frow { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem; }
.frow input, .frow select { margin: 0; }
.frow .email { flex: 2; }
.frow .role { flex: 1; }
.frow .rm {
  flex: 0 0 auto;
  padding: .5rem .7rem;
  background: transparent;
  color: #e2a1a1;
  border: 1px solid rgba(226, 161, 161, 0.4);
  font-weight: 700;
}
.frow .rm:hover { background: rgba(226, 161, 161, 0.12); }

/* ---------- theme banner (report + shared) ---------- */
.theme-banner {
  background: linear-gradient(135deg, rgba(215, 206, 178, 0.16), rgba(215, 206, 178, 0.04));
  border: 1px solid rgba(215, 206, 178, 0.3);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  color: #ffffff;
}
.theme-banner h3 { margin: .2rem 0; font-size: 1.4rem; color: var(--bone); }
.theme-banner .model { font-size: .85rem; color: rgba(255, 255, 255, 0.8); margin-bottom: .5rem; }
.theme-banner .tb-block { margin-top: .7rem; }
.theme-banner .tb-label {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .68rem;
  color: var(--bone);
}
.theme-banner .tb-block p { margin: .15rem 0 0; line-height: 1.45; color: rgba(255, 255, 255, 0.9); }
.theme-banner a { color: var(--bone); text-decoration: underline; }

.overall { font-size: 2.4rem; font-weight: 800; color: var(--bone); }
.overall .unit { font-size: 1rem; color: var(--muted); font-weight: 400; }
.chart-wrap { margin: 1rem 0; }

/* ---------- survey rating widget ---------- */
.rating-for {
  background: linear-gradient(135deg, rgba(215, 206, 178, 0.18), rgba(215, 206, 178, 0.05));
  border: 1px solid rgba(215, 206, 178, 0.3);
  border-radius: 10px;
  padding: .9rem 1.1rem;
  margin: .6rem 0 1rem;
}
.rating-for .who { font-size: 1.25rem; font-weight: 800; color: var(--bone); }
.rating-for .rel { color: rgba(255, 255, 255, 0.8); font-size: .9rem; }
.q {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  margin: .8rem 0;
  background: rgba(255, 255, 255, 0.03);
}
.cat {
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .72rem;
  color: var(--bone);
  font-weight: 700;
  margin-bottom: .3rem;
}
.scale { display: flex; gap: .4rem; margin-top: .5rem; }
.scale label {
  flex: 1;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: .5rem 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 400;
}
.scale input { display: none; }
.scale label:has(input:checked) {
  background: var(--bone);
  color: #111111;
  border-color: var(--bone);
  font-weight: 700;
}
.labels { display: flex; gap: .4rem; margin-top: .3rem; }
.labels span {
  flex: 1;
  text-align: center;
  font-size: .68rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.15;
}
