:root {
  --brand: #6c3baa;
  --brand-dark: #4d247f;
  --brand-soft: #f1eafd;
  --ink: #1b1530;
  --muted: #736c80;
  --line: #e7e1ed;
  --card: rgba(255, 255, 255, 0.94);
  --danger: #b42318;
  --success: #087a45;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f6f3fa;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(172, 129, 255, 0.24), transparent 34%),
    radial-gradient(circle at 82% 72%, rgba(98, 48, 157, 0.2), transparent 28%),
    linear-gradient(135deg, #1f1235 0%, #4f267f 45%, #8d55c5 100%);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: .7;
  animation: drift 12s ease-in-out infinite alternate;
}

.login-shell::before {
  width: 360px;
  height: 360px;
  background: rgba(255, 255, 255, .08);
  left: -100px;
  top: -80px;
}

.login-shell::after {
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, .06);
  right: 10%;
  bottom: -80px;
  animation-delay: -4s;
}

@keyframes drift {
  to {
    transform: translate3d(40px, 28px, 0) scale(1.08);
  }
}

.brand-panel {
  position: relative;
  z-index: 1;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 9vw;
  color: #fff;
}

.brand-mark,
.mini-logo {
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #fff;
  color: var(--brand);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

.brand-mark {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  font-size: 42px;
}

.brand-panel h1 {
  margin: 3px 0 10px;
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  letter-spacing: -.055em;
  line-height: .95;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand-panel .eyebrow {
  color: rgba(255,255,255,.68);
}

.brand-copy {
  max-width: 560px;
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: 1.05rem;
  line-height: 1.7;
}
.official-logo { width:min(390px,82vw); height:auto; object-fit:contain; background:#fff; border-radius:22px; box-shadow:0 28px 70px rgba(4,54,120,.14); }

.login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  background: rgba(252, 250, 254, .88);
  backdrop-filter: blur(14px);
}

.login-card {
  width: min(100%, 470px);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  padding: 30px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(31, 18, 53, .16);
}

.login-card__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 22px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2daf73;
  box-shadow: 0 0 0 4px rgba(45, 175, 115, .12);
}

.status-dot.offline {
  background: #d49128;
  box-shadow: 0 0 0 4px rgba(212, 145, 40, .12);
}

.steps {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 24px 0 34px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a93a4;
  font-size: .74rem;
  font-weight: 800;
}

.step span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #eee9f2;
  color: #8b8395;
}

.step.active span,
.step.done span {
  background: var(--brand);
  color: #fff;
}

.step.active {
  color: var(--ink);
}

.step-line {
  height: 2px;
  background: #e8e2ed;
}

.auth-step {
  animation: fadeUp .3s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.auth-step h2 {
  margin: 4px 0 8px;
  font-size: 1.78rem;
  letter-spacing: -.035em;
}

.muted {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

form {
  display: grid;
  gap: 10px;
}

label {
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 800;
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 78px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: .76rem;
  font-weight: 800;
}

.btn-primary {
  min-height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 13px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 28%, transparent);
  transition: transform .18s ease, filter .18s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-primary:disabled {
  cursor: wait;
  opacity: .7;
}

.back-button {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.company-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #faf8fc;
}

.company-dot {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.25);
}

.company-chip strong,
.company-chip small {
  display: block;
}

.company-chip small {
  margin-top: 2px;
  color: var(--muted);
}

.form-message {
  min-height: 18px;
  margin-top: 18px;
  padding: 0 2px;
  font-size: .79rem;
  font-weight: 750;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    min-height: 100dvh;
    padding: 20px;
  }

  .login-card {
    padding: 24px;
    border-radius: 22px;
  }
}

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

  .steps small {
    display: none;
  }
}
