/* CU.AI Login – Design 754 */

:root {
  color-scheme: light;
  --navy: #142640;
  --blue: #2363dc;
  --blue-dark: #1552d0;
  --border: #d8e3f3;
  --error: #b42332;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--navy);
  background:
    radial-gradient(
      ellipse at 12% 48%,
      rgba(210, 228, 255, .55),
      transparent 48%
    ),
    radial-gradient(
      ellipse at 88% 90%,
      rgba(218, 232, 255, .65),
      transparent 48%
    ),
    #f8faff;
}

.page {
  width: min(1260px, calc(100% - 72px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 550px);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
  padding: 55px 0;
}

.identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.identity-logo {
  display: block;
  width: min(100%, 440px);
  height: auto;
  object-fit: contain;
}

.identity-title {
  margin: 16px 0 0;
  color: var(--blue);
  font-size: clamp(30px, 3.5vw, 53px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.14;
  white-space: nowrap;
}

.login-panel {
  width: 100%;
  padding: clamp(28px, 3.5vw, 48px);
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e3eaf6;
  border-radius: 27px;
  box-shadow:
    0 25px 60px rgba(40, 78, 138, .09),
    0 3px 15px rgba(40, 78, 138, .025);
}

.login-title {
  margin: 0 0 42px;
  color: #122848;
  font-size: clamp(32px, 3.25vw, 52px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.05em;
}

.login-title span {
  color: var(--blue);
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field label {
  color: #102440;
  font-size: 15px;
  font-weight: 700;
}

.field input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 17px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: #142640;
  font: inherit;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder {
  color: #89919f;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(35, 99, 220, .12);
}

#login-button {
  width: 100%;
  min-height: 64px;
  margin-top: 9px;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(110deg, #1764e8, #2864d9);
  color: white;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s;
}

#login-button:hover {
  background: #1554c8;
}

#login-button:focus-visible {
  outline: 3px solid #87b8ff;
  outline-offset: 3px;
}

#login-button:active {
  transform: translateY(1px);
}

#login-button:disabled {
  opacity: .65;
  cursor: wait;
}

.form-error {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #f5c8cc;
  border-radius: 10px;
  background: #fff4f4;
  color: var(--error);
  font-size: 14px;
  line-height: 1.5;
}

.form-error[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .page {
    width: min(550px, calc(100% - 40px));
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 38px 0 55px;
  }

  .identity-logo {
    width: min(245px, 65%);
  }

  .identity-title {
    margin-top: 4px;
    font-size: clamp(28px, 5vw, 36px);
  }

  .login-title {
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .page {
    width: calc(100% - 28px);
    gap: 22px;
    padding: 25px 0 40px;
  }

  .identity-logo {
    width: min(200px, 62%);
  }

  .identity-title {
    font-size: clamp(25px, 7vw, 32px);
  }

  .login-panel {
    padding: 29px 23px;
    border-radius: 22px;
  }

  .login-title {
    font-size: clamp(30px, 8vw, 40px);
  }

  #login-form {
    gap: 21px;
  }

  .field input {
    height: 53px;
  }

  #login-button {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
