* {
  box-sizing: border-box;
}

:root {
  --app-font: "Inter", Arial, sans-serif;
  --motion-fast: 0.18s ease;
  --motion-smooth: 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lift: 0 26px 76px rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--app-font);
  font-optical-sizing: auto;
  background: linear-gradient(135deg, #eef7f3, #f8f7ef);
  background-size: 180% 180%;
  color: #111827;
  animation: loginAura 18s ease-in-out infinite;
  overflow-x: hidden;
}

main {
  width: min(100% - 32px, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
  padding: 34px 0;
  animation: pageFadeIn 0.5s ease both;
}

.intro,
.login-panel {
  background: #ffffff;
  border-radius: 34px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform var(--motion-smooth), box-shadow var(--motion-smooth);
}

.intro::before,
.login-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 52%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.68) 50%, transparent 100%);
  transform: skewX(-14deg);
  pointer-events: none;
}

.intro:hover,
.login-panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}

.intro:hover::before,
.login-panel:hover::before {
  animation: panelSheen 0.9s ease;
}

.intro {
  padding: 46px;
  animation: slideInLeft 0.58s var(--motion-smooth) both;
}

.login-panel {
  padding: 34px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  animation: slideInRight 0.58s var(--motion-smooth) 0.08s both;
}

.mobile-logo-block {
  display: none;
}

.brand {
  margin-bottom: 28px;
  color: #2563eb;
  font-size: 24px;
  font-weight: 900;
}

.logo {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin: 0 0 34px;
  object-fit: contain;
  animation: brandFloat 5.5s ease-in-out infinite;
}

h1 {
  max-width: 520px;
  margin: 0 0 18px;
  font-size: 56px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.45;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 42px;
}

.stat {
  min-height: 112px;
  padding: 20px;
  border-radius: 24px;
  background: #f5f6fa;
  transition: transform var(--motion-smooth), background var(--motion-fast), box-shadow var(--motion-smooth);
  animation: statPop 0.48s var(--motion-smooth) both;
}

.stat:nth-child(2) {
  animation-delay: 0.1s;
}

.stat:nth-child(3) {
  animation-delay: 0.18s;
}

.stat:hover {
  transform: translateY(-5px) scale(1.015);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.stat-value {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 900;
  animation: valuePulse 0.5s ease both;
}

.stat-label {
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.required {
  color: #f04f3e;
}

.field {
  margin-bottom: 24px;
}

.input-wrap {
  position: relative;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 56px;
  padding: 0 58px 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  color: #111827;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

input::placeholder {
  color: #77738d;
}

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 22px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #77738d;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color var(--motion-fast), transform var(--motion-fast);
}

.toggle-password:hover {
  color: #2563eb;
  background: transparent;
  transform: translateY(-50%) scale(1.08);
}

.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 28px;
  font-size: 14px;
  font-weight: 700;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
  transition: transform var(--motion-fast);
}

input[type="checkbox"]:hover {
  transform: scale(1.08);
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.login-button {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 18px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
  transition: background var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.login-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.42) 48%, transparent 72%);
  transform: translateX(-120%);
  pointer-events: none;
}

.login-button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

.login-button:hover::after {
  animation: sheenSweep 0.8s ease;
}

.login-button:active {
  transform: translateY(0) scale(0.99);
}

@keyframes loginAura {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes statPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes valuePulse {
  0% { transform: translateY(5px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes brandFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes panelSheen {
  from { left: -70%; }
  to { left: 120%; }
}

@keyframes sheenSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

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

@media (max-width: 860px) {
  main {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px 0;
  }

  .mobile-logo-block {
    display: flex;
    justify-content: center;
    order: 1;
  }

  .mobile-logo-block img {
    width: min(100%, 280px);
    height: auto;
    object-fit: contain;
    animation: brandFloat 5.5s ease-in-out infinite;
  }

  .login-panel {
    order: 2;
  }

  .intro {
    order: 3;
  }

  .intro .brand,
  .intro .logo {
    display: none;
  }

  .intro,
  .login-panel {
    padding: 28px;
  }

  .logo {
    width: min(100%, 300px);
    margin-bottom: 28px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .options {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 20px, 1080px);
    gap: 16px;
    padding: calc(38px + env(safe-area-inset-top, 0px)) 0 12px;
  }

  .intro,
  .login-panel {
    border-radius: 24px;
    padding: 22px;
  }

  .brand {
    margin-bottom: 18px;
    font-size: 20px;
  }

  .logo {
    width: min(100%, 240px);
    margin-bottom: 22px;
  }

  .mobile-logo-block img {
    width: min(100%, 230px);
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  .subtitle {
    font-size: 15px;
  }

  .stats {
    gap: 10px;
    margin-top: 24px;
  }

  .stat {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  .login-button {
    height: 52px;
    border-radius: 16px;
  }
}
