* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #06b6d4;
  --purple: #7c3aed;
  --text: #172033;
  --muted: #718096;
  --border: #e4e9f2;
  --surface: #ffffff;
  --background: #eef4ff;
  --danger: #dc2626;
  --success: #059669;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(37, 99, 235, .16), transparent 30%),
    radial-gradient(circle at 90% 85%, rgba(124, 58, 237, .14), transparent 32%),
    linear-gradient(135deg, #f7fbff 0%, #eef4ff 50%, #f7f2ff 100%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.login-page::before {
  width: 280px;
  height: 280px;
  left: -100px;
  top: -80px;
  background: rgba(37, 99, 235, .10);
}

.login-page::after {
  width: 340px;
  height: 340px;
  right: -130px;
  bottom: -120px;
  background: rgba(124, 58, 237, .10);
}

.login-shell {
  width: min(1040px, 100%);
  min-height: 610px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(30, 64, 175, .14);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 1;
}

.login-brand {
  position: relative;
  padding: 65px 60px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.22), transparent 26%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.13), transparent 30%),
    linear-gradient(145deg, #1d4ed8 0%, #2563eb 42%, #06b6d4 100%);
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  border: 70px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -190px;
  bottom: -190px;
}

.brand-mark,
.mini-logo {
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 30px;
  border-radius: 20px;
  color: #2563eb;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  font-size: 23px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  opacity: .82;
  margin-bottom: 12px;
}

.login-brand h1 {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -.055em;
  margin-bottom: 22px;
}

.login-brand > p:not(.eyebrow) {
  max-width: 440px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,.88);
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.login-points span {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.login-points i {
  font-style: normal;
  margin-right: 4px;
}

.login-card {
  padding: 62px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,.92);
}

.login-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 34px;
}

.mini-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
  font-size: 15px;
}

.login-head h2 {
  font-size: 28px;
  letter-spacing: -.035em;
  margin-bottom: 4px;
}

.login-head p {
  color: var(--muted);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  font-size: 15px;
  opacity: .6;
  z-index: 1;
}

.input {
  width: 100%;
}

.input-wrap input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  padding: 0 94px 0 44px;
  background: #f9fbff;
  color: var(--text);
  transition: .2s ease;
}

.input-wrap input::placeholder {
  color: #a0aabd;
}

.input-wrap input:focus {
  border-color: rgba(37,99,235,.65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.09);
}

.input-wrap.invalid input {
  border-color: rgba(220,38,38,.55);
  box-shadow: 0 0 0 4px rgba(220,38,38,.07);
}

.toggle-password {
  position: absolute;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  padding: 8px;
}

.field-error {
  display: block;
  min-height: 17px;
  color: var(--danger);
  font-size: 11px;
  margin-top: 5px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  font-size: 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
}

.remember input {
  accent-color: var(--primary);
}

.login-options a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.login-options a:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  height: 53px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 25px rgba(37, 99, 235, .20);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(37, 99, 235, .28);
}

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

.login-btn:disabled {
  cursor: not-allowed;
  opacity: .75;
}

.loader {
  display: none;
  width: 17px;
  height: 17px;
  margin-left: 7px;
  vertical-align: middle;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.login-btn.loading .loader {
  display: inline-block;
}

.login-message {
  display: none;
  padding: 11px 13px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.5;
}

.login-message.error {
  display: block;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.login-message.success {
  display: block;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.login-help {
  text-align: center;
  color: #98a2b3;
  font-size: 11px;
  margin-top: 22px;
}

.login-help strong {
  color: #64748b;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
  .login-page {
    padding: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 540px;
    min-height: auto;
  }

  .login-brand {
    padding: 42px 38px;
  }

  .login-brand h1 {
    font-size: 42px;
  }

  .login-card {
    padding: 42px 38px;
  }
}

@media (max-width: 480px) {
  .login-page {
    padding: 12px;
  }

  .login-shell {
    border-radius: 22px;
  }

  .login-brand,
  .login-card {
    padding: 32px 24px;
  }

  .brand-mark {
    width: 60px;
    height: 60px;
    margin-bottom: 22px;
  }

  .login-brand h1 {
    font-size: 36px;
  }

  .login-points {
    display: grid;
  }

  .login-head h2 {
    font-size: 24px;
  }

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