/* ==========================================================
   1. STYLE ASLI DASHBOARD (JANGAN DIHAPUS)
   ========================================================== */

.recruitment-dashboard-wrapper {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

.top-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.client-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 100%;
  overflow-x: auto;
}

.client-select {
  flex: 1;
  height: 44px !important;
  border: 1.5px solid #c7cdd3;
  border-radius: 10px;
  background: #ffffff;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  font-size: 15px;
  color: #2d2d2d;
  padding: 0 12px;
  padding-left: 38px;
  line-height: 44px;
  background-position-y: center;
  transition: 0.25s ease;
  cursor: pointer;
}

.client-select:hover,
.client-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18);
  outline: none;
}

.client-select {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23999" class="bi bi-search" viewBox="0 0 20 20"><path d="M11.742 10.344a6.5 6.5 0 10-1.397 1.398h-.001l3.85 3.85a1 1 0 001.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 110-10 5 5 0 010 10z"/></svg>');
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: 10px center;
}

/* Overwrite background image for dropdown arrow logic */
.client-select {
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="%23666" viewBox="0 0 30 30"><path d="M1.5 5.5l6 6 6-6"/></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23999" class="bi bi-search" viewBox="0 0 30 30"><path d="M11.742 10.344a6.5 6.5 0 10-1.397 1.398h-.001l3.85 3.85a1 1 0 001.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 110-10 5 5 0 010 10z"/></svg>');

  background-position: calc(100% - 30px) 150px, 10px center;
  background-size: 20px 20px, 18px 18px;
  background-repeat: no-repeat;
}

.client-select-wrapper {
  position: relative;
}

.dropdown-spinner-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  pointer-events: none;
  font-size: 14px;
  color: #555;
  z-index: 10;
}

.small-spinner {
  width: 18px; height: 18px;
  border: 3px solid #ccc;
  border-top-color: #0073e6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.select2-container--classic .select2-selection--single {
  height: 44px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.btn-view {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0px;
  padding: 0 18px;
  background-color: #0073e6;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.1s ease;
}
.btn-view:hover {
  background-color: #005bb5;
  transform: scale(1.05);
}

.version-btn {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  margin: 0 6px 10px 0;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.25s ease, transform 0.1s ease;
}
.version-btn:hover {
  background-color: #a30606;
  transform: scale(1.05);
}

.client-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.info-box {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  flex: 1 1 48%;
  padding: 15px;
}
.info-box table { width: 100%; border-collapse: collapse; }
.info-box td { padding: 6px 10px; border-bottom: 1px solid #eee; vertical-align: top; font-size: 13px; }
.info-box strong { color: #0047A0; }

.full-width-box {
  flex-basis: 100%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 15px;
}

#pdfSpinnerOverlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.45);
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#pdfSpinnerOverlay.active { display: flex; opacity: 1; }

.pdf-spinner-container {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: #fff;
}

.pdf-spinner {
  border: 6px solid rgba(255,255,255,0.2);
  border-top: 6px solid #00bcd4;
  border-radius: 50%;
  width: 60px; height: 60px;
  animation: spin 1s linear infinite;
}

.footer-actions {
  display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap;
}

.action-btn {
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.25s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}
.action-btn:hover { background: #ff8c00; transform: scale(1.05); }

.candidate-table {
  width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px;
}
.candidate-table th, .candidate-table td { border: 1px solid #ddd; padding: 8px; text-align: center; }
.candidate-table-container {
  background: #fff; padding: 16px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); overflow-x: auto;
}
.candidate-table th { background: #020a13; color: #fff; }

.mini-btn {
  background: #585e63;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.25s ease, transform 0.1s ease;
}
.mini-btn:hover { background: #ff8c00; transform: scale(1.05); }

.candidate-table tr:nth-child(even) { background: #f2f8ff; }
.candidate-table tr:hover { background: #e9f2ff; }

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 99999;
}
.modal-box {
  background: #fff; padding: 20px 25px; border-radius: 10px; width: 380px; max-width: 90%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25); font-size: 13px; color: #333; line-height: 1.5;
  position: relative; transform: scale(0.9); opacity: 0; transition: all 0.2s ease-in-out;
  font-family: "Roboto", "Arial", sans-serif;
}
.modal-overlay[style*="display: flex"] .modal-box { transform: scale(1); opacity: 1; }
.modal-box pre {
  background: #f6f6f6; padding: 10px; border-radius: 6px; white-space: pre-wrap; word-wrap: break-word;
  user-select: text; font-family: "Roboto", "Arial", sans-serif; font-size: 13px; color: #333;
}
.modal-close {
  position: absolute; top: 8px; right: 12px; font-size: 16px; color: #999; cursor: pointer;
}
.modal-close:hover { color: #000; }

#candidateTableBox { margin-top: 20px; margin-bottom: 40px; }

.search-btn {
  height: 42px; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0 18px; background-color: #0073e6; color: #fff; border: none;
  border-radius: 8px; cursor: pointer; transition: background-color 0.25s ease, transform 0.1s ease;
}
.search-btn:hover { background: #ff8c00; transform: scale(1.05); }

.pagination-btn {
  background: #f8f9fa; border: 1px solid #ccc; color: #333; border-radius: 6px; padding: 6px 10px;
  cursor: pointer; transition: background-color 0.2s ease, transform 0.1s ease;
}
.pagination-btn:hover:not(:disabled) { background: #0073e6; color: #fff; transform: scale(1.05); }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.select2-container--classic .select2-selection__arrow {
  height: 42px !important; display: flex !important; align-items: center !important; justify-content: center;
}
.select2-container--classic .select2-selection__arrow b {
  border-width: 8px 6px 0 6px !important;
}


/* ==========================================================
   2. STYLE BARU: RECRUITMENT LIST (BOX GRID)
   ========================================================== */

/* Container Utama Grid */
.recruitment-list-container {
    display: grid;
    /* Grid otomatis mengisi kolom, minimal lebar 280px */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Kartu Box */
.recruitment-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Bayangan halus */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Efek Hover pada Kartu */
.recruitment-card:hover {
    transform: translateY(-5px); /* Naik sedikit saat hover */
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #0073e6;
}

/* Header Kartu (Berisi Kode Batch) */
.rec-card-header {
    margin-bottom: 12px;
}

/* Label Kode Batch */
.rec-code {
    background: #eef4ff;
    color: #0047A0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Judul Recruitment */
.rec-title {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Bagian Tombol di Bawah Kartu */
.rec-actions {
    margin-top: auto; /* Mendorong tombol ke bawah jika konten tidak rata */
}

/* Tombol "View Dashboard" */
.btn-view-dashboard {
    display: block;
    width: 100%;
    text-align: center;
    background: #0073e6;
    color: #fff;
    padding: 10px 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.2s ease;
    box-sizing: border-box; /* Pastikan padding tidak menambah lebar */
}

.btn-view-dashboard:hover {
    background: #005bb5;
    color: #fff;
    text-decoration: none;
}

/* Tombol Back di Halaman Detail */
.btn-back {
    transition: opacity 0.2s;
}
.btn-back:hover {
    text-decoration: underline;
    opacity: 0.8;
}