/* Bastion Suite Europe — command-center dark theme, aligned with the marketing landing */
:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --surface: #121825;
  --surface-2: #1a2130;
  --border: rgba(173, 190, 220, 0.12);
  --border-soft: rgba(173, 190, 220, 0.07);
  --text: #e8edf5;
  --muted: #aeb9cc;
  --faint: #7c889e;
  --brand: #37d2e6;
  --brand-ink: #04121a;
  --brand-soft: rgba(55, 210, 230, 0.14);
  --ok: #46d99a;   --ok-soft: rgba(70, 217, 154, 0.14);
  --warn: #f3b84c; --warn-soft: rgba(243, 184, 76, 0.14);
  --crit: #ff6f6f; --crit-soft: rgba(255, 111, 111, 0.14);
  --info: #a98cff; --info-soft: rgba(169, 140, 255, 0.16);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  background: radial-gradient(1100px 560px at 50% -12%, rgba(55, 210, 230, 0.05), transparent 62%), var(--bg);
  background-attachment: fixed;
  font: 14px/1.5 var(--sans);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--display); font-size: 23px; font-weight: 600; margin: 0; letter-spacing: -.02em; }
h2 { font-family: var(--display); font-size: 15px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.01em; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }

/* top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar .inner { max-width: 1320px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 600; color: var(--text); font-size: 16px; letter-spacing: -.01em; }
.logo svg { color: var(--brand); }
.logo:hover { text-decoration: none; }
.logo svg { width: 24px; height: 24px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 7px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.who .tenant { color: var(--text); font-weight: 600; }
.who form { margin: 0; }

.page { max-width: 1320px; margin: 0 auto; padding: 24px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 18px 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); display: block; }
.tile:hover { text-decoration: none; border-color: var(--brand); }
.tile.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.tile .v { font-family: var(--display); font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tile.warn .v { color: var(--warn); }
.tile.crit .v { color: var(--crit); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 500; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.host { font-weight: 600; color: var(--text); }
.sub { color: var(--muted); font-size: 12.5px; }

/* badges & dots */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.crit { background: var(--crit-soft); color: var(--crit); }
.badge.info { background: var(--info-soft); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); }
.dot.crit { background: var(--crit); }

/* meters */
.meter { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.meter .bar { flex: 1; height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--ok); border-radius: 99px; }
.meter.warn .fill { background: var(--warn); }
.meter.crit .fill { background: var(--crit); }
.meter .val { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 40px; text-align: right; color: var(--muted); }
.w-0 { width: 0 } .w-5 { width: 5% } .w-10 { width: 10% } .w-15 { width: 15% } .w-20 { width: 20% } .w-25 { width: 25% }
.w-30 { width: 30% } .w-35 { width: 35% } .w-40 { width: 40% } .w-45 { width: 45% } .w-50 { width: 50% } .w-55 { width: 55% }
.w-60 { width: 60% } .w-65 { width: 65% } .w-70 { width: 70% } .w-75 { width: 75% } .w-80 { width: 80% } .w-85 { width: 85% }
.w-90 { width: 90% } .w-95 { width: 95% } .w-100 { width: 100% }

.spark { display: block; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

/* forms & buttons */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input[type=search], input[type=text], input[type=number], input[type=date], select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 11px; min-width: 0;
}
input[type=search] { width: 260px; max-width: 100%; }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.btn { font-family: var(--display); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.015); color: var(--text); cursor: pointer; white-space: nowrap; transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.btn:hover { text-decoration: none; border-color: var(--brand); color: #fff; transform: translateY(-1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 6px 22px -12px rgba(55, 210, 230, .7); }
.btn.primary:hover { filter: brightness(1.05); color: var(--brand-ink); transform: translateY(-1px); box-shadow: 0 10px 28px -12px rgba(55, 210, 230, .85); }
.btn.danger { color: var(--crit); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.ms { background: #2f2f2f; color: #fff; border-color: #2f2f2f; padding: 10px 18px; font-size: 15px; }
.inline { display: inline; margin: 0; }

/* key/value */
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 6px; } }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-weight: 500; color: var(--faint); margin-left: 4px; }

.machine-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.machine-head .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.machine-head .icon svg { width: 24px; height: 24px; }
.machine-head .meta { color: var(--muted); }
.machine-head .actions { margin-left: auto; display: flex; gap: 8px; }

/* events */
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 110px 160px 1fr; gap: 12px; padding: 9px 20px; border-bottom: 1px solid var(--border); align-items: baseline; }
.events li:last-child { border-bottom: 0; }
.events .t { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.events .title { overflow-wrap: anywhere; }
@media (max-width: 700px) { .events li { grid-template-columns: 1fr; gap: 2px; } }

/* landing */
.hero { max-width: 980px; margin: 0 auto; padding: 70px 20px 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.02em; }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 16px 0 26px; }
.hero ul { padding-left: 18px; color: var(--muted); }
.hero .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero h1 { font-size: 30px; } }

.notice { padding: 12px 16px; border-radius: 8px; background: var(--info-soft); color: var(--text); border: 1px solid var(--border); }
.notice.warn { background: var(--warn-soft); }
.notice.ok { background: var(--ok-soft); }
.notice.crit { background: var(--crit-soft); }
/* licence banner under the top bar */
.licbar { border-bottom: 1px solid var(--border); background: var(--info-soft); font-size: 13.5px; }
.licbar.warn { background: var(--warn-soft); }
.licbar.crit { background: var(--crit-soft); }
.licbar .inner { max-width: 1280px; margin: 0 auto; padding: 8px 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.check-row { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.keybox { display: flex; gap: 8px; align-items: center; }
.keybox code { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 8px 0 0; font-family: var(--mono); font-size: 12.5px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
ol.steps { padding-left: 20px; margin: 0; }
ol.steps li { margin-bottom: 14px; }
.hidden { display: none !important; }
.logo .shield { fill: var(--brand-soft); stroke: var(--brand); }
.logo .check { stroke: var(--brand); }
.mt { margin-top: 16px; }

/* live auto-refresh indicator */
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.live[hidden] { display: none; }
.live .dot.ok { animation: livepulse 2s ease-in-out infinite; }
.live.paused .dot { background: var(--faint); animation: none; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live .dot.ok { animation: none; } }
textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 11px; width: 100%; resize: vertical; }
label.stack-tight { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
label.stack-tight select, label.stack-tight input { width: 100%; }
.mt-s { margin-top: 8px; }
details summary { cursor: pointer; }
/* language switch (DA/EN) */
.langsw { display: inline-flex; margin-left: auto; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; font-size: 12px; font-weight: 600; }
.langsw a { color: var(--muted); padding: 5px 9px; letter-spacing: .04em; }
.langsw a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.langsw a.on { background: var(--brand-soft); color: var(--brand); }
