/* =============================================
   Ajax Table - Global Styles
   ============================================= */

/* Tabel minimal width agar bisa scroll horizontal */
.ajax-table {
    min-width: 600px;
    width: 100%;
}

/* Thead */
.ajax-table thead th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
}

/* Tbody td */
.ajax-table tbody td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #374151;
    vertical-align: middle;
    white-space: nowrap;
    text-align: left;
}

/* Row border bawah */
.ajax-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

/* Row hover */
.ajax-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Dark mode overrides — must be after light rules to win specificity */
.dark .ajax-table thead th {
    background-color: #28231D;
    color: #A8A29A;
    border-bottom-color: #332D26;
}
:where(.dark) .ajax-table tbody td {
    color: #F4F1EC;
}
.dark .ajax-table tbody tr {
    border-bottom-color: #332D26;
}
.dark .ajax-table tbody tr:nth-child(even) {
    background-color: #28231D;
}
.dark .ajax-table tbody tr:hover {
    background-color: rgba(242, 98, 46, 0.08);
}

/* khusus swal button biar tidak transparan */
.swal2-confirm,
.swal2-cancel {
  background-color: var(--swal2-confirm-button-background-color, #e3342f) !important;
  color: #fff !important;
  background-image: none !important;
}
.swal2-confirm {
  background-color: #e3342f !important;
  border: none !important;
  color: #fff !important;
}
.mr-0-custom {
  margin-right: 0.5px !important;
}
.text-left {
  text-align: left;
}
.swal2-cancel {
  background-color: #6c757d !important; /* abu-abu */
  border: none !important;
  color: #fff !important;
}
.whitespace-nowrap {
  white-space: nowrap;
}
.h-modal {
  height: 90%;
}
.mx-auto {
  margin-inline: auto;
}
.sidebar-menu-text {
  font-size: 0.8rem !important;
}
.min-w-800px {
  min-width: 800px;
}
.apexcharts-yaxis {
  --tw-translate-x: 55px !important;
}
/* aktifkan kembali indikator time picker */
input[type="time"] {
  position: relative;
  padding-right: 35px;
}

/* bikin icon bawaan tetap aktif */
input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0; /* transparan tapi tetap bisa dipencet */
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* taruh icon custom di atasnya */
input[type="time"]::after {
  content: "🕒"; /* atau SVG seperti tadi */
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none; /* biar kliknya tetap masuk ke indicator bawaan */
}

/* custom css untuk halaman kasir */
.logo-kasir {
  width: 80%;
  object-fit: cover;
  border-radius: 50%;
}

.content-produk {
  width: 75%;
  padding: 20px;
}
.cart-produk {
  width: 25%;
  background-color: #ffffff;
  padding: 20px;
  border-left: 1px solid #ddd;
  border-top: 1px solid #ddd;
  height: calc(100vh - 4.5rem);
  overflow-y: auto; /* scroll jika konten melebihi tinggi */
}
.dark .cart-produk {
  background-color: #1F1B17;
  border-left-color: #332D26;
  border-top-color: #332D26;
}

.inner-diskon{
  margin-left: 5px;
}

.produk-header {
  border-bottom: 1px solid rgb(235, 236, 239);
  padding-bottom: 10px;
}
.dark .produk-header { border-bottom-color: #332D26; }

.produk-body {
  border-bottom: 1px solid rgb(235, 236, 239);
  padding-bottom: 10px;
  padding-top: 10px;
}
.dark .produk-body { border-bottom-color: #332D26; }

.product-placeholder {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 1px solid #ddd;
  margin-right: 10px;
}

.button-quantity{
  border: 1px solid #ddd;
  line-height: 1 !important;
}

.diskon {
  text-decoration: line-through;
  font-style: italic;
}
.total-tagihan {
    border-top: 1px solid rgb(235, 236, 239);
    border-top-style: dashed;
    border-bottom: 1px solid rgb(235, 236, 239);
}
.dark .total-tagihan { border-top-color: #332D26; border-bottom-color: #332D26; }

.dropdown-more {
    right: 0;
    bottom: 3rem;
}

/* Avatar Upload Styles */
.avatar-upload {
    position: relative;
    max-width: 200px;
    margin: 0 auto;
}

.avatar-upload .avatar-edit {
    position: absolute;
    right: 12px;
    bottom: 0;
    z-index: 1;
}

.avatar-upload .avatar-edit input {
    display: none;
}

.avatar-upload .avatar-edit label {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    border-radius: 100%;
    background: #FFFFFF;
    border: 1px solid transparent;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    font-weight: normal;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-upload .avatar-edit label:hover {
    background: #f1f1f1;
    border-color: #d6d6d6;
}

.avatar-upload .avatar-preview {
    width: 192px;
    height: 192px;
    position: relative;
    border-radius: 100%;
    border: 6px solid #F8F8F8;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.avatar-upload .avatar-preview > div {
    width: 100%;
    height: 100%;
    border-radius: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* Responsive */
@media (max-width: 768px) {
    .avatar-upload .avatar-preview {
        width: 150px;
        height: 150px;
    }
}

.ml-2 {
    margin-left: 0.5rem !important;
}

/* ── Datatable action icon buttons ─────────────────────────────────────────
   Usage: edit → class="btn-action"
          delete → class="btn-action btn-action-del"
   ────────────────────────────────────────────────────────────────────────── */
.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}
.dark .btn-action {
    border-color: #332D26;
    background: #1F1B17;
    color: #6E685F;
}
.btn-action:hover {
    border-color: transparent;
    background: #fff7ed;
    color: #ea580c;
}
.dark .btn-action:hover {
    background: rgba(242, 98, 46, .15);
    color: #fb923c;
}
.btn-action-del:hover {
    border-color: transparent;
    background: #fef2f2;
    color: #dc2626;
}
.dark .btn-action-del:hover {
    background: rgba(220, 38, 38, .15);
    color: #f87171;
}
.btn-action-warn:hover {
    border-color: transparent;
    background: #fffbeb;
    color: #d97706;
}
.dark .btn-action-warn:hover {
    background: rgba(217, 119, 6, .15);
    color: #fbbf24;
}

/* ── Modal dark mode ────────────────────────────────────────────────────── */
.dark .hexa-modal-panel {
    background-color: #1F1B17;
    border: 1px solid #332D26;
}
.hexa-modal-bd {
    background-color: rgba(0, 0, 0, 0.5);
}
.dark .hexa-modal-bd {
    background-color: rgba(21, 18, 15, 0.85);
}

/* ── Stat cards (kehadiran) ──────────────────────────────────────────────── */
.hexa-stat-card {
    border: 1px solid #e5e7eb;
}
.dark .hexa-stat-card {
    border-color: #332D26;
}

/* ── Scanner Drawer dark mode ────────────────────────────────────────────── */
.dark .hexa-scanner-drawer {
    background-color: #1F1B17 !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4) !important;
}
.dark .hexa-scanner-drawer label {
    color: #A8A29A;
}
.dark .hexa-scanner-cam-border {
    border-color: #332D26 !important;
}

/* ── Profile dropdown dark mode ─────────────────────────────────────────── */
.dark #dropdownProfile {
    background-color: #1F1B17;
    border: 1px solid #332D26;
}
.dark #dropdownProfile .bg-primary-50 {
    background-color: rgba(242, 98, 46, 0.1);
}
.dark #dropdownProfile .text-neutral-900 {
    color: #F4F1EC;
}
.dark #dropdownProfile .text-neutral-500 {
    color: #6E685F;
}
.dark #dropdownProfile .text-black {
    color: #F4F1EC;
}
.dark #dropdownProfile ul li + li {
    border-top: 1px solid #332D26;
}

/* ── Global Tailwind light-mode class overrides untuk dark mode ──────────── */
/* Kelas-kelas ini tidak punya dark: variant di built CSS karena tidak
   di-scan Tailwind. Override di sini berlaku untuk seluruh aplikasi. */

/* Primary tint backgrounds & borders */
.dark .bg-primary-50    { background-color: rgba(242, 98, 46, 0.10) !important; }
.dark .border-primary-200 { border-color:   rgba(242, 98, 46, 0.25) !important; }

/* Success tint */
.dark .bg-success-50    { background-color: rgba(22, 163, 74, 0.10) !important; }
.dark .bg-success-100   { background-color: rgba(22, 163, 74, 0.15) !important; }
.dark .border-success-200 { border-color:   rgba(22, 163, 74, 0.25) !important; }
.dark .border-success-400 { border-color:   rgba(22, 163, 74, 0.50) !important; }
.dark .text-success-700 { color: #4ade80 !important; }

/* Warning tint */
.dark .bg-warning-50    { background-color: rgba(234, 179, 8, 0.10) !important; }
.dark .bg-warning-100   { background-color: rgba(234, 179, 8, 0.15) !important; }
.dark .border-warning-200 { border-color:   rgba(234, 179, 8, 0.25) !important; }
.dark .text-warning-700 { color: #facc15 !important; }

/* Danger tint */
.dark .bg-danger-100    { background-color: rgba(220, 38, 38, 0.15) !important; }

/* Neutral borders → warm dark */
.dark .border-neutral-200 { border-color: #332D26 !important; }
.dark .border-neutral-300 { border-color: #332D26 !important; }

/* Neutral text → warm palette */
.dark .text-neutral-900   { color: #F4F1EC !important; }
.dark .text-neutral-700   { color: #A8A29A !important; }

/* Gray (Tailwind default) */
.dark .bg-gray-100        { background-color: #28231D !important; }
.dark .border-gray-300    { border-color: #332D26 !important; }
.dark .text-gray-600      { color: #A8A29A !important; }

/* ── Readonly / system-filled fields ─────────────────────────────────────── */
/* Light: grayish neutral, text muted, kursor not-allowed */
.form-control[readonly],
.form-control:disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
}
/* Dark: surface-dark-raised (#28231D) lebih terang dari editable (#15120F),
   text ink-d3 (#6E685F) supaya jelas "bukan field yang bisa diisi" */
.dark .form-control[readonly],
.dark .form-control:disabled {
    background-color: #28231D !important;
    border-color: #332D26 !important;
    color: #6E685F !important;
    cursor: not-allowed;
}

/* ── Native form controls dark mode ─────────────────────────────────────── */
/* Browser/OS (Windows) di dark mode nambah blue tint ke native select.
   Override paksa + color-scheme: dark agar rendering native-nya ikut palette kita. */
.dark select,
.dark select.form-control {
    background-color: #1F1B17 !important;
    color: #F4F1EC !important;
    border-color: #332D26 !important;
    color-scheme: dark;
}
.dark option {
    background-color: #1F1B17;
    color: #F4F1EC;
}
/* Date/time input — bagian picker icon juga ikut dark */
.dark input[type="date"],
.dark input[type="time"],
.dark input[type="datetime-local"],
.dark input[type="month"],
.dark input[type="week"] {
    color-scheme: dark;
    background-color: #1F1B17 !important;
    color: #F4F1EC !important;
    border-color: #332D26 !important;
}
/* Textarea */
.dark textarea.form-control {
    background-color: #1F1B17 !important;
    color: #F4F1EC !important;
    border-color: #332D26 !important;
}

/* ── View Profile page dark mode ────────────────────────────────────────── */
/* Left card: bg-white hardcoded */
.dark .user-grid-card {
    background-color: #1F1B17;
    border-color: #332D26 !important;
}
.dark .user-grid-card .border-b,
.dark .user-grid-card .border-neutral-200 {
    border-color: #332D26 !important;
}
.dark .user-grid-card h6,
.dark .user-grid-card .text-neutral-600 {
    color: #F4F1EC;
}
.dark .user-grid-card .text-secondary-light {
    color: #A8A29A;
}
/* Role/status badge di info panel */
.dark .user-grid-card .bg-primary-100 {
    background-color: rgba(242, 98, 46, 0.15);
}
.dark .user-grid-card .bg-success-100 {
    background-color: rgba(22, 163, 74, 0.15);
}
.dark .user-grid-card .bg-warning-100 {
    background-color: rgba(234, 179, 8, 0.15);
}
/* Right card — form labels dan section divider */
.dark .card-body .text-neutral-600 {
    color: #A8A29A;
}
.dark .card-body .border-b {
    border-color: #332D26;
}
/* Tab buttons */
.dark .tab-style-gradient button {
    color: #A8A29A;
}
.dark .tab-style-gradient button:hover {
    color: #F4F1EC;
    border-color: #332D26;
}

/* ── editUserRoleModal body — dark mode ─────────────────────────────────── */
.dark #editUserRoleModal .modal-info-box {
    background-color: #28231D;
    border-color: #332D26;
}
.dark #editUserRoleModal .modal-info-box label {
    color: #A8A29A;
}
.dark #editUserRoleModal .modal-info-box p {
    color: #F4F1EC;
}
.dark #editUserRoleModal .text-gray-500 {
    color: #6E685F;
}
.dark #editUserRoleModal .text-neutral-600 {
    color: #A8A29A;
}
.dark #editUserRoleModal .border-gray-200,
.dark #editUserRoleModal .border-gray-300 {
    border-color: #332D26;
}
.dark #editUserRoleModal .text-gray-700 {
    color: #A8A29A;
}
.dark #editUserRoleModal .hover\:bg-gray-100:hover {
    background-color: #28231D;
}

/* =============================================
   Member Profile Page (mp-*)
   Light + Dark mode styles
   ============================================= */

/* Avatar border CSS variable for dark mode */
.dark { --mp-avatar-border: #28231D; }

/* Left column fixed width */
@media (min-width: 1024px) {
    .mp-left-col {
        width: 340px;
        flex-shrink: 0;
    }
}

/* Package info box */
.mp-pkg-box {
    background-color: #fafafa;
    border-color: #e5e7eb;
}
.dark .mp-pkg-box {
    background-color: #28231D;
    border-color: #332D26;
}
.dark .mp-pkg-box .text-neutral-500 { color: #6E685F; }
.dark .mp-pkg-box .text-neutral-800 { color: #F4F1EC; }

/* Package badge */
.mp-pkg-badge {
    background-color: rgba(242, 98, 46, 0.12);
    color: #F2622E;
}
.dark .mp-pkg-badge {
    background-color: rgba(242, 98, 46, 0.20);
    color: #fb923c;
}

/* Stat box */
.mp-stat-box {
    background-color: #fafafa;
    border: 1px solid #e5e7eb;
}
.dark .mp-stat-box {
    background-color: #28231D;
    border-color: #332D26;
}
.dark .mp-stat-box .text-neutral-900 { color: #F4F1EC; }
.dark .mp-stat-box .text-neutral-500 { color: #6E685F; }

/* Digital member card */
.mp-digital-card {
    background: linear-gradient(135deg, #1a1512, #2c1810);
}

/* Digital card ghost button */
.mp-dc-btn-ghost {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
}
.mp-dc-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Digital card primary button */
.mp-dc-btn-primary {
    background: #F2622E;
}
.mp-dc-btn-primary:hover {
    background: #d95524;
}

/* Field items (data pribadi) */
.mp-field-item {
    border-bottom: 1px solid #f3f4f6;
}
.dark .mp-field-item {
    border-bottom-color: #332D26;
}
.dark .mp-field-item .text-neutral-500 { color: #6E685F; }
.dark .mp-field-item .text-neutral-900 { color: #F4F1EC; }

/* BMI box */
.mp-bmi-box {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}
.dark .mp-bmi-box {
    background-color: #28231D;
    border-color: #332D26;
}
.dark .mp-bmi-box .text-neutral-500 { color: #6E685F; }
.dark .mp-bmi-box .text-neutral-900 { color: #F4F1EC; }
.dark .mp-bmi-box .text-neutral-400 { color: #6E685F; }

/* BMI bar dot border in dark mode */
.dark .mp-bmi-box [style*="border:3px solid #ffffff"] {
    border-color: #28231D !important;
}

/* Kehadiran items */
.mp-kehadiran-item {
    background-color: #fafafa;
    border: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}
.mp-kehadiran-item:hover {
    background-color: #f3f4f6;
}
.dark .mp-kehadiran-item {
    background-color: #28231D;
    border-color: #332D26;
}
.dark .mp-kehadiran-item:hover {
    background-color: #332D26;
}
.dark .mp-kehadiran-item .text-neutral-900 { color: #F4F1EC; }
.dark .mp-kehadiran-item .text-neutral-500 { color: #6E685F; }

/* Card header in profile page */
.dark .card-header .text-neutral-500 { color: #6E685F; }