:root {
  --login-bg: #f8fafc;
  --login-white: #fff;
  --login-navy: #0f172a;
  --login-blue: #2563eb;
  --login-cyan: #06b6d4;
  --login-text: #475569;
  --login-muted: #64748b;
  --login-border: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  background: var(--login-bg);
  color: var(--login-navy);
  font-family: 'Inter', sans-serif;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000 50%, transparent 92%);
  -webkit-mask-image: radial-gradient(circle at center, #000 50%, transparent 92%);
}

.glow-orb {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-orb.top-left {
  top: -140px;
  left: -100px;
  width: 460px;
  height: 460px;
  background: rgba(37, 99, 235, .12);
}

.glow-orb.bottom-right {
  right: -100px;
  bottom: -140px;
  width: 440px;
  height: 440px;
  background: rgba(6, 182, 212, .12);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.12fr .98fr;
  width: 100%;
  max-width: 1040px;
  overflow: hidden;
  background: var(--login-white);
  border: 1px solid var(--login-border);
  border-radius: 24px;
  box-shadow: 0 24px 60px -15px rgba(15, 23, 42, .08), 0 4px 16px -4px rgba(15, 23, 42, .04);
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 48px;
  background: linear-gradient(155deg, #eff6ff 0%, #f8fafc 55%, #ecfeff 100%);
  border-right: 1px solid var(--login-border);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #fff;
  font-size: 20px;
  background: linear-gradient(135deg, var(--login-blue), var(--login-cyan));
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .25);
}

.brand-wordmark {
  color: var(--login-navy);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .05em;
}

.brand-wordmark span {
  color: var(--login-blue);
}

.brand-tagline {
  margin-top: 2px;
  color: var(--login-blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
}

.hero-copy {
  margin: 40px 0;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  color: #0284c7;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, .06);
}

.hero-copy h2,
.auth-header h1 {
  color: var(--login-navy);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
}

.hero-copy h2 {
  margin-bottom: 14px;
  font-size: 31px;
  line-height: 1.25;
}

.hero-copy p {
  color: var(--login-text);
  font-size: 15px;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--login-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .02);
}

.feature-item > i {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--login-blue);
  font-size: 16px;
  background: #eff6ff;
  border-radius: 10px;
}

.feature-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--login-navy);
  font-size: 13.5px;
  font-weight: 700;
}

.feature-item span {
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 46px;
  background: var(--login-white);
}

.auth-header {
  margin-bottom: 28px;
}

.auth-header h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

.auth-header p {
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.login-alert--success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.login-alert--error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.form-group {
  margin-bottom: 20px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.form-group label {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.label-hint {
  color: var(--login-muted);
  font-size: 11.5px;
  text-align: right;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
  transition: color .2s ease;
}

.form-control {
  width: 100%;
  height: 50px;
  padding: 0 44px;
  color: var(--login-navy);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  background: var(--login-bg);
  border: 1.5px solid var(--login-border);
  border-radius: 12px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-control:hover {
  background: #fff;
  border-color: #cbd5e1;
}

.form-control:focus {
  outline: none;
  background: #fff;
  border-color: var(--login-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.input-wrapper:focus-within .input-icon {
  color: var(--login-blue);
}

.toggle-visibility {
  position: absolute;
  right: 14px;
  padding: 4px;
  color: #94a3b8;
  font-size: 15px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color .2s ease;
}

.toggle-visibility:hover,
.toggle-visibility:focus-visible {
  color: var(--login-navy);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  margin-top: 6px;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--login-blue) 0%, #0284c7 100%);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, .42);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, .52);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 3px;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 14px;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.5;
  background: #f8fafc;
  border: 1px solid var(--login-border);
  border-radius: 10px;
}

.security-note i {
  flex: 0 0 auto;
  color: #059669;
  font-size: 15px;
}

.footer-note {
  margin-top: 26px;
  padding-top: 18px;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  border-top: 1px solid var(--login-border);
}

.footer-note a {
  color: var(--login-navy);
  font-weight: 600;
  text-decoration: none;
}

.footer-note a:hover {
  color: var(--login-blue);
}

@media (max-width: 880px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 460px;
  }

  .brand-panel {
    padding: 32px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--login-border);
  }

  .hero-copy {
    margin: 22px 0 0;
  }

  .hero-copy h2 {
    font-size: 24px;
  }

  .feature-list {
    display: none;
  }

  .form-panel {
    padding: 32px 28px;
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 12px;
  }

  .login-shell {
    border-radius: 20px;
  }

  .brand-panel,
  .form-panel {
    padding: 26px 22px;
  }

  .brand-wordmark {
    font-size: 21px;
  }

  .hero-copy h2 {
    font-size: 22px;
  }

  .form-label-row {
    align-items: flex-start;
  }

  .label-hint {
    max-width: 46%;
  }
}
