:root {
  --bg: #0c120b;
  --surface: #3B4836;
  --card: #46543f;
  --border: #4a5a44;
  --text: #e8eef5;
  --muted: #9fb3c8;
  --accent: #8fce7d;
  --ok: #3dd68c;
  --warn: #e85d4c;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --footer-h: 110px;
}
* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}
a { color: #a8d89b; text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 0% 0%, #1a3a5c 0%, transparent 55%),
    radial-gradient(800px 400px at 100% 100%, #143528 0%, transparent 50%),
    var(--bg);
}
.auth-shell { width: min(420px, 100%); display: grid; gap: 18px; }
.auth-shell.wide { width: min(560px, 100%); }
.auth-brand { text-align: center; }
.logo-mark {
  width: 48px; height: 48px; margin: 0 auto 10px;
  border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(145deg, #5b8a4e, #2e4a2a);
}
.auth-brand h1 { margin: 0; font-size: 22px; }
.auth-brand p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.warn-line { color: #ffb4a8 !important; font-size: 12px !important; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.auth-card h2 { margin: 0 0 6px; font-size: 18px; }
.lead { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; }
input, select, textarea {
  width: 100%;
  background: #2c362a;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  font-size: 13px;
}
textarea { min-height: 96px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.advanced-api {
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px 8px;
  background: #2c362a;
}
.advanced-api summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 2px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}
.advanced-api summary::-webkit-details-marker { display: none; }
.advanced-api summary::before {
  content: "▸ ";
  color: var(--accent);
}
.advanced-api[open] summary::before { content: "▾ "; }
.advanced-api input { font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; padding: 11px 14px;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  text-decoration: none;
}
.btn.block { width: 100%; margin-top: 10px; }
.btn.primary { background: linear-gradient(180deg, #5b8a4e, #3B4836); color: #fff; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.status {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.45;
  border: 1px solid var(--border); background: #2c362a; color: var(--muted);
  white-space: pre-wrap; word-break: break-word;
}
.status.ok { border-color: rgba(61,214,140,0.4); color: #c6f6d5; }
.status.err { border-color: rgba(232,93,76,0.45); color: #ffc9c2; }
.auth-footer {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 16px; font-size: 12px;
}

.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app-top {
  position: sticky; top: 0; z-index: 40;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(59, 72, 54, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.app-top .left { display: flex; align-items: center; gap: 10px; }
.app-top .title { font-size: 14px; font-weight: 700; }
.app-top .sub { font-size: 11px; color: var(--muted); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}

.drawer {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: auto;
  width: min(280px, 86vw);
  height: auto;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  background: #2e382b;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-bottom-right-radius: 14px;
  box-shadow: 8px 12px 28px rgba(0,0,0,0.35);
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  z-index: 50;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer.open { transform: translateX(0); }
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 45;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer a, .drawer button.nav {
  display: block; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 10px;
  border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 14px; cursor: pointer;
}
.drawer a:hover, .drawer button.nav:hover, .drawer button.nav.active {
  background: rgba(143,206,125,0.15);
}
.drawer .sep { height: 1px; background: var(--border); margin: 6px 0; flex-shrink: 0; }

.app-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 14px 148px;
}
.view { display: none; }
.view.active { display: block; }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.panel h2 { margin: 0 0 6px; font-size: 16px; }
.panel p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; margin-right: 4px;
  border: 1px solid var(--border); color: var(--muted);
}
.badge.ok { color: var(--ok); }
.badge.warn { color: #ffb4a8; }

/* Workspace FAB: sit in the empty canvas above the site footer (green mark). */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--footer-h) + 18px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: linear-gradient(145deg, #5b8a4e, #3B4836);
  color: #fff; font-size: 28px; font-weight: 700;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.fab-menu {
  position: fixed;
  right: 16px;
  bottom: calc(var(--footer-h) + 82px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: none; flex-direction: column; gap: 8px;
}
.fab-menu.open { display: flex; }
.fab-menu button {
  border: 0; border-radius: 999px; padding: 10px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); cursor: pointer; font: inherit; font-size: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: #2c362a;
  cursor: pointer;
}
.upload-zone.drag { border-color: var(--accent); color: var(--text); }
.file-list { margin-top: 12px; font-size: 12px; }
.file-list .item {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Button rows that share one row on a phone instead of wrapping each
   button onto its own row (wallet, parcel, traverse). Same pattern as
   #view-uploads .evidence-actions and .review-inbox-actions. */
.actions--share .btn { flex: 1 1 0; min-width: 0; }
.actions--share .btn.primary { flex: 1 1 100%; }
.actions--trio { gap: 6px; }
.actions--trio .btn { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.actions--trio .btn.primary { flex: 1.1 1 0; }
.actions--trio .btn:last-child { flex: 1.35 1 0; }
.actions--pairs .btn { flex: 1 1 40%; min-width: 0; }
code { font-size: 11px; word-break: break-all; }

.coord-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}
.coord-table th, .coord-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
}
.coord-table th { background: #2c362a; color: var(--muted); font-weight: 600; }
.coord-table input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
}
.coord-table .idx { width: 36px; color: var(--muted); }

.nft-list .nft-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.nft-list .nft-item .btn { margin: 0; }

.legal-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}
.legal-doc-head {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.legal-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.legal-main h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.legal-meta {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.legal-main h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.legal-main p,
.legal-main li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.legal-main p { margin: 0 0 12px; }
.legal-main ul,
.legal-main ol {
  padding-left: 1.25em;
  margin: 0 0 4px;
}
.legal-main li { margin-bottom: 6px; }
.legal-main .panel {
  margin-top: 14px;
  padding: 18px 18px 14px;
}
.legal-main .panel:last-of-type { margin-bottom: 0; }
.legal-main .lead-strong {
  color: var(--text);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}
.legal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.legal-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}
@media (min-width: 560px) {
  .legal-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .legal-actions .btn {
    width: auto;
    min-width: 140px;
  }
}

/* Legal pages: copyright only — never repeat Guidelines / Terms / Privacy in the footer. */
.legal-body .site-footer-nav { display: none !important; }
.legal-body .fab,
.legal-body .fab-menu { display: none !important; }

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 18px 14px 22px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #232b21;
  text-align: center;
}
.site-footer-inner { max-width: 960px; margin: 0 auto; }
.site-footer-nav {
  display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center;
  margin-bottom: 10px; font-size: 12.5px;
}
.site-footer-nav a { color: #a8d89b; }
.site-footer-copy {
  margin: 0; font-size: 12px; color: var(--muted);
}

/* 20260903ui2 hamburger/create-parcel: stop drawer from eating labels */
.app-main, .panel, .view, .panel p, .panel label, .panel span, .panel summary,
.btn, .actions, .actions .btn, details, details summary {
  overflow: visible;
  text-overflow: unset;
}
.btn {
  white-space: normal;
  max-width: 100%;
  padding-inline: 14px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.drawer:not(.open) {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none !important;
}
.drawer.open {
  visibility: visible;
}
.drawer a, .drawer button.nav {
  overflow: visible;
  white-space: normal;
  box-shadow: none;
  filter: none;
}
.drawer button.nav.active {
  background: rgba(143, 206, 125, 0.18);
  box-shadow: none;
  filter: none;
}
/* Overlay only: never pad, push, scale, or shrink main content when the drawer opens. */
.app-body.drawer-open .app-main,
body.drawer-open .app-main {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  transform: none;
  padding-left: 16px;
  padding-right: 16px;
}
.app-body.drawer-open .drawer-backdrop,
body.drawer-open .drawer-backdrop {
  left: 0;
}

/* Stepped create-parcel flow (review/stepped-create-parcel-flow, 10 Nov 2026). */
.create-mode input[type="radio"] { accent-color: #5b8a4e; }
.step-indicator {
  display: flex; gap: 6px; list-style: none;
  margin: 0 0 14px; padding: 0;
}
.step-indicator li {
  flex: 1 1 0; min-width: 0; text-align: center;
  font-size: 12px; color: var(--muted);
  padding: 8px 4px; border-bottom: 2px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-indicator li .step-num {
  display: inline-flex; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  font-size: 11px; margin-right: 4px;
}
.step-indicator li.current { color: var(--text); border-bottom-color: #5b8a4e; font-weight: 700; }
.step-indicator li.current .step-num { background: #5b8a4e; border-color: #5b8a4e; color: #fff; }
.step-indicator li.done { color: var(--accent); }
.step-indicator li.done .step-num { border-color: var(--accent); color: var(--accent); }
/* The hidden attribute must win over author display rules: .btn, .actions
   and label all set display, which otherwise defeats hidden and leaves
   hidden buttons/labels visible (e.g. Add station row and Save as layout
   in Layout mode). Replaces the old .parcel-step-only rule. */
[hidden] { display: none !important; }
.step-nav { justify-content: space-between; align-items: center; }
.step-nav .step-gate-msg { flex: 1 1 auto; color: #ffc9c2; font-size: 13px; }
.step-nav .btn { flex: 0 0 auto; }
.review-summary {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px;
  margin: 0; font-size: 13px;
}
.review-summary dt { color: var(--muted); }
.review-summary dd { margin: 0; }
.client-details summary { cursor: pointer; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
