:root {
  --login-brown: #a75f35;
  --login-brown-dark: #2f201a;
  --login-border: #ded8d2;
  --login-muted: #746d67;
}

* {
  box-sizing: border-box;
}

body.login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 24px;
  color: #24211f;
  background: #f4f1ed;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, 440px);
  transform: translate(-50%, -50%);
}

.login-panel {
  padding: 40px;
  border: 1px solid rgba(83, 63, 51, .14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(55, 39, 29, .1);
}

.login-card {
  width: 100%;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.login-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--login-brown);
  font-size: 13px;
  font-weight: 800;
}

.login-brand p,
.login-brand h1 {
  margin: 0;
}

.login-brand p {
  margin-bottom: 3px;
  color: var(--login-brown);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.login-brand h1 {
  color: var(--login-brown-dark);
  font-size: 17px;
  line-height: 1.2;
}

.login-card-heading {
  margin-bottom: 28px;
}

.login-card-heading h2 {
  margin: 0 0 8px;
  color: var(--login-brown-dark);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.login-card-heading p,
.login-help {
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-card-heading p {
  margin: 0;
}

.login-alert {
  margin: 0 0 18px;
  padding: 11px 12px;
  border: 1px solid #e6aaa2;
  border-radius: 8px;
  color: #8d261f;
  background: #fff1ef;
  font-size: 12px;
  line-height: 1.45;
}

.login-alert.info {
  border-color: #d8c79d;
  color: #72571d;
  background: #fff9e9;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  margin-bottom: 7px;
  color: #3c342f;
  font-size: 12px;
  font-weight: 700;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-label-row span {
  margin-bottom: 7px;
  color: #9b938d;
  font-size: 9px;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--login-border);
  border-radius: 8px;
  outline: none;
  color: #24211f;
  background: #fff;
  font: inherit;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.login-field input::placeholder {
  color: #aaa39d;
}

.login-field input:focus {
  border-color: var(--login-brown);
  box-shadow: 0 0 0 3px rgba(167, 95, 53, .12);
}

.login-password-wrap {
  position: relative;
}

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

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--login-brown);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.login-eye-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-eye-closed,
.login-password-toggle.password-visible .login-eye-open {
  display: none;
}

.login-password-toggle.password-visible .login-eye-closed {
  display: block;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  outline: none;
  background: #f5ece6;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid var(--login-brown);
  border-radius: 8px;
  color: #fff;
  background: var(--login-brown);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  transition: background .15s ease, transform .15s ease;
}

.login-submit:hover:not(:disabled) {
  background: #914e29;
  transform: translateY(-1px);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(167, 95, 53, .22);
  outline-offset: 2px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.login-help {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid #eee9e5;
  text-align: center;
  font-size: 11px;
}

.login-noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #8d261f;
  font: 600 12px Inter, sans-serif;
}

@media (max-width: 480px) {
  body.login-page {
    padding: 0;
    place-items: stretch;
    background: #fff;
  }

  .login-shell {
    position: static;
    width: 100%;
    transform: none;
  }

  .login-panel {
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px 22px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-label-row span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
