:root {
  color-scheme: light;
  --login-bg: linear-gradient(135deg, #141e30 0%, #243b55 100%);
  --panel-bg: rgba(255, 255, 255, 0.95);
  --panel-border: rgba(148, 163, 184, 0.35);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1f2937;
  --muted: #64748b;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--login-bg);
  padding: 1.5rem;
  color: var(--text);
}

.login-container {
  width: min(420px, 100%);
  background: var(--panel-bg);
  border-radius: 1.5rem;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  text-align: center;
}

.login-logo {
  width: clamp(120px, 28%, 160px);
  margin: 0 auto 1.75rem;
  display: block;
  transition: transform 160ms ease;
}

.login-logo:hover {
  transform: translateY(-2px);
}

.login-title {
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--muted);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.input-wrap {
  position: relative;
}

.input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  padding-right: 3rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 1rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
}

.input-field:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.8);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.input-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toggle-password {
  cursor: pointer;
  color: var(--primary);
  font-size: 1rem;
  transition: color 150ms ease;
  background: transparent;
  border: none;
  padding: 0;
}

.toggle-password:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.toggle-password:hover {
  color: var(--primary-dark);
}

.login-error {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.btn-login {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: none;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btn-login:active {
  transform: translateY(0);
}

.login-footnote {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.85);
}

.login-footnote strong {
  color: var(--primary-dark);
}

@media (max-width: 520px) {
  body {
    padding: 1rem;
  }

  .login-container {
    border-radius: 1.25rem;
  }
}
