:root {
  --bg-dark: #0a1220;
  --bg-card: rgba(7, 18, 37, 0.82);
  --bg-input: rgba(9, 23, 48, 0.9);
  --line: rgba(147, 197, 253, 0.35);
  --text-main: #e2ecff;
  --text-sub: #9fb3d8;
  --primary: #2b8cee;
  --primary-hover: #1f7fdd;
  --danger: #f87171;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
  font-family: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
}

.login-bg,
.login-overlay {
  position: fixed;
  inset: 0;
}

.login-bg {
  background-image:
    linear-gradient(to bottom, rgba(10, 18, 32, 0.1), rgba(10, 18, 32, 0.8)),
    url("https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1900&q=80");
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.login-overlay {
  background:
    radial-gradient(circle at 80% 20%, rgba(43, 140, 238, 0.16), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(34, 197, 94, 0.1), transparent 36%),
    rgba(7, 13, 24, 0.66);
  backdrop-filter: blur(3px);
}

.login-shell {
  position: relative;
  z-index: 3;
  width: min(470px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.logo-box {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #2b8cee, #1e6fc0);
  box-shadow: 0 12px 28px rgba(43, 140, 238, 0.4);
}

.login-brand h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.4px;
}

.login-brand p {
  margin: 8px 0 0;
  color: var(--text-sub);
  font-size: 15px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  font-size: 24px;
}

.login-subtitle {
  margin: 8px 0 22px;
  color: var(--text-sub);
  font-size: 14px;
}

form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 600;
}

input {
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 15px;
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(43, 140, 238, 0.2);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.password-row button {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}

.password-row button:hover {
  color: #cde1ff;
}

#loginBtn {
  height: 50px;
  border: none;
  border-radius: 10px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--primary), #338fe9);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#loginBtn:hover {
  background: linear-gradient(135deg, var(--primary-hover), #2b85de);
}

#loginBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.login-footer {
  margin-top: 16px;
  text-align: center;
  color: rgba(191, 219, 254, 0.7);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .login-brand h1 {
    font-size: 28px;
  }

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