/* BioConserve field app (desktop). Tokens from brand/BRAND-tokens.md. */
@font-face { font-family: "Lora"; font-weight: 500; src: url("fonts/lora_medium.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Lora"; font-weight: 600; src: url("fonts/lora_semibold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Poppins"; font-weight: 300; src: url("fonts/poppins_light.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Poppins"; font-weight: 400; src: url("fonts/poppins_regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Poppins"; font-weight: 600; src: url("fonts/poppins_semibold.ttf") format("truetype"); font-display: swap; }

:root {
  --deep-green: #526760;
  --green-light: #c7d3c7;
  --grey-light: #f3f3f3;
  --paper: #fffff3;
  --ink: #1c1e1d;
  --grey: #606060;
  --navy: #515f64;
  --fern: #708170;
  --seafoam: #719992;
  --sand: #e8e3ce;
  --white: #ffffff;
  --error: #a33a2e;
  --warning: #8a5a00;
  --success: #3b7a4a;
  --radius: 8px;
  --line: #dfe4dc;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Poppins", Arial, sans-serif; font-weight: 400; font-size: 14px; line-height: 1.5;
  color: var(--ink); background: var(--paper); min-width: 1024px;
}
h1, h2, h3, h4 { font-family: "Lora", Georgia, serif; color: var(--deep-green); font-weight: 600; margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
a { color: var(--deep-green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
code, .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--grey); }
.small { font-size: 12.5px; }
.sci { font-style: italic; }
.nowrap { white-space: nowrap; }

/* layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--deep-green) 220px, transparent 220px); }
.sidebar { background: var(--deep-green); color: var(--white); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.sidebar .logo { display: block; margin: 0 6px 22px; }
.sidebar .logo img { width: 150px; height: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-weight: 400; opacity: .92; }
.sidebar nav a:hover { background: rgba(255,255,255,.10); opacity: 1; }
.sidebar nav a.active { background: rgba(255,255,255,.18); font-weight: 600; opacity: 1; }
.sidebar .who { margin-top: auto; font-size: 12px; opacity: .9; border-top: 1px solid rgba(255,255,255,.2); padding-top: 12px; }
.sidebar .who a, .sidebar .who button { color: var(--white); }
.sidebar .dev { background: var(--sand); color: var(--ink); border-radius: 6px; padding: 4px 8px; font-size: 11px; margin: 0 6px 14px; text-align: center; }
main { padding: 26px 32px 60px; max-width: 1500px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.crumbs { font-size: 12.5px; color: var(--grey); margin-bottom: 4px; }
.crumbs a { color: var(--grey); }

/* panels */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.panel { background: var(--grey-light); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-family: "Lora", Georgia, serif; font-size: 24px; color: var(--deep-green); font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--grey); }

/* tables */
table.data { width: 100%; border-collapse: collapse; background: var(--white); font-size: 13px; }
table.data th { background: var(--deep-green); color: var(--white); font-weight: 600; text-align: left; padding: 7px 9px; font-size: 12.5px; position: sticky; top: 0; }
table.data td { padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: #fafbf7; }
table.data td.actions { white-space: nowrap; text-align: right; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table.data { border: 0; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--grey); }
dl.kv dd { margin: 0; }

/* status */
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pill.ok { color: var(--success); background: #e9f2ea; border-color: #cfe2d3; }
.pill.warn { color: var(--warning); background: #f8f0dd; border-color: #ecdcb3; }
.pill.err { color: var(--error); background: #f7e5e2; border-color: #ebc8c2; }
.pill.info { color: var(--navy); background: #eaeef0; border-color: #d3dbdf; }
.pill.quiet { color: var(--grey); background: var(--grey-light); border-color: var(--line); }
.flag-red { color: var(--error); font-weight: 600; }
.notice { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; border: 1px solid; }
.notice.ok { color: var(--success); background: #eef5ef; border-color: #cfe2d3; }
.notice.err { color: var(--error); background: #f9ebe8; border-color: #ebc8c2; }
.notice.warn { color: var(--warning); background: #fbf4e4; border-color: #ecdcb3; }
.notice.info { color: var(--navy); background: #eef2f3; border-color: #d3dbdf; }
.safe { font-size: 16px; font-weight: 600; color: var(--success); }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding: 6px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; align-items: baseline; }
ul.checks li:last-child { border-bottom: 0; }

/* forms */
label { display: block; font-size: 12.5px; color: var(--grey); margin-bottom: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--white); border: 1px solid #c9cfc6; border-radius: 6px; padding: 6px 9px; width: 100%;
}
textarea { min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-light); border-color: var(--deep-green); }
.field { margin-bottom: 12px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); align-items: end; }
.btn, button { font: inherit; font-weight: 600; font-size: 13px; border-radius: 6px; padding: 7px 14px; cursor: pointer; border: 1px solid var(--deep-green); background: var(--deep-green); color: var(--white); text-decoration: none; display: inline-block; line-height: 1.3; }
.btn:hover, button:hover { background: #45584f; color: var(--white); }
.btn.secondary, button.secondary { background: var(--white); color: var(--deep-green); }
.btn.secondary:hover, button.secondary:hover { background: var(--grey-light); }
.btn.navy, button.navy { background: var(--navy); border-color: var(--navy); }
.btn.danger, button.danger { background: var(--white); color: var(--error); border-color: var(--error); }
.btn.small, button.small { padding: 3px 9px; font-size: 12px; }
.btn.big, button.big { padding: 10px 22px; font-size: 15px; }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font-weight: 400; }
form.inline { display: inline; }
.offset { display: grid; grid-template-columns: 52px 60px 60px; gap: 6px; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--green-light); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--grey); border-radius: 6px 6px 0 0; }
.tabs a.active { color: var(--deep-green); font-weight: 600; background: var(--white); border: 2px solid var(--green-light); border-bottom-color: var(--white); margin-bottom: -2px; }

/* cards in the reader */
.vol { border-left: 4px solid var(--seafoam); }
.vol h3 { margin-bottom: 2px; }
.facts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--grey); margin: 6px 0 12px; }
.facts b { color: var(--ink); font-weight: 600; }

/* photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos figure { margin: 0; background: var(--grey-light); border-radius: 6px; overflow: hidden; }
.photos img { width: 100%; height: 130px; object-fit: cover; display: block; cursor: zoom-in; }
.photos figcaption { font-size: 11.5px; padding: 4px 7px; color: var(--grey); }
.lightbox { position: fixed; inset: 0; background: rgba(28,30,29,.88); display: none; align-items: center; justify-content: center; z-index: 50; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 4px; }
.lightbox .cap { position: absolute; bottom: 16px; color: var(--white); font-size: 13px; }

/* jobs */
.progress { height: 6px; background: var(--grey-light); border-radius: 3px; overflow: hidden; min-width: 120px; }
.progress > div { height: 100%; background: var(--deep-green); }
pre.log { background: #1f2421; color: #e6ece7; padding: 12px 14px; border-radius: var(--radius); font-size: 12px; max-height: 480px; overflow: auto; white-space: pre-wrap; }
#map { height: 560px; border-radius: var(--radius); border: 1px solid var(--line); }

/* sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; background: var(--deep-green); }
.signin .box { background: var(--paper); border-radius: 12px; padding: 32px 34px; width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.signin img { width: 190px; display: block; margin: 0 auto 18px; }
label.radio { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; margin-right: 12px; }
.banner-q { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
