:root {
    --green-deep: #1B4332;
    --green-mid: #2D6A4F;
    --green-light: #52B788;
    --gold: #C9A84C;
    --gold-light: #E8C96B;
    --cream: #F9F5EC;
    --sidebar-w: 260px;
    --topbar-h: 60px;
    --red: #DC2626;
    --blue: #2563EB;
    --purple: #7C3AED
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: 'Inter', sans-serif;
    background: #F1F5F2;
    color: #1A1A1A
}

.bg-current {
    background-color: var(--green-deep);
    color: #fff;
}

.text-current {
    color: var(--green-deep);
}


/* LOGIN */
#loginPage {
    min-height: 100vh;
    background: linear-gradient(145deg, var(--green-deep) 0%, var(--green-mid) 55%, #40916C 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden
}

#loginPage::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23C9A84C' fill-opacity='0.06'%3E%3Cpath d='M30 0L36 12L48 6L42 18L54 24L42 30L48 42L36 36L30 48L24 36L12 42L18 30L6 24L18 18L12 6L24 12Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
}

.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 2.8rem 2.4rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .2);
    position: relative;
    z-index: 1
}

.login-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem
}

.login-title {

    font-size: 1.45rem;
    font-weight: 700;
    color: var(--green-deep);
    text-align: center;
    margin-bottom: .3rem
}

.login-sub {
    text-align: center;
    font-size: .82rem;
    color: #6B7280;
    margin-bottom: 2rem
}

.form-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 7px;
    border: 1.5px solid #E5E7EB;
    transition: border-color .2s, box-shadow .2s
}

textarea.form-control {
    height: auto !important;
}

.form-control-sm,
.form-select-sm {
    font-size: .78rem;
    height: 32px;
    padding: .25rem .5rem;
    box-sizing: border-box;
}

.form-select-sm {
    line-height: 1.5;
    padding-top: 0;
    padding-bottom: 0;
}

.form-select-sm option {
    font-size: .78rem;
}


.form-control:not(.form-control-sm):not(.form-control-lg) {
    font-size: .875rem;
    padding: .65rem .9rem;
}

.form-select:not(.form-select-sm):not(.form-select-lg) {
    padding: .65rem 2.25rem .65rem .9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .12)
}

.form-select.form-select-sm {
    height: 32px;
    min-height: 32px;
    line-height: 30px;
    padding: 0 2rem 0 .5rem;
    box-sizing: border-box;
}

/* SELECT 2 */

/* ══ SELECT2 SMALL (otomatis saat <select class="form-select-sm select2">) ══ */

/* single */
select.form-select-sm+.select2-container--bootstrap-5 .select2-selection--single {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 .5rem !important;
    border-radius: 7px;
}

select.form-select-sm+.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    font-size: .78rem;
    line-height: 30px;
    padding-right: 1.4rem;
}

select.form-select-sm+.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 30px;
}

/* multiple */
select.form-select-sm+.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: 32px !important;
    padding: .1rem .5rem !important;
    font-size: .78rem;
}

select.form-select-sm+.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    font-size: .75rem;
    padding: .1rem .4rem;
}

/* dropdown (dirender di <body>; class select2-sm dipasang otomatis oleh JS) */
.select2-dropdown.select2-sm .select2-results__option {
    font-size: .78rem !important;
    padding: .35rem .6rem !important;
}

.select2-dropdown.select2-sm .select2-search--dropdown {
    padding: .4rem;
}

.select2-dropdown.select2-sm .select2-search__field {
    font-size: .78rem !important;
    padding: .25rem .5rem !important;
    min-height: 0 !important;
    height: 30px;
}

.select2-container--bootstrap-5 .select2-selection--single {
    border: 1.5px solid #E5E7EB;
    border-radius: 7px;
    transition: border-color .2s, box-shadow .2s;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    font-size: .875rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--single,
.select2-container--bootstrap-5.select2-container--open .select2-selection--single,
.select2-dropdown.select2-dropdown--below,
.select2-dropdown.select2-dropdown--below .select2-search__field,
.select2-dropdown.select2-dropdown--above,
.select2-dropdown.select2-dropdown--above .select2-search__field {
    border-color: var(--green-mid) !important;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .12) !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    border: 1.5px solid #E5E7EB;
    border-radius: 7px;
    transition: border-color .2s, box-shadow .2s;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--multiple {
    border-color: var(--green-mid) !important;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .12) !important;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection--single {
    border-color: var(--green-mid) !important;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .12) !important;
}

.select2-results__option--highlighted {
    background-color: var(--green-mid) !important;
    color: #fff !important;
}

.select2-results__option--selected {
    background-color: var(--green-mid) !important;
    color: #fff !important;
}

/* Samakan tinggi Form Control dan Select2 */
.form-control:not(.form-control-sm):not(.form-control-lg),
.form-select:not(.form-select-sm):not(.form-select-lg),
.select2-container--bootstrap-5 .select2-selection--single {
    min-height: 40px;
}

.form-control:not(.form-control-sm):not(.form-control-lg),
.form-select:not(.form-select-sm):not(.form-select-lg) {
    height: 40px;
    padding-top: .375rem;
    padding-bottom: .375rem;
    box-sizing: border-box;
}

/* Select2 single */
.select2-container--bootstrap-5 .select2-selection--single {
    height: 42px !important;
    padding: 0 .9rem;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Teks Select2 */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 1.5rem;
    line-height: normal;
    font-size: .875rem;
}

/* Panah Select2 */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 40px;
    top: 0;
    right: 5px;
}

/* Select2 multiple: samakan tinggi dan font */
.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: 42px;
    /* tinggi awal sama dengan form-select */
    border: 1.5px solid #E5E7EB;
    border-radius: 7px;
    padding: .375rem .9rem;
    /* padding mirip form-select */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box;
    font-size: .875rem;
    /* samakan font */
}

/* Tag (choice) di dalam multiple */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    margin-top: 0;
    margin-right: .25rem;
    padding: .25rem .5rem;
    border-radius: 4px;
    background-color: #e5e7eb;
    font-size: .875rem;
    /* samakan font */
    line-height: 1.5;
}

/* Teks di dalam tag */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display {
    margin-right: .25rem;
}

/* Tombol hapus (x) di tag */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #333;
    margin-right: .25rem;
}


.btn-login {
    background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
    color: #fff;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: .9rem;
    padding: .75rem;
    width: 100%;
    transition: opacity .2s, transform .2s
}

.btn-login:hover {
    opacity: .92;
    transform: translateY(-1px);
    color: #fff
}

.btn-primary-c {
    background: var(--green-deep);
    color: #fff;
    border: none;
    font-size: .84rem;
    font-weight: 700;
    border-radius: 8px;
    padding: .5rem 1.3rem
}

.btn-primary-c:hover {
    background: var(--green-mid);
    color: #fff;
}

.btn-primary-c:disabled,
.btn-primary-c.disabled {
    background: #9CA3AF;
    color: #fff;
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}


.login-hint {
    background: var(--cream);
    border-radius: 7px;
    padding: .7rem 1rem;
    font-size: .78rem;
    color: #555;
    margin-top: 1.2rem;
    border-left: 3px solid var(--gold)
}

/* SHELL */
#adminShell {
    display: block;
    min-height: 100vh
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--green-deep);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .3s
}

.sidebar-brand {
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    gap: .8rem
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: rgba(201, 168, 76, .18);
    border: 1px solid var(--gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.1rem
}

.sidebar-brand-text {
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2
}

.sidebar-brand-sub {
    font-size: .66rem;
    color: var(--gold-light);
    letter-spacing: .1em;
    text-transform: uppercase
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0
}

.nav-section-label {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35);
    padding: .9rem 1.4rem .4rem
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.4rem;
    margin: .25rem .6rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: .855rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .18s;
    cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(0, 200, 100, 0.40);
    box-shadow: 0 2px 4px rgba(0, 150, 80, .25);
}

.sidebar-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center
}

.badge-nav {
    margin-left: auto;
    font-size: .65rem;
    background: var(--gold);
    color: var(--green-deep);
    border-radius: 20px;
    padding: .15rem .55rem;
    font-weight: 700
}

.sidebar-footer {
    padding: 1rem 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-deep);
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0
}

.sidebar-username {
    font-size: .82rem;
    font-weight: 600;
    color: #fff
}

.sidebar-role {
    font-size: .7rem;
    color: var(--gold-light)
}

/* SIDEBAR DROPDOWN ANIMASI */
.sidebar-submenu {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    overflow: hidden;
    transition: transform .25s ease, opacity .25s ease .1s;
}

.sidebar-submenu.show {
    transform: scaleY(1);
    opacity: 1;
    background: rgba(255, 255, 255, .03);
    border-radius: 8px;
}


.sidebar-submenu .sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1.8rem;
    margin: .2rem .8rem;
    font-size: .855rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    transition: background .2s, color .2s;
}

.sidebar-submenu .sidebar-link::before {
    content: "•";
    font-size: 1.2rem;
    color: rgba(255, 255, 255, .45);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-submenu .sidebar-link:hover,
.sidebar-submenu .sidebar-link.active {
    background: rgba(0, 200, 100, .15);
    color: #fff;
    border-radius: 6px;
}

.sidebar-submenu .sidebar-link:hover::before,
.sidebar-submenu .sidebar-link.active::before {
    color: #00c853;
}

/* Icon caret animasi */
.sidebar-link.dropdown-toggle::after {
    margin-left: auto;
    transition: transform .3s cubic-bezier(.68, -0.55, .27, 1.55);
}

.sidebar-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}


/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06)
}

.topbar-title {

    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-deep);
    flex: 1
}

.topbar-title span {
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    color: #9CA3AF;
    font-weight: 400;
    margin-left: .5rem
}

.btn-topbar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid #E5E7EB;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    cursor: pointer;
    transition: all .18s;
    font-size: 1rem;
    text-decoration: none
}

.btn-topbar:hover {
    border-color: var(--green-mid);
    color: var(--green-mid)
}

/* MAIN */
.main-content {
    margin-left: var(--sidebar-w);
    padding-top: var(--topbar-h);
    min-height: 100vh
}

.content-area {
    padding: 1.8rem
}

.page {
    display: block;
}

.page-head {
    margin-bottom: 1.4rem;
}

.page-head h1 {

    font-size: 1.15rem;
    font-weight: 700;
    color: var(--green-deep);
}

.page-head .crumb {
    font-size: .8rem;
    color: #9CA3AF;
}

/* CARDS */
.dash-stat {
    background: #fff;
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    border-top: 4px solid var(--gold);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .06);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform .2s, box-shadow .2s
}

.dash-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1)
}

.dash-stat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem
}

.dash-stat-num {

    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1
}

.dash-stat-label {
    font-size: .78rem;
    color: #6B7280;
    margin-top: .25rem
}

.dash-stat-trend {
    font-size: .72rem;
    font-weight: 600;
    margin-top: .2rem
}

.trend-up {
    color: #059669
}

.admin-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .06);
    overflow: hidden
}

.admin-card-header {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.admin-card-header-1 {
    padding: 0.3rem 1.4rem;
    background: var(--cream);
    border-bottom: 1px solid #EFE7D2;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.admin-card-title {
    font-weight: 700;
    font-size: .92rem;
    color: var(--green-deep);
    display: flex;
    align-items: center;
    gap: .5rem
}

.admin-card-subtitle {
    font-size: .85rem;
    color: #6b7280;
}


.admin-card-title i {
    color: var(--gold)
}

.admin-card-body {
    padding: 1.4rem
}

.admin-card-footer {
    padding: 1rem 1.6rem;
    background: var(--cream);
    border-top: 1px solid #EFE7D2;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.admin-card.bg-transparent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


/* TABLES */
.tbl {
    font-size: .845rem
}

.tbl.table-sm thead th {
    padding: .45rem .75rem;
}

.tbl.table-sm tbody td {
    padding: .45rem .75rem;
}

.tbl thead th {
    background: var(--green-deep) !important;
    color: #fff;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    padding: .85rem 1rem;
    border: none
}

.tbl tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-color: #F3F4F6
}

.tbl tbody tr:hover {
    background: #FAFAFA
}

/* BADGES */
.bdg {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: .22rem .65rem;
    border-radius: 4px
}

/* Utility variants */
.bdg-primary {
    background: #DBEAFE;
    color: #1E40AF;
}

.bdg-success {
    background: #D1FAE5;
    color: #065F46;
}

.bdg-warning {
    background: #FEF3C7;
    color: #92400E;
}

.bdg-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.bdg-info {
    background: #E0F2FE;
    color: #075985;
}

.bdg-secondary {
    background: #F3F4F6;
    color: #374151;
}

.bdg-dark {
    background: #1F2937;
    color: #F9FAFB;
}

.bdg-light {
    background: #F9FAFB;
    color: #111827;
}

.bdg-aktif {
    background: #D1FAE5;
    color: #065F46
}

.bdg-verif {
    background: #FEF3C7;
    color: #92400E
}

.bdg-nonaktif {
    background: #FEE2E2;
    color: #991B1B
}

.bdg-super {
    background: #EDE9FE;
    color: #5B21B6
}

.bdg-operator {
    background: #DBEAFE;
    color: #1E40AF
}

.bdg-viewer {
    background: #F3F4F6;
    color: #374151
}

/* ACTION BTN */
.btn-act {
    border: none;
    border-radius: 6px;
    padding: .3rem .6rem;
    font-size: .75rem;
    cursor: pointer;
    transition: opacity .15s
}

.btn-act:hover {
    opacity: .82
}

.btn-edit {
    background: #DBEAFE;
    color: var(--blue)
}

.btn-del {
    background: #FEE2E2;
    color: var(--red)
}

.btn-view {
    background: #D1FAE5;
    color: #065F46
}

.btn-gold {
    background: var(--gold);
    color: var(--green-deep);
    border: 1px solid var(--gold);
    font-weight: 600;
    font-size: .8rem;

    display: inline-flex;
    align-items: center;
}

.btn-gold:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--green-deep);
}

.btn-gold:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(201, 168, 76, .25);
}

/* MODAL */
.modal-header {
    background: var(--green-deep);
    color: #fff
}

.modal-title {

    font-size: 1rem
}

.modal-header .btn-close {
    filter: invert(1)
}

.form-label-sm {
    font-size: .79rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .3rem
}

.label-status-on {
    font-size: .85rem;
    font-weight: 500;
    color: #059669;
}

.label-status-off {
    font-size: .85rem;
    font-weight: 500;
    color: #991B1B;
}

/* TOAST */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999
}

.toast-custom {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-width: 280px;
    border-left: 4px solid var(--green-mid);
    animation: slideIn .3s ease
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

.toast-icon {
    font-size: 1.15rem;
    color: var(--green-mid);
    margin-top: 1px
}

.toast-msg {
    font-size: .845rem;
    font-weight: 500
}

.toast-sub {
    font-size: .76rem;
    color: #6B7280;
    margin-top: .1rem
}

/* LOG */
.log-item {
    display: flex;
    gap: .9rem;
    padding: .75rem 0;
    border-bottom: 1px solid #F3F4F6
}

.log-item:last-child {
    border-bottom: none
}

.log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0
}

.log-msg {
    font-size: .82rem;
    color: #374151
}

.log-time {
    font-size: .72rem;
    color: #9CA3AF;
    margin-top: .15rem
}

.mini-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
    margin-top: .5rem
}

.mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--green-deep), var(--green-light))
}

.profile-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 2rem;
    font-weight: 700
}

@media(max-width:991px) {
    .sidebar {
        transform: translateX(-100%)
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main-content {
        margin-left: 0
    }

    .topbar {
        left: 0
    }
}

::-webkit-scrollbar {
    width: 5px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px
}

/* ══ SWEETALERT2 — TEMA HIJAU/EMAS ══ */
.swal2-popup.swal-theme {
    border-radius: 14px !important;
    font-family: 'Inter', sans-serif !important;
    padding: 1.6rem 1.4rem 1.8rem !important;
}

.swal-theme .swal2-title {
    font-family: 'Lora', serif !important;
    font-size: 1.25rem !important;
    color: var(--green-deep) !important;
    font-weight: 700 !important;
    padding-top: .4rem !important;
}

.swal-theme .swal2-html-container {
    font-size: .86rem !important;
    color: #6B7280 !important;
}

.swal-theme .swal2-icon {
    border-color: var(--gold) !important;
}

.swal-theme .swal2-icon.swal2-success {
    border-color: var(--green-mid) !important;
}

.swal-theme .swal2-icon.swal2-success [class^="swal2-success-line"] {
    background-color: var(--green-mid) !important;
}

.swal-theme .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(45, 106, 79, .3) !important;
}

.swal-theme .swal2-icon.swal2-warning {
    color: var(--gold) !important;
    border-color: var(--gold) !important;
}

.swal-theme .swal2-icon.swal2-error {
    border-color: var(--red) !important;
    color: var(--red) !important;
}

.swal-theme .swal2-icon.swal2-question {
    border-color: var(--green-mid) !important;
    color: var(--green-mid) !important;
}

.swal-btn-confirm {
    background: var(--green-deep) !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: .85rem !important;
    border-radius: 7px !important;
    padding: .55rem 1.4rem !important;
    box-shadow: none !important;
}

.swal-btn-confirm:hover {
    background: var(--green-mid) !important;
}

.swal-btn-confirm:focus {
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .25) !important;
}

.swal-btn-danger {
    background: var(--red) !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: .85rem !important;
    border-radius: 7px !important;
    padding: .55rem 1.4rem !important;
    box-shadow: none !important;
}

.swal-btn-danger:hover {
    background: #B91C1C !important;
}

.swal-btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .25) !important;
}

.swal-btn-cancel {
    background: #fff !important;
    color: #374151 !important;
    border: 1.5px solid #E5E7EB !important;
    font-weight: 600 !important;
    font-size: .85rem !important;
    border-radius: 7px !important;
    padding: .55rem 1.4rem !important;
    box-shadow: none !important;
}

.swal-btn-cancel:hover {
    background: #F9FAFB !important;
}

/* Toast SweetAlert2 */
.swal-toast-theme {
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal-toast-theme .swal2-title {
    font-family: 'Inter', sans-serif !important;
    font-size: .86rem !important;
    font-weight: 600 !important;
    color: #1A1A1A !important;
}

.swal-toast-theme .swal2-html-container {
    font-size: .76rem !important;
    color: #6B7280 !important;
}

.swal-toast-theme.swal2-icon-success {
    border-left: 4px solid var(--green-mid) !important;
}

.swal-toast-theme.swal2-icon-error {
    border-left: 4px solid var(--red) !important;
}

.swal-toast-theme.swal2-icon-warning {
    border-left: 4px solid var(--gold) !important;
}

.swal-toast-theme .swal2-success-ring {
    border-color: rgba(45, 106, 79, .3) !important;
}

.swal-toast-theme [class^="swal2-success-line"] {
    background-color: var(--green-mid) !important;
}

.swal-toast-theme .swal2-icon.swal2-error {
    border-color: var(--red) !important;
    color: var(--red) !important;
}

.swal-toast-theme .swal2-timer-progress-bar {
    background: var(--gold) !important;
}

/* ACTION BUTTTON DROPDOWN ON DATATABLES */
.action-menu {
    position: fixed;
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    z-index: 1055;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    transform: translateY(-10px) scale(.95);
    opacity: 0;
    pointer-events: none;
    transition: all .15s ease;
}

.action-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.action-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 10px 14px;
    font-size: .9rem;
    color: #374151;
    text-decoration: none;
    border-radius: 10px;
}

.action-item:hover {
    background: #f1f5f9;
}

.action-item.text-danger:hover {
    background: #fee2e2;
}

.detail-group {
    margin-bottom: 1rem;
}

.detail-group label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.detail-group div {
    font-size: .95rem;
    color: #111827;
}

.status-card {
    display: flex;
    justify-content: end;
}

.status-card .badge {
    font-size: .8rem;
    padding: .6rem .9rem;
}

/* Aktif */
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2f7232, #1a431d);
    color: #fff;
    border-color: var(--green-mid);
    box-shadow: 0 2px 4px rgba(0, 150, 80, .25);
}

.dataTables_info,
.dt-info {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-top: 0.25rem;
}

.dataTables_length,
.dt-length {
    font-size: 0.85rem;
    line-height: 1.2;
}


/* ── STEPPER ── */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 1.4rem 1.6rem 1.2rem;
    border-bottom: 1px solid #F0F0F0
}

.stepper::before {
    content: '';
    position: absolute;
    top: 2.4rem;
    left: calc(1.6rem + 20px);
    right: calc(1.6rem + 20px);
    height: 3px;
    background: #E5E7EB;
    z-index: 0
}

.stepper-progress {
    position: absolute;
    top: 2.4rem;
    left: calc(1.6rem + 20px);
    height: 3px;
    background: linear-gradient(90deg, var(--green-mid), var(--gold));
    z-index: 1;
    transition: width .35s ease;
    width: 0
}

.step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    cursor: default
}

.step-circle {
    width: 40px;
    height: 40px;
    margin: 0 auto .45rem;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #E5E7EB;
    color: #9CA3AF;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s
}

.step-label {
    font-size: .72rem;
    font-weight: 500;
    color: #9CA3AF;
    transition: color .25s
}

.step-item.active .step-circle {
    border-color: var(--gold);
    background: var(--green-deep);
    color: var(--gold-light);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, .2)
}

.step-item.active .step-label {
    color: var(--green-deep);
    font-weight: 600
}

.step-item.done .step-circle {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: #fff
}

.step-item.done .step-label {
    color: var(--green-mid)
}

.step-item.done {
    cursor: pointer
}

/* ── STEP PANES ── */
.step-pane {
    display: none;
    animation: fadeIn .3s ease
}

.step-pane.active {
    display: block
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(12px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.pane-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-deep);
    margin-bottom: .2rem
}

.pane-sub {
    font-size: .8rem;
    color: #9CA3AF;
    margin-bottom: 1.3rem
}

.form-label {
    font-size: .8rem;
    font-weight: 600;
    color: #374151
}

.form-label .req {
    color: var(--red)
}

.form-control,
.form-select {
    font-size: .86rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    padding: .55rem .8rem
}

.form-control:focus,
.form-select:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .15)
}

.form-check-input:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .15);
}

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

.form-check-input:disabled {
    background-color: rgba(200, 200, 200, .3);
    cursor: not-allowed;
}


.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--red);
    background-image: none
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .15)
}

.form-control::placeholder,
.form-select::placeholder {
    color: #A0A7B4;
    opacity: 1;
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: #9CA3AF;
    opacity: 1;
}

.select2-container--bootstrap-5 .select2-selection__placeholder,
.select2-container .select2-selection__placeholder {
    color: #9CA3AF !important;
}

.input-group-text {
    font-size: .82rem;
    background: var(--cream);
    border: 1.5px solid #E5E7EB;
    color: #6B7280
}

.upload-box {
    border: 2px dashed #D1D5DB;
    border-radius: 10px;
    padding: 1.4rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: #FAFAFA
}

.upload-box:hover {
    border-color: var(--gold);
    background: var(--cream)
}

.upload-box i {
    font-size: 1.8rem;
    color: var(--gold)
}

.upload-box img {
    max-height: 200px;
    border-radius: 8px
}

/* ── REVIEW ── */
.review-block {
    border: 1px solid #EEE;
    border-radius: 10px;
    margin-bottom: .9rem;
    overflow: hidden
}

.review-head {
    background: var(--cream);
    padding: .55rem 1rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--green-deep);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.review-head button {
    border: 0;
    background: none;
    color: var(--green-mid);
    font-size: .75rem;
    font-weight: 600
}

.review-row {
    display: flex;
    padding: .45rem 1rem;
    font-size: .83rem;
    border-top: 1px solid #F5F5F5
}

.review-row span:first-child {
    width: 38%;
    color: #9CA3AF
}

.review-row span:last-child {
    font-weight: 500
}

/* ── BUTTONS ── */
.btn-prev {
    background: #fff;
    border: 1.5px solid #E5E7EB;
    color: #4B5563;
    font-size: .84rem;
    font-weight: 600;
    border-radius: 8px;
    padding: .5rem 1.1rem
}

.btn-prev:hover {
    border-color: var(--gold);
    background: var(--cream);
    color: var(--green-deep)
}

.btn-next {
    background: var(--green-deep);
    border: 0;
    color: #fff;
    font-size: .84rem;
    font-weight: 600;
    border-radius: 8px;
    padding: .5rem 1.3rem
}

.btn-next:hover {
    background: var(--green-mid);
    color: #fff
}

.btn-save {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: 0;
    color: var(--green-deep);
    font-size: .84rem;
    font-weight: 700;
    border-radius: 8px;
    padding: .5rem 1.3rem
}

.btn-save:hover {
    filter: brightness(.95)
}

.btn-scroll {
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.btn-scroll:hover {
    background-color: rgba(255, 255, 255, 0.9);
}


.step-counter {
    font-size: .76rem;
    color: #9CA3AF
}

/* ── SWEETALERT THEME ── */
.swal2-popup.swal-theme {
    border-radius: 14px;
    font-family: 'Inter', sans-serif
}

.swal-theme .swal2-title {

    color: var(--green-deep)
}

.swal-btn-confirm {
    background: var(--green-deep) !important;
    color: #fff !important;
    border-radius: 7px;
    padding: .55rem 1.2rem;
    border: 0;
    font-weight: 600;
    font-size: .85rem;
    margin: 0 .3rem
}

.swal-btn-cancel {
    background: #fff !important;
    color: #4B5563 !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 7px;
    padding: .55rem 1.2rem;
    font-weight: 600;
    font-size: .85rem;
    margin: 0 .3rem
}

@media(max-width:575px) {
    .step-label {
        display: none
    }

    .stepper {
        padding: 1.2rem 1rem
    }

    .stepper::before,
    .stepper-progress {
        top: 2.2rem
    }
}

/* ── NAV PILLS THEME ── */
.nav-pills.nav-pills-theme {
    gap: .4rem;
    padding: .4rem;
    background: var(--cream);
    border: 1px solid #EFE7D2;
    border-radius: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-pills-theme::-webkit-scrollbar {
    height: 4px;
}

.nav-pills-theme::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.nav-pills-theme .nav-link {
    display: flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 600;
    color: #6B7280;
    background: transparent;
    border-radius: 8px;
    padding: .55rem 1.1rem;
    border: 1.5px solid transparent;
    transition: all .2s;
}

.nav-pills-theme .nav-link i {
    font-size: .95rem;
    color: var(--gold);
    transition: color .2s;
}

.nav-pills-theme .nav-link:hover:not(.active) {
    background: #fff;
    color: var(--green-deep);
    border-color: #EFE7D2;
}

.nav-pills-theme .nav-link.active,
.nav-pills-theme .show>.nav-link {
    background: var(--green-deep);
    color: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .2);
}

.nav-pills-theme .nav-link.active i {
    color: var(--gold-light);
}

.nav-pills-theme .nav-link:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .25);
}

/* animasi isi tab (opt-in juga) */
.tab-content-theme>.tab-pane.active {
    animation: fadeIn .3s ease;
}

.tab-content-theme {
    padding-top: 1.2rem;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* layar sentuh */

.swal2-popup.swal-lightbox {
    padding: 1rem 1rem .8rem;
    border-radius: 14px;
    background: #fff;
    width: auto;
    max-width: min(92vw, 960px);
}

.swal-lightbox .swal2-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-deep);
    padding: 0 2rem .6rem 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.swal-lightbox .swal2-html-container {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.swal-lightbox .swal2-close {
    color: #9CA3AF;
}

.swal-lightbox .swal2-close:hover {
    color: var(--red);
    background: transparent;
}

.lightbox-img {
    max-width: 100%;
    max-height: 72vh;
    border-radius: 10px;
    border: 1px solid #EFE7D2;
    background: var(--cream);
    display: block;
    margin: 0 auto;
}

.swal-lightbox .swal2-actions {
    margin-top: .8rem;
}

/* ══ SUMMERNOTE (tema hijau/emas) ══ */
.note-editor.note-frame {
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

.note-editor.note-frame:focus-within,
.note-editor.note-frame.focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .15);
}

/* toolbar */
.note-editor .note-toolbar {
    background: var(--cream);
    border-bottom: 1px solid #EFE7D2;
    padding: .45rem .5rem .15rem;
}

.note-editor .note-toolbar .note-btn-group {
    margin: 0 .35rem .3rem 0;
}

.note-editor .note-btn {
    background: #fff;
    border: 1.5px solid #E5E7EB;
    border-radius: 7px;
    color: #4B5563;
    font-size: .8rem;
    padding: .25rem .6rem;
    transition: all .15s;
}

.note-editor .note-btn-group .note-btn {
    border-radius: 0;
    margin: 0;
}

.note-editor .note-btn-group .note-btn:first-child {
    border-radius: 7px 0 0 7px;
}

.note-editor .note-btn-group .note-btn:last-child {
    border-radius: 0 7px 7px 0;
}

.note-editor .note-btn-group .note-btn:only-child {
    border-radius: 7px;
}

.note-editor .note-btn-group .note-btn+.note-btn {
    margin-left: -1.5px;
}

.note-editor .note-btn:hover,
.note-editor .note-btn:focus {
    background: var(--cream);
    border-color: var(--gold);
    color: var(--green-deep);
    box-shadow: none;
    z-index: 2;
}

.note-editor .note-btn.active,
.note-editor .note-btn:active,
.note-editor .note-btn.note-btn-primary {
    background: var(--green-deep);
    border-color: var(--green-deep);
    color: var(--gold-light);
    box-shadow: none;
}

/* area tulis */
.note-editor .note-editing-area {
    background: #fff;
}

.note-editor .note-editable {
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    line-height: 1.65;
    color: #1F2937;
    padding: .9rem 1rem;
}

.note-editor .note-editable a {
    color: var(--green-mid);
    text-decoration-color: var(--gold);
}

.note-editor .note-editable blockquote {
    border-left: 4px solid var(--gold);
    background: var(--cream);
    padding: .5rem 1rem;
    margin: .8rem 0;
}

.note-editor .note-editable table td,
.note-editor .note-editable table th {
    border: 1px solid #E5E7EB;
    padding: .4rem .6rem;
}

.note-editor .note-placeholder {
    color: #9CA3AF;
    font-size: .88rem;
    padding: .9rem 1rem;
}

/* code view */
.note-editor .note-codable {
    background: var(--green-deep);
    color: var(--gold-light);
    font-family: 'Courier New', monospace;
    font-size: .8rem;
    padding: .9rem 1rem;
}

/* status bar / resize handle */
.note-editor .note-statusbar {
    background: var(--cream);
    border-top: 1px solid #EFE7D2;
}

.note-editor .note-statusbar .note-resizebar {
    border-top: 0;
    height: 12px;
    padding-top: 3px;
}

.note-editor .note-statusbar .note-resizebar .note-icon-bar {
    border-top-color: var(--gold);
}

/* dropdown (font, ukuran, warna, style) */
.note-editor .note-dropdown-menu,
.note-editor .dropdown-menu {
    border: 1px solid #EFE7D2;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(27, 67, 50, .12);
    padding: .3rem;
    font-size: .82rem;
}

.note-editor .note-dropdown-item,
.note-editor .dropdown-menu a,
.note-editor .dropdown-item {
    border-radius: 6px;
}

.note-editor .note-dropdown-item:hover,
.note-editor .dropdown-menu a:hover,
.note-editor .dropdown-item:hover {
    background: var(--cream);
    color: var(--green-deep);
}

.note-editor .note-dropdown-item.checked,
.note-editor .dropdown-item.active {
    background: var(--green-deep);
    color: var(--gold-light);
}

.note-editor .note-color-btn {
    border-radius: 4px;
}

/* mode fullscreen */
.note-editor.note-frame.fullscreen {
    border-radius: 0;
    z-index: 1060;
}

/* modal (link, gambar, video, help) */
.note-modal .modal-content {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
}

.note-modal .modal-header {
    background: var(--cream);
    border-bottom: 1px solid #EFE7D2;
}

.note-modal .modal-title {
    font-family: 'Lora', serif;
    font-weight: 700;
    color: var(--green-deep);
    font-size: 1rem;
}

.note-modal .form-control {
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    font-size: .85rem;
}

.note-modal .form-control:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .15);
}

.note-modal .note-btn-primary,
.note-modal .btn-primary {
    background: var(--green-deep);
    border-color: var(--green-deep);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
}

.note-modal .note-btn-primary:hover,
.note-modal .btn-primary:hover {
    background: var(--green-mid);
    border-color: var(--green-mid);
}

.note-editor.note-frame.note-valid {
    border-color: var(--green-light);
}

.note-editor.note-frame.note-valid:focus-within {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .15);
}

.note-editor.note-frame.note-valid .note-toolbar {
    border-bottom-color: rgba(82, 183, 136, .35);
}

.note-editor.note-frame.note-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

.note-editor~.invalid-feedback {
    display: block;
}

.tagify {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-content: center !important;
}

.tagify__tag,
.tagify__input {
    margin: 4px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .chart-container {
        height: 260px;
    }
}