/* The one design system for the hub, Breeze Client management and AutoBZ: DESIGN.md's navy surfaces, Satoshi,
   one accent per product (.breeze blue, .autobz amber). */
@font-face { font-family:Satoshi; src:url(/panel/satoshi.woff2) format("woff2"); font-weight:300 900; font-display:swap; }

:root {
	color-scheme:dark;
	--bg:#080A11; --side:#0B0E16; --card:#10141F; --card2:#161B28; --hover:#1B2131;
	--line:#212839; --line2:#2D3549; --line3:#3B4560;
	--ink:#F3F6FD; --soft:#C9D2E6; --dim:#8792AE; --faint:#5B647D;
	--breeze:#7EA6F0; --autobz:#F2B04A;
	--accent:var(--breeze); --accent-hi:#9BBAF4; --accent-bg:rgba(126,166,240,.12); --accent-line:rgba(126,166,240,.38); --on-accent:#0A1120;
	--good:#5FD0C2; --warn:#F2B04A; --bad:#E0687F; --bad-ink:#F2A3B1; --bad-bg:rgba(224,104,127,.1);
	--mono:ui-monospace, "Cascadia Mono", Consolas, monospace;
	--r-sm:8px; --r-md:12px; --r-lg:16px;
}
.autobz { --accent:var(--autobz); --accent-hi:#F6C676; --accent-bg:rgba(242,176,74,.12); --accent-line:rgba(242,176,74,.4); --on-accent:#1E1406; }

* { box-sizing:border-box; }
html, body { margin:0; background:var(--bg); color:var(--soft); font:15px/1.5 Satoshi, system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric:tabular-nums; -webkit-font-smoothing:antialiased; }
a { color:var(--accent); text-decoration:none; } a:hover { color:var(--accent-hi); }
h1 { font-size:28px; line-height:1.2; margin:0; font-weight:700; color:var(--ink); letter-spacing:-.015em; }
h2 { font-size:17px; margin:0; font-weight:700; color:var(--ink); }
h3 { font-size:15px; margin:0; font-weight:700; color:var(--ink); }
p { margin:0; }
small, .dim { color:var(--dim); font-size:13.5px; font-weight:450; }
.faint { color:var(--faint); }
code, .code { font-family:var(--mono); font-size:12.5px; color:var(--soft); }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.hide { display:none !important; }

/* --- shell: sidebar + content ------------------------------------------------------------------------------- */
.app { display:grid; grid-template-columns:252px minmax(0,1fr); min-height:100vh; }
.side { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; gap:2px; padding:16px 14px; background:var(--side); border-right:1px solid var(--line); overflow-y:auto; }
.back { display:inline-flex; align-items:center; gap:8px; align-self:flex-start; padding:6px 10px 6px 8px; margin-bottom:14px; border-radius:var(--r-sm); color:var(--dim); font-size:13.5px; font-weight:500; }
.back:hover { color:var(--ink); background:var(--card2); }
.back::before { content:""; width:7px; height:7px; border:solid currentColor; border-width:0 0 1.6px 1.6px; transform:rotate(45deg); margin-left:3px; }
.product { display:flex; align-items:center; gap:11px; padding:0 8px 18px; }
.product .tile { width:46px; height:46px; border-radius:12px; background:var(--accent-bg); border:1px solid var(--accent-line); display:grid; place-items:center; flex:none; }
.product .tile img { width:32px; height:32px; }
.product b { display:block; font-size:16px; color:var(--ink); font-weight:700; line-height:1.2; }
.product span { font-size:12.5px; color:var(--dim); }
.navlabel { font-size:12px; font-weight:600; color:var(--faint); padding:16px 10px 6px; }
.nav { display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; border:0; border-radius:var(--r-sm); background:none; color:var(--dim); font:inherit; font-size:14.5px; font-weight:500; text-align:left; cursor:pointer; }
.nav:hover { background:var(--card2); color:var(--ink); }
.nav.on, .nav[aria-current] { background:var(--accent-bg); color:var(--ink); }
.nav .count { margin-left:auto; font-size:12px; color:var(--dim); }
.grow { flex:1; min-height:12px; }
.who { display:flex; align-items:center; gap:10px; padding:14px 6px 2px; border-top:1px solid var(--line); margin-top:10px; }
.avatar { width:30px; height:30px; border-radius:50%; background:var(--card2); border:1px solid var(--line2); display:grid; place-items:center; font-size:13px; font-weight:700; color:var(--soft); flex:none; }
.who b { font-size:13.5px; color:var(--ink); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.who form, .who .btn { margin-left:auto; }
main { padding:36px 40px 80px; min-width:0; }
.wrap { max-width:1160px; margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr); gap:22px; }
.pagehead { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.pagehead p { margin-top:6px; color:var(--dim); }
.crumb { display:inline-flex; gap:6px; font-size:13.5px; color:var(--dim); margin-bottom:8px; } .crumb a { color:var(--dim); } .crumb a:hover { color:var(--ink); }

/* --- surfaces ----------------------------------------------------------------------------------------------- */
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); min-width:0; }
.pad { padding:22px 24px; }
.cardhead { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.cardhead p { color:var(--dim); font-size:13.5px; margin-top:3px; }
.sub { background:var(--card2); border:1px solid var(--line); border-radius:var(--r-md); padding:18px; }
.divider { height:1px; background:var(--line); margin:18px 0; border:0; }
.empty { color:var(--dim); text-align:center; padding:44px 20px; }
.empty b { display:block; color:var(--ink); font-size:16px; margin-bottom:4px; }

/* --- controls ----------------------------------------------------------------------------------------------- */
.btn, button.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit; font-size:14px; font-weight:600; min-height:38px; padding:0 15px; border-radius:var(--r-sm); border:1px solid var(--line2); background:var(--card2); color:var(--ink); cursor:pointer; white-space:nowrap; transition:background .12s, border-color .12s, color .12s; }
.btn:hover { background:var(--hover); border-color:var(--line3); color:var(--ink); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.btn.primary:hover { background:var(--accent-hi); border-color:var(--accent-hi); }
.btn.danger { background:transparent; border-color:rgba(224,104,127,.45); color:var(--bad-ink); }
.btn.danger:hover { background:var(--bad-bg); }
.btn.ghost { background:transparent; border-color:transparent; color:var(--dim); } .btn.ghost:hover { color:var(--ink); background:var(--card2); }
.btn.small { min-height:32px; padding:0 11px; font-size:13px; }
.btn:disabled { opacity:.45; cursor:default; }
.actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.actions .spacer { flex:1; }

label.field, .field { display:grid; gap:7px; min-width:0; }
.field > span { font-size:13px; font-weight:600; color:var(--soft); }
.field > em { font-style:normal; font-size:12.5px; color:var(--dim); margin-top:-2px; }
input[type=text], input[type=number], input[type=password], input[type=datetime-local], input:not([type]), input[type=file], select, textarea {
	font:inherit; font-size:14.5px; width:100%; min-height:40px; padding:8px 12px; border-radius:var(--r-sm); border:1px solid var(--line2); background:var(--bg); color:var(--ink); transition:border-color .12s;
}
input:hover, select:hover, textarea:hover { border-color:var(--line3); }
input:focus, select:focus, textarea:focus { border-color:var(--accent); outline:none; box-shadow:0 0 0 3px var(--accent-bg); }
input::placeholder, textarea::placeholder { color:var(--faint); }
input[type=file] { padding:6px 8px; color:var(--dim); font-size:13.5px; }
input[type=file]::file-selector-button { font:inherit; font-size:13px; font-weight:600; margin-right:10px; padding:5px 11px; border-radius:6px; border:1px solid var(--line2); background:var(--card2); color:var(--ink); cursor:pointer; }
input[type=checkbox] { width:17px; height:17px; margin:0; accent-color:var(--accent); flex:none; }
input.changed { border-color:var(--accent); background:var(--accent-bg); }
/* Dropdowns: the native list, with our chevron and surfaces. */
.select { position:relative; display:block; min-width:0; }
.select select { appearance:none; -webkit-appearance:none; padding-right:36px; cursor:pointer; }
.select::after { content:""; position:absolute; right:15px; top:50%; width:7px; height:7px; margin-top:-6px; border:solid var(--dim); border-width:0 1.6px 1.6px 0; transform:rotate(45deg); pointer-events:none; }
select option { background:var(--card2); color:var(--ink); }
.formrow { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap:14px; align-items:end; }
.formrow > .btn { align-self:end; }
.inline { display:flex; gap:10px; align-items:end; flex-wrap:wrap; } .inline > .field { flex:1 1 180px; }
.cols2 { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap:18px 24px; }
.checks { display:flex; flex-wrap:wrap; gap:10px 22px; padding:14px 16px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--bg); }
.check { display:inline-flex; align-items:center; gap:9px; font-size:14px; color:var(--soft); cursor:pointer; }
.toggle { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 0; border-bottom:1px solid var(--line); font-size:14.5px; color:var(--soft); }
.toggle:last-child { border-bottom:0; }
.toggle > input[type=number] { width:120px; } .toggle > textarea { width:280px; }
.msg { font-size:13.5px; } .ok { color:var(--good); } .err { color:var(--bad-ink); }

.seg { display:inline-flex; gap:2px; padding:3px; background:var(--bg); border:1px solid var(--line); border-radius:10px; }
.seg button, .seg a { border:0; background:none; font:inherit; font-size:13.5px; font-weight:500; color:var(--dim); padding:5px 13px; border-radius:7px; cursor:pointer; }
.seg button:hover, .seg a:hover { color:var(--ink); }
.seg .on, .seg [aria-current] { background:var(--card2); color:var(--ink); }

/* --- data --------------------------------------------------------------------------------------------------- */
.tablewrap { overflow:auto; margin:0 -24px; padding:0 24px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { text-align:left; font-size:12.5px; font-weight:600; color:var(--dim); padding:10px 14px; border-bottom:1px solid var(--line2); white-space:nowrap; }
td { padding:12px 14px; border-bottom:1px solid var(--line); white-space:nowrap; color:var(--soft); }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:rgba(214,226,255,.022); }
tr.link { cursor:pointer; }
th.n, td.n { text-align:right; }
td.wrap { display:table-cell; white-space:normal; min-width:240px; }
td b, td strong { color:var(--ink); font-weight:600; }
.status { display:inline-flex; align-items:center; gap:8px; font-weight:500; color:var(--soft); text-transform:capitalize; }
.status::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--faint); flex:none; }
.status.active::before, .status.flipping::before { background:var(--good); }
.status.unbound::before { background:var(--accent); }
.status.break::before { background:var(--warn); }
.status.idle::before { background:var(--dim); }
.status.trouble { color:var(--bad-ink); } .status.trouble::before { background:var(--bad); }
.status.revoked, .status.expired, .status.hard { color:var(--bad-ink); }
.status.revoked::before, .status.expired::before, .status.off::before, .status.hard::before { background:var(--bad); }
.chip { display:inline-flex; align-items:center; font-size:12px; font-weight:500; padding:2px 9px; border-radius:99px; background:var(--card2); border:1px solid var(--line2); color:var(--soft); margin:1px 4px 1px 0; white-space:nowrap; }
.chip.accent { color:var(--accent); border-color:var(--accent-line); } .chip.bad { color:var(--bad-ink); border-color:rgba(224,104,127,.38); }
.pos { color:var(--good); } .neg { color:var(--bad-ink); }
dl.facts { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:18px 28px; margin:0; }
dl.facts dt { font-size:12.5px; font-weight:600; color:var(--dim); margin-bottom:3px; }
dl.facts dd { margin:0; color:var(--ink); overflow-wrap:anywhere; }
.stats { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); } .stats.five { grid-template-columns:repeat(5, minmax(0,1fr)); } .stats.six { grid-template-columns:repeat(6, minmax(0,1fr)); }
.stat .dim { font-size:12.5px; }
.stat { padding:18px 22px; border-right:1px solid var(--line); min-width:0; } .stat:last-child { border-right:0; }
.stat .k { font-size:13px; color:var(--dim); font-weight:500; }
.stat .v { font-size:26px; font-weight:700; color:var(--ink); margin-top:2px; white-space:nowrap; letter-spacing:-.01em; }
.bar { height:6px; border-radius:3px; background:var(--card2); overflow:hidden; } .bar i { display:block; height:100%; background:var(--accent); border-radius:3px; }
.run { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:6px 14px; align-items:center; padding:14px 0; border-top:1px solid var(--line); }
.run:first-child { border-top:0; padding-top:4px; }
.run .title { color:var(--ink); font-weight:600; } .run .meta { font-size:13px; color:var(--dim); }
.run .bar { grid-column:2 / -1; height:7px; } .run .bar i { transition:width .6s ease; }
.run.failure .bar i { background:var(--bad); } .run.success .bar i { background:var(--good); }
.log { max-height:260px; overflow:auto; font:12px/1.6 var(--mono); color:var(--dim); white-space:pre-wrap; background:var(--bg); border:1px solid var(--line); border-radius:var(--r-sm); padding:10px 12px; }
.banner { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 16px; border-radius:var(--r-md); border:1px solid var(--accent-line); background:var(--accent-bg); color:var(--ink); font-size:14px; }

/* --- the hub and sign-in ------------------------------------------------------------------------------------ */
.topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:1040px; margin:0 auto; padding:22px 28px; }
.wordmark { display:flex; align-items:center; gap:12px; color:var(--ink); font-weight:700; font-size:21px; letter-spacing:-.01em; }
.wordmark img { width:40px; height:40px; }
.hub { max-width:1040px; margin:0 auto; padding:28px 28px 80px; display:grid; gap:28px; }
.services { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap:18px; }
.service { display:grid; grid-template-rows:auto 1fr auto; gap:18px; padding:26px; border-radius:20px; border:1px solid var(--line); background:var(--card); color:inherit; transition:border-color .15s, background .15s; }
.service:hover { border-color:var(--accent-line); background:#121725; color:inherit; }
.service .tile { width:60px; height:60px; border-radius:16px; background:var(--accent-bg); border:1px solid var(--accent-line); display:grid; place-items:center; }
.service .tile img { width:40px; height:40px; }
/* AutoBZ's icon is pixel art: it fills its tile edge to edge and keeps hard pixels. */
.tile.art { overflow:hidden; padding:0; } .tile.art img { width:100%; height:100%; image-rendering:pixelated; }
.service h2 { font-size:21px; margin-bottom:6px; }
.service p { color:var(--dim); font-size:14.5px; }
.service .foot { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:16px; border-top:1px solid var(--line); font-size:13.5px; color:var(--dim); }
.service .open { color:var(--accent); font-weight:600; display:inline-flex; align-items:center; gap:8px; }
.service .open::after { content:""; width:7px; height:7px; border:solid currentColor; border-width:1.6px 1.6px 0 0; transform:rotate(45deg); }
.signin { min-height:100vh; display:grid; place-items:center; padding:24px; }
.signin .box { width:min(100%, 400px); text-align:center; display:grid; gap:22px; justify-items:center; }
.signin .box img { width:96px; height:96px; }
.signin h1 { font-size:30px; }
.signin p { color:var(--dim); }
.discord { display:inline-flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:46px; border-radius:11px; background:#5865F2; color:#fff; font-weight:700; font-size:15px; }
.discord:hover { background:#6A76F4; color:#fff; }
.discord svg { width:20px; height:20px; }

@media (max-width:820px) {
	.app { grid-template-columns:minmax(0,1fr); }
	.side { position:static; height:auto; flex-direction:row; flex-wrap:wrap; align-items:center; gap:4px; padding:12px; border-right:0; border-bottom:1px solid var(--line); }
	.back { margin:0 auto 0 0; } .product { padding:0 4px; } .product span { display:none; } .navlabel, .grow { display:none; }
	.side .nav { width:auto; padding:7px 11px; font-size:14px; } .who { width:100%; margin-top:6px; padding-top:10px; }
	.side .select { width:100%; }
	main { padding:22px 16px 60px; } .pad { padding:18px; } .tablewrap { margin:0 -18px; padding:0 18px; }
	.stats, .stats.five, .stats.six { grid-template-columns:repeat(2, minmax(0,1fr)); } .stat:nth-child(2) { border-right:0; } .stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
	.stats.five .stat:nth-child(4), .stats.six .stat:nth-child(even) { border-right:0; } .stats.five .stat:nth-child(-n+4), .stats.six .stat:nth-child(-n+4) { border-bottom:1px solid var(--line); }
	h1 { font-size:24px; } .topbar, .hub { padding-left:16px; padding-right:16px; }
	.topbar { flex-wrap:wrap; } .topbar > .actions { width:100%; flex-wrap:nowrap; } .topbar .select { flex:1; min-width:0 !important; } .topbar .actions > b { display:none; }
}
