/* ===== Layout dasar ===== */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  /* background: #f7f9fc; */
}

/* Nonaktifkan scroll saat sidebar terbuka di mobile */
.no-scroll {
  overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  /* background: linear-gradient(135deg, #4facfe, #00f2fe); */
  background: linear-gradient(135deg, #2374bb, #30c3ca);
  color: white;
  padding: 1.5em 1em;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  transition: transform 0.3s ease;
  transform: translateX(0); /* default desktop */
  z-index: 1100;
}

.logo {
  font-size: 1.5em;
  margin-bottom: 2em;
  font-weight: bold;
  text-align: center;
}

.menu { list-style: none; padding: 0; margin: 0; }
.menu li { margin: 1em 0; }

.menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 0.6em 1em;
  border-radius: 8px;
  transition: 0.3s;
}
.menu a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

/* Dropdown di sidebar */
.menu li.has-dropdown {
  position: relative;
}

.menu li.has-dropdown > a {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu li.has-dropdown > a::after {
  content: "▸";
  font-size: 0.8em;
  transition: transform 0.3s;
}

.menu li.has-dropdown.open > a::after {
  transform: rotate(90deg);
}

.submenu {
  list-style: none;
  margin: 0.5em 0 0 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.submenu li {
  margin: 0;
}

.submenu a {
  display: block;
  padding: 0.6em 1em 0.6em 2em; /* indentasi */
  font-size: 0.9em;
  color: #e3f2fd;
  text-decoration: none;
  transition: 0.3s;
}

.submenu a:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ===== Backdrop ===== */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1050;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 2em;
  transition: margin-left 0.3s;
}

/* Toggle button (muncul di mobile) */
.toggle-btn {
  display: none;
  background: #4facfe;
  border: none;
  color: white;
  font-size: 20px;
  padding: 0.6em 1em;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 1em;
  box-shadow: 0px 6px 15px rgba(0,0,0,0.1);
  z-index: 1200;
  position: relative;
}

/* ===== Header & Breadcrumb ===== */
.content-header { margin-bottom: 1.5em; }
.page-title {
  font-size: 1.8em;
  font-weight: bold;
  margin: 0;
  color: #333;
}
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.5em; font-size: 14px; margin-top: 0.4em;
}
.breadcrumb a {
  color: #4facfe; text-decoration: none; font-weight: 500;
  padding: 0.3em 0.6em; border-radius: 6px;
  background: rgba(79, 172, 254, 0.1);
  transition: 0.3s;
}
.breadcrumb a:hover { background: rgba(79, 172, 254, 0.2); }
.breadcrumb .separator { color: #888; }
.breadcrumb .active {
  color: #333; font-weight: 600;
  padding: 0.3em 0.6em; border-radius: 6px; background: #e9f5ff;
}

/* ===== Card ===== */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin: 0.5em auto;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
.card:hover {
  /* transform: translateY(-3px); */
  box-shadow: 0px 10px 20px rgba(0,0,0,0.15);
}

/* ===== Responsive rules ===== */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1.2em; }
  .toggle-btn { display: inline-block; }
  .page-title { font-size: 1.5em; }
  .breadcrumb { font-size: 12px; }
  .card { padding: 1.2em; }
}
@media (max-width: 576px) {
  .page-title { font-size: 1.3em; }
}

@media (min-width: 768px) {
  .card {
    max-width: 90%; /* di tablet/desktop lebih enak dilihat */
  }
}

@media (min-width: 1200px) {
  .card {
    max-width: 1100px; /* batas maksimal di layar besar */
  }
}

/* ===== Table ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5em 0; /* lebih rapat */
  font-size: 13px; /* sedikit lebih kecil */
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.05);
}
thead {
  /* background: linear-gradient(135deg, #4facfe, #00f2fe); */
  background: linear-gradient(135deg, #2374bb, #30c3ca);
  color: white;
}
thead th {
  padding: 0.6em;  /* lebih rapat */
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
tbody td { 
  padding: 0.6em;  /* rapat */
  border-top: 1px solid #eee; 
}
tbody tr:hover { background: #dadada; }

.table-responsive {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Buttons (lebih minimalis) ===== */
.btn,
router-link.btn,
button {
  display: inline-block;
  padding: 0.35em 0.75em; /* lebih kecil */
  border-radius: 4px;     /* lebih halus */
  font-size: 12px;
  font-weight: 500; 
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.25s ease, transform 0.15s ease;
}
.btn:hover,
router-link.btn:hover,
button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Variasi warna (lebih soft) */
.primary { background: #007bff; color: #fff; }
.primary:hover { background: #0056b3; }

.secondary { background: #6c757d; color: #fff; }
.secondary:hover { background: #545b62; }

.success { background: #28a745; color: #fff; }
.success:hover { background: #1e7e34; }

.danger { background: #dc3545; color: #fff; }
.danger:hover { background: #c82333; }

.warning { background: #ffc107; color: #212529; }
.warning:hover { background: #e0a800; }

.info { background: #17a2b8; color: #fff; }
.info:hover { background: #117a8b; }

/* ===== Button Group ===== */
.button-group {
  display: inline-flex;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0px 1px 4px rgba(0,0,0,0.08);
}
.button-group > * {
  margin: 0;
  border-radius: 0;
  font-size: 12px;
  padding: 0.35em 0.65em; /* minimalis */
}
.button-group > * + * {
  border-left: 1px solid rgba(0,0,0,0.12);
}
.button-group > *:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.button-group > *:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}


/* ===== Form ===== */
/* ===== Form Container ===== */

/* .form-container { */
  /* max-width: 500px;
  margin: 2em auto;
  padding: 2em;
  background: #fff; */
  /* border-radius: 12px; */
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.08); */
/* } */
.form-container {
  /* max-width: 600px; */
  margin: 1em auto;     /* center horizontal */
  padding: 1em;
  /* background: #fff; */
  border-radius: 12px;
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.08); */
}


/* ===== Label ===== */
label {
  display: block;
  margin-bottom: 0.4em;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

/* ===== Input, Select, Textarea ===== */
/* Samakan semua elemen form */
input,
select,
textarea {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;  /* penting biar sejajar */
  background-color: #fff;
  margin-bottom: 1em;
}

/* Biar select tidak beda tinggi */
select {
  width: 100%;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #fff;
}



/* Hover & Focus */
input:focus,
select:focus,
textarea:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}


/* Pagination */
.search-box {
  margin: 0.2em 0;
}

.search-box input {
  padding: 0.5em;
  width: 300px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1em;
  gap: 1em;
}

.pagination button {
  padding: 0.4em 0.8em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-btn {
  padding: 5px 10px;
  border: 1px solid #aaa;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.page-btn.active {
  background: #007bff;
  color: #fff;
  font-weight: bold;
}
/*  */



/* Grid Form */
.form-grid {
  display: flex;
  gap: 2em;
  margin-bottom: 1.5em;
}

/* Kolom */
.form-column {
  flex: 1; /* masing2 ambil setengah */
}

/* Responsif: jadi 1 kolom di HP */
@media (max-width: 768px) {
  .form-grid {
    flex-direction: column;
  }
}


/* Radio Group */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 15px 0;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding-left: 28px; /* ruang untuk lingkaran */
  font-size: 14px;
  user-select: none;
  color: #333;
}

/* Hide default radio */
.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Custom Circle */
.radio-checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: #f4f6f9;
  border: 2px solid #007bff;
  border-radius: 50%;
  transition: all 0.3s;
}

/* Saat dicentang */
.radio-option input[type="radio"]:checked ~ .radio-checkmark {
  background-color: #007bff;
  border-color: #007bff;
}

/* Lingkaran kecil di dalam */
.radio-checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.radio-option input[type="radio"]:checked ~ .radio-checkmark::after {
  display: block;
}

.radio-option .radio-checkmark::after {
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}




.swal2-popup {
  font-family: 'Segoe UI', Arial, sans-serif !important;
  font-size: 16px;
}


/* === Vue Select Override === */
.v-select {
  width: 100%;
  margin-bottom: 1em;
  font-size: 0.9rem;
}

.v-select .vs__dropdown-toggle {
  padding: 0.6em;             /* sama dengan input */
  border: 1px solid #ddd;     /* sama border */
  border-radius: 6px;         /* sama radius */
  background-color: #fff;
  font-size: 0.9rem;
  min-height: unset;          /* hapus tinggi default */
  box-sizing: border-box;
}

.v-select .vs__selected,
.v-select .vs__search {
  margin: 0;
  padding: 0;
}

.v-select .vs__search::placeholder {
  color: #888;
  font-size: 0.9rem;
}

.v-select .vs__open-indicator {
  fill: #555; /* warna panah */
}


/* Toolbar: flex layout */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-buttons button {
  margin-right: 10px;
}

.search-box input {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.header-bar {
  display: flex;
  align-items: center;   /* sejajarkan vertikal */
  gap: 10px;             /* jarak antar elemen */
  margin-bottom: 15px;   /* kasih jarak bawah biar rapi */
}

.header-bar h3 {
  margin: 0;             /* buang margin default */
}


/* Date picker */
.date-filter {
  position: relative;
  display: inline-block;
}

.date-input {
  padding: 6px 30px 6px 10px; /* ruang kanan untuk tombol clear */
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 200px;
}

.clear-btn {
  position: absolute;
  right: 8px;
  top: 30%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
  font-size: 14px;
  user-select: none;
}

.clear-btn:hover {
  color: #e53935;
}


/* Switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  margin-left: 10px;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider background */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 34px;
}

/* Slider circle */
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

/* Saat checkbox dicentang */
.switch input:checked + .slider {
  background-color: #4caf50;
}

.switch input:checked + .slider:before {
  transform: translateX(24px);
}

/* Label di samping */
.checkbox-label {
  font-weight: 500;
  margin-right: 10px;
}
