/* ============================================================
   BAGUM Admin Theme - Modern Redesign
   Warna mengikuti frontend:
   Primary  : #1842b6 (Biru)
   Secondary: #ffd000 (Kuning Emas)
   Dark     : #000103 / #0b1e5b
   ============================================================ */

:root {
  --bagum-primary: #1842b6;
  --bagum-primary-dark: #0f2e85;
  --bagum-primary-darker: #0b1e5b;
  --bagum-secondary: #ffd000;
  --bagum-dark: #000103;
  --bagum-light: #f4f7fe;
  --bagum-border: #e8edf5;
  --bagum-text: #1f2937;
  --bagum-muted: #6b7a99;
  --bagum-radius: 14px;
  --bagum-shadow-sm: 0 1px 3px rgba(11, 30, 91, .06), 0 1px 2px rgba(11, 30, 91, .04);
  --bagum-shadow-md: 0 4px 16px rgba(11, 30, 91, .08);
  --bagum-shadow-lg: 0 12px 32px rgba(11, 30, 91, .12);
}

/* ------------------------------------------------------------
   General
------------------------------------------------------------ */
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif !important;
  background-color: var(--bagum-light) !important;
  background-image: none !important;
  color: var(--bagum-text);
}

p { color: var(--bagum-muted); }

h1, h2, h3, h4, h5, h6 {
  font-family: "Saira", "Inter", sans-serif;
  font-weight: 700;
  color: var(--bagum-primary-darker);
}

a { color: var(--bagum-primary); }
a:hover { color: var(--bagum-primary-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6d0e4; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--bagum-primary); }

/* ------------------------------------------------------------
   Main area
------------------------------------------------------------ */
#main {
  margin-top: 70px;
  padding: 24px 28px;
}

@media (max-width: 1199px) {
  #main { padding: 20px; }
}

/* ------------------------------------------------------------
   Page title
------------------------------------------------------------ */
.pagetitle h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--bagum-primary-darker);
  margin-bottom: 0;
  letter-spacing: -.02em;
}

.pagetitle h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-top: 6px;
  border-radius: 4px;
  background: var(--bagum-primary);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-top: 10px;
  list-style: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--bagum-shadow-sm);
  border: 1px solid var(--bagum-border);
}

.breadcrumb-item a { color: var(--bagum-muted); font-weight: 600; }
.breadcrumb-item a:hover { color: var(--bagum-primary); }
.breadcrumb-item.active { color: var(--bagum-primary); font-weight: 600; }

/* ------------------------------------------------------------
   Cards
------------------------------------------------------------ */
.card {
  border: 1px solid var(--bagum-border);
  border-radius: var(--bagum-radius);
  box-shadow: var(--bagum-shadow-md);
  background: #fff;
  transition: box-shadow .25s ease, transform .25s ease;
}

.card:hover { box-shadow: var(--bagum-shadow-lg); }

.card-body { padding: 20px 22px; }

.card-title {
  font-family: "Saira", "Inter", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--bagum-primary-darker);
  /* timpa penuh shorthand padding dari style.css agar jarak atas
     konsisten & garis aksen bisa disejajarkan dengan teks;
     padding-left memberi spasi antara garis aksen dan judul */
  padding: 0 0 12px 15px;
  position: relative;
  /* kandung float tombol (float-end) agar tidak menjorok
     menyempitkan tabel di bawahnya */
  display: flow-root;
}

.card-title::before {
  content: "";
  position: absolute;
  left: 0;
  /* sejajar dengan baris teks pertama judul */
  top: -1px;
  height: 22px;
  width: 4px;
  border-radius: 4px;
  background: var(--bagum-primary);
}

.card-title span { color: var(--bagum-primary); }

.info-card h6 { color: var(--bagum-muted); }
.info-card p { font-size: 26px; font-weight: 800; color: var(--bagum-primary-darker); }

/* ------------------------------------------------------------
   Header / Topbar
------------------------------------------------------------ */
.header {
  background: #1842B6 !important;
  box-shadow: 0 4px 20px rgba(11, 30, 91, .25);
  transition: all .3s ease;
}

/* color-strip 3 warna (biru-kuning-hijau) menempel di bawah top bar,
   sama seperti strip identitas di halaman frontend */
.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 6px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    #0026ffcb 0% 33.334%,
    #ffeb00 33.334% 66.667%,
    #009905 66.667% 100%);
}

/* logo di pojok kiri atas header (timpa margin-left:50px dari style.css) */
.header .logo { margin-left: 0; }
.header .logo img {
  max-height: 42px;
  height: 42px;
  width: auto;
  margin-left: 0 !important;
  margin-right: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}

.header .toggle-sidebar-btn {
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  transition: transform .2s ease;
}
.header .toggle-sidebar-btn:hover { transform: scale(1.15); color: var(--bagum-secondary); }

.header-nav .nav-link {
  color: rgba(255,255,255,.92) !important;
  transition: color .2s ease;
}
.header-nav .nav-link:hover,
.header-nav .nav-link:focus { color: var(--bagum-secondary) !important; }

.header-nav .badge-number {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--bagum-secondary) !important;
  color: var(--bagum-primary-darker) !important;
  font-weight: 700;
}

.header-nav .notifications { min-width: 320px; }
.header-nav .notifications .notification-item h4 {
  font-size: 14px;
  color: var(--bagum-primary-darker);
}
.header-nav .notifications .dropdown-header {
  background: var(--bagum-primary);
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
}

.nav-profile { align-items: center; }
.nav-profile img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 2px solid var(--bagum-secondary);
}
.nav-profile .dropdown-toggle { color: #fff; font-weight: 600; }

.profile .dropdown-header h6 { color: var(--bagum-primary-darker); font-weight: 700; }
.profile .dropdown-header span { color: var(--bagum-muted); font-size: 12px; }
.profile .dropdown-item span { color: var(--bagum-text); }
.profile .dropdown-item:hover { background: rgba(24, 66, 182, .08); }

/* ------------------------------------------------------------
   Sidebar - Modern (kuning khas Bagian Umum, aksen navy)
------------------------------------------------------------ */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--bagum-border);
  box-shadow: 4px 0 24px rgba(11, 30, 91, .04);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 30, 91, .22) transparent;
}

/* scrollbar tipis */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(11, 30, 91, .22); border-radius: 8px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(11, 30, 91, .38); }

.sidebar-nav { padding: 8px 0 22px; }

.sidebar-nav .nav-item a {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(11, 30, 91, .80);
  background: transparent;
  padding: 9px 14px;
  border-radius: 11px;
  margin: 3px 12px;
  transition: all .18s ease;
}

/* ikon dalam kotak membulat */
.sidebar-nav .nav-item a > i:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  margin-right: 10px;
  border-radius: 9px;
  font-size: 16.5px;
  color: var(--bagum-primary-darker);
  background: rgba(11, 30, 91, .08);
  transition: all .18s ease;
}

.sidebar-nav .nav-item a:hover {
  color: var(--bagum-primary-dark);
  background: rgba(24, 66, 182, .06);
}
.sidebar-nav .nav-item a:hover > i:first-child {
  background: var(--bagum-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* item grup yang terbuka / item aktif
   (hanya link langsung li.nav-item — jangan menimpa link submenu,
    karena ul.nav-content juga berada di dalam li.nav-item) */
.sidebar-nav .nav-item > a.nav-link.active,
.sidebar-nav .nav-item > a.nav-link:not(.collapsed) {
  background: #1842B6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(24, 66, 182, .30);
}
.sidebar-nav .nav-item > a.nav-link.active > i:first-child,
.sidebar-nav .nav-item > a.nav-link:not(.collapsed) > i:first-child {
  background: rgba(255, 255, 255, .16);
  color: var(--bagum-secondary);
}

/* aksen bar kuning di tepi kiri item aktif */
.sidebar-nav .nav-item > a.nav-link.active::before,
.sidebar-nav .nav-item > a.nav-link:not(.collapsed)::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 55%;
  border-radius: 0 4px 4px 0;
  background: var(--bagum-secondary);
}

/* panah submenu */
.sidebar-nav .nav-item .bi-chevron-down { transition: transform .2s ease; }
.sidebar-nav .nav-item > a.nav-link.active .bi-chevron-down,
.sidebar-nav .nav-item > a.nav-link:not(.collapsed) .bi-chevron-down { transform: rotate(180deg); }

/* heading seksi */
.sidebar-nav .nav-heading {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  color: rgba(11, 30, 91, .55);
  margin: 20px 24px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-nav .nav-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(11, 30, 91, .15);
}

/* sub-menu */
.sidebar-nav .nav-content {
  position: relative;
  margin: 2px 12px 8px;
  padding-left: 10px;
}

/* garis penghubung vertikal submenu */
.sidebar-nav .nav-content::before {
  content: "";
  position: absolute;
  left: 26px;
  top: -4px;
  bottom: 6px;
  width: 1.5px;
  background: rgba(11, 30, 91, .18);
  border-radius: 2px;
}

.sidebar-nav .nav-content a {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: rgba(11, 30, 91, .72);
  padding: 7px 12px 7px 18px;
  border-radius: 9px;
  transition: all .18s ease;
}

.sidebar-nav .nav-content a i {
  font-size: 8px;
  color: rgba(11, 30, 91, .45);
  margin-right: 8px;
  transition: all .18s ease;
}

.sidebar-nav .nav-content a:hover {
  color: var(--bagum-primary-dark);
  background: rgba(24, 66, 182, .06);
}
.sidebar-nav .nav-content a.active {
  color: #fff;
  background: #1842B6;
  font-weight: 700;
}
.sidebar-nav .nav-content a.active i {
  color: var(--bagum-secondary);
  transform: scale(1.6);
}

/* ------------------------------------------------------------
   Buttons
------------------------------------------------------------ */
/* --- Ukuran standar seragam untuk SEMUA tombol admin --- */
.btn {
  border-radius: 9px;
  font-weight: 600;
  --bs-btn-padding-y: .5rem;
  --bs-btn-padding-x: 1.05rem;
  --bs-btn-font-size: .875rem;
  --bs-btn-border-radius: 9px;
}

/* btn-sm disamakan persis dengan tombol standar */
.btn-sm {
  --bs-btn-padding-y: .5rem;
  --bs-btn-padding-x: 1.05rem;
  --bs-btn-font-size: .875rem;
  --bs-btn-border-radius: 9px;
}

.btn-primary {
  background-color: var(--bagum-primary);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 66, 182, .30);
  transition: all .2s ease;
}
.btn-primary:hover {
  background-color: var(--bagum-primary-dark);
  color: #fff;
  box-shadow: 0 6px 18px rgba(24, 66, 182, .45);
  transform: translateY(-1px);
}

.btn-warning, .btn-outline-warning {
  --bs-btn-color: var(--bagum-primary-darker);
}
.btn-warning {
  background: var(--bagum-secondary);
  border: none;
  color: var(--bagum-primary-darker);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 208, 0, .35);
}
.btn-warning:hover { background: #ffdb33; }

.btn-success { background: #198754; border: none; }
.btn-danger { background: #dc3545; border: none; }

/* tombol riwayat/rekam: hijau agar jelas beda dari biru */
.btn-riwayat {
  background: #16a34a;
  border: none;
  color: #fff;
}
.btn-riwayat:hover {
  background: #12813c;
  color: #fff;
}
.btn-info { background: var(--bagum-primary); border: none; }

.btn-group .btn { border-radius: 8px; }

/* ------------------------------------------------------------
   Tables - Modern
------------------------------------------------------------ */
.table {
  --bs-table-striped-bg: rgba(24, 66, 182, .025);
  border-color: var(--bagum-border);
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

/* --- Header tabel --- */
.table thead th {
  background: #1842B6;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: none;
  border-bottom: none;
  padding: 13px 16px;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .15);
}

.table thead th:first-child { border-radius: 12px 0 0 12px; }
.table thead th:last-child { border-radius: 0 12px 12px 0; }

/* --- Sel body --- */
.table tbody td {
  vertical-align: middle;
  padding: 13px 16px;
  color: var(--bagum-text);
  font-size: 13.5px;
  border-bottom: 1px solid #f0f3fa;
  background: transparent;
}

.table tbody tr { transition: background .18s ease, box-shadow .18s ease; }

.table tbody tr:nth-child(even) td { background: #fafbfe; }

.table tbody tr:hover td {
  background: rgba(24, 66, 182, .055) !important;
}

.table tbody tr:last-child td { border-bottom: none; }

/* --- Aksi & elemen dalam sel (ukuran mengikuti standar .btn / .btn-sm) --- */
.table .btn {
  white-space: nowrap;
}

/* --- Sel aksi tabel: tombol sejajar satu baris & jarak seragam --- */
.table tbody td:has(> .btn) {
  white-space: nowrap;
}

.table td .btn {
  vertical-align: middle;
}

.table td > .btn + .btn {
  margin-left: 6px;
}

/* tombol ikon (hapus) tingginya disamakan dengan tombol teks */
.table td .btn-sm {
  --bs-btn-padding-y: .3rem;
}

/* Tombol di dalam input-group juga disamakan ukurannya */
.input-group .btn,
.input-group-sm .btn {
  --bs-btn-padding-y: .5rem;
  --bs-btn-padding-x: 1.05rem;
  --bs-btn-font-size: .875rem;
}

.table a:not(.btn) {
  color: var(--bagum-primary);
  font-weight: 600;
}
.table a:not(.btn):hover { text-decoration: underline; }

.table td img {
  border-radius: 10px;
  max-height: 70px;
  object-fit: cover;
  box-shadow: var(--bagum-shadow-sm);
  border: 1px solid var(--bagum-border);
}

.table td i.bi, .table td i.bx, .table td i.ri {
  vertical-align: middle;
}

/* --- Pembungkus responsif --- */
.table-modern-wrap,
.table-responsive,
.datatable-wrapper .datatable-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 66, 182, .28) transparent;
  border-radius: 12px;
}

.table-modern-wrap::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.datatable-wrapper .datatable-container::-webkit-scrollbar { height: 8px; }

.table-modern-wrap::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.datatable-wrapper .datatable-container::-webkit-scrollbar-track { background: transparent; }

.table-modern-wrap::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.datatable-wrapper .datatable-container::-webkit-scrollbar-thumb {
  background: rgba(24, 66, 182, .28);
  border-radius: 8px;
}

/* .table-responsive tanpa bingkai modern-wrap tetap dapat tampilan sama */
.card .card-body > .table-responsive:not(.table-modern-wrap) {
  border: 1px solid var(--bagum-border);
  box-shadow: inset 0 0 0 .5px var(--bagum-border);
  background: #fff;
}

.table-modern-wrap {
  border: 1px solid var(--bagum-border);
  box-shadow: inset 0 0 0 .5px var(--bagum-border);
  background: #fff;
}

.card > .card-body > .table-modern-wrap:last-child {
  margin-bottom: 4px;
}

/* --- simple-datatables chrome --- */
.datatable-wrapper .datatable-table { border-collapse: separate; border-spacing: 0; margin-bottom: 0; }
.datatable-wrapper.no-footer .datatable-container { border-bottom: none; }
.datatable-wrapper .datatable-container {
  border: 1px solid var(--bagum-border);
  background: #fff;
}

.datatable-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 2px 14px;
}

.datatable-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 2px 4px;
}

.datatable-info { color: var(--bagum-muted); font-size: 12.5px; }

.datatable-input {
  border: 1.5px solid var(--bagum-border) !important;
  border-radius: 9px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
  min-width: 200px;
  transition: all .2s ease;
}
.datatable-input:focus {
  outline: none;
  border-color: var(--bagum-primary) !important;
  box-shadow: 0 0 0 4px rgba(24, 66, 182, .12);
}

.datatable-selector {
  border: 1.5px solid var(--bagum-border) !important;
  border-radius: 9px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
}

/* panah sortir */
.datatable-sorter::before,
.datatable-sorter::after { opacity: .45; border-bottom-color: #fff; border-top-color: #fff; }
.datatable-sorter.asc::after,
.datatable-sorter.desc::before { opacity: 1; border-bottom-color: var(--bagum-secondary); border-top-color: var(--bagum-secondary); }

.datatable-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.datatable-pagination li.datatable-pagination-list-item button,
.datatable-pagination .datatable-button {
  border: 1px solid var(--bagum-border);
  background: #fff;
  color: var(--bagum-text);
  border-radius: 9px !important;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}

.datatable-pagination li button:hover:not(:disabled) {
  border-color: var(--bagum-primary);
  color: var(--bagum-primary);
}

.datatable-pagination .datatable-active button {
  background: var(--bagum-primary) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(24, 66, 182, .35);
}

.datatable-pagination li.datatable-disabled button,
.datatable-pagination li.datatable-hidden button {
  opacity: .4;
  cursor: not-allowed;
}

.datatable-empty {
  padding: 40px 16px !important;
  text-align: center;
  color: var(--bagum-muted);
  font-size: 13.5px;
}

/* ------------------------------------------------------------
   Status Pill (dibuat otomatis oleh table-enhancer.js)
------------------------------------------------------------ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1.5;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.st-pending { background: #ffedd5; color: #c2410c; }
.st-booking { background: #fff8d6; color: #8a6d00; }
.st-sukses  { background: #e5f6ec; color: #15803d; }
.st-proses  { background: #e7edfd; color: #1d4ed8; }
.st-tolak   { background: #fdeaea; color: #b91c1c; }
.st-info    { background: #e0f2fe; color: #0369a1; }

/* ------------------------------------------------------------
   Forms - Modern
------------------------------------------------------------ */
.form-control, .form-select {
  border: 1.5px solid #e3e9f5;
  border-radius: 12px;
  padding: .62rem .95rem;
  font-size: 14px;
  background-color: #f8faff;
  color: var(--bagum-text);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.form-control::placeholder { color: #a7b3cc; }

.form-control:hover:not(:disabled):not(:focus),
.form-select:hover:not(:disabled):not(:focus) {
  border-color: #c9d4ec;
}

.form-control:focus, .form-select:focus {
  background-color: #fff;
  border-color: var(--bagum-primary);
  box-shadow: 0 0 0 4px rgba(24, 66, 182, .11);
}

.form-control:disabled, .form-select:disabled,
.form-control[readonly] {
  background-color: #eef1f8;
  opacity: .75;
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

/* --- Label --- */
.form-label, .col-form-label {
  font-weight: 700;
  color: var(--bagum-primary-darker);
  font-size: 13px;
  margin-bottom: .45rem;
  display: inline-block;
}

.req-mark {
  color: #dc3545;
  margin-left: 3px;
  font-weight: 800;
}

.form-text { color: var(--bagum-muted); font-size: 12px; }

/* --- Input group (ikon dalam input) --- */
.input-group-text {
  border-radius: 12px;
  background: rgba(24, 66, 182, .06);
  border: 1.5px solid #e3e9f5;
  color: var(--bagum-primary);
  font-size: 14px;
}

.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.input-group:focus-within .input-group-text {
  border-color: var(--bagum-primary);
  color: var(--bagum-primary-dark);
}

/* --- File upload --- */
.form-control[type="file"] {
  padding: .55rem .8rem;
  cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
  border: none;
  background: rgba(24, 66, 182, .08);
  color: var(--bagum-primary-dark);
  font-weight: 700;
  font-size: 12.5px;
  padding: .45rem .95rem;
  margin-right: .9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all .2s ease;
}

.form-control[type="file"]::file-selector-button:hover {
  background: var(--bagum-primary);
  color: #fff;
}

/* --- Checkbox, radio, switch --- */
.form-check-input {
  border: 2px solid #c9d4ec;
  transition: all .18s ease;
}

.form-check-input:checked {
  background-color: var(--bagum-primary);
  border-color: var(--bagum-primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(24, 66, 182, .12);
  border-color: var(--bagum-primary);
}

.form-check-input[type="checkbox"] { border-radius: 6px; width: 1.15em; height: 1.15em; }
.form-switch .form-check-input { width: 2.6em; border-radius: 999px; }
.form-switch .form-check-input:checked { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffd000'/%3e%3c/svg%3e"); }

.form-check-label { font-size: 13.5px; color: var(--bagum-text); font-weight: 500; }

/* --- Validasi --- */
.form-control.is-invalid:focus, .form-select.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, .12);
}
.form-control.is-valid:focus, .form-select.is-valid:focus {
  border-color: #198754;
  box-shadow: 0 0 0 4px rgba(25, 135, 84, .12);
}

.invalid-feedback { font-size: 12px; font-weight: 600; }

/* --- Select2 --- */
.select2-container--bootstrap-5 .select2-selection {
  border: 1.5px solid #e3e9f5 !important;
  border-radius: 12px !important;
  background-color: #f8faff !important;
  padding: .55rem .9rem !important;
  min-height: calc(1.5em + .62rem * 2 + 3px) !important;
  transition: all .2s ease;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  background-color: #fff !important;
  border-color: var(--bagum-primary) !important;
  box-shadow: 0 0 0 4px rgba(24, 66, 182, .11) !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background: rgba(24, 66, 182, .08) !important;
  border: none !important;
  border-radius: 8px !important;
  color: var(--bagum-primary-dark) !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
}

/* --- Quill editor --- */
.quill { border-radius: 12px; overflow: hidden; border: none; }
.ql-toolbar.ql-snow {
  border: 1.5px solid #e3e9f5 !important;
  border-radius: 12px 12px 0 0;
  background: #f8faff;
  font-family: inherit;
}
.ql-container.ql-snow {
  border: 1.5px solid #e3e9f5 !important;
  border-top: none !important;
  border-radius: 0 0 12px 12px;
  font-family: inherit;
  font-size: 14px;
}

/* ------------------------------------------------------------
   Badges & Alerts
------------------------------------------------------------ */
.badge { border-radius: 20px; font-weight: 700; padding: 5px 12px; }
.bg-primary { background-color: var(--bagum-primary) !important; }

.alert {
  border-radius: 12px;
  border: none;
  box-shadow: var(--bagum-shadow-sm);
}
.alert-info { background: rgba(24, 66, 182, .08); color: var(--bagum-primary-dark); }
.alert-success { background: rgba(25, 135, 84, .1); color: #14663f; }
.alert-danger { background: rgba(220, 53, 69, .1); color: #a12833; }
.alert-warning { background: rgba(255, 208, 0, .18); color: #8a6d00; }

/* ------------------------------------------------------------
   Modal - Modern
------------------------------------------------------------ */
.modal-content {
  border: none;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(11, 30, 91, .30);
  overflow: hidden;
}

/* Header solid senada tema (#1842B6) */
.modal-header {
  background: #1842B6;
  color: #fff;
  border-bottom: none;
  padding: 15px 20px;
}

.modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .01em;
}

/* aksen bar kuning khas bagum */
.modal-header .modal-title::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--bagum-secondary);
  box-shadow: 0 0 0 3px rgba(255, 208, 0, .25);
}

.modal-header .btn-close { filter: invert(1); opacity: .85; transition: opacity .2s ease; }
.modal-header .btn-close:hover { opacity: 1; transform: rotate(90deg); }

/* Body */
.modal-body { padding: 20px 22px; }

.modal-body .form-label,
.modal-body .col-form-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--bagum-muted);
}

.modal-body .form-control,
.modal-body .form-select { border-radius: 10px; }

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: var(--bagum-primary);
  box-shadow: 0 0 0 .2rem rgba(24, 66, 182, .15);
}

/* Footer */
.modal-footer {
  background: #f7f9fd;
  border-top: 1px dashed var(--bagum-border);
  padding: 13px 20px;
  gap: 8px;
}

.modal-footer .btn { min-width: 100px; }

/* Modal yang footer-nya masih berada di dalam .modal-body (markup lama)
   tetap tampil rapi memenuhi lebar konten */
.modal-body .modal-footer {
  margin: 6px -22px -20px;
  border-radius: 0;
}

/* Animasi masuk dari bawah dengan sedikit scale */
.modal.fade .modal-dialog {
  transform: translateY(28px) scale(.97);
  transition: transform .28s cubic-bezier(.34, 1.3, .64, 1);
}
.modal.show .modal-dialog { transform: none; }

/* Backdrop lebih lembut */
.modal-backdrop.show { opacity: .55; }

/* ------------------------------------------------------------
   Pagination
------------------------------------------------------------ */
.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 3px;
  color: var(--bagum-primary);
  font-weight: 600;
  border: 1px solid var(--bagum-border);
}
.pagination .page-item.active .page-link {
  background: var(--bagum-primary);
  border-color: var(--bagum-primary);
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.footer {
  background: transparent;
  border-top: 1px solid var(--bagum-border);
  padding: 18px 0;
  transition: all .3s;
}

.footer .copyright {
  text-align: center;
  color: var(--bagum-muted);
  font-size: 13.5px;
}

.footer .copyright strong span {
  color: var(--bagum-primary);
  font-weight: 700;
}

/* ------------------------------------------------------------
   Back to top
------------------------------------------------------------ */
.back-to-top {
  background: var(--bagum-primary);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(24, 66, 182, .4);
}
.back-to-top:hover {
  background: var(--bagum-secondary);
  color: var(--bagum-primary-darker);
}

/* ------------------------------------------------------------
   FullCalendar - Modern
------------------------------------------------------------ */
.fc {
  --fc-border-color: #edf1f9;
  --fc-page-bg-color: #ffffff;
  --fc-neutral-bg-color: rgba(24, 66, 182, .05);
  --fc-today-bg-color: rgba(255, 208, 0, .16);
  --fc-highlight-color: rgba(24, 66, 182, .08);
  --fc-event-bg-color: var(--bagum-primary);
  --fc-event-border-color: transparent;
  --fc-event-text-color: #fff;
  --fc-more-link-bg-color: rgba(24, 66, 182, .08);
  --fc-more-link-text-color: var(--bagum-primary-dark);
  font-family: inherit;
}

/* --- Toolbar --- */
.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.fc .fc-toolbar-title {
  font-family: "Saira", "Inter", sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--bagum-primary-darker);
  text-transform: capitalize;
}

.fc .fc-button {
  border-radius: 10px !important;
  padding: .42em .85em !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  box-shadow: none !important;
  transition: all .2s ease !important;
}

.fc .fc-button-primary {
  background: rgba(24, 66, 182, .07) !important;
  border: none !important;
  color: var(--bagum-primary-dark) !important;
}

.fc .fc-button-primary:hover {
  background: var(--bagum-primary) !important;
  color: #fff !important;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--bagum-primary) !important;
  color: #fff !important;
}

.fc .fc-today-button {
  background: var(--bagum-secondary) !important;
  color: var(--bagum-primary-darker) !important;
  font-weight: 700 !important;
}

.fc .fc-today-button:hover { filter: brightness(.96); }

.fc .fc-prev-button,
.fc .fc-next-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

/* --- Grid & borders --- */
.fc .fc-scrollgrid {
  border-radius: 12px !important;
  overflow: hidden;
  border: 1px solid var(--bagum-border) !important;
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: #edf1f9 !important;
}

/* --- Header hari --- */
.fc .fc-col-header-cell {
  background: #f7f9fd !important;
  padding: 10px 0;
}

.fc .fc-col-header-cell-cushion {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--bagum-muted);
  padding: 2px 4px;
  text-decoration: none;
}

/* --- Sel tanggal --- */
.fc .fc-daygrid-day { transition: background .15s ease; }
.fc .fc-daygrid-day:hover:not(.fc-day-today) { background: rgba(24, 66, 182, .03); }

.fc .fc-daygrid-day-number {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bagum-text);
  padding: 7px 9px;
  text-decoration: none;
}

.fc .fc-day-today .fc-daygrid-day-number {
  width: 26px;
  height: 26px;
  margin: 5px 8px 0 auto;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bagum-primary);
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(24, 66, 182, .35);
}

.fc .fc-day-other .fc-daygrid-day-number { color: #b9c3d8; }

.fc .fc-daygrid-day-frame { min-height: 105px; }

/* --- Event --- */
.fc .fc-daygrid-event {
  border-radius: 8px !important;
  border: none !important;
  padding: 2px 8px !important;
  margin: 2px 4px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.fc .fc-daygrid-event:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 5px 12px rgba(11, 30, 91, .22);
}

.fc .fc-daygrid-dot-event { padding: 3px 4px; border-radius: 8px; }
.fc .fc-daygrid-dot-event .fc-event-title { font-weight: 600; }

.fc .fc-daygrid-more-link {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

/* --- Popover (+more) --- */
.fc .fc-popover {
  border-radius: 14px !important;
  border: 1px solid var(--bagum-border) !important;
  box-shadow: var(--bagum-shadow-lg) !important;
  overflow: hidden;
}

.fc .fc-popover-header {
  background: var(--bagum-primary-darker) !important;
  color: #fff !important;
  padding: 9px 14px;
}

.fc .fc-popover-title { font-weight: 700; font-size: 13px; }
.fc .fc-popover-close { color: #fff; opacity: .85; }
.fc .fc-popover-close:hover { opacity: 1; }
.fc .fc-popover-body { padding: 10px; }

/* --- View list (jika dipakai) --- */
.fc .fc-list-day-cushion { background: #f7f9fd; }
.fc .fc-list-event:hover td { background: rgba(24, 66, 182, .04); }

/* ------------------------------------------------------------
   Login page
------------------------------------------------------------ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bagum-primary-darker);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, .98);
  border: none;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}

.login-card .login-strip { height: 6px; display: flex; }
/* tiga segmen sama lebar agar warna kuning tepat di tengah,
   konsisten dengan color-strip header & frontend */
.login-card .login-strip span { flex: 1; }
.login-card .login-strip span:nth-child(1) { background: var(--bagum-primary); }
.login-card .login-strip span:nth-child(2) { background: var(--bagum-secondary); }
.login-card .login-strip span:nth-child(3) { background: #009905; }

.login-logo { max-height: 74px; max-width: 240px; width: auto; height: auto; margin: 0 auto 10px; display: block; }

.login-subtitle {
  text-align: center;
  color: var(--bagum-muted);
  font-size: 13.5px;
}

.login-footer {
  text-align: center;
  color: rgba(255, 255, 255, .75);
  font-size: 12.5px;
  margin-top: 16px;
}

.login-footer strong { color: var(--bagum-secondary); }

/* ------------------------------------------------------------
   Misc
------------------------------------------------------------ */
.text-primary { color: var(--bagum-primary) !important; }

.section { padding: 0 0 10px; }

.dropdown-menu {
  border-radius: 14px;
  border: 1px solid var(--bagum-border);
  box-shadow: var(--bagum-shadow-lg);
  z-index: 1000;
}

.flash-data, .flash-data-gagal { display: none; }

/* ------------------------------------------------------------
   MOBILE RESPONSIVE
------------------------------------------------------------ */

/* --- Backdrop sidebar (mobile) --- */
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1199px) {
  body.toggle-sidebar .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 30, 91, .45);
    backdrop-filter: blur(2px);
    z-index: 995;
    animation: bagumFadeIn .25s ease;
  }
}

@keyframes bagumFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Tablet & turun (<= 991px) --- */
@media (max-width: 991.98px) {

  #main { padding: 18px 16px; }

  .pagetitle h1 { font-size: 22px; }

  .card-body { padding: 16px; }

  .table thead th { padding: 11px 12px; font-size: 11.5px; }
  .table tbody td { padding: 11px 12px; }

  .modal-dialog { margin: 12px; }

  /* cegah zoom otomatis iOS saat fokus input */
  .form-control, .form-select {
    font-size: 16px;
  }
}

/* --- Ponsel (<= 767px) — tampilan aplikasi Android/iOS modern --- */
@media (max-width: 767.98px) {

  /* Dasar layar aplikasi */
  html { -webkit-text-size-adjust: 100%; }
  body {
    background: #f2f5fb;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
  }
  * { scrollbar-width: thin; }

  /* ===== App bar atas ===== */
  .header {
    height: 60px;
    background: linear-gradient(135deg, #101d42 0%, #1842b6 100%) !important;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 24px rgba(16, 29, 66, .28);
  }
  .header .logo img { height: 34px !important; width: auto !important; max-width: 140px; }
  .header .toggle-sidebar-btn { font-size: 24px; }
  .header-nav .nav-link.nav-icon { font-size: 19px; color: #fff; }
  .header-nav .nav-link.nav-icon:hover { color: var(--bagum-secondary); }
  .nav-profile img { width: 32px; height: 32px; border-radius: 12px; }
  .nav-profile .dropdown-toggle { font-size: 13px; color: #fff; }
  .header-nav .notifications { min-width: 280px; max-width: calc(100vw - 24px); }
  .badge-number { font-size: 10px !important; width: 17px !important; height: 17px !important; line-height: 15px !important; }

  /* ===== Konten utama ===== */
  #main { margin-top: 70px; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }

  /* Judul halaman ala iOS large title */
  .pagetitle h1 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
  .pagetitle h1::after { width: 36px; height: 3px; margin-top: 4px; }
  .breadcrumb {
    padding: 7px 12px; font-size: 11.5px; border-radius: 999px;
    background: #e8edf8; color: #55618a;
    display: inline-flex;
  }
  .breadcrumb-item a { color: #1842b6; font-weight: 600; }

  /* ===== Kartu ===== */
  .card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 18px rgba(23, 37, 84, .07), 0 1px 3px rgba(23, 37, 84, .05);
  }
  .card-body { padding: 16px; }
  .card-title { font-size: 15px; padding-bottom: 10px; }
  .card-title::before { height: 18px; width: 3px; top: -1px; }

  /* Tombol aksi pada judul card pindah ke baris sendiri */
  .card-title:has(> .btn) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .card-title > .btn {
    float: none !important;
    width: 100%;
  }

  .section { margin-bottom: 8px; }

  /* ===== Tabel ===== */
  .table thead th { font-size: 10.5px; letter-spacing: .05em; padding: 10px 11px; border-radius: 0; white-space: nowrap; background: #f0f3fa; }
  .table tbody td { font-size: 12.5px; padding: 11px 11px; white-space: normal; word-break: break-word; }
  .table-hscroll { min-width: 640px; }
  .table-hscroll thead th,
  .table-hscroll tbody td { word-break: normal; }
  .table thead th:first-child, .table thead th:last-child { border-radius: 0; }
  .table td img { max-height: 52px; border-radius: 10px; }
  .status-pill { font-size: 10px; padding: 3px 9px; gap: 4px; }
  .status-pill::before { width: 6px; height: 6px; }
  .table-modern-wrap { border-radius: 14px; }

  /* Toolbar datatable */
  .datatable-top { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .datatable-top .datatable-search { width: 100%; }
  .datatable-input {
    width: 100% !important; min-width: 0 !important;
    background: #eef1f8; border: 1.5px solid transparent; border-radius: 12px;
    padding: 8px 13px;
  }
  .datatable-input:focus { background: #fff; border-color: #1842b6; outline: none; }
  .datatable-selector { width: auto !important; }
  .datatable-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .datatable-pagination { flex-wrap: wrap; }

  /* ===== Tombol sentuh besar ala aplikasi ===== */
  .btn {
    border-radius: 12px;
    font-weight: 600;
    min-height: 42px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .btn-sm { min-height: 34px; border-radius: 10px; }
  .btn:active { transform: scale(.96); }
  .btn-primary {
    background: linear-gradient(135deg, #1842b6, #2f63e0);
    border: none;
    box-shadow: 0 6px 16px rgba(24, 66, 182, .28);
  }
  .btn-secondary { background: #eef1f7; border: none; color: #3b4763; }
  .btn-danger { box-shadow: 0 6px 16px rgba(220, 53, 69, .25); }

  /* ===== Form gaya filled (Android) ===== */
  .form-label, .col-form-label { font-size: 12.5px; font-weight: 600; color: #4a5878; }
  .form-control, .form-select {
    background: #eef1f8;
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: .6rem .9rem;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
  .form-control:focus, .form-select:focus {
    background: #fff;
    border-color: #1842b6;
    box-shadow: 0 0 0 4px rgba(24, 66, 182, .12);
  }
  textarea.form-control { min-height: 90px; }
  .btn-lg { font-size: 15px; }
  form .col-12 .btn,
  form button[type="submit"] { width: 100%; }
  .input-group-text { font-size: 13px; background: #eef1f8; border: none; border-radius: 14px; }

  /* ===== Modal sebagai bottom sheet (ala aplikasi native) ===== */
  .modal-dialog {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    margin: 0;
    width: 100%; max-width: 100%;
  }
  .modal.fade .modal-dialog { transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.9,.3,1); }
  .modal.show .modal-dialog { transform: none; }
  .modal-content {
    position: relative;
    border: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(11, 30, 91, .25);
    max-height: 88vh;
    overflow: hidden;
  }
  .modal-content::before {
    content: "";
    position: absolute;
    top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 5px;
    border-radius: 99px;
    background: #d4dbeb;
    z-index: 2;
  }
  .modal-header {
    padding: 22px 16px 12px;
    border-bottom: 1px solid #eef1f7;
  }
  .modal-header .modal-title { font-size: 15.5px; font-weight: 700; }
  .modal-body { overflow-y: auto; padding: 14px 16px; }
  .modal-footer {
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #eef1f7;
    gap: 8px;
  }
  .modal-footer .btn { flex: 1; }

  /* ===== Dropdown / notifikasi ===== */
  .dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(11, 30, 91, .22);
  }
  .dropdown-menu.notifications .notification-item { padding: 11px 14px; }
  .notification-item h4 { font-size: 13px; }
  .notification-item p { font-size: 12px; }

  /* ===== Kalender ===== */
  .fc .fc-toolbar.fc-header-toolbar { justify-content: center; row-gap: 12px; margin-bottom: 14px; }
  .fc .fc-toolbar-title { order: -1; width: 100%; text-align: center; font-size: 15.5px; }
  .fc .fc-button { padding: .35em .7em !important; font-size: 12px !important; }
  .fc .fc-daygrid-day-frame { min-height: 78px; }
  .fc .fc-daygrid-day-number { font-size: 11px; padding: 4px 6px; }
  .fc .fc-day-today .fc-daygrid-day-number { width: 21px; height: 21px; margin: 3px 6px 0 auto; border-radius: 6px; }
  .fc .fc-daygrid-event { font-size: 9.5px !important; padding: 1px 5px !important; margin: 1px 2px !important; }
  .fc .fc-col-header-cell-cushion { font-size: 9.5px; letter-spacing: .04em; }

  /* ===== Footer & FAB ===== */
  .footer { padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
  .footer .copyright { font-size: 11.5px; text-align: center; }
  body.bp-mobileapp .footer { display: none; }

  .back-to-top {
    right: 14px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: 44px; height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1842b6, #2f63e0);
    color: #fff;
    box-shadow: 0 8px 20px rgba(24, 66, 182, .35);
  }
  body.bp-mobileapp .back-to-top { bottom: calc(150px + env(safe-area-inset-bottom)); }

  /* Login */
  .login-body { padding: 16px 12px; }
  .login-card { border-radius: 22px; }
  .login-card .card-body { padding: 20px 16px; }
  .login-footer { font-size: 11px; padding: 0 12px; }

  /* Profil */
  .profile-cover { height: 118px; border-radius: 0 0 22px 22px; }
  .profile-hero { margin-top: -48px; gap: 10px; }
  .profile-avatar { width: 86px; height: 86px; max-height: 86px; border-radius: 26px; }
  .profile-name { font-size: 17px; }
  .profile-hero-action { width: 100%; padding-bottom: 2px; }
  .profile-hero-action .btn { width: 100%; }

  /* Riwayat perbaikan */
  .rw-harga { flex: 1 1 140px; }
}

/* --- Layar sangat kecil (<= 380px) --- */
@media (max-width: 380px) {
  .header .logo img { max-width: 110px; height: 30px !important; }
  #main { padding: 12px 9px; }
  .pagetitle h1 { font-size: 17px; }
  .table tbody td { font-size: 12px; padding: 9px 9px; }
  .fc .fc-daygrid-day-frame { min-height: 64px; }
}

/* ------------------------------------------------------------
   Input Tanggal & Jam - Modern
------------------------------------------------------------ */

/* --- Ikon pada fallback picker native --- */
.form-control[type="date"],
.form-control[type="datetime-local"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%231842b6' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='17' rx='3'/%3E%3Cpath d='M3 10h18M8 2.5V7M16 2.5V7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
}

.form-control[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%231842b6' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7v5l3.5 2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
}

.form-control[type="date"]:not(.flatpickr-input),
.form-control[type="time"]:not(.flatpickr-input),
.form-control[type="datetime-local"] {
  padding-right: 2.4rem;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator,
.form-control[type="time"]::-webkit-calendar-picker-indicator,
.form-control[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
  margin-right: -.55rem;
  width: 1.7rem;
  height: 1.7rem;
  position: relative;
  z-index: 2;
}

/* --- Tema Flatpickr (Bagum) --- */
.flatpickr-calendar {
  border-radius: 14px;
  border: 1px solid var(--bagum-border);
  box-shadow: var(--bagum-shadow-lg);
  font-family: "Inter", sans-serif !important;
  overflow: hidden;
  animation: bagumFadeIn .18s ease;
}

.flatpickr-months {
  background: var(--bagum-primary-darker);
}

.flatpickr-months .flatpickr-month,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: #fff;
  fill: #fff;
}

.flatpickr-current-month { color: #fff !important; font-weight: 700; font-size: 14.5px; }
.flatpickr-current-month input.cur-year {
  color: #fff !important;
  font-weight: 700 !important;
  -webkit-text-fill-color: #fff;
}
.flatpickr-current-month .cur-year:hover { background: rgba(255, 255, 255, .12); }
.cur-year[disabled] { color: rgba(255, 255, 255, .6) !important; }

/* nama bulan (dropdown) harus putih di atas header biru */
.flatpickr-months .flatpickr-monthDropdown-months {
  color: #fff !important;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* saat dropdown bulan dibuka, opsinya tetap terbaca */
.flatpickr-months .flatpickr-monthDropdown-months option,
.flatpickr-months .flatpickr-monthDropdown-month {
  color: var(--bagum-primary-darker);
  background-color: #fff;
}
.flatpickr-prev-month svg, .flatpickr-next-month svg { width: 15px; }
.flatpickr-prev-month:hover, .flatpickr-next-month:hover { background: rgba(255, 255, 255, .12); }

span.flatpickr-weekday {
  background: #f7f9fd;
  color: var(--bagum-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.flatpickr-day {
  border-radius: 9px;
  font-size: 13px;
  transition: all .15s ease;
}

.flatpickr-day:hover { background: rgba(24, 66, 182, .09); border-color: transparent; }

.flatpickr-day.today {
  border-color: var(--bagum-secondary);
}
.flatpickr-day.today:hover {
  background: var(--bagum-secondary);
  color: var(--bagum-primary-darker);
  border-color: var(--bagum-secondary);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--bagum-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px rgba(24, 66, 182, .35);
}

.flatpickr-days .dayContainer { padding: 6px; }

/* area jam (time picker) - modern */
.flatpickr-calendar.noCalendar {
  min-width: 0;
  width: auto !important;
}

.flatpickr-calendar.noCalendar .flatpickr-time {
  border-radius: 13px;
}

.flatpickr-time {
  background: #f7f9fd;
  border-top: 1px solid var(--bagum-border);
  padding: 10px 12px;
  gap: 2px;
}

/* angka jam & menit besar dan tebal */
.flatpickr-time input {
  font-size: 21px !important;
  font-weight: 800 !important;
  color: var(--bagum-primary-darker) !important;
  height: 44px !important;
  background: #fff;
  border: 1.5px solid var(--bagum-border);
  border-radius: 10px;
  transition: all .15s ease;
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-time-separator:hover,
.flatpickr-time .flatpickr-am-pm:hover {
  background: rgba(24, 66, 182, .08);
}

.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 66, 182, .22);
  border-color: var(--bagum-primary);
  outline: none;
}

/* pemisah titik dua */
.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-time-ref {
  color: var(--bagum-primary);
  font-weight: 800;
  font-size: 19px;
}

/* tombol panah naik/turun */
.flatpickr-time .numInputWrapper { position: relative; flex: 1; }
.flatpickr-time .numInputWrapper span.arrowUp,
.flatpickr-time .numInputWrapper span.arrowDown {
  width: 45%;
  right: 3px;
}
.flatpickr-time .numInputWrapper:hover span.arrowUp,
.flatpickr-time .numInputWrapper:hover span.arrowDown { opacity: 1; }
.flatpickr-time .numInputWrapper span.arrowUp:hover,
.flatpickr-time .numInputWrapper span.arrowDown:hover { background: rgba(24, 66, 182, .14); }
.flatpickr-time .numInputWrapper span.arrowUp:after { border-bottom-color: var(--bagum-primary); }
.flatpickr-time .numInputWrapper span.arrowDown:after { border-top-color: var(--bagum-primary); }

/* chip AM/PM (bila format 12 jam) */
.flatpickr-time .flatpickr-am-pm {
  background: #fff;
  border: 1.5px solid var(--bagum-border);
  border-radius: 10px;
  font-weight: 800;
  color: var(--bagum-primary-dark);
  margin-left: 4px;
}

/* ------------------------------------------------------------
   Dial Jam Analog (picker type="time")
------------------------------------------------------------ */
.fp-clock {
  background: #fff;
}

/* tampilan digital besar di atas dial */
.fp-clock-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 16px 12px 10px;
  background: var(--bagum-primary-darker);
}

.fp-clock-part {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 30px;
  font-weight: 800;
  color: rgba(255, 255, 255, .45);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 10px;
  transition: all .15s ease;
  line-height: 1.2;
}

.fp-clock-part.aktif {
  color: #fff;
  background: rgba(255, 208, 0, .22);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}

.fp-clock-colon {
  font-size: 26px;
  font-weight: 800;
  color: rgba(255, 255, 255, .7);
  animation: fpKedip 1s step-end infinite;
}

@keyframes fpKedip { 50% { opacity: .35; } }

/* lingkaran jam */
.fp-clock-dial {
  position: relative;
  width: 238px;
  height: 238px;
  margin: 14px auto;
  border-radius: 50%;
  background: #f7f9fd;
  border: 1.5px solid var(--bagum-border);
  box-shadow:
    inset 0 0 0 8px #fff,
    inset 0 0 0 9px var(--bagum-border),
    0 10px 28px rgba(11, 30, 91, .14);
}

/* angka di sekeliling dial */
.fp-clock-num {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bagum-muted);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}

.fp-clock-num:hover {
  background: rgba(24, 66, 182, .10);
  color: var(--bagum-primary-dark);
}

.fp-clock-num.aktif {
  background: var(--bagum-primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(24, 66, 182, .40);
}

/* jarum penunjuk */
.fp-clock-hand {
  position: absolute;
  left: calc(50% - 1.5px);
  bottom: 50%;
  width: 3px;
  height: 38%;
  background: var(--bagum-primary);
  border-radius: 3px;
  transform-origin: bottom center;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  z-index: 1;
  pointer-events: none;
}

.fp-clock-hand::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--bagum-secondary);
  box-shadow: 0 0 0 2.5px #fff, 0 2px 6px rgba(11, 30, 91, .35);
}

.fp-clock-center-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--bagum-primary-darker);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--bagum-border);
  z-index: 2;
}

/* tombol bantuan flatpickr */
.flatpickr-buttons { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--bagum-border); background: #fff; }
.flatpickr-buttons .fp-btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.fp-btn-hariini { background: var(--bagum-secondary); color: var(--bagum-primary-darker); }
.fp-btn-bersih { background: rgba(220, 53, 69, .09); color: #b91c1c; }

/* ------------------------------------------------------------
   Form Wizard (input bertahap)
------------------------------------------------------------ */
.wizard-card { border-radius: 16px; }

.wizard-steps {
  display: flex;
  align-items: flex-start;
}

.wizard-step {
  flex: 1;
  text-align: center;
  position: relative;
}

/* garis penghubung antar langkah */
.wizard-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  left: calc(50% + 32px);
  width: calc(100% - 64px);
  height: 3px;
  border-radius: 3px;
  background: var(--bagum-border);
  transition: background .3s ease;
  z-index: 1;
}

.wizard-step.selesai:not(:last-child)::after {
  background: var(--bagum-primary);
}

.wizard-dot {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 17px;
  background: #eef1f8;
  color: var(--bagum-muted);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px var(--bagum-border);
  transition: all .25s ease;
}

.wizard-step.aktif .wizard-dot {
  background: var(--bagum-primary);
  color: #fff;
  border-color: rgba(24, 66, 182, .18);
  box-shadow: 0 0 0 4px rgba(24, 66, 182, .15), 0 6px 14px rgba(24, 66, 182, .35);
  transform: scale(1.06);
}

.wizard-step.selesai .wizard-dot {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 0 0 1.5px rgba(22, 163, 74, .35);
}

.wizard-label {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bagum-muted);
  letter-spacing: .01em;
}

.wizard-step.aktif .wizard-label { color: var(--bagum-primary-darker); }
.wizard-step.selesai .wizard-label { color: #16a34a; }

/* panel langkah */
.wizard-panel.aktif { animation: wizardMasuk .28s ease; }

@keyframes wizardMasuk {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* kotak ringkasan di langkah akhir */
.ringkasan-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255, 208, 0, .14);
  border: 1px solid rgba(255, 208, 0, .45);
  color: var(--bagum-primary-darker);
  font-size: 13.5px;
}

.ringkasan-box i {
  color: #b8860b;
  font-size: 19px;
}

@media (max-width: 767.98px) {
  .wizard-dot { width: 36px; height: 36px; font-size: 15px; }
  .wizard-step:not(:last-child)::after { top: 18px; left: calc(50% + 26px); width: calc(100% - 52px); }
  .wizard-label { font-size: 10px; margin-top: 5px; }
  .wizard-nav .btn { padding: .5rem 1rem; }
}

/* --- Panel Review wizard (kartu) --- */
.review-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--bagum-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--bagum-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bagum-shadow-md);
}

.rc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--bagum-border);
}

.rc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.rc-biru   .rc-icon { background: var(--bagum-primary); box-shadow: 0 4px 10px rgba(24, 66, 182, .35); }
.rc-kuning .rc-icon { background: #f59e0b; box-shadow: 0 4px 10px rgba(245, 158, 11, .40); }
.rc-hijau  .rc-icon { background: #16a34a; box-shadow: 0 4px 10px rgba(22, 163, 74, .35); }
.rc-merah  .rc-icon { background: #dc2626; box-shadow: 0 4px 10px rgba(220, 38, 38, .35); }

.rc-judul { line-height: 1.25; }
.rc-judul small {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--bagum-muted);
}
.rc-judul strong { font-size: 14.5px; color: var(--bagum-primary-darker); }

.rc-ubah {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--bagum-border);
  background: #fff;
  color: var(--bagum-primary-dark);
  font-size: 13px;
  transition: all .18s ease;
}

.rc-ubah:hover {
  background: var(--bagum-primary);
  border-color: var(--bagum-primary);
  color: #fff;
  transform: rotate(-8deg) scale(1.05);
}

.rc-body { padding: 4px 16px 12px; }

.rc-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed #edf1f9;
  font-size: 13px;
}

.rc-row:last-child { border-bottom: none; }

.rc-row span {
  color: var(--bagum-muted);
  font-weight: 600;
}

.rc-row strong {
  color: var(--bagum-text);
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.rc-row strong .btn { font-weight: 600; }

/* dua kolom dalam satu kartu */
@media (min-width: 768px) {
  .rc-kolom-kiri {
    padding-right: 18px;
    border-right: 1px dashed #edf1f9;
  }
  .rc-kolom-kiri + [class*="col-"] { padding-left: 18px; }
  .rc-kolom-kiri:last-child { border-right: none; }
}

@media (max-width: 767.98px) {
  .review-card:hover { transform: none; }
  .rc-row { grid-template-columns: 112px minmax(0, 1fr); }
}

/* ------------------------------------------------------------
   Halaman Profil Saya
------------------------------------------------------------ */
.profile-section { margin-bottom: 10px; }

.profile-card { overflow: hidden; }

.profile-cover {
  height: 150px;
  background-color: var(--bagum-primary);
  color: #fff;
}

.profile-hero {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 0 !important;
  margin-top: -64px;
}

.profile-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--bagum-shadow-md);
  background: #fff;
  flex: none;
}
/* gambar avatar tidak ikut styling img tabel/card lain */
.profile-hero .profile-avatar { max-height: 108px; }

.profile-id { padding-bottom: 4px; }
.profile-name { font-size: 20px; margin-bottom: 7px; }

.badge-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(24, 66, 182, .1);
  color: var(--bagum-primary);
}
.lv-kabag    { background: rgba(255, 193, 7, .18); color: #9a6b00; }
.lv-koor     { background: rgba(25, 135, 84, .14); color: #146c43; }
.lv-mitra    { background: rgba(220, 53, 69, .12); color: #b02a37; }
.lv-operator { background: rgba(13, 110, 253, .12); color: #0b5ed7; }
.lv-admin    { background: rgba(111, 66, 193, .12); color: #59359c; }

.profile-username {
  font-size: 13px;
  color: var(--bagum-muted);
  margin: 9px 0 0;
}

.profile-info-list { list-style: none; margin: 0; padding: 0; }

.profile-info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--bagum-border);
}
.profile-info-list li:last-child { border-bottom: none; }

.pi-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(24, 66, 182, .08);
  color: var(--bagum-primary);
}
.pi-icon.pi-active { background: rgba(25, 135, 84, .12); color: #146c43; }

.profile-info-list small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bagum-muted);
  margin-bottom: 2px;
}

.profile-info-list strong {
  font-weight: 600;
  color: var(--bagum-text);
  font-size: 13.5px;
  word-break: break-word;
}

#edit-profil { margin-bottom: 18px; }

/* ------------------------------------------------------------
   Riwayat Perbaikan Kendaraan
------------------------------------------------------------ */
.rw-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--bagum-border);
}
.rw-item:last-child { border-bottom: none; }

.rw-nama  { flex: 1 1 220px; }
.rw-harga { flex: 0 0 170px; }

.rw-btn-simpan { white-space: nowrap; }

.rw-ringkas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--bagum-border);
}
.rw-ringkas > span:first-child {
  color: var(--bagum-muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* kotak total: bg biru -> teks putih */
.rw-total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 11px;
  background: var(--bagum-primary);
  color: #fff;
  font-family: "Saira", "Inter", sans-serif;
}
.rw-total-box > span:first-child {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .85;
}
.rw-total-box > span:last-child {
  font-size: 18px;
  font-weight: 800;
}
