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

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  color: #18212f;
  background: #f5f7fa;
  font-family: Inter, Roboto, Arial, sans-serif;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 520px);
  background: #f5f7fa;
}

.auth-media {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #151a22;
}

.auth-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.82;
}

.auth-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 22, 31, 0.36), rgba(16, 22, 31, 0.08));
}

.auth-brand {
  position: absolute;
  left: 42px;
  bottom: 42px;
  z-index: 1;
  color: #fff;
  max-width: 560px;
}

.auth-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-brand-mark img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  opacity: 1;
}

.auth-brand h1 {
  font-size: 36px;
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 12px;
}

.auth-brand p {
  color: rgba(255,255,255,0.82);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.auth-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #fff;
}

.auth-card {
  width: min(100%, 390px);
}

.auth-kicker {
  color: #cf2532;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.auth-card h2 {
  color: #151a22;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 10px;
}

.auth-subtitle {
  color: #5d6979;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 30px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  color: #263244;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.auth-input-wrap {
  position: relative;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d6dce5;
  border-radius: 8px;
  background: #fff;
  color: #151a22;
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input:focus {
  border-color: #cf2532;
  box-shadow: 0 0 0 3px rgba(207, 37, 50, 0.14);
  outline: none;
}

.auth-actions {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.auth-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #cf2532;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 150ms ease, transform 150ms ease;
}

.auth-button:hover {
  background: #b71f2b;
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.auth-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #697586;
  font-size: 14px;
}

.auth-link-row a,
.auth-footer a {
  color: #b71f2b;
  font-weight: 700;
  text-decoration: none;
}

.auth-link-row a:hover,
.auth-footer a:hover {
  text-decoration: underline;
}

.auth-alert {
  display: none;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-alert.is-visible {
  display: block;
}

.auth-alert.error {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.auth-alert.success {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
}

.auth-footer {
  border-top: 1px solid #e8edf3;
  margin-top: 28px;
  padding-top: 20px;
  color: #697586;
  font-size: 14px;
  line-height: 1.5;
}

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

  .auth-media {
    min-height: 260px;
  }

  .auth-panel {
    min-height: auto;
    padding: 36px 22px 48px;
  }

  .auth-brand {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .auth-brand h1 {
    font-size: 28px;
  }
}

@media (max-width: 520px) {
  .auth-media {
    min-height: 220px;
  }

  .auth-brand-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }

  .auth-brand h1 {
    font-size: 24px;
  }

  .auth-brand p {
    display: none;
  }

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