:root {
  --login-radius: 4px;
  --login-bg: #212529;
  --login-surface: #1f1f1f;
  --login-surface-alt: #262626;
  --login-border: #333333;
  --login-border-strong: #444444;
  --login-text: #f1f1f1;
  --login-text-secondary: #d7d7d7;
  --login-text-muted: #888888;
  --login-accent: #faa61a;
  --login-accent-hover: #ffb733;
  --login-accent-contrast: #000000;
  --login-link: #8ab4ff;
  --login-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  --login-bg-highlight-a: rgba(250, 166, 26, 0.08);
  --login-bg-highlight-b: rgba(79, 140, 255, 0.08);
  --login-glow-a: rgba(250, 166, 26, 0.16);
  --login-glow-b: rgba(34, 78, 128, 0.18);
}

html[data-infara-mode="1"] {
  --login-bg: #0b0f1f;
  --login-surface: #0f142a;
  --login-surface-alt: #141b34;
  --login-border: #1f2a44;
  --login-border-strong: #2c3a5e;
  --login-text: #eef2ff;
  --login-text-secondary: #c6cedf;
  --login-text-muted: #8b96b2;
  --login-accent: #8b5cf6;
  --login-accent-hover: #9d6cff;
  --login-accent-contrast: #ffffff;
  --login-link: #5b9dff;
  --login-shadow: 0 14px 30px rgba(3, 7, 18, 0.42);
  --login-bg-highlight-a: rgba(139, 92, 246, 0.11);
  --login-bg-highlight-b: rgba(56, 189, 248, 0.1);
  --login-glow-a: rgba(139, 92, 246, 0.2);
  --login-glow-b: rgba(45, 212, 191, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, var(--login-bg-highlight-a) 0%, transparent 28%),
    radial-gradient(circle at 88% 18%, var(--login-bg-highlight-b) 0%, transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--login-bg);
  color: var(--login-text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.72;
}

body::before {
  top: -96px;
  left: -84px;
  width: 300px;
  height: 300px;
  background: var(--login-glow-a);
}

body::after {
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  background: var(--login-glow-b);
}

a {
  color: inherit;
}

.login-shell {
position: relative;
z-index: 1;
min-height: calc(100vh - var(--omni-dev-banner-height));
padding: 32px 20px;
}

.login-layout {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-header img {
  width: 36px;
  height: 36px;
}

.login-header-title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 380px);
  gap: 20px;
  align-items: start;
}

.login-panel {
  background: var(--login-surface);
  border: 1px solid var(--login-border);
  border-radius: var(--login-radius);
  box-shadow: var(--login-shadow);
}

.login-panel-inner {
  padding: 24px;
}

.product-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-subtitle {
  margin: 8px 0 0;
  color: var(--login-text-secondary);
  font-size: 1.05rem;
  font-weight: 600;
}

.product-summary {
  margin: 16px 0 0;
  color: var(--login-text-secondary);
  line-height: 1.7;
  max-width: 56ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.feature-card {
  background: var(--login-surface-alt);
  border: 1px solid var(--login-border);
  border-radius: var(--login-radius);
  padding: 16px;
}

.feature-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.feature-card p {
  margin: 8px 0 0;
  color: var(--login-text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.product-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--login-border);
  color: var(--login-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.auth-description {
  margin: 6px 0 0;
  color: var(--login-text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.auth-notice {
  padding: 12px 14px;
  border: 1px solid var(--login-border-strong);
  border-radius: var(--login-radius);
  background: var(--login-surface-alt);
  color: var(--login-text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.auth-button,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: var(--login-radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.auth-button {
  background: var(--login-accent);
  border-color: var(--login-accent);
  color: var(--login-accent-contrast);
}

.auth-button:hover {
  background: var(--login-accent-hover);
  border-color: var(--login-accent-hover);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--login-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid var(--login-border);
}

.local-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input {
  min-height: 42px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--login-border-strong);
  border-radius: var(--login-radius);
  background: var(--login-surface-alt);
  color: var(--login-text);
  font: inherit;
}

.field input::placeholder {
  color: var(--login-text-muted);
}

.field input:focus {
  outline: none;
  border-color: var(--login-accent);
  box-shadow: 0 0 0 1px var(--login-accent);
}

.auth-submit {
  background: transparent;
  border-color: var(--login-border-strong);
  color: var(--login-text);
}

.auth-submit:hover {
  border-color: var(--login-accent);
  color: var(--login-accent);
}

.form-note,
.auth-footnote {
  margin: 0;
  color: var(--login-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

html[data-infara-mode="1"] .login-header {
  gap: 14px;
}

html[data-infara-mode="1"] .login-header img {
  width: 42px;
  height: 42px;
}

html[data-infara-mode="1"] .login-header-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html[data-infara-mode="1"] .login-header-brand-name,
html[data-infara-mode="1"] .login-header-brand-sub {
  font-family: "Orbitron", "Segoe UI", Tahoma, sans-serif;
}

html[data-infara-mode="1"] .login-header-brand-name {
  position: relative;
  display: inline-block;
  color: var(--login-text);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 2.6px;
  line-height: 1;
}

html[data-infara-mode="1"] .login-header-brand-name::before,
html[data-infara-mode="1"] .login-header-brand-name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 220% 100%;
  background-position: 160% 0;
  background-repeat: no-repeat;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  opacity: 1;
  animation: login-infara-omni-sheen 10s linear infinite;
}

html[data-infara-mode="1"] .login-header-brand-name::after {
  animation-delay: -5s;
}

html[data-infara-mode="1"] .login-header-brand-sub {
  margin-top: -3px;
  margin-left: 2px;
  color: var(--login-text-muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.6px;
  line-height: 1;
}

@keyframes login-infara-omni-sheen {
  0% {
    background-position: 160% 0;
  }
  11.2% {
    background-position: -160% 0;
  }
  100% {
    background-position: -160% 0;
  }
}

.auth-link {
  color: var(--login-link);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .login-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 20px 12px;
  }

  body::before {
    width: 220px;
    height: 220px;
    top: -72px;
    left: -72px;
  }

  body::after {
    width: 260px;
    height: 260px;
    right: -88px;
    bottom: -88px;
  }

  .login-panel-inner {
    padding: 18px;
  }

  .product-title {
    font-size: 1.6rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

