:root {
  --ink: #0b1c30;
  --muted: #657086;
  --line: #dde6f5;
  --panel: #ffffff;
  --soft: #e7deff;
  --brand: #4648d4;
  --brand-dark: #180052;
  --accent: #f4b63f;
  --danger: #cc3d3d;
  --surface: #f8f9ff;
  --surface-high: #e5eeff;
  --shadow: 0 1px 2px rgba(45, 27, 105, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(70, 72, 212, 0.12), transparent 30%),
    linear-gradient(135deg, #f8f9ff 0%, #eff4ff 52%, #ffffff 100%);
}

.login-shell {
  width: min(1040px, 100%);
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) 1.1fr;
  overflow: hidden;
  border: 1px solid rgba(221, 230, 245, 0.95);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 30px 34px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-dark);
}

.brand-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-copy {
  margin-top: 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.auth-copy h1,
.hero-content h2 {
  margin: 0;
  letter-spacing: 0;
}

.auth-copy h1 {
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
}

.auth-copy p {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0 22px;
}

.role-pill {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.role-pill.active {
  border-color: rgba(70, 72, 212, 0.36);
  color: var(--brand-dark);
  background: var(--soft);
}

.role-pill .material-icons-round {
  font-size: 22px;
}

.role-pill small {
  font-size: 11px;
  font-weight: 700;
}

.forms,
.form-content,
.login-form {
  width: 100%;
}

.forms {
  margin-top: 0;
}

.title {
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
}

.alert-box {
  display: none;
}

.alert-box .alert {
  margin: 0 0 14px !important;
  border-radius: 8px;
  font-size: 13px;
}

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

.input-box {
  position: relative;
  min-height: 48px;
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--muted);
}

.input-box .material-icons-round {
  position: absolute;
  left: 14px;
  font-size: 20px;
  color: var(--brand);
  pointer-events: none;
}

.input-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 44px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-box input::placeholder {
  color: #8a95a5;
  font-weight: 500;
}

.input-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(70, 72, 212, 0.13);
}

.input-box input:disabled {
  color: var(--muted);
  background: #f3f6f7;
}

#togglePassword {
  position: absolute;
  right: 14px;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  z-index: 2;
}

#togglePassword:hover {
  color: var(--brand);
}

.form-options,
.form-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  font-size: 12px;
}

.form-links.split {
  justify-content: space-between;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.remember-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.password-toggle {
  justify-content: flex-start;
  margin-top: 2px;
}

a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  color: var(--brand-dark);
}

.button {
  min-height: auto;
  margin-top: 6px;
}

.button button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button button:hover {
  background: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(45, 27, 105, 0.12);
}

.button button:disabled {
  background: #819098 !important;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.button .material-icons-round {
  font-size: 19px;
}

.invalid-feedback {
  margin: -6px 0 2px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

#forgotPassword-form,
#otpVarification-form,
#createNewPassword-form {
  display: none;
}

.hero-panel {
  position: relative;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  overflow: hidden;
  color: #fff;
  background: var(--brand-dark);
}

.hero-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 0, 82, 0.94) 0%, rgba(45, 27, 105, 0.78) 48%, rgba(70, 72, 212, 0.18) 100%),
    linear-gradient(0deg, rgba(9, 30, 34, 0.68), rgba(9, 30, 34, 0.12));
}

.hero-content,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 520px;
  margin-top: auto;
}

.hero-content .eyebrow {
  color: var(--accent);
}

.hero-content h2 {
  max-width: 560px;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 800;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.hero-metrics div {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.hero-metrics strong {
  font-size: 21px;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

@media (max-width: 980px) {
  body {
    padding: 12px;
    align-items: flex-start;
  }

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

  .auth-panel {
    padding: 24px;
  }

  .auth-copy {
    margin-top: 18px;
  }

  .hero-panel {
    min-height: 260px;
    padding: 24px;
  }

  .hero-content h2 {
    font-size: 28px;
  }

  .hero-metrics {
    margin-top: 18px;
  }
}

@media (max-width: 620px) {
  body {
    padding: 0;
    background: #fff;
  }

  .login-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-panel {
    padding: 20px 16px;
  }

  .brand-row img {
    width: 32px;
    height: 32px;
  }

  .auth-copy {
    margin-top: 18px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }

  .auth-copy p {
    max-width: none;
  }

  .role-strip {
    grid-template-columns: repeat(2, 1fr);
    margin: 16px 0 18px;
  }

  .role-pill {
    min-height: 52px;
    flex-direction: row;
  }

  .title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .form-options,
  .form-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .form-links.split {
    flex-direction: row;
    align-items: center;
  }

  .hero-panel {
    display: none;
  }

  .button button,
  .input-box input {
    min-height: 46px;
    height: 46px;
  }
}

@media (max-height: 740px) and (min-width: 981px) {
  body {
    padding: 10px;
  }

  .login-shell {
    min-height: 560px;
  }

  .auth-panel {
    padding: 24px 30px;
  }

  .auth-copy {
    margin-top: 18px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }

  .auth-copy p {
    line-height: 1.45;
  }

  .role-strip {
    margin: 16px 0 18px;
  }

  .role-pill {
    min-height: 52px;
  }

  .hero-panel {
    min-height: 560px;
    padding: 28px;
  }

  .hero-content h2 {
    font-size: 29px;
  }

  .hero-metrics div {
    min-height: 62px;
  }
}
