/* Reclaim Earth test site styles */
  :root {
    --green-900: #13532f;
    --green-800: #1a6a3e;
    --green-700: #217a49;
    --green-100: #dcefe2;
    --green-50:  #eef7f1;
    --red-100:   #f6d4d4;
    --amber-100: #fcefc7;
    --amber-800: #7a5300;
    --bg:        #f3f0ea;
    --card:      #ffffff;
    --soft:      #f5f2ec;
    --ink:       #1d1f1e;
    --muted:     #5f6661;
    --line:      #e7e3db;
    --head:      #f1ede5;
    --orange:    #d9822b;
    --radius:    14px;
    --shadow:    0 1px 2px rgba(20,30,25,.05), 0 2px 10px rgba(20,30,25,.04);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body {
    font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--green-900); text-decoration: none; font-weight: 600; }
  a:hover { text-decoration: underline; }
  .num { font-variant-numeric: tabular-nums; }

  /* ---------- Layout ---------- */
  .app {
    display: grid; grid-template-columns: 234px minmax(0, 1fr); min-height: 100vh;
    /* green column runs the full page height, even past the sticky sidebar */
    background: linear-gradient(to right, var(--green-900) 234px, transparent 234px);
  }

  /* Sidebar: sticky and full height (fixes the sidebar ending part-way down) */
  .sidebar {
    background: var(--green-900);
    color: #fff;
    position: sticky; top: 0;
    height: 100vh;
    display: flex; flex-direction: column;
    padding: 22px 16px 24px;
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; color: #fff; }
  .brand-mark {
    width: 36px; height: 36px; border-radius: 50%;
    background: #2f9a5c; display: grid; place-items: center; flex: none;
  }
  .brand-name { font-size: 21px; font-weight: 700; line-height: 1.1; }
  .nav { display: flex; flex-direction: column; gap: 6px; }
  .nav a {
    display: flex; align-items: center; gap: 14px;
    color: #e6f1ea; font-weight: 500; font-size: 15.5px;
    padding: 12px 14px; border-radius: 10px;
  }
  .nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
  .nav a[aria-current="page"] { background: var(--green-700); color: #fff; }
  .nav svg { width: 18px; height: 18px; flex: none; }
  .signout { margin-top: auto; color: #e6f1ea; font-weight: 500; padding: 12px; }

  /* ---------- Top bar ---------- */
  .topbar {
    background: var(--card);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 28px;
  }
  .topbar h1 { margin: 0; font-size: 26px; font-weight: 600; }
  .topbar-right { display: flex; align-items: center; gap: 12px; }
  .avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--green-800); color: #fff; font-weight: 700;
    display: grid; place-items: center; font-size: 14px;
  }
  .banner {
    background: #fdf3cf; border-top: 1px solid #f3e2a3; border-bottom: 1px solid #f3e2a3;
    color: #4c4430; font-size: 12px; text-align: center; padding: 6px 16px;
  }

  /* ---------- Content grid ---------- */
  .content {
    padding: 26px 28px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
  }
  .main-col, .side-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
  .top-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

  .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 20px;
    min-width: 0;
  }
  .card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
  .card h2 { margin: 0; font-size: 18.5px; font-weight: 600; }
  .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
  .tiny { color: var(--muted); font-size: 11.5px; }

  /* Pills / chips */
  .pill {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 999px; padding: 3px 10px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
    background: var(--head); color: var(--ink);
  }
  .pill.green { background: var(--green-100); color: var(--green-900); }
  .pill.kyc { font-size: 11px; letter-spacing: .02em; text-transform: uppercase; }
  .tag {
    display: inline-block; font-size: 9.5px; letter-spacing: .04em; font-weight: 700;
    text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
    background: #eceaf6; color: #4b4a6a;
  }
  /* Status chips: darker text than the original for better contrast */
  .status {
    display: inline-block; border-radius: 999px; padding: 3px 9px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    white-space: nowrap;
  }
  .status.amber { background: var(--amber-100); color: var(--amber-800); }
  .status.green { background: var(--green-100); color: var(--green-900); }

  /* ---------- Total holdings ---------- */
  .big { font-size: 34px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 0; }
  .mid { font-size: 22px; font-weight: 800; margin: 0; }
  .divider { height: 1px; background: var(--line); margin: 16px 0; }
  .row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

  /* ---------- Performance ---------- */
  .gain { color: var(--green-800); font-size: 15px; font-weight: 600; }
  .chart { width: 100%; height: auto; display: block; margin: 8px 0 4px; }
  .stats3 { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin-top: 8px; }
  .stats3 .label { font-size: 12px; color: var(--ink); }
  .stats3 .val { font-size: 15px; font-weight: 800; }

  /* ---------- Active investments ---------- */
  .inv { display: flex; justify-content: space-between; gap: 10px; }
  .inv-name { font-weight: 700; font-size: 13.5px; }
  .inv-price { color: var(--green-800); font-weight: 600; }
  .kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin-top: 16px; font-size: 13px; }
  .kv dt { color: var(--muted); }
  .kv dd { margin: 0; font-weight: 700; text-align: right; }
  .bar { height: 6px; background: var(--head); border-radius: 99px; overflow: hidden; margin-top: 14px; }
  .bar > span { display: block; height: 100%; background: var(--green-800); border-radius: 99px; }

  /* ---------- Tables ---------- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th {
    background: var(--head); text-align: left; font-weight: 700;
    padding: 12px 8px; white-space: nowrap;
  }
  td { padding: 14px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  tbody tr:last-child td { border-bottom: 0; }
  td.strong { font-weight: 700; }
  td.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; }
  .btn {
    appearance: none; border: 0; cursor: pointer; font: inherit;
    background: var(--green-900); color: #fff; font-weight: 700;
    border-radius: 999px; padding: 8px 22px;
  }
  .btn:hover { background: var(--green-800); }
  .btn:focus-visible, .seg button:focus-visible, select:focus-visible, input:focus-visible {
    outline: 3px solid #8cc7a2; outline-offset: 2px;
  }

  /* ---------- Order book ---------- */
  .book { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .book th { background: none; padding: 8px 8px 6px; color: var(--ink); font-weight: 700; }
  .book td { padding: 9px 8px; border: 0; }
  .book .r { text-align: right; }
  .book tr.bid td { background: #d6ecdc; }
  .book tr.ask td { background: var(--red-100); }
  .book tr.bid + tr.bid td, .book tr.ask + tr.ask td { border-top: 2px solid #fff; }
  .spread { text-align: center; font-size: 11.5px; color: var(--muted); padding: 6px 0; }

  /* ---------- Impact ---------- */
  .impact { display: flex; flex-direction: column; gap: 12px; }
  .impact-item { display: flex; align-items: center; gap: 18px; background: var(--soft); border-radius: 12px; padding: 14px 16px; }
  .ring { width: 60px; height: 60px; flex: none; transform: rotate(-90deg); }
  .ring circle { fill: none; stroke-width: 6; }
  .ring .track { stroke: #dedad2; }
  .ring .fill { stroke: var(--green-800); stroke-linecap: round; }
  .impact-label { font-size: 12px; color: var(--muted); }
  .impact-val { font-size: 18px; font-weight: 800; }

  /* ---------- Order ticket ---------- */
  .seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
  .seg button {
    appearance: none; border: 0; background: none; font: inherit; font-weight: 700;
    padding: 10px; border-radius: 8px; cursor: pointer; color: var(--ink);
  }
  .seg button[aria-pressed="true"] { background: var(--green-900); color: #fff; }
  .field { margin-top: 16px; }
  .field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
  .field select, .field input {
    width: 100%; font: inherit; font-size: 14.5px;
    padding: 11px 14px; border: 1px solid #d7d2c8; border-radius: 8px; background: #fff; color: var(--ink);
  }
  .fees { margin-top: 14px; font-size: 12.5px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .fees .r { text-align: right; }
  .fees .total { font-weight: 800; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
  .place { width: 100%; padding: 14px; font-size: 15.5px; margin-top: 16px; border-radius: 999px; }
  .err { color: #a3301e; font-size: 12px; margin-top: 6px; min-height: 0; }

  /* ---------- News ---------- */
  .news { list-style: none; margin: 0; padding: 0; }
  .news li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .news li:last-child { border-bottom: 0; padding-bottom: 0; }
  .news a { color: var(--ink); font-weight: 700; display: block; line-height: 1.35; }

  .footer { padding: 4px 28px 28px; font-size: 12px; color: var(--muted); }
  .footer strong { color: var(--ink); }

  /* ---------- Responsive ---------- */
  @media (max-width: 1280px) {
    .content { grid-template-columns: minmax(0, 1fr); }
    .side-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 1100px) {
    .top-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 860px) {
    .app { grid-template-columns: 1fr; background: none; }
    .card-head { flex-wrap: wrap; }
    .sidebar {
      position: sticky; top: 0; z-index: 10; height: auto;
      flex-direction: row; align-items: center; gap: 8px;
      padding: 10px 16px; overflow-x: auto;
    }
    .brand { padding: 0 8px 0 0; }
    .brand-name { font-size: 16px; white-space: nowrap; }
    .brand-mark { width: 30px; height: 30px; }
    .nav { flex-direction: row; gap: 2px; }
    .nav a { padding: 8px 10px; font-size: 13.5px; gap: 8px; white-space: nowrap; }
    .signout { margin: 0 0 0 auto; padding: 8px; white-space: nowrap; }
    .topbar { padding: 14px 16px; }
    .topbar h1 { font-size: 20px; }
    .content { padding: 16px; gap: 16px; }
    .main-col, .side-col { gap: 16px; }
    .side-col, .top-cards { grid-template-columns: minmax(0, 1fr); }
    .footer { padding: 4px 16px 24px; }
  }
  @media (max-width: 480px) {
    .nav a span { display: none; }
    .pill.kyc { display: none; }
  }

  /* =========================================================
     Shared additions for the other pages
     ========================================================= */
  .content.page { grid-template-columns: minmax(0, 1fr); max-width: 1500px; }
  .stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

  .eyebrow, .card .eyebrow {
    margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #3d4540;
  }
  .eyebrow-lg { margin: 4px 0 0; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4a524d; }
  .card-rule { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .chip-tag {
    display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: var(--head); color: #3d4540;
  }
  .chip-tag.amber { background: var(--amber-100); color: var(--amber-800); }
  .muted { color: var(--muted); }
  .hidden-label { position: absolute; left: -9999px; }

  .btn.block { display: block; width: 100%; padding: 13px; font-size: 15px; text-align: center; }
  .btn.ghost {
    background: #fff; color: var(--ink); border: 1px solid #d7d2c8;
    padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  }
  .btn.ghost:hover { background: var(--soft); }
  .btn:disabled { background: #9fb3a6; cursor: not-allowed; }
  a.btn { text-decoration: none; display: inline-block; }

  /* Notice box */
  .notice { background: #fdf6dc; border: 1px solid #f0d98a; color: #6b4f00; border-radius: 8px; padding: 12px 14px; font-size: 13px; }
  .notice.green { background: var(--green-50); border-color: #bfdfca; color: var(--green-900); }

  /* Forms (shared) */
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .form-grid .full { grid-column: 1 / -1; }
  .field input[type="date"] { min-height: 44px; }
  fieldset.box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px 14px; margin: 0; }
  fieldset.box legend { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
  .check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 13.5px; }
  .check input { margin-top: 3px; accent-color: var(--green-800); }

  /* Batch cards (marketplace) */
  .batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
  .batch h3 { margin: 12px 0 6px; font-size: 15.5px; font-weight: 800; }
  .price { font-size: 19px; font-weight: 800; margin: 18px 0 12px; }
  .price small { font-size: 12px; font-weight: 400; color: var(--muted); }
  .bar.thick { height: 6px; margin: 0 0 6px; }
  .bar-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }

  /* Segmented chip selector (trade) */
  .chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .chips button {
    appearance: none; font: inherit; font-size: 13px; cursor: pointer;
    border: 1px solid #d7d2c8; background: #fff; border-radius: 999px; padding: 5px 12px; color: var(--ink);
  }
  .chips button[aria-pressed="true"] { background: var(--green-900); border-color: var(--green-900); color: #fff; font-weight: 700; }

  /* Underline tabs (trade ticket) */
  .tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
  .tabs button {
    appearance: none; background: none; border: 0; font: inherit; cursor: pointer;
    padding: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px;
  }
  .tabs button[aria-selected="true"] { color: var(--green-900); border-bottom-color: var(--green-900); }

  /* Order ladder */
  .ladder td { border-bottom: 1px solid #fff; }
  .ladder tr.ask td { background: #fdeeee; }
  .ladder tr.bid td { background: #e9f7ef; }
  .ladder tr.ask td:first-child { color: #b3261e; }
  .ladder tr.bid td:first-child { color: var(--green-900); font-weight: 600; }
  .ladder tr.split td { border-top: 2px solid var(--green-800); }

  .trade-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }

  /* Summary box */
  .summary { border: 1px solid var(--line); background: #fafaf7; border-radius: 8px; padding: 12px 14px; margin-top: 16px; font-size: 13px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
  .summary .r { text-align: right; }
  .summary .total { font-weight: 800; font-size: 14px; border-top: 1px dashed #d7d2c8; padding-top: 8px; }

  /* Code / bank details */
  .codebox {
    background: #f1f1ef; border-radius: 8px; padding: 18px 16px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.9;
    overflow-x: auto;
  }
  .codebox b { font-weight: 700; }
  .copy { margin-left: 8px; vertical-align: middle; }

  /* Callback log */
  details.log { border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; background: #fff; }
  details.log summary { cursor: pointer; padding: 10px 12px; font-size: 12.5px; }
  details.log summary b { font-weight: 700; }
  details.log pre { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); background: #fafaf7; font-size: 12px; overflow-x: auto; }

  /* Dialog */
  dialog.modal {
    border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, calc(100vw - 32px));
    box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink);
  }
  dialog.modal::backdrop { background: rgba(15, 30, 22, .45); }
  dialog.modal h2 { margin: 0 0 4px; font-size: 19px; }
  .modal-actions { display: flex; gap: 10px; margin-top: 18px; }
  .modal-actions .btn { flex: 1; padding: 12px; }
  .btn.secondary { background: var(--soft); color: var(--ink); border: 1px solid #d7d2c8; }
  .btn.secondary:hover { background: var(--head); }

  /* Toast */
  .toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
    background: var(--green-900); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px);
  }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* Auth pages (sign in / signed out) */
  .auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
  .auth-top { background: var(--green-900); color: #fff; padding: 16px 24px; }
  .auth-main { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
  .auth-card { width: min(420px, 100%); }
  .auth-card h2 { font-size: 24px; margin: 0 0 4px; }
  .auth-foot { text-align: center; padding: 0 16px 28px; font-size: 12px; color: var(--muted); }
  .secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 14px; }

  @media (max-width: 1100px) {
    .trade-grid { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 860px) {
    .stack { gap: 16px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .batch-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .trade-grid { gap: 16px; }
  }

  .axis { position: relative; height: 16px; font-size: 11.5px; color: var(--muted); }
  .axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
  .axis span:first-child { transform: none; }
  .axis span:last-child { transform: translateX(-100%); }
  td .sub2 { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  @media (max-width: 480px) {
    .ladder th:nth-child(4), .ladder td:nth-child(4) { display: none; }
    .ladder th, .ladder td { padding-left: 6px; padding-right: 6px; }
  }

  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  @media (max-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 860px) { .two-col { gap: 16px; } }

  /* =========================================================
     PHP platform additions (user + admin panels)
     ========================================================= */
  .status.red  { background: #f8dcd8; color: #8c2415; }
  .status.grey { background: #ebe8e2; color: #4a4f4b; }
  .pill.amber  { background: var(--amber-100); color: var(--amber-800); }
  .pill.red    { background: #f8dcd8; color: #8c2415; }
  a.pill:hover { text-decoration: none; filter: brightness(.97); }
  a.avatar, a.avatar:hover { color: #fff; text-decoration: none; }
  .notice.red { background: #fbe9e6; border-color: #efb9b0; color: #8c2415; }
  .flash-wrap { padding: 16px 28px 0; display: flex; flex-direction: column; gap: 8px; max-width: 1500px; }
  .signout-form { margin-top: auto; }
  .signout { appearance: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; width: 100%; border-radius: 10px; }
  .signout:hover { background: rgba(255,255,255,.07); }
  .sidebar { overflow-y: auto; }
  .nav-count { margin-left: auto; background: var(--orange); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
  .admin-badge { display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: var(--orange); color: #fff; border-radius: 4px; padding: 2px 6px; vertical-align: middle; margin-top: 4px; }
  .admin-pill { background: #fbe7d3; color: #7a4210; }
  body.is-admin .sidebar { background: #0f3f24; }
  body.is-admin .app { background: linear-gradient(to right, #0f3f24 234px, transparent 234px); }
  body.is-admin .nav { gap: 2px; }
  body.is-admin .nav a { padding: 10px 14px; font-size: 14.5px; }
  .btn.danger { background: #a3301e; }
  .btn.danger:hover { background: #8c2415; }
  .btn.ghost.danger { background: #fff; color: #a3301e; border-color: #efb9b0; }
  .btn.small { padding: 6px 14px; font-size: 13px; }
  .inline { display: inline; margin: 0; }
  .actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  td .actions { flex-wrap: nowrap; }
  .r { text-align: right; }
  .muted-row td { color: var(--muted); }
  .empty { color: var(--muted); text-align: center; padding: 22px 8px; }
  textarea { width: 100%; font: inherit; font-size: 14.5px; padding: 11px 14px; border: 1px solid #d7d2c8; border-radius: 8px; background: #fff; color: var(--ink); min-height: 96px; resize: vertical; }
  .field textarea { display: block; }
  .field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
  .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* Filter bar */
  .filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
  .filters .field { margin: 0; min-width: 150px; }
  .filters .field input, .filters .field select { padding: 8px 12px; font-size: 13.5px; }
  .filters .btn { padding: 9px 18px; }

  /* Pager */
  .pager { display: flex; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
  .pager a, .pager span { padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; }
  .pager span { background: var(--green-900); color: #fff; border-color: var(--green-900); }

  /* KPI tiles */
  .kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; }
  .kpi .value { font-size: 26px; font-weight: 800; margin-top: 4px; }
  .kpi .note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
  @media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 480px)  { .kpis { grid-template-columns: minmax(0, 1fr); } }

  /* Horizontal bars (reports) */
  .hbars { display: flex; flex-direction: column; gap: 10px; }
  .hbar { display: grid; grid-template-columns: 160px minmax(0, 1fr) 110px; gap: 10px; align-items: center; font-size: 13px; }
  .hbar .track { height: 12px; background: var(--head); border-radius: 99px; overflow: hidden; }
  .hbar .track span { display: block; height: 100%; background: var(--green-800); border-radius: 99px; }
  .hbar .v { text-align: right; font-weight: 700; }
  @media (max-width: 600px) { .hbar { grid-template-columns: 100px minmax(0, 1fr) 80px; } }

  .announce { margin: 0 0 0; }
  .kv.wide { grid-template-columns: 160px 1fr; }
  .kv.wide dd { text-align: left; font-weight: 600; }
  .tabs-links { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
  .tabs-links a { padding: 10px 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
  .tabs-links a[aria-current="page"] { color: var(--green-900); border-bottom-color: var(--green-900); }
  .article { max-width: 760px; }
  .article p { font-size: 15px; line-height: 1.6; }

  /* Sign-in pages: match the live sign-in page */
  .login-top { display: flex; justify-content: center; padding: 28px 16px 14px; }
  .login-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: var(--green-900); }
  .login-brand .brand-mark { width: 38px; height: 38px; background: #2f9a5c; }
  .login-main { display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; }
  .login-card { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px 20px; }
  .login-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--green-900); }
  .login-card .lead { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
  .login-card .field { margin-top: 12px; }
  .login-card .field label { color: var(--ink); font-weight: 600; font-size: 11px; }
  .login-card .field input { background: #e8f0fe; border-color: #d4dcf0; padding: 11px 12px; }
  .login-card .btn.block { margin-top: 16px; padding: 12px; border-radius: 999px; background: #10482a; }
  .login-card .btn.block:hover { background: var(--green-900); }
  .secure-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--green-900); background: var(--green-50); border: 1px solid #bfdfca; border-radius: 4px; padding: 4px 8px; }
  .login-foot { width: min(460px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; font-size: 12px; color: var(--muted); line-height: 1.55; }
  .login-foot strong { color: #3d4540; }
  .login-alt { text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; }

  @media (max-width: 860px) {
    .flash-wrap { padding: 12px 16px 0; }
    .signout-form { margin: 0 0 0 auto; }
    .signout { white-space: nowrap; }
    .form-grid.three, .form-grid.four { grid-template-columns: minmax(0, 1fr); }
    body.is-admin .app { background: none; }
    .nav-count { margin-left: 4px; }
    .admin-badge { display: none; }
  }
  @media (max-width: 480px) { .pill.admin-pill { display: none; } }
  .chip-link { font-size: 13px; border: 1px solid #d7d2c8; background: #fff; border-radius: 999px; padding: 5px 12px; color: var(--ink); font-weight: 400; }
  .chip-link:hover { text-decoration: none; background: var(--soft); }
  .chip-link[aria-current="true"] { background: var(--green-900); border-color: var(--green-900); color: #fff; font-weight: 700; }
