/* =========================================================================
   Borealis Reptiles — design system
   A warm, editorial take on a reptile breeder site.
   Display font: Fraunces (serif).  Body: Inter.
   Palette: deep forest + cream + amber accent.
   ========================================================================= */

:root {
  --forest-900: #0f241c;
  --forest-800: #163629;
  --forest-700: #1f4b38;
  --forest-600: #2c6b4e;
  --forest-500: #3f8c69;
  --forest-300: #9ec5b0;
  --forest-200: #cde3d6;
  --forest-100: #e6f0ea;

  --sand-100:  #faf6ef;
  --sand-200:  #f2ebdd;
  --sand-300:  #e6d9bf;

  --amber-500: #c98a33;
  --amber-400: #e0a855;
  --amber-300: #ecc488;

  --ink-900:   #1a1f1b;
  --ink-700:   #3f4a43;
  --ink-500:   #6b7770;
  --ink-300:   #b5beb8;

  --danger:    #c34a3c;
  --success:   #3f8c69;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 36, 28, .06), 0 1px 3px rgba(15, 36, 28, .04);
  --shadow:    0 6px 24px rgba(15, 36, 28, .08), 0 2px 6px rgba(15, 36, 28, .04);
  --shadow-lg: 0 24px 60px rgba(15, 36, 28, .14), 0 8px 20px rgba(15, 36, 28, .08);

  --max-w: 1200px;
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--sand-100);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--forest-700); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--amber-500); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--forest-900);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1em; color: var(--ink-700); }

small { color: var(--ink-500); }

.muted   { color: var(--ink-500); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber-500);
  margin-bottom: 1rem;
}

/* --------- Buttons --------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--forest-700); color: #fff; }
.btn-primary:hover { background: var(--forest-600); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent    { background: var(--amber-400); color: #2a1b05; }
.btn-accent:hover { background: var(--amber-500); color: #fff; transform: translateY(-1px); }
.btn-ghost     { background: transparent; color: var(--forest-800); border-color: var(--forest-300); }
.btn-ghost:hover { background: var(--forest-100); }
.btn-danger    { background: transparent; color: var(--danger); border-color: rgba(195, 74, 60, .4); }
.btn-danger:hover { background: rgba(195, 74, 60, .08); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }

.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* --------- Navbar --------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(15, 36, 28, .06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 1rem 24px;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--forest-900); font-family: var(--font-display); font-size: 1.35rem; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--forest-500), var(--forest-800));
  display: grid; place-items: center; color: #f5e6c4;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08);
  font-size: 1rem;
}
.nav-links { list-style: none; display: flex; gap: 1.5rem; padding: 0; margin: 0; }
.nav-links a {
  color: var(--ink-700); font-weight: 500; font-size: .95rem;
  position: relative; padding: .3rem 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--forest-800); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--amber-400); border-radius: 2px;
}
.nav-cta { display: flex; gap: .6rem; align-items: center; }

.hamburger {
  display: none; flex-direction: column; gap: 4px; padding: 8px;
  background: none; border: 0; cursor: pointer;
}
.hamburger span { width: 22px; height: 2px; background: var(--forest-900); border-radius: 2px; }

@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 64px; right: 16px; left: 16px; flex-direction: column;
    background: var(--sand-100); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--sand-300); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .hamburger { display: inline-flex; }
}

/* --------- Hero --------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
  background:
    radial-gradient(1000px 400px at 80% 0%, rgba(63, 140, 105, .14), transparent 60%),
    radial-gradient(800px 400px at 10% 100%, rgba(224, 168, 85, .16), transparent 60%),
    var(--sand-100);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; color: var(--forest-600); }
.hero-lead { font-size: 1.1rem; max-width: 44ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15,36,28,.35));
}
.hero-badge {
  position: absolute; bottom: 1.25rem; left: 1.25rem;
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(250,246,239,.92); color: var(--forest-800);
  padding: .5rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
}

@media (max-width: 820px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-image { transform: none; aspect-ratio: 4/3; }
}

/* --------- Section --------- */
section.section { padding: 5rem 0; }
section.section.alt { background: var(--sand-200); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head p { max-width: 60ch; margin: 0 auto; }

/* --------- Feature grid --------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature {
  padding: 2rem; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid rgba(15,36,28,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--forest-100); color: var(--forest-700);
  display: grid; place-items: center; margin-bottom: 1rem;
  font-size: 1.15rem;
}
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* --------- Breeding pair cards --------- */
.pairs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.pair-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15,36,28,.05);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.pair-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.pair-media { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0; }
.pair-media .parent-tile {
  aspect-ratio: 1/1; position: relative; overflow: hidden;
}
.pair-media .parent-tile img { width: 100%; height: 100%; object-fit: cover; }
.pair-media .parent-tile .tile-label {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(15,36,28,.7); color: #fff;
  padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  letter-spacing: .02em;
}
.pair-heart {
  width: 44px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--sand-200), var(--sand-300));
  color: var(--amber-500); font-size: 1.1rem;
}

.pair-body { padding: 1.25rem 1.25rem 1.5rem; }
.pair-title { font-family: var(--font-display); font-size: 1.35rem; color: var(--forest-900); margin-bottom: .15rem; }
.pair-genes { color: var(--ink-500); font-size: .92rem; }
.pair-foot { margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--ink-500); }
.pair-foot .count { font-weight: 600; color: var(--forest-700); }

/* --------- Animal cards (offspring grid & profile) --------- */
.animal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.animal-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer; position: relative; display: flex; flex-direction: column;
  border: 1px solid rgba(15,36,28,.05);
}
.animal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.animal-card .thumb { aspect-ratio: 1/1; overflow: hidden; background: var(--sand-200); }
.animal-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.animal-card:hover .thumb img { transform: scale(1.04); }
.animal-card .body { padding: 1rem 1rem 1.1rem; }
.animal-card .code { font-size: .75rem; color: var(--ink-500); letter-spacing: .08em; text-transform: uppercase; }
.animal-card .gene { font-family: var(--font-display); font-size: 1.1rem; color: var(--forest-900); margin: .1rem 0 .6rem; }
.animal-card .row  { display: flex; justify-content: space-between; align-items: center; }
.price-tag { font-weight: 700; color: var(--forest-700); }
.status-pill {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: 999px;
}
.status-available   { background: rgba(63,140,105,.12);  color: var(--forest-700); }
.status-reserved    { background: rgba(224,168,85,.18);  color: #8a5a0d; }
.status-sold        { background: rgba(195,74,60,.12);   color: var(--danger); }
.status-not_for_sale{ background: var(--sand-200); color: var(--ink-500); }
.status-breeder     { background: rgba(63,140,105,.12);  color: var(--forest-700); }

.animal-card.sold { opacity: .7; }
.animal-card.sold .thumb img { filter: grayscale(50%); }

/* --------- Profile page --------- */
.profile {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem;
  padding: 3rem 0;
}
.profile-gallery img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.profile-meta h1 { margin-bottom: .35rem; }
.profile-meta .sub { color: var(--ink-500); font-size: 1.05rem; margin-bottom: 1rem; }
.profile-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.stat {
  background: #fff; border: 1px solid rgba(15,36,28,.06);
  padding: 1rem 1.1rem; border-radius: var(--radius);
}
.stat .label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.stat .value { font-family: var(--font-display); font-size: 1.15rem; color: var(--forest-900); margin-top: .2rem; }

.profile-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }

.parents-bar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-top: 2rem;
}
.parents-bar .mini-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem; background: #fff; border: 1px solid rgba(15,36,28,.06);
  border-radius: var(--radius); text-decoration: none; color: var(--ink-900);
  transition: background .2s ease;
}
.parents-bar .mini-card:hover { background: var(--forest-100); }
.parents-bar .mini-card img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.parents-bar .mini-card .role { font-size: .7rem; color: var(--ink-500); letter-spacing: .08em; text-transform: uppercase; }
.parents-bar .mini-card .nm   { font-family: var(--font-display); color: var(--forest-900); }

@media (max-width: 820px) {
  .profile { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 0 3rem; }
  .parents-bar { grid-template-columns: 1fr; }
}

/* --------- Modal --------- */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(15, 36, 28, .6); backdrop-filter: blur(4px);
  z-index: 100; align-items: center; justify-content: center; padding: 1rem;
}
.modal.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--sand-100); border-radius: var(--radius-lg);
  max-width: 960px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); padding: 2rem;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.modal-close {
  background: transparent; border: 0; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; font-size: 1.5rem; color: var(--ink-500); transition: background .2s;
}
.modal-close:hover { background: var(--forest-100); color: var(--forest-700); }

/* --------- Forms --------- */
.field   { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .85rem; color: var(--forest-800); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem;
  border: 1px solid var(--sand-300); background: #fff;
  border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem;
  color: var(--ink-900); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--forest-500);
  box-shadow: 0 0 0 3px rgba(63,140,105,.18);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.help { font-size: .8rem; color: var(--ink-500); margin-top: .3rem; }

/* --------- Toast --------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--forest-800); color: #fff; padding: .8rem 1.4rem;
  border-radius: 999px; box-shadow: var(--shadow-lg);
  z-index: 200; font-weight: 500;
  animation: slideUp .3s ease;
}
.toast.error { background: var(--danger); }
@keyframes slideUp { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* --------- Footer --------- */
footer.site-footer {
  padding: 3rem 0 2rem;
  background: var(--forest-900); color: rgba(255,255,255,.75);
  margin-top: 4rem;
}
footer.site-footer a { color: var(--forest-300); }
footer.site-footer a:hover { color: var(--amber-400); }
footer .grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
footer h4 { color: #fff; font-family: var(--font-display); margin-bottom: .8rem; font-size: 1.1rem; }
footer .socials { display: flex; gap: .6rem; margin-top: 1rem; }
footer .socials a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.08);
  color: #fff;
  transition: background .2s;
}
footer .socials a:hover { background: var(--amber-500); color: #fff; }
footer .bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
@media (max-width: 820px) { footer .grid { grid-template-columns: 1fr; } }

/* --------- Care sheet cards --------- */
.care-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.care-card {
  background: #fff;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(15,36,28,.05);
  cursor: pointer;
  transition: box-shadow .2s ease, transform .2s ease;
  position: relative;
}
.care-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.care-card h3 { color: var(--forest-800); margin-bottom: .25rem; }
.care-card .summary { color: var(--ink-500); font-size: .92rem; margin: 0; }
.care-card .chev {
  position: absolute; top: 1.5rem; right: 1.4rem;
  color: var(--forest-600); transition: transform .25s ease;
}
.care-card.open .chev { transform: rotate(180deg); }
.care-card .body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, margin-top .25s ease, padding-top .25s ease;
  color: var(--ink-700);
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: .95rem;
}
.care-card.open .body {
  max-height: 2000px;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--sand-200);
}

/* --------- Merchandise --------- */
.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.merch-card {
  position: relative;
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(15,36,28,.05);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.merch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.merch-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--sand-200); }
.merch-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.merch-card:hover .thumb img { transform: scale(1.03); }
.merch-card .body { padding: 1.1rem 1.2rem 1.25rem; }
.merch-card .type-pill {
  display: inline-block;
  background: var(--forest-100); color: var(--forest-800);
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 999px; font-weight: 700;
  margin-bottom: .5rem;
}
.merch-card .title { font-family: var(--font-display); font-size: 1.25rem; color: var(--forest-900); margin-bottom: .3rem; }
.merch-card .meta  { font-size: .85rem; color: var(--ink-500); margin-bottom: .75rem; }
.merch-card .meta strong { color: var(--forest-700); font-weight: 600; }
.merch-card .row { display: flex; justify-content: space-between; align-items: center; }
.merch-card.sold { opacity: .75; }
.merch-card.sold .thumb img { filter: grayscale(40%); }

/* Merch detail modal content */
.merch-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  align-items: start;
}
.merch-detail img { width: 100%; border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; box-shadow: var(--shadow); }
.merch-detail .kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1rem 0; font-size: .95rem; }
.merch-detail .kv dt { color: var(--ink-500); font-weight: 500; }
.merch-detail .kv dd { margin: 0; color: var(--ink-900); }
@media (max-width: 640px) {
  .merch-detail { grid-template-columns: 1fr; gap: 1rem; }
}

/* --------- Admin-specific --------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--forest-900); color: rgba(255,255,255,.85);
  padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .brand { color: #fff; margin-bottom: 2rem; }
.admin-side nav { display: flex; flex-direction: column; gap: .25rem; }
.admin-side nav a {
  padding: .6rem .8rem; border-radius: 10px; color: rgba(255,255,255,.8);
  display: flex; align-items: center; gap: .6rem; font-weight: 500;
}
.admin-side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side nav a.active { background: var(--forest-700); color: #fff; }
.admin-side .spacer { flex: 1; }
.admin-side .logout { margin-top: auto; color: var(--sand-300); }

.admin-main { padding: 2rem 2.5rem 4rem; max-width: 1100px; width: 100%; }
.admin-main h1 { margin-bottom: .2rem; }
.admin-main .tag { color: var(--ink-500); margin-bottom: 2rem; }

.panel {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(15,36,28,.05);
  margin-bottom: 1.5rem;
}
.panel h2 { font-size: 1.4rem; margin-bottom: 1rem; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .8rem .6rem; text-align: left; border-bottom: 1px solid var(--sand-200); }
.table th { font-weight: 600; color: var(--forest-800); }
.table tr:hover td { background: var(--sand-100); }
.table img.thumb-sm { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; padding: 1.25rem; border-radius: var(--radius); border: 1px solid rgba(15,36,28,.05); }
.kpi .label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.kpi .value { font-family: var(--font-display); font-size: 2rem; color: var(--forest-900); margin-top: .2rem; }

/* Login screen (reused for admin) */
.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(600px 300px at 70% 10%, rgba(63,140,105,.25), transparent 60%),
    radial-gradient(500px 300px at 10% 90%, rgba(224,168,85,.2), transparent 60%),
    var(--forest-900);
  display: grid; place-items: center; padding: 2rem;
}
.login-card {
  background: rgba(255,255,255,.04); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  padding: 2.5rem; border-radius: var(--radius-lg);
  max-width: 420px; width: 100%; color: #fff;
  box-shadow: var(--shadow-lg);
}
.login-card h1 { color: #fff; font-size: 2rem; margin-bottom: .5rem; }
.login-card p  { color: rgba(255,255,255,.75); margin-bottom: 1.5rem; }
.login-card .field input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; }
.login-card .field label { color: rgba(255,255,255,.8); }
.login-card .btn-primary { width: 100%; justify-content: center; }
.login-card .foot { margin-top: 1.5rem; font-size: .85rem; color: rgba(255,255,255,.6); text-align: center; }

/* Environment badge shown in admin header */
.env-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 999px; font-size: .7rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.env-badge.local  { background: rgba(224,168,85,.18); color: #8a5a0d; }
.env-badge.remote { background: rgba(63,140,105,.14); color: var(--forest-700); }

.empty {
  text-align: center; padding: 3rem 1rem; color: var(--ink-500);
}

/* Family tree (admin overview) */
.tree { display: grid; gap: 1rem; }
.tree .tree-pair {
  background: #fff; border-radius: var(--radius); padding: 1rem 1.25rem;
  border: 1px solid rgba(15,36,28,.06);
}
.tree .tree-pair .heads { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.tree .tree-pair .heads img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.tree .tree-pair .heads .hname { font-weight: 600; }
.tree .tree-pair .kids { display: flex; flex-wrap: wrap; gap: .5rem; }
.tree .tree-pair .kids a {
  font-size: .78rem; padding: .3rem .6rem; border-radius: 999px;
  background: var(--forest-100); color: var(--forest-800);
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { flex-direction: row; overflow-x: auto; }
  .admin-main { padding: 1.5rem; }
}

/* Reset / utility */
.hidden { display: none !important; }
.row-flex { display: flex; align-items: center; gap: .6rem; }
.flex-end { display: flex; justify-content: flex-end; gap: .5rem; }

/* Public “we’re building” gate (index + profile) */
html.site-building-lock-active { overflow: hidden; height: 100%; }
html.site-building-lock-active body { overflow: hidden; }

.site-building-lock {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 36, 28, 0.88);
  backdrop-filter: blur(6px);
}

.site-building-lock__card {
  width: 100%;
  max-width: 22rem;
  background: var(--sand-100);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 36, 28, 0.08);
  text-align: center;
}

.site-building-lock__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--forest-100);
  color: var(--forest-700);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.site-building-lock__note {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-700);
}

.site-building-lock__form { text-align: left; }

.site-building-lock__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 0.35rem;
}

.site-building-lock__input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sand-300);
  font: inherit;
  margin-bottom: 0.5rem;
}

.site-building-lock__input:focus {
  outline: 2px solid var(--forest-300);
  outline-offset: 1px;
}

.site-building-lock__err {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--danger);
}

.site-building-lock__btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
