/* Cortex account / login — replaces legacy RezveRa auth chrome */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --cx-ink: #0b1220;
  --cx-muted: #64748b;
  --cx-line: #e8eef6;
  --cx-paper: #f5f8fc;
  --cx-white: #ffffff;
  --cx-blue: #1d4ed8;
  --cx-blue-bright: #2563eb;
  --cx-mint: #0f766e;
  --cx-sky: #dbeafe;
  --cx-danger: #b91c1c;
  --cx-ok: #166534;
  --cx-radius: 20px;
  --cx-shadow: 0 24px 60px rgba(11, 18, 32, 0.1);
  --cx-font-display: "Sora", sans-serif;
  --cx-font-body: "Source Sans 3", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.cx-auth-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--cx-font-body);
  color: var(--cx-ink);
  background: var(--cx-paper);
  -webkit-font-smoothing: antialiased;
}

.cx-auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(15, 118, 110, 0.1), transparent 50%),
    radial-gradient(600px 360px at 70% 110%, rgba(37, 99, 235, 0.08), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, var(--cx-paper) 100%);
}

.cx-auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}

.cx-auth-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto 1.25rem;
}

.cx-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--cx-ink);
}

.cx-auth-brand img {
  width: 2.1rem;
  height: 2.1rem;
  object-fit: contain;
}

.cx-auth-brand span {
  font-family: var(--cx-font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.cx-auth-lang select {
  appearance: none;
  border: 1px solid var(--cx-line);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: 600 0.85rem var(--cx-font-body);
  color: var(--cx-ink);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(11, 18, 32, 0.04);
}

.cx-auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.cx-auth-panel {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--cx-white);
  border: 1px solid rgba(232, 238, 246, 0.95);
  border-radius: calc(var(--cx-radius) + 4px);
  box-shadow: var(--cx-shadow);
  overflow: hidden;
}

.cx-auth-aside {
  display: none;
  padding: 2.5rem;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.55), rgba(29, 78, 216, 0.72)),
    linear-gradient(180deg, #1e3a8a, #0f766e);
  position: relative;
}

.cx-auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(125, 211, 252, 0.2), transparent 35%);
  pointer-events: none;
}

.cx-auth-aside-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 420px;
}

.cx-auth-kicker {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cx-auth-aside h2 {
  margin: 0;
  font-family: var(--cx-font-display);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 650;
  max-width: 16ch;
}

.cx-auth-aside p {
  margin: 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.55;
}

.cx-auth-form-wrap {
  padding: 1.75rem 1.35rem 1.5rem;
}

.cx-auth-form-wrap h1 {
  margin: 0 0 0.35rem;
  font-family: var(--cx-font-display);
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--cx-ink);
}

.cx-auth-form-wrap .cx-auth-lead {
  margin: 0 0 1.5rem;
  color: var(--cx-muted);
  font-size: 0.98rem;
}

.cx-auth-form-wrap .cx-auth-lead strong {
  color: var(--cx-blue);
  font-weight: 700;
}

.cx-auth-alert {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.cx-auth-alert-success,
.cx-auth-alert.success,
.cx-auth-alert.alert-success {
  background: #ecfdf5;
  color: var(--cx-ok);
  border-color: #bbf7d0;
}

.cx-auth-alert-error,
.cx-auth-alert.error,
.cx-auth-alert.alert-danger,
.cx-auth-alert.alert-error {
  background: #fef2f2;
  color: var(--cx-danger);
  border-color: #fecaca;
}

.cx-auth-alert-info,
.cx-auth-alert.info,
.cx-auth-alert.alert-info {
  background: var(--cx-sky);
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.cx-field {
  margin-bottom: 1rem;
}

.cx-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cx-ink);
}

.cx-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.cx-field-row label {
  margin: 0;
}

.cx-field-row a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cx-blue);
  text-decoration: none;
}

.cx-field-row a:hover {
  text-decoration: underline;
}

.cx-input,
.cx-auth-form-wrap .form-control {
  width: 100%;
  border: 1px solid var(--cx-line);
  background: #f8fafc;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: 500 1rem var(--cx-font-body);
  color: var(--cx-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cx-input:focus,
.cx-auth-form-wrap .form-control:focus {
  outline: none;
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.cx-input.is-invalid,
.cx-auth-form-wrap .form-control.is-invalid {
  border-color: #fca5a5;
}

.cx-pass-wrap {
  position: relative;
}

.cx-pass-wrap .cx-input,
.cx-pass-wrap .form-control {
  padding-right: 3rem;
}

.cx-pass-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--cx-muted);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cx-pass-toggle:hover {
  color: var(--cx-ink);
  background: rgba(15, 23, 42, 0.04);
}

.cx-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--cx-ink);
}

.cx-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--cx-blue);
}

.cx-auth-submit {
  width: 100%;
  margin-top: 1.35rem;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(135deg, var(--cx-blue-bright), var(--cx-blue));
  color: #fff;
  font: 700 1rem var(--cx-font-display);
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cx-auth-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

.cx-auth-submit:active {
  transform: translateY(0);
}

.cx-auth-foot {
  margin: 1.5rem 0 0;
  text-align: center;
  color: var(--cx-muted);
  font-size: 0.92rem;
}

.cx-auth-foot a {
  color: var(--cx-blue);
  font-weight: 700;
  text-decoration: none;
}

.cx-auth-foot a:hover {
  text-decoration: underline;
}

.cx-invalid {
  margin-top: 0.4rem;
  color: var(--cx-danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.cx-auth-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.25rem 0 0.25rem;
  color: var(--cx-muted);
  font-size: 0.82rem;
}

.cx-auth-footer strong {
  color: var(--cx-ink);
  font-family: var(--cx-font-display);
  letter-spacing: 0.04em;
}

@media (min-width: 900px) {
  .cx-auth-shell {
    padding: 1.75rem 2rem 1.5rem;
  }

  .cx-auth-panel {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .cx-auth-aside {
    display: block;
  }

  .cx-auth-form-wrap {
    padding: 2.75rem 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx-auth-submit {
    transition: none;
  }

  .cx-auth-submit:hover {
    transform: none;
  }
}
