/* ===== Navicore Minimal UI (Light/Dark) ===== */
:root {
  --brand: #0b74ff;
  --bg: #0b0e13;
  --surface: #121720;
  --panel: #151b26;
  --panel-2: #1a2230;
  --text: #eef2f7;
  --text-muted: #a7b0bf;
  --border: #263145;
  --good: #19c37d;
  --bad: #ff647c;
}

:root[data-theme="light"] {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-2: #f2f5f9;
  --text: #0b1220;
  --text-muted: #5b6678;
  --border: #e4e8ef;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  font: 16.5px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
}

/* ---------- Layout shell ---------- */
.nc-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Header */
.nc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--surface), transparent 15%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nc-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.nc-header-left, .nc-header-right { display: flex; gap: 10px; align-items: center; }
.nc-logo { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.nc-logo img { max-height: 32px; width: auto; }
.nc-logo span { font-weight: 800; letter-spacing: .2px; }

/* Basic container */
.nc-main {
  max-width: 1080px;
  margin: 18px auto;
  padding: 0 20px 88px; /* extra bottom so footer never covers content */
}

/* Cards */
.nc-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.nc-card + .nc-card { margin-top: 16px; }
.nc-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

/* Grid for 2-column forms & content */
.nc-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 960px) {
  .nc-grid.cols-2 { grid-template-columns: 1.1fr 1fr; }
}

/* Form controls */
.nc-field { display: grid; gap: 6px; }
.nc-field label { color: var(--text-muted); font-size: 13px; }
.nc-input, .nc-select, .nc-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 11px 12px;
  min-height: 46px;
}
.nc-textarea { min-height: 120px; resize: vertical; }

/* Buttons */
.nc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 16px; min-height: 44px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text);
  text-decoration: none; cursor: pointer; font-weight: 700;
}
.nc-btn.primary {
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand), white 10%), var(--brand));
  color: #fff; border-color: color-mix(in oklab, var(--brand), black 15%);
}
.nc-btn.ghost { background: transparent; }
.nc-btn.outline { background: transparent; border: 1px dashed var(--border); }

/* Results panel (has its own scroll) */
.nc-results {
  display: grid; gap: 12px;
}
.nc-results-head {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: 13px;
}
.nc-results-body {
  max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}

/* Route item */
.nc-route {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
}
.nc-route h3 { margin: 0 0 10px; font-size: 16px; }
.nc-route .meta { color: var(--text-muted); font-size: 13px; margin-bottom: 4px; }
.nc-route ol { margin: 8px 0 0 20px; }

/* Footer (fixed & centered) */
.nc-footer {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: grid; place-items: center; height: 56px; background: transparent;
}
.nc-footer-inner {
  background: color-mix(in oklab, var(--surface), transparent 20%);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Generic fixes for legacy pages */
.container, .content, main, .wrap {
  max-width: 960px; margin: 24px auto; padding: 0 24px;
}
button, .btn {
  font-weight: 700; border-radius: 12px; padding: 12px 16px; min-height: 46px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}
button.primary, .btn.primary {
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand), white 10%), var(--brand));
  border-color: color-mix(in oklab, var(--brand), black 15%); color: #fff;
}
img#siteLogo, img.logo, header img { max-height: 32px; width: auto; }
