/* === Global Body === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  background-image: url('monitoring-control/img/login_bg.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

/* === Login Box Container === */
.login-container {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #e3eafc;
  transition: box-shadow 0.3s, background 0.3s, border 0.3s, transform 0.2s;
  padding: 2.5rem 2.2rem 2rem;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 350px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeSlideIn 0.8s ease forwards;
  opacity: 0;
  transform: translateY(30px);
  box-shadow: 0 18px 45px rgba(33,118,174,0.18);
  transform: scale(1.025);
  border-color: #b6d0f7;
}

/* === Animation on load === */
@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Logo === */
.login-logo {
  width: 60px;
  margin-bottom: 18px;
  border-radius: 12px;
}

/* === Judul/Title === */
.login-container h2 {
  color: #2176ae;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === Form === */
form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  color: #2176ae;
  font-weight: 600;
}

/* === Input === */
input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 0.65rem 0rem;
  margin-bottom: 15px;
  border: 1.5px solid #d6eaff;
  border-radius: 8px;
  background-color: #f6fbff;
  font-size: 1rem;
  color: #222;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.23s;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2176ae;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(33,118,174,0.09);
}

/* === Button === */
button[type="submit"],
.login-container button {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(90deg, #2176ae 60%, #5ea9dd 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s, transform 0.1s, background-color 0.3s ease, box-shadow 0.22s;
  box-shadow: 0 2px 8px rgba(33,118,174,0.06);
}

button[type="submit"]:hover,
.login-container button:hover {
  background: linear-gradient(90deg, #16548a 60%, #298acb 100%);
  transform: translateY(-2px) scale(1.02);
}

/* === Responsive === */
@media (max-width: 480px) {
  .login-container {
    padding: 2rem 0.5rem 2rem 0.5rem;
    min-width: 95vw;
  }
  .login-container h2 {
    font-size: 1.2rem;
  }
}

/* === Loader (lingkaran putar kecil) === */
.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid #fff;
  border-top: 2.5px solid #2176ae;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
  box-shadow: 0 0 8px #2176ae33;
  background: linear-gradient(135deg, #e3eafc 0%, #f6fbff 100%);
}

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

/* === Error message === */
.error-message {
  background: #ffeaea;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: center;
  display: none;
  animation: fadeIn 0.4s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
