/* Landsat Fleet — design tokens + shared primitives.
   All colors flow from these tokens; page stylesheets reference them only.
   Page scaffolding (rail, panels, full-page layout) lives in command.css. */

:root {
  --bg: #121314;
  --surface: #191a1c;
  --surface-2: #202225;
  --chip: #26282c;
  --btn-strong: #2d3034;
  --border: #2c2e32;
  --text: #d7d6d1;
  --text-dim: #8e8d85;
  --text-on-strong: #f0efe9;
  --chip-text: #cbb586;
  --accent: #4dc3b2;
  --accent-soft: rgba(77, 195, 178, .16);
  --ok: #7fa66a;
  --warn: #d29a4b;
  --danger: #c96555;
  --danger-soft: rgba(201, 101, 85, .16);
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --radius: 6px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3 { color: var(--text); font-weight: 640; margin-bottom: .8rem; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
a { color: var(--accent); }

.brand-logo {
  background: url('/logo-white.png') no-repeat center / contain;
  height: 26px;
  width: 26px;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ---------- Tables ---------- */

table { border-collapse: collapse; width: 100%; }
th {
  color: var(--text-dim);
  font-size: .72rem;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
th, td { border-bottom: 1px solid var(--border); padding: .7rem .75rem; vertical-align: middle; }
td a { color: var(--accent); text-decoration: none; }
td a:hover { text-decoration: underline; }
tbody tr:hover { background: var(--surface-2); }

ul { list-style: none; }

/* ---------- Forms, buttons ---------- */

label { color: var(--text-dim); display: block; font-size: .84rem; font-weight: 650; margin-bottom: .5rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="time"], input[type="tel"], select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  padding: .5rem .65rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
}
select { width: auto; }
::placeholder { color: var(--text-dim); }
input[type="checkbox"] { accent-color: var(--accent); }

button, input[type="submit"], .primary-btn {
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  color: #1b1508;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 700;
  min-height: 34px;
  padding: .5rem .85rem;
}
button:hover, input[type="submit"]:hover, .primary-btn:hover { filter: brightness(1.1); }
button:disabled { cursor: not-allowed; filter: grayscale(.6); opacity: .45; }

.secondary-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 650;
}
.secondary-btn:hover { border-color: var(--accent); color: var(--accent); filter: none; }

.danger-btn { background: var(--danger); color: #2b0a07; }

/* ---------- Login ---------- */

.login-wrapper { align-items: center; display: flex; justify-content: center; min-height: 96vh; padding: 0 14px; }
.login-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-width: 360px;
  padding: 1.6rem;
  width: 100%;
}
.login-container h1 { border: 0; font-size: 1.2rem; margin-bottom: 1rem; text-align: center; }
.login-container label { margin-bottom: .7rem; }
.login-container input[type="submit"] { margin-top: .4rem; width: 100%; }
.sso-btn {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  display: flex;
  font-size: .86rem;
  font-weight: 650;
  gap: .55rem;
  justify-content: center;
  margin-top: .6rem;
  padding: .55rem;
  text-decoration: none;
}
.sso-btn:hover { border-color: var(--accent); }
.sso-btn img, .sso-btn i { font-size: 1rem; height: 18px; }

/* ---------- Status & badges ---------- */

.version-badge {
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 7px;
}
.version-badge.stale { background: rgba(245, 184, 61, .14); color: var(--warn); }

code { color: var(--chip-text); font-family: var(--mono); font-size: .86em; }

/* ---------- Toasts & flash ---------- */

.toast-region { bottom: 18px; display: grid; gap: 8px; position: fixed; right: 18px; z-index: 3000; }
.toast {
  animation: toast-out .5s ease 6s forwards;
  background: var(--btn-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--text-on-strong);
  font-size: .88rem;
  padding: .65rem .85rem;
}
.toast.error { background: var(--danger); color: #2b0a07; }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); visibility: hidden; } }

#flash-message {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: var(--danger);
  font-size: .86rem;
  margin-bottom: .9rem;
  padding: .55rem .75rem;
}

/* ---------- Map (tactical 2D layer) ---------- */

.leaflet-control-attribution { background: rgba(10, 15, 22, .7) !important; color: var(--text-dim) !important; }
.custom-leaflet-marker { align-items: center; display: flex; justify-content: center; }

@media (max-width: 700px) {
  h1 { font-size: 1.22rem; }
  th, td { padding: .5rem .55rem; }
  .toast-region { left: 8px; right: 8px; }
}
