/* =========================
   GLOBAL
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-image: url("https://mariterbang.io/download/NiTCMQJL.jpg");
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

/* =========================
   MENU / NAVBAR
========================= */
.menu {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(20,20,20,0.75);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
}

.menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.menu ul li {
  margin: 0 15px;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 16px;
  border-radius: 6px;
  transition: 0.3s;
}

.nav-link:hover {
  background: rgba(255,255,255,0.2);
}

/* =========================
   CONTAINER
========================= */
.schedule-container {
  margin-top: 110px;
  padding: 20px;
}

.header-title {
  margin: 0 auto 20px;
  padding: 14px 28px;
  width: fit-content;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  border-radius: 12px;
  background: linear-gradient(135deg,#6a11cb,#2575fc);
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

/* =========================
   AULA / GRID RUANGAN
========================= */
.seat-layout {
  position: relative;
  width: 100%;
  height: 540px;
  margin-top: 20px;
  border-radius: 20px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.08) 0,
      rgba(255,255,255,0.08) 1px,
      transparent 1px,
      transparent 80px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.08) 0,
      rgba(255,255,255,0.08) 1px,
      transparent 1px,
      transparent 80px
    ),
    rgba(0,0,0,0.35);
  box-shadow: inset 0 0 25px rgba(0,0,0,0.6);
}

/* =========================
   SEAT / BAGAN
========================= */
.seat {
  position: absolute;
  width: 75px;
  height: 115px;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: transform .15s, box-shadow .15s;
  user-select: none;
}

.seat:hover {
  transform: scale(1.07);
  box-shadow: 0 10px 20px rgba(0,0,0,.6);
}

.seat:active {
  cursor: grabbing;
}

/* =========================
   ICON
========================= */
.seat-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  pointer-events: none;
}

/* =========================
   SELECT JABATAN (FINAL)
========================= */
.jabatan-select {
  width: 100%;
  font-size: 11px;
  font-weight: 900;
  padding: 7px 8px;
  border-radius: 8px;
  border: none;
  text-align: center;
  cursor: pointer;
  outline: none;
  background: rgba(255,255,255,0.95);
  color: #000;
  letter-spacing: .4px;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  transition: background .2s, box-shadow .2s, transform .1s;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none !important;
}

.jabatan-select::-ms-expand {
  display: none;
}

.jabatan-select:hover {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.6) inset;
}

.jabatan-select:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #00eaff, 0 4px 10px rgba(0,0,0,.3);
}

.jabatan-select:active {
  transform: scale(.97);
}

.jabatan-select:disabled {
  background: rgba(255,255,255,0.85);
  color: #000;
  cursor: not-allowed;
  box-shadow: none;
  opacity: .9;
}

/* =========================
   DELETE BUTTON (ADMIN)
========================= */
.btn-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #ff3b3b;
  color: white;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.btn-delete:hover {
  background: #ff0000;
  transform: scale(1.1);
}

/* =========================
   WARNA BERDASARKAN JABATAN
========================= */
.seat[data-jabatan="LEADER"] { background: linear-gradient(135deg,#ffd700,#ff8c00); }
.seat[data-jabatan="SPV DEPO"] { background: linear-gradient(135deg,#00c6ff,#0072ff); }
.seat[data-jabatan="SPV WD"] { background: linear-gradient(135deg,#ff416c,#ff4b2b); }
.seat[data-jabatan="DEPOSIT"] { background: linear-gradient(135deg,#38ef7d,#11998e); }
.seat[data-jabatan="WITHDRAW"] { background: linear-gradient(135deg,#f7971e,#ffd200); }
.seat[data-jabatan="WORKER EWALLET"] { background: linear-gradient(135deg,#8e2de2,#4a00e0); }
.seat[data-jabatan="WORKER ALL BANK"] { background: linear-gradient(135deg,#43cea2,#185a9d); }
.seat[data-jabatan="WORKER BANK KECIL"] { background: linear-gradient(135deg,#fc466b,#3f5efb); }

.seat[data-jabatan="WORKER EWALLET"] .jabatan-select,
.seat[data-jabatan="WORKER ALL BANK"] .jabatan-select,
.seat[data-jabatan="WORKER BANK KECIL"] .jabatan-select {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* =========================
   SEAT KOSONG (FRONT PAGE)
========================= */
.seat[data-jabatan=""] {
  display: none;
}

body.is-login .seat[data-jabatan=""] {
  display: flex;
}

/* =========================
   SEMBUNYIKAN AULA GRID KOSONG (FRONT)
========================= */
.seat-layout.empty-layout {
  display: none;
}

body.is-login .seat-layout.empty-layout {
  display: block;
}

/* =========================
   ADMIN TOOL BUTTON
========================= */
.admin-tools button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(135deg,#00eaff,#0077ff);
  color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

.admin-tools button:hover {
  transform: scale(1.05);
}

/* =========================
   HILANGKAN AREA KOSONG
========================= */
.content-wrapper, .main-content, .container-bawah {
  display: none !important;
}

/* =========================
   CENTER CARD ATAS
========================= */
.card-container {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* =========================================
   SEMBUNYIKAN TOTAL GRID KOSONG DI FRONT
========================================= */

/* Default = FRONT (BELUM LOGIN) */
.seat-layout {
  display: none !important;
}

/* Hanya tampil jika sudah login */
body.is-login .seat-layout {
  display: block !important;
}

/* Jika masih ada layout yang kosong */
.seat-layout:has(.seat[data-jabatan=""]) {
  display: none !important;
}

body.is-login .seat-layout:has(.seat[data-jabatan=""]) {
  display: block !important;
}
