:root {
  --bg: #080b13;
  --panel: rgba(18, 24, 40, .92);
  --panel-soft: rgba(23, 31, 51, .8);
  --text: #f7f8ff;
  --muted: #939db5;
  --accent: #7b61ff;
  --accent-2: #24c7ff;
  --danger: #ff6b82;
  --success: #36d399;
  --border: rgba(255,255,255,.1);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.app-open { overflow: hidden; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(123,97,255,.24), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(36,199,255,.15), transparent 32%),
    linear-gradient(155deg, #070910, #0a0f1b 56%, #080b13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
[hidden] { display: none !important; }
.shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
.auth-card, .denied-card, .device-card, .loader-card {
  width: min(620px, 100%);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(20,27,45,.92), rgba(10,14,25,.95));
  box-shadow: 0 34px 100px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.07);
  text-align: center;
  backdrop-filter: blur(18px);
}
.brand-mark { height: 56px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 14px; }
.brand-mark i { width: 7px; height: 18px; border-radius: 99px; background: linear-gradient(var(--accent-2), var(--accent)); animation: wave 1.05s ease-in-out infinite; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(6) { animation-delay: -.15s; }
.brand-mark i:nth-child(3), .brand-mark i:nth-child(5) { animation-delay: -.3s; }
.brand-mark i:nth-child(4) { animation-delay: -.45s; }
@keyframes wave { 50% { height: 52px; } }
.eyebrow { margin: 0 0 10px; color: var(--accent-2); font-size: 12px; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(48px, 12vw, 82px); line-height: .9; letter-spacing: -.065em; }
h1 span { display: block; color: transparent; background: linear-gradient(100deg, #fff, #b9c7ff 52%, #70e2ff); -webkit-background-clip: text; background-clip: text; }
h2 { margin: 8px 0 12px; font-size: clamp(28px, 6vw, 42px); line-height: 1.05; }
.lead, .denied-card p, .device-card p, .loader-card p { margin: 20px auto 26px; max-width: 470px; color: var(--muted); line-height: 1.55; }
form { text-align: left; }
label { display: block; margin: 0 0 8px; color: #c7cde0; font-size: 13px; font-weight: 800; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input {
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px;
  outline: 0;
  color: var(--text);
  background: rgba(8,12,21,.76);
}
input:focus { border-color: rgba(36,199,255,.7); box-shadow: 0 0 0 4px rgba(36,199,255,.1); }
button, .as-link, .secondary {
  min-height: 52px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.13);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}
.primary { padding: 0 20px; border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), #4c8cff 58%, var(--accent-2)); box-shadow: 0 14px 34px rgba(91,94,255,.26); }
.secondary { padding: 0 18px; color: #e5e8f4; background: rgba(255,255,255,.055); }
.ghost { padding: 0 16px; color: var(--muted); background: transparent; }
button:disabled { opacity: .55; cursor: progress; }
.status { margin-top: 16px; padding: 13px 15px; border-radius: 14px; text-align: left; line-height: 1.45; background: rgba(36,199,255,.1); border: 1px solid rgba(36,199,255,.24); }
.status.error { background: rgba(255,107,130,.1); border-color: rgba(255,107,130,.3); }
.status.success { background: rgba(54,211,153,.1); border-color: rgba(54,211,153,.28); }
.actions { margin-top: 18px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 13px; }
.text-link { color: #aeb8d0; }
.privacy-note { margin: 18px 0 0; color: #68728a; font-size: 12px; }
.lock { display: block; font-size: 46px; }
.denied-actions { display: flex; flex-direction: column; gap: 10px; }
.spinner { width: 56px; height: 56px; margin: 0 auto 22px; border: 5px solid rgba(255,255,255,.1); border-top-color: var(--accent-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  background: #080b13;
}
.app-toolbar { min-height: 52px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(8,11,19,.94); }
.app-toolbar div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.toolbar-identity { min-width: 0; }
.access-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(54,211,153,.25);
  border-radius: 999px;
  color: #89efc4 !important;
  background: rgba(54,211,153,.1);
  font-size: 11px !important;
  font-weight: 850;
  white-space: nowrap;
}
.app-toolbar strong { letter-spacing: .08em; }
.app-toolbar span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-toolbar button { min-height: 36px; padding: 0 13px; color: #dce1f0; background: rgba(255,255,255,.06); }
#trainerFrame {
  display: block;
  width: 100%;
  height: calc(100dvh - 53px);
  border: 0;
  background: #080b13;
}
noscript { display: block; padding: 20px; color: #fff; background: #8b1e35; }
@media (max-width: 620px) {
  .input-row { grid-template-columns: 1fr; }
  .primary { min-height: 56px; }
  #userEmail { display: none; }
  .access-badge { display: inline-flex; }
}
