/*
 * app.css — Custom override Admin Template Bad27
 * Tailwind + Bootstrap coexist: Tailwind handles shell (sidebar/topbar/footer),
 * Bootstrap handles legacy page fragments di #bcontent.
 */

/* ════════════════════════════════════════════════════
   Front Page — Loading Screen (rdm-*)
   Dipakai oleh semua halaman di src/front/
   ════════════════════════════════════════════════════ */
#app_loader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #022c22 0%, #064e3b 55%, #065f46 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#app_loader.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.rdm-logo-ring {
  position: relative; width: 148px; height: 148px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.rdm-logo-ring::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #6ee7b7; border-right-color: #34d399;
  animation: rdm-spin 1.6s linear infinite;
}
.rdm-logo-ring::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px solid rgba(110,231,183,0.18);
}
.rdm-logo-img {
  width: 138px; height: 138px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 32px rgba(52,211,153,0.25);
  animation: rdm-glow 2.8s ease-in-out infinite;
}
.rdm-title {
  color: #fff; font-size: 1.5rem; font-weight: 800;
  letter-spacing: 0.12em; margin-bottom: 3px;
}
.rdm-sub {
  color: #6ee7b7; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.3em; margin-bottom: 18px;
}
.rdm-bismillah {
  color: rgba(255,255,255,0.55); font-size: 1.125rem;
  margin-bottom: 32px; font-family: serif; letter-spacing: 0.04em;
}
.rdm-dots { display: flex; gap: 9px; }
.rdm-dots span {
  display: block; width: 9px; height: 9px;
  border-radius: 50%; background: #6ee7b7;
  animation: rdm-dot 1.5s ease-in-out infinite;
}
.rdm-dots span:nth-child(2) { animation-delay: 0.22s; }
.rdm-dots span:nth-child(3) { animation-delay: 0.44s; }
@keyframes rdm-spin  { to { transform: rotate(360deg); } }
@keyframes rdm-glow  {
  0%, 100% { box-shadow: 0 0 28px rgba(52,211,153,0.2); }
  50%       { box-shadow: 0 0 48px rgba(52,211,153,0.45); }
}
@keyframes rdm-dot {
  0%, 60%, 100% { transform: translateY(0);   opacity: 0.35; }
  30%            { transform: translateY(-9px); opacity: 1;    }
}

/* ════════════════════════════════════════════════════
   Front Page — Layout base
   Dipakai oleh semua halaman di src/front/
   ════════════════════════════════════════════════════ */
.rd-front-body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #fff;
  min-height: 100vh;
  padding: 40px 16px 32px;
}
.rd-front-container {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

/* Header card standar (hijau) */
.rd-front-header {
  background: #059669;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(5,150,105,.18);
  margin-bottom: 20px;
  overflow: hidden;
}
.rd-front-header-body {
  padding: 28px 24px;
  text-align: center;
  color: #fff;
}
.rd-front-logo {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: #fff;
  padding: 4px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}
.rd-front-header-body h1,
.rd-front-header-body h2 {
  font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; color: #fff;
}
.rd-front-header-body p { margin: 0; color: rgba(255,255,255,0.82); font-size: 13px; line-height: 1.6; }

/* Content card standar */
.rd-front-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 24px;
  margin-bottom: 16px;
}

/* ════════════════════════════════════════════════════
   Select2 — Global single selection 40px
   Berlaku untuk semua halaman (admin & front).
   Sidebar override (#wsearch) tetap 32px karena lebih spesifik.
   ════════════════════════════════════════════════════ */
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
  font-size: 13px;
  color: #111827;
  padding-left: 12px;
  padding-right: 30px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open  .select2-selection--single {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
  outline: none;
}

/* ── Body & base ── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Sidebar scrollbar ── */
#sidebar nav::-webkit-scrollbar        { width: 4px; }
#sidebar nav::-webkit-scrollbar-track  { background: transparent; }
#sidebar nav::-webkit-scrollbar-thumb  { background: rgba(255,255,255,.1); border-radius: 2px; }
#sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ── Select2 dalam sidebar (dark theme) ── */
#wsearch + .select2-container .select2-selection--single {
  background-color: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  height: 32px;
  color: #d1d5db;
}
#wsearch + .select2-container .select2-selection--single .select2-selection__rendered {
  color: #9ca3af;
  line-height: 32px;
  font-size: 12px;
  padding-left: 10px;
}
#wsearch + .select2-container .select2-selection--single .select2-selection__arrow {
  height: 32px;
}

/* ── Bwrap content area: reset Pages template margin ── */
#bcontent .bwrap-content {
  min-height: 100%;
}

/* ── Jumbotron parallax override (legacy pages): kurangi padding besar ── */
#bcontent .jumbotron[data-pages="parallax"] {
  padding: 16px 0 12px;
  min-height: unset;
  background-color: #f9fafb;
}

/* ── Container fixed lg override: beri padding atas kecil ── */
#bcontent .container-fixed-lg {
  padding-top: 0;
}

/* ── Card legacy di bcontent: beri border-radius modern ── */
#bcontent .card-default {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ── W2UI dalam bcontent ── */
#bcontent .w2ui-grid,
#bcontent .w2ui-toolbar {
  border-radius: 6px;
}

/* ── Breadcrumb dalam bcontent ── */
#bcontent .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 4px;
  font-size: 12px;
}

/* ── Rotate chevron utility (untuk accordion sidebar) ── */
.rotate-90 {
  transform: rotate(90deg);
}

/* ── Sidebar menu link colors (Metronic coal palette) ── */
#sidebar .rd-mlink {
  color: rgba(255, 255, 255, 1);
}
#sidebar .rd-mlink:hover {
  color: rgba(255, 255, 255, .7);
  background-color: rgba(255, 255, 255, 0.07);
}
#sidebar .rd-mlink.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.10);
}
#sidebar .rd-mlink .rd-chevron {
  color: #4b4b6b;
}
#sidebar .rd-mlink:hover .rd-chevron {
  color: rgba(255, 255, 255, 0.5);
}
#sidebar .rd-mlink .rd-dot {
  background-color: rgba(255, 255, 255, 0.25);
}
#sidebar .rd-mlink:hover .rd-dot,
#sidebar .rd-mlink.active .rd-dot {
  background-color: rgba(255, 255, 255, 0.5);
}

/* ── rd-btn: tombol standar Metronic-style ── */
.rd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.rd-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.rd-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* outline — sesuai kt-btn-outline */
.rd-btn-outline {
  background: #ffffff;
  border-color: #e4e6ef;
  color: #374151;
}
.rd-btn-outline:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* primary — emerald */
.rd-btn-primary {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.rd-btn-primary:hover:not(:disabled) {
  background: #047857;
  border-color: #047857;
}

/* danger — red untuk hapus */
.rd-btn-danger {
  background: #ffffff;
  border-color: #fca5a5;
  color: #dc2626;
}
.rd-btn-danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
}

/* ── rd-table: DataTable styling bersih ── */
#bcontent table.rd-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
#bcontent table.rd-table thead tr th {
  background: #f8fafc;
  color: #6b7280;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 9px 12px;
  border-bottom: 1px solid #e5e7eb;
  border-top: none;
  white-space: nowrap;
}
#bcontent table.rd-table tbody tr td {
  padding: 9px 12px;
  vertical-align: middle;
  border-top: 1px solid #f3f4f6;
  color: #374151;
}
#bcontent table.rd-table tbody tr:first-child td {
  border-top: none;
}
#bcontent table.rd-table tbody tr:hover td {
  background: #f9fafb;
}
/* DataTables scrollX: header wrapper — biar tidak ada scroll-x ganda */
#bcontent .dataTables_scrollHeadInner { box-sizing: border-box; }
#bcontent .dataTables_scrollBody { overflow-x: hidden !important; }
#bcontent .dataTables_scroll { overflow: visible; }
/* Pagination bawaan disembunyikan via JS fnDrawCallback di tiap page */

/* ════════════════════════════════════════════════════
   Select2 — Global Keenthemes-like style
   ════════════════════════════════════════════════════ */

/* Saat modal terbuka, select2 di luar modal harus di bawah backdrop (1040) */
body.modal-open .select2-container { z-index: 1030 !important; }
body.modal-open .select2-dropdown  { z-index: 1030 !important; }
/* Select2 di dalam modal tetap di atas modal (1050) */
body.modal-open .modal .select2-container { z-index: 1055 !important; }
body.modal-open .modal .select2-dropdown  { z-index: 1055 !important; }

/* ── Dropdown container ── */
.select2-dropdown {
  border: 1px solid #e5e7eb;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
}
.select2-container--default .select2-dropdown--below { border-top: none; border-radius: 0 0 10px 10px !important; }
.select2-container--default .select2-dropdown--above { border-bottom: none; border-radius: 10px 10px 0 0 !important; }

/* Search dalam dropdown */
.select2-container--default .select2-search--dropdown {
  padding: 8px 8px 4px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  outline: none;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
}

/* Options */
.select2-results__options { padding: 4px; }
.select2-results__option {
  font-size: 13px;
  padding: 7px 10px;
  color: #374151;
  border-radius: 6px;
  transition: background .1s;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #f3f4f6;
  color: #111827;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}
.select2-results__option--group { padding: 0; }
.select2-results__group {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 6px 10px 2px;
}

/* Loading / no results */
.select2-container--default .select2-results__option.loading-results,
.select2-container--default .select2-results__option.select2-results__message {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  padding: 12px;
}

/* ── Arrow: fix global centering (default Select2 arrow container is top:1px height:26px) ── */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 0 !important;
  height: 100% !important;
  right: 8px;
  width: 20px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -3px;
  margin-left: -4px;
  border-color: #9ca3af transparent transparent transparent;
  border-style: solid;
  border-width: 5px 4px 0;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent #6b7280 transparent;
  border-width: 0 4px 5px;
  margin-top: -2px;
}

/* ── Select2 pill style (filter bar) ── */
.rd-filter-pill .select2-container .select2-selection--single {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  height: 36px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .15s;
}
.rd-filter-pill .select2-container .select2-selection--single:hover {
  border-color: #d1d5db;
}
.rd-filter-pill .select2-container.select2-container--open .select2-selection--single,
.rd-filter-pill .select2-container.select2-container--focus .select2-selection--single {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
  outline: none;
}
.rd-filter-pill .select2-container .select2-selection--single .select2-selection__rendered {
  color: #374151;
  line-height: 36px;
  font-size: 13px;
  padding-left: 12px;
  padding-right: 28px;
}
.rd-filter-pill .select2-container .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af;
}
.rd-filter-pill .select2-container .select2-selection--single .select2-selection__clear {
  color: #9ca3af;
  margin-right: 4px;
  line-height: 36px;
}

/* ── Select2 dalam rd-modal (matching rd-input: height 40px) ── */
.rd-modal .select2-container--default .select2-selection--single {
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color .15s, box-shadow .15s;
}
.rd-modal .select2-container--default.select2-container--focus .select2-selection--single,
.rd-modal .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
  outline: none;
}
.rd-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
  font-size: 13px;
  color: #111827;
  padding-left: 12px;
  padding-right: 30px;
}
.rd-modal .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af;
}
.rd-modal .select2-container--default .select2-selection--single .select2-selection__clear {
  line-height: 40px;
  color: #9ca3af;
  margin-right: 4px;
}

/* ════════════════════════════════════════════════════
   rd-w2grid — W2UI Grid Tailwind/Keenthemes style
   Tambahkan class rd-w2grid ke wrapper div yang
   membungkus div target w2grid.

   WAJIB di setiap .w2grid() config agar row height
   konsisten dengan line-height:44px di CSS ini:
     recordHeight : 44,
     show         : { footer: true },
   ════════════════════════════════════════════════════ */
.rd-w2grid .w2ui-grid { border:none !important; }

/* Header */
.rd-w2grid .w2ui-head    { background:#f9fafb !important; }
.rd-w2grid .w2ui-head td { border-bottom:1px solid #e5e7eb !important; border-right:none !important; }
.rd-w2grid .w2ui-col-header { font-size:11px !important; font-weight:600 !important; color:#6b7280 !important;
                               text-transform:uppercase !important; letter-spacing:.04em !important;
                               padding:10px 14px !important; line-height:1.4 !important; white-space:nowrap !important; }

/* Header kolom # (div polos tanpa class) */
.rd-w2grid td.w2ui-col-number > div { font-size:11px !important; font-weight:600 !important; color:#6b7280 !important;
                                       text-transform:uppercase !important; letter-spacing:.04em !important;
                                       padding:10px 0 !important; line-height:1.4 !important; text-align:center !important; }

/* Data rows */
.rd-w2grid .w2ui-grid-data { border-bottom:1px solid #f3f4f6 !important; border-right:none !important;
                              padding:0 14px !important; font-size:13px !important; color:#374151 !important;
                              line-height:44px !important; overflow:hidden !important; }
.rd-w2grid .w2ui-grid tr.w2ui-odd  .w2ui-grid-data,
.rd-w2grid .w2ui-grid tr.w2ui-even .w2ui-grid-data       { background:#fff !important; }
.rd-w2grid .w2ui-grid tr.w2ui-odd:hover  .w2ui-grid-data,
.rd-w2grid .w2ui-grid tr.w2ui-even:hover .w2ui-grid-data { background:#f9fafb !important; }
.rd-w2grid .w2ui-grid tr.w2ui-selected   .w2ui-grid-data { background:#ecfdf5 !important; color:#065f46 !important; }

/* Kolom # — cell data */
.rd-w2grid .w2ui-col-number .w2ui-grid-data { color:#d1d5db !important; font-size:11px !important; font-weight:600 !important;
                                               padding:0 !important; line-height:44px !important; text-align:center !important;
                                               border-right:1px solid #f3f4f6 !important; background:#f9fafb !important; }

/* Footer */
.rd-w2grid .w2ui-grid-footer       { background:#f9fafb !important; border-top:1px solid #e5e7eb !important; }
.rd-w2grid .w2ui-grid-footer > div { font-size:12px !important; color:#6b7280 !important;
                                      line-height:38px !important; padding:0 12px !important; }

/* Sembunyikan row internal w2ui (frecords spacer) */
.rd-w2grid tr[line="0"] td,
.rd-w2grid tr[line="top"] td { height:0 !important; line-height:0 !important; padding:0 !important;
                                overflow:hidden !important; border:none !important; }
.w2ui-grid-data-spacer { display:none; }

/* ════════════════════════════════════════════════════
   rd-form — Context untuk Select2 height 40px
   Cocok dengan rd-input. Pakai class ini di wrapper
   div filter bar atau form di luar modal.
   ════════════════════════════════════════════════════ */
.rd-form .select2-container--default .select2-selection--single {
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.rd-form .select2-container--default.select2-container--focus .select2-selection--single,
.rd-form .select2-container--default.select2-container--open  .select2-selection--single {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
  outline: none;
}
.rd-form .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
  font-size: 13px;
  color: #111827;
  padding-left: 12px;
  padding-right: 30px;
}
.rd-form .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af;
}
.rd-form .select2-container--default .select2-selection--single .select2-selection__clear {
  line-height: 40px;
  color: #9ca3af;
  margin-right: 4px;
}

/* ════════════════════════════════════════════════════
   rd-modal — Modal paten (dipakai di semua halaman)
   ════════════════════════════════════════════════════ */

/* Backdrop blur */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.in {
  opacity: 1 !important;
  background-color: rgba(15, 23, 42, 0.4) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Dialog sizing */
.rd-modal .modal-dialog {
  margin: 60px auto;
}
@media (max-width: 600px) {
  .rd-modal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
  }
  .rd-modal .modal-content {
    border-radius: 20px 20px 0 0 !important;
    width: 100%;
  }
  .rd-modal-body {
    max-height: 70dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Card putih */
.rd-modal .modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.14), 0 4px 16px rgba(0,0,0,.07);
  overflow: hidden;
}

/* Header */
.rd-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rd-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}
.rd-modal-close {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #9ca3af;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.rd-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}
.rd-modal-close svg { display: block; }

/* Body */
.rd-modal-body {
  padding: 20px 24px 4px;
}

/* Footer — right-aligned */
.rd-modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Form fields paten ── */
.rd-field {
  margin-bottom: 16px;
}
.rd-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}
.rd-field label .rd-req {
  color: #ef4444;
  margin-left: 2px;
}

/* Input text standar */
.rd-input {
  display: block;
  width: 100%;
  padding: 9px 12px;
  height: 40px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.rd-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}
.rd-input::placeholder { color: #9ca3af; }
.rd-input:disabled    { background: #f9fafb; color: #9ca3af; cursor: not-allowed; }

textarea.rd-input {
  height: auto;
  min-height: 80px;
  resize: vertical;
}

/* Cancel — text-only button */
.rd-btn-cancel {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
  line-height: 1;
}
.rd-btn-cancel:hover:not(:disabled) {
  background: #f3f4f6;
  color: #374151;
}

/* ════════════════════════════════════════════════════
   Flatpickr — Keenthemes-inspired theme
   ════════════════════════════════════════════════════ */

/* Input: tampilannya seperti rd-input biasa (bukan readonly abu) */
.flatpickr-input[readonly] {
  cursor: pointer;
  background: #ffffff !important;
  color: #111827 !important;
  opacity: 1 !important;
}
.flatpickr-input[readonly]:hover {
  border-color: #d1d5db !important;
}

/* Calendar popup container */
.flatpickr-calendar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  padding: 0;
  width: 280px;
  font-family: 'Inter', system-ui, sans-serif;
}
.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after { display: none; }
.flatpickr-calendar.arrowBottom::before,
.flatpickr-calendar.arrowBottom::after { display: none; }

/* Month header */
.flatpickr-months {
  background: #f8fafc;
  border-radius: 14px 14px 0 0;
  padding: 10px 8px 8px;
  align-items: center;
}
.flatpickr-month {
  background: transparent;
  height: 32px;
  line-height: 32px;
  color: #111827;
}
.flatpickr-current-month {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  padding-top: 0;
  height: 32px;
  line-height: 32px;
}
.flatpickr-current-month .cur-month {
  font-weight: 600;
  color: #111827;
}
.flatpickr-current-month .cur-month:hover {
  background: #f3f4f6;
}
.flatpickr-current-month input.cur-year {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
}
.flatpickr-current-month .numInputWrapper span {
  border-color: #e5e7eb;
}

/* Prev / Next arrows */
.flatpickr-prev-month,
.flatpickr-next-month {
  padding: 6px 8px;
  color: #9ca3af;
  fill: #9ca3af;
  top: 10px;
  border-radius: 8px;
  transition: background .15s, color .15s, fill .15s;
}
.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  color: #059669;
  fill: #059669;
  background: #ecfdf5;
}
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  width: 13px;
  height: 13px;
}

/* Weekday row */
.flatpickr-weekdays {
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  padding: 0 8px 6px;
}
span.flatpickr-weekday {
  background: transparent;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Days grid */
.flatpickr-days {
  border: none;
  width: 280px;
}
.dayContainer {
  width: 100%;
  min-width: unset;
  max-width: unset;
  padding: 6px 8px 8px;
  gap: 0;
}

/* Day cell */
.flatpickr-day {
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  height: 32px;
  line-height: 32px;
  max-width: 32px;
  transition: background .1s, color .1s;
}
.flatpickr-day:hover,
.flatpickr-day:focus {
  background: #f3f4f6;
  border-color: transparent;
  color: #111827;
  outline: none;
}

/* Today */
.flatpickr-day.today {
  border: none;
  color: #059669;
  font-weight: 700;
  position: relative;
}
.flatpickr-day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #059669;
}
.flatpickr-day.today:hover {
  background: #ecfdf5;
  color: #065f46;
}

/* Selected */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  font-weight: 600;
  border-radius: 8px;
}
.flatpickr-day.selected.today::after {
  background: rgba(255,255,255,.7);
}

/* Other month days */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #d1d5db;
}
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
  background: #f9fafb;
  color: #9ca3af;
}

/* Disabled */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: #e5e7eb;
  background: transparent;
  cursor: not-allowed;
}

/* Flatpickr wrapper jangan mengubah layout */
.flatpickr-wrapper {
  display: block;
  width: 100%;
}

/* Input di dalam filter-pill yang pakai flatpickr */
.rd-filter-pill .flatpickr-input[readonly] {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: border-color .15s;
}
.rd-filter-pill .flatpickr-input[readonly]:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.1);
  outline: none;
}

/* ════════════════════════════════════════════════════
   Select2 — multiple selection (tag chips)
   Samakan tampilan dengan --single (rd-input style)
   ════════════════════════════════════════════════════ */
.select2-container--default .select2-selection--multiple {
  min-height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 3px 6px;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open  .select2-selection--multiple {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
  outline: none;
}
/* Search field di dalam multiple */
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  font-size: 13px;
  font-family: inherit;
  color: #111827;
  margin-top: 3px;
  height: 28px;
  line-height: 28px;
}
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
  color: #9ca3af;
}
/* Tag/chip style — emerald */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px 2px 6px;
  margin-top: 4px;
  margin-right: 4px;
  line-height: 1.4;
}
/* X button pada chip */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #10b981;
  font-weight: 700;
  margin-right: 4px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: #065f46;
}
