/* TPS Online - Theme komponen: modal, jAlert/jConfirm/jpopup/Loading, SweetAlert, noty */

/* ================= MODAL BOOTSTRAP (#myModal, #myModal2, dll) ================= */
/* modal selalu di tengah layar secara vertikal */
.tps-theme .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100% - 60px);
}
.tps-theme .modal-dialog > .modal-content {
  width: 100%;
}
@media (max-width: 767px) {
  .tps-theme .modal-dialog {
    min-height: calc(100% - 20px);
  }
}
.tps-theme .modal-backdrop.in {
  background: var(--tps-navy);
  opacity: .55;
}
.tps-theme .modal-content {
  border: 0;
  border-radius: var(--tps-radius-xl);
  box-shadow: var(--tps-shadow-lg);
  overflow: hidden;
}
.tps-theme .modal-header {
  position: relative;
  min-height: 56px;
  padding: 16px 20px 16px 36px;
  border-bottom: 1px solid #E8F0F4;
  font-size: 16px;
  font-weight: 800;
  color: var(--tps-text);
}
.tps-theme .modal-header::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 4px;
  height: 22px;
  margin-top: -11px;
  border-radius: 2px;
  background: var(--tps-yellow);
}
.tps-theme .modal-header:empty::before {
  display: none;
}
.tps-theme .modal-header .modal-title {
  font-size: 16px;
  font-weight: 800;
}
.tps-theme .modal-header .close {
  width: 36px;
  height: 36px;
  margin: -6px -6px 0 0;
  border-radius: var(--tps-radius);
  background: #F0F4F7;
  color: var(--tps-text-2);
  opacity: 1;
  text-shadow: none;
  font-size: 22px;
  line-height: 36px;
}
.tps-theme .modal-body {
  padding: 18px 20px;
  color: var(--tps-text);
}
.tps-theme .modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #E8F0F4;
  background: var(--tps-surface-2);
}
.tps-theme .modal-footer .btn {
  min-height: 38px;
  padding-left: 18px;
  padding-right: 18px;
}

/* ================= jAlert / jConfirm / Loading (assets/js/alerts.js) ================= */
.tps-theme #popup_overlay,
.tps-theme #popup_overlay_popup,
.tps-theme #popup_overlay_popup_two {
  background: var(--tps-navy) !important;
  opacity: .5 !important;
}
.tps-theme #popup_container {
  font-family: var(--tps-font);
  font-size: 14px;
  min-width: 0;
  max-width: 420px;
  background: var(--tps-surface);
  border: 0;
  border-radius: var(--tps-radius-xl);
  box-shadow: var(--tps-shadow-lg);
  color: var(--tps-text);
  overflow: hidden;
}
.tps-theme #popup_title {
  padding: 26px 24px 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: var(--tps-font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
  color: var(--tps-primary-strong);
  cursor: default;
}
.tps-theme #popup_title::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--tps-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B7DB2' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E") no-repeat center / 28px 28px;
}
.tps-theme #popup_title,
.tps-theme #popup_content {
  min-width: 320px;
  box-sizing: border-box;
}
.tps-theme #popup_content {
  padding: 10px 24px 22px;
  margin: 0;
  background: transparent;
  color: var(--tps-text);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
}
.tps-theme #popup_content.confirm + *,
.tps-theme #popup_container .confirm #popup_message {
  color: var(--tps-text);
}
.tps-theme #popup_content.alert,
.tps-theme #popup_content.confirm,
.tps-theme #popup_content.prompt {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tps-text);
  padding: 10px 24px 22px;
  margin: 0;
}
.tps-theme #popup_content.alert::before {
  display: none;
}
.tps-theme #popup_message {
  text-align: center;
}
.tps-theme #popup_panel {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 0;
}
.tps-theme #popup_panel .btn,
.tps-theme #popup_panel input[type="button"] {
  flex: 1 1 0;
  min-height: 42px;
  border-radius: var(--tps-radius);
  font-size: 14px;
  font-weight: 700;
}
.tps-theme #popup_panel .btn i {
  display: none;
}
.tps-theme #popup_panel #popup_cancel {
  order: -1;
  background: #F0F4F7;
  border-color: #F0F4F7;
  color: var(--tps-text-2);
}
.tps-theme #popup_panel #popup_cancel:hover {
  background: #E3EDF2;
  border-color: #E3EDF2;
}
.tps-theme #popup_prompt {
  height: 38px;
  border: 1px solid var(--tps-border-2);
  border-radius: var(--tps-radius-sm);
  padding: 0 12px;
  margin-top: 10px;
}

/* Loading(true) -> LoadingOpen(): #popup_container > #popup_content_loading */
.tps-theme #popup_content_loading {
  position: relative;
  width: 132px;
  height: 132px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.tps-theme #popup_content_loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 999px;
  border: 4px solid var(--tps-primary-soft);
  border-top-color: var(--tps-primary);
  border-right-color: var(--tps-yellow);
  box-sizing: border-box;
  animation: tps-spin 1s linear infinite;
}
.tps-theme #popup_content_loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  background: url("../../images/theme/kargooke-smile.png") no-repeat center / contain;
  animation: tps-bob 1.2s ease-in-out infinite;
}
.tps-theme #popup_content_loading #popup_message_dialog {
  display: none;
}

/* jpopup() & jpopuptwo(): lookup / popup konten ajax */
.tps-theme #popup_container_popup,
.tps-theme #popup_container_popup_two {
  position: relative;
  font-family: var(--tps-font);
  font-size: 13.5px;
  min-width: 320px;
  max-width: 96vw;
  background: var(--tps-surface);
  border: 0;
  border-radius: var(--tps-radius-xl);
  box-shadow: var(--tps-shadow-lg);
  color: var(--tps-text);
  overflow: hidden;
}
/* alerts.js memusatkan popup di tengah layar; tinggi dibatasi layar, isi bisa di-scroll */
.tps-theme #popup_container_popup,
.tps-theme #popup_container_popup_two {
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}
.tps-theme #popup_content_popup,
.tps-theme #popup_content_popup_two {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 96px);
}
.tps-theme #popup_container {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
.tps-theme #popup_container_popup > span,
.tps-theme #popup_container_popup_two > span {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  float: none !important;
  width: 36px;
  height: 36px;
  border-radius: var(--tps-radius);
  background: #F0F4F7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B4556' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
}
.tps-theme #popup_container_popup > span:hover,
.tps-theme #popup_container_popup_two > span:hover {
  background-color: #E3EDF2;
}
.tps-theme #popup_close_popup,
.tps-theme #popup_close_popup_two {
  display: block;
  width: 36px;
  height: 36px;
  opacity: 0;
  cursor: pointer;
}
.tps-theme #popup_title_popup,
.tps-theme #popup_title_popup_two {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 64px 0 20px;
  margin: 0;
  background: var(--tps-surface);
  border: 0;
  border-bottom: 1px solid #E8F0F4;
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
  color: var(--tps-text);
  line-height: 1.3;
}
.tps-theme #popup_title_popup::before,
.tps-theme #popup_title_popup_two::before {
  content: "";
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background: url("../../images/theme/kargooke-smile.png") no-repeat center / contain;
}
.tps-theme #popup_content_popup,
.tps-theme #popup_content_popup_two {
  padding: 16px 20px;
  margin: 0;
  background: var(--tps-surface);
  color: var(--tps-text);
  border: 0;
  max-height: 70vh;
  overflow: auto;
  cursor: default;
}
.tps-theme #popup_panel_popup {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid #E8F0F4;
  background: var(--tps-surface-2);
}
.tps-theme #popup_title_popup_two {
  border-bottom-color: var(--tps-danger-bd);
}
.tps-theme #popup_title_popup_two::before {
  background: none;
  width: 4px;
  flex-basis: 4px;
  height: 22px;
  border-radius: 2px;
  background-color: var(--tps-danger);
}

/* ================= SweetAlert v1 (swalert / swal) ================= */
.tps-theme .sweet-overlay {
  background-color: rgba(6, 42, 62, .45);
}
.tps-theme .sweet-alert {
  /* sweetalert menghitung margin-top saat animasi berjalan (tidak tepat): pusatkan via translate */
  top: 50% !important;
  margin-top: 0 !important;
  translate: 0 -50%;
  font-family: var(--tps-font);
  width: 360px;
  margin-left: -180px;
  padding: 28px 24px 22px;
  border-radius: var(--tps-radius-xl);
  box-shadow: var(--tps-shadow-lg);
  overflow: hidden;
}
@media (max-width: 420px) {
  .tps-theme .sweet-alert {
    width: auto;
    left: 12px;
    right: 12px;
    margin-left: 0;
  }
}
.tps-theme .sweet-alert h2 {
  margin: 4px 0 4px;
  font-family: var(--tps-font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--tps-primary-strong);
}
/* netralkan tema SweetAlert "twitter" (assets/vendor/themes/twitter/twitter.css) yang dimuat banyak controller */
.tps-theme .sweet-alert h2 {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
  border-bottom: 0;
}
.tps-theme .sweet-alert .sa-button-container {
  margin: 8px 0 0;
  background: transparent;
  border-top: 0;
  box-shadow: none;
}
.tps-theme .sweet-alert button,
.tps-theme .sweet-alert button.confirm,
.tps-theme .sweet-alert button.cancel {
  margin: 0;
  border: 0;
  text-shadow: none;
  background-image: none;
}
.tps-theme .sweet-alert button:focus::before,
.tps-theme .sweet-alert button.cancel:focus::before {
  display: none;
}
.tps-theme .sweet-alert button:focus {
  outline: 0;
}
.tps-theme .sweet-alert button:focus-visible {
  outline: 2px solid rgba(32, 168, 224, .35);
  outline-offset: 2px;
}
/* potongan putih animasi ikon sukses tidak boleh menutupi judul */
.tps-theme .sweet-alert .sa-icon.sa-success::before,
.tps-theme .sweet-alert .sa-icon.sa-success::after,
.tps-theme .sweet-alert .sa-icon.sa-success .sa-fix {
  background: transparent !important;
}
.tps-theme .sweet-alert .sa-icon.sa-success .sa-placeholder {
  display: none;
}
/* animasi pulseWarning mengubah warna border: matikan agar warna tema dipakai */
.tps-theme .sweet-alert .sa-icon.sa-warning,
.tps-theme .sweet-alert .sa-icon.sa-warning .sa-body,
.tps-theme .sweet-alert .sa-icon.sa-warning .sa-dot {
  animation: none !important;
}
.tps-theme .sweet-alert .sa-icon:not(.sa-custom) {
  transform: scale(.8);
  transform-origin: center top;
  margin: 0 auto -6px;
}
.tps-theme .sweet-alert p {
  font-family: var(--tps-font);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--tps-text);
}
.tps-theme .sweet-alert .sa-icon {
  margin: 0 auto -6px;
  transform: scale(.8);
  transform-origin: center top;
}
.tps-theme .sweet-alert .sa-icon.sa-success {
  border-color: var(--tps-success);
}
.tps-theme .sweet-alert .sa-icon.sa-success .sa-line {
  background-color: var(--tps-success);
}
.tps-theme .sweet-alert .sa-icon.sa-success .sa-placeholder {
  border-color: rgba(30, 123, 69, .25);
}
.tps-theme .sweet-alert .sa-icon.sa-success::before,
.tps-theme .sweet-alert .sa-icon.sa-success::after,
.tps-theme .sweet-alert .sa-icon.sa-success .sa-fix {
  background: var(--tps-surface);
}
.tps-theme .sweet-alert .sa-icon.sa-error {
  border-color: var(--tps-danger);
}
.tps-theme .sweet-alert .sa-icon.sa-error .sa-line {
  background-color: var(--tps-danger);
}
.tps-theme .sweet-alert .sa-icon.sa-warning {
  border-color: #D8B400;
}
.tps-theme .sweet-alert .sa-icon.sa-warning .sa-body,
.tps-theme .sweet-alert .sa-icon.sa-warning .sa-dot {
  background-color: #B89900;
}
.tps-theme .sweet-alert .sa-icon.sa-info {
  border-color: var(--tps-primary);
}
.tps-theme .sweet-alert .sa-icon.sa-info::before,
.tps-theme .sweet-alert .sa-icon.sa-info::after {
  background-color: var(--tps-primary-strong);
}
.tps-theme .sweet-alert .sa-button-container {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.tps-theme .sweet-alert .sa-confirm-button-container {
  flex: 1 1 0;
  display: flex;
}
.tps-theme .sweet-alert button {
  flex: 1 1 0;
  min-height: 44px;
  margin: 0;
  padding: 0 18px;
  border-radius: var(--tps-radius);
  font-family: var(--tps-font);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none !important;
}
.tps-theme .sweet-alert button.confirm {
  width: 100%;
  background-color: var(--tps-primary) !important;
  color: var(--tps-on-primary);
}
.tps-theme .sweet-alert button.confirm:hover {
  background-color: var(--tps-primary-hover) !important;
}
.tps-theme .sweet-alert button.cancel {
  background-color: #F0F4F7;
  color: var(--tps-text-2);
}
.tps-theme .sweet-alert button.cancel:hover {
  background-color: #E3EDF2;
}
.tps-theme .sweet-alert[data-has-cancel-button="false"] .sa-confirm-button-container {
  flex: 0 1 220px;
  margin: 0 auto;
}
.tps-theme .sweet-alert .la-ball-fall {
  color: var(--tps-on-primary);
}
/* garis hitung mundur untuk swalert() (timer tanpa tombol) */
.tps-theme .sweet-alert[data-has-confirm-button="false"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0;
  background: var(--tps-primary);
}
.tps-theme .sweet-alert[data-has-confirm-button="false"] .sa-button-container {
  display: none;
}
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="1000"]::after { animation: tps-countdown 1s linear forwards; }
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="1500"]::after { animation: tps-countdown 1.5s linear forwards; }
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="2000"]::after { animation: tps-countdown 2s linear forwards; }
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="2500"]::after { animation: tps-countdown 2.5s linear forwards; }
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="3000"]::after { animation: tps-countdown 3s linear forwards; }
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="4000"]::after { animation: tps-countdown 4s linear forwards; }
.tps-theme .sweet-alert[data-has-confirm-button="false"][data-timer="5000"]::after { animation: tps-countdown 5s linear forwards; }
@keyframes tps-countdown {
  from { width: 100%; }
  to { width: 0; }
}

/* ================= noty (notify / notify_) =================
 * Struktur: ul.app-noty-* > li > div.noty_bar.noty_type_{type} > div.noty_message > span.noty_text
 * Tema noty "defaultTheme" (dipakai notify()) menulis inline style di <li> dan .noty_message,
 * sehingga perlu !important yang dibatasi pada elemen toast saja.
 */
.tps-theme .app-noty-bottom {
  left: auto;
  right: 20px;
  bottom: 20px;
  width: auto;
  max-width: 460px;
  padding: 0 !important;
}
.tps-theme .app-noty-top {
  left: 50%;
  right: auto;
  top: calc(var(--tps-header-h) + 12px);
  width: 440px;
  max-width: calc(100vw - 24px);
  margin-left: -220px;
}
@media (max-width: 480px) {
  .tps-theme .app-noty-bottom {
    left: 12px;
    right: 12px;
    max-width: none;
  }
  .tps-theme .app-noty-top {
    left: 12px;
    right: 12px;
    width: auto;
    margin-left: 0;
  }
}
.tps-theme .noty_modal {
  background-color: var(--tps-navy) !important;
  opacity: .25 !important;
}
.tps-theme ul[class*="app-noty"] > li {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar {
  position: relative !important;
  padding: 13px 16px 13px 56px !important;
  background: var(--tps-surface) !important;
  color: var(--tps-text) !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: var(--tps-shadow) !important;
  font-family: var(--tps-font);
}
.tps-theme ul[class*="app-noty"] > li .noty_bar .noty_message {
  padding: 0 !important;
  font-size: 13.5px !important;
  font-weight: 600;
  line-height: 1.45 !important;
  text-align: left !important;
  color: var(--tps-text) !important;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar .noty_text {
  color: var(--tps-text) !important;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 999px;
  background: var(--tps-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062A3E' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 11v7M12 6h.01'/%3E%3C/svg%3E") no-repeat center / 14px 14px;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar.noty_type_success::before {
  background: var(--tps-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 14px 14px;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar.noty_type_error::before {
  background: var(--tps-danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") no-repeat center / 12px 12px;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar.noty_type_warning::before,
.tps-theme ul[class*="app-noty"] > li .noty_bar.noty_type_alert::before {
  background: var(--tps-yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F3A00' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18h.01'/%3E%3C/svg%3E") no-repeat center / 14px 14px;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar .noty_buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 0 0 !important;
  background: transparent !important;
  border: 0 !important;
}
.tps-theme ul[class*="app-noty"] > li .noty_bar .noty_buttons .btn {
  min-height: 34px;
}

/* ================= Loader di dalam popup ================= */
.tps-theme .tps-popup-loading {
  padding: 26px 0 18px;
  text-align: center;
}

/* ================= ISI POPUP / MODAL =================
 * Popup tanpa tab (mis. lookup Search + tabel): card pembungkus view tidak perlu bingkai lagi. */
.tps-theme #popup_content_popup > .card:not(:has(> .card-block > .box-tab)),
.tps-theme #popup_content_popup_two > .card:not(:has(> .card-block > .box-tab)),
.tps-theme .modal-body > .card {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* ================= POPUP BERISI TAB: FORM DI DALAM PANEL =================
 * Header popup tetap (logo + judul jpopup). Isi popup berlatar abu dengan jarak 20px;
 * card + wizard-tabs dari view tampil sebagai panel putih seperti form di halaman
 * (tab di kepala panel, tombol Save / Gate In di kanan). Markup view tidak berubah. */
.tps-theme #popup_content_popup:has(> .card > .card-block > .box-tab),
.tps-theme #popup_content_popup_two:has(> .card > .card-block > .box-tab) {
  padding: 20px;
  background: var(--tps-bg);
}
.tps-theme #popup_content_popup > .card:has(> .card-block > .box-tab),
.tps-theme #popup_content_popup_two > .card:has(> .card-block > .box-tab) {
  margin: 0;
  border: 1px solid var(--tps-border);
  border-radius: var(--tps-radius-lg);
  box-shadow: none;
  background: var(--tps-surface);
  overflow: hidden;
}
.tps-theme #popup_content_popup .box-tab > .wizard-tabs,
.tps-theme #popup_content_popup_two .box-tab > .wizard-tabs {
  padding: 0 16px 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tps-theme #popup_content_popup .box-tab > .wizard-tabs > li[style*="width"] > a,
.tps-theme #popup_content_popup_two .box-tab > .wizard-tabs > li[style*="width"] > a {
  gap: 8px;
  font-size: 0;
}
.tps-theme #popup_content_popup .box-tab > .wizard-tabs > li[style*="width"] .btn,
.tps-theme #popup_content_popup_two .box-tab > .wizard-tabs > li[style*="width"] .btn {
  height: 36px;
  margin: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  box-shadow: none;
  white-space: nowrap;
}
.tps-theme #popup_content_popup .box-tab .tab-content,
.tps-theme #popup_content_popup_two .box-tab .tab-content {
  padding: 0;
  border-radius: 0;
}
.tps-theme #popup_content_popup .box-tab .tab-content > .row,
.tps-theme #popup_content_popup_two .box-tab .tab-content > .row {
  margin: 0;
}
.tps-theme #popup_content_popup .box-tab .tab-pane:not(:has(> .tps-nt-card:only-of-type)),
.tps-theme #popup_content_popup_two .box-tab .tab-pane:not(:has(> .tps-nt-card:only-of-type)) {
  padding: 18px 20px !important;
}
/* baris field: tanpa garis pemisah, cukup jarak */
.tps-theme #popup_content_popup .box-tab .form-horizontal .form-group:not(.nt-search .form-group),
.tps-theme #popup_content_popup_two .box-tab .form-horizontal .form-group:not(.nt-search .form-group) {
  padding: 7px 0;
  border-bottom: 0;
}
/* form 2 kolom (col-sm-6 / col-md-6): kolom sama tinggi, dipisah garis tipis */
.tps-theme #popup_content_popup .box-tab form:has(> .col-sm-6, > .col-md-6),
.tps-theme #popup_content_popup_two .box-tab form:has(> .col-sm-6, > .col-md-6) {
  display: flex;
  flex-wrap: wrap;
}
.tps-theme #popup_content_popup .box-tab form > :is(.col-sm-6, .col-md-6) + :is(.col-sm-6, .col-md-6),
.tps-theme #popup_content_popup_two .box-tab form > :is(.col-sm-6, .col-md-6) + :is(.col-sm-6, .col-md-6) {
  border-left: 1px solid var(--tps-line);
}
@media (max-width: 767px) {
  .tps-theme #popup_content_popup .box-tab form > :is(.col-sm-6, .col-md-6),
  .tps-theme #popup_content_popup_two .box-tab form > :is(.col-sm-6, .col-md-6) {
    width: 100%;
  }
  .tps-theme #popup_content_popup .box-tab form > :is(.col-sm-6, .col-md-6) + :is(.col-sm-6, .col-md-6),
  .tps-theme #popup_content_popup_two .box-tab form > :is(.col-sm-6, .col-md-6) + :is(.col-sm-6, .col-md-6) {
    border-left: 0;
    border-top: 1px solid var(--tps-line);
    margin-top: 8px;
    padding-top: 8px;
  }
}
@media (max-width: 599px) {
  .tps-theme #popup_content_popup:has(> .card > .card-block > .box-tab),
  .tps-theme #popup_content_popup_two:has(> .card > .card-block > .box-tab) {
    padding: 12px;
  }
  .tps-theme #popup_content_popup .box-tab .tab-pane:not(:has(> .tps-nt-card:only-of-type)),
  .tps-theme #popup_content_popup_two .box-tab .tab-pane:not(:has(> .tps-nt-card:only-of-type)) {
    padding: 14px 16px !important;
  }
}

/* ================= DATE / DATETIME PICKER (bootstrap-datetimepicker, main.js date()/datetime()) ================= */
.tps-theme .datetimepicker {
  padding: 12px;
  border: 1px solid var(--tps-border);
  border-radius: var(--tps-radius-lg);
  background: var(--tps-surface);
  box-shadow: 0 12px 32px rgba(6, 42, 62, .16);
  font-family: var(--tps-font);
  color: var(--tps-text);
}
.tps-theme .datetimepicker table {
  border-collapse: separate;
  border-spacing: 2px;
}
.tps-theme .datetimepicker th,
.tps-theme .datetimepicker td {
  border-radius: 8px;
}
.tps-theme .datetimepicker thead tr:first-child th {
  height: 36px;
  font-size: 14px;
  font-weight: 800;
  color: var(--tps-text);
}
.tps-theme .datetimepicker thead tr:first-child th.prev,
.tps-theme .datetimepicker thead tr:first-child th.next {
  width: 36px;
  color: var(--tps-primary-ink);
}
.tps-theme .datetimepicker thead tr:first-child th:hover,
.tps-theme .datetimepicker tfoot tr:first-child th:hover {
  background: var(--tps-primary-softer);
  color: var(--tps-primary-ink);
}
.tps-theme .datetimepicker thead tr:last-child th.dow {
  height: 30px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tps-subtle);
}
.tps-theme .datetimepicker table tr td.day,
.tps-theme .datetimepicker table tr td.hour,
.tps-theme .datetimepicker table tr td.minute {
  width: 36px;
  height: 34px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tps-text);
}
.tps-theme .datetimepicker table tr td.day:hover,
.tps-theme .datetimepicker table tr td.hour:hover,
.tps-theme .datetimepicker table tr td.minute:hover,
.tps-theme .datetimepicker table tr td span:hover {
  background: var(--tps-primary-softer);
  color: var(--tps-primary-ink);
}
.tps-theme .datetimepicker table tr td.old,
.tps-theme .datetimepicker table tr td.new,
.tps-theme .datetimepicker table tr td span.old {
  color: #A9B9C3;
  font-weight: 500;
}
.tps-theme .datetimepicker table tr td.today,
.tps-theme .datetimepicker table tr td.today:hover {
  background: #FEFCDD;
  background-image: none;
  border: 0;
  color: var(--tps-yellow-ink);
  font-weight: 800;
}
.tps-theme .datetimepicker table tr td.active,
.tps-theme .datetimepicker table tr td.active:hover,
.tps-theme .datetimepicker table tr td.active.active,
.tps-theme .datetimepicker table tr td span.active,
.tps-theme .datetimepicker table tr td span.active:hover,
.tps-theme .datetimepicker table tr td span.active.active {
  background: var(--tps-primary);
  background-image: none;
  border: 0;
  color: var(--tps-on-primary);
  text-shadow: none;
  font-weight: 800;
  filter: none;
}
.tps-theme .datetimepicker table tr td span {
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
}
.tps-theme .datetimepicker tfoot th.today,
.tps-theme .datetimepicker tfoot tr:first-child th {
  height: 34px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tps-primary-ink);
}
.tps-theme .datetimepicker.dropdown-menu::before {
  border-bottom-color: var(--tps-border);
}

/* ================= AUTOCOMPLETE (jQuery UI, main.js autocomplete()) ================= */
.tps-theme .ui-autocomplete.ui-menu {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  border: 1px solid var(--tps-border);
  border-radius: var(--tps-radius);
  background: var(--tps-surface);
  box-shadow: 0 12px 32px rgba(6, 42, 62, .16);
  font-family: var(--tps-font);
  z-index: 100000 !important;
}
.tps-theme .ui-autocomplete .ui-menu-item {
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  border: 0;
}
.tps-theme .ui-autocomplete .ui-menu-item a,
.tps-theme .ui-autocomplete .ui-menu-item .ui-menu-item-wrapper {
  display: block;
  margin: 0;
  padding: 9px 12px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  color: var(--tps-text) !important;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
}
.tps-theme .ui-autocomplete .ui-menu-item a.ui-state-focus,
.tps-theme .ui-autocomplete .ui-menu-item a.ui-state-active,
.tps-theme .ui-autocomplete .ui-menu-item a.ui-state-hover,
.tps-theme .ui-autocomplete .ui-menu-item .ui-state-active,
.tps-theme .ui-autocomplete .ui-menu-item a:hover {
  background: var(--tps-primary-softer) !important;
  color: var(--tps-primary-ink) !important;
  font-weight: 700;
}

/* ================= DETAIL DOKUMEN (nilai baca-saja ditulis dengan <pre>, mis. responbc/detail) ================= */
.tps-theme .form-horizontal .form-group pre {
  min-height: 38px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--tps-border-2);
  border-radius: var(--tps-radius-sm);
  background: #F4F8FB;
  color: var(--tps-text);
  font-family: var(--tps-font);
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* tab tanpa label (mis. <li><a href="#tab3"></a></li>) tidak ditampilkan */
.tps-theme .box-tab .wizard-tabs > li > a:empty {
  display: none;
}

/* ================= PRIVILEGE (management/privilege: pohon menu dari m_management::draw_menu) ================= */
.tps-theme #form_data .form-group > div > ol,
.tps-theme #form_data .form-group > div > ol ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tps-theme #form_data .form-group > div > ol {
  border: 1px solid var(--tps-border);
  border-radius: var(--tps-radius-lg);
  overflow: hidden;
}
.tps-theme #form_data .form-group > div > ol li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--tps-line);
  font-size: 13.5px;
  color: var(--tps-text);
}
.tps-theme #form_data .form-group > div > ol > li:first-child {
  border-top: 0;
}
.tps-theme #form_data .form-group > div > ol > li {
  font-weight: 700;
}
.tps-theme #form_data .form-group > div > ol > li:nth-child(even) {
  background: #FBFDFE;
}
.tps-theme #form_data .form-group > div > ol li > select {
  margin-left: auto;
  min-height: 30px;
  width: 64px;
  padding: 0 26px 0 10px;
  background-position: right 8px center;
  font-weight: 700;
}
/* sub menu: menjorok dengan garis kiri */
.tps-theme #form_data .form-group > div > ol li > ol {
  flex: 0 0 calc(100% - 8px);
  margin: 6px 0 -3px 8px;
  padding-left: 14px;
  border-left: 2px solid #E3EDF2;
}
.tps-theme #form_data .form-group > div > ol li > ol li {
  padding: 6px 0;
  border-top: 0;
  font-weight: 500;
  background: transparent !important;
}
.tps-theme #form_data .form-group input[type="checkbox"] {
  margin: 0 4px 0 0;
}
