/* ===== E-TEST Benchmark — AdminLTE Theme ===== */

:root {
  --bm-blue: #0d6efd;
  --bm-primary: #00659f;
  --bm-primary-dark: #004d7c;
  --sidebar-bg: #1e293b;
  --body-bg: #f4f6f9;
  --border-color: #dee2e6;
  --radius: 0.5rem;
}

/* ===== Global ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  -webkit-font-smoothing: antialiased;
}

/* ===== Brand Colors ===== */
.bg-primary { background-color: var(--bm-primary) !important; }
.navbar-primary { background-color: var(--bm-primary) !important; }

/* ===== Sidebar Branding ===== */
.app-sidebar .sidebar-brand .brand-link .brand-image {
  max-height: 28px;
  margin-left: 0;
}

/* ===== Sidebar Scroll ===== */
.app-sidebar .sidebar-wrapper {
  overflow-y: auto;
  height: calc(100vh - 3.5rem);
}

/* ===== Sidebar Headers ===== */
.nav-header {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45) !important;
}

/* ===== Card ===== */
.card-page {
  box-shadow: 0 0 20px rgba(0,0,0,0.04);
  border-radius: var(--radius);
}

/* ===== Toolbar Buttons ===== */
.toolbar-btn { display: none; }

/* ===== Loading Overlay ===== */
#loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 999999;
  backdrop-filter: blur(2px);
}
#loading-overlay .loading-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#loading-overlay .loading-content img {
  height: 120px;
  width: 120px;
}
#loading-overlay .loading-content .loading-message {
  color: #fff;
  text-align: center;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== Tabulator Overrides ===== */
.tabulator {
  font-size: 0.85rem;
  border: none !important;
  background: transparent !important;
  color: #212529;
  width: 100% !important;
}
.tabulator .tabulator-header {
  border-bottom: 2px solid var(--border-color);
  background: #f8f9fa;
  font-weight: 600;
  font-size: 0.8rem;
  color: #495057;
}
.tabulator .tabulator-header .tabulator-col {
  background: transparent !important;
  border-right: 1px solid var(--border-color);
}
.tabulator .tabulator-row {
  border-bottom: 1px solid #f1f3f5;
  color: #212529;
}
.tabulator .tabulator-row.tabulator-selectable:hover {
  background: #f8f9fa !important;
  cursor: pointer;
}
.tabulator .tabulator-row.tabulator-selected {
  background: #e7f1ff !important;
}
.tabulator .tabulator-footer {
  border-top: 1px solid var(--border-color);
  background: transparent;
  padding: 0.5rem 0;
}
.tabulator .tabulator-footer .tabulator-page {
  border-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  margin: 0 2px;
  color: #6c757d;
  background: #fff;
}
.tabulator .tabulator-footer .tabulator-page.active {
  background: var(--bm-primary) !important;
  color: #fff !important;
  border-color: var(--bm-primary) !important;
}
.tabulator .tabulator-footer .tabulator-page:disabled {
  opacity: 0.4;
}

.tabulator-paginator .tabulator-page {
  border-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  margin: 0 2px;
  color: #6c757d;
  background: #fff;
}
.tabulator-paginator .tabulator-page.active {
  background: var(--bm-primary) !important;
  color: #fff !important;
  border-color: var(--bm-primary) !important;
}
.tabulator-paginator .tabulator-page:disabled {
  opacity: 0.4;
}

/* ===== Tom Select Overrides ===== */
.ts-wrapper .ts-control {
  border-color: var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  min-height: 38px;
}

/* ===== Toast Container ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-custom {
  min-width: 320px;
  padding: 14px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  animation: toastSlideIn 0.35s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.toast-custom.success { background: #198754; }
.toast-custom.warning { background: #fd7e14; }
.toast-custom.error { background: #dc3545; }
.toast-custom.info { background: #0d6efd; }
@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Scroll to Top ===== */
.scroll-to-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bm-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.scroll-to-top:hover {
  background: var(--bm-primary-dark);
  transform: translateY(-2px);
  color: #fff;
}

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 2.5rem 2rem;
}

/* ===== Filter Panel ===== */
.filter-panel {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

/* ===== Modal Overrides ===== */
.modal-header {
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
}
.modal-footer {
  border-top: 1px solid var(--border-color);
}

/* ===== Form ===== */
.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.required {
  color: #dc3545;
  margin-right: 2px;
}

/* ===== Badge ===== */
.badge-pass { background: #d1e7dd; color: #0f5132; }
.badge-fail { background: #f8d7da; color: #842029; }
.badge-retake { background: #fff3cd; color: #664d03; }
.badge-pending { background: #cff4fc; color: #055160; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .toolbar-btn .fas { font-size: 1rem; }
  .login-card { max-width: 90%; padding: 1.5rem; }
}


/* Form validation */
.form-control.is-invalid { border-color: #dc3545; box-shadow: 0 0 0 0.2rem rgba(220,53,69,.15); }
.form-control.is-invalid:focus { border-color: #dc3545; box-shadow: 0 0 0 0.2rem rgba(220,53,69,.25); }
/* Assign Employees - Dual List Picker */
#editemployee2 .modal-content { border: none; border-radius: 12px; }
#editemployee2 .modal-header { background: #00659f; color: #fff; border-radius: 12px 12px 0 0; }
#editemployee2 .modal-header .btn-close { filter: brightness(0) invert(1); }
#editemployee2 table { border-collapse: collapse; width: 100%; }
#editemployee2 select[multiple] { 
    border: 1px solid #dee2e6; border-radius: 8px; padding: 8px;
    font-size: 0.85rem; background: #f8f9fa; min-height: 250px;
}
#editemployee2 select[multiple] option { padding: 6px 10px; border-radius: 4px; margin: 2px 0; }
#editemployee2 input[type=button] { 
    border-radius: 6px; font-weight: bold; font-size: 1.1rem; padding: 4px 12px; 
    margin: 3px 0; transition: all 0.2s;
}
#editemployee2 input[type=button]:hover { transform: scale(1.05); }
#editemployee2 #btnRight14, #editemployee2 #btnRightall14 { background: #00659f; color: #fff; border-color: #00659f; }
#editemployee2 #btnLeft14, #editemployee2 #btnLeftall14 { background: #6c757d; color: #fff; border-color: #6c757d; }
#editemployee2 #employee445 { max-width: 400px; border-radius: 8px; }
#editemployee2 input[type=text] { border-radius: 8px; }
/* ===== Add Exam Modal ===== */
#adddata .modal-content { border: none; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
#adddata .modal-header { background: #00659f; color: #fff; border-radius: 14px 14px 0 0; padding: 1rem 1.5rem; }
#adddata .modal-header .btn-close { filter: brightness(0) invert(1); }
#adddata .modaltitle { font-size: 1.1rem; font-weight: 600; }
#adddata .modal-body table { width: 100%; }
#adddata .modal-body td { padding: 4px 0; vertical-align: middle; }
#adddata .modal-body td:first-child { width: 160px; padding-right: 12px; text-align: right; }
#adddata .modallbl { font-size: 0.9rem; font-weight: 500; color: #333; }
#adddata .required { color: #dc3545 !important; margin-right: 2px; }
#adddata .modal-body input.form-control, 
#adddata .modal-body select.form-control { 
    border-radius: 8px; border: 1px solid #dee2e6; padding: 8px 12px; 
    transition: all 0.2s; font-size: 0.9rem;
}
#adddata .modal-body input.form-control:focus, 
#adddata .modal-body select.form-control:focus { 
    border-color: #00659f; box-shadow: 0 0 0 0.2rem rgba(0,101,159,0.15); 
}
#adddata .modal-footer { border-top: 1px solid #f1f3f5; padding: 1rem 1.5rem; }
#adddata .modal-footer .btn-primary { background: #00659f; border-color: #00659f; border-radius: 8px; padding: 8px 20px; }
#adddata .modal-footer .btn-secondary { border-radius: 8px; padding: 8px 20px; }