/* GUSlive console theme (Oct 2026). One look for every signed-in page, taken from the project page:
   black background, #1c1c1e grouped lists, segmented controls, pill buttons, iOS switches, Geist type.
   Scope: everything under .gl-app (the <body> of the staff pages, #app-view on index.html), so the
   public landing page keeps its own design. Pages load this AFTER their own <style>, so equal
   selectors here win; the legacy tokens (--bg-0, --text-1 …) are remapped so older CSS follows along. */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&family=Kanit:wght@600;700;800&family=Anuphan:wght@400;500;600&display=swap");

:root {
  --gl-bg: #000;
  --gl-grp: #1c1c1e;
  --gl-grp-hi: #2c2c2e;
  --gl-grp-hi2: #3a3a3c;
  --gl-sep: rgba(84,84,88,.42);
  --gl-line: rgba(255,255,255,.08);
  --gl-tx: #f5f5f7;
  --gl-tx2: #a1a1a6;
  --gl-tx3: #6e6e73;
  --gl-red: #ff453a;
  --gl-red-soft: rgba(255,69,58,.14);
  --gl-blue: #0a84ff;
  --gl-blue-soft: rgba(10,132,255,.14);
  --gl-green: #30d158;
  --gl-green-soft: rgba(48,209,88,.14);
  --gl-yellow: #ffd60a;
  --gl-orange: #ff9f0a;
  --gl-font: "Geist", -apple-system, "Segoe UI", system-ui, "Anuphan", sans-serif;
  --gl-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --gl-ease: cubic-bezier(.2,.7,.2,1);
  --gl-r: 14px;
}
html[lang="th"] { --gl-font: "Geist", "Anuphan", -apple-system, "Segoe UI", system-ui, sans-serif; }

/* ---------- legacy token remap: older page CSS picks up the new palette ---------- */
.gl-app {
  --bg-0: #000; --bg-1: #1c1c1e; --bg-2: #1c1c1e; --bg-3: #2c2c2e; --bg-4: #3a3a3c;
  --border-c: rgba(84,84,88,.42); --border-strong: rgba(120,120,128,.5); --edge: transparent;
  --text-1: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73;
  --red: #ff453a; --red-dark: #e0352b; --red-glow: rgba(255,69,58,.25);
  --green: #30d158; --green-bg: rgba(48,209,88,.14);
  --radius-card: 14px; --radius-ctl: 10px;
  --shadow-card: none; --shadow-pop: 0 24px 60px rgba(0,0,0,.6);
  --ring: 0 0 0 2px var(--gl-blue);
  font-family: var(--gl-font);
  color: var(--gl-tx);
  -webkit-font-smoothing: antialiased;
}
body.gl-app, #app-view.gl-app { background: var(--gl-bg); }
body.gl-app { margin: 0; min-height: 100vh; }
.gl-app button, .gl-app input, .gl-app select, .gl-app textarea { font-family: inherit; }
.gl-app :focus-visible { outline: 2px solid var(--gl-blue); outline-offset: 2px; box-shadow: none; }
.gl-app ::selection { background: rgba(10,132,255,.35); }
.gl-app code, .gl-app .mono { font-family: var(--gl-mono); }

/* legacy controls, restyled */
.gl-app .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--gl-grp); border: 0; box-shadow: none; color: var(--gl-tx);
  border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600;
  transition: background .2s, transform .1s;
}
.gl-app .btn:hover { background: var(--gl-grp-hi); border: 0; }
.gl-app .btn:active { transform: scale(.97); }
.gl-app .btn:disabled, .gl-app .btn:disabled:hover { background: var(--gl-grp); opacity: .45; }
.gl-app .btn-primary { background: var(--gl-blue); color: #fff; box-shadow: none; }
.gl-app .btn-primary:hover { background: #3395ff; box-shadow: none; }
.gl-app .btn-danger { background: var(--gl-red); color: #fff; box-shadow: none; }
.gl-app .btn-danger:hover { background: #ff6259; box-shadow: none; }
.gl-app .btn-danger-ghost { background: transparent; color: var(--gl-red); box-shadow: inset 0 0 0 1px rgba(255,69,58,.4); }
.gl-app .btn-danger-ghost:hover { background: var(--gl-red-soft); color: var(--gl-red); }
.gl-app .btn-green { background: var(--gl-green); color: #032b10; }
.gl-app .btn.active { background: var(--gl-grp-hi2); }
.gl-app .card { background: var(--gl-grp); border: 0; border-radius: var(--gl-r); box-shadow: none; }
.gl-app input[type=text], .gl-app input[type=password], .gl-app input[type=email], .gl-app input[type=number],
.gl-app input[type=search], .gl-app input[type=datetime-local], .gl-app input[type=date], .gl-app select, .gl-app textarea {
  background: var(--gl-grp-hi); border: 0; box-shadow: none; color: var(--gl-tx);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.gl-app input[type=text]:hover, .gl-app input[type=password]:hover { border: 0; }
.gl-app input:focus, .gl-app select:focus, .gl-app textarea:focus { outline: 2px solid var(--gl-blue); outline-offset: 0; box-shadow: none; border: 0; }
.gl-app input::placeholder, .gl-app textarea::placeholder { color: var(--gl-tx3); }
/* Browser autofill paints a light background; cover it with the field colour (the plain
   box-shadow:none above would otherwise remove the old cover and leave white text on light blue). */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--gl-tx) !important; caret-color: var(--gl-tx);
  -webkit-box-shadow: 0 0 0 1000px var(--gl-grp-hi) inset !important; box-shadow: 0 0 0 1000px var(--gl-grp-hi) inset !important;
  transition: background-color 600000s 0s;
}
.gl-app input[type=checkbox] { accent-color: var(--gl-green); }
.gl-app .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--gl-grp); border: 0; }
.gl-app .seg .btn { background: none; border-radius: 8px; padding: 6px 13px; font-weight: 500; color: var(--gl-tx2); white-space: nowrap; }
.gl-app .seg .btn.active, .gl-app .seg .btn[aria-selected="true"] { background: var(--gl-grp-hi); color: var(--gl-tx); box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* ---------- top bar (built by ui.js) ---------- */
.gl-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: rgba(0,0,0,.72); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-bottom: 1px solid var(--gl-line); font-family: var(--gl-font); color: var(--gl-tx);
}
.gl-topbar-in { position: relative; max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px max(16px, env(safe-area-inset-left, 0px)); min-height: 60px; box-sizing: border-box; }
.gl-brand { display: flex; align-items: baseline; gap: 2px; text-decoration: none; color: var(--gl-tx); font-family: "Kanit", var(--gl-font); font-weight: 800; font-size: 22px; letter-spacing: -.03em; flex: none; }
.gl-brand b { color: var(--gl-red); font-weight: 800; }
.gl-brand small { font-family: var(--gl-font); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; color: var(--gl-tx3); text-transform: uppercase; margin-left: 10px; align-self: center; }
.gl-sys { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gl-tx2); padding: 6px 12px; border-radius: 999px; background: var(--gl-grp); white-space: nowrap; min-width: 0; overflow: hidden; }
.gl-sys .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gl-green); box-shadow: 0 0 0 3px var(--gl-green-soft); flex: none; }
.gl-sys.warn .dot { background: var(--gl-orange); box-shadow: 0 0 0 3px rgba(255,159,10,.18); }
.gl-sys.bad .dot { background: var(--gl-red); box-shadow: 0 0 0 3px var(--gl-red-soft); }
.gl-sys b { color: var(--gl-tx); font-weight: 600; }
.gl-sys .more { overflow: hidden; text-overflow: ellipsis; }
.gl-sys { cursor: pointer; transition: background .2s; }
.gl-sys:hover, .gl-sys[aria-expanded="true"] { background: var(--gl-grp-hi); }
/* the Dual Frame node (admins): a second, smaller status after the main one */
.gl-sys-node { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--gl-sep); color: var(--gl-tx2); flex: none; }
.gl-sys-node i { width: 6px; height: 6px; border-radius: 50%; background: var(--gl-green); }
.gl-sys-node.off { color: var(--gl-red); }
.gl-sys-node.off i { background: var(--gl-red); }
.gl-sys-node.warn { color: var(--gl-orange); }
.gl-sys-node.warn i { background: var(--gl-orange); }
.gl-sys-node i { transition: background-color .35s ease; }
.gl-sys b { transition: color .25s ease; }

/* Servers panel, under the status pill */
.gl-srv { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: 58px; z-index: 45; width: 380px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px); overflow: auto;
  background: var(--gl-grp-hi); border-radius: 16px; padding: 6px 6px 10px; box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: gl-drop .2s var(--gl-ease);
  font-family: var(--gl-font); color: var(--gl-tx); font-size: 13.5px; box-sizing: border-box; }
.gl-srv[hidden] { display: none; }
.gl-srv-k { padding: 10px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gl-tx3); }
.gl-srv-k.in-card { padding: 12px 0 6px; font-size: 11px; }
.gl-srv-lead { margin: 0 10px 8px; font-size: 12.5px; line-height: 1.45; color: var(--gl-tx3); }
.gl-srv-lead.in-card { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--gl-line); }
.gl-srv-wl-box { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.gl-srv-wl {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 10px;
  padding: 8px 10px; border-radius: 10px; background: var(--gl-grp-hi); align-items: baseline;
}
.gl-srv-wl-k { font-size: 13px; color: var(--gl-tx2); grid-row: 1; }
.gl-srv-wl-v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; grid-row: 1; text-align: right; color: var(--gl-tx); }
.gl-srv-wl-h { grid-column: 1 / -1; font-size: 11.5px; color: var(--gl-tx3); }
.gl-srv-wl.ok .gl-srv-wl-h { color: var(--gl-green); }
.gl-srv-wl.warn .gl-srv-wl-h { color: var(--gl-orange); }
.gl-srv-wl.off .gl-srv-wl-v { color: var(--gl-tx3); }
.gl-srv-m.gl-srv-gpu { border: 1px solid var(--gl-line); }
.gl-srv-m { background: var(--gl-grp); border-radius: 12px; padding: 12px; margin-bottom: 6px; }
.gl-srv-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gl-srv-h b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-srv-h .tag { font-size: 11.5px; color: var(--gl-tx2); background: var(--gl-grp-hi); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.gl-srv-h .st { margin-left: auto; font-size: 12.5px; color: var(--gl-tx2); white-space: nowrap; }
.gl-srv .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gl-green); box-shadow: 0 0 0 3px var(--gl-green-soft); flex: none; }
.gl-srv .dot.warn { background: var(--gl-orange); box-shadow: 0 0 0 3px rgba(255,159,10,.18); }
.gl-srv .dot.bad { background: var(--gl-red); box-shadow: 0 0 0 3px var(--gl-red-soft); }
.gl-srv-m.off .gl-srv-h .st { color: var(--gl-red); }
.gl-srv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.gl-srv-stats div { min-width: 0; }
.gl-srv-stats b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gl-srv-stats span { display: block; font-size: 11.5px; color: var(--gl-tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-srv-line { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--gl-line); color: var(--gl-tx2); }
.gl-srv-line b { color: var(--gl-tx); font-weight: 600; font-variant-numeric: tabular-nums; }
.gl-srv-line.dim { border-top: 0; margin-top: 0; padding-top: 4px; font-size: 12.5px; color: var(--gl-tx3); }
.gl-srv-note { margin-top: 8px; font-size: 12.5px; color: var(--gl-orange); }
.gl-srv-note.dim { color: var(--gl-tx3); }
.gl-srv-toggle-row { align-items: center; }
.gl-srv-toggle {
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--gl-line); background: var(--gl-grp-hi); color: var(--gl-tx2); transition: background .15s, color .15s, border-color .15s;
}
.gl-srv-toggle.on { background: var(--gl-green-soft); border-color: var(--gl-green); color: var(--gl-green); }
.gl-srv-toggle:disabled { opacity: .55; cursor: wait; }
.gl-srv-empty { padding: 4px 10px 6px; color: var(--gl-tx3); }
.gl-srv-jobs { list-style: none; margin: 0; padding: 0 4px; }
.gl-srv-jobs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 8px 6px; border-top: 1px solid var(--gl-line); }
.gl-srv-jobs li:first-child { border-top: 0; }
.gl-srv-jobs b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-srv-jobs .st { text-align: right; color: var(--gl-tx2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gl-srv-jobs .st.bad { color: var(--gl-red); }
.gl-srv-jobs .where { grid-column: 1 / -1; font-size: 12px; color: var(--gl-tx3); }
.gl-srv-jobs .where.node { color: var(--gl-green); }
.gl-srv-jobs small { grid-column: 1 / -1; font-size: 11.5px; color: var(--gl-red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-menu .gl-menu-phone { display: none; }
.gl-sp { flex: 1; }
.gl-nav { display: flex; gap: 2px; align-items: center; }
.gl-nav a, .gl-nav button {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; position: relative;
  color: var(--gl-tx2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font-size: 19px;
  transition: background .2s, color .2s;
}
.gl-nav a:hover, .gl-nav button:hover, .gl-nav a.on { background: var(--gl-grp); color: var(--gl-tx); }
.gl-nav [data-tip]:hover::after, .gl-nav [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; top: 44px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 8px; background: var(--gl-grp-hi); color: var(--gl-tx); pointer-events: none; z-index: 2;
}
.gl-nav .gl-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--gl-red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.gl-avatar-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; flex: none; overflow: hidden;
  background: linear-gradient(135deg, #5e5ce6, #bf5af2); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; font-family: var(--gl-font); }
.gl-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-menu { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: 58px; z-index: 45; width: 260px; background: var(--gl-grp-hi); border-radius: 14px; padding: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: gl-drop .2s var(--gl-ease); font-family: var(--gl-font); color: var(--gl-tx); }
.gl-menu[hidden] { display: none; }
.gl-menu-who { padding: 10px 12px 8px; }
.gl-menu-who b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-menu-who span { font-size: 12.5px; color: var(--gl-tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.gl-menu hr { border: 0; border-top: 1px solid var(--gl-sep); margin: 4px 6px; }
.gl-menu button, .gl-menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 14.5px;
  background: none; border: 0; color: var(--gl-tx); cursor: pointer; text-decoration: none; font-family: inherit; box-sizing: border-box; }
.gl-menu button:hover, .gl-menu a:hover { background: rgba(255,255,255,.06); }
.gl-menu i { font-size: 17px; color: var(--gl-tx2); }
.gl-menu .danger, .gl-menu .danger i { color: var(--gl-red); }
.gl-menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 14.5px; }
.gl-menu-lang .gl-seg button { width: auto; padding: 5px 12px; font-size: 13px; }
body.gl-has-topbar, #app-view.gl-has-topbar { padding-top: 61px; }
#app-view > .gl-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; }
.gl-topbar .hidden, .gl-menu .hidden { display: none !important; }
.gl-menu-nav { display: none; }

/* ---------- shared components ---------- */
.gl-page { max-width: 1320px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 64px; box-sizing: border-box; }
.gl-h1 { font-weight: 700; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; line-height: 1.05; margin: 28px 0 6px; }
.gl-lead { color: var(--gl-tx2); margin: 0 0 24px; font-size: 15px; }
.gl-label { font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gl-tx3); margin: 0 0 8px 14px; }
.gl-grp { background: var(--gl-grp); border-radius: var(--gl-r); overflow: hidden; }
.gl-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 48px; position: relative; }
.gl-grp > .gl-row + .gl-row, .gl-grp > * + .gl-row { box-shadow: inset 0 1px 0 var(--gl-sep); }
.gl-row .k { color: var(--gl-tx2); font-size: 14px; flex: none; width: 110px; }
.gl-row .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gl-row .v small { display: block; color: var(--gl-tx3); font-size: 12.5px; }
.gl-row.link { cursor: pointer; }
.gl-row.link:hover { background: rgba(255,255,255,.03); }
.gl-foot { margin: 8px 14px 0; font-size: 12.5px; color: var(--gl-tx3); line-height: 1.55; }
.gl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--gl-grp); color: var(--gl-tx); font: 600 14px var(--gl-font); white-space: nowrap; transition: background .2s, transform .1s; }
.gl-btn:hover:not(:disabled) { background: var(--gl-grp-hi); }
.gl-btn:active:not(:disabled) { transform: scale(.97); }
.gl-btn:disabled { opacity: .45; cursor: default; }
.gl-btn.primary { background: var(--gl-blue); color: #fff; }
.gl-btn.primary:hover:not(:disabled) { background: #3395ff; }
.gl-btn.danger { background: var(--gl-red); color: #fff; }
.gl-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.gl-text-btn { background: none; border: 0; padding: 4px 2px; cursor: pointer; font: 500 13.5px var(--gl-font); color: var(--gl-blue); }
.gl-text-btn.danger { color: var(--gl-red); }
.gl-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--gl-grp); gap: 2px; }
.gl-seg button { padding: 7px 15px; border-radius: 8px; border: 0; background: none; cursor: pointer; font: 500 14px var(--gl-font); color: var(--gl-tx2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.gl-seg button[aria-selected="true"], .gl-seg button.on { background: var(--gl-grp-hi); color: var(--gl-tx); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.gl-seg .cnt { font-size: 12px; color: var(--gl-tx3); }
.gl-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gl-grp-hi); color: var(--gl-tx2); white-space: nowrap; }
.gl-pill.green { background: var(--gl-green-soft); color: var(--gl-green); }
.gl-pill.red { background: var(--gl-red-soft); color: var(--gl-red); }
.gl-pill.blue { background: var(--gl-blue-soft); color: var(--gl-blue); }
.gl-pill.yellow { background: rgba(255,214,10,.14); color: var(--gl-yellow); }
.gl-pill.live { background: var(--gl-red); color: #fff; }
.gl-switch { width: 51px; height: 31px; border-radius: 999px; background: #39393d; position: relative; flex: none; border: 0; padding: 0; cursor: pointer; transition: background .25s; }
.gl-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .25s var(--gl-ease); }
.gl-switch[aria-checked="true"] { background: var(--gl-green); }
.gl-switch[aria-checked="true"]::after { transform: translateX(20px); }
.gl-switch:disabled { opacity: .45; cursor: default; }
.gl-field { display: grid; gap: 4px; }
.gl-field > span { font-size: 12.5px; color: var(--gl-tx2); }
.gl-search { position: relative; }
.gl-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gl-tx3); font-size: 16px; pointer-events: none; }
.gl-app .gl-search input { padding-left: 36px; height: 38px; border-radius: 10px; width: 100%; box-sizing: border-box; }
.gl-stepper { display: inline-flex; align-items: center; background: var(--gl-grp-hi); border-radius: 10px; overflow: hidden; }
.gl-stepper button { width: 36px; height: 34px; border: 0; background: none; color: var(--gl-tx); font-size: 17px; cursor: pointer; }
.gl-stepper button:hover { background: rgba(255,255,255,.06); }
.gl-stepper output { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; }
.gl-empty { text-align: center; color: var(--gl-tx3); padding: 36px 16px; font-size: 14px; }
.gl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--gl-sep); border-radius: var(--gl-r); overflow: hidden; }
.gl-tile { background: var(--gl-grp); padding: 14px 16px; }
.gl-tile span { font-size: 12.5px; color: var(--gl-tx2); }
.gl-tile b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.gl-tile small { color: var(--gl-tx3); font-size: 12px; }
.gl-av { width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #ff9f0a, #ff375f); }
.gl-av img { width: 100%; height: 100%; object-fit: cover; }
.gl-sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; animation: gl-fade .2s; }
.gl-sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 61; background: #111113; box-shadow: -24px 0 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column; animation: gl-slide .3s var(--gl-ease); }
.gl-sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--gl-line); }
.gl-sheet-body { flex: 1; overflow-y: auto; padding: 18px; display: grid; gap: 22px; align-content: start; }
.gl-sheet-foot { padding: 12px 18px; border-top: 1px solid var(--gl-line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- dashboard (index.html #dash-view) ---------- */
.gl-app .app-page { max-width: 1320px; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 64px; }
.gl-app .app-hero { background: none; border: 0; box-shadow: none; padding: 28px 0 0; margin-bottom: 24px; border-radius: 0; overflow: visible; }
.gl-app .app-hero::before { content: none; }
.gl-app .app-hero-inner { align-items: flex-end; }
.gl-app .app-eyebrow { display: none; }
.gl-app .app-title { font-family: var(--gl-font); font-weight: 700; font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -.035em; line-height: 1.05;
  background: none; -webkit-text-fill-color: currentColor; color: var(--gl-tx); }
.gl-app .app-sub { font-size: 15px; color: var(--gl-tx2); margin-top: 8px; line-height: 1.5; }
.gl-app .metric-chip { background: var(--gl-grp); border: 0; color: var(--gl-tx2); font-size: 13px; padding: 9px 14px; }
.gl-app .card, .gl-app .studio-card { background: var(--gl-grp); border: 0; box-shadow: none; }
.gl-app .streams-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.gl-app .dash-card { background: var(--gl-grp); border: 0; border-radius: 16px; box-shadow: none; }
.gl-app .dash-card:hover, .gl-app .dash-card.in-view:hover, .gl-app .streams-grid:not(.reveal-on) .dash-card:hover {
  transform: translateY(-2px); border: 0; box-shadow: 0 18px 40px -22px rgba(0,0,0,.9), 0 0 0 1px var(--gl-line); }
.gl-app .dash-title { font-family: var(--gl-font); font-weight: 600; letter-spacing: -.01em; }
.gl-app .dash-thumb { background: #050507; }
.gl-app .dash-owner-nav { background: var(--gl-grp); border: 0; border-radius: var(--gl-r); }
.gl-app #quota-banner { background: var(--gl-grp) !important; border: 0 !important; border-radius: var(--gl-r) !important; font-size: 13.5px !important; padding: 12px 16px !important; }
.gl-app .user-pick-card, .gl-app .owner-group { background: var(--gl-grp); border: 0; box-shadow: none; border-radius: 16px; }
.gl-app .user-pick-card:hover { box-shadow: 0 0 0 1px var(--gl-line); transform: none; }
.gl-app #toast-wrap .toast.success i { color: var(--gl-green); }
.gl-app #toast-wrap .toast.error i { color: var(--gl-red); }

/* tables inside a grouped list: no borders, row separators only */
.gl-grp table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gl-grp th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gl-tx3); padding: 10px 14px; background: none; border: 0; }
.gl-grp td { padding: 11px 14px; border: 0; box-shadow: inset 0 1px 0 var(--gl-sep); vertical-align: middle; }
.gl-icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; background: var(--gl-grp); color: var(--gl-tx2); cursor: pointer; font-size: 17px; }
.gl-icon-btn:hover { background: var(--gl-grp-hi); color: var(--gl-tx); }
.gl-pill.purple { background: rgba(191,90,242,.16); color: #bf5af2; }
.gl-pill.orange { background: rgba(255,159,10,.16); color: var(--gl-orange); }
/* Note: body.gl-app sets the page background after page styles load; a page that wants its own
   background must use a more specific selector (e.g. body.gl-app.lg). */

/* ---------- project page monitor: volume + no-signal (Oct 2026) ---------- */
/* Volume: thin track across the whole control row; the white fill follows --v (set by ui.js). */
html body #detail-view.pv3 .pv-controls .vol-range {
  flex: 1 1 auto; max-width: none; min-width: 80px; height: 28px; margin: 0 4px; padding: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; accent-color: auto; --v: 100%;
}
html body #detail-view.pv3 .pv-controls .vol-range:focus { outline: none; }
html body #detail-view.pv3 .pv-controls .vol-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 999px;
  background: linear-gradient(var(--gl-tx), var(--gl-tx)) 0 0 / var(--v) 100% no-repeat, rgba(255,255,255,.16);
}
html body #detail-view.pv3 .pv-controls .vol-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: transform .15s var(--gl-ease), box-shadow .15s;
}
html body #detail-view.pv3 .pv-controls .vol-range:hover::-webkit-slider-thumb { transform: scale(1.15); }
html body #detail-view.pv3 .pv-controls .vol-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(10,132,255,.45); }
html body #detail-view.pv3 .pv-controls .vol-range::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255,255,255,.16); }
html body #detail-view.pv3 .pv-controls .vol-range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--gl-tx); }
html body #detail-view.pv3 .pv-controls .vol-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
html body #detail-view.pv3 .pv-controls .vol-range:disabled { opacity: .35; cursor: default; }

/* No signal: quiet black, one soft glow, a slow radar ring around the glyph, large clear type. */
html body #detail-view.pv3 #detail-no-signal.no-signal:not(.vod-idle) {
  background:
    radial-gradient(70% 60% at 50% 46%, rgba(255,255,255,.035), transparent 70%),
    radial-gradient(90% 70% at 50% 120%, rgba(255,69,58,.10), transparent 62%),
    #050506;
  color: var(--gl-tx);
}
html body #detail-view.pv3 #detail-no-signal.no-signal.vod-idle::before,
html body #detail-view.pv3 #detail-no-signal.no-signal.vod-idle::after { content: none; display: none; } /* live: the aurora lives in index.html */
html body #detail-view.pv3 #detail-no-signal .standby-marquee { display: none !important; }
html body #detail-view.pv3 #detail-no-signal .ns-content { gap: 0; text-align: center; padding: 0 24px; }
html body #detail-view.pv3 #detail-no-signal:not(.vod-idle) .ns-icon {
  position: relative; width: 64px; height: 64px; margin-bottom: 22px; display: grid; place-items: center; border-radius: 50%;
  font-size: 26px; color: var(--gl-tx2); background: rgba(255,255,255,.05); border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  animation: none; opacity: 1;
}
html body #detail-view.pv3 #detail-no-signal:not(.vod-idle) .ns-icon::before,
html body #detail-view.pv3 #detail-no-signal:not(.vod-idle) .ns-icon::after { position: relative; z-index: 1; }
html body #detail-view.pv3 #detail-no-signal:not(.vod-idle) .ns-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18); animation: gl-radar 3.2s cubic-bezier(.2,.6,.3,1) infinite;
}
html body #detail-view.pv3 #detail-no-signal #detail-no-signal-title {
  font-size: clamp(20px, 2.4vw, 28px) !important; font-weight: 600; letter-spacing: -.02em; color: var(--gl-tx);
}
html body #detail-view.pv3 #detail-no-signal #detail-no-signal-sub {
  font-size: clamp(13px, 1.3vw, 15px) !important; color: var(--gl-tx2) !important; margin-top: 6px;
}
html body #detail-view.pv3 .stage .status-overlay .pill-badge { border-radius: 999px; font-weight: 700; letter-spacing: .04em; }
@keyframes gl-radar { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html body #detail-view.pv3 #detail-no-signal .ns-icon::after { animation: none; opacity: 0; } }

/* toasts and dialogs (shared ids used by every page) */
.gl-app #toast-wrap .toast, body.gl-app .toast { background: var(--gl-grp-hi); color: var(--gl-tx); border: 0; border-radius: 999px; box-shadow: 0 16px 40px rgba(0,0,0,.6); font-family: var(--gl-font); }
#dialog-backdrop .card, #dialog-backdrop .dialog { background: var(--gl-grp-hi); border: 0; border-radius: 16px; font-family: var(--gl-font); }

@keyframes gl-drop { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
@keyframes gl-fade { from { opacity: 0 } }
@keyframes gl-slide { from { transform: translateX(24px); opacity: 0 } to { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .gl-app *, .gl-topbar *, .gl-menu, .gl-sheet, .gl-srv { animation: none !important; transition: none !important; } }
@media (max-width: 1080px) { .gl-sys .more { display: none; } }
@media (max-width: 860px) {
  .gl-brand small { display: none; }
  .gl-nav { gap: 0; }
  .gl-nav a, .gl-nav button { width: 34px; }
}
@media (max-width: 640px) {
  .gl-sys { display: none; }
  .gl-nav > a { display: none; }
  .gl-menu-nav { display: block; }
  .gl-menu .gl-menu-phone:not(.hidden) { display: flex; }
  .gl-srv { left: 0; right: 0; margin: 0 auto; width: calc(100vw - 32px); }
}
