:root {
  --bg-main: #041224;
  --bg-soft: #071c34;
  --panel: rgba(7, 24, 45, 0.74);
  --panel-border: rgba(66, 150, 255, 0.34);
  --text: #ecf6ff;
  --muted: #a6bfdc;
  --neon-blue: #19beff;
  --neon-blue-2: #178fff;
  --logo-orange: #ff9d2f;
  --danger: #ff7188;
  --success: #62f2b2;
  --ring-main: rgba(25, 190, 255, 0.56);
  --ring-soft: rgba(23, 143, 255, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(25, 190, 255, 0.18), transparent 35%),
    radial-gradient(circle at 92% 10%, rgba(255, 157, 47, 0.16), transparent 42%),
    linear-gradient(160deg, #020910 0%, #041224 48%, #061a32 100%);
}

.auth-page {
  min-height: 100vh;
  padding: 18px 16px 26px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.auth-topbar {
  width: min(960px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(146, 187, 226, 0.3);
  background: rgba(6, 24, 45, 0.66);
  border-radius: 18px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.topbar-brand {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #dbedff;
}

.topbar-link {
  color: #d6e9ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid rgba(118, 178, 243, 0.34);
  background: rgba(10, 43, 78, 0.72);
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.2s ease;
}

.topbar-link:hover {
  color: #fff;
  border-color: rgba(25, 190, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(25, 190, 255, 0.14);
}

.auth-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(6, 25, 48, 0.74) 0%, rgba(3, 16, 30, 0.88) 100%);
  border: 1px solid rgba(80, 139, 201, 0.28);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: 24px;
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.45);
}

.ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-main {
  width: min(84vw, 620px);
  aspect-ratio: 1;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(12, 67, 130, 0.05) 0deg 4deg,
    rgba(25, 190, 255, 0.68) 4deg 9deg
  );
  mask: radial-gradient(circle, transparent 58%, #000 59%);
  animation: spin 18s linear infinite;
}

.ring-soft {
  width: min(75vw, 520px);
  aspect-ratio: 1;
  border: 2px solid var(--ring-soft);
  box-shadow: 0 0 30px rgba(23, 143, 255, 0.25);
  animation: spinReverse 24s linear infinite;
}

.ring-accent {
  width: min(65vw, 420px);
  aspect-ratio: 1;
  border: 2px dashed rgba(255, 157, 47, 0.3);
  animation: pulse 3.6s ease-in-out infinite;
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.92; }
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(390px, 100%);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(5, 27, 52, 0.95), rgba(4, 19, 35, 0.98));
  border: 1px solid var(--panel-border);
  box-shadow:
    0 12px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 30px 24px 24px;
}

.auth-badge {
  margin: 0 auto 10px;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  font-weight: 700;
  color: #d9efff;
  border: 1px solid rgba(25, 190, 255, 0.45);
  background: rgba(7, 54, 100, 0.48);
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-size: 2.1rem;
  color: var(--neon-blue);
  text-shadow: 0 0 18px rgba(25, 190, 255, 0.36);
}

.subtitle {
  margin: 8px 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.93rem;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #d3e8ff;
  font-weight: 600;
}

input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(117, 172, 230, 0.42);
  background: rgba(7, 26, 48, 0.82);
  color: #eaf5ff;
  padding: 12px 14px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: #8db0d6;
}

input:focus {
  border-color: rgba(25, 190, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(25, 190, 255, 0.16);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
  margin-bottom: 8px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 42%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 1px solid rgba(106, 167, 232, 0.45);
  border-radius: 999px;
  background: rgba(8, 38, 71, 0.9);
  color: #d9ecff;
  cursor: pointer;
}

.forgot-link {
  display: block;
  margin: 4px 0 14px;
  text-align: center;
  text-decoration: none;
  color: #bcd8f8;
  font-weight: 600;
  font-size: 0.88rem;
}

.submit-btn {
  width: 100%;
  border: 1px solid rgba(25, 190, 255, 0.95);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #04213d;
  background: linear-gradient(135deg, #18b8ff 0%, #49d0ff 65%, #8be3ff 100%);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(25, 190, 255, 0.28);
  transition: all 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.msg {
  min-height: 22px;
  margin: 12px 0 4px;
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
}

.msg.error {
  color: var(--danger);
}

.msg.success {
  color: var(--success);
}

.helper-text {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: #89a9cf;
}

@media (max-width: 700px) {
  .auth-shell {
    min-height: 560px;
    border-radius: 20px;
    padding: 14px;
  }

  .auth-card {
    padding: 22px 16px;
    border-radius: 16px;
  }

  .auth-card h1 {
    font-size: 1.8rem;
  }

  .topbar-brand {
    font-size: 0.9rem;
  }

  .topbar-link {
    font-size: 0.8rem;
    padding: 7px 8px;
  }
}
