/* FSC-branded light theme — dark green #285c4d, bright green #78be20 */
:root {
  --fsc-green: #285c4d;
  --fsc-green-dark: #1e463b;
  --fsc-lime: #78be20;
  --bg: #ffffff;
  --bg-soft: #f4f8ee;
  --text: #333333;
  --border: #dcdfd8;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg-soft); color: var(--text);
  font-family: "Open Sans", Arial, Helvetica, sans-serif; font-size: 14px;
}
body { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 16px;
  background: var(--fsc-green); color: #fff;
  border-bottom: 3px solid var(--fsc-lime);
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 700; }
.topbar h1 .sub { font-weight: 400; opacity: .8; font-size: 14px; }
.status { display: flex; align-items: center; gap: 14px; color: #e6efe4; font-size: 12.5px; }
.status #note { opacity: .85; }
.pill {
  background: var(--fsc-lime); color: #14351b;
  padding: 3px 12px; border-radius: 999px; font-weight: 700; white-space: nowrap;
}

.main { flex: 1 1 auto; min-height: 0; background: var(--bg); }
perspective-viewer { width: 100%; height: 100%; }

.loader {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--fsc-green); font-size: 16px; font-weight: 600; z-index: 20;
}
.loader.error { color: #c23b22; }

/* filter bar */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.field.grow { flex: 1 1 280px; }
.field label { font-size: 11px; color: var(--fsc-green); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.field input, .field select {
  background: #fff; color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--fsc-lime); box-shadow: 0 0 0 3px rgba(120,190,32,.2); }
.field select[multiple] option:checked { background: var(--fsc-lime); color: #fff; }
.btn { background: var(--fsc-green); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; cursor: pointer; font-weight: 600; font-family: inherit; }
.btn:hover { background: var(--fsc-green-dark); }

/* access gate */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--fsc-green), var(--fsc-green-dark));
}
.gate-box {
  background: #fff; border-radius: 12px; padding: 34px 30px;
  width: min(360px, 90vw); box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 12px; text-align: center;
}
.gate-logo { font-size: 22px; font-weight: 700; color: var(--fsc-green); }
.gate-sub { font-size: 13px; color: var(--muted); margin-top: -6px; }
.gate-box input {
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px;
  font-size: 15px; font-family: inherit; outline: none;
}
.gate-box input:focus { border-color: var(--fsc-lime); box-shadow: 0 0 0 3px rgba(120,190,32,.25); }
.gate-btn { width: 100%; padding: 11px; font-size: 15px; }
.gate-msg { color: #c23b22; font-size: 13px; min-height: 16px; }
.gate-load { color: var(--muted); font-size: 12px; }

/* desktop-only: block mobile layout */
.mobile-block { display: none; }
@media (max-width: 860px) {
  .mobile-block {
    display: flex; position: fixed; inset: 0; z-index: 9999;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; text-align: center; padding: 32px;
    background: var(--fsc-green); color: #fff; font-size: 20px; font-weight: 700;
  }
  .mobile-block > div:first-child { font-size: 46px; }
  .mobile-block .mb-sub { font-size: 13px; font-weight: 400; opacity: .9; max-width: 340px; line-height: 1.5; }
}
