/* Bootstrap & Sneat to TailAdmin CSS Compatibility Layer */

/* Colors & Theme Tokens */
:root {
  --color-brand-500: #4f46e5;
  --color-brand-600: #4338ca;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
}

body {
  font-family: 'Outfit', sans-serif !important;
}

/* Override Border Reset Helper */
.border-0 {
  border-width: 0px !important;
  border: none !important;
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

.col-12, .col-sm-12, .col-md-12, .col-lg-12, .col-xl-12,
.col-6, .col-md-6, .col-lg-6, .col-xl-6,
.col-4, .col-md-4, .col-lg-4, .col-xl-4,
.col-8, .col-md-8, .col-lg-8, .col-xl-8,
.col-3, .col-md-3, .col-lg-3, .col-xl-3,
.col-9, .col-md-9, .col-lg-9, .col-xl-9,
.col-lg-5, .col-lg-7 {
  position: relative;
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }

@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
}

@media (min-width: 1024px) {
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
}

@media (min-width: 1280px) {
  .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
  .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
}

/* Card Elements */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #ffffff;
  background-clip: border-box;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease-in-out;
}

.dark .card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  background-color: transparent;
  border-bottom: 1px solid var(--color-gray-100);
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dark .card-header {
  border-color: #334155 !important;
  color: #f8fafc !important;
}

.card-body {
  flex: 1 1 auto;
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background-color: transparent;
  border-top: 1px solid var(--color-gray-100);
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.dark .card-footer {
  border-color: #334155 !important;
}

/* Border Helpers (Dashboard link cards) */
.border-start {
  border-left-style: solid !important;
}
.border-4 {
  border-left-width: 4px !important;
}
.border-danger {
  border-color: #ef4444 !important;
}
.border-success {
  border-color: #10b981 !important;
}
.border-warning {
  border-color: #f59e0b !important;
}
.border-info {
  border-color: #3b82f6 !important;
}
.border-primary {
  border-color: #4f46e5 !important;
}

/* Form inputs & elements */
.form-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
}

.dark .form-label {
  color: rgba(255, 255, 255, 0.8);
}

.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 0.55rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-gray-800);
  background-color: #ffffff;
  background-clip: padding-box;
  border: 1px solid var(--color-gray-200);
  appearance: none;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.dark .form-control, .dark .form-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

/* Specific styling for borderless but shadowed inputs (e.g. filter dropdowns) */
.form-select.border-0.shadow-sm, .form-control.border-0.shadow-sm {
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important;
}

.dark .form-select.border-0.shadow-sm, .dark .form-control.border-0.shadow-sm {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
}

.form-control:focus, .form-select:focus {
  color: var(--color-gray-900);
  background-color: #ffffff;
  border-color: var(--color-brand-500) !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.dark .form-control:focus, .dark .form-select:focus {
  background-color: #1e293b;
  color: #ffffff;
  border-color: var(--color-brand-500) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25) !important;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
  padding-right: 2.25rem;
  cursor: pointer;
}

.dark .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Small Form Inputs (form-control-sm & form-select-sm) */
.form-control-sm {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
  border-radius: 0.375rem !important;
  line-height: 1.5 !important;
}

.form-select-sm {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  padding-left: 0.75rem !important;
  padding-right: 1.875rem !important;
  font-size: 0.8rem !important;
  border-radius: 0.375rem !important;
  line-height: 1.5 !important;
  background-position: right 0.5rem center !important;
  background-size: 11px 8px !important;
}

/* Option Tags Styling inside Dropdowns */
.form-select option {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  padding: 0.5rem !important;
}

.dark .form-select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group > .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > button.btn-outline-secondary {
  border-color: var(--color-gray-200);
  color: var(--color-gray-600);
  background-color: var(--color-gray-50);
  border-left-width: 0px;
}

.dark .input-group > button.btn-outline-secondary {
  border-color: var(--color-gray-800);
  color: rgba(255, 255, 255, 0.7);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #ffffff;
  background-color: var(--color-brand-500);
  border-color: var(--color-brand-500);
}

.btn-primary:hover {
  background-color: var(--color-brand-600);
  border-color: var(--color-brand-600);
  color: #ffffff;
}

.btn-secondary {
  color: var(--color-gray-700);
  background-color: var(--color-gray-100);
  border-color: var(--color-gray-200);
}

.btn-secondary:hover {
  background-color: var(--color-gray-200);
  color: var(--color-gray-900);
}

.dark .btn-secondary {
  color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--color-gray-800);
}

.dark .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-success {
  color: #ffffff;
  background-color: #10b981;
  border-color: #10b981;
}

.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
  color: #ffffff;
}

.btn-danger {
  color: #ffffff;
  background-color: #ef4444;
  border-color: #ef4444;
}

.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.btn-warning {
  color: #ffffff;
  background-color: #f59e0b;
  border-color: #f59e0b;
}

.btn-warning:hover {
  background-color: #d97706;
  border-color: #d97706;
  color: #ffffff;
}

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

/* Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--color-gray-700);
  vertical-align: top;
  border-color: var(--color-gray-200);
  border-collapse: collapse;
}

.dark .table {
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

.table th {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gray-500);
  background-color: var(--color-gray-50);
  border-bottom: 1.5px solid var(--color-gray-200);
  text-align: left;
}

.dark .table th {
  color: #94a3b8 !important;
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

.table td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-gray-100);
  vertical-align: middle;
}

.dark .table td {
  border-color: #334155 !important;
}

.table-sm th, .table-sm td {
  padding: 0.5rem 0.75rem !important;
}

.table-hover tbody tr:hover {
  background-color: var(--color-gray-50);
}

.dark .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.01);
}

.dark .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.01);
}

.table-bordered {
  border: 1px solid var(--color-gray-200);
}

.dark .table-bordered {
  border-color: var(--color-gray-800);
}

.table-bordered th, .table-bordered td {
  border: 1px solid var(--color-gray-200);
}

.dark .table-bordered th, .dark .table-bordered td {
  border: 1px solid var(--color-gray-800);
}

/* Solid BG Utilities */
.bg-primary {
  background-color: var(--color-brand-500) !important;
  color: #ffffff !important;
}
.bg-success {
  background-color: #10b981 !important;
  color: #ffffff !important;
}
.bg-danger {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}
.bg-warning {
  background-color: #f59e0b !important;
  color: #ffffff !important;
}
.bg-info {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}
.bg-secondary {
  background-color: #6b7280 !important;
  color: #ffffff !important;
}
.bg-dark {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}
.dark .bg-dark {
  background-color: #111827 !important;
}

/* Subtle / Translucent BG Utilities (Badges & Alerts) */
.bg-primary-subtle {
  background-color: rgba(79, 70, 229, 0.1) !important;
  color: #4f46e5 !important;
}
.bg-success-subtle {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
}
.bg-danger-subtle {
  background-color: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}
.bg-warning-subtle {
  background-color: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
}
.bg-info-subtle {
  background-color: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
}
.bg-secondary-subtle {
  background-color: rgba(107, 114, 128, 0.1) !important;
  color: #6b7280 !important;
}
.bg-dark-subtle {
  background-color: rgba(31, 41, 55, 0.1) !important;
  color: #1f2937 !important;
}
.dark .bg-dark-subtle {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Text helpers for badges */
.text-warning-emphasis {
  color: #d97706 !important;
}
.dark .text-warning-emphasis {
  color: #f59e0b !important;
}

/* Progress bars */
.progress {
  display: flex;
  height: 0.5rem;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: var(--color-gray-100);
  border-radius: 0.25rem;
  width: 100%;
}

.dark .progress {
  background-color: var(--color-gray-800);
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  background-color: var(--color-brand-500);
  transition: width 0.6s ease;
}

/* Alerts Banners Mapping */
.alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.15) !important;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.15) !important;
}

.alert-secondary {
  background-color: rgba(107, 114, 128, 0.1) !important;
  color: #6b7280 !important;
  border-color: rgba(107, 114, 128, 0.15) !important;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
  border-color: rgba(59, 130, 246, 0.15) !important;
}

/* Navigation Pills for Tabs (Upload e-Doc / Input Data) */
.nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  gap: 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
  text-decoration: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  border-radius: 0.5rem;
}

.dark .nav-link {
  color: rgba(255, 255, 255, 0.7);
}

.nav-link:hover {
  color: var(--color-brand-500);
  background-color: var(--color-gray-100);
}

.dark .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-link.active {
  color: #ffffff !important;
  background-color: var(--color-brand-500) !important;
}

/* Helpers & Utilities */
.text-muted {
  color: var(--color-gray-500) !important;
}

.dark .text-muted {
  color: rgba(255, 255, 255, 0.4) !important;
}

.text-dark {
  color: var(--color-gray-800) !important;
}

.dark .text-dark {
  color: rgba(255, 255, 255, 0.9) !important;
}

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.p-4 { padding: 1.5rem !important; }
.pt-2 { padding-top: 0.5rem !important; }

/* Avatar styling */
.avatar {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.2rem;
}

.bg-label-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #3b82f6 !important;
}

.bg-label-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
}

.bg-label-primary {
  background-color: rgba(79, 70, 229, 0.15) !important;
  color: #4f46e5 !important;
}

.bg-label-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
}

.bg-label-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
}

.bg-label-secondary {
  background-color: rgba(107, 114, 128, 0.15) !important;
  color: #6b7280 !important;
}

/* Bootstrap Modals support */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  /* Above the app's sticky sidebar/header (Tailwind z-9999 in layout/header.php) --
     1055 (Bootstrap default) used to render the modal BEHIND them. */
  z-index: 99999;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
  transition: transform .3s ease-out;
  transform: translate(0,-50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-scrollable {
  height: calc(100% - 1rem);
}

.modal-dialog-scrollable .modal-content {
  max-height: 100%;
  overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
  }
}

@media (min-width: 992px) {
  .modal-lg {
    max-width: 800px;
  }
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  outline: 0;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.dark .modal-content {
  background-color: #1e293b;
  border-color: #334155;
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-gray-100);
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.dark .modal-header {
  border-color: #334155;
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-800);
}

.dark .modal-title {
  color: #f8fafc;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99998;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: .5;
  cursor: pointer;
  transition: opacity 0.15s ease-in-out;
}

.btn-close:hover {
  opacity: .75;
}

.dark .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

/* Custom styles for developer cards in tentang.php */
.dev-card-banner {
  height: 100px;
  border-radius: 1rem 1rem 0 0;
  position: relative;
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 14px 14px;
}
.dev-card-badge {
  position: absolute;
  top: 12px;
  font-size: 0.72rem;
  font-weight: bold;
  color: #fff;
  background: rgba(255,255,255,0.22);
  border-radius: 20px;
  padding: 4px 12px;
}
.dev-avatar-wrap {
  position: relative;
  width: 90px;
  margin-top: -45px;
  margin-left: auto;
  margin-right: auto;
}
.dev-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 2rem;
}
.dark .dev-avatar {
  border-color: #1f2937;
  background: #111827;
}
.dev-avatar-check {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}
.dark .dev-avatar-check {
  border-color: #1f2937;
}
.dev-info-container {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 16px !important;
  margin-bottom: 16px !important;
}
.dark .dev-info-container {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dev-info-row {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: #4b5563;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}
.dev-info-row:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none !important;
}
.dark .dev-info-row {
  color: #94a3b8;
  border-bottom-color: #334155;
}
.dev-info-row i {
  width: 18px;
  margin-right: 8px;
  color: #4f46e5;
  font-size: 0.88rem;
}
.dark .dev-info-row i {
  color: #818cf8;
}
.dev-tag {
  display: inline-block;
  font-size: 0.72rem;
  border-radius: 20px;
  padding: 3px 10px;
  margin: 2px;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}
.dark .dev-tag {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

/* Additional Layout and Gutter Helpers */
.row.g-3 {
  margin-top: -0.5rem;
  margin-bottom: -0.5rem;
}
.row.g-3 > [class*="col-"] {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.row.gx-2 {
  margin-right: -0.25rem;
  margin-left: -0.25rem;
}
.row.gx-2 > [class*="col-"] {
  padding-right: 0.25rem;
  padding-left: 0.25rem;
}
.row.gy-2 {
  margin-top: -0.25rem;
  margin-bottom: -0.25rem;
}
.row.gy-2 > [class*="col-"] {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* Dark Mode Contextual Subtle Color Overrides */
.dark .text-success-emphasis { color: #34d399 !important; }
.dark .text-danger-emphasis { color: #f87171 !important; }
.dark .text-warning-emphasis { color: #fbbf24 !important; }
.dark .text-info-emphasis { color: #60a5fa !important; }
.dark .text-secondary-emphasis { color: #9ca3af !important; }

.dark .bg-success-subtle {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}
.dark .bg-danger-subtle {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}
.dark .bg-warning-subtle {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}
.dark .bg-info-subtle {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}
.dark .bg-secondary-subtle {
  background-color: rgba(107, 114, 128, 0.15) !important;
  color: #9ca3af !important;
}

/* Global Dark Mode Contrast Overrides */
.dark body {
  color: #d1d5db !important;
}
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #f8fafc !important;
}
.dark p, .dark span, .dark small, .dark li, .dark label, .dark td, .dark th {
  color: inherit;
}
.dark p {
  color: #94a3b8 !important;
}
.dark .text-muted {
  color: #94a3b8 !important;
}
.dark .text-dark {
  color: #f8fafc !important;
}
.dark .text-black {
  color: #f8fafc !important;
}

/* Light / Dark bg-light Utility */
.bg-light {
  background-color: var(--color-gray-50) !important;
  color: var(--color-gray-800) !important;
}
.dark .bg-light {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

/* Dark mode text colors overrides */
.dark .text-primary { color: #818cf8 !important; }
.dark .text-success { color: #34d399 !important; }
.dark .text-danger { color: #f87171 !important; }
.dark .text-warning { color: #fbbf24 !important; }
.dark .text-info { color: #60a5fa !important; }
.dark .text-secondary { color: #94a3b8 !important; }

/* Dark mode outline buttons overrides */
.btn-outline-primary {
  color: var(--color-brand-500);
  border-color: var(--color-brand-500);
  background-color: transparent;
}
.btn-outline-primary:hover {
  color: #ffffff;
  background-color: var(--color-brand-500);
  border-color: var(--color-brand-500);
}
.dark .btn-outline-primary {
  color: #818cf8 !important;
  border-color: #4f46e5 !important;
}
.dark .btn-outline-primary:hover {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

.btn-outline-success {
  color: #10b981;
  border-color: #10b981;
  background-color: transparent;
}
.btn-outline-success:hover {
  color: #ffffff;
  background-color: #10b981;
  border-color: #10b981;
}
.dark .btn-outline-success {
  color: #34d399 !important;
  border-color: #059669 !important;
}
.dark .btn-outline-success:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
}

.btn-outline-danger {
  color: #ef4444;
  border-color: #ef4444;
  background-color: transparent;
}
.btn-outline-danger:hover {
  color: #ffffff;
  background-color: #ef4444;
  border-color: #ef4444;
}
.dark .btn-outline-danger {
  color: #f87171 !important;
  border-color: #dc2626 !important;
}
.dark .btn-outline-danger:hover {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

.btn-outline-warning {
  color: #f59e0b;
  border-color: #f59e0b;
  background-color: transparent;
}
.btn-outline-warning:hover {
  color: #ffffff;
  background-color: #f59e0b;
  border-color: #f59e0b;
}
.dark .btn-outline-warning {
  color: #fbbf24 !important;
  border-color: #d97706 !important;
}
.dark .btn-outline-warning:hover {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

.btn-outline-info {
  color: #3b82f6;
  border-color: #3b82f6;
  background-color: transparent;
}
.btn-outline-info:hover {
  color: #ffffff;
  background-color: #3b82f6;
  border-color: #3b82f6;
}
.dark .btn-outline-info {
  color: #60a5fa !important;
  border-color: #2563eb !important;
}
.dark .btn-outline-info:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

/* More Dark Mode Contextual Subtle Color Overrides */
.dark .bg-primary-subtle {
  background-color: rgba(79, 70, 229, 0.15) !important;
  color: #818cf8 !important;
}

/* Alerts in Dark Mode */
.dark .alert-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}
.dark .alert-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}
.dark .alert-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}
.dark .alert-secondary {
  background-color: rgba(107, 114, 128, 0.15) !important;
  color: #94a3b8 !important;
  border-color: rgba(107, 114, 128, 0.25) !important;
}
.dark .alert-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
}

/* Card Hover Animation & Transitions */
.card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease-in-out !important;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
}
.dark .card:hover {
  transform: translateY(-2px);
  border-color: #475569 !important;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3), 0 8px 16px -8px rgba(0, 0, 0, 0.3) !important;
}

/* Scrollbars in Dark Mode */
.dark ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Flexbox and Layout Compatibility Classes */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.mt-auto { margin-top: auto !important; }
.mb-auto { margin-bottom: auto !important; }
.h-100 { height: 100% !important; }

@media (min-width: 768px) {
  .justify-content-md-end { justify-content: flex-end !important; }
  .justify-content-md-between { justify-content: space-between !important; }
}

/* Fullscreen modal variant -- .modal-dialog-centered/.modal-fullscreen (standard Bootstrap
   names) were referenced in views but never defined here, so the modal fell back to the
   default near-top, margin:0.5rem layout instead of being centered/fullscreen. */
.modal-fullscreen-custom .modal-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  margin: 0;
}
.modal-fullscreen-custom .modal-content {
  height: 100%;
  border-radius: 0;
  border: 0;
}
.modal-fullscreen-custom .modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Larger, unmistakably-clickable close button for the fullscreen modal (the default
   .btn-close is a subtle 16px x icon, easy to miss on a full-screen chart view). */
.modal-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: var(--color-gray-100);
  color: var(--color-gray-600);
  border: 0;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}
.modal-close-btn:hover {
  background-color: var(--color-gray-200);
}
.dark .modal-close-btn {
  background-color: #334155;
  color: #cbd5e1;
}
.dark .modal-close-btn:hover {
  background-color: #475569;
}

/* ==========================================
   Accordion Component (Bootstrap & Sneat compatibility)
   ========================================== */
.accordion {
  --bs-accordion-color: var(--color-gray-800);
  --bs-accordion-bg: #ffffff;
  --bs-accordion-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;
  --bs-accordion-border-color: var(--color-gray-200);
  --bs-accordion-border-width: 1px;
  --bs-accordion-border-radius: 0.5rem;
  --bs-accordion-inner-border-radius: calc(0.5rem - 1px);
  --bs-accordion-btn-padding-x: 1.25rem;
  --bs-accordion-btn-padding-y: 1rem;
  --bs-accordion-btn-color: var(--color-gray-800);
  --bs-accordion-btn-bg: var(--bs-accordion-bg);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  --bs-accordion-body-padding-x: 1.25rem;
  --bs-accordion-body-padding-y: 1.25rem;
  --bs-accordion-active-color: #4f46e5;
  --bs-accordion-active-bg: rgba(79, 70, 229, 0.05);
}

.dark .accordion {
  --bs-accordion-color: #f8fafc;
  --bs-accordion-bg: #1e293b;
  --bs-accordion-border-color: #334155;
  --bs-accordion-btn-color: #f8fafc;
  --bs-accordion-active-color: #818cf8;
  --bs-accordion-active-bg: rgba(129, 140, 248, 0.1);
}

.accordion-item {
  color: var(--bs-accordion-color);
  background-color: var(--bs-accordion-bg);
  border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
}

.accordion-item:first-of-type {
  border-top-left-radius: var(--bs-accordion-border-radius);
  border-top-right-radius: var(--bs-accordion-border-radius);
}

.accordion-item:last-of-type {
  border-bottom-right-radius: var(--bs-accordion-border-radius);
  border-bottom-left-radius: var(--bs-accordion-border-radius);
}

.accordion-item:not(:first-of-type) {
  border-top: 0;
}

.accordion-header {
  margin-bottom: 0;
}

.accordion-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);
  font-size: 0.88rem;
  color: var(--bs-accordion-btn-color) !important;
  text-align: left;
  background-color: var(--bs-accordion-btn-bg) !important;
  border: 0;
  border-radius: 0;
  overflow-anchor: none;
  transition: var(--bs-accordion-transition);
}

.accordion-button:hover {
  background-color: var(--color-gray-50) !important;
}

.dark .accordion-button:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

.accordion-item:first-of-type .accordion-button {
  border-top-left-radius: var(--bs-accordion-inner-border-radius);
  border-top-right-radius: var(--bs-accordion-inner-border-radius);
}

.accordion-item:last-of-type .accordion-button.collapsed {
  border-bottom-right-radius: var(--bs-accordion-inner-border-radius);
  border-bottom-left-radius: var(--bs-accordion-inner-border-radius);
}

.accordion-button:not(.collapsed) {
  color: var(--bs-accordion-active-color) !important;
  background-color: var(--bs-accordion-active-bg) !important;
  box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);
}

.accordion-button::after {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease-in-out;
  color: var(--color-gray-400);
}

.dark .accordion-button::after {
  color: rgba(255, 255, 255, 0.4);
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
  color: var(--bs-accordion-active-color);
}

.accordion-button:focus {
  z-index: 3;
  outline: 0;
  box-shadow: var(--bs-accordion-btn-focus-box-shadow);
}

.accordion-body {
  padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x);
}

.accordion-flush .accordion-item {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.accordion-flush .accordion-item:first-child {
  border-top: 0;
}

.accordion-flush .accordion-item:last-child {
  border-bottom: 0;
}

.accordion-flush .accordion-item .accordion-button {
  border-radius: 0 !important;
}
