/* Styles for login page with topbar and background */
* { box-sizing: border-box; }
html,body { height: 100%; }
body.login-page {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f2f2f2;
  background-image: url('media/bacground.jpeg');
  background-repeat: no-repeat;
  background-position: center top;
  /* Sesuaikan lebar gambar ke 100% dan pertahankan rasio aspek */
  background-size: 100% auto;
  min-height: 100vh;
}
.topbar {
  width: 100%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
}
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display:flex; align-items:center; }
.topbar-logo { height:44px; object-fit:contain; }

.login-main { padding-top: 80px; display:flex; align-items:center; justify-content:center; min-height: calc(100vh - 80px); }
.login-container {
  /* background with ~75% transparency (25% opacity) so page background is visible */
  background: rgba(255,255,255,0.05);
  width: 440px;
  max-width: 95%;
  padding: 28px;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  /* subtle blur behind the panel for better readability */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.35);
}
.login-container.single { width: 360px; }
.form-area { padding: 8px 20px; display:flex; align-items:center; }
.login-form { width:100%; max-width:320px; }
.login-form.centered { margin: 0; }

/* Center the heading and submit button inside the centered form */
.login-form.centered h2 { text-align: center; margin-bottom: 14px; }
.login-form.centered .btn { display: block; margin: 12px auto 0; }
.login-form h2 { margin: 0 0 12px; }
.field { display:block; margin-bottom:12px; font-size:14px; }
.field input { width:100%; padding:10px; margin-top:6px; border:1px solid rgba(0,0,0,0.12); border-radius:4px; background:#fff; }
.btn { display:inline-block; background:#1976d2; color:#fff; padding:10px 16px; border:none; border-radius:4px; cursor:pointer; }
.btn:hover { background:#155fa0; }
.error { background:#ffdddd; color:#900; padding:8px; border-radius:4px; margin-bottom:12px; }
.example-area { padding:8px; display:flex; align-items:center; justify-content:center; }
.example-image { max-width:100%; height:auto; display:block; }

@media (max-width:800px) {
  .login-container { grid-template-columns: 1fr; }
  .example-area { order: -1; }
  .topbar-inner { justify-content:center; }
}

/* Dashboard chart constraints: prevent charts from growing indefinitely */
.card { overflow: hidden; }
.card canvas { width: 100% !important; height: 300px !important; display: block; }

/* Ensure gauge canvas has a baseline height if needed */
#gaugeChart { width:100%; height:200px; display:block; }

