:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #090e19;
  color: #eaf0fb;
}

* { box-sizing: border-box; }

body { margin: 0; }

button, textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible, textarea:focus-visible {
  outline: 2px solid #76aaff;
  outline-offset: 2px;
}

body:has(.login-container) {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 25%, #172b49 0%, #080e19 65%, #050912 100%);
  color: #e9f1ff;
  font-family: system-ui, sans-serif;
}
.login-container {
  box-sizing: border-box;
  width: min(420px, calc(100% - 32px));
  padding: 42px 36px;
  border: 1px solid #30445e;
  border-radius: 20px;
  background: rgba(15, 25, 42, .94);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
.login-container h1 {
  margin: 0;
  color: #7ddaff;
  text-align: center;
  font-size: 38px;
  letter-spacing: 8px;
}
.login-container > p {
  text-align: center;
  color: #9cacc2;
  margin: 10px 0 30px;
}
.login-container form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-container form > label {
  color: #bdcce0;
  font-size: 14px;
}
.login-container input[type="text"],
.login-container input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #3a4e69;
  border-radius: 9px;
  background: #0b1525;
  color: #fff;
  font-size: 16px;
}
.login-container input:focus-visible {
  outline: 2px solid #58caff;
  outline-offset: 2px;
}
.login-container label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}
.login-container button[type="submit"] {
  padding: 14px;
  border: 0;
  border-radius: 9px;
  background: #37b9ed;
  color: #07111d;
  font-weight: 700;
  font-size: 16px;
}
.login-container button[type="submit"]:hover {
  background: #77d9ff;
}
.login-container .error {
  color: #ff9b9b;
}



* { box-sizing: border-box; }
body:has(.login-container) {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020914;
  font-family: Arial, sans-serif;
}

/* Existing approved animation */
#hud-preview {
  position: fixed;
  inset: 0;
  width: 110vw;
  height: 110vh;
  left: -5vw;
  top: -5vh;
  z-index: 1;
  pointer-events: none;
}

/* Segmented HUD rings */
.hud-rings {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(83.6vh, 83.6vw, 792px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  opacity: .82;
}

.hud-rings svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring {
  fill: none;
  stroke: #17baff;
  transform-origin: 500px 500px;
}

.ring-outer {
  stroke-width: 1.3;
  stroke-dasharray: 2 17;
  opacity: .42;
  animation: spin 240s linear infinite;
}
.ring-a {
  stroke-width: 2;
  stroke-dasharray: 45 13 6 21 85 18;
  opacity: .72;
  animation: reverse-spin 260s linear infinite;
}
.ring-b {
  stroke-width: 1.5;
  stroke-dasharray: 95 24 15 16;
  opacity: .52;
  animation: spin 280s linear infinite;
}
.ring-c {
  stroke-width: 2.5;
  stroke-dasharray: 22 12 90 25 6 14;
  opacity: .78;
  animation: reverse-spin 300s linear infinite;
}
.ring-d {
  stroke-width: 1;
  stroke-dasharray: 130 30 10 18;
  opacity: .45;
  animation: spin 320s linear infinite;
}
.ring-inner {
  stroke-width: 1.5;
  stroke-dasharray: 50 22 12 35;
  opacity: .48;
  animation: reverse-spin 340s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes reverse-spin {
  to { transform: rotate(-360deg); }
}

@media (max-width: 600px) {
  .hud-rings { width: 96vw; }
  
}


/* Approved JARVIS login integration */
body:has(.login-container) {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  background: #020914;
}

#hud-preview {
  position: fixed;
  inset: 0;
  width: 110vw;
  height: 110vh;
  left: -5vw;
  top: -5vh;
  z-index: 1;
  pointer-events: none;
}

.hud-rings {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(83.6vh, 83.6vw, 792px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

.login-container {
  position: relative;
  z-index: 3;
  width: min(274px, calc(100vw - 28px));
  padding: 22px 20px;
  border: 1px solid rgba(30,190,255,.38);
  border-radius: 13px;
  background: rgba(2,13,27,.24);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 0 24px rgba(0,170,255,.07);
}

.login-container h1 {
  margin: 0;
  text-align: center;
  font-size: 20px;
  letter-spacing: 5px;
  color: #79ddff;
}

.login-container > p {
  margin: 7px 0 17px;
  text-align: center;
  font-size: 10px;
  color: #b9e5f7;
}

.login-container form {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-container form > label {
  margin-top: 7px;
  color: #e0f5ff;
  font-size: 11px;
}

.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(74,177,234,.35);
  border-radius: 5px;
  background: rgba(1,10,23,.22);
  color: #e0f5ff;
  font-size: 11px;
}

.login-container label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 3px;
  font-size: 10px;
  color: #c2e3f3;
}

.login-container button[type="submit"] {
  width: 100%;
  height: 32px;
  margin-top: 7px;
  padding: 0;
  border: 1px solid rgba(35,197,255,.65);
  border-radius: 5px;
  background: rgba(0,121,180,.23);
  color: #e1f7ff;
  font-size: 11px;
  cursor: pointer;
}

.login-container button[type="submit"]:hover {
  background: rgba(0,145,205,.40);
}

.login-container .error {
  color: #ffaaaa;
  font-size: 11px;
}

@media (max-width: 600px) {
  .hud-rings { width: 96vw; }
  .login-container {
    width: min(274px, calc(100vw - 28px));
    padding: 20px 18px;
  }
}



.login-system-status {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 18px;
  font-size: 12px;
  color: #a9d9ed;
}

.login-status-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.login-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #84939c;
  flex-shrink: 0;
}

.login-status-dot.online {
  background: #36e69a;
  box-shadow: 0 0 8px #36e69a;
}

.login-status-dot.offline {
  background: #ff5264;
  box-shadow: 0 0 8px #ff5264;
}


/* Ring timings (replaces inline style attributes so no inline styles are needed) */
.ring.r6 { animation: reverse-spin 340s linear infinite; }
.ring.r7 { animation: spin 360s linear infinite; }
.ring.r8 { animation: reverse-spin 380s linear infinite; }
.login-status-dot.online { background: #36e69a; box-shadow: 0 0 8px #36e69a; }
