/* 3DroneMapping client portal — shared design system
   Palette: graphite field-instrument chrome, survey-beacon orange,
   contour teal. Type: Space Grotesk display, IBM Plex Mono data. */

:root {
  --ink: #14181d;
  --panel: #1b2128;
  --panel-2: #222932;
  --line: #343d47;
  --line-soft: #2a323b;
  --paper: #e8e4d9;
  --text: #e6e3db;
  --muted: #97a0a9;
  --accent: #f27649;      /* 3DroneMapping brand orange */
  --accent-soft: #f2764926;
  --teal: #4aa392;        /* contour teal */
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
button { font-family: var(--sans); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Top bar (viewers) ---------------------------------- */
.bar {
  height: 52px;
  display: flex;
  align-items: stretch;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.bar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  text-decoration: none;
}
.bar .brand img.mark { display: block; height: 26px; width: auto; }
.bar .brand b {
  font-size: 13px; letter-spacing: .08em; font-weight: 600;
}
.bar .ref {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 14px; border-right: 1px solid var(--line);
  min-width: 0;
}
.bar .ref .p { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.bar .ref .r { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .05em; }
.bar .tabs { display: flex; margin-left: auto; }
.bar .tabs a {
  display: flex; align-items: center; gap: 7px;
  padding: 0 18px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--muted); text-decoration: none;
  border-left: 1px solid var(--line);
}
.bar .tabs a:hover { color: var(--text); background: var(--panel-2); }
.bar .tabs a.on {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  background: var(--panel-2);
}

/* GCP quartered-target mark */
.gcp { width: 20px; height: 20px; flex: none; }

/* ---- Buttons & controls --------------------------------- */
.btn {
  appearance: none; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  padding: 7px 12px;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { border-color: var(--muted); }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: .4; cursor: default; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; }
.seg .btn + .btn { border-left: 1px solid var(--line); }

input[type="range"] { accent-color: var(--accent); }

/* ---- Floating panels on the map ------------------------- */
.panel {
  position: absolute;
  /* MapLibre appends its canvas AFTER these elements in the DOM, so
     without a stacking order the canvas paints straight over them. */
  z-index: 10;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.panel h4 {
  margin: 0 0 8px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.row { display: flex; align-items: center; gap: 8px; }
.row + .row { margin-top: 8px; }

/* ---- Coordinate readout --------------------------------- */
.coords {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 10;
  height: 30px;
  display: flex; align-items: center; gap: 22px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11.5px;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap; overflow: hidden;
}
.coords b { color: var(--text); font-weight: 500; }
.coords .tag { color: var(--accent); }

/* ---- Notices -------------------------------------------- */
.notice {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 11;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 9px 14px; font-size: 12.5px; color: var(--muted);
  max-width: min(560px, 92vw);
}
.notice b { color: var(--text); }
