
:root {
  --freedom-black: #010102;
  --freedom-surface: #18191e;
  --freedom-surface-raised: #222329;
  --freedom-green: #50ff6c;
  --freedom-mint: #7fffc5;
  --freedom-cyan: #63d8ff;
  --freedom-periwinkle: #9b9cff;
  --freedom-text: #f7f8fa;
  --freedom-muted: #a8abb5;
  --green-400: #7fff91;
  --green-500: #50ff6c;
  --green-600: #38df57;
  --green-700: #24ba42;
  --green-800: #168d31;
  --ring-primary: #50ff6c;
  --surface-submit: #50ff6c;
  --surface-submit-hover: #73ff88;
  --primary: 129 100% 66%;
  --ring: 129 100% 66%;
}

.dark {
  --header-primary: #18191e;
  --header-hover: #222329;
  --header-button-hover: #2a2b31;
  --surface-active: #2a2b31;
  --surface-active-alt: #222329;
  --surface-hover: #2a2b31;
  --surface-hover-alt: #303138;
  --surface-primary: #010102;
  --surface-primary-alt: #111216;
  --surface-primary-contrast: #18191e;
  --surface-secondary: #18191e;
  --surface-secondary-alt: #222329;
  --surface-tertiary: #25262c;
  --surface-tertiary-alt: #2b2c33;
  --surface-dialog: #18191e;
  --surface-submit: #50ff6c;
  --surface-submit-hover: #73ff88;
  --surface-chat: #18191e;
  --text-primary: #f7f8fa;
  --text-secondary: #c6c8cf;
  --text-secondary-alt: #a8abb5;
  --text-tertiary: #7d808a;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-medium-alt: rgba(255, 255, 255, 0.14);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-heavy: rgba(255, 255, 255, 0.24);
  --background: 240 33% 1%;
  --card: 230 11% 11%;
  --primary: 129 100% 66%;
  --primary-foreground: 240 33% 1%;
  --accent: 231 9% 16%;
  --ring: 129 100% 66%;
}

::selection {
  color: var(--freedom-black);
  background: var(--freedom-green);
}

:focus-visible {
  outline-color: var(--freedom-green);
}

.bg-surface-submit {
  color: var(--freedom-black) !important;
}

body.freedom-cortex-auth {
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--freedom-text);
  background: var(--freedom-black);
}

body.freedom-cortex-auth::before,
body.freedom-cortex-auth::after {
  position: fixed;
  z-index: 0;
  width: 54vw;
  height: 54vw;
  min-width: 560px;
  min-height: 560px;
  content: '';
  pointer-events: none;
  filter: blur(8px);
  opacity: 0.38;
}

body.freedom-cortex-auth::before {
  top: -38vw;
  left: 4vw;
  background: radial-gradient(circle, rgba(80, 255, 108, 0.5), transparent 67%);
}

body.freedom-cortex-auth::after {
  right: -32vw;
  bottom: -42vw;
  background: radial-gradient(circle, rgba(99, 216, 255, 0.34), transparent 68%);
}

body.freedom-cortex-auth #root > div.relative.flex.min-h-screen {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: 40px clamp(28px, 4vw, 72px) 32px;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(1, 1, 2, 0.04) 0%,
      rgba(1, 1, 2, 0.04) 56%,
      rgba(1, 1, 2, 0.62) 100%
    ),
    var(--freedom-black) !important;
}

body.freedom-cortex-auth #root > div.relative.flex.min-h-screen::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to right, black, transparent 68%);
}

body.freedom-cortex-auth #root > div.relative.flex.min-h-screen > div.mt-6.h-10 {
  display: none !important;
}

body.freedom-cortex-auth main {
  width: 100%;
  padding-left: min(56vw, 820px);
  align-items: center;
  justify-content: flex-end;
}

body.freedom-cortex-auth main > div {
  width: min(100%, 440px);
  padding: 38px 36px 40px;
  overflow: visible;
  color: var(--freedom-text);
  background: rgba(24, 25, 30, 0.86) !important;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px !important;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.46),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
}

body.freedom-cortex-auth main h1 {
  margin-bottom: 8px;
  color: var(--freedom-text) !important;
  font-size: 1.75rem;
  font-weight: 560;
  letter-spacing: -0.035em;
  text-align: left;
}

body.freedom-cortex-auth main h1::after {
  display: block;
  margin-top: 10px;
  color: var(--freedom-muted);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  content: 'Войдите с корпоративной учётной записью';
}

body.freedom-cortex-auth form[aria-label='Login form'] {
  margin-top: 28px;
}

body.freedom-cortex-auth form[aria-label='Login form'] input {
  min-height: 52px;
  color: var(--freedom-text) !important;
  background: rgba(1, 1, 2, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

body.freedom-cortex-auth form[aria-label='Login form'] input:hover {
  border-color: rgba(255, 255, 255, 0.26) !important;
}

body.freedom-cortex-auth form[aria-label='Login form'] input:focus {
  border-color: var(--freedom-green) !important;
  box-shadow: 0 0 0 3px rgba(80, 255, 108, 0.12);
}

body.freedom-cortex-auth form[aria-label='Login form'] label {
  color: var(--freedom-muted) !important;
  background: var(--freedom-surface) !important;
}

body.freedom-cortex-auth [data-testid='login-button'] {
  min-height: 52px;
  margin-top: 4px;
  color: var(--freedom-black) !important;
  font-weight: 650;
  background: var(--freedom-green) !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 30px rgba(80, 255, 108, 0.14);
}

body.freedom-cortex-auth [data-testid='login-button']:hover {
  background: #73ff88 !important;
  transform: translateY(-1px);
}

body.freedom-cortex-auth [data-testid='login-button']:active {
  background: #40e95c !important;
  transform: translateY(0);
}

body.freedom-cortex-auth button[aria-label='Toggle theme'] {
  color: var(--freedom-muted);
  background: rgba(24, 25, 30, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#freedom-cortex-hero {
  position: fixed;
  top: 50%;
  left: clamp(28px, 7vw, 120px);
  z-index: 2;
  width: min(40vw, 520px);
  pointer-events: none;
  transform: translateY(-50%);
}

#freedom-cortex-hero > img {
  width: 174px;
  height: 52px;
  margin-bottom: 38px;
}

#freedom-cortex-hero .freedom-product-name {
  margin: 0;
  color: var(--freedom-text);
  font-family: Museo, Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(2.4rem, 3.6vw, 3.8rem);
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.045em;
}

#freedom-cortex-hero .freedom-access-note {
  margin: 14px 0 0;
  color: var(--freedom-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

@media (max-width: 1040px) {
  body.freedom-cortex-auth main {
    padding-left: 49vw;
  }

  #freedom-cortex-hero {
    left: 40px;
    width: 44vw;
  }
}

@media (max-width: 820px) {
  body.freedom-cortex-auth {
    overflow-y: auto;
  }

  body.freedom-cortex-auth #root > div.relative.flex.min-h-screen {
    min-height: 100svh;
    padding: 24px 20px 28px;
    overflow: visible;
  }

  #freedom-cortex-hero {
    position: absolute;
    top: 28px;
    left: 24px;
    width: calc(100% - 48px);
    transform: none;
  }

  #freedom-cortex-hero > img {
    width: 147px;
    height: 44px;
    margin-bottom: 24px;
  }

  #freedom-cortex-hero .freedom-product-name {
    font-size: 2rem;
  }

  body.freedom-cortex-auth main {
    min-height: 100svh;
    padding: 188px 0 48px;
    justify-content: center;
  }

  body.freedom-cortex-auth main > div {
    width: min(100%, 440px);
  }
}

@media (max-width: 480px) {
  body.freedom-cortex-auth main {
    padding-top: 188px;
  }

  body.freedom-cortex-auth main > div {
    padding: 28px 22px 30px;
    border-radius: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.freedom-cortex-auth *,
  body.freedom-cortex-auth *::before,
  body.freedom-cortex-auth *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}