:root {
  color-scheme: light;
  --login-canvas: #eef1f5;
  --login-surface: #ffffff;
  --login-ink: #111827;
  --login-muted: #667085;
  --login-line: #d9dee7;
  --login-soft: #f6f7f9;
  --login-dark: #101216;
  --login-accent: #c71f2d;
  --login-accent-dark: #9e1722;
  --login-focus: rgba(199, 31, 45, .15);
  --login-shadow: 0 32px 90px rgba(15, 23, 42, .16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  min-width: 320px;
  background: var(--login-canvas);
  color: var(--login-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3.5vw, 52px);
  background:
    radial-gradient(circle at 8% 12%, rgba(199, 31, 45, .09), transparent 30%),
    radial-gradient(circle at 92% 88%, rgba(17, 24, 39, .08), transparent 28%),
    var(--login-canvas);
}

.login-shell {
  width: min(1100px, 100%);
  min-height: min(700px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, .09);
  border-radius: 28px;
  background: var(--login-surface);
  box-shadow: var(--login-shadow);
}

.login-brand-panel {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(34px, 5vw, 64px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), transparent 46%),
    var(--login-dark);
  color: #fff;
}
.login-brand-panel::before,
.login-brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}
.login-brand-panel::before {
  width: 420px;
  height: 420px;
  right: -190px;
  top: -170px;
  border: 80px solid rgba(199, 31, 45, .22);
}
.login-brand-panel::after {
  width: 280px;
  height: 280px;
  left: -160px;
  bottom: -120px;
  border: 52px solid rgba(255, 255, 255, .045);
}

.login-brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.login-brand-top img {
  width: min(225px, 55%);
  height: 62px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}
.login-brand-top > span {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: #d6d9df;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.login-brand-copy { margin: auto 0 34px; max-width: 520px; }
.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--login-accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
}
.login-brand-panel .login-kicker { color: #ff6b76; }
.login-brand-copy h1 {
  margin: 18px 0 20px;
  color: #fff;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 760;
  letter-spacing: -.052em;
  line-height: .98;
}
.login-brand-copy p {
  max-width: 470px;
  margin: 0;
  color: #b7bec8;
  font-size: 16px;
  line-height: 1.7;
}

.login-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 36px;
}
.login-feature-list span {
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
  color: #dfe3e8;
  font-size: 12px;
  font-weight: 650;
}
.login-feature-list b { color: #ff6b76; font-size: 10px; letter-spacing: .12em; }
.login-brand-footer { color: #858d99; font-size: 11px; }

.login-form-panel {
  display: grid;
  place-items: center;
  padding: clamp(34px, 5vw, 72px);
  background: var(--login-surface);
}
.login-card { width: min(390px, 100%); }
.login-mobile-brand { display: none; }
.login-card h2 {
  margin: 13px 0 8px;
  color: var(--login-ink);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 760;
  letter-spacing: -.04em;
  line-height: 1.05;
}
.login-intro {
  margin: 0 0 30px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.65;
}

.login-messages { display: grid; gap: 8px; margin: -12px 0 22px; }
.login-alert {
  padding: 12px 14px;
  border: 1px solid #dce2ea;
  border-radius: 11px;
  background: #f7f9fb;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}
.login-alert.error { border-color: #fecaca; background: #fff1f2; color: #b42318; }
.login-alert.success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.login-alert.warning { border-color: #fed7aa; background: #fff7ed; color: #b45309; }

.login-field {
  display: grid;
  gap: 8px;
  margin-bottom: 17px;
  color: #273142;
  font-size: 13px;
  font-weight: 750;
}
.login-control {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid var(--login-line);
  border-radius: 12px;
  background: var(--login-soft);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-control:focus-within {
  border-color: var(--login-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--login-focus);
}
.login-control > svg { width: 19px; height: 19px; flex: 0 0 auto; fill: #768195; }
.login-control input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--login-ink);
  font-size: 14px;
}
.login-control input::placeholder { color: #98a2b3; }
.password-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}
.password-toggle:hover { background: #e9edf2; }
.password-toggle svg { width: 19px; height: 19px; fill: currentColor; }

.login-submit {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--login-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.login-submit:hover { transform: translateY(-1px); background: #24272d; box-shadow: 0 12px 25px rgba(17,24,39,.16); }
.login-submit:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 3px; }
.login-submit:disabled { cursor: wait; opacity: .78; transform: none; }
.login-submit svg { width: 18px; height: 18px; fill: currentColor; }
.login-submit.loading svg { animation: login-arrow 1s ease-in-out infinite; }
@keyframes login-arrow { 50% { transform: translateX(4px); } }

.login-back {
  display: block;
  width: max-content;
  margin: 22px auto 0;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.login-back:hover { color: var(--login-accent); }
.login-help { display: block; margin-top: 35px; color: #98a2b3; font-size: 11px; text-align: center; }

@media (max-width: 900px) {
  .login-page { padding: 18px; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; width: min(520px, 100%); border-radius: 22px; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 38px 30px; }
  .login-mobile-brand { display: flex; justify-content: center; margin-bottom: 30px; }
  .login-mobile-brand img { width: min(230px, 72%); height: 70px; object-fit: contain; }
  .login-card > .login-kicker { display: flex; justify-content: center; }
  .login-card h2, .login-intro { text-align: center; }
}

@media (max-width: 480px) {
  .login-page { display: block; padding: 0; background: #fff; }
  .login-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .login-form-panel { align-items: start; padding: 28px 22px 34px; }
  .login-mobile-brand { margin: 10px 0 32px; }
  .login-card h2 { font-size: 34px; }
  .login-control, .login-submit { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
