/* =====================================================
   IMPORTS & GLOBAL BASE
===================================================== */
@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-Thin.woff2") format("woff2");font-weight: 100;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-ExtraLight.woff2") format("woff2");font-weight: 200;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-Light.woff2") format("woff2");font-weight: 300;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-Regular.woff2") format("woff2");font-weight: 400;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-SemiBold.woff2") format("woff2");font-weight: 600;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-Bold.woff2") format("woff2");font-weight: 700;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-ExtraBold.woff2") format("woff2");font-weight: 800;font-style: normal;font-display: swap}@font-face{font-family: "Blinker";src: url("fonts/Blinker/Blinker-Black.woff2") format("woff2");font-weight: 900;font-style: normal;font-display: swap}

html,
body {
    font-family: "Blinker", sans-serif;
    background-color: #cfe2ff;
    overflow-x: hidden;
}

.form-control,
.form-select,
.table,
.btn {
    font-family: "Blinker", sans-serif;
}

/* =====================================================
   APP LAYOUT
===================================================== */
#appLayout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#appLayout > .d-flex.flex-grow-1 {
    margin-top: 56px;
    flex-grow: 1;
}

/* =====================================================
   NAVBAR
===================================================== */
.navbar {
    position: fixed;
    background-color: #212529;
    inset: 0 0 auto 0;
    z-index: 1030;
}

.navbar .nav-link.active {
    color: #0d6efd !important;
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 240px;
    height: calc(100vh - 56px);
    background-color: #212529;
    overflow-y: auto;
    transition: width 0.3s ease;
    z-index: 1040;
}

.sidebar .nav-link {
    padding: 12px 20px;
    font-weight: 500;
    color: #adb5bd;
	white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-link:hover {
    color: #ffffff;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #ffffff;
}

.sidebar .nav-link i {
    display: inline-block;
    width: 24px;
    text-align: center;
}

/* Desktop collapse */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .nav-link {
    text-align: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* =====================================================
   SIDEBAR SUBMENU
===================================================== */
.submenu {
    display: none;
}

.submenu.show {
	display: block;
}

/* Arrow rotate */
.nav-link.rotate i.fa-chevron-down {
	transform: rotate(180deg);
	transition: transform 0.3s ease;
}

/* Hide arrow when sidebar collapsed */
.sidebar.collapsed #settingToggle .fa-chevron-down {
	display: none;
}

.sidebar.collapsed #settingToggle {
	justify-content: center;
}

/* =====================================================
   MAIN CONTENT
===================================================== */
main {
    margin-left: 240px;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed main {
    margin-left: 60px;
}

.badge {
    font-weight: normal;
    user-select: none;
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
    background-color: #212529;
    color: #ffffff;
    text-align: center;
    padding: 0.5rem 0;
    flex-shrink: 0;
    z-index: 1050;
}

/* =====================================================
   SIDEBAR OVERLAY (MOBILE)
===================================================== */
#sidebarOverlay {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    background: rgba(0, 0, 0, 0.4);
    z-index: 1030;
    display: none;
}

#sidebarOverlay.show {
    display: block;
}

/* =====================================================
   ACTION BUTTONS
===================================================== */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   TABLE HANDLING
===================================================== */
.table-responsive {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
}

table {
    width: 100%;
}

/* =====================================================
   ICON SORTING
===================================================== */
th.sortable {
    position: relative;        /* untuk icon absolute jika pakai absolute */
    cursor: pointer;
    user-select: none;
    padding-right: 0.5rem;     /* beri ruang icon di kanan */
}

th.sortable i {
    position: absolute;
    right: 0.5rem;            /* jarak dari kanan */
    top: 50%;
    transform: translateY(-50%); /* vertikal center */
    font-size: 0.8rem;         /* kecilkan icon jika perlu */
}

/* =====================================================
   PAGINATION CUSTOM
===================================================== */
.pagination .page-item.active .page-link {
    background-color: #212529;
    border-color: #212529;
    color: #fff;
}

.pagination .page-item .page-link:hover {
    background-color: #6c757d;
    color: #fff;
}

.pagination .page-link {
    color: #212529;
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
===================================================== */

/* ---------- TABLET ---------- */
@media (max-width: 992px) {

    main {
        margin-left: 60px !important;
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 576px) {

    .sidebar {
        transform: translateX(-240px);
        width: 240px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    main {
        margin-left: 0 !important;
    }
}

/* ---------- MOBILE SMALL ---------- */
@media (max-width: 576px) {

    /* Action buttons stack */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .left-buttons,
    .right-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .right-buttons {
        margin-top: 0.5rem;
    }

    .left-buttons .btn,
    .right-buttons .btn {
        width: 100%;
    }

    /* Prevent overflow */
    main,
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    table {
        min-width: 600px;
    }
}

/* =====================================================
   LOGO FRAME
===================================================== */
.logo-frame {
    width: 100%;
    max-width: 240px;
    height: 240px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 1rem; /* rounded-4 */
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
    position: relative;
  }
  
  .logo-frame img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
  }
  
  .logo-placeholder {
    color: #adb5bd;
    font-size: .9rem;
    position: absolute;
  }  