/*
 * StumpScan admin — forest green, white and black, after the client's
 * reference screens. Light only, by design.
 */
:root {
  color-scheme: light;
  --forest-900: #08271a;
  --forest-800: #0b3520;
  --forest-700: #0e4d2b; /* primary */
  --forest-600: #155f37;
  --forest-500: #1f7a45;
  --green-bright: #22c55e; /* secondary */
  --green-tint: #e8f4ec;
  --green-tint-2: #f2f8f4;
  --gold: #e0a82e;

  --page: #f3f5f3;
  --surface: #ffffff;
  --text: #0f1712;
  --text-2: #5a655e;
  --text-3: #87918b;
  --line: #e4e9e5;
  --line-2: #d3dbd5;
  --hover: #f5f8f6;
  --shadow: 0 1px 2px rgba(15, 23, 18, 0.05), 0 2px 6px rgba(15, 23, 18, 0.04);

  --pill-green-bg: #e3f5e9;
  --pill-green: #17803f;
  --pill-amber-bg: #fdf0da;
  --pill-amber: #a35a00;
  --pill-red-bg: #fde8e7;
  --pill-red: #c0322b;
  --pill-grey-bg: #eef1ef;
  --pill-grey: #56605a;
  --pill-blue-bg: #e7eefc;
  --pill-blue: #2557c7;

  --radius: 12px;
  --radius-sm: 8px;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Caveat", "Segoe Script", cursive;
  --sidebar-w: 256px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--forest-600); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
h1 .pill { vertical-align: middle; margin-left: 6px; font-size: 13px; letter-spacing: 0; }
h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h3 { margin: 0; font-size: 15px; font-weight: 700; }
:focus-visible { outline: 3px solid rgba(34, 197, 94, 0.45); outline-offset: 2px; }
.i { flex: none; }
.sub { font-size: 13px; color: var(--text-2); font-weight: 400; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.empty { margin: 0; padding: 14px 0; color: var(--text-2); }
.empty--pad { padding: 22px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Brand ---------- */

.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.logo-mark { flex: none; width: 46px; height: 46px; border-radius: 11px; }
.brand-plate { display: inline-block; padding: 10px 16px; border-radius: 14px; background: #fff; }
.brand-plate img { display: block; width: 260px; max-width: 100%; height: auto; }
.brand-plate--side { padding: 8px 10px; border-radius: 12px; }
.brand-plate--side img { width: 190px; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.brand-tag { margin-top: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }

/* ---------- Shell ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  /* keeps the sidebar column dark below the fold on long pages */
  background: linear-gradient(to right, #0a2f1d var(--sidebar-w), transparent var(--sidebar-w));
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto; /* a long menu scrolls instead of hiding behind the picture */
  color: #fff;
  background: linear-gradient(180deg, #0d3a24 0%, #0b3520 45%, #0a2f1d 100%);
}
.sidebar .brand { padding: 20px 20px 18px; }
.sidebar nav { position: relative; z-index: 1; flex: none; padding: 6px 12px; }
.nav { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a, .nav-logout button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-weight: 500;
  color: #dbe8df;
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s;
}
.nav a:hover, .nav-logout button:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.07); }
.nav a[aria-current="page"] { font-weight: 700; color: #fff; background: #1b6a3d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.nav .i { width: 21px; height: 21px; }
.nav-logout { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.14); }

.forest { position: relative; flex: 1 0 130px; max-height: 230px; margin-top: auto; overflow: hidden; }
.forest svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 190px; }
.forest::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 90px;
  background: linear-gradient(180deg, #0a2f1d 0%, rgba(10, 47, 29, 0) 100%);
  z-index: 1;
}
.tagline {
  position: absolute;
  left: 30px;
  bottom: 54px;
  z-index: 2;
  margin: 0;
  font: 600 27px/1.1 var(--script);
  color: #fff;
  transform: rotate(-4deg);
  transform-origin: left bottom;
}
.tagline span { font-size: 18px; }
.copyright { position: absolute; left: 30px; bottom: 14px; z-index: 2; margin: 0; font-size: 11px; color: rgba(255, 255, 255, 0.7); }

.content { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 66px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
}
.icon-btn:hover { background: var(--hover); }
.menu-btn { display: none; }
.topsearch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 460px;
  height: 42px;
  padding: 0 14px;
  color: var(--text-2);
  background: #f2f4f3;
  border-radius: var(--radius-sm);
}
.topsearch input { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.topsearch input:focus { box-shadow: none; }
.topsearch:focus-within { outline: 2px solid rgba(34, 197, 94, 0.45); }

.profile { position: relative; margin-left: auto; }
.profile summary { display: flex; align-items: center; gap: 12px; padding: 4px 6px; list-style: none; cursor: pointer; border-radius: var(--radius-sm); }
.profile summary::-webkit-details-marker { display: none; }
.profile summary:hover { background: var(--hover); }
.profile-text { display: grid; line-height: 1.2; }
.profile-name { font-weight: 700; }
.profile-role { font-size: 13px; color: var(--text-2); }
.profile .chev { color: var(--text-2); }
.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  min-width: 220px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 18, 0.12);
}
.profile-email { padding: 8px 10px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile-menu a, .profile-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 6px;
}
.profile-menu a:hover, .profile-menu button:hover { text-decoration: none; background: var(--hover); }

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--forest-700);
  border-radius: 50%;
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }

.main { width: 100%; max-width: 1480px; padding: 28px 32px 56px; }
.scrim { display: none; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: min(86vw, var(--sidebar-w));
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, 0.4); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .profile-text, .profile .chev { display: none; }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 26px; }
}

/* ---------- Page head ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 22px; }
.page-sub { margin: 6px 0 0; font-size: 16px; color: var(--text-2); }
.head-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; color: var(--text-2); }
.back::before { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.back:hover { color: var(--text); text-decoration: none; }

/* ---------- Cards and grids ---------- */

.card {
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card--flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 14px; }
.card-head--pad { margin: 0; padding: 18px 22px 14px; }
.panel .card-head { margin-bottom: 12px; }
.narrow { max-width: 560px; }
.stack-lg { display: grid; gap: 20px; align-content: start; }

.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid--dash { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.15fr) minmax(250px, 0.8fr); }
.grid--dash2 { grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); }
.grid--split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.grid--split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--detail { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.grid--reports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); margin: 0; }
@media (max-width: 1280px) {
  .grid--dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--dash > :last-child { grid-column: 1 / -1; }
  .grid--dash2, .grid--split, .grid--detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .grid--dash, .grid--reports, .grid--split-even { grid-template-columns: minmax(0, 1fr); }
}
.main > .card { margin-bottom: 20px; }

/* ---------- KPI cards ---------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 20px; }
.kpis--5 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--forest-700);
  background: var(--green-tint);
  border-radius: 12px;
}
.kpi-icon .i { width: 28px; height: 28px; stroke-width: 1.9; }
.kpi-label { font-size: 14px; color: var(--text-2); }
.kpi-value { margin-top: 2px; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.kpi-value small { font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.kpi-change { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-top: 6px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 800; }
.delta .i { width: 15px; height: 15px; stroke-width: 2.6; }
.delta--good { color: #17803f; }
.delta--bad { color: #c0322b; }
.delta-note { font-size: 12.5px; color: var(--text-2); }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn .i { width: 18px; height: 18px; }
.btn--primary { color: #fff; background: var(--forest-700); border-color: var(--forest-700); }
.btn--primary:hover { background: var(--forest-800); border-color: var(--forest-800); }
.btn--outline { color: var(--text); background: var(--surface); border-color: var(--line-2); }
.btn--outline:hover { background: var(--hover); border-color: var(--forest-600); }
.btn--sm { min-height: 34px; padding: 6px 14px; font-size: 14px; color: var(--forest-700); border-color: var(--forest-600); }
.btn--sm .i { width: 15px; height: 15px; }
.btn--block { width: 100%; justify-content: flex-start; }
.btn--primary.btn--block, .form .btn--block { justify-content: center; }
.btn--lg { min-height: 50px; font-size: 16px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.link-arrow .i { width: 16px; height: 16px; }
.link-quiet { font-size: 14px; }
.quick { display: grid; gap: 10px; }
.quick .btn { white-space: normal; text-align: left; }
.quick .btn--outline .i { color: var(--forest-700); }

/* ---------- Forms ---------- */

label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
input, select, textarea {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: #aab5ae; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest-500); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; }
input:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
.form { display: grid; gap: 6px; }
.form label:not(.switch) { margin-top: 10px; }
.form .btn { margin-top: 14px; }
.form .btn + .btn { margin-top: 8px; }

.switch { position: relative; display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 24px; min-height: 0; margin: 0; }
.switch-track { position: relative; flex: none; width: 44px; height: 24px; background: #c9d2cc; border-radius: 999px; transition: background-color 0.15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.switch input:checked + .switch-track { background: var(--forest-500); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(34, 197, 94, 0.45); outline-offset: 2px; }
.switch .sub { display: block; font-weight: 400; }

.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.filterbar--card { margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  height: 42px;
  padding: 0 14px;
  color: var(--text-2);
  background: #f2f4f3;
  border-radius: var(--radius-sm);
}
.search-field input { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; }
.search-field input:focus { box-shadow: none; }
.search-field:focus-within { outline: 2px solid rgba(34, 197, 94, 0.45); }
.date-field { display: inline-flex; align-items: center; gap: 8px; }
.filter-note { margin: 0; padding: 10px 22px; font-size: 14px; color: var(--pill-amber); background: var(--pill-amber-bg); }

.alert { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; font-weight: 600; border-radius: var(--radius-sm); }
.alert--ok { color: var(--pill-green); background: var(--pill-green-bg); }
.alert--error { color: var(--pill-red); background: var(--pill-red-bg); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
.table-wrap--inner { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 13px 16px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table th { font-size: 13px; font-weight: 700; color: var(--text-2); background: #f6f8f7; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table tbody tr { transition: background-color 0.12s; }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr.is-selected { background: var(--green-tint-2); box-shadow: inset 3px 0 0 var(--forest-500); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; }
.table td a { color: var(--text); }
.table td a:hover { color: var(--forest-600); }
.table--compact th, .table--compact td { padding: 9px 12px; font-size: 14px; }
.table--compact th:first-child, .table--compact td:first-child { padding-left: 12px; }
.cell-person { display: flex; align-items: center; gap: 12px; }
a.cell-person:hover { text-decoration: none; }
.thumb { display: grid; place-items: center; width: 36px; height: 36px; color: var(--forest-700); background: var(--green-tint); border-radius: 8px; }
.thumb .i { width: 19px; height: 19px; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.pager-count { font-size: 14px; color: var(--text-2); }
.pager-pages { display: flex; align-items: center; gap: 6px; }
.page-btn {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
a.page-btn:hover { text-decoration: none; background: var(--hover); border-color: var(--line-2); }
.page-btn.is-on { color: #fff; background: var(--forest-700); }
.page-btn.is-off { color: var(--text-3); border-color: var(--line); }
.page-gap { padding: 0 4px; color: var(--text-2); }

/* ---------- Status pills ---------- */

.pill { display: inline-block; padding: 3px 12px; font-size: 13px; font-weight: 700; line-height: 1.5; white-space: nowrap; border-radius: 999px; }
.pill--green { color: var(--pill-green); background: var(--pill-green-bg); }
.pill--amber { color: var(--pill-amber); background: var(--pill-amber-bg); }
.pill--red { color: var(--pill-red); background: var(--pill-red-bg); }
.pill--grey { color: var(--pill-grey); background: var(--pill-grey-bg); }
.pill--blue { color: var(--pill-blue); background: var(--pill-blue-bg); }

/* ---------- Detail panels ---------- */

.panel { align-self: start; }
.person-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.person-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 18px; }
.mini-stats > div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mini-stats .i { grid-row: 1 / span 2; width: 24px; height: 24px; color: var(--forest-700); }
.mini-stats strong { font-size: 20px; font-weight: 800; line-height: 1.2; }
.mini-stats span { font-size: 13px; color: var(--text-2); }
.mini-stats--row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 4px; }
.mini-stats--row > div { grid-template-columns: 1fr; text-align: center; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px 20px; margin: 0; }
.facts dt { font-size: 13px; color: var(--text-2); }
.facts dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.facts .span-all { grid-column: 1 / -1; }
.facts--big { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.facts--big > div { display: grid; gap: 4px; }
.facts--big span { font-size: 13px; color: var(--text-2); }
.facts--big strong { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }

.activity { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.activity li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.activity-icon { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; border-radius: 50%; }
.activity-icon .i { width: 20px; height: 20px; }
.activity-icon--green { background: var(--forest-500); }
.activity-icon--blue { background: #2f6fe0; }
.activity-icon--gold { background: #e08a16; }
.activity-text a { color: var(--text); }

.insights { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.insights li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--green-tint-2); border-radius: var(--radius-sm); }
.insight-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; color: var(--forest-700); background: #fff; border-radius: 8px; }

/* ---------- Charts ---------- */

.chart-box { position: relative; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { font-size: 13px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--forest-700); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--forest-500); opacity: 0.1; }
.chart .dot { fill: var(--forest-700); stroke: #fff; stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .hit:hover, .chart .hit:focus { fill: rgba(14, 77, 43, 0.06); outline: none; }
.chart .bar { fill: var(--forest-700); transition: fill 0.12s; }
.chart .bar-group:hover .bar, .chart .bar-group:focus .bar { fill: var(--forest-500); }
.chart .bar-group:focus { outline: none; }
.chart .bar-value { font-size: 13px; font-weight: 700; fill: var(--text); }
.legend-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.swatch-line { width: 18px; height: 3px; background: var(--forest-700); border-radius: 2px; }

.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px; }
.donut { flex: none; width: 170px; height: 170px; }
.donut-arc { fill: none; }
.donut-total { font-size: 26px; font-weight: 800; fill: var(--text); }
.donut-caption { font-size: 13px; fill: var(--text-2); }
.legend { display: grid; gap: 10px; min-width: 180px; margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.legend-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.swatch { width: 12px; height: 12px; border-radius: 50%; }
/* Ordered size groups: one green, light to dark reads small to large. */
.s1 { stroke: #62b37f; background: #62b37f; }
.s2 { stroke: #3a9a5f; background: #3a9a5f; }
.s3 { stroke: #1f7a45; background: #1f7a45; }
.s4 { stroke: #145c34; background: #145c34; }
.s5 { stroke: #0b3d22; background: #0b3d22; }

.tooltip {
  position: fixed;
  z-index: 30;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: var(--text);
  border-radius: 8px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}
.tooltip[hidden] { display: none; }

/* ---------- Dialog ---------- */

.dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.dialog::backdrop { background: rgba(8, 20, 13, 0.45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.dialog-actions .btn { margin-top: 10px; }

/* ---------- Pricing ---------- */

.info-box { display: flex; gap: 14px; margin-bottom: 20px; padding: 16px 18px; color: #1d3f7a; background: #eef4fd; border-radius: var(--radius-sm); }
.info-box > .i { width: 24px; height: 24px; color: #2f6fe0; }
.info-box h3 { margin-bottom: 4px; color: var(--text); }
.info-box p { margin: 0; color: var(--text-2); }
.grid-head h2 { font-size: 17px; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.matrix th { padding: 8px 6px; font-size: 13px; font-weight: 700; color: var(--text); text-align: center; background: var(--green-tint); }
.matrix thead tr:first-child th { border-radius: 0; }
.matrix .corner { width: 84px; line-height: 1.25; border-right: 1px solid var(--line); }
.matrix .matrix-caption { font-size: 14px; }
.matrix tbody th { background: #f6f8f7; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.matrix td { padding: 5px; border-bottom: 1px solid var(--line); }
.cell {
  display: block;
  min-width: 58px;
  padding: 7px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 6px;
}
.cell:hover { text-decoration: none; border-color: var(--forest-500); }
.cell--empty { color: var(--text-3); font-weight: 500; background: #fafbfa; border-style: dashed; }
.cell.is-on { color: #fff; background: var(--forest-700); border-color: var(--forest-700); }
.pager--plain { padding: 16px 0 0; border-top: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair > div { display: grid; gap: 6px; }
.pair > div label { margin-top: 10px; }
.form .pair > .btn { margin-top: 14px; }
.btn--soft { color: var(--forest-700); background: var(--green-tint); border-color: transparent; }
.btn--soft:hover { background: #d9eee1; }
.estimate { display: grid; gap: 4px; margin-top: 16px; padding: 18px; text-align: center; background: var(--green-tint); border-radius: var(--radius-sm); }
.estimate-label { font-weight: 700; color: var(--forest-600); }
.estimate-value { font-size: 32px; font-weight: 800; color: var(--forest-700); letter-spacing: -0.02em; }
.estimate--none { text-align: left; color: var(--pill-amber); background: var(--pill-amber-bg); }
.dialog--wide { width: min(620px, calc(100vw - 32px)); }
.dialog--wide > .btn { margin: 12px 0 4px; }
code { padding: 1px 5px; font-size: 13px; background: #f0f3f1; border-radius: 4px; }

/* ---------- Settings ---------- */

.settings-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.settings-nav { display: grid; gap: 4px; padding: 10px; }
.settings-nav a { display: flex; align-items: center; gap: 14px; padding: 12px; color: var(--text); border-radius: var(--radius-sm); }
.settings-nav a:hover { text-decoration: none; background: var(--hover); }
.settings-nav .i { width: 22px; height: 22px; color: var(--forest-700); }
.settings-nav a > span { display: grid; }
.settings-layout .card { scroll-margin-top: 90px; }
.hint { margin: 0; font-size: 13px; color: var(--text-2); }
.choice { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; border: 0; }
.choice legend { margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; font-size: 15px; color: var(--text); cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.radio:has(input:checked) { background: var(--green-tint-2); border-color: var(--forest-500); }
.radio input { min-height: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--forest-700); }
.radio > span { display: grid; }
.switch--row { align-items: center; margin-top: 0; }
.switch--row .switch-track { margin-left: auto; }
.switch--row input { right: 0; top: 50%; transform: translateY(-50%); }
.quick-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--forest-700); background: var(--green-tint); border-radius: 10px; }
.switch--row > span:nth-child(2) { display: grid; }
.warn-note { margin: 14px 0 0; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--pill-amber); background: var(--pill-amber-bg); border-radius: var(--radius-sm); }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-help { margin-top: 18px; }
@media (max-width: 1280px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .settings-nav { display: none; }
}
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Sign-in and bare pages ---------- */

.bare { min-height: 100vh; }
.error-card { display: grid; gap: 14px; justify-items: start; margin: 14vh auto 0; }

.login-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 44px 52px 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #0d3a24 0%, #0a2f1d 100%);
}
.brand--big .logo-mark { width: 56px; height: 56px; }
.brand--big .brand-name { font-size: 30px; }
.login-copy { position: relative; z-index: 1; }
.login-line { max-width: 14ch; margin: 0; font-size: clamp(36px, 4.2vw, 56px); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; }
.login-tagline { margin: 18px 0 0; font: 600 30px/1.1 var(--script); color: #cfe7d6; }
.login-forest { display: block; width: calc(100% + 104px); height: 220px; margin: auto -52px 0; }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.login-box { width: 100%; max-width: 400px; }
.login-box .page-sub { margin-bottom: 20px; }

@media (max-width: 860px) {
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-intro { gap: 24px; padding: 24px 20px 0; }
  .login-line { font-size: 32px; }
  .login-forest { width: calc(100% + 40px); height: 120px; margin: 0 -20px; }
}

/* ---------- Website CMS, enquiries, media ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; font-size: 12px; font-weight: 700; line-height: 1.6; text-align: center; color: #0b2a19; background: #facc15; border-radius: 999px; }
.alert--list { display: block; }
.alert--list ul { margin: 6px 0 0; padding-left: 20px; font-weight: 400; }
.link-btn { margin-top: 12px; padding: 0; font: inherit; font-size: 14px; color: var(--text-2); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.link-btn:hover { color: var(--text); }
.link-btn--danger { color: var(--pill-red); }
.icon-btn--danger { color: var(--pill-red); }
.icon-btn--danger:hover { background: var(--pill-red-bg); }
kbd { padding: 1px 6px; font: 600 12px/1.6 var(--font); background: var(--hover); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; }

/* Start page */
.cms-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px; padding: 0; list-style: none; }
.cms-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--green-tint-2); border: 1px solid var(--green-tint); border-radius: var(--radius); }
.cms-steps li > span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; font-weight: 800; color: #fff; background: var(--forest-700); border-radius: 50%; }
.cms-steps p { margin: 2px 0 0; }
.cms-group-title { margin: 8px 0 12px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.cms-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; margin-bottom: 30px; }
.cms-card { display: flex; align-items: center; gap: 16px; padding: 20px; color: var(--text); border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.cms-card:hover { text-decoration: none; border-color: var(--forest-500); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14, 77, 43, 0.1); }
.cms-card-icon { display: grid; place-items: center; flex: none; width: 54px; height: 54px; color: var(--forest-700); background: var(--green-tint); border-radius: 14px; }
.cms-card-icon .i { width: 26px; height: 26px; }
.cms-card-body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.cms-card-body strong { font-size: 18px; }
.cms-card-meta { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--forest-600); }
.cms-card-go { flex: none; color: var(--text-3); transition: color 0.15s, transform 0.15s; }
.cms-card:hover .cms-card-go { color: var(--forest-700); transform: translateX(3px); }

/* Editor */
.crumbs { display: flex; gap: 8px; margin-bottom: 6px; font-size: 14px; color: var(--text-2); }
.crumbs a { color: var(--forest-600); font-weight: 600; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-switch select { min-width: 200px; font-weight: 600; }
.cms-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cms-toc { position: sticky; top: 90px; display: grid; gap: 2px; padding: 12px; }
.cms-toc-title { margin: 2px 8px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.cms-toc a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; font-size: 14.5px; font-weight: 600; color: var(--text); border-radius: var(--radius-sm); }
.cms-toc a:hover { text-decoration: none; background: var(--hover); }
.cms-toc a.is-active { color: var(--forest-700); background: var(--green-tint); }
.cms-toc-num { display: grid; place-items: center; flex: none; width: 24px; height: 24px; font-size: 12px; font-weight: 800; color: var(--forest-700); background: var(--green-tint); border-radius: 50%; }
.cms-toc a.is-active .cms-toc-num { color: #fff; background: var(--forest-700); }
.cms-main { display: grid; gap: 14px; min-width: 0; }

.cms-section { padding: 0; overflow: hidden; scroll-margin-top: 90px; }
.cms-section > summary { display: flex; align-items: center; gap: 14px; padding: 18px 22px; list-style: none; cursor: pointer; }
.cms-section > summary::-webkit-details-marker { display: none; }
.cms-section > summary:hover { background: var(--hover); }
.cms-section-num { display: grid; place-items: center; flex: none; width: 36px; height: 36px; font-weight: 800; color: var(--forest-700); background: var(--green-tint); border-radius: 10px; }
.cms-section[open] .cms-section-num { color: #fff; background: var(--forest-700); }
.cms-section-head { display: grid; gap: 2px; flex: 1; min-width: 0; }
.cms-section-head strong { font-size: 17px; }
.cms-section-chev { flex: none; color: var(--text-2); transition: transform 0.2s; }
details[open] > summary > .cms-section-chev { transform: rotate(180deg); }
.cms-fields { gap: 20px; padding: 6px 22px 24px; border-top: 1px solid var(--line); }
.cms-fields > .cms-field:first-child, .cms-fields > .cms-list:first-child { margin-top: 14px; }

.cms-field { display: grid; gap: 6px; }
.form .cms-field label:not(.switch), .form label.cms-label { margin-top: 0; }
.cms-label { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.cms-field .hint { margin-top: -2px; }
.req { margin-left: 4px; padding: 1px 7px; font-size: 11px; font-weight: 700; color: var(--pill-amber); background: var(--pill-amber-bg); border-radius: 999px; }
.counter { float: right; padding: 1px 8px; font-size: 12px; font-weight: 700; color: var(--pill-green); background: var(--pill-green-bg); border-radius: 999px; }
.counter.is-over { color: var(--pill-amber); background: var(--pill-amber-bg); }
.cms-field textarea { min-height: 52px; line-height: 1.5; resize: none; overflow: hidden; }
.cms-field input[type="text"], .cms-field textarea { font-size: 15.5px; background: #fbfcfb; }
.cms-field input[type="text"]:focus, .cms-field textarea:focus { background: #fff; }
.cms-field .switch { margin-top: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* Photo field */
.img-box { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.img-preview { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: repeating-conic-gradient(#f1f4f2 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line-2); border-radius: 10px; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-empty { display: grid; justify-items: center; gap: 6px; padding: 10px; font-size: 12.5px; text-align: center; color: var(--text-2); }
.img-empty .i { width: 28px; height: 28px; color: var(--text-3); }
.img-actions { display: grid; gap: 8px; justify-items: start; }
.img-actions .link-btn { margin: 0; }
.img-url summary { font-size: 13px; color: var(--text-2); cursor: pointer; }
.img-url input { margin-top: 8px; width: 100%; }
.upload-btn { flex: none; margin: 0 !important; cursor: pointer; }
.upload-btn.is-busy { opacity: 0.6; pointer-events: none; }
.upload-btn.is-busy span::after { content: "…"; }

/* Repeating rows */
.cms-list { display: grid; gap: 10px; }
.cms-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.cms-list-head strong { font-size: 15px; }
.cms-list [data-list-rows] { display: grid; gap: 8px; counter-reset: row; }
.cms-item { counter-increment: row; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.cms-item[open] { border-color: var(--forest-500); box-shadow: 0 4px 14px rgba(14, 77, 43, 0.08); }
.cms-item > summary { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 12px; list-style: none; cursor: pointer; }
.cms-item > summary::-webkit-details-marker { display: none; }
.cms-item-num::before { content: counter(row); display: grid; place-items: center; width: 26px; height: 26px; font-size: 12.5px; font-weight: 800; color: var(--forest-700); background: var(--green-tint); border-radius: 50%; }
.cms-item-title { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cms-item-tools { display: flex; gap: 2px; }
.cms-item-tools .icon-btn { width: 32px; height: 32px; }
.cms-item-tools .i { width: 16px; height: 16px; }
.cms-item-body { gap: 16px; padding: 4px 16px 18px; border-top: 1px solid var(--line); }
.cms-item-body > .cms-field:first-child { margin-top: 14px; }
.cms-item-body .img-box { grid-template-columns: 140px minmax(0, 1fr); }
.cms-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; font: inherit; font-weight: 700; color: var(--forest-700); background: var(--green-tint-2); border: 1.5px dashed var(--forest-500); border-radius: 10px; cursor: pointer; }
.cms-add:hover { background: var(--green-tint); }

.cms-advanced { padding: 12px 14px; background: var(--hover); border-radius: 10px; }
.cms-advanced > summary { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.cms-advanced > summary .i { width: 17px; height: 17px; color: var(--text-2); }
.cms-advanced > .form { gap: 18px; margin-top: 16px; }
.cms-mini-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }

/* Side panel and save bar */
.cms-side { position: sticky; top: 90px; display: grid; gap: 16px; }
.cms-side .btn--block { justify-content: center; margin-top: 14px; }
.cms-status { display: flex; gap: 12px; align-items: center; }
.cms-status-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--forest-700); background: var(--green-tint); border-radius: 50%; }
.cms-status p { margin: 2px 0 0; }
.cms-tips h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.cms-tips h2 .i { color: var(--gold); }
.cms-tips ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.savebar { grid-column: 1 / -1; position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; color: #fff; background: var(--forest-800); border-radius: 14px; box-shadow: 0 14px 34px rgba(8, 39, 26, 0.35); animation: rise 0.2s ease-out; }
.savebar[hidden] { display: none; }
.savebar .sub { display: block; color: rgba(255, 255, 255, 0.75); }
.savebar-text { flex: 1; min-width: 180px; }
.savebar-dot { width: 10px; height: 10px; background: #facc15; border-radius: 50%; box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.25); }
.savebar .btn { flex: none; margin: 0; }
.savebar .btn--outline { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.4); }
.savebar .btn--outline:hover { background: rgba(255, 255, 255, 0.1); }
.savebar .btn--primary { color: var(--forest-800); background: #fff; border-color: #fff; }
.savebar .btn--primary:hover { background: var(--green-tint); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.serp-box { padding-top: 6px; }
.serp { padding: 14px 16px; font-family: Arial, sans-serif; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.serp-url { overflow: hidden; font-size: 13px; color: #4d5156; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { margin: 4px 0 3px; font-size: 19px; line-height: 1.3; color: #1a0dab; overflow-wrap: anywhere; }
.serp-desc { font-size: 14px; line-height: 1.5; color: #4d5156; overflow-wrap: anywhere; }

@media (max-width: 1400px) {
  .cms-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .cms-toc { display: none; }
}
@media (max-width: 1000px) {
  .cms-layout { grid-template-columns: minmax(0, 1fr); }
  .cms-side { position: static; order: -1; }
  .cms-tips { display: none; }
  .cms-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .img-box, .cms-item-body .img-box { grid-template-columns: 1fr; }
  .cms-fields { padding: 4px 14px 18px; }
  .cms-section > summary { padding: 14px; }
}

/* Enquiries */
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0 0 14px; font-size: 15px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.message { margin: 0 0 6px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--green-tint-2); border-radius: var(--radius-sm); }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 18px; }
.media-card { margin: 0; padding: 0; overflow: hidden; }
.media-card img { display: block; width: 100%; height: 170px; object-fit: cover; background: #f2f4f3; }
.media-card figcaption { display: grid; gap: 4px; padding: 12px 14px 14px; }
.media-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card code { overflow: hidden; font-size: 12px; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.media-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.img-actions .upload-btn, .img-actions .upload-btn:hover { color: #fff; }
.quote-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.quote-box > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--green-tint-2); border-radius: var(--radius-sm); }
.lead-photo { display: block; margin: 0 0 12px; }
.lead-photo img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius-sm); }
.quote-box strong { font-size: 17px; }
.facts-line { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.facts-line .i { flex: none; color: var(--forest-700); }

/* ---------- Blog manager ---------- */

.kpis--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.seg-tabs { display: inline-flex; padding: 4px; background: var(--page); border-radius: 12px; }
.seg-tabs a { padding: 8px 16px; font-weight: 600; color: var(--text-2); border-radius: 9px; }
.seg-tabs a:hover { text-decoration: none; color: var(--text); }
.seg-tabs a[aria-current="page"] { color: #fff; background: var(--forest-700); }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li + li { border-top: 1px solid var(--line); }
.post-row { display: flex; align-items: center; gap: 16px; padding: 14px 22px; color: var(--text); }
.post-row:hover { text-decoration: none; background: var(--hover); }
.post-thumb { display: grid; place-items: center; flex: none; width: 96px; height: 64px; overflow: hidden; color: var(--text-3); background: var(--page); border-radius: 10px; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.post-main strong { font-size: 17px; }
.post-summary { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.post-edit { display: inline-flex; align-items: center; gap: 4px; flex: none; font-weight: 700; color: var(--forest-600); }
.post-edit .i { width: 16px; height: 16px; }
.empty-state { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; text-align: center; }
.empty-state h2 { margin: 0; font-size: 22px; }
.empty-state .sub { max-width: 420px; font-size: 15px; }
.empty-state-icon { display: grid; place-items: center; width: 64px; height: 64px; color: var(--forest-700); background: var(--green-tint); border-radius: 18px; }
.empty-state-icon .i { width: 30px; height: 30px; }

.blog-edit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.blog-card .card-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 18px; }
.cms-side .card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.cms-side .card-head .cms-section-num, .blog-card .cms-section-num { width: 30px; height: 30px; color: #fff; background: var(--forest-700); border-radius: 9px; font-size: 14px; }
.cms-side .cms-field { margin: 16px 0 0; }
.cms-side .btn--block { margin-top: 16px; }
.choice--tight { margin: 4px 0 0; }
.format-tips { padding: 12px 14px; font-size: 14px; color: var(--text-2); background: var(--green-tint-2); border-radius: var(--radius-sm); }
.format-tips ul { margin: 6px 0 0; padding-left: 18px; }
#f-body { min-height: 320px; line-height: 1.65; font-size: 16.5px; resize: vertical; overflow: auto; }
.slug-field { display: flex; align-items: center; margin-top: 8px; background: var(--page); border: 1px solid var(--line); border-radius: 12px; }
.slug-prefix { padding-left: 12px; font-weight: 600; color: var(--text-2); }
.slug-field input { flex: 1; min-width: 0; background: transparent; border: 0; }
.slug-field input:focus { box-shadow: none; }
.slug-field:focus-within { border-color: var(--forest-500); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
@media (max-width: 1000px) {
  .blog-edit { grid-template-columns: minmax(0, 1fr); }
  .blog-edit .cms-side { position: static; order: -1; }
  .post-row { flex-wrap: wrap; padding: 14px; }
  .post-edit { display: none; }
}
.alert--warn { color: var(--pill-amber); background: var(--pill-amber-bg); }
.alert--warn a { color: inherit; text-decoration: underline; }
.otp-code { display: inline-block; padding: 4px 12px; font: 800 24px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.18em; color: var(--forest-700); background: var(--green-tint); border-radius: 8px; }
.filter-note--ok { color: var(--pill-green); background: var(--pill-green-bg); }
.filter-note a { color: inherit; text-decoration: underline; }
.people-tabs { margin-bottom: 18px; }
.tab-count { margin-left: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: var(--forest-700); background: var(--green-tint); border-radius: 999px; }
.seg-tabs a[aria-current="page"] .tab-count { color: var(--forest-700); background: #fff; }
.table td.nowrap { white-space: nowrap; }
