:root {
  --ink: #12161f;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --danger: #b91c1c;
  --danger-bg: #fff1f2;
  --danger-line: #fecdd3;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(18, 22, 31, 0.12), 0 0 0 1px rgba(18, 22, 31, 0.04);
}

* { box-sizing: border-box; }

.login-page {
  min-height: 100vh;
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, #bfdbfe 0%, transparent 58%),
    radial-gradient(780px 480px at 100% 8%, #e2e8f0 0%, transparent 52%),
    linear-gradient(165deg, #f8fafc 0%, #eef2f7 48%, #e8edf5 100%);
  z-index: 0;
}

.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.login-shell {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  animation: loginIn 0.45s ease both;
}

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

.login-card {
  background: var(--surface);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 34px 30px 30px;
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
}

.login-header h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.login-header p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 450;
}

.login-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.86rem;
  font-weight: 550;
  margin-bottom: 16px;
}

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

.login-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.login-input-wrap {
  position: relative;
  display: block;
}

.login-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: color 0.15s ease;
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input::placeholder {
  color: #9ca3af;
}

.login-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-input-wrap:focus-within .login-ico {
  color: var(--accent);
}

.login-submit {
  width: 100%;
  margin-top: 10px;
  height: 48px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.22);
}

.login-submit:hover {
  background: linear-gradient(145deg, #1d4ed8 0%, #1e3a8a 100%);
}

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

@media (max-width: 420px) {
  .login-card {
    padding: 28px 20px 24px;
  }
  .login-header h1 {
    font-size: 1.4rem;
  }
}
