/* Lakeside Platform console. Palette shared with the error templates. */
:root {
  --ground: #0b1216; --ground-2: #0e1a20; --plate: #12212a; --plate-2: #172c37;
  --line: rgba(210,225,232,.10); --line-2: rgba(210,225,232,.20);
  --text: #eef4f6; --text-2: rgba(224,235,240,.64); --text-3: rgba(224,235,240,.40);
  --water: #46b6c2; --brass: #e6b24c;
  --up: #3fb27f; --warn: #e6b24c; --down: #df6455; --ext: #6486c0; --idle: #6b7d86;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--text); font: 14px/1.5 var(--font); }
a { color: var(--water); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); font-size: 12.5px; }

.top { display: flex; align-items: center; gap: 28px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--ground-2); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--water); font-weight: 600; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--text-2); padding: 6px 12px; border-radius: 8px; }
.top nav a:hover { color: var(--text); background: var(--plate); text-decoration: none; }
.top nav a[aria-current] { color: var(--text); background: var(--plate-2); }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--text-2); }
.who .box { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.who form { margin: 0; }
button { font: inherit; color: var(--text); background: var(--plate-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
button:hover { border-color: var(--water); }

main { padding: 24px; max-width: 1480px; margin: 0 auto; }
.foot { display: flex; justify-content: space-between; padding: 12px 24px; color: var(--text-3); font-size: 12px; border-top: 1px solid var(--line); }
h1 { font-size: 20px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 15px; margin: 28px 0 10px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.head .muted { font-size: 13px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--idle); flex: none; }
.s-up { --c: var(--up); } .s-warn { --c: var(--warn); } .s-down { --c: var(--down); } .s-external { --c: var(--ext); } .s-idle, .s-unknown, .s-unprobed { --c: var(--idle); }
.dot[class*="s-"] { background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--c, var(--idle)) 15%, transparent); color: color-mix(in srgb, var(--c, var(--idle)) 80%, white); white-space: nowrap; }
.legend { display: flex; gap: 16px; color: var(--text-2); font-size: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.card { background: var(--plate); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

/* Fleet map */
.fleet-wrap { position: relative; background: var(--plate); border: 1px solid var(--line); border-radius: 16px; padding: 20px; overflow-x: auto; }
.fleet-cols { position: relative; display: grid; grid-template-columns: 200px minmax(420px, 1fr) 220px; gap: 72px; min-width: 900px; align-items: center; }
.fleet-cols svg.edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.edges path { fill: none; stroke: var(--line-2); stroke-width: 1.4; }
.edges path.s-up { stroke: color-mix(in srgb, var(--up) 45%, transparent); }
.edges path.s-down { stroke: color-mix(in srgb, var(--down) 60%, transparent); stroke-dasharray: 4 4; }
.edges path.s-external { stroke: color-mix(in srgb, var(--ext) 45%, transparent); }
.edges path.atlas { stroke-dasharray: 2 5; }
.col { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.col-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 4px; }
.node { display: flex; gap: 10px; align-items: flex-start; background: var(--ground-2); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--idle)); border-radius: 10px; padding: 9px 12px; color: var(--text); }
a.node:hover { text-decoration: none; border-color: var(--line-2); border-left-color: var(--c); }
.node .dot { margin-top: 6px; }
.node .t { font-weight: 600; font-size: 13px; word-break: break-all; }
.node .d { color: var(--text-2); font-size: 12px; word-break: break-all; }
.node.big { padding: 16px; }
.node.big .t { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--ground-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-size: 12px; color: var(--text); }
a.chip:hover { text-decoration: none; border-color: var(--line-2); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-3); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:hover { background: color-mix(in srgb, var(--plate-2) 60%, transparent); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.group { margin-bottom: 18px; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.group-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.group-head .muted { font-size: 12px; }
.tablecard { background: var(--plate); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.img { color: var(--text-2); font-family: var(--mono); font-size: 12px; word-break: break-all; }
.domains a { display: block; font-size: 12px; }

/* Vitals */
.stat .k { color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 2px 0; }
.stat .s { color: var(--text-2); font-size: 12px; }
.spark { display: block; width: 100%; height: 44px; margin-top: 8px; }
.spark path.line { fill: none; stroke: var(--water); stroke-width: 1.5; }
.spark path.area { fill: color-mix(in srgb, var(--water) 14%, transparent); stroke: none; }
.spark path.line.b { stroke: var(--brass); }
.bar { height: 6px; background: var(--ground-2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--water); }
.bar i.hot { background: var(--warn); } .bar i.crit { background: var(--down); }

/* Service detail */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.logs { background: #070c0f; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-height: 560px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; }
.logs .ts { color: var(--text-3); margin-right: 8px; }
.logs .err { color: #f0a49b; }
.envs { display: flex; flex-wrap: wrap; gap: 6px; }
.envs code { font-family: var(--mono); font-size: 12px; background: var(--ground-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.toolbar { display: flex; gap: 12px; align-items: center; color: var(--text-2); font-size: 12px; }
.toolbar label { display: inline-flex; gap: 6px; align-items: center; }
.err-box { border: 1px solid color-mix(in srgb, var(--down) 50%, transparent); background: color-mix(in srgb, var(--down) 10%, transparent); padding: 10px 14px; border-radius: 10px; }

/* Login */
body.login { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(380px, calc(100vw - 32px)); background: var(--plate); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; }
.login-card h1 { margin: 16px 0 4px; font-size: 22px; font-weight: 500; }
.login-card h1 b { color: var(--water); font-weight: 600; }
.login-card form { display: grid; gap: 14px; margin-top: 20px; }
.login-card label { display: grid; gap: 6px; color: var(--text-2); font-size: 13px; }
.login-card input { font: inherit; color: var(--text); background: var(--ground-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; }
.login-card input:focus { outline: 2px solid color-mix(in srgb, var(--water) 50%, transparent); border-color: var(--water); }
.login-card button { background: var(--water); color: #06222f; border: none; padding: 10px; font-weight: 600; margin-top: 4px; }
.error { color: #f0a49b; background: color-mix(in srgb, var(--down) 12%, transparent); padding: 8px 12px; border-radius: 8px; }
.fleet-cols { align-items: start; }
.svc-group { background: var(--ground-2); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--idle)); border-radius: 12px; padding: 12px; }
.svc-group + .svc-group { margin-top: 10px; }
.svc-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.node.small { padding: 6px 9px; background: var(--plate); border-left-width: 2px; }
.node.small .t { font-size: 12.5px; font-weight: 500; }
.node.small .d { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.node.small .dot { margin-top: 5px; }
.downtxt { color: var(--down); font-weight: 500; }
.tablecard table.svc { table-layout: fixed; }
table.svc th:nth-child(1) { width: 24%; } table.svc th:nth-child(2) { width: 15%; } table.svc th:nth-child(3) { width: 13%; }
table.svc th:nth-child(4) { width: 8%; } table.svc th:nth-child(5) { width: 22%; } table.svc th:nth-child(6) { width: 18%; }
table.svc td { overflow-wrap: anywhere; }

/* Deploys, units, actions */
.small { font-size: 12px; }
code { font-family: var(--mono); font-size: 12px; }
button.act { padding: 3px 10px; font-size: 12.5px; white-space: nowrap; }
button.link { background: none; border: none; color: var(--water); padding: 0 4px; }
input.filter { font: inherit; color: var(--text); background: var(--ground-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 10px; width: 260px; }
.drawer { position: fixed; right: 16px; bottom: 16px; width: min(760px, calc(100vw - 32px)); background: var(--plate); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; z-index: 20; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.drawer-head button { margin-left: auto; }
.drawer .logs { max-height: 50vh; }
.login-card a.button.sso { display: block; text-align: center; background: var(--water); color: #06222f; font-weight: 600; border-radius: 8px; padding: 10px; margin-top: 20px; }
.login-card a.button.sso:hover { text-decoration: none; filter: brightness(1.08); }
.breakglass { margin-top: 18px; color: var(--text-2); font-size: 13px; }
.breakglass summary { cursor: pointer; }
.breakglass form { margin-top: 10px; }

/* Box switcher and labels */
.boxes { display: flex; gap: 6px; }
.boxtab { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text-2); font-size: 12.5px; font-family: var(--mono); }
.boxtab b { font-family: var(--font); font-size: 13px; color: var(--text); }
.boxtab i { font-style: normal; font-family: var(--font); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.boxtab:hover { text-decoration: none; border-color: var(--line-2); }
.boxtab.on { background: var(--plate-2); border-color: var(--water); color: var(--text); }
.boxtag { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #06222f; background: var(--water); border-radius: 6px; padding: 2px 8px; align-self: center; }
