/* ===== Umum ===== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: hwb(0 100% 0%);
  }
  
  /* Header */
  header {
    background-color: #f2250e;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    position: relative; /* supaya logout bisa di-absolute */
  }
  
  /* Container */
  .container {
    max-width: 400px;
    margin: 20px auto;
    padding: 15px;
  }
  
  /* Input & Select */
  input, select {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
  }
  
  /* Button */
  .btn {
    background-color: #0ff11a;
    border: none;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
  }
  .btn:hover { background-color: #0ff11a; }
  
  /* Hasil */
  .result {
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 15px;
  }
  .item { display: flex; justify-content: space-between; margin: 5px 0; }
  .total { border-top: 1px solid #ccc; margin-top: 10px; padding-top: 10px; font-weight: bold; font-size: 18px; }
  
  /* Splash */
  #splash {
    text-align: center;
    border: 2px solid black;
    padding: 40px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    animation: fadeIn 3s ease-in-out;
  }
  #splash h1 { margin: 10px 0; font-size: 22px; }
  @keyframes fadeIn { from { opacity:0; transform:scale(0.9);} to {opacity:1; transform:scale(1);} }
  
  /* Hidden Form */
  .formHidden { display: none; }
  
  /* Saldo Box */
  .saldoBox {
    margin-top: 15px;
    padding: 10px;
    background: #eafaf1;
    border: 1px solid #2ecc71;
    border-radius: 8px;
    font-size: 14px;
  }
  
  /* Rekap */
  .rekapBox {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
  }
  .rekapBox h3 { margin-bottom: 10px; font-size: 18px; color: #333; }
  #rekapTable { width: 100%; border-collapse: collapse; }
  #rekapTable th, #rekapTable td { border: 1px solid #ccc; padding: 8px; text-align: center; font-size: 14px; }
  #rekapTable th { background: #eee; font-weight: bold; }
  
  /* Reset Button */
  .btnReset {
    margin-top: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
  }
  .btnReset:hover { background: #c0392b; }
  
  /* Action Buttons */
  .btnAction {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin: 2px;
    font-size: 12px;
  }
  .btnAction.delete { background: #e67e22; }
  .btnAction:hover { opacity: 0.8; }
  
  /* Login */
  .loginBox {
    max-width: 400px;
    margin: 40px auto;
    background: #e63d3d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-align: center;
  }
  .loginBox h2 { margin-bottom: 15px; color: #333; }
  .error { color: red; margin-top: 10px; font-size: 14px; }
  .input_box { width: 90%; }
  .header_title { margin-top: 195px; }
  
  /* Background Login */
  body.loginpage {
    background: url("image/pabrikyakult.jpg") no-repeat center center fixed;
    background-size: cover;
  }
  

  .input_yo {
    background-color: #ff0000;
  }

  .input_ym {
    background-color: #f1b10f;
  }

  .input_yt {
    background-color: #0000ff;
  }


  .btnAction.delete {
    background: #e74c3c;
  }
  
  .btnAction.delete:hover {
    background: #c0392b;
  }
  
  /* Splash Screen Tengah */
#splash {
  position: fixed;
  top: 125px; 
  left: 300px;
  width: 50%;
  height: 50%;
  display: flex;               /* flex container */
  justify-content: center;     /* horizontal center */
  align-items: center;         /* vertical center */
  flex-direction: column;      /* stack h1 secara vertikal */
  background-color: rgba(255, 226, 221, 0.95); /* warna merah semi transparan */
  color: rgb(0, 0, 0);
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  z-index: 9999;
  animation: fadeIn 1s ease-in-out;
  border-radius: 12px;        /* opsional, jika ingin box lebih lembut */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#splash h1 {
  margin: 10px 0;
}

/* Animasi fade in/out */
@keyframes fadeIn { 
  from { opacity:0; transform: scale(0.9); } 
  to { opacity:1; transform: scale(1); } 
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  margin-left: 20px;   /* kasih jarak biar sejajar dengan tombol */
  gap: 10px;
}

.form-row input {
  flex: 1;
}

.label-info {
  font-size: 14px;
  font-weight: bold;
}

.label-info.ori {
  color: #e63946; /* merah Yakult Ori */
}

.label-info.mangga {
  color: #f4a261; /* oranye Yakult Mangga */
}

.label-info.light {
  color: #2a9d8f; /* hijau Yakult Light */
}

.form-row .label-info {
  width: 120px;        /* lebar label tetap */
  text-align: left;    /* sejajar kiri */
  font-size: 14px;
  font-weight: bold;
}


.form-row input {
  width: 200px;        /* ukuran input sama rata */
  padding: 5px 10px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Saldo Awal: tiga kolom sejajar */
.saldoAwalBox {
  border: 2px solid #444;
  border-radius: 8px;
  padding: 10px;
  background: #f7f7f7;
  width: 100%;       /* menyesuaikan container (jika mau sempit ubah ke 180px) */
  box-sizing: border-box;
}

.saldo-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* agar responsif di layar kecil */
}

.saldo-item {
  flex: 1 1 30%;           /* tiga item sama rata, bisa menyusut */
  min-width: 90px;         /* agar tidak terlalu kecil */
  text-align: center;
  padding: 8px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e6e6e6;
}

.saldo-label {
  font-weight: 700;
  font-size: 14px;
  color: #333;
}

.saldo-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #e63946; /* warna nilai, ubah sesuai selera */
}

.saldo-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}


.btnLogout {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: #c0392b;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btnLogout:hover {
  background: #a93226;
}

/* Background khusus halaman login */
body.loginpage {
  background: url("pabrikyakult.jpg") no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}

/* Supaya form login tetap jelas */
.loginBox {
  background: rgba(255, 255, 255, 0.85);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Yakult Man animasi di Add Event */
#addEvent {
  position: relative; /* agar animasi bisa di layer bawah */
  overflow: hidden;
}

.yakultMan {
  position: absolute;
  bottom: -20px;
  left: -100px; /* mulai dari kiri luar layar */
  width: 100px;
  height: 100px;
  background: url('yakultman.jpeg') no-repeat center center;
  background-size: contain;
  animation: moveYakult 15s linear infinite;
}

/* Animasi bergerak dari kiri ke kanan */
@keyframes moveYakult {
  0% { left: -100px; }
  100% { left: 100%; }
}

/* Pastikan konten Add Event tetap di atas */
#addEvent .container, #addEvent header {
  position: relative;
  z-index: 1;
}