/* Naventis Links - the MARINE VOICE look: dark, hairlines instead of shadows, blue = clickable, colour = category.
   Tokens are the console's (services/gateway/app/static/shell.css --mv-*). Fonts are the same OFL files. */
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url("/static/fonts/barlow-semi-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("/static/fonts/barlow-semi-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --page: #0b111b; --bar: #0a1018; --panel: #0e1622; --panel-on: #111d2b; --inset: #0b121d; --field: #101a26;
  --line: #16202d; --line2: #1b2735; --line3: #223141; --rule: #182432; --active: #2f6da8;
  --hi: #eef4fb; --text: #dbe6f2; --body: #c9d4e0; --sub: #94a5b7; --label: #8fa3b8; --dim: #6c7c8e;
  --info: #3b9dff; --info-hi: #7cc0ff; --info-tint: rgba(59, 157, 255, 0.14); --ok: #3ddc84; --warn: #f0a62b;
  --crit: #ff383c; --crit-text: #ff8a8c; --crit-tint: rgba(255, 56, 60, 0.12); --ink: #05090f;
  --disp: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text); font: 14px/1.45 var(--sans); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--info-hi); }
:focus-visible { outline: 2px solid var(--info-hi); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.hi { color: var(--hi); }
.dim { color: var(--sub); }
.muted { color: var(--sub); margin: 0; }
.small { font-size: 13px; }
.body-text { color: var(--body); line-height: 21px; margin: 0; }
.pad { padding: 24px 12px; }
.err { margin: 0; color: var(--crit-text); font-size: 13px; }

#env-bar { position: fixed; top: 0; left: 0; right: 0; height: 16px; z-index: 100; pointer-events: none; text-align: center;
  font: 600 11px/16px var(--sans); letter-spacing: 0.12em; }
#env-bar.dev { background: #c62828; color: #fff; }
#env-bar.uat { background: #f9c80e; color: #111; }

/* ---- wordmark, buttons ---- */
.wordmark { margin: 0; font: 600 19px/1 var(--disp); letter-spacing: 0.1em; color: var(--hi); }
.wordmark span { color: var(--label); font-weight: 500; }
.wordmark.big { font-size: 24px; letter-spacing: 0.12em; }
.btn { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px;
  border: 1px solid var(--line3); background: transparent; color: var(--sub); font: 600 13px/1 var(--disp); letter-spacing: 0.14em; }
.btn:hover { border-color: var(--active); }
.btn-blue { background: var(--info-tint); border-color: var(--active); color: var(--info-hi); }
.btn-primary { background: var(--info); border-color: var(--info); color: var(--ink); }
.btn-primary:hover { background: var(--info-hi); border-color: var(--info-hi); }
.btn-danger { background: var(--crit-tint); border-color: #5a2a31; color: var(--crit-text); }
.btn-danger-ghost { color: var(--crit-text); padding: 0 18px; }
.btn.wide { width: 100%; height: 44px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.grow { flex: 1; }
.link-btn { background: none; border: 0; padding: 6px; font: 600 12px/1 var(--disp); letter-spacing: 0.14em; color: var(--sub); }
.link-btn.crit { color: var(--crit-text); }
.iconbtn { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: var(--field); border: 1px solid var(--line3); border-radius: 5px; color: var(--body); }
.iconbtn:hover { border-color: var(--active); }
.iconbtn.crit { color: var(--crit-text); }
.iconbtn.on { color: var(--info); }
.iconbtn.on svg { fill: currentColor; }
.act { opacity: 0.45; transition: opacity 0.15s, border-color 0.15s; }
.row:hover .act, .tile:hover .act, .act:focus-visible, .act.on { opacity: 1; }
@media (hover: none) { .act { opacity: 1; } }

/* ---- centred cards: loading, sign in, no permission ---- */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); padding: 36px 32px 28px; display: flex; flex-direction: column; align-items: center;
  gap: 20px; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.logo { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--active); background: var(--info-tint); color: var(--info-hi);
  display: flex; align-items: center; justify-content: center; }
.logo.warn { border-color: rgba(240, 166, 43, 0.5); background: rgba(240, 166, 43, 0.12); color: var(--warn); }
#denied .wordmark { font-size: 22px; letter-spacing: 0.12em; }
hr { width: 100%; border: 0; height: 1px; background: var(--line); margin: 0; }
.note { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--sub); text-align: left; }
.who-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--inset); border: 1px solid var(--line);
  border-radius: 6px; text-align: left; }
.who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.who-text .mono { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.lamp { display: flex; align-items: center; gap: 6px; font: 600 11px/1 var(--disp); letter-spacing: 0.1em; color: var(--warn); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.row-btns { width: 100%; display: flex; gap: 8px; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line3); background: var(--field);
  display: inline-flex; align-items: center; justify-content: center; font: 600 12px/1 var(--disp); letter-spacing: 0.06em; color: var(--body); }

/* ---- header ---- */
.hdr { background: var(--bar); border-bottom: 1px solid var(--rule); }
.hdr-in { max-width: 1080px; margin: 0 auto; padding: 16px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line3); background: var(--field); color: var(--info-hi);
  display: flex; align-items: center; justify-content: center; }
.search { flex: 1 1 300px; position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--dim); }
.search input { width: 100%; height: 38px; padding: 0 60px 0 36px; background: var(--field); border: 1px solid var(--line3); border-radius: 6px;
  color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--active); }
.search input::-webkit-search-cancel-button { display: none; }
kbd { position: absolute; right: 10px; top: 10px; font: 11px/1.5 var(--mono); color: var(--label); border: 1px solid var(--line3); border-radius: 4px; padding: 0 6px; }
.who { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--line2); }

/* ---- page ---- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 32px 80px; display: flex; flex-direction: column; gap: 32px; }
.sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-h h2 { margin: 0; font: 600 13px/1 var(--disp); letter-spacing: 0.16em; color: var(--label); }
.sec-h .count { font: 11px/1 var(--mono); color: var(--sub); }
.sec-h i { flex: 1; height: 1px; background: var(--line); }

.ico { flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--ct);
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.ico.l { width: 38px; height: 38px; }
.ico.m { width: 30px; height: 30px; }
.dotc { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1.3 var(--disp); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ct); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent);
  border-radius: 3px; padding: 2px 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { position: relative; min-height: 118px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; transition: border-color 0.15s, background 0.15s; }
.tile:hover { border-color: var(--line3); background: var(--panel-on); }
.tile-top { display: flex; align-items: flex-start; gap: 8px; }
.tile-top .sp { flex: 1; }
.tile-top .iconbtn { width: 30px; height: 30px; position: relative; z-index: 1; }
.tile-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .catname { font: 600 11px/1.3 var(--disp); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ct); }
.host { font: 11.5px/1.4 var(--mono); color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ltitle { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; }
.tile .ltitle { font-size: 14.5px; }
.ltitle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltitle::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }   /* the whole tile / row opens the link */
.ext { opacity: 0; color: var(--info-hi); flex: none; transition: opacity 0.15s; }
.row:hover .ext, .tile:hover .ext, a:focus-visible .ext { opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border-radius: 4px; background: transparent;
  border: 1px solid var(--line2); color: var(--sub); font: 600 11.5px/1 var(--disp); letter-spacing: 0.1em; text-transform: uppercase; }
.chip:hover { border-color: var(--line3); }
.chip[aria-pressed="true"] { color: var(--ct, var(--info-hi)); background: color-mix(in srgb, var(--c, var(--info)) 16%, transparent);
  border-color: color-mix(in srgb, var(--c, var(--info)) 60%, transparent); }
.chip small { font: 10.5px/1 var(--mono); letter-spacing: 0; opacity: 0.8; }
.chip.dashed { border: 1px dashed var(--active); color: var(--info-hi); }
.chip.dashed.quiet { border-color: var(--line3); color: var(--sub); }

.list { display: flex; flex-direction: column; }
.row { position: relative; display: flex; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; }
.row:hover { background: var(--panel); border-color: var(--line); }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; }
.row .iconbtn { position: relative; z-index: 1; }
.row .pill { position: relative; }

/* ---- dialogs, toast ---- */
.ov { position: fixed; inset: 0; z-index: 50; background: rgba(5, 9, 15, 0.72); display: flex; justify-content: center; align-items: flex-start;
  padding: 64px 16px; overflow: auto; }
.dlg { width: 100%; max-width: 500px; background: var(--panel); border: 1px solid var(--line3); border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; }
.dlg-h { display: flex; align-items: center; padding: 14px 20px 12px; border-bottom: 1px solid var(--line); }
.dlg-h h2 { margin: 0; flex: 1; font: 600 15px/1 var(--disp); letter-spacing: 0.14em; color: var(--label); }
.dlg-b { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.dlg-f { display: flex; align-items: center; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.dlg-f .sp { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl { font: 600 11px/1 var(--disp); letter-spacing: 0.16em; color: var(--label); }
.field input[type="text"], .field input[type="url"], .field input[type="password"] { height: 38px; padding: 0 12px; background: var(--field); border: 1px solid var(--line3);
  border-radius: 6px; color: var(--hi); font-size: 14px; }
.field input.mono { font: 13px var(--mono); }
.field input:focus { outline: none; border-color: var(--active); }
.field .hint { font-size: 12px; color: var(--sub); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--info); }
.check span { display: flex; flex-direction: column; gap: 1px; }
.check small { font-size: 12px; color: var(--sub); }
.inline { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--inset); border: 1px solid var(--line); border-radius: 6px; }
.swatches, .glyphs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.glyphs { gap: 6px; }
.swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line3); }
.inline .swatch { border-color: var(--inset); }
.swatch[aria-pressed="true"] { border-color: var(--hi); box-shadow: 0 0 0 1px var(--c); }
.glyph { width: 36px; height: 36px; padding: 0; border-radius: 5px; display: flex; align-items: center; justify-content: center; background: var(--field);
  border: 1px solid var(--line3); color: var(--sub); }
.glyph[aria-pressed="true"] { color: var(--ct); background: color-mix(in srgb, var(--c) 16%, transparent); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.preview .small { color: var(--sub); }
.inline-f { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.inline-f .err { flex: 1; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); display: flex; align-items: center;
  gap: 14px; background: var(--panel-on); border: 1px solid var(--line3); border-radius: 6px; padding: 10px 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  font-size: 13px; color: var(--body); }
#toast.bad { border-color: #5a2a31; color: var(--crit-text); }

@media (max-width: 720px) {
  .hdr-in { padding: 14px 16px; gap: 12px; }
  .page { padding: 20px 16px 96px; }
  .search { order: 5; flex-basis: 100%; }
  kbd { display: none; }
  .who { margin-left: auto; padding-left: 12px; }
  .row { flex-wrap: wrap; gap: 8px 10px; }
  .row-main { flex-basis: calc(100% - 100px); }
  .row .pill { order: 4; margin-left: 40px; }
  .ov { padding: 24px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
