html.ac-auth-html,
html.ac-auth-html body.ac-auth-page {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.ac-auth-page {
  --auth-bg: #06080f;
  --auth-mesh-a1: rgba(255, 77, 46, 0.18);
  --auth-mesh-a2: rgba(34, 211, 238, 0.12);
  --auth-mesh-a3: rgba(168, 85, 247, 0.1);
  --auth-bg-subtle: #121214;
  --auth-card: rgba(18, 18, 20, 0.4);
  --auth-foreground: #f4f4f5;
  --auth-muted: #a1a1aa;
  --auth-accent: #a855f7;
  --auth-border: rgba(255, 255, 255, 0.08);
  --auth-btn-bg: #27272a;
  --auth-btn-hover: #3f3f46;
  --auth-btn-fg: #fafafa;
  --auth-btn-border: rgba(255, 255, 255, 0.14);
  --auth-btn-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  --auth-radius-2xl: 1rem;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: -0.011em;
  line-height: 1.6;
  color: var(--auth-foreground);
  background: var(--auth-bg);
}

html[data-theme='light'] .ac-auth-page {
  --auth-bg: #e4eaf6;
  --auth-bg-subtle: #f1f5f9;
  --auth-mesh-a1: rgba(255, 77, 46, 0.12);
  --auth-mesh-a2: rgba(34, 211, 238, 0.14);
  --auth-mesh-a3: rgba(168, 85, 247, 0.1);
  --auth-card: #fff;
  --auth-foreground: #111;
  --auth-muted: #64748b;
  --auth-accent: #7c3aed;
  --auth-border: #e2e8f0;
  --auth-btn-bg: #ffffff;
  --auth-btn-hover: #f1f5f9;
  --auth-btn-fg: #18181b;
  --auth-btn-border: #d4d4d8;
  --auth-btn-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.ac-auth-shell {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.ac-auth-hero {
  position: relative;
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
  color: #fff;
  background: #020618;
  box-sizing: border-box;
}

@keyframes ac-auth-hero-photo-in {
  from {
    opacity: 0.35;
    transform: scale(1.09) translate3d(-1.5%, 1%, 0);
  }

  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

.ac-auth-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #020618;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  transform-origin: center center;
  animation: ac-auth-hero-photo-in 2s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: opacity, transform;
}

.ac-auth-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(2, 6, 23, 0.62) 0%,
    rgba(2, 6, 23, 0.42) 42%,
    rgba(2, 6, 23, 0.22) 100%
  );
  pointer-events: none;
  animation: ac-auth-hero-shade-in 2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ac-auth-hero-shade-in {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

.ac-auth-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  width: auto;
  max-width: 100%;
  text-align: left;
}

@keyframes ac-auth-enter-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ac-auth-hero__logo {
  display: block;
  flex-shrink: 0;
  width: clamp(3.5rem, 8vw, 5.5rem);
  height: clamp(3.5rem, 8vw, 5.5rem);
  margin: 0;
  object-fit: contain;
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  animation: ac-auth-enter-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.08s;
}

.ac-auth-hero__title {
  margin: 0;
  font-family: 'Sofia Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: left;
  white-space: nowrap;
  animation: ac-auth-enter-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.2s;
}

.ac-auth-panel {
  position: relative;
  isolation: isolate;
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  box-sizing: border-box;
  overflow: auto;
  background: var(--auth-bg);
}

.ac-auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 10% -10%, var(--auth-mesh-a1), transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 10%, var(--auth-mesh-a2), transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 100%, var(--auth-mesh-a3), transparent 40%);
}

.ac-auth-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

html[data-theme='light'] .ac-auth-panel::before {
  background:
    radial-gradient(ellipse 100% 80% at 10% -10%, var(--auth-mesh-a1), transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 10%, var(--auth-mesh-a2), transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 100%, var(--auth-mesh-a3), transparent 40%),
    linear-gradient(180deg, #eef2fa 0%, #e4eaf6 100%);
}

@keyframes ac-auth-enter-right {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ac-auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
}

.ac-auth-card__head,
.ac-auth-card .ac-auth-lead,
.ac-auth-card .ac-auth-msg,
.ac-auth-card .ac-auth-form,
.ac-auth-card .ac-auth-btn,
.ac-auth-card .ac-auth-footer {
  animation: ac-auth-enter-right 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ac-auth-card__head {
  animation-delay: 0.06s;
}

.ac-auth-card .ac-auth-lead {
  animation-delay: 0.12s;
}

.ac-auth-card .ac-auth-msg {
  animation-delay: 0.16s;
}

.ac-auth-card .ac-auth-form {
  animation-delay: 0.18s;
}

.ac-auth-card .ac-auth-btn {
  animation-delay: 0.22s;
}

.ac-auth-card .ac-auth-form .ac-auth-btn {
  animation-delay: 0.26s;
}

.ac-auth-card .ac-auth-footer {
  animation-delay: 0.34s;
}

@media (prefers-reduced-motion: reduce) {
  .ac-auth-hero__bg,
  .ac-auth-hero__shade,
  .ac-auth-hero__logo,
  .ac-auth-hero__title,
  .ac-auth-card__head,
  .ac-auth-card .ac-auth-lead,
  .ac-auth-card .ac-auth-msg,
  .ac-auth-card .ac-auth-form,
  .ac-auth-card .ac-auth-btn,
  .ac-auth-card .ac-auth-footer {
    animation: none;
  }
}

.ac-auth-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.ac-auth-card__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--auth-radius-2xl);
  border: 1px solid var(--auth-border);
  background: var(--auth-card);
  color: var(--auth-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ac-auth-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ac-auth-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--auth-foreground);
}

.ac-auth-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  border: 1px solid var(--auth-btn-border);
  border-radius: var(--auth-radius-2xl);
  background: var(--auth-btn-bg);
  color: var(--auth-btn-fg);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--auth-btn-shadow);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  box-sizing: border-box;
}

.ac-auth-btn:hover {
  background: var(--auth-btn-hover);
  border-color: var(--auth-btn-border);
  transform: translateY(-1px);
}

.ac-auth-btn:active {
  transform: translateY(0);
}

.ac-auth-btn__left {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.ac-auth-btn__left svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.ac-auth-btn__arrow {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.95;
}

.ac-auth-btn--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.ac-auth-msg {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

html[data-theme='light'] .ac-auth-msg {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.ac-auth-footer {
  margin-top: 2rem;
  text-align: center;
}

.ac-auth-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--auth-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ac-auth-footer a:hover {
  color: var(--auth-foreground);
}

.ac-auth-lead {
  margin: -0.75rem 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--auth-muted);
}

.ac-auth-lead strong {
  color: var(--auth-foreground);
  font-weight: 600;
}

.ac-auth-form {
  margin: 0;
}

.ac-auth-field {
  margin: 0 0 1rem;
}

.ac-auth-field:last-of-type {
  margin-bottom: 1.25rem;
}

.ac-auth-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-muted);
}

.ac-auth-input {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--auth-radius-2xl);
  border: 1px solid var(--auth-border);
  background: var(--auth-card);
  color: var(--auth-foreground);
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ac-auth-input::placeholder {
  color: var(--auth-muted);
  opacity: 0.85;
}

.ac-auth-input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

html[data-theme='light'] .ac-auth-input {
  background: #fff;
}

html[data-theme='light'] .ac-auth-input:focus {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.ac-auth-input--select {
  cursor: pointer;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256' fill='%23a1a1aa'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

html[data-theme='light'] .ac-auth-input--select {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256' fill='%2364748b'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
}

.ac-auth-submit {
  justify-content: center;
  margin-top: 0.15rem;
  cursor: pointer;
}

html[data-theme='light'] .ac-auth-panel {
  background: var(--auth-bg);
}

html[data-theme='light'] body.ac-auth-page {
  background: #06080f;
}

.ac-auth-page .ac-theme-wrap--corner {
  z-index: 200;
}

@media (max-width: 767px) {
  html.ac-auth-html,
  html.ac-auth-html body.ac-auth-page {
    overflow: auto;
  }

  .ac-auth-shell {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .ac-auth-hero {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-height: 46vh;
    height: auto;
  }

  .ac-auth-panel {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 54vh;
    height: auto;
  }
}
