:root {
  color-scheme: dark;
  --bg: #090a0b;
  --surface: #141516;
  --surface-raised: #191a1c;
  --border: #292b2e;
  --border-strong: #3a3d40;
  --text: #f4f4f5;
  --muted: #92949b;
  --muted-strong: #b6b8bd;
  --accent: #d96670;
  --accent-bright: #ee7c85;
  --accent-dark: #a9424c;
  --danger-bg: #291b1d;
  --success: #8dc9a4;
  --radius-lg: 26px;
  --radius-md: 16px;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

button {
  color: inherit;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(520px, 1.1fr);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 68% 38%, rgba(217, 102, 112, 0.13), transparent 26%),
    linear-gradient(145deg, #111214, #090a0b 62%);
}

.brand-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  mask-image: linear-gradient(to bottom, transparent 4%, #000 40%, transparent 90%);
  pointer-events: none;
}

.brand-panel__glow {
  position: absolute;
  top: 34%;
  right: -190px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(217, 102, 112, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(217, 102, 112, 0.035),
    0 0 0 150px rgba(217, 102, 112, 0.018);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.brand__mark span:first-child {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--accent);
  color: #13090a;
}

.brand__mark span:last-child {
  color: var(--text);
}

.brand__name {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.brand-panel__content {
  position: relative;
  z-index: 1;
  width: min(100%, 590px);
  margin: auto 0;
  padding: 70px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.brand-panel h1 {
  max-width: 560px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.brand-panel h1 em {
  color: var(--accent-bright);
  font-style: normal;
}

.brand-panel__description {
  max-width: 490px;
  margin: 24px 0 38px;
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
}

.insight-card {
  width: min(100%, 390px);
  padding: 20px 22px 21px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(24, 25, 27, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.insight-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.insight-card__icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--danger-bg);
  color: var(--accent-bright);
}

.insight-card__icon svg {
  width: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.status-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--success);
  font-size: 10px;
}

.status-dot::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  content: "";
}

.insight-card__value {
  margin: 25px 0 14px;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 600;
}

.insight-card__line {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #27292b;
}

.insight-card__line span {
  display: block;
  width: 76%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-bright));
}

.brand-panel__footer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #62646a;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.access-panel {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px clamp(28px, 6vw, 100px) 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 102, 112, 0.05), transparent 26%),
    var(--bg);
}

.mobile-brand {
  display: none;
}

.auth-card {
  width: min(100%, 470px);
  margin: auto 0;
  animation: reveal 650ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card__heading .eyebrow {
  margin-bottom: 15px;
}

.auth-card h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.auth-card__heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 34px 0 28px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #101112;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-tab.is-active {
  background: var(--surface-raised);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  color: var(--text);
}

.register-fields {
  display: block;
}

.register-fields[hidden] {
  display: none;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field > span:first-child {
  display: block;
  margin: 0 0 9px 2px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.field__control {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field__control:focus-within {
  border-color: rgba(217, 102, 112, 0.72);
  background: #171719;
  box-shadow: 0 0 0 3px rgba(217, 102, 112, 0.08);
}

.field__control > svg,
.password-toggle svg {
  width: 19px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.field__control > svg {
  color: #666970;
}

.field__control input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.field__control input::placeholder {
  color: #606269;
}

.password-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777980;
  cursor: pointer;
}

.password-toggle:hover {
  background: #222326;
  color: var(--text);
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.field__error {
  display: block;
  min-height: 0;
  margin: 0 2px;
  color: var(--accent-bright);
  font-size: 11px;
  line-height: 0;
  opacity: 0;
  transition: margin 180ms ease, line-height 180ms ease, opacity 180ms ease;
}

.field.has-error .field__control {
  border-color: var(--accent-dark);
  background: var(--danger-bg);
}

.field.has-error .field__error {
  margin-top: 7px;
  line-height: 1.4;
  opacity: 1;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 2px 0 26px;
}

.check-control,
.terms-control {
  display: flex;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.55;
}

.check-control input,
.terms-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-control > span:first-of-type,
.terms-control > span:first-of-type {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-right: 8px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
}

.check-control input:checked + span,
.terms-control input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
}

.check-control input:checked + span::after,
.terms-control input:checked + span::after {
  width: 7px;
  height: 4px;
  border-bottom: 2px solid #180a0b;
  border-left: 2px solid #180a0b;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.check-control input:focus-visible + span,
.terms-control input:focus-visible + span {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-bright);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.text-button:hover,
.terms-control a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-control {
  align-items: flex-start;
  margin: 0 0 24px;
}

.terms-control[hidden] {
  display: none;
}

.terms-control a {
  color: var(--text);
  text-decoration-color: #55575d;
  text-underline-offset: 2px;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 0;
  border-radius: 15px;
  background: var(--accent);
  box-shadow: 0 16px 36px rgba(169, 66, 76, 0.2);
  color: #180a0b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.submit-button:hover {
  background: var(--accent-bright);
  box-shadow: 0 18px 42px rgba(169, 66, 76, 0.32);
  transform: translateY(-1px);
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button svg {
  width: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.submit-button:hover svg {
  transform: translateX(3px);
}

.form-message {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(141, 201, 164, 0.2);
  border-radius: 12px;
  background: rgba(141, 201, 164, 0.08);
  color: var(--success);
  font-size: 12px;
  line-height: 1.5;
}

.form-message.is-visible {
  display: block;
}

.form-message.is-error {
  border-color: rgba(217, 102, 112, 0.2);
  background: var(--danger-bg);
  color: var(--accent-bright);
}

.switch-prompt {
  margin: 25px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.switch-prompt .text-button {
  margin-left: 5px;
}

.access-footer {
  display: flex;
  width: min(100%, 700px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  color: #5f6167;
  font-size: 11px;
}

.access-footer nav {
  display: flex;
  gap: 20px;
}

.access-footer a {
  text-decoration: none;
}

.access-footer a:hover {
  color: var(--muted-strong);
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .login-shell {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .access-panel {
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: flex-start;
    padding: 26px 22px 22px;
    background:
      radial-gradient(circle at 100% 0%, rgba(217, 102, 112, 0.09), transparent 30%),
      var(--bg);
  }

  .mobile-brand {
    display: block;
    width: min(100%, 470px);
    margin-bottom: 60px;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .auth-card {
    margin: 0;
  }

  .auth-card__heading .eyebrow {
    display: none;
  }

  .access-footer {
    width: min(100%, 470px);
    margin-top: auto;
    padding-top: 52px;
  }
}

@media (max-width: 520px) {
  .access-panel {
    padding: 22px 18px 18px;
  }

  .mobile-brand {
    margin-bottom: 46px;
  }

  .auth-card h2 {
    font-size: 29px;
  }

  .auth-tabs {
    margin-top: 28px;
  }

  .login-options {
    gap: 12px;
  }

  .access-footer {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .access-panel {
    padding-top: 30px;
  }

  .auth-tabs {
    margin: 22px 0 20px;
  }

  .field {
    margin-bottom: 15px;
  }

  .field__control {
    min-height: 48px;
  }

  .field__control input {
    height: 46px;
  }

  .access-footer {
    margin-top: 24px;
  }
}

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