:root,
[data-bs-theme="light"] {
    /* Warna Dasar Bootstrap (Sebagian Besar Tetap) */
    --bs-blue: #0d6efd;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-black: #000000;
    --bs-white: #ffffff;
    --bs-gray: #7e8299;
    --bs-gray-dark: #3f4254;
    --bs-gray-100: #f9f9f9;
    --bs-gray-200: #f4f4f4;
    --bs-gray-300: #c9d6ff;
    --bs-gray-400: #b5b5c3;
    --bs-gray-500: #5B5A5A;
    --bs-gray-600: #7e8299;
    --bs-gray-700: #5e6278;
    --bs-gray-800: #3f4254;
    --bs-gray-900: #181c32;
    --bs-light: #F9F9F9;

    --bs-form-invalid-color: #F8285A !important;

    /* PALET WARNA UTAMA - LIGHT THEME (Ungu Tua) */
    --bs-primary: #503596 !important;
    --bs-stepper-icon-bg-color-current : var(--bs-primary) !important;
    /* Ungu Tua */
    --bs-sub-primary: #8C4EAF;
    /* Ungu sedang, aksen yang lebih cerah */
    --bs-secondary: #E0E0E0;
    /* Abu-abu terang netral */
    --bs-success: #28A745;
    /* Tetap hijau untuk "baik" atau "selesai" */
    --bs-info: #17A2B8;
    /* Cyan terang - Untuk informasi umum, notifikasi */
    --bs-warning: #FFC107;
    /* Tetap kuning untuk "perhatian" atau "sedang diproses" */
    --bs-danger: #DC3545;
    /* Tetap merah untuk "kerusakan parah" atau "perlu tindakan segera" */
    --bs-dark: #343A40;
    /* Dark gray untuk teks/elemen gelap */

    /* Active States */
    --bs-primary-active: #572DA6 !important;
    /* Primary yang lebih gelap saat aktif */
    --bs-sub-primary-active: #723F8F;
    --bs-header-general-bg-color: #3A1B51 !important;
    /* Warna header */
    --bs-secondary-active: #C9C9C9;
    --bs-success-active: #218838;
    --bs-info-active: #138496;
    --bs-warning-active: #E0A800;
    --bs-danger-active: #C82333;
    --bs-dark-active: #23272B;
    --bs-light-active: #D6D6D6;

    /* Border Colors */
    --bs-primary-border: #572DA6;
    --bs-sub-primary-border: #723F8F;
    --bs-secondary-border: #BDBDBD;
    --bs-success-border: #218838;
    --bs-info-border: #138496;
    --bs-warning-border: #E0A800;
    --bs-danger-border: #C82333;
    --bs-dark-border: #23272B;
    --bs-light-border: #CFCFCF;

    /* Light Variants (untuk background atau teks lebih lembut) */
    --bs-primary-light: #d2b5e854 !important;
    /* Ungu sangat terang, cocok untuk background subtle */
    --bs-sub-primary-light: #F8F0FC;
    /* Super Light Ungu */
    --bs-secondary-light: #F8F8F8;
    --bs-success-light: #D4EDDA;
    --bs-info-light: #D1ECF1;
    --bs-warning-light: #FFF3CD;
    --bs-danger-light: #F8D7DA;

    /* Table Colors (menyesuaikan dengan nuansa ungu) */
    --bs-table-primary-color: var(--bs-black);
    --bs-table-primary-bg: #F4EFF8;
    /* Latar belakang tabel utama yang sangat terang */
    --bs-table-primary-border-color: #E2D1ED;
    --bs-table-primary-striped-bg: #EDDFF4;
    --bs-table-primary-striped-color: var(--bs-black);
    --bs-table-primary-active-bg: #E2D1ED;
    --bs-table-primary-active-color: var(--bs-black);
    --bs-table-primary-hover-bg: #EAE3F1;
    --bs-table-primary-hover-color: var(--bs-black);

    --bs-table-success-color: var(--bs-black);
    --bs-table-success-bg: #d1f4dd;
    --bs-table-success-border-color: #bcdcc7;
    --bs-table-success-striped-bg: #c7e8d2;
    --bs-table-success-striped-color: var(--bs-black);
    --bs-table-success-active-bg: #bcdcc7;
    --bs-table-success-active-color: var(--bs-black);
    --bs-table-success-hover-bg: #c1e2cc;
    --bs-table-success-hover-color: var(--bs-black);

    --bs-table-info-color: var(--bs-black);
    --bs-table-info-bg: #E6F5F7;
    /* Latar belakang tabel info */
    --bs-table-info-border-color: #C8E8EE;
    --bs-table-info-striped-bg: #DEEFF3;
    --bs-table-info-striped-color: var(--bs-black);
    --bs-table-info-active-bg: #C8E8EE;
    --bs-table-info-active-color: var(--bs-black);
    --bs-table-info-hover-bg: #D4ECF0;
    --bs-table-info-hover-color: var(--bs-black);

    --bs-table-warning-color: var(--bs-black);
    --bs-table-warning-bg: #fdf2cc;
    --bs-table-warning-border-color: #e4dab8;
    --bs-table-warning-striped-bg: #f0e6c2;
    --bs-table-warning-striped-color: var(--bs-black);
    --bs-table-warning-active-bg: #e4dab8;
    --bs-table-warning-active-color: var(--bs-black);
    --bs-table-warning-hover-bg: #eae0bd;
    --bs-table-warning-hover-color: var(--bs-black);

    --bs-table-danger-color: var(--bs-black);
    --bs-table-danger-bg: #fed4de;
    --bs-table-danger-border-color: #e5bfc8;
    --bs-table-danger-striped-bg: #f1c9d3;
    --bs-table-danger-striped-color: var(--bs-black);
    --bs-table-danger-active-bg: #e5bfc8;
    --bs-table-danger-active-color: var(--bs-black);
    --bs-table-danger-hover-bg: #ebc4cd;
    --bs-table-danger-hover-color: var(--bs-black);

    --bs-table-light-color: var(--bs-black);
    --bs-table-light-bg: #F9F9F9;
    --bs-table-light-border-color: #e0e0e0;
    --bs-table-light-striped-bg: #ededed;
    --bs-table-light-striped-color: var(--bs-black);
    --bs-table-light-active-bg: #e0e0e0;
    --bs-table-light-active-color: var(--bs-black);
    --bs-table-light-hover-bg: #e6e6e6;
    --bs-table-light-hover-color: var(--bs-black);

    --bs-table-dark-color: #ffffff;
    --bs-table-dark-bg: #1E2129;
    --bs-table-dark-border-color: #35373e;
    --bs-table-dark-striped-bg: #292c34;
    --bs-table-dark-striped-color: #ffffff;
    --bs-table-dark-active-bg: #35373e;
    --bs-table-dark-active-color: #ffffff;
    --bs-table-dark-hover-bg: #2f3239;
    --bs-table-dark-hover-color: #ffffff;

    --bs-light-rgb: 249, 249, 249;
    --bs-primary-rgb: 93, 44, 133;
    /* RGB dari #503596 */
    --bs-secondary-rgb: 224, 224, 224;
    --bs-success-rgb: 40, 167, 69;
    --bs-info-rgb: 23, 162, 184;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 220, 53, 69;
    --bs-dark-rgb: 52, 58, 64;

    /* Text Colors */
    --bs-primary-text: #503596;
    --bs-secondary-text: #7E8299;
    --bs-success-text: #146C43;
    --bs-info-text: #17A2B8;
    --bs-warning-text: #997404;
    --bs-danger-text: #B02A37;
    --bs-light-text: #7E8299;
    --bs-dark-text: #5E6278;

    /* Background Subtle */
    --bs-primary-bg-subtle: #F0E6F7;
    --bs-secondary-bg-subtle: #F9F9F9;
    --bs-success-bg-subtle: #D1E7DD;
    --bs-info-bg-subtle: #D1ECF1;
    --bs-warning-bg-subtle: #FFF3CD;
    --bs-danger-bg-subtle: #F8D7DA;
    --bs-light-bg-subtle: #FCFCFC;
    --bs-dark-bg-subtle: #B5B5C3;

    /* Border Subtle */
    --bs-primary-border-subtle: #CDA0E2;
    --bs-secondary-border-subtle: #F4F4F4;
    --bs-success-border-subtle: #A3CFBB;
    --bs-info-border-subtle: #A7D9ED;
    --bs-warning-border-subtle: #FFE69C;
    --bs-danger-border-subtle: #F1AEB5;
    --bs-light-border-subtle: #F4F4F4;
    --bs-dark-border-subtle: #5B5A5A;

    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    --bs-body-color-rgb: 24, 28, 50;
    --bs-body-bg-rgb: 255, 255, 255;
    --bs-gradient: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0));
    --bs-body-color: #181c32;
    --bs-emphasis-color: #000000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(24, 28, 50, 0.75);
    --bs-secondary-color-rgb: 24, 28, 50;
    --bs-secondary-bg: #f4f4f4;
    --bs-secondary-bg-rgb: 244, 244, 244;
    --bs-tertiary-color: rgba(24, 28, 50, 0.5);
    --bs-tertiary-color-rgb: 24, 28, 50;
    --bs-tertiary-bg: #f9f9f9;
    --bs-tertiary-bg-rgb: 249, 249, 249;
    --bs-body-bg: #ffffff;
    --bs-body-bg-rgb: 255, 255, 255;
    --bs-heading-color: #181c32;
    --bs-link-color: #503596 !important;
    --bs-link-color-rgb: 93, 44, 133;
    --bs-link-decoration: none;
    --bs-link-hover-color: #8C4EAF !important;
    --bs-link-hover-color-rgb: 140, 78, 175;
    --bs-link-hover-decoration: underline;
    /* Link hover underline untuk kejelasan */
    --bs-code-color: #b93993;
    --bs-highlight-bg: #fff3cd;
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #f4f4f4;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
    --bs-border-radius: 0.475rem;
    --bs-border-radius-sm: 0.425rem;
    --bs-border-radius-lg: 0.625rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-2xl: 2rem;
    --bs-border-radius-pill: 50rem;
    --bs-box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-sm: 0 0.1rem 1rem 0.25rem rgba(0, 0, 0, 0.05);
    --bs-box-shadow-lg: 0 1rem 2rem 1rem rgba(0, 0, 0, 0.1);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    --bs-emphasis-color: #000000;
    --bs-form-control-bg: var(--bs-body-bg);
    --bs-form-control-disabled-bg: var(--bs-secondary-bg);
    --bs-highlight-bg: #fff3cd;
    --bs-breakpoint-xs: 0;
    --bs-breakpoint-sm: 576px;
    --bs-breakpoint-md: 768px;
    --bs-breakpoint-lg: 992px;
    --bs-breakpoint-xl: 1200px;
    --bs-breakpoint-xxl: 1400px;
}

[data-bs-theme="dark"] {
    --bs-body-color: #ffffff;
    --bs-body-color-rgb: 255, 255, 255;
    --bs-body-bg: #1A232F !important;
    /* Dark Blue Gray - Latar belakang gelap yang solid */
    --bs-body-bg-rgb: 26, 35, 47;
    /* RGB dari #1A232F */
    --bs-emphasis-color: #f9f9f9;
    --bs-emphasis-color-rgb: 249, 249, 249;
    --bs-secondary-color: rgba(255, 255, 255, 0.75);
    --bs-secondary-color-rgb: 255, 255, 255;
    --bs-secondary-bg: #3F4254;
    --bs-secondary-bg-rgb: 63, 66, 84;
    --bs-tertiary-color: rgba(255, 255, 255, 0.5);
    --bs-tertiary-color-rgb: 255, 255, 255;
    --bs-tertiary-bg: #2C2F43;
    --bs-tertiary-bg-rgb: 44, 47, 67;
    --bs-emphasis-color: #ffffff;

    /* PALET WARNA UTAMA - DARK THEME (Ungu Tua) */
    --bs-primary-text: #8C4EAF;
    --bs-secondary-text: #A0A0A0;
    /* Abu-abu terang untuk teks secondary */
    --bs-success-text: #28A745;
    --bs-info-text: #17A2B8;
    --bs-warning-text: #FFC107;
    --bs-danger-text: #DC3545;
    --bs-light-text: #F9F9F9;
    --bs-dark-text: #F8F8F8;
    /* Teks terang di background gelap */

    /* Background Subtle */
    --bs-primary-bg-subtle: #240C33;
    /* Dark Purple Subtle */
    --bs-secondary-bg-subtle: #2C2F43;
    /* Darker gray for secondary subtle */
    --bs-success-bg-subtle: #051B11;
    --bs-info-bg-subtle: #123F45;
    /* Dark Cyan Subtle */
    --bs-warning-bg-subtle: #332701;
    --bs-danger-bg-subtle: #2C0B0E;
    --bs-light-bg-subtle: #3F4254;
    --bs-dark-bg-subtle: #20212A;

    /* Border Subtle */
    --bs-primary-border-subtle: #572DA6;
    --bs-secondary-border-subtle: #5E6278;
    --bs-success-border-subtle: #0F5132;
    --bs-info-border-subtle: #1A5E6B;
    --bs-warning-border-subtle: #664D03;
    --bs-danger-border-subtle: #842029;
    --bs-light-border-subtle: #5E6278;
    --bs-dark-border-subtle: #3F4254;

    --bs-heading-color: #ffffff;
    --bs-link-color: #8C4EAF !important;
    --bs-link-hover-color: #C08EE6;
    --bs-link-color-rgb: 140, 78, 175;
    --bs-link-hover-color-rgb: 192, 142, 230;
    --bs-link-hover-decoration: underline;
    --bs-code-color: #b93993;
    --bs-border-color: #35424D !important;
    /* Border yang lebih gelap dan solid */
    --bs-border-color-translucent: rgba(255, 255, 255, 0.15);

    /* PRIMARY UNTUK DARK THEME */
    --bs-primary: #8C4EAF !important;
    /* Ungu sedang - Menonjol di latar gelap */
    --bs-sub-primary: #503596;
    /* Ungu Tua - Untuk aksen di dark theme */
    --bs-info: #17A2B8;
    /* Cyan terang - Untuk informasi */

    /* ACTIVE STATES DARK THEME */
    --bs-primary-active: #723F8F !important;
    --bs-sub-primary-active: #572DA6;
    --bs-info-active: #138496;

    /* BORDER COLORS DARK THEME */
    --bs-primary-border: #723F8F;
    --bs-sub-primary-border: #572DA6;
    --bs-info-border: #138496;

    /* LIGHT VARIANTS DARK THEME */
    --bs-primary-light: #d2b5e8 !important;
    /* Warna terang yang kontras di gelap */
    --bs-sub-primary-light: #D9A0F0;
    --bs-info-light: #8DE5EF;

    /* TABLE COLORS DARK THEME */
    --bs-table-primary-color: #ffffff;
    --bs-table-primary-bg: #3A234D;
    /* Darker Purple for table */
    --bs-table-primary-border-color: #4D3461;
    --bs-table-primary-striped-bg: #422C58;
    --bs-table-primary-striped-color: #ffffff;
    --bs-table-primary-active-bg: #4D3461;
    --bs-table-primary-active-color: #ffffff;
    --bs-table-primary-hover-bg: #47305C;
    --bs-table-primary-hover-color: #ffffff;

    --bs-table-success-color: #ffffff;
    --bs-table-success-bg: #1A3E2C;
    --bs-table-success-border-color: #2E6B4E;
    --bs-table-success-striped-bg: #25533F;
    --bs-table-success-striped-color: #ffffff;
    --bs-table-success-active-bg: #2E6B4E;
    --bs-table-success-active-color: #ffffff;
    --bs-table-success-hover-bg: #285A48;
    --bs-table-success-hover-color: #ffffff;

    --bs-table-info-color: #ffffff;
    --bs-table-info-bg: #2B3A4D;
    /* Sama dengan primary */
    --bs-table-info-border-color: #3C4D61;
    --bs-table-info-striped-bg: #324358;
    --bs-table-info-striped-color: #ffffff;
    --bs-table-info-active-bg: #3C4D61;
    --bs-table-info-active-color: #ffffff;
    --bs-table-info-hover-bg: #37475C;
    --bs-table-info-hover-color: #ffffff;

    --bs-table-warning-color: #ffffff;
    --bs-table-warning-bg: #4B3900;
    --bs-table-warning-border-color: #7E6000;
    --bs-table-warning-striped-bg: #614A00;
    --bs-table-warning-striped-color: #ffffff;
    --bs-table-warning-active-bg: #7E6000;
    --bs-table-warning-active-color: #ffffff;
    --bs-table-warning-hover-bg: #6A5000;
    --bs-table-warning-hover-color: #ffffff;

    --bs-table-danger-color: #ffffff;
    --bs-table-danger-bg: #4D0C13;
    --bs-table-danger-border-color: #821F28;
    --bs-table-danger-striped-bg: #63181F;
    --bs-table-danger-striped-color: #ffffff;
    --bs-table-danger-active-bg: #821F28;
    --bs-table-danger-active-color: #ffffff;
    --bs-table-danger-hover-bg: #6D1B22;
    --bs-table-danger-hover-color: #ffffff;

    --bs-table-light-color: #ffffff;
    --bs-table-light-bg: #3f4254;
    --bs-table-light-border-color: #5e6278;
    --bs-table-light-striped-bg: #4d5167;
    --bs-table-light-striped-color: #ffffff;
    --bs-table-light-active-bg: #5e6278;
    --bs-table-light-active-color: #ffffff;
    --bs-table-light-hover-bg: #54586d;
    --bs-table-light-hover-color: #ffffff;

    --bs-table-dark-color: #ffffff;
    --bs-table-dark-bg: #1E2129;
    --bs-table-dark-border-color: #35373e;
    --bs-table-dark-striped-bg: #292c34;
    --bs-table-dark-striped-color: #ffffff;
    --bs-table-dark-active-bg: #35373e;
    --bs-table-dark-active-color: #ffffff;
    --bs-table-dark-hover-bg: #2f3239;
    --bs-table-dark-hover-color: #ffffff;
}