:root {
  --ink: #172033;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #e4e7ec;
  --canvas: #f6f7fb;
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-line: #fecdca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(79, 70, 229, 0.11), transparent 30rem),
    radial-gradient(circle at 92% 104%, rgba(79, 70, 229, 0.08), transparent 28rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login {
  width: 100%;
  max-width: 400px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.login-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.18);
}

.login-brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.login-card {
  padding: 32px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 16px 40px rgba(16, 24, 40, 0.08);
}

.login-card h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.login-error svg {
  flex-shrink: 0;
  margin-top: 1px;
}

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

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: inherit;
  background: white;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-field input::placeholder {
  color: var(--subtle);
}

.login-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.password-wrap {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 6px 10px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
  background: #f2f4f7;
}

.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 150ms ease;
}

.login-submit:hover {
  background: var(--accent-dark);
}

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

.login-submit:focus-visible,
.password-toggle:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.login-footnote {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 420px) {
  .login-card {
    padding: 24px 20px;
  }
}
