
/* =========================================================
   Tema eKalendar - Custom Styles
   Fokus: Kontras, Kebolehaksesan, & Keserasian AdminLTE 3/BS4
   ========================================================= */

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: url('../images/desk_calendar.jpg') center/cover fixed no-repeat;
  color: #fff;
}

/* Overlay kaca lembut di atas imej latar (magenta -> cyan) */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 0, 255, 0.25),   /* magenta lembut */
    rgba(0, 255, 255, 0.35)    /* cyan lembut */
  );
  z-index: -1; /* kekalkan di belakang kandungan */
}

/* ==========================
   FLOATING ERROR DIALOG BOX
   ========================== */
.error-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  min-width: 280px;
  max-width: 350px;
  padding: 15px 20px;
  border-radius: 12px;
  background: rgba(220, 53, 69, 0.75); /* merah alert */
  backdrop-filter: blur(6px);
  box-shadow: 0 0 18px rgba(0, 150, 255, 0.35);
  color: #fff;
  font-weight: 500;
  z-index: 9999;
  animation: fadeIn 0.4s ease-out;
  border-left: 4px solid #00c8ff;
}
.error-box .close-btn {
  float: right;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
  background: transparent;
  border: none;
  line-height: 1;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==============
   LOGIN BOX @SB
   ============== */
.login-box {
  position: relative; /* ikuti aliran sidebar */
  width: 100%;
  /*background: rgba(15, 35, 70, 0.55);*/
  background: rgba(10, 10, 10, 0.01);
  padding: 20px;
  border-radius: 12px;
  /*box-shadow: 0 0 15px rgba(0, 255, 255, 0.25);*/
  z-index: 10;
}
.login-box h3 {
  margin-top: 0;
  color: #00ccff;
  text-align: center;
}
.login-box input {
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(214, 232, 255, 0.9);
  color: #000;
}
.login-box button {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border: none; border-radius: 6px;
  background: linear-gradient(to bottom, #b3ecff, #66d9ff);
  color: #003344; font-weight: bold; cursor: pointer;
  transition: 0.25s ease-in-out;
}
.login-box button:hover {
  background: linear-gradient(to bottom, #c8f2ff, #7fe2ff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.45);
}

/* ===========
   CALENDAR UI
   =========== */
.calendar-container {
  position: relative;
  width: 100%;
  padding: 10px;
  overflow-y: auto;
  max-height: calc(100vh);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}
.calendar-container h2 {
  position: relative;
  text-align: center;
  color: #0b3d91; /* biru gelap untuk kontras */
  text-shadow: 0 0 1px #00ccff;
}

/* Jadual custom (jika digunakan di tempat lain) */
table.calendar {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(255, 255, 255, 0.3);
}
.calendar th {
  background-color: rgba(59, 85, 122, 0.6);
  color: #d7f0ff;
  padding: 12px;
  text-align: center;
}
.calendar td {
  padding: 15px;
  text-align: center;
  vertical-align: top;
  color: #000;
  background: rgba(255, 255, 255, 0.1);
}
.calendar td div.cuti-am,
.calendar td div.cuti-negeri,
.calendar td div.cuti-organisasi {
  margin-top: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.85em; /* sedikit lebih jelas */
}

/* Kategori Cuti */
.cuti-am { background: rgba(0, 102, 204, 0.2) !important; color: #000 !important; }
.cuti-negeri { background: rgba(0, 153, 102, 0.55) !important; color: #fff !important; }
.cuti-organisasi { background: rgba(102, 0, 204, 0.55) !important; color: #fff !important; }

/* Navigasi kiri/kanan custom (jika digunakan) */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px; height: 35px;
  border-radius: 50%;
  text-align: center;
  font-size: 1.5em;
  color: #003344;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}
.nav-btn.left { left: -1px; }
.nav-btn.right { right: -1px; }

/* Butang Hari Ini (tambahan) */
.btn-today {
  background-color: #f7e38d; /* kuning lembut */
  color: #000;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.btn-today:hover {
  background-color: #d6c25b; /* kuning lebih gelap */
  color: #ffffff;
}

/* =================
   Sidebar & Kad UI
   ================= */
.main-sidebar {
  background: rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  min-height: 100vh;
}
.main-sidebar .nav-link { color: #003344; }
.main-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.3);
  color: #000;
}
.log-masuk { color: #0b3d91; }
.main-sidebar .forgot-link {
  color: #003366 !important;
  font-weight: 600;
}
.main-sidebar .forgot-link:hover {
  color: #3399ff !important;
}

/* Kad kaca (glass) */
.card-glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #000;
}
.card-glass .card-header {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.card-glass .card-body {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 12px 12px;
}

/* Latar kandungan */
.content-wrapper {
  background: rgba(255, 255, 255, 0.01) !important;
}

/* Kecilkan skrol pada paparan kecil */
@media (max-width: 768px) {
  .calendar-container {
    max-height: none;
    padding: 8px;
  }
  .login-box {
    padding: 16px;
  }
}
