:root {
  --primary: #1a5276;
  --primary-dark: #12344d;
  --accent: #2e86c1;
  --success: #1e8449;
  --danger: #c0392b;
  --muted: #6c757d;
  --border: #dce1e8;
  --bg: #eef2f7;
}

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

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: linear-gradient(135deg, #0f2537 0%, #1a5276 55%, #2e86c1 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  padding: 40px 36px 28px;
  animation: fadeUp 0.45s ease;
}

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

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

.brand-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-size: 18px;
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.35;
}

.brand-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.alert-error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: var(--danger);
}

.alert-success {
  background: #e9f7ef;
  border: 1px solid #b8e6cd;
  color: var(--success);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #33475b;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: #22313f;
  background: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.18);
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.toggle-password:hover { opacity: 1; }

.eye-icon { font-size: 16px; line-height: 1; }

.btn-login {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.1s, box-shadow 0.2s, filter 0.2s;
}

.btn-login:hover { filter: brightness(1.06); box-shadow: 0 8px 18px rgba(26, 82, 118, 0.35); }
.btn-login:active { transform: translateY(1px); }
.btn-login:disabled { opacity: 0.65; cursor: not-allowed; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.login-footer p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}