/* ===== Custom UI ===== */

/* Start Select2 */

.form-control:focus,
.custom-select:focus,
.custom-file-input:focus ~ .custom-file-label {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45);
}

.select2-container {
  width: 100% !important;
}

.select2-no-margin + .select2-container {
  margin-bottom: 0 !important;
}

.select2-container .select2-selection--single {
  min-height: calc(1.5em + 0.75rem + 6.5px);
  padding: 0 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
}

/* TEXT */
.select2-container .select2-selection__rendered {
  padding: 0;
  line-height: 1.5;
}

/* ARROW */
.select2-container .select2-selection__arrow {
  height: 100%;
  right: 0.6rem;
}

.select2-selection--single {
  border-radius: 0.6rem !important;
}

.select2-container--open .select2-selection--single,
.select2-container--focus .select2-selection--single {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45);
}

/* DROPDOWN */
.select2-dropdown {
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
}

/* OPTION HOVER */
.select2-results__option--highlighted {
  background-color: #16a34a;
  color: #fff;
}

/* DISABLED */
.select2-container--disabled .select2-selection {
  background-color: #e9ecef;
  cursor: not-allowed;
}

/* End Select2 */

.rounded-lg-tw {
  border-radius: 0.5rem !important;
}

.rounded-xl-tw {
  border-radius: 0.75rem !important;
}

.rounded-2xl-tw {
  border-radius: 1rem !important;
}

.rounded-4xl-tw {
  border-radius: 2rem !important;
}

.bg-emerald-100 {
  background-color: #d1fae5 !important;
}

.bg-emerald-700 {
  background-color: #047857 !important;
}

.bg-indigo-500 {
  background-color: #6366f1 !important;
}

.border-purple-200 {
  border: 1px solid #e9d5ff !important;
}

.border-emerald-200 {
  border-color: #a7f3d0 !important;
}

.border-purple-300 {
  border-color: #d8b4fe !important;
}

.border-emerald-600 {
  border-color: #059669 !important;
}

.border-amber-200 {
  border-color: #fde68a !important;
}

.border-amber-400 {
  border-color: #fbbf24 !important;
}

.border-1 {
  border-width: 1px !important;
  border-style: solid;
}

.border-2 {
  border-width: 2px !important;
  border-style: solid;
}

.border-3 {
  border-width: 3px !important;
  border-style: solid;
}

.bg-green-600 {
  background-color: #16a34a !important;
}

.bg-green-700 {
  background-color: #15803d !important;
}

.bg-orange {
  background-color: #ef6c00 !important;
}
.bg-yellow {
  background-color: #f9a825 !important;
}

.bg-slate-100 {
  background-color: #f1f5f9 !important;
}

.bg-slate-600 {
  background-color: #475569 !important;
}

.bg-indigo-100 {
  background-color: #e0e7ff !important;
}

.bg-sky-100 {
  background-color: #e0f2fe !important;
}

.bg-amber-100 {
  background-color: #fef3c7 !important;
}

.bg-amber-400 {
  background-color: #fbbf24 !important;
}

.bg-emerald-50 {
  background-color: #ecfdf5 !important;
}

.bg-emerald-100 {
  background-color: #d1fae5 !important;
}

.bg-emerald-200 {
  background-color: #a7f3d0 !important;
}

.bg-sky-100 {
  background-color: #e0f2fe !important;
}

.bg-blue-200 {
  background-color: #bfdbfe !important;
}

.bg-blue-400 {
  background-color: #60a5fa !important;
}

.bg-blue-600 {
  background-color: #2563eb !important;
}

.bg-blue-700 {
  background-color: #1d4ed8 !important;
}

.bg-blue-800 {
  background-color: #1e40af !important;
}

.bg-blue-900 {
  background-color: #1e40af !important;
}

.bg-emerald-600 {
  background-color: #059669 !important;
}

.bg-indigo-600 {
  background-color: #4f46e5 !important;
}

.bg-indigo-50 {
  background-color: #eef2ff !important;
}

.bg-amber-50 {
  background-color: #fffbeb !important;
}

.bg-amber-500 {
  background-color: #f59e0b !important;
}

.bg-red-600 {
  background-color: #dc2626 !important;
}

.bg-red-700 {
  background-color: #b91c1c !important;
}

.bg-red-100 {
  background-color: #fee2e2 !important;
}

.bg-yellow-50 {
  background-color: #fefce8 !important;
}

.bg-yellow-100 {
  background-color: #fef9c3 !important;
}

.bg-green-500 {
  background-color: #22c55e !important;
}
.bg-green-50 {
  background-color: #f0fdf4 !important;
}

.bg-lime-400 {
  background-color: #a3e635 !important;
}

.bg-yellow-400 {
  background-color: #facc15 !important;
}

.bg-yellow-600 {
  background-color: #ca8a04 !important;
}

.bg-orange-500 {
  background-color: #f97316 !important;
}

.bg-orange-600 {
  background-color: #ea580c !important;
}

.bg-orange-700 {
  background-color: #c2410c !important;
}

.bg-red-50 {
  background-color: #fef2f2 !important;
}

.bg-red-500 {
  background-color: #ef4444 !important;
}

.bg-amber-600 {
  background-color: #d97706 !important;
}

.bg-slate-600 {
  background-color: #475569 !important;
}

.bg-blue-100 {
  background-color: #dbeafe !important;
}

.bg-blue-50 {
  background-color: #eff6ff !important;
}

.bg-lime-100 {
  background-color: #ecfccb !important;
}
.bg-green-100 {
  background-color: #dcfce7 !important;
}

.bg-gray-50 {
  background-color: #f9fafb !important;
}

.bg-gray-100 {
  background-color: #f3f4f6 !important;
}

.bg-gray-600 {
  background-color: #4b5563 !important;
}

.bg-green-600 {
  background-color: #16a34a !important;
}

.bg-purple-50 {
  background-color: #faf5ff !important;
}

.bg-purple-100 {
  background-color: #f3e8ff !important;
}

.bg-purple-200 {
  background-color: #e9d5ff !important;
}

.bg-purple-600 {
  background-color: #9333ea !important;
}

.text-purple-600 {
  color: #7c3aed !important;
}

.text-purple-700 {
  color: #7e22ce !important;
}

.text-purple-800 {
  color: #6b21a8 !important;
}

.text-purple-900 {
  color: #581c87 !important;
}

.bg-orange-50 {
  background-color: #fff7ed !important;
}
.bg-orange-100 {
  background-color: #ffedd5 !important;
}

.bg-gray-200 {
  background-color: #e5e7eb !important;
}

.bg-gray-300 {
  background-color: #d1d5db !important;
}

.text-orange-600 {
  color: #ea580c !important;
}

.text-orange-700 {
  color: #c2410c !important;
}

.text-orange-900 {
  color: #7c2d12 !important;
}

/* Border */
.border-orange-200 {
  border-color: #fed7aa !important;
}

.border-orange-400 {
  border-color: #fb923c !important;
}

.border-orange-500 {
  border-color: #f97316 !important;
}

.border-purple-200 {
  border-color: #e9d5ff !important;
}

.text-green-600 {
  color: #16a34a !important;
}

.text-green-900 {
  color: #14532d !important;
}

.border-green-100 {
  border-color: #dcfce7 !important;
}

.border-green-200 {
  border-color: #bbf7d0 !important;
}

.border-green-500 {
  border-color: #22c55e !important;
}

.border-green-600 {
  border-color: #16a34a !important;
}

.text-gray-100 {
  color: #f3f4f6 !important;
}

.text-gray-300 {
  color: #d1d5db !important;
}

.text-gray-400 {
  color: #9ca3af !important;
}

.text-gray-600 {
  color: #4b5563 !important;
}

.text-gray-500 {
  color: #6b7280 !important;
}

.text-gray-700 {
  color: #374151 !important;
}

.text-gray-900 {
  color: #111827 !important;
}

.text-medium {
  font-weight: 500 !important;
}

.text-semibold {
  font-weight: 600 !important;
}

.border-lime-200 {
  border-color: #d9f99d !important;
}

.border-yellow-200 {
  border-color: #fef08a !important;
}

.border-slate-200 {
  border-color: #e2e8f0 !important;
}

.border-gray-200 {
  border-color: #e5e7eb !important;
}

.border-gray-300 {
  border-color: #d1d5db !important;
}

.border-red-100 {
  border-color: #fee2e2 !important;
}

.border-red-200 {
  border-color: #fecaca !important;
}

.border-blue-100 {
  border-color: #dbeafe !important;
}

.border-blue-200 {
  border-color: #bfdbfe !important;
}

/* assets/css/custom.css */
.border-blue-300 {
  border-color: #93c5fd !important;
}

.border-blue-400 {
  border-color: #60a5fa !important;
}

.border-blue-500 {
  border-color: #3b82f6 !important;
}

.border-blue-600 {
  border-color: #2563eb !important;
}

.border-blue-800 {
  border-color: #1e40af !important;
}

.border-blue-900 {
  border-color: #1e3a8a !important;
}

.border-green-600 {
  border: 1px solid #16a34a;
}

.text-indigo-600 {
  color: #4f46e5 !important;
}

.text-indigo-700 {
  color: #4338ca !important;
}

.text-red-600 {
  color: #dc2626 !important;
}

.text-red-700 {
  color: #b91c1c !important;
}

.text-red-800 {
  color: #991b1b !important;
}

.text-amber-700 {
  color: #b45309 !important;
}

.text-amber-800 {
  color: #92400e !important;
}

.text-emerald-700 {
  color: #047857 !important;
}

.text-emerald-600 {
  color: #059669 !important;
}

.text-blue-600 {
  color: #dbeafe !important;
}

.text-blue-600 {
  color: #2563eb !important;
}

.text-blue-700 {
  color: #1d4ed8 !important;
}

.text-blue-800 {
  color: #1e40af !important;
}

.text-blue-900 {
  color: #1e3a8a !important;
}

.text-sky-600 {
  color: #0284c7 !important;
}

.text-slate-600 {
  color: #475569 !important;
}

.text-slate-700 {
  color: #334155 !important;
}

.text-amber-600 {
  color: #d97706 !important;
}

.text-amber-900 {
  color: #78350f !important;
}

.text-yellow-600 {
  color: #ca8a04 !important;
}

.text-yellow-700 {
  color: #a16207 !important;
}

.text-yellow-800 {
  color: #854d0e !important;
}

.lucide-icon {
  display: inline-block;
  vertical-align: middle;
}

.text-lime-700 {
  color: #4d7c0f !important;
}

.text-lime-800 {
  color: #3f6212 !important;
}

.text-green-600 {
  color: #16a34a !important;
}

.text-green-700 {
  color: #15803d !important;
}

.text-green-800 {
  color: #166534 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.hover-card {
  transition: all 0.2s ease;
}

.hover-card:hover {
  background-color: #f8f9fa;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.collapse-icon {
  transition: transform 0.2s ease;
}

.rounded-top-lg {
  border-top-left-radius: 0.5rem !important;
  border-top-right-radius: 0.5rem !important;
}

.rounded-top-xl {
  border-top-left-radius: 0.75rem !important;
  border-top-right-radius: 0.75rem !important;
}

.rounded-bottom-lg {
  border-bottom-left-radius: 0.5rem !important;
  border-bottom-right-radius: 0.5rem !important;
}

.rounded-bottom-xl {
  border-bottom-left-radius: 0.75rem !important;
  border-bottom-right-radius: 0.75rem !important;
}

/* saat collapse (aria-expanded = false) */
button[aria-expanded="false"] .collapse-icon {
  transform: rotate(180deg);
}

.page-item:hover {
  background-color: #16a34a !important;
}

/* Start Pagination Datatable Custom */
.dataTables_paginate .page-link:focus,
.dataTables_paginate .page-link:active,
.dataTables_paginate .page-link:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.dataTables_paginate .pagination .page-link {
  background-color: #ffffff !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
  /* border-radius: 8px !important;x
  padding: 10rem !important; */
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.dataTables_paginate .paginate_button.page-item:hover {
  background: transparent !important;
  border: none;
}

.dataTables_paginate .paginate_button.page-item {
  background: transparent !important;
  border: none !important;
  padding: 0.3rem !important;
}

.dataTables_paginate .page-item.active .page-link {
  background-color: #198754 !important;
  border: #198754 !important;
  color: #fff !important;
}

.dataTables_paginate .page-link {
  border: none !important;
  background: transparent !important;
  border-radius: 0.5rem !important;
  padding: 0.4rem 0.7rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease !important;
}

.pr-sm-0 {
  padding-right: 0 !important;
}

.row-gap-sm {
  margin-left: -8px;
  margin-right: -8px;
}
.row-gap-sm > [class^="col"] {
  padding-left: 8px;
  padding-right: 8px;
}

/* Mobile */
@media (max-width: 767.98px) {
  .col-rsca {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .w-sm-100 {
    width: 100% !important;
  }
}

@media (min-width: 768px) {
  .w-md-50 {
    width: 50% !important;
  }

  .w-md-75 {
    width: 75% !important;
  }

  .pr-md-4 {
    padding-right: 1.5rem !important;
  }

  .pr-md-5 {
    padding-right: 3rem !important;
  }

  .border-md-none {
    border-bottom: 0 !important;
  }

  .border-left-md {
    border-left: 1px solid #dee2e6;
  }
}

/* md: 2 kolom */
@media (min-width: 768px) and (max-width: 991.98px) {
  .col-rsca {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* lg: 4 kolom */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .col-rsca {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* xl: 5 kolom */
@media (min-width: 1200px) {
  .col-rsca {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* ================================
   Sidebar Toggle Icon
================================ */
#sidebarToggleBtn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* mini sidebar → ganti icon */
body.mini-sidebar .icon-expand {
  display: none !important;
}

body.mini-sidebar .icon-collapse {
  display: inline-flex !important;
}

body.mini-sidebar .navbar-header img {
  transform: scale(0.9);
  transition: transform 0.2s ease;
}
.radio-yellow-wrapper {
  display: inline-flex;
  align-items: center;
  margin-right: 16px;
  cursor: pointer;
  user-select: none;
}

.radio-yellow-wrapper input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-yellow {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #4b4b4b;
  background: #4b4b4b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  box-sizing: border-box;
}

.radio-yellow::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #facc15;
  background: #facc15;
  transform: scale(0);
  transition: transform 0.15s ease-in-out;
}

.radio-yellow-wrapper input:checked + .radio-yellow::after {
  transform: scale(1);
  border: 4px solid #facc15;
}

.border-green-600-hover:hover {
  border: 1px solid #16a34a;
}

.border-green-300-hover:hover {
  border: 1px solid #86efac;
}

.ring-red-500 {
  box-shadow:
    0 0 0 2px #ef4444,
    0 0 0 4px #ffffff;
}

.ring-blue-500-hover:hover,
.ring-blue-500-hover:focus-visible,
.ring-blue-500-hover:focus {
  --ring-color: #3b82f6 !important;
  border-color: var(--ring-color) !important;
  border: 1px solid var(--ring-color) !important;
  box-shadow: 0 0 0 2px var(--ring-color) !important;
}

.ring-orange-500-hover:hover,
.ring-orange-500-hover:focus,
.ring-orange-500-hover:focus-visible,
.ring-orange-500-hover:active {
  --ring-color: #f97316 !important;
  border-color: var(--ring-color) !important;
  border: 1px solid var(--ring-color) !important;
  box-shadow: 0 0 0 2px var(--ring-color) !important;
}

button.ring-orange-500-hover:active,
button.ring-orange-500-hover:focus {
  background-color: #ffedd5 !important;
  border-color: #f97316 !important;
}

.ring-red-500-hover:hover,
.ring-red-500-hover:focus,
.ring-red-500-hover:focus-visible,
.ring-red-500-hover:active {
  --ring-color: #ef4444 !important;
  border-color: var(--ring-color) !important;
  border: 1px solid var(--ring-color) !important;
  box-shadow: 0 0 0 2px var(--ring-color) !important;
}

.ring-red-500-hover + .select2-container .select2-selection:hover,
.ring-red-500-hover + .select2-container--focus .select2-selection,
.ring-red-500-hover + .select2-container--open .select2-selection {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5) !important;
}

.ring-orange-500-hover + .select2-container .select2-selection:hover,
.ring-orange-500-hover + .select2-container--focus .select2-selection,
.ring-orange-500-hover + .select2-container--open .select2-selection {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5) !important;
}

.ring-green-500-hover:hover,
.ring-green-500-hover:focus-visible,
.ring-green-500-hover:focus {
  --ring-color: #22c55e !important;
  border-color: var(--ring-color) !important;
  border: 1px solid var(--ring-color) !important;
  box-shadow: 0 0 0 2px var(--ring-color) !important;
}

.ring-yellow-500-hover:hover,
.ring-yellow-500-hover:focus-visible,
.ring-yellow-500-hover:focus {
  --ring-color: #eab308 !important;
  border-color: var(--ring-color) !important;
  border: 1px solid var(--ring-color) !important;
  box-shadow: 0 0 0 2px var(--ring-color) !important;
}

.vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  white-space: nowrap;
}

.risk-analysis-cell {
  width: 50px;
  height: 50px;
  text-align: center;
  vertical-align: middle;
  /* border: 5px solid #fff; */
  border-radius: 0.8rem;
  font-weight: 600;
  transition:
    transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.risk-analysis-threat-cell-active {
  box-shadow:
    0 0 0 2px #7f1d1d,
    0 0 0 4px #ffffff;
}

/* titik tengah */
.risk-analysis-threat-cell-active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.risk-analysis-opportunity-cell-active {
  box-shadow:
    0 0 0 2px #1e3a8a,
    0 0 0 4px #ffffff;
}

/* titik tengah */
.risk-analysis-opportunity-cell-active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.bg-low-threat-risk-cell {
  background-color: #22c55e;
  color: #f8fafc;
}

.bg-low-moderate-threat-risk-cell {
  background-color: #a3e635;
  color: #343a40;
}

.bg-moderate-threat-risk-cell {
  background-color: #ffd700;
  color: #343a40;
}
.bg-moderate-high-threat-risk-cell {
  background-color: #ff6900;
  color: #343a40;
}
.bg-high-threat-risk-cell {
  background-color: #fb2c36;
  color: #f8fafc;
}

.bg-low-opportunity-risk-cell {
  background-color: #dbeafe;
  color: #343a40;
}

.bg-low-moderate-opportunity-risk-cell {
  background-color: #bfdbfe;
  color: #343a40;
}

.bg-moderate-opportunity-risk-cell {
  background-color: #60a5fa;
  color: #343a40;
}

.bg-moderate-high-opportunity-risk-cell {
  background-color: #2563eb;
  color: #f8fafc;
}
.bg-high-opportunity-risk-cell {
  background-color: #1e40af;
  color: #f8fafc;
}

.align-middle {
  vertical-align: middle !important;
}
