/* GXTHGIRLS admin landing page, styled after gxthgirls.tech and the bot/Minecraft panels:
   black canvas, electric blue, Inter + JetBrains Mono. Tokens match /srv/src/bot-panel/style.css. */

@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #080b12;
  --bg-2: #0b1020;
  --bg-3: #0f1528;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;
  --muted: #98a3c0;
  --blue-deep: #0052cc;
  --blue: #008cff;
  --blue-2: #4db5ff;
  --blue-3: #9ed8ff;
  --blue-rgb: 0, 140, 255;
  --up: #3ccf6e;
  --warn: #f5b546;
  --down: #ff5c6c;
  --grad: linear-gradient(120deg, var(--blue-deep) 0%, #006ae6 100%); /* white text stays >= 5:1 across the whole fill */
  --grad-text: linear-gradient(100deg, #cfeaff 0%, #4db5ff 40%, #008cff 100%);
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scrollbar-color: #26314a var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--sans); font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(var(--blue-rgb), 0.45); color: #fff; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 770; }
h2 { font-size: 1.1rem; font-weight: 680; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--blue-2); }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { display: block; flex: none; border-radius: 22%; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Ambient background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, #0d1a36 0%, var(--bg) 60%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.32; mix-blend-mode: screen; }
.orb-a { width: 60vmax; height: 60vmax; left: -20vmax; top: -30vmax; background: radial-gradient(circle, rgba(0, 140, 255, 0.7), transparent 60%); animation: drift-a 30s ease-in-out infinite alternate; }
.orb-b { width: 50vmax; height: 50vmax; right: -22vmax; top: -18vmax; background: radial-gradient(circle, rgba(0, 82, 204, 0.75), transparent 60%); animation: drift-b 36s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(12vw, 8vh) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-10vw, 12vh) scale(0.9); } }
.gridlines { position: absolute; inset: 0; opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask: radial-gradient(70% 50% at 50% 0%, #000 0%, transparent 100%); mask: radial-gradient(70% 50% at 50% 0%, #000 0%, transparent 100%); }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

.boot { display: grid; place-items: center; min-height: 100vh; }

/* ---------- Buttons ---------- */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 44px; padding: 0 1.3em; border-radius: 999px; border: 1px solid transparent;
  font: 620 0.95rem var(--sans); color: #fff; text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--grad) border-box; overflow: hidden; isolation: isolate;
  box-shadow: 0 10px 30px -12px rgba(var(--blue-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.3s, border-color 0.3s, opacity 0.2s;
}
.button::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%); transition: transform 0.7s var(--ease);
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.3) 50%, transparent 80%); }
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 36px -12px rgba(var(--blue-rgb), 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.button:hover:not(:disabled)::before { transform: translateX(120%); }
.button:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.button:disabled { opacity: 0.45; cursor: progress; box-shadow: none; }
.button-ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong); box-shadow: none; }
.button-ghost::before { display: none; }
.button-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: rgba(var(--blue-rgb), 0.5); box-shadow: none; }
.button-danger { color: #ffc2c8; background: rgba(255, 92, 108, 0.08); border-color: rgba(255, 92, 108, 0.35); box-shadow: none; }
.button-danger::before { display: none; }
.button-danger:hover:not(:disabled) { background: rgba(255, 92, 108, 0.16); border-color: rgba(255, 92, 108, 0.6); box-shadow: none; }
.button-sm { min-height: 34px; padding: 0 1em; font-size: 0.86rem; }
.button-block { width: 100%; min-height: 48px; font-size: 1rem; }
.linkish { min-height: 44px; padding: 0; border: 0; background: none; color: var(--blue-2); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--blue-3); }

/* ---------- Notices & toast ---------- */
.notice { padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid; text-align: left; font-size: 0.92rem; }
.notice-info { background: rgba(var(--blue-rgb), 0.08); border-color: rgba(var(--blue-rgb), 0.25); color: #cfe6ff; }
.notice-error { background: rgba(255, 92, 108, 0.1); border-color: rgba(255, 92, 108, 0.38); color: #ffc2c8; }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 11px 16px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  background: var(--bg-3); border: 1px solid rgba(60, 207, 110, 0.45); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: rise 0.3s var(--ease);
}
.toast-error { border-color: rgba(255, 92, 108, 0.5); color: #ffc2c8; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Sign-in screens ---------- */
#app { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
#app > main { flex: 1; }
.screen { display: grid; place-items: center; padding: 32px 16px; }
.auth-card {
  width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; gap: 18px;
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: #0a0e1a;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.auth-card { overflow: hidden; }
.auth-card::before { content: ""; flex: none; height: 3px; margin: -28px -28px 4px; background: var(--grad); }
.auth-head { display: flex; justify-content: center; }
.auth-head .logo { filter: drop-shadow(0 14px 28px rgba(var(--blue-rgb), 0.45)); }
.auth-card h1 { font-size: clamp(2rem, 6vw, 2.4rem); font-weight: 780; letter-spacing: -0.035em; text-align: center; }
.wordmark { font-weight: 740; font-size: 1.1rem; letter-spacing: 0.08em; white-space: nowrap; }
.foot { padding: 24px var(--gutter) 28px; border-top: 1px solid var(--line); background: rgba(4, 6, 11, 0.6); }
.foot p { width: 100%; max-width: 1600px; margin: 0 auto; color: var(--muted); font-size: 0.84rem; }
.auth-foot { margin: -10px 0; display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 0.88rem; }
.auth-foot.center { justify-content: center; }

form { display: flex; flex-direction: column; gap: 14px; }
.input { display: flex; flex-direction: column; gap: 6px; }
.input > span { font-weight: 600; font-size: 0.84rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; min-height: 46px; font: 0.98rem var(--sans); color: var(--text); background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover { border-color: rgba(var(--blue-rgb), 0.45); }
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--blue-rgb), 0.2); }
input.code-input { text-align: center; font: 700 1.7rem var(--mono); letter-spacing: 0.4em; padding-left: calc(13px + 0.4em); }
input.readonly { font-family: var(--mono); font-size: 0.82rem; color: var(--blue-3); }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- Dashboard ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(var(--gutter), calc((100% - 1600px) / 2 + var(--gutter))); /* lines up with .content */
  border-bottom: 1px solid var(--line); background: rgba(6, 9, 16, 0.72);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 36px var(--gutter) 64px; display: flex; flex-direction: column; gap: 20px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.stamp { font: 500 0.72rem var(--mono); color: var(--muted); }

.card { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.card-flush { padding: 0; overflow: hidden; }
.card-wide { grid-column: 1 / -1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cards > #account { grid-row: span 2; } /* Access and Accounts stack beside it */

/* Services board: one row per service */
.board { list-style: none; margin: 0; padding: 0; }
.board > li + li { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr) auto auto; align-items: center; gap: 16px;
  padding: 14px 20px; color: inherit; text-decoration: none; transition: background-color 0.2s;
}
.svc:hover { background: rgba(var(--blue-rgb), 0.06); }
.svc-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: var(--grad); box-shadow: 0 10px 24px -12px rgba(var(--blue-rgb), 0.9); }
.svc-name { display: flex; flex-direction: column; min-width: 0; }
.svc-name strong { font-size: 0.98rem; }
.svc-name span, .svc-detail { font: 500 0.76rem var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-name span { color: var(--blue-3); }
.svc-open { display: grid; color: var(--muted); transition: transform 0.3s var(--ease), color 0.2s; }
.svc-open .icon { width: 16px; height: 16px; }
.svc:hover .svc-open { color: var(--blue-2); transform: translate(2px, -2px); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px 4px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap;
  font: 600 0.6875rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-up { color: #9df0bb; border-color: rgba(60, 207, 110, 0.35); background: rgba(60, 207, 110, 0.1); }
.pill-up .dot { background: var(--up); box-shadow: 0 0 0 3px rgba(60, 207, 110, 0.2); animation: pulse 2.2s ease-in-out infinite; }
.pill-degraded { color: #ffe2ad; border-color: rgba(245, 181, 70, 0.4); background: rgba(245, 181, 70, 0.1); }
.pill-down { color: #ffc2c8; border-color: rgba(255, 92, 108, 0.4); background: rgba(255, 92, 108, 0.1); }
.pill-unknown { color: var(--muted); border-color: var(--line-strong); background: var(--surface); }
.pill-owner { color: var(--blue-3); border-color: rgba(var(--blue-rgb), 0.4); background: rgba(var(--blue-rgb), 0.12); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(60, 207, 110, 0); } }

/* Settings rows */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 50px; height: 28px; border-radius: 999px; flex: none; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-strong); transition: background 0.2s, border-color 0.2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); }
.switch input:checked + .switch-track { background: var(--blue); border-color: var(--blue); }
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.switch input:disabled + .switch-track { opacity: 0.5; }
.switch-label { font: 600 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.switch:has(input:checked) .switch-label { color: var(--blue-3); }

.invite-out { display: flex; flex-direction: column; gap: 8px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.user-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-main strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.user-main span { font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }

.audit-row { display: grid !important; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 16px; }
.audit-row time { font: 500 0.76rem var(--mono); color: var(--muted); padding-top: 2px; }
.audit-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; font-size: 0.9rem; }
.audit-what .muted { font-size: 0.8rem; }
.empty { padding: 20px; text-align: center; color: var(--muted); }

/* Wide: Access, Accounts and Password side by side (owners only; others just see Password). */
@media (min-width: 1400px) {
  .cards:has(#access) { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "access accounts account" "activity activity activity"; }
  .cards:has(#access) > * { grid-area: var(--area); }
  #access { --area: access; } #accounts { --area: accounts; } #account { --area: account; } #activity { --area: activity; }
}
@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr; }
  .cards > #account { grid-row: auto; }
}
@media (max-width: 760px) {
  .who strong, .who .pill { display: none; }
  .content { padding-top: 24px; }
  .svc { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 16px; gap: 12px; }
  .svc-detail, .svc-open { display: none; }
}
@media (max-width: 560px) {
  .auth-card { padding: 24px 20px; }
  .auth-card::before { margin: -24px -20px 4px; }
  .audit-row { grid-template-columns: 1fr; }
  .invite-row { flex-direction: column; }
}

/* Touch: full-size targets for the small buttons */
@media (pointer: coarse) { .button-sm { min-height: 44px; } }
/* Increase Contrast: brighter secondary text and edges */
@media (prefers-contrast: more) {
  :root { --muted: #c3cbe0; --line: rgba(255, 255, 255, 0.24); --line-strong: rgba(255, 255, 255, 0.4); }
  .gridlines { display: none; }
}
/* Reduce Transparency: the sticky bar turns opaque */
@media (prefers-reduced-transparency: reduce) {
  .topbar { background: var(--bg-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (max-width: 400px) { .wordmark { font-size: 1rem; letter-spacing: 0.04em; } }

/* Home: back to gxthgirls.tech, same pill on every site */
.home-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 560 0.95rem var(--sans); color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); transition: background-color 0.2s, border-color 0.2s; }
.home-pill:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(0, 140, 255, 0.5); text-decoration: none; }
.home-pill svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.screen { position: relative; }
.screen > .home-pill { position: absolute; top: 16px; left: 16px; z-index: 2; }
.who .home-pill { min-height: 34px; padding: 0 14px 0 10px; font-size: 0.86rem; }
@media (pointer: coarse) { .who .home-pill { min-height: 44px; } }
