/* PumpScout shared styles */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f1b2d;
  --ink-2: #44526a;
  --ink-3: #7a879c;
  --line: #e3e8ef;
  --brand: #0b5fff;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0ff;
  --good: #0f9d58;
  --good-soft: #e5f6ed;
  --warn: #c77700;
  --warn-soft: #fff4e0;
  --bad: #d93025;
  --bad-soft: #fdecea;
  --navy: #0b1730;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
  --shadow-lg: 0 10px 40px rgba(15, 27, 45, .16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121b2e;
    --surface-2: #17223a;
    --ink: #e8edf6;
    --ink-2: #b4bfd2;
    --ink-3: #7f8ba3;
    --line: #233150;
    --brand: #4d8bff;
    --brand-soft: #18284a;
    --good: #34c77b;
    --good-soft: #10301f;
    --warn: #f0a530;
    --warn-soft: #332410;
    --bad: #ff6b5e;
    --bad-soft: #3a1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* Brand */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: inherit; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #0b5fff, #00b37e); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(11, 95, 255, .35); }
.logo-mark svg { width: 20px; height: 20px; }
.logo b { color: var(--brand); font-weight: 800; }

/* Controls */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.input, .select {
  height: 48px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 14px;
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; min-width: 0;
}
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237a879c' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.btn {
  height: 48px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: transform .05s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); text-decoration: none; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.locate-btn { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 8px; border: 0; background: var(--brand-soft); color: var(--brand); cursor: pointer; display: grid; place-items: center; }
.locate-btn:hover { filter: brightness(.96); }
.locate-btn svg { width: 18px; height: 18px; }
.locate-btn.busy svg { animation: spin 1s linear infinite; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

.up { color: var(--bad); }
.down { color: var(--good); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0, var(--line) 50%, var(--surface-2) 100%); background-size: 800px 100%; animation: shimmer 1.3s infinite linear; border-radius: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .25s; z-index: 3000; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
