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

:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0b0d10;
  color: #f4f4f5;
}

.login-shell {
  width: min(100%, 420px);
  display: grid;
  gap: 18px;
}

.login-card {
  background: #13161b;
  border: 1px solid #2b3038;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #292d34;
}

.login-logo {
  width: 82px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.login-title {
  min-width: 0;
}

.login-title span {
  display: block;
  margin-bottom: 3px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 600;
}

.login-title h1 {
  color: #fafafa;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.login-field {
  display: grid;
  gap: 7px;
}

.login-field label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c5c8ce;
  font-size: 13px;
  font-weight: 600;
}

.login-field label svg {
  color: #8b929d;
}

.login-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #343a44;
  border-radius: 6px;
  padding: 10px 12px;
  background: #0e1115;
  color: #fafafa;
  font: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

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

.login-field input:hover {
  border-color: #4b535f;
}

.login-field input:focus {
  border-color: #e5484d;
  background: #11151a;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.14);
}

.login-submit {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 2px;
  border: 1px solid #e5484d;
  border-radius: 6px;
  padding: 10px 18px;
  background: #d93d42;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.login-submit:hover:not(:disabled) {
  background: #e5484d;
  border-color: #f05b60;
}

.login-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(229, 72, 77, 0.28);
  outline-offset: 2px;
}

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

.login-submit-arrow {
  transition: transform 150ms ease;
}

.login-submit:hover:not(:disabled) .login-submit-arrow {
  transform: translateX(2px);
}

.login-status {
  display: none;
  min-height: 42px;
  align-items: center;
  margin-top: 16px;
  border: 1px solid #343a44;
  border-radius: 6px;
  padding: 10px 12px;
  background: #0e1115;
  color: #c5c8ce;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.login-status:not(:empty) {
  display: flex;
}

.login-status[data-tone="error"] {
  border-color: rgba(229, 72, 77, 0.55);
  background: rgba(229, 72, 77, 0.08);
  color: #ffb4b7;
}

.login-status[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd38d;
}

.login-status[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.08);
  color: #9ce5b3;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #6d7480;
  font-size: 11px;
}

.login-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e5484d;
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .login-card {
    padding: 24px 20px;
  }

  .login-brand {
    gap: 13px;
  }

  .login-logo {
    width: 68px;
    height: 44px;
  }

  .login-title h1 {
    font-size: 18px;
  }
}

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