/* 
    Obsidian Premium Theme 
    Project: ISP Monitoring Dashboard
*/

/* Halaman tidak “geser” horizontal / rubber-band ke samping (isi lebar tetap di .table-responsive dll.) */
html {
    overflow-x: hidden;
    max-width: 100%;
    overscroll-behavior-x: none;
}

body,
.wrapper,
.content-wrapper {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    min-height: 100vh !important;
    overflow-x: hidden;
    max-width: 100%;
    overscroll-behavior-x: none;
}

body {
    touch-action: pan-y pinch-zoom;
}

/* Peta / wall: tetap boleh geser dua sumbu di dalam halaman */
body.page-wall-monitoring,
body.page-infra-map-standalone {
    touch-action: auto;
}

@keyframes app-dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown global Bootstrap */
.dropdown-menu {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.dropdown-menu.show {
    animation: app-dropdown-fade-in 0.14s ease-out;
}

.dropdown-header {
    padding: 0.55rem 0.8rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.dropdown-divider {
    margin: 0.45rem 0;
    border-top-color: rgba(226, 232, 240, 0.9);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.08));
    color: #1e293b;
    transform: translateX(1px);
}

.dropdown-item:active,
.dropdown-item.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}

.dropdown-item.disabled,
.dropdown-item:disabled {
    color: #94a3b8;
    opacity: 0.75;
}

.dropdown-item i,
.dropdown-item .fas,
.dropdown-item .far,
.dropdown-item .fa-solid,
.dropdown-item .fa-regular {
    width: 1rem;
    text-align: center;
    flex: 0 0 1rem;
}

/* Modal detail user: UI lebih rapi */
#modalDetailUser .user-detail-kpi {
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
}

#modalDetailUser .user-detail-kv {
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.03);
}

#modalDetailUser .user-detail-kv .kv-row {
    padding: 4px 0;
    border-bottom: 1px dashed rgba(226, 232, 240, .9);
}

#modalDetailUser .user-detail-kv .kv-row:last-child {
    border-bottom: none;
}

#modalDetailUser .detail-action {
    font-weight: 800;
    width: 100% !important;
    box-sizing: border-box;
    min-height: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalDetailUser #btn_remote,
#modalDetailUser #btn_kick {
    min-height: 52px;
}

/* agar hasil ping/log selalu tampil full-width di bawah tombol */
#modalDetailUser #ping_result_area {
    width: 100%;
    clear: both;
}

/* ========== NAVBAR BARU - App Header ========== */
/* Design tokens — konsisten & mobile-first */
:root {
    --app-header-h: 64px;
    /* Jarak konten di bawah navbar — semua halaman (shell biasa), mobile & desktop */
    --app-content-pad-top: 12px;
    --app-content-pad-bottom: 18px;
    --app-radius-sm: 10px;
    --app-radius-md: 14px;
    --app-radius-lg: 20px;
    --app-shadow-card: 0 4px 24px rgba(15, 23, 42, 0.06);
    --app-touch-min: 44px;
}

@media (min-width: 768px) {
    :root {
        --app-header-h: 70px;
    }
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--app-header-h);
    padding-top: env(safe-area-inset-top, 0px);
    /* Gradien indigo → slate (bukan flat navy) — selaras ikon ungu & lebih lembut */
    background: linear-gradient(120deg,
            #1e1b4b 0%,
            #312e81 32%,
            #1e293b 72%,
            #172554 100%);
    box-shadow:
        0 4px 28px rgba(15, 23, 42, 0.45),
        inset 0 -1px 0 rgba(129, 140, 248, 0.22);
    border-bottom: 1px solid rgba(99, 102, 241, 0.28);
    /* Di atas konten halaman berat (settings, tabel) agar nav & dropdown selalu bisa diklik */
    z-index: 1100;
    display: flex;
    align-items: stretch;
    overflow: visible;
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: var(--app-header-h);
    padding: 0 max(12px, env(safe-area-inset-left, 0px)) 0 max(12px, env(safe-area-inset-right, 0px));
    max-width: 100%;
    overflow: visible;
}

@media (min-width: 768px) {
    .app-header-inner {
        padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
        margin: 0 auto;
    }
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
}

.app-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.app-brand--drawer {
    color: #0f172a;
    font-size: 1.05rem;
}

.app-brand--drawer .app-brand-icon {
    color: #ffffff;
}

.app-brand--drawer .app-brand-text {
    font-weight: 800;
}

.app-router-dropdown {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(220px, 42vw);
    margin: 0 4px;
}

@media (min-width: 400px) {
    .app-router-dropdown {
        max-width: min(240px, 50vw);
        margin: 0 8px;
    }
}

.app-router-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: var(--app-touch-min);
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--app-radius-sm);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.app-router-status {
    font-size: 8px;
}

.app-router-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-router-chevron {
    font-size: 10px;
    opacity: 0.7;
}

/* Status API navbar: ringkasan + dropdown semua router */
.app-header-api-status {
    flex-shrink: 0;
    margin: 0 4px 0 6px;
    position: relative;
}

.app-header-api-btn {
    min-height: var(--app-touch-min);
    padding: 6px 10px 6px 12px;
    margin: 0;
    gap: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc !important;
    font-size: 12px;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.app-header-api-btn:hover,
.app-header-api-btn:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border-color: rgba(251, 191, 36, 0.45);
}

.app-header-api-btn:focus {
    outline: 2px solid rgba(129, 140, 248, 0.85);
    outline-offset: 2px;
}

.app-header-api-btn.dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: 0.15em;
    opacity: 0.85;
}

.app-api-summary__count {
    font-size: 13px;
    letter-spacing: 0.02em;
    min-width: 1.5em;
    text-align: center;
}

.app-api-summary__count.text-success {
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.app-api-summary__count.text-danger {
    text-shadow: 0 0 12px rgba(248, 113, 113, 0.35);
}

.app-api-summary__count.text-warning {
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.app-api-summary--muted {
    color: rgba(248, 250, 252, 0.78) !important;
}

.app-api-summary__lbl {
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.06em;
}

.app-header-api-btn__main {
    flex: 1 1 auto;
    max-width: min(220px, 42vw);
}

@media (min-width: 768px) {
    .app-header-api-btn__main {
        max-width: 260px;
    }
}

/* Jangan set display:flex di sini — akan menimpa .dropdown-menu { display:none } Bootstrap
   sehingga menu API "nyangkut" terbuka dan menelan klik. Flex hanya saat .show */
.app-api-router-menu.dropdown-menu:not(.show) {
    display: none !important;
}

.app-api-router-menu.dropdown-menu.show {
    display: flex !important;
    flex-direction: column;
}

.app-api-router-menu {
    min-width: min(100vw - 24px, 300px);
    max-width: min(100vw - 16px, 340px);
    max-height: min(70vh, 420px);
    overflow: hidden;
    padding: 0;
    margin-top: 8px;
    border-radius: 14px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    /* Bootstrap .dropdown-menu memakai color:#212529 — timpa agar teks nama router terbaca */
    color: #f8fafc !important;
}

.app-api-router-list--flush {
    padding-top: 6px;
    padding-bottom: 6px;
}

.app-api-router-row__state {
    color: rgba(241, 245, 249, 0.88) !important;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.04em;
}

.app-api-router-empty {
    color: rgba(226, 232, 240, 0.8) !important;
}

.app-api-router-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.app-api-router-row {
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.app-api-router-row__name {
    color: #ffffff !important;
    font-weight: 700;
}

.app-api-router-row:last-child {
    border-bottom: none !important;
}

.app-api-router-row.app-api-router-row--readonly {
    cursor: default !important;
}

/* Baris tombol (legacy): hanya bila baris dibuat sebagai <button> */
button.app-api-router-row {
    width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #f8fafc !important;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

button.app-api-router-row:hover {
    background: rgba(255, 255, 255, 0.07);
}

button.app-api-router-row:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(129, 140, 248, 0.55);
}

button.app-api-router-row--active {
    background: rgba(99, 102, 241, 0.2);
}

button.app-api-router-row--active:hover,
button.app-api-router-row--active:focus {
    background: rgba(99, 102, 241, 0.28);
}

.app-api-router-active-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
}

@media (max-width: 400px) {
    .app-header-api-btn .app-api-summary__lbl {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .app-header-api-btn__main {
        max-width: min(200px, 50vw);
    }
}

/* Toggle tema gelap global — teks + ikon jelas */
.app-theme-toggle {
    flex-shrink: 0;
    min-width: 42px;
    height: 42px;
    padding: 0 12px 0 10px;
    margin: 0 6px 0 4px;
    gap: 8px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.app-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25);
}

.app-theme-toggle:focus {
    outline: 2px solid rgba(129, 140, 248, 0.95);
    outline-offset: 2px;
}

.app-theme-toggle i {
    font-size: 17px;
}

.app-theme-toggle-text {
    display: none;
    text-transform: uppercase;
}

@media (min-width: 400px) {
    .app-theme-toggle-text {
        display: inline;
    }
}

.app-router-menu {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
}

.app-router-menu-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    padding: 6px 14px 8px;
}

.app-router-menu .dropdown-item {
    display: flex;
    align-items: center;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 8px;
}

.app-router-menu .dropdown-item:hover,
.app-router-menu .dropdown-item.active {
    background: rgba(99, 102, 241, 0.3) !important;
    color: #fff;
}

.app-desktop-left-sidebar {
    display: none;
}

.app-desktop-left-sidebar__inner {
    /* Isi penuh aside (284px / 120px); hindari celah transparan di sisi kanan rail */
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    border-right: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-desktop-left-sidebar__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 14px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.app-desktop-left-sidebar__scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Hide dividers inside tab views — clean separation via category labels */
.app-sidebar-tab-view .isp-app-nav-divider,
.app-sidebar-tab-view .isp-app-nav-divider--sidebar {
    display: none !important;
}

/* ── Brand container: clean compact logo ───────────────────────────────── */
.app-desktop-left-sidebar__brand-container {
    padding: 20px 16px 12px !important;
    margin-bottom: 0 !important;
}

.sidebar-brand-wrap {
    gap: 10px;
}

.sidebar-brand-icon {
    width: 34px;
    height: 34px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    font-size: 15px !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}
.sidebar-brand-icon.sidebar-brand-icon--image {
    background: rgba(255, 255, 255, 0.92);
    color: inherit !important;
    padding: 0;
    overflow: hidden;
}
.sidebar-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.dark-mode .sidebar-brand-icon {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}
body.dark-mode .sidebar-brand-icon.sidebar-brand-icon--image {
    background: rgba(30, 41, 59, 0.96);
}

.sidebar-brand-text {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #312e81, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .sidebar-brand-text {
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
}

.sidebar-brand-subtitle {
    font-size: 10px !important;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.55;
}

body.app-desktop-left-sidebar--collapsed .sidebar-brand-icon {
    margin-right: 0 !important;
}

.app-desktop-left-sidebar__prefooter-menu {
    padding: 8px 14px 6px;
}

.isp-sidebar-quick-links {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 0 12px;
}

.isp-sidebar-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    text-decoration: none !important;
    color: #475569;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 28px -24px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.96);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.isp-sidebar-quick-link:hover {
    color: #1e293b;
    border-color: rgba(99, 102, 241, 0.24);
    background: linear-gradient(145deg, rgba(238, 242, 255, 1) 0%, rgba(224, 231, 255, 0.98) 100%);
    box-shadow: 0 20px 32px -24px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transform: translateY(-1px);
}

.isp-sidebar-quick-link--active {
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.22);
    background: linear-gradient(145deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 20px 36px -24px rgba(79, 70, 229, 0.46);
}

.isp-sidebar-quick-link--active:hover {
    color: #ffffff;
    background: linear-gradient(145deg, #7c83ff 0%, #5b54f2 100%);
}

.isp-sidebar-quick-link__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
}

.app-desktop-left-sidebar__footer {
    flex: 0 0 auto;
    padding: 12px 12px 16px;
    border-top: 1px solid #e5e7eb;
    /* Gradient halus — dibedakan dari area scroll (#fff) */
    background: linear-gradient(155deg, #f8fafc 0%, #f1f5f9 38%, #eef2ff 72%, #f4f4f5 100%);
}

.app-desktop-left-sidebar__head {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.03em;
    margin: 16px 8px 6px;
}

.app-desktop-left-sidebar__section {
    margin-bottom: 0;
}

/* Baris dropdown: sama padding/tinggi/teks dengan .app-desktop-left-sidebar__item */
.app-desktop-left-sidebar__section-toggle {
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    margin: 0 0 2px 0;
    padding: 8px 12px;
    min-height: 38px;
    border-radius: 8px;
    cursor: pointer;
    gap: 12px;
    transition: background 0.2s ease, color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.app-desktop-left-sidebar__section-toggle>i:first-of-type {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
    color: inherit;
}

.app-desktop-left-sidebar__section-toggle:hover {
    color: #111827;
    background: #f3f4f6;
}

body:not(.dark-mode) .app-desktop-left-sidebar__section-toggle.active:hover {
    color: #1e1b4b;
    background: rgba(99, 102, 241, 0.2);
}

.app-desktop-left-sidebar__section-chev {
    transition: none;
    font-size: 0.65rem;
    opacity: 0.85;
    flex-shrink: 0;
}

.app-desktop-left-sidebar__section-toggle:not(.collapsed) .app-desktop-left-sidebar__section-chev {
    transform: rotate(180deg);
}

.app-desktop-left-sidebar__section-toggle .app-desktop-sidebar-section-label {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Grup menu (sidebar + drawer mobile): tanpa animasi tinggi saat buka/tutup — hindari “nunggu” lalu baru bergerak */
.app-menu-panel .collapse,
.app-menu-panel .collapsing,
.app-desktop-left-sidebar__section .collapse,
.app-desktop-left-sidebar__section .collapsing {
    transition: none !important;
}

.app-desktop-left-sidebar__subhead {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.03em;
    margin: 10px 8px 4px 10px;
}

.app-desktop-left-sidebar__settings-dropdown {
    margin-bottom: 4px;
}

button.app-desktop-left-sidebar__item--settings-toggle {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.app-desktop-left-sidebar__settings-chev {
    transition: transform 0.2s ease;
    font-size: 0.65rem;
    opacity: 0.85;
}

.app-desktop-left-sidebar__settings-dropdown [aria-expanded='true'] .app-desktop-left-sidebar__settings-chev {
    transform: rotate(180deg);
}

.app-desktop-left-sidebar__settings-dropdown .app-desktop-left-sidebar__settings-block {
    margin-top: 0;
    padding-bottom: 2px;
}

.app-desktop-left-sidebar__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.2s ease, color 0.2s ease;
    margin-bottom: 2px;
}

.app-desktop-left-sidebar__item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}

.app-desktop-left-sidebar__item:hover {
    color: #111827;
    background: #f3f4f6;
}

body:not(.dark-mode) .app-desktop-left-sidebar__item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
    font-weight: 700;
}

/* Sub-menu sidebar (global): isi collapse grup + .item--sub — indent + indikator cabang (akar) */
.app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item,
.app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub {
    padding-left: 26px;
    padding-right: 12px;
    font-size: 12px;
    font-weight: 600;
    min-height: 34px;
    gap: 8px;
}

.app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item::before,
.app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub::before {
    content: '';
    flex-shrink: 0;
    align-self: center;
    width: 11px;
    height: 14px;
    margin-right: 6px;
    box-sizing: border-box;
    border-left: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0 0 0 4px;
}

body:not(.dark-mode) .app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item.active::before,
body:not(.dark-mode) .app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub.active::before {
    border-color: rgba(255, 255, 255, 0.55);
}

body.dark-mode .app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item::before,
body.dark-mode .app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub::before {
    border-color: #64748b;
}

body.dark-mode .app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item.active::before,
body.dark-mode .app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub.active::before {
    border-color: rgba(255, 255, 255, 0.4);
}

.app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item i,
.app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub i {
    font-size: 12px;
    width: 18px;
}

.app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item.active,
.app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub.active {
    font-weight: 700;
}

/* Header grup (Data / Hotspot / Riwayat): bukan pill item aktif — judul tetap terbaca di atas sub-menu */
body:not(.dark-mode) .app-desktop-left-sidebar__section-toggle.active {
    color: #312e81;
    background: rgba(99, 102, 241, 0.14);
    box-shadow: none;
    font-weight: 700;
}

body:not(.dark-mode) .app-sidebar-blue-icon {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.14);
}

body:not(.dark-mode) .app-sidebar-blue-icon:hover,
body:not(.dark-mode) .app-sidebar-blue-icon:focus {
    color: #4338ca;
    background: rgba(99, 102, 241, 0.22);
}

.app-desktop-left-sidebar__section-toggle.active>i:first-of-type {
    color: inherit;
}

.app-desktop-left-sidebar__section-toggle.active .app-desktop-left-sidebar__section-chev {
    color: inherit;
    opacity: 0.72;
}

.app-desktop-left-sidebar__item--exit {
    color: #ef4444;
}

.app-desktop-left-sidebar__item--exit:hover {
    color: #ffffff;
    background: #ef4444;
}

/* ── Sidebar System Settings Card ───────────────────────────────────────── */
.isp-sidebar-sys-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #1e3a8a;
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: 0 18px 34px -24px rgba(30, 64, 175, 0.34);
    text-decoration: none !important;
    color: #eff6ff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.isp-sidebar-sys-card:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.34);
    box-shadow: 0 22px 38px -24px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.isp-sidebar-sys-card--active {
    background: #2563eb;
    color: #ffffff;
    border-color: rgba(191, 219, 254, 0.42);
    box-shadow: 0 20px 36px -24px rgba(37, 99, 235, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.isp-sidebar-sys-card--active:hover {
    background: #2563eb;
    color: #ffffff;
}

.isp-sidebar-sys-card__ico {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.isp-sidebar-sys-card:hover .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: scale(1.04);
}

.isp-sidebar-sys-card--active .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.isp-sidebar-sys-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.isp-sidebar-sys-card__label {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.isp-sidebar-sys-card__hint {
    font-size: 9.5px;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 2px;
    color: rgba(191, 219, 254, 0.82);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.isp-sidebar-sys-card--active .isp-sidebar-sys-card__hint {
    color: rgba(255, 255, 255, 0.82);
}

.isp-sidebar-sys-card__arrow {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 8px;
    color: #dbeafe;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.isp-sidebar-sys-card:hover .isp-sidebar-sys-card__arrow {
    transform: translateX(2px);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.isp-sidebar-sys-card--back .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.16);
    color: #dbeafe;
}

.isp-sidebar-sys-card--back:hover .isp-sidebar-sys-card__arrow {
    transform: translateX(-2px);
}

.isp-sidebar-sys-card--active .isp-sidebar-sys-card__arrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

/* dark mode */
body.dark-mode .isp-sidebar-sys-card {
    background: #172554;
    border-color: rgba(96, 165, 250, 0.22);
    color: #dbeafe;
    box-shadow: 0 20px 36px -24px rgba(2, 6, 23, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .isp-sidebar-sys-card:hover {
    background: #1e3a8a;
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.3);
    box-shadow: 0 24px 42px -24px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark-mode .isp-sidebar-sys-card--active {
    background: #1d4ed8;
    border-color: rgba(191, 219, 254, 0.38);
    color: #ffffff;
    box-shadow: 0 26px 42px -24px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.12);
    color: #dbeafe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-mode .isp-sidebar-sys-card:hover .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

body.dark-mode .isp-sidebar-sys-card--active .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.dark-mode .isp-sidebar-sys-card__hint {
    color: rgba(191, 219, 254, 0.78);
}

body.dark-mode .isp-sidebar-sys-card__arrow {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .isp-sidebar-sys-card:hover .isp-sidebar-sys-card__arrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

body.dark-mode .isp-sidebar-sys-card--back .isp-sidebar-sys-card__ico {
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
}

body.dark-mode .isp-sidebar-sys-card--back:hover .isp-sidebar-sys-card__arrow {
    transform: translateX(-2px);
}

/* ── Sidebar Module Launcher Cards ──────────────────────────────────────── */
.isp-sidebar-mod-break {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
    margin-top: 4px;
}

.isp-sidebar-mod-break__line {
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.02) 0%, rgba(148, 163, 184, 0.58) 50%, rgba(148, 163, 184, 0.02) 100%);
}

.isp-sidebar-mod-break__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 22px;
    padding: 0.2rem 0.62rem;
    border-radius: 999px;
    font-size: 8.75px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.94) 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 22px -20px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.98);
    white-space: nowrap;
}

.isp-sidebar-modules {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 2px;
    margin-top: 6px;
}

.isp-sidebar-mod-break + .isp-sidebar-modules {
    margin-top: 2px;
}

.isp-sidebar-mod-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.98) 0%, rgba(219, 234, 254, 0.98) 54%, rgba(238, 242, 255, 1) 100%);
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: 0 16px 28px -24px rgba(37, 99, 235, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.94);
    text-decoration: none !important;
    color: #1e293b;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.isp-sidebar-mod-card:hover {
    background: linear-gradient(135deg, rgba(219, 234, 254, 1) 0%, rgba(191, 219, 254, 0.96) 56%, rgba(224, 231, 255, 1) 100%);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: 0 20px 34px -24px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transform: translateY(-1px);
    color: #0f172a;
}

.isp-sidebar-mod-card--active {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 52%, #1d4ed8 100%);
    border-color: rgba(79, 70, 229, 0.22);
    color: #ffffff;
    box-shadow: 0 22px 36px -22px rgba(79, 70, 229, 0.44);
}

.isp-sidebar-mod-card--active:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 48%, #2563eb 100%);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.24);
    box-shadow: 0 24px 38px -22px rgba(79, 70, 229, 0.5);
}

.isp-sidebar-mod-card__ico {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14) 0%, rgba(37, 99, 235, 0.18) 100%);
    color: #0284c7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.isp-sidebar-mod-card__ico--billing {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(37, 99, 235, 0.2) 100%);
    color: #2563eb;
}

.isp-sidebar-mod-card__ico--monitor {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14) 0%, rgba(59, 130, 246, 0.18) 100%);
    color: #0284c7;
}

.isp-sidebar-mod-card__ico--ops {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: #059669;
}

.isp-sidebar-mod-card--active .isp-sidebar-mod-card__ico {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.isp-sidebar-mod-card:hover .isp-sidebar-mod-card__ico {
    transform: scale(1.04);
}

.isp-sidebar-mod-card__body {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-grow: 1;
}

.isp-sidebar-mod-card__label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.015em;
    min-width: 0;
}

.isp-sidebar-mod-card__arrow {
    width: 19px;
    height: 19px;
    border-radius: 999px;
    font-size: 7px;
    color: #94a3b8;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.14);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.isp-sidebar-mod-card:hover .isp-sidebar-mod-card__arrow {
    transform: translateX(2px);
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.14);
}

.isp-sidebar-mod-card--active .isp-sidebar-mod-card__arrow {
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.16);
}

.isp-sidebar-mod-card--active:hover .isp-sidebar-mod-card__arrow {
    color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.2);
}

.app-mod-switch-lock-ico {
    font-size: 9px;
    opacity: 0.7;
    line-height: 1;
    vertical-align: middle;
}

/* ── Sidebar Tab Switcher ──────────────────────────────────────────────── */
.app-sidebar-tab-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    margin: 0 14px 10px;
    background: #f1f5f9;
    border-radius: 10px;
    position: relative;
}

.app-sidebar-tab-btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.app-sidebar-tab-btn i {
    font-size: 12px;
    flex-shrink: 0;
}

.app-sidebar-tab-btn:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.6);
}

.app-sidebar-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.app-sidebar-tab-btn.active:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #7c7ff5 0%, #6366f1 100%);
}

/* ── Tab Views (show/hide) ─────────────────────────────────────────────── */
.app-sidebar-tab-view {
    display: none;
}

.app-sidebar-tab-view.active {
    display: block;
}

/* ── Category Labels ───────────────────────────────────────────────────── */
.app-sidebar-category-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 14px 12px 5px;
    margin: 0;
    user-select: none;
}

.app-sidebar-category-label:first-child {
    padding-top: 4px;
}

/* ── Dark Mode: Tab Switcher ───────────────────────────────────────────── */
body.dark-mode .app-sidebar-tab-switcher {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .app-sidebar-tab-btn {
    color: #94a3b8;
}

body.dark-mode .app-sidebar-tab-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .app-sidebar-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

body.dark-mode .app-sidebar-category-label {
    color: #4b5563;
}

/* ── Mobile Drawer: Tab Switcher ───────────────────────────────────────── */
.app-menu-panel .app-sidebar-tab-switcher {
    margin: 8px 16px 10px;
}

body.dark-mode .app-menu-panel .app-sidebar-tab-switcher {
    background: rgba(255, 255, 255, 0.06);
}

/* Sejajar dengan teks label item menu (margin 10px + padding 12px + ikon 1.5rem + gap 12px) */
.app-menu-panel .app-sidebar-category-label {
    margin-left: 10px;
    margin-right: 10px;
    padding: 14px 12px 5px calc(12px + 1.5rem + 12px);
    box-sizing: border-box;
}

/* ── Collapsed Sidebar: Tab Switcher ───────────────────────────────────── */
body.app-desktop-left-sidebar--collapsed .app-sidebar-tab-switcher {
    flex-direction: column;
    margin: 0 6px 8px;
    padding: 3px;
    gap: 3px;
}

body.app-desktop-left-sidebar--collapsed .app-sidebar-tab-btn {
    padding: 6px 4px;
    font-size: 0;
    letter-spacing: 0;
    gap: 0;
}

body.app-desktop-left-sidebar--collapsed .app-sidebar-tab-btn i {
    font-size: 14px;
}

body.app-desktop-left-sidebar--collapsed .app-sidebar-category-label {
    display: none !important;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}

.app-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.app-nav-link.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}

.app-nav-dropdown>a.app-nav-link.dropdown-toggle {
    color: #f1f5f9 !important;
}

.app-nav-dropdown>a.app-nav-link.dropdown-toggle:hover,
.app-nav-dropdown>a.app-nav-link.dropdown-toggle:focus {
    color: #fff !important;
}

.app-nav-exit {
    color: #f87171 !important;
}

.app-nav-exit:hover {
    background: rgba(248, 113, 113, 0.2) !important;
    color: #fff !important;
}

/* Pengaturan: hanya ikon gear — hemat ruang, hindari overlap ke item nav lain */
.app-nav-link.app-nav-settings {
    padding: 0 12px;
    min-width: var(--app-touch-min);
    justify-content: center;
    gap: 0;
}

.app-nav-link.app-nav-settings i {
    font-size: 1.05rem;
}

.app-nav-link.app-nav-settings:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    color: #f1f5f9 !important;
}

.app-nav-link.app-nav-settings:not(.active):hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

/* Wall Monitoring: ikon TV di grup kanan (sebelum pengaturan & exit) */
.app-nav-link.app-nav-wall-monitoring {
    padding: 0 10px 0 12px;
    min-width: var(--app-touch-min);
    justify-content: center;
    gap: 4px;
}

.app-nav-link.app-nav-wall-monitoring i {
    font-size: 1.05rem;
}

.app-header .dropdown-menu {
    z-index: 1110;
}

.app-nav-settings-menu {
    min-width: 14rem;
    max-height: min(75vh, 28rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-nav-link.app-nav-settings.dropdown-toggle::after {
    margin-left: 0.15rem;
    vertical-align: 0.12em;
}

.app-nav-link.app-nav-settings.active {
    background: #4f46e5 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.app-nav-dropdown .dropdown-menu {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
}

.app-nav-dropdown .dropdown-item {
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 8px;
}

.app-nav-dropdown .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.3) !important;
    color: #fff;
}

.app-nav-dropdown .dropdown-item.app-nav-dropdown-item-nested {
    padding-left: 2.25rem;
    font-size: 12.5px;
}

.app-menu-sub-nested {
    padding-left: 56px;
    font-size: 13px;
}

/* Hamburger */
.app-menu-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.app-menu-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.app-menu-open .app-menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.app-menu-open .app-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.app-menu-open .app-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Tombol menu (3 garis) mengambang — gradien transparan */
.app-menu-toggle--floating {
    position: fixed;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    z-index: 1060;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.42), rgba(255, 255, 255, 0.2));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 20px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.app-menu-toggle--floating span {
    width: 18px;
    height: 2px;
    background: rgba(15, 23, 42, 0.78);
}

.app-menu-open .app-menu-toggle--floating {
    border-color: rgba(99, 102, 241, 0.55);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.55), rgba(255, 255, 255, 0.38));
    box-shadow:
        0 6px 22px rgba(79, 70, 229, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.app-menu-open .app-menu-toggle--floating span {
    background: rgba(15, 23, 42, 0.92);
}

body.dark-mode .app-menu-toggle--floating span {
    background: rgba(248, 250, 252, 0.92);
}

body.dark-mode .app-menu-toggle--floating {
    border-color: rgba(148, 163, 184, 0.4);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.38), rgba(15, 23, 42, 0.42));
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.app-sidebar-small-as-desktop .app-menu-toggle--floating {
    display: none !important;
}

body.modal-open .app-menu-toggle--floating {
    z-index: 1030;
}

/* Bar atas mobile/tablet: logo | jam | API + menu (3 garis) */
.app-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.app-mobile-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, calc(env(safe-area-inset-right, 0px) + 10px));
}

/* Kiri: jam saja */
.app-mobile-topbar__cluster {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

/* Kanan: ringkas API (dot + n/t) lalu tombol menu */
.app-mobile-topbar__end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.app-mobile-topbar__clock {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    font-size: 10px;
    letter-spacing: 0.02em;
    color: #0f172a;
    white-space: normal;
    line-height: 1.28;
    word-break: break-word;
}

@media (min-width: 400px) {
    .app-mobile-topbar__clock {
        font-size: 11px;
    }
}

@media (min-width: 480px) {
    .app-mobile-topbar__clock {
        font-size: 12px;
    }
}

/* Tombol ringkas API topbar → modal daftar router */
.app-api-topbar-pill {
    width: auto;
    max-width: none;
    min-height: 36px;
    height: 36px;
    padding: 0 11px 0 9px;
    gap: 7px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.app-api-topbar-pill:hover,
.app-api-topbar-pill:focus {
    outline: none;
    background: #f8fafc;
    border-color: #cbd5e1 !important;
}

.app-api-topbar-pill__led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
}

.isp-api-topbar-pill--state-ok .app-api-topbar-pill__led {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.isp-api-topbar-pill--state-warn .app-api-topbar-pill__led {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}

.isp-api-topbar-pill--state-err .app-api-topbar-pill__led {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
}

.isp-api-topbar-pill--state-empty .app-api-topbar-pill__led {
    background: #cbd5e1;
    box-shadow: 0 0 0 2px rgba(203, 213, 225, 0.6);
}

.isp-api-topbar-pill--state-unknown .app-api-topbar-pill__led {
    background: #a78bfa;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.45);
}

.app-api-topbar-pill__count {
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.03em;
    color: #0f172a;
}

.app-menu-toggle--in-topbar {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.app-menu-toggle--in-topbar span {
    width: 18px;
    height: 2px;
    background: #334155;
}

/* Animasi X di dalam kotak 36px — hindari rotate+translate yang memanjang garis ke luar viewport */
.app-menu-open .app-menu-toggle--in-topbar span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.app-menu-open .app-menu-toggle--in-topbar span:nth-child(2) {
    opacity: 0;
}

.app-menu-open .app-menu-toggle--in-topbar span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.app-menu-open .app-menu-toggle--in-topbar {
    border-color: #6366f1;
    background: #eef2ff;
}

.app-menu-open .app-menu-toggle--in-topbar span {
    background: #1e1b4b;
}

body.dark-mode .app-mobile-topbar {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    border-bottom-color: #1f2937;
}

body.dark-mode .app-mobile-topbar__clock {
    color: #f1f5f9;
}

body.dark-mode .app-api-topbar-pill {
    background: #1e293b;
    border-color: #334155 !important;
}

body.dark-mode .app-api-topbar-pill:hover,
body.dark-mode .app-api-topbar-pill:focus {
    background: #334155;
    border-color: #475569 !important;
}

body.dark-mode .app-api-topbar-pill__count {
    color: #f8fafc;
}

/* Modal daftar router API */
.isp-api-status-modal__dialog {
    max-width: min(100vw - 24px, 520px);
}

.isp-api-status-modal__content {
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
}

.isp-api-status-modal__header {
    padding: 1rem 1rem 0.75rem;
    background: linear-gradient(145deg, #eef2ff 0%, #f8fafc 55%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.isp-api-status-modal__sub {
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

.isp-api-status-modal__icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #1e3a8a;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(148, 163, 184, 0.18);
}

.isp-api-status-modal__body {
    background: #ffffff;
    max-height: min(60vh, 420px);
    overflow: hidden;
}

.isp-api-status-modal__list {
    max-height: min(60vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.isp-api-modal-row {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
    align-items: flex-start;
    cursor: default;
}

.isp-api-modal-row:last-child {
    border-bottom: none;
}

.isp-api-modal-row__main {
    gap: 12px;
    flex: 1 1 auto;
}

.isp-api-modal-row__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.isp-api-modal-row__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    background: #cbd5e1;
}

.isp-api-modal-row--ok .isp-api-modal-row__dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.isp-api-modal-row--err .isp-api-modal-row__dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.isp-api-modal-row--warn .isp-api-modal-row__dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.isp-api-modal-row--pending .isp-api-modal-row__dot {
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

.isp-api-modal-row__name {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.isp-api-modal-row__ip {
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.isp-api-modal-row__meta {
    margin-top: 3px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.isp-api-modal-row__badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 2px;
}

.isp-api-modal-row--ok .isp-api-modal-row__badge {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.isp-api-modal-row--err .isp-api-modal-row__badge {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.isp-api-modal-row--warn .isp-api-modal-row__badge {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.isp-api-modal-row--pending .isp-api-modal-row__badge {
    background: rgba(148, 163, 184, 0.16);
    color: #475569;
}

body.dark-mode .isp-api-status-modal__content {
    background: #111827;
}

body.dark-mode .isp-api-status-modal__header {
    background: linear-gradient(145deg, #1e1b4b 0%, #111827 100%);
    border-bottom-color: #1f2937;
}

body.dark-mode .isp-api-status-modal__icon-wrap {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.24) 0%, rgba(30, 41, 59, 0.92) 100%);
    border-color: rgba(96, 165, 250, 0.22);
    color: #dbeafe;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.38);
}

body.dark-mode .isp-api-status-modal__header .modal-title {
    color: #f8fafc !important;
}

body.dark-mode .isp-api-status-modal__sub {
    color: #94a3b8 !important;
}

body.dark-mode .isp-api-status-modal__body {
    background: #0f172a;
}

body.dark-mode .isp-api-modal-row {
    border-bottom-color: #1f2937;
}

body.dark-mode .isp-api-modal-row__name {
    color: #f1f5f9;
}

body.dark-mode .isp-api-modal-row__ip {
    color: #94a3b8 !important;
}

body.dark-mode .isp-api-modal-row__meta {
    color: #94a3b8;
}

body.dark-mode .isp-api-modal-row--ok .isp-api-modal-row__badge {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

body.dark-mode .isp-api-modal-row--err .isp-api-modal-row__badge {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

body.dark-mode .isp-api-modal-row--warn .isp-api-modal-row__badge {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

body.dark-mode .isp-api-modal-row--pending .isp-api-modal-row__badge {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

body.dark-mode .isp-api-modal-empty {
    color: #94a3b8 !important;
}

body.dark-mode .app-menu-toggle--in-topbar {
    border-color: #334155;
    background: #1e293b;
}

body.dark-mode .app-menu-toggle--in-topbar span {
    background: #e2e8f0;
}

body.dark-mode .app-menu-open .app-menu-toggle--in-topbar {
    border-color: #818cf8;
    background: rgba(99, 102, 241, 0.2);
}

body.dark-mode .app-menu-open .app-menu-toggle--in-topbar span {
    background: #f8fafc;
}

body.app-sidebar-small-as-desktop .app-mobile-topbar {
    display: none !important;
}

body.modal-open .app-mobile-topbar {
    z-index: 1030;
}

/* Mobile Menu Overlay */
.app-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1040;
}

.app-menu-open .app-menu-overlay {
    display: block;
}

/* Mobile / tablet drawer — selaras sidebar desktop (light) */
.app-menu-panel {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    right: 0;
    width: min(300px, 88vw);
    max-width: 88vw;
    height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    z-index: 1050;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.1);
}

.app-menu-open .app-menu-panel {
    transform: translateX(0);
}

.app-menu-content {
    padding: 0 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-menu-content::-webkit-scrollbar {
    display: none;
}

.isp-file-upload__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    padding: 0.72rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.isp-file-upload__frame--compact {
    padding: 0.68rem 0.76rem;
}

.isp-file-upload__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.isp-file-upload__frame:hover,
.isp-file-upload__frame:focus-within {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 12px 24px -20px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.isp-file-upload__meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.isp-file-upload__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.18) 100%);
    color: #2563eb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.isp-file-upload__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.isp-file-upload__title {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.isp-file-upload__hint {
    min-width: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.isp-file-upload__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

body.dark-mode .isp-file-upload__frame {
    border-color: #334155;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.94) 100%);
}

body.dark-mode .isp-file-upload__frame:hover,
body.dark-mode .isp-file-upload__frame:focus-within {
    border-color: rgba(96, 165, 250, 0.42);
    background: linear-gradient(180deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 0.98) 100%);
    box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .isp-file-upload__icon {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.26) 0%, rgba(59, 130, 246, 0.18) 100%);
    color: #93c5fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .isp-file-upload__title {
    color: #f8fafc;
}

body.dark-mode .isp-file-upload__hint {
    color: #94a3b8;
}

body.dark-mode .isp-file-upload__cta {
    background: rgba(51, 65, 85, 0.9);
    color: #e2e8f0;
}

@media (max-width: 575.98px) {
    .isp-file-upload__frame,
    .isp-file-upload__frame--compact {
        padding: 0.68rem 0.72rem;
        gap: 0.65rem;
    }

    .isp-file-upload__meta {
        gap: 0.58rem;
    }

    .isp-file-upload__icon {
        width: 32px;
        height: 32px;
    }

    .isp-file-upload__title {
        font-size: 0.74rem;
    }

    .isp-file-upload__hint {
        font-size: 0.68rem;
    }

    .isp-file-upload__cta {
        padding: 0.34rem 0.62rem;
        font-size: 0.66rem;
    }
}

.app-menu-brand-api {
    padding: 12px 14px;
    background: #f8fafc;
    border-color: #e5e7eb !important;
    gap: 10px;
}

body.dark-mode .app-menu-brand-api {
    background: #111827;
    border-color: #1f2937 !important;
}

body.dark-mode .app-brand--drawer {
    color: #f1f5f9;
}

.app-menu-panel .app-header-api-btn {
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.1);
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-menu-panel .app-header-api-btn:hover,
.app-menu-panel .app-header-api-btn:focus {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #0f172a !important;
    border-color: rgba(99, 102, 241, 0.55) !important;
}

.app-menu-panel .app-api-summary__lbl {
    color: #334155 !important;
}

body.dark-mode .app-menu-panel .app-header-api-btn {
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(99, 102, 241, 0.15);
    color: #f8fafc !important;
}

body.dark-mode .app-menu-panel .app-header-api-btn:hover,
body.dark-mode .app-menu-panel .app-header-api-btn:focus {
    background: rgba(99, 102, 241, 0.28) !important;
    color: #ffffff !important;
}

body.dark-mode .app-menu-panel .app-api-summary__lbl {
    color: rgba(248, 250, 252, 0.9) !important;
}

/* Pemisah antar grup menu: garis pendek, tengah */
.isp-app-nav-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    pointer-events: none;
}

.isp-app-nav-divider::before {
    content: '';
    display: block;
    width: 42%;
    max-width: 7rem;
    height: 1px;
    background: rgba(15, 23, 42, 0.12);
    border-radius: 1px;
}

/* Pemisah drawer: garis penuh selebar area item (bukan segmen pendek di tengah) */
.app-menu-panel .isp-app-nav-divider {
    display: block;
    padding: 8px 22px;
}

.app-menu-panel .isp-app-nav-divider::before {
    background: rgba(15, 23, 42, 0.12);
    width: 100%;
    max-width: none;
    margin: 0;
}

.app-menu-panel .isp-app-nav-divider+.isp-app-nav-divider {
    display: none;
}

.isp-app-nav-divider--sidebar {
    padding: 8px 12px;
}

.isp-app-nav-divider--sidebar::before {
    background: rgba(15, 23, 42, 0.12);
}

body.dark-mode .isp-app-nav-divider--sidebar::before {
    background: rgba(255, 255, 255, 0.14);
}

.app-menu-panel .app-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 8px 12px;
    margin: 0 10px 2px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Drawer: kolom ikon lebar tetap → label sejajar; chevron grup di kanan konsisten */
.app-menu-panel .app-menu-item:not(.app-menu-head-bar):not(.app-menu-idle-row)>i:first-of-type:not(.app-menu-collapse-chev):not(.app-menu-item__lic-ico) {
    box-sizing: border-box;
    flex: 0 0 1.5rem;
    width: 1.5rem;
    min-width: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0 !important;
    line-height: 1;
}

.app-menu-panel .app-menu-item:hover {
    color: #111827;
    background: #f3f4f6;
}

body:not(.dark-mode) .app-menu-panel .app-menu-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28);
}

/* Modul Billing / Operasional — inset sama dengan item menu */
.app-menu-panel .isp-mobile-modules {
    padding-left: calc(10px + 12px);
    padding-right: calc(10px + 12px);
}

.app-menu-panel .app-menu-item.app-menu-head-bar {
    margin: 0;
    /* Samakan inset horizontal dengan baris menu (margin item 10px + padding 12px) */
    padding: 8px calc(10px + 12px);
    min-height: 0;
    border-radius: 0;
    gap: 6px;
    color: #334155;
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
}

.app-menu-panel .app-menu-head-bar .far {
    color: #64748b;
}

.app-menu-head-bar__actions {
    gap: 0.125rem;
}

.app-menu-head-bar__actions>button,
.app-menu-head-bar__actions>a {
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}

.app-menu-panel .app-menu-head-bar .app-theme-toggle-btn {
    color: #1e3a5f;
}

.app-menu-panel .app-menu-head-bar .app-theme-toggle-btn:hover,
.app-menu-panel .app-menu-head-bar .app-theme-toggle-btn:focus {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.app-menu-panel .app-menu-head-bar .app-menu-view-toggle {
    color: #475569;
}

.app-menu-panel .app-menu-head-bar .app-menu-view-toggle:hover,
.app-menu-panel .app-menu-head-bar .app-menu-view-toggle:focus {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.app-menu-panel .app-menu-exit-btn {
    color: #dc2626 !important;
}

.app-menu-panel .app-menu-exit-btn:hover,
.app-menu-panel .app-menu-exit-btn:focus {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c !important;
}

.app-menu-panel .app-menu-head {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.03em;
    padding: 12px 12px 6px 14px;
}

.app-menu-panel .app-menu-item.app-menu-head:not(.app-menu-head--toggle) {
    min-height: 0;
    padding: 14px 12px 6px 14px;
    background: transparent;
}

.app-menu-panel .app-menu-item.border-0.bg-transparent.text-muted {
    min-height: 0;
    margin-bottom: 0;
    padding-top: 6px;
    padding-bottom: 4px;
    background: transparent !important;
}

.app-menu-panel .app-menu-item.border-0.bg-transparent.text-muted:hover {
    background: transparent !important;
    color: #64748b !important;
}

.app-menu-panel .app-menu-group--collapse {
    margin: 0 0 2px;
    border-radius: 0;
    border: none;
    background: transparent;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.app-menu-panel .app-menu-group--collapse:has(.app-menu-head--toggle:not(.collapsed)) {
    box-shadow: none;
}

.app-menu-panel .app-menu-group--collapse .collapse .app-menu-item {
    margin: 0;
    border-radius: 0;
}

.app-menu-panel .app-menu-group--collapse .app-menu-head--toggle {
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    border-radius: 0;
    min-height: 40px;
    padding: 8px 12px;
    background: #f8fafc;
    color: #4b5563;
    letter-spacing: normal;
    padding: 8px 12px;
    margin: 0 10px 2px;
    min-height: 42px;
    border-radius: 8px;
}

.app-menu-panel .app-menu-head--toggle>span.min-w-0 {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.app-menu-panel .app-menu-head--toggle>span.min-w-0>i:first-of-type {
    box-sizing: border-box;
    flex: 0 0 1.5rem;
    width: 1.5rem;
    min-width: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0 !important;
    line-height: 1;
}

.app-menu-panel .app-menu-head--toggle .app-menu-collapse-chev {
    margin-left: auto;
    margin-right: 0.25rem;
    flex-shrink: 0;
}

body:not(.dark-mode) .app-menu-panel .app-menu-head--toggle:not(.collapsed) {
    color: #1e293b;
    background: #f1f5f9;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}

.app-menu-collapse-chev {
    transition: transform 0.2s ease;
    font-size: 0.55rem;
    opacity: 0.5;
    color: #64748b;
}

.app-menu-head--toggle:not(.collapsed) .app-menu-collapse-chev {
    opacity: 0.7;
}

.app-menu-head--toggle.collapsed .app-menu-collapse-chev {
    transform: rotate(-90deg);
}

.app-menu-panel .app-menu-group .app-menu-head--nested {
    padding: 8px 12px 4px 18px;
    margin: 0 10px;
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.03em;
}

/* Sub-menu drawer: indent + indikator cabang (akar) */
.app-menu-panel .app-menu-sub {
    padding-left: 20px;
    padding-right: 10px;
    font-size: 12.5px;
    font-weight: 500;
    gap: 8px;
    margin: 0;
    border-radius: 0;
    min-height: 36px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.app-menu-panel .app-menu-sub:last-child {
    border-bottom: none;
}

.app-menu-panel .app-menu-sub::before {
    content: '';
    flex-shrink: 0;
    align-self: center;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    box-sizing: border-box;
    border-radius: 50%;
    border: none;
    background: #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0 0 0 4px;
}

body:not(.dark-mode) .app-menu-panel .app-menu-sub.active {
    border-bottom-color: transparent;
}

body:not(.dark-mode) .app-menu-panel .app-menu-sub.active::before {
    background: rgba(255, 255, 255, 0.7);
}

.app-menu-panel .app-menu-sub:hover::before {
    background: #94a3b8;
}

.app-menu-panel .app-menu-exit {
    color: #dc2626 !important;
}

.app-menu-panel .app-menu-exit:hover {
    color: #ffffff !important;
    background: #ef4444 !important;
}

.app-menu-panel .app-menu-idle-row {
    color: #64748b;
    background: transparent;
}

/* Drawer list-mode: footer strip (Pengaturan + timer + Keluar satu baris) */
.app-menu-list-footer-strip {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin: 0.25rem 0.5rem 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    min-height: 2.25rem;
}

.app-menu-list-footer-strip__item {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    background: transparent;
    border: none;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}

.app-menu-list-footer-strip__item i {
    font-size: 0.7rem;
    opacity: 0.6;
}

.app-menu-list-footer-strip__item:hover,
.app-menu-list-footer-strip__item:focus-visible {
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
}

.app-menu-list-footer-strip__item.active {
    background: #dbeafe;
    color: #2563eb;
}

.app-menu-list-footer-strip__idle {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    background: transparent;
    border-right: 1px solid #e2e8f0;
}

.app-menu-list-footer-strip__idle i {
    font-size: 0.55rem;
}

.app-menu-list-footer-strip__item--exit {
    color: #dc2626;
    border-right: none;
}

.app-menu-list-footer-strip__item--exit i {
    opacity: 0.8;
}

.app-menu-list-footer-strip__item--exit:hover,
.app-menu-list-footer-strip__item--exit:focus-visible {
    color: #fff;
    background: #ef4444;
}

/* Drawer: baris ikon Wall Monitoring + pengaturan */
.app-menu-icon-card {
    margin: 10px 14px 8px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.28);
}

.app-menu-icon-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.app-menu-icon-card__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.app-menu-icon-card__title i {
    color: #4f46e5;
    font-size: 0.82rem;
}

.app-menu-icon-card__hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    background: rgba(99, 102, 241, 0.08);
    font-size: 0.67rem;
    font-weight: 700;
    color: #4f46e5;
    white-space: nowrap;
}

.app-menu-category-card {
    margin: 0 14px 10px;
    padding: 10px 0 8px;
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.app-menu-category-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    padding: 0 12px;
}

.app-menu-category-card__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.app-menu-category-card__title i {
    color: #0284c7;
    font-size: 0.82rem;
}

.app-menu-category-card__hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    background: rgba(14, 165, 233, 0.08);
    font-size: 0.67rem;
    font-weight: 700;
    color: #0284c7;
    white-space: nowrap;
}

.app-menu-category-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-menu-category-card .app-menu-group--collapse {
    margin: 0;
}

.app-menu-category-card .app-menu-group--collapse .app-menu-head--toggle {
    margin: 0 10px 4px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.9);
}

.app-menu-category-card .app-menu-group--collapse .collapse {
    padding-bottom: 2px;
}

.app-menu-icon-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.app-menu-icon-row>.app-menu-item {
    min-width: 0;
    margin: 0;
}

.app-menu-panel .app-menu-item.app-menu-quick-icon,
.app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 64px;
    padding: 8px 4px 7px;
    font-size: 1.12rem;
    color: #4f46e5;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.96) 0%, rgba(238, 242, 255, 0.98) 100%);
    box-shadow: 0 12px 24px -20px rgba(79, 70, 229, 0.22);
}

.app-menu-panel .app-menu-item.app-menu-quick-icon .app-menu-quick-icon__label,
.app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon .app-menu-quick-icon__label {
    display: -webkit-box;
    overflow: hidden;
    max-width: 100%;
    padding: 0 2px;
    font-size: 8.85px;
    font-weight: 800;
    line-height: 1.14;
    text-align: center;
    text-wrap: balance;
    word-break: break-word;
    letter-spacing: 0.01em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.app-menu-panel .app-menu-item.app-menu-quick-icon:hover,
.app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon:hover {
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.42);
    background: linear-gradient(135deg, rgba(199, 210, 254, 0.96) 0%, rgba(224, 231, 255, 1) 100%);
}

body:not(.dark-mode) .app-menu-panel .app-menu-item.app-menu-quick-icon.active,
body:not(.dark-mode) .app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon.active {
    border-color: transparent;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28);
}

.app-menu-panel .app-menu-item.app-menu-settings-icon {
    justify-content: center;
    min-height: 52px;
    font-size: 1.35rem;
    color: #475569;
    margin: 0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.app-menu-panel .app-menu-item.app-menu-settings-icon:hover {
    color: #312e81;
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.1);
}

/* Desktop (lg+): drawer disembunyikan — dipakai phone & tablet */
@media (min-width: 992px) {

    .app-menu-overlay,
    .app-menu-panel {
        display: none !important;
    }
}

/* Konten utama — safe area + jarak konsisten */
.app-content-shell {
    padding-top: calc(var(--app-header-h) + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
    min-height: 100dvh;
}

@media (max-width: 991.98px) {
    :root {
        --app-header-h: 0px;
        --app-mobile-topbar-row-h: 48px;
    }

    body:not(.app-sidebar-small-as-desktop) .app-content-shell {
        padding-top: calc(env(safe-area-inset-top, 0px) + var(--app-mobile-topbar-row-h)) !important;
    }

    body:not(.app-sidebar-small-as-desktop) .app-menu-overlay {
        top: calc(env(safe-area-inset-top, 0px) + var(--app-mobile-topbar-row-h));
    }

    body:not(.app-sidebar-small-as-desktop) .app-menu-panel {
        top: calc(env(safe-area-inset-top, 0px) + var(--app-mobile-topbar-row-h));
        height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--app-mobile-topbar-row-h) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--app-mobile-topbar-row-h) - env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 992px) {
    body.app-desktop-left-sidebar-enabled .app-desktop-left-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 284px;
        max-width: 284px;
        overflow: hidden;
        z-index: 1035;
        display: flex !important;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.app-desktop-left-sidebar--collapsed.app-desktop-left-sidebar-enabled .app-desktop-left-sidebar {
        width: 120px;
        max-width: 120px;
    }

    body.app-desktop-left-sidebar-enabled .app-content-shell {
        padding-top: max(24px, env(safe-area-inset-top, 0px)) !important;
        /* Margin + width (bukan padding) supaya shell tidak overlap sidebar fixed — klik ikon tetap ke aside */
        padding-left: 0 !important;
        margin-left: 284px !important;
        width: calc(100% - 284px) !important;
        max-width: none;
        box-sizing: border-box;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.app-desktop-left-sidebar--collapsed.app-desktop-left-sidebar-enabled .app-content-shell {
        margin-left: 120px !important;
        width: calc(100% - 120px) !important;
    }
}

/* Opsi Pengaturan → Antarmuka: sidebar kiri seperti desktop di layar < lg */
@media (max-width: 991.98px) {
    body.app-desktop-left-sidebar-enabled.app-sidebar-small-as-desktop .app-desktop-left-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 284px;
        max-width: 284px;
        overflow: hidden;
        z-index: 1035;
        display: flex !important;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.app-desktop-left-sidebar-enabled.app-sidebar-small-as-desktop.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar {
        width: 120px;
        max-width: 120px;
    }

    body.app-desktop-left-sidebar-enabled.app-sidebar-small-as-desktop .app-content-shell {
        padding-top: max(24px, env(safe-area-inset-top, 0px)) !important;
        padding-left: 0 !important;
        margin-left: 284px !important;
        width: calc(100% - 284px) !important;
        max-width: none;
        box-sizing: border-box;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.app-desktop-left-sidebar-enabled.app-sidebar-small-as-desktop.app-desktop-left-sidebar--collapsed .app-content-shell {
        margin-left: 120px !important;
        width: calc(100% - 120px) !important;
    }

    body.app-desktop-left-sidebar-enabled.app-sidebar-small-as-desktop .app-menu-overlay,
    body.app-desktop-left-sidebar-enabled.app-sidebar-small-as-desktop .app-menu-panel {
        display: none !important;
    }
}

/* Dark Mode Sidebar Overrides */
body.dark-mode .app-desktop-left-sidebar__inner {
    background: #111827;
    border-right-color: #1f2937;
}

body.dark-mode .app-desktop-left-sidebar__footer {
    background: linear-gradient(160deg, #1a2332 0%, #1f2937 45%, #252d3d 100%);
    border-top-color: #374151;
}

body.dark-mode .isp-sidebar-quick-link {
    color: #dbe4f0;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 30px -24px rgba(2, 6, 23, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .isp-sidebar-quick-link:hover {
    color: #f8fafc;
    border-color: rgba(129, 140, 248, 0.3);
    background: linear-gradient(145deg, rgba(49, 46, 129, 0.94) 0%, rgba(30, 64, 175, 0.94) 100%);
}

body.dark-mode .isp-sidebar-quick-link--active,
body.dark-mode .isp-sidebar-quick-link--active:hover {
    color: #ffffff;
    border-color: rgba(129, 140, 248, 0.34);
    background: linear-gradient(145deg, #6366f1 0%, #4338ca 100%);
    box-shadow: 0 20px 36px -24px rgba(99, 102, 241, 0.52);
}

body.dark-mode .app-desktop-left-sidebar__head {
    color: #6b7280;
}

body.dark-mode .app-desktop-left-sidebar__section-toggle {
    color: #d1d5db;
}

body.dark-mode .app-desktop-left-sidebar__section-toggle>i:first-of-type {
    color: inherit;
}

body.dark-mode .app-desktop-left-sidebar__section-toggle:hover {
    color: #ffffff;
    background: #1f2937;
}

body.dark-mode .app-desktop-left-sidebar__section-toggle.active:hover {
    background: #4b5563;
    color: #f9fafb;
}

body.dark-mode .app-desktop-left-sidebar__item {
    color: #d1d5db;
}

body.dark-mode .app-desktop-left-sidebar__item:hover {
    color: #ffffff;
    background: #1f2937;
}

body.dark-mode .app-desktop-left-sidebar__item.active {
    background: #374151;
    color: #ffffff;
}

body.dark-mode .isp-sidebar-mod-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 64, 175, 0.42) 52%, rgba(30, 41, 59, 0.94) 100%);
    border-color: rgba(96, 165, 250, 0.12);
    color: #e2e8f0;
    box-shadow: 0 18px 34px -26px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-mode .isp-sidebar-mod-card:hover {
    background: linear-gradient(135deg, rgba(15, 23, 42, 1) 0%, rgba(37, 99, 235, 0.5) 56%, rgba(51, 65, 85, 0.94) 100%);
    border-color: rgba(147, 197, 253, 0.18);
    box-shadow: 0 22px 38px -26px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

body.dark-mode .isp-sidebar-mod-card--active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.94) 0%, rgba(67, 56, 202, 0.96) 50%, rgba(29, 78, 216, 0.94) 100%);
    border-color: rgba(147, 197, 253, 0.16);
    color: #ffffff;
    box-shadow: 0 26px 42px -26px rgba(37, 99, 235, 0.42);
}

body.dark-mode .isp-sidebar-mod-card__ico {
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.5) 0%, rgba(29, 78, 216, 0.28) 100%);
    color: #7dd3fc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-mode .isp-sidebar-mod-card__ico--billing {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.34) 0%, rgba(59, 130, 246, 0.28) 100%);
    color: #93c5fd;
}

body.dark-mode .isp-sidebar-mod-card__ico--monitor {
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.42) 0%, rgba(29, 78, 216, 0.32) 100%);
    color: #7dd3fc;
}

body.dark-mode .isp-sidebar-mod-card__ico--ops {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.28) 0%, rgba(16, 185, 129, 0.24) 100%);
    color: #6ee7b7;
}

body.dark-mode .isp-sidebar-mod-card--active .isp-sidebar-mod-card__ico {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.dark-mode .isp-sidebar-mod-card__arrow {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
}

body.dark-mode .isp-sidebar-mod-card:hover .isp-sidebar-mod-card__arrow {
    color: #c4b5fd;
    background: rgba(99, 102, 241, 0.18);
}

body.dark-mode .isp-sidebar-mod-card--active .isp-sidebar-mod-card__arrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

body.dark-mode .isp-sidebar-mod-break__line {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.02) 0%, rgba(148, 163, 184, 0.26) 50%, rgba(148, 163, 184, 0.02) 100%);
}

body.dark-mode .isp-sidebar-mod-break__label {
    color: #cbd5e1;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.94) 0%, rgba(51, 65, 85, 0.9) 100%);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 24px -20px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .isp-sidebar-sys-card--active .isp-sidebar-sys-card__arrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

body.dark-mode .app-desktop-left-sidebar__section-toggle.active {
    background: rgba(55, 65, 81, 0.95);
    color: #f9fafb;
}

/* Drawer mobile / tablet — mode gelap selaras sidebar */
body.dark-mode .app-menu-panel {
    background: #111827;
    border-left-color: #1f2937;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

body.dark-mode .app-menu-panel .isp-app-nav-divider::before {
    background: rgba(255, 255, 255, 0.14);
}

body.dark-mode .app-menu-panel .app-menu-item {
    color: #d1d5db;
}

body.dark-mode .app-menu-panel .app-menu-item:hover {
    color: #ffffff;
    background: #1f2937;
}

body.dark-mode .app-menu-panel .app-menu-item.active {
    background: #374151;
    color: #ffffff;
    box-shadow: none;
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-head-bar {
    color: #e5e7eb;
    background: transparent;
    border-bottom: 1px solid #374151;
}

body.dark-mode .app-menu-panel .app-menu-head-bar .far {
    color: #9ca3af;
}

body.dark-mode .app-menu-panel .app-menu-head-bar .app-theme-toggle-btn {
    color: #e5e7eb;
}

body.dark-mode .app-menu-panel .app-menu-head-bar .app-theme-toggle-btn:hover,
body.dark-mode .app-menu-panel .app-menu-head-bar .app-theme-toggle-btn:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

body.dark-mode .app-menu-panel .app-menu-head-bar .app-menu-view-toggle {
    color: #cbd5e1;
}

body.dark-mode .app-menu-panel .app-menu-head-bar .app-menu-view-toggle:hover,
body.dark-mode .app-menu-panel .app-menu-head-bar .app-menu-view-toggle:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

body.dark-mode .app-menu-panel .app-menu-exit-btn {
    color: #fca5a5 !important;
}

body.dark-mode .app-menu-panel .app-menu-exit-btn:hover,
body.dark-mode .app-menu-panel .app-menu-exit-btn:focus {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca !important;
}

body.dark-mode .app-menu-panel .app-menu-head {
    color: #6b7280;
}

body.dark-mode .app-menu-panel .app-menu-item.border-0.bg-transparent.text-muted:hover {
    color: #9ca3af !important;
}

body.dark-mode .app-menu-panel .app-menu-group--collapse {
    background: transparent;
    border-color: transparent;
}

body.dark-mode .app-menu-panel .app-menu-group--collapse .app-menu-head--toggle {
    color: #d1d5db;
    background: rgba(15, 23, 42, 0.4);
}

body.dark-mode .app-menu-panel .app-menu-head--toggle:not(.collapsed) {
    background: rgba(51, 65, 85, 0.6);
    color: #f1f5f9;
    border-bottom-color: rgba(148, 163, 184, 0.15);
}

body.dark-mode .app-menu-panel .app-menu-collapse-chev {
    color: #9ca3af;
}

body.dark-mode .app-menu-panel .app-menu-group .app-menu-head--nested {
    color: #6b7280;
}

body.dark-mode .app-menu-panel .app-menu-sub {
    color: #94a3b8;
    border-bottom-color: rgba(148, 163, 184, 0.08);
}

body.dark-mode .app-menu-panel .app-menu-sub::before {
    background: #475569;
}

body.dark-mode .app-menu-panel .app-menu-sub:hover::before {
    background: #64748b;
}

body.dark-mode .app-menu-panel .app-menu-sub.active::before {
    background: rgba(255, 255, 255, 0.5);
}

body.dark-mode .app-menu-panel .app-menu-sub.active {
    border-bottom-color: transparent;
}

body.dark-mode .app-menu-panel .app-menu-idle-row {
    color: #9ca3af;
}

body.dark-mode .app-menu-list-footer-strip {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.18);
}

body.dark-mode .app-menu-list-footer-strip__item {
    color: #94a3b8;
    border-right-color: rgba(148, 163, 184, 0.15);
}

body.dark-mode .app-menu-list-footer-strip__item:hover,
body.dark-mode .app-menu-list-footer-strip__item:focus-visible {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.7);
}

body.dark-mode .app-menu-list-footer-strip__item.active {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.15);
}

body.dark-mode .app-menu-list-footer-strip__idle {
    color: #64748b;
    border-right-color: rgba(148, 163, 184, 0.15);
}

body.dark-mode .app-menu-list-footer-strip__item--exit {
    color: #fca5a5;
}

body.dark-mode .app-menu-list-footer-strip__item--exit:hover,
body.dark-mode .app-menu-list-footer-strip__item--exit:focus-visible {
    color: #fff;
    background: #ef4444;
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-quick-icon,
body.dark-mode .app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon {
    color: #a5b4fc;
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(99, 102, 241, 0.12);
}

body.dark-mode .app-menu-icon-card {
    border-color: rgba(99, 102, 241, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.94) 100%);
    box-shadow: none;
}

body.dark-mode .app-menu-category-card {
    border-color: rgba(14, 165, 233, 0.2);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.94) 100%);
    box-shadow: none;
}

body.dark-mode .app-menu-icon-card__title {
    color: #cbd5e1;
}

body.dark-mode .app-menu-icon-card__title i {
    color: #a5b4fc;
}

body.dark-mode .app-menu-icon-card__hint {
    color: #c7d2fe;
    border-color: rgba(129, 140, 248, 0.22);
    background: rgba(99, 102, 241, 0.16);
}

body.dark-mode .app-menu-category-card__title {
    color: #cbd5e1;
}

body.dark-mode .app-menu-category-card__title i {
    color: #7dd3fc;
}

body.dark-mode .app-menu-category-card__hint {
    color: #bae6fd;
    border-color: rgba(14, 165, 233, 0.22);
    background: rgba(14, 165, 233, 0.14);
}

body.dark-mode .app-menu-category-card .app-menu-group--collapse .app-menu-head--toggle {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.42);
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-quick-icon:hover,
body.dark-mode .app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon:hover {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.28);
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-quick-icon.active,
body.dark-mode .app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon.active {
    background: #374151;
    color: #ffffff;
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: none;
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-quick-icon .app-menu-quick-icon__label,
body.dark-mode .app-menu-panel .app-menu-item.app-menu-wall-monitoring-icon .app-menu-quick-icon__label {
    color: inherit;
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-settings-icon {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .app-menu-panel .app-menu-item.app-menu-settings-icon:hover {
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.2);
}

/* Kartu info pengguna — footer sidebar desktop (satu layer dengan __inner, tanpa kotak kedua) */
.isp-sidebar-user-card {
    background: transparent;
    border-radius: 0;
    padding: 4px 8px 10px;
    border: none;
    box-shadow: none;
    max-width: 100%;
    box-sizing: border-box;
}

.isp-sidebar-user-card__head {
    margin-bottom: 0;
    gap: 4px;
    padding-top: 0;
}

.isp-sidebar-user-card__clock {
    line-height: 1.35;
}

.isp-sidebar-user-card__head .isp-sidebar-user-card__clock {
    min-width: 0;
}

.isp-sidebar-user-card__clock .isp-sidebar-clock-datetime {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.isp-sidebar-user-card__icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 0;
    font-size: 12px;
    color: #1e3a5f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.isp-sidebar-user-card__icon-btn:hover,
.isp-sidebar-user-card__icon-btn:focus {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
    outline: none;
}

.isp-sidebar-user-card__badges {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    width: 100%;
    min-width: 0;
}

.isp-sidebar-pill {
    border: none;
    border-radius: 0;
    padding: 4px 6px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.isp-sidebar-pill--api-inline {
    width: auto;
    max-width: 112px;
}

.isp-sidebar-pill__ico {
    font-size: 10px;
    margin-right: 3px;
    flex-shrink: 0;
}

.isp-sidebar-pill__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.isp-sidebar-pill__chev {
    font-size: 9px;
    margin-left: 4px;
    opacity: 0.75;
}

.isp-sidebar-pill__fraction {
    margin-left: 3px;
    padding: 1px 4px;
    border-radius: 0;
    font-size: 9px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.isp-sidebar-pill__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    background: currentColor;
    opacity: 0.35;
}

.isp-sidebar-pill__dot--ok {
    background: #16a34a;
    opacity: 1;
}

.isp-sidebar-pill__dot--warn {
    background: #d97706;
    opacity: 1;
}

.isp-sidebar-pill__dot--err {
    background: #dc2626;
    opacity: 1;
}

.isp-sidebar-pill__dot--empty {
    background: #9ca3af;
    opacity: 0.85;
}

.isp-sidebar-pill--api.isp-sidebar-pill--state-ok {
    background: #ecfdf5;
    color: #047857;
}

.isp-sidebar-pill--api.isp-sidebar-pill--state-ok .isp-sidebar-pill__ico {
    color: #059669;
}

.isp-sidebar-pill--api.isp-sidebar-pill--state-warn {
    background: #fffbeb;
    color: #b45309;
}

.isp-sidebar-pill--api.isp-sidebar-pill--state-err {
    background: #fef2f2;
    color: #b91c1c;
}

.isp-sidebar-pill--api.isp-sidebar-pill--state-empty {
    background: #f3f4f6;
    color: #6b7280;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-ok {
    background: #eff6ff;
    color: #1d4ed8;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-ok .isp-sidebar-pill__fraction {
    background: rgba(29, 78, 216, 0.12);
    color: #1e40af;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-warn {
    background: #fffbeb;
    color: #b45309;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-warn .isp-sidebar-pill__fraction {
    background: rgba(180, 83, 9, 0.12);
    color: #92400e;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-err {
    background: #fef2f2;
    color: #b91c1c;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-err .isp-sidebar-pill__fraction {
    background: rgba(185, 28, 28, 0.12);
    color: #991b1b;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-empty {
    background: #f3f4f6;
    color: #6b7280;
}

.isp-sidebar-pill--svc.isp-sidebar-pill--state-empty .isp-sidebar-pill__fraction {
    background: #e5e7eb;
    color: #4b5563;
}

.isp-sidebar-user-card__profile {
    padding: 2px 0 0;
    margin-top: 2px;
    border-top: none;
    border-bottom: none;
}

.isp-sidebar-user-card__profile-main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 4px 8px 4px 5px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.isp-sidebar-user-chip__avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(135deg, #fde68a 0%, #fca5a5 100%);
}

.isp-sidebar-avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.isp-sidebar-user-card__name {
    font-size: 12px;
    color: #111827;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.isp-sidebar-user-card__role {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.25;
}

.isp-sidebar-user-card__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
}

.isp-sidebar-user-card__logout-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    font-size: 11px;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.isp-sidebar-user-card__theme-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #6b7280 !important;
    font-size: 11px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.isp-sidebar-user-card__theme-btn:hover,
.isp-sidebar-user-card__theme-btn:focus {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #111827 !important;
    outline: none;
}

.isp-sidebar-user-card__logout-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #111827;
}

.isp-sidebar-user-card__since {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

body.dark-mode .isp-sidebar-user-card {
    background: transparent;
    box-shadow: none;
}

body.dark-mode .isp-sidebar-user-card__clock .isp-sidebar-clock-datetime {
    color: #94a3b8;
}

body.dark-mode .isp-sidebar-user-card__icon-btn {
    color: #e2e8f0;
}

body.dark-mode .isp-sidebar-user-card__icon-btn:hover,
body.dark-mode .isp-sidebar-user-card__icon-btn:focus {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .isp-sidebar-user-card__name {
    color: #f1f5f9;
}

body.dark-mode .isp-sidebar-user-card__role {
    color: #94a3b8;
}

body.dark-mode .isp-sidebar-user-card__profile {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .isp-sidebar-user-card__profile-main {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.28);
}

body.dark-mode .isp-sidebar-user-chip__avatar {
    color: #e2e8f0;
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

body.dark-mode .isp-sidebar-user-card__logout-btn {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}

body.dark-mode .isp-sidebar-user-card__theme-btn {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #cbd5e1 !important;
}

body.dark-mode .isp-sidebar-user-card__theme-btn:hover,
body.dark-mode .isp-sidebar-user-card__theme-btn:focus {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: rgba(148, 163, 184, 0.45) !important;
    color: #f8fafc !important;
}

body.dark-mode .isp-sidebar-user-card__logout-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(148, 163, 184, 0.45);
    color: #f8fafc;
}

body.dark-mode .isp-sidebar-user-card__since {
    color: #94a3b8;
    border-top-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .isp-sidebar-pill--api.isp-sidebar-pill--state-ok {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

body.dark-mode .isp-sidebar-pill--api.isp-sidebar-pill--state-ok .isp-sidebar-pill__ico {
    color: #34d399;
}

body.dark-mode .isp-sidebar-pill--svc.isp-sidebar-pill--state-ok {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

body.dark-mode .isp-sidebar-pill--svc.isp-sidebar-pill--state-ok .isp-sidebar-pill__fraction {
    background: rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
}

body.dark-mode .isp-sidebar-pill--api.isp-sidebar-pill--state-empty,
body.dark-mode .isp-sidebar-pill--svc.isp-sidebar-pill--state-empty {
    background: #1f2937;
    color: #9ca3af;
}

body.dark-mode .isp-sidebar-pill--svc.isp-sidebar-pill--state-empty .isp-sidebar-pill__fraction {
    background: #374151;
    color: #d1d5db;
}

/* Legacy util — dipakai komponen lain */
.isp-sidebar-footer-inner {
    gap: 4px;
}

.isp-sidebar-clock-wrap {
    min-width: 0;
    line-height: 1.25;
}

.isp-sidebar-clock-datetime {
    font-size: 10px;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

body.dark-mode .isp-sidebar-clock-datetime {
    color: #e2e8f0;
}

.app-content-inner {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-top: var(--app-content-pad-top) !important;
    padding-bottom: var(--app-content-pad-bottom) !important;
}

/* Dashboard: lebar mengikuti viewport (tanpa cap 1600px); padding horizontal tetap dari .app-container-gutter */
body.page-body-dashboard .app-content-inner {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Antar blok atas (router strip ↔ KPI ↔ dst.) */
.page-dashboard .dash-row-section {
    margin-bottom: 0.65rem !important;
}

@media (min-width: 768px) {
    .page-dashboard .dash-row-section {
        margin-bottom: 0.85rem !important;
    }
}

.page-dashboard .dash-region-col {
    margin-bottom: 0.75rem !important;
}

@media (min-width: 768px) {
    .page-dashboard .dash-region-col {
        margin-bottom: 1rem !important;
    }
}

.page-dashboard .dash-region-name--tight {
    margin-bottom: 0.5rem !important;
}

@media (min-width: 768px) {
    .page-dashboard .dash-region-name--tight {
        margin-bottom: 0.65rem !important;
    }
}

.page-dashboard .dash-monitor-panel--tight {
    margin-top: 0.35rem !important;
}

.page-dashboard #summary-container:empty {
    display: none !important;
    border: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-dashboard .dash-monitor-panel .table-responsive,
.page-dashboard .dash-monitor-panel .table {
    margin-bottom: 0 !important;
}

/* Username di tabel dashboard: beri indikator jelas bahwa bisa diklik (buka detail user). */
.page-dashboard .dash-user-clickable {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #4338ca;
    text-decoration: underline dotted rgba(79, 70, 229, 0.55);
    text-underline-offset: 3px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease, background-color 0.15s ease;
}

.page-dashboard .dash-user-clickable:hover,
.page-dashboard .dash-user-clickable:focus {
    color: #312e81;
    text-decoration-color: rgba(49, 46, 129, 0.95);
    background: rgba(99, 102, 241, 0.08);
}

body.dark-mode .page-dashboard .dash-user-clickable {
    color: #a5b4fc;
    text-decoration-color: rgba(165, 180, 252, 0.65);
}

body.dark-mode .page-dashboard .dash-user-clickable:hover,
body.dark-mode .page-dashboard .dash-user-clickable:focus {
    color: #c7d2fe;
    text-decoration-color: rgba(199, 210, 254, 0.95);
    background: rgba(99, 102, 241, 0.18);
}

.app-container-gutter {
    width: 100%;
}

/* Opsional: tambahkan class app-page-card pada .card untuk radius + bayangan halus */
.app-page-card {
    border-radius: var(--app-radius-md) !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: var(--app-shadow-card) !important;
    overflow: hidden;
}

.app-page-card.border-0 {
    border: none !important;
}

.content .table-responsive {
    margin: 0;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 var(--app-radius-sm) var(--app-radius-sm);
}

@media (max-width: 767px) {
    .content .table-responsive {
        box-shadow: inset 0 -1px 0 rgba(226, 232, 240, 0.9);
    }
}

/* Touch target & iOS: hindari zoom saat fokus input */
@media (max-width: 576px) {

    .content .btn:not(.btn-sm):not(.btn-xs),
    .content .btn-modern {
        min-height: var(--app-touch-min);
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .content .form-control,
    .content select.form-control {
        font-size: 16px !important;
        min-height: var(--app-touch-min);
        border-radius: var(--app-radius-sm) !important;
    }

    .modal .form-control {
        font-size: 16px !important;
    }
}

/*
 * Navbar app (.app-header) fixed z-index 1100; Bootstrap 4 modal default 1050 → judul modal
 * tertutup / “ketarik ke atas” di belakang bar ungu. Backdrop harus di bawah .modal tapi di atas konten.
 */
:root {
    /* Bootstrap 5 uses CSS variables for component z-index */
    --bs-backdrop-zindex: 1990;
    --bs-modal-zindex: 2000;
}

.modal {
    z-index: 2000 !important;
}

.modal-backdrop {
    z-index: 1990 !important;
    /* Bootstrap default sering terasa terlalu gelap pada shell ini */
    background-color: #000 !important;
    /* Bootstrap 5 memakai CSS variable untuk opacity backdrop */
    --bs-backdrop-opacity: 0.22 !important;
}

.modal-dialog,
.modal-content {
    position: relative;
    z-index: 2001 !important;
}

.modal-backdrop.show {
    opacity: 0.22 !important;
}

body.dark-mode .modal-backdrop.show {
    opacity: 0.32 !important;
}

/* Settings pages: biasanya butuh backdrop lebih ringan */
body.page-settings .modal-backdrop.show {
    opacity: 0.18 !important;
    --bs-backdrop-opacity: 0.18 !important;
}

body.page-settings.dark-mode .modal-backdrop.show {
    opacity: 0.28 !important;
    --bs-backdrop-opacity: 0.28 !important;
}

/* Ruang di bawah header + safe area; isi modal tetap terbaca di mobile & desktop */
.modal.show {
    padding-top: calc(var(--app-header-h) + env(safe-area-inset-top, 0px) + 0.75rem);
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

/* Modal — layar kecil */
@media (max-width: 575px) {
    /* margin kiri/kanan auto supaya dialog benar-benar di tengah (bukan margin seragam 0.5rem ke empat sisi) */
    .modal-dialog {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        margin-left: auto;
        margin-right: auto;
        max-width: calc(100vw - 1rem);
    }

    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: calc(100vw - 1rem);
        margin-left: auto;
        margin-right: auto;
    }

    .modal-content {
        border-radius: var(--app-radius-lg) !important;
    }
}

/* DataTables — stack filter di mobile */
@media (max-width: 576px) {

    div.dataTables_wrapper .dataTables_length,
    div.dataTables_wrapper .dataTables_filter {
        float: none !important;
        text-align: left !important;
        margin-bottom: 0.65rem;
    }

    div.dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: none !important;
    }

    div.dataTables_wrapper .dataTables_paginate {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        padding-top: 8px !important;
    }
}

.px-md-5 {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .px-md-5 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Notifikasi alarm DOWN/UP — default kanan bawah; peta infra: body.imap-notif-bottom-left → kiri bawah */
.global-notif-stack {
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 6px;
    top: auto;
    left: auto;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: min(280px, calc(100vw - 24px));
    max-width: 280px;
    max-height: min(42vh, calc(100dvh - var(--app-header-h, 56px) - 24px));
    overflow: hidden;
    pointer-events: none;
}

@media (min-width: 768px) {
    .global-notif-stack {
        width: min(300px, calc(100vw - 32px));
        max-width: 300px;
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        right: max(16px, env(safe-area-inset-right, 0px));
    }
}

body.imap-notif-bottom-left .global-notif-stack {
    right: auto;
    left: max(12px, env(safe-area-inset-left, 0px));
    align-items: flex-start;
}

@media (min-width: 768px) {
    body.imap-notif-bottom-left .global-notif-stack {
        left: max(16px, env(safe-area-inset-left, 0px));
    }
}

.global-notif-stack .down-alarm-toast {
    pointer-events: auto;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

.down-alarm-toast {
    background: linear-gradient(135deg, #dc3545, #b91c1c);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.28);
    border-left: 3px solid rgba(255, 255, 255, 0.9);
    animation: alarm-toast-in 0.25s ease-out;
    line-height: 1.35;
}

.down-alarm-toast.hiding {
    animation: alarm-fadeout 0.35s ease forwards;
}

@keyframes alarm-toast-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

@keyframes alarm-fadeout {
    to {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
}

.down-alarm-toast .notif-user {
    font-weight: 700;
    font-size: clamp(11px, 3.2vw, 13px);
}

.down-alarm-toast .notif-user-sub {
    font-weight: 600;
    font-size: clamp(10px, 2.9vw, 12px);
    opacity: 0.92;
    margin-top: 3px;
    line-height: 1.3;
}

.down-alarm-toast .notif-time {
    font-size: 10px;
    opacity: 0.9;
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.down-alarm-toast.online {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.25);
}

/* Tab pill (Pelanggan & halaman serupa) — area sentuh nyaman */
.nav-pills-modern .nav-link {
    min-height: var(--app-touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--app-radius-sm) !important;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 575px) {
    .nav-pills-modern .nav-link {
        font-size: 13px;
        padding: 0.65rem 0.75rem;
    }
}

/* Infra: tombol tambah aset */
#btnTambah {
    min-height: var(--app-touch-min);
    border-radius: var(--app-radius-sm) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Animations */
@keyframes status-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ========== Toast & loading (app-ui.js) ========== */
.app-toast-stack {
    position: fixed;
    bottom: 20px;
    right: 16px;
    left: 16px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
    margin-left: auto;
}

@media (min-width: 576px) {
    .app-toast-stack {
        left: auto;
        width: 100%;
        max-width: 400px;
    }
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 40px 14px 16px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    position: relative;
    max-width: 100%;
    word-break: break-word;
}

.app-toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.app-toast-success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.app-toast-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.app-toast-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Router API down — oranye pekat + glow (alarm visual) */
.app-toast-router-down {
    background: linear-gradient(145deg, #fb923c 0%, #ea580c 42%, #c2410c 100%);
    color: #fff;
    border: 2px solid #7c2d12;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 12px 40px rgba(194, 65, 12, 0.55),
        0 0 28px rgba(234, 88, 12, 0.45);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
    font-weight: 800;
    animation: app-toast-router-down-pulse 2.2s ease-in-out infinite;
}

.app-toast-router-down .app-toast-icon {
    color: #fff;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.35));
}

.app-toast-router-down .app-toast-close {
    color: #fff;
    opacity: 0.85;
}

@keyframes app-toast-router-down-pulse {

    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.12) inset,
            0 12px 40px rgba(194, 65, 12, 0.55),
            0 0 28px rgba(234, 88, 12, 0.45);
    }

    50% {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.18) inset,
            0 14px 48px rgba(194, 65, 12, 0.72),
            0 0 40px rgba(251, 146, 60, 0.55);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-toast-router-down {
        animation: none;
    }
}

.app-toast-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.app-toast-icon {
    font-size: 20px;
    margin-top: 1px;
    flex-shrink: 0;
}

.app-toast-body {
    flex: 1;
    min-width: 0;
}

.app-toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.55;
    color: inherit;
}

.app-toast-close:hover {
    opacity: 1;
}

.app-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(241, 245, 249, 0.72);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}

.app-loading-overlay .app-loading-inner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    animation: app-spin 0.75s linear infinite;
}

.app-loading-overlay .app-loading-text {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

@keyframes app-spin {
    to {
        transform: rotate(360deg);
    }
}

body.app-loading-active {
    cursor: wait;
}

/* DataTables processing row */
div.dataTables_wrapper .dataTables_processing {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
    font-weight: 700 !important;
    color: #475569 !important;
    padding: 12px 20px !important;
}

/* —— Wall Monitoring (wall_monitoring.php): fullscreen tanpa navbar (standby TV 24 jam) —— */
body.page-wall-monitoring-standalone .app-content-shell {
    padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    padding-left: max(8px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(8px, env(safe-area-inset-right, 0px)) !important;
}

body.page-wall-monitoring-standalone .app-content-inner {
    padding-top: 10px !important;
    max-width: none !important;
    width: 100%;
}

.wall-monitoring-standby-toprow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1150;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 6px;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px;
    padding-top: max(6px, env(safe-area-inset-top, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    /* Solid — gradient transparan membuat konten di bawah “tembus” terlihat */
    background: #f8fafc;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    pointer-events: none;
}

.wall-monitoring-standby-toprow>* {
    pointer-events: auto;
}

body.dark-mode .wall-monitoring-standby-toprow {
    background: #0f172a;
    border-bottom-color: rgba(51, 65, 85, 0.95);
    box-shadow: none;
}

.wall-monitoring-back-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
    text-decoration: none !important;
    color: #4338ca !important;
    border: 1.5px solid rgba(99, 102, 241, 0.45);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wall-monitoring-back-dashboard:hover {
    color: #312e81 !important;
    border-color: rgba(99, 102, 241, 0.75);
    background: #fff;
}

body.dark-mode .wall-monitoring-back-dashboard {
    color: #c7d2fe !important;
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: none;
}

body.dark-mode .wall-monitoring-back-dashboard:hover {
    color: #e0e7ff !important;
    border-color: rgba(165, 180, 252, 0.65);
    background: rgba(51, 65, 85, 0.95);
}

.wall-monitoring-standby-toprow__actions {
    gap: 8px;
}

.wall-monitoring-menu-fab {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    border: 1.5px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wall-monitoring-menu-fab:hover,
.wall-monitoring-menu-fab:focus {
    border-color: rgba(99, 102, 241, 0.55);
    color: #4338ca;
    background: #fff;
    outline: none;
}

.wall-monitoring-menu-fab:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.85);
    outline-offset: 2px;
}

body.dark-mode .wall-monitoring-menu-fab {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(71, 85, 105, 0.9);
    color: #cbd5e1;
}

body.dark-mode .wall-monitoring-menu-fab:hover,
body.dark-mode .wall-monitoring-menu-fab:focus {
    border-color: rgba(129, 140, 248, 0.55);
    color: #e0e7ff;
    background: rgba(51, 65, 85, 0.95);
}

.wall-monitoring-topnav-dropdown-menu {
    border-radius: 14px !important;
    min-width: 12.5rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.wall-monitoring-topnav-dropdown-menu .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    margin-left: 6px;
    margin-right: 6px;
    padding-left: 12px;
    padding-right: 12px;
    text-transform: none;
    letter-spacing: normal;
}

/* Collapsible Sidebar Styles */
.sidebar-text-hide,
.a-text-hide,
.sidebar-brand-text,
.app-desktop-left-sidebar__item span {
    transition: opacity 0.2s ease, width 0.2s ease;
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__inner {
    width: 100%;
    max-width: 100%;
}

body.app-desktop-left-sidebar--collapsed .sidebar-text-hide,
body.app-desktop-left-sidebar--collapsed .a-text-hide,
body.app-desktop-left-sidebar--collapsed .sidebar-brand-text,
body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__item span {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__head {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section-toggle {
    justify-content: center;
    margin: 0 0 2px 0;
    padding: 10px 0;
    gap: 0;
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section-toggle>i:first-of-type {
    width: auto;
    min-width: 1.25em;
    font-size: 18px;
    margin: 0 !important;
    display: inline-block !important;
    opacity: 1 !important;
    flex-shrink: 0;
}

/* Judul grup (Tools, Data, …): ikon harus tetap kontras saat aktif + sidebar lipat */
body:not(.dark-mode).app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section-toggle:not(.active)>i:first-of-type {
    color: #4b5563 !important;
}

body:not(.dark-mode).app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section-toggle.active>i:first-of-type {
    color: #312e81 !important;
}

body.dark-mode.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section-toggle:not(.active)>i:first-of-type {
    color: #d1d5db !important;
}

body.dark-mode.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section-toggle.active>i:first-of-type {
    color: #f9fafb !important;
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__item {
    justify-content: center;
    padding: 10px 0;
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__item i {
    width: auto;
    font-size: 18px;
    margin: 0 !important;
}

/* Mode rail: tetap izinkan Bootstrap collapse bekerja (group dropdown tetap bisa dibuka/ditutup saat collapsed) */
body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section>.collapse {
    margin-top: 2px;
}

/* Bila sub-menu perlu tampil (tanpa aturan di atas): jangan hapus latar pill aktif → ikon putih tetap terbaca */
body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item:not(.active),
body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub:not(.active) {
    background-image: none !important;
}

body:not(.dark-mode).app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item.active,
body:not(.dark-mode).app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
    color: #ffffff !important;
}

body.dark-mode.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__section .collapse>.app-desktop-left-sidebar__item.active,
body.dark-mode.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__item.app-desktop-left-sidebar__item--sub.active {
    background: #374151 !important;
    color: #ffffff !important;
}

body.app-desktop-left-sidebar--collapsed .sidebar-brand-wrap {
    justify-content: center;
    width: 100%;
}

body.app-desktop-left-sidebar--collapsed .sidebar-brand-wrap .app-brand-icon {
    margin-right: 0 !important;
}

.sidebar-collapse-btn {
    transition: transform 0.3s ease;
}

body.app-desktop-left-sidebar--collapsed .sidebar-collapse-btn .toggle-icon {
    transform: rotate(180deg);
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__brand-container {
    flex-direction: column;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 16px;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__head {
    justify-content: center;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__clock {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__head-actions {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__badges {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__since {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__profile {
    border-top: none !important;
    border-bottom: none !important;
    padding-top: 0;
    padding-bottom: 0;
    justify-content: center !important;
}

body.app-desktop-left-sidebar--collapsed .sidebar-profile-footer .isp-sidebar-quick-links {
    display: flex !important;
    width: 100%;
    padding: 2px 0 14px;
}

body.app-desktop-left-sidebar--collapsed .sidebar-profile-footer {
    width: calc(100% - 8px);
    margin: 0 auto 4px;
    padding: 14px 6px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: none !important;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(238, 242, 255, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.app-desktop-left-sidebar--collapsed .app-desktop-left-sidebar__footer {
    border-top: none !important;
    padding: 6px 4px 18px;
    background: transparent;
}

body.app-desktop-left-sidebar--collapsed .sidebar-profile-footer .isp-sidebar-user-card {
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex;
    justify-content: center;
}

body.app-desktop-left-sidebar--collapsed .sidebar-profile-footer .isp-sidebar-user-card__profile-main {
    flex: 0 0 auto !important;
    justify-content: center;
    margin: 0 auto;
}

body.app-desktop-left-sidebar--collapsed .sidebar-profile-footer .isp-sidebar-quick-link {
    width: 58px;
    height: 52px;
    border-radius: 18px;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__profile-main .profile-info {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-user-card__logout-btn {
    display: none !important;
}

body.app-desktop-left-sidebar--collapsed .isp-sidebar-avatar {
    margin: 0 !important;
}

body.app-desktop-left-sidebar--collapsed .sidebar-profile-footer {
    padding-bottom: 18px;
}

body.dark-mode.app-desktop-left-sidebar--collapsed .sidebar-profile-footer {
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Tooltip nama menu — sidebar collapsed (posisi fixed, tidak terpotong overflow scroll) */
.isp-sidebar-float-tip {
    position: fixed;
    z-index: 1090;
    max-width: min(260px, calc(100vw - 20px));
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    white-space: normal;
    word-break: break-word;
}

body.dark-mode .isp-sidebar-float-tip {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(100, 116, 139, 0.55);
}

/* Phone & tablet: overlay drawer */
@media (max-width: 991.98px) {
    .app-menu-overlay {
        background: rgba(15, 23, 42, 0.28);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .app-menu-panel .app-menu-head-bar {
        min-height: 0;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .app-menu-exit-btn {
        opacity: 0.92;
        text-decoration: none !important;
    }

    .app-menu-exit-btn:hover,
    .app-menu-exit-btn:focus {
        opacity: 1;
    }

    .app-menu-exit-btn i {
        font-size: 1.15rem;
    }
}

/* Sidebar API Dropdown Fixes */
.app-desktop-left-sidebar__scroll .dropdown.show .dropdown-menu.app-api-router-menu {
    position: static !important;
    float: none;
    transform: none !important;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    background: #1e293b;
    border-radius: 8px;
    border: none;
    box-shadow: none;
    margin-top: 8px;
    padding: 0;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item {
    border-bottom: 1px solid #334155;
    padding: 10px 14px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item:last-child {
    border-bottom: none;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item .d-flex.flex-column {
    flex-direction: row !important;
    align-items: center;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item h6.text-dark {
    color: #f8fafc !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    text-transform: uppercase;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item small.text-muted {
    display: none !important;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item .text-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item .text-right .text-muted {
    display: none !important;
}

/* Convert badge OK into text like the screenshot */
.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item .text-right .badge {
    background: transparent !important;
    font-size: 12px;
    padding: 0;
    font-weight: 700;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item .text-right .badge.badge-success {
    color: #cbd5e1 !important;
}

.app-desktop-left-sidebar__scroll .app-api-router-menu .app-api-router-item .text-right .badge.badge-danger {
    color: #ef4444 !important;
}

.hover-text-danger:hover {
    color: #ef4444 !important;
}

/* End of file */
body.dark-mode .wall-monitoring-topnav-dropdown-menu {
    background: #1e293b;
    border: 1px solid #334155 !important;
}

body.dark-mode .wall-monitoring-topnav-dropdown-menu .dropdown-item {
    color: #e2e8f0;
}

body.dark-mode .wall-monitoring-topnav-dropdown-menu .dropdown-item:hover,
body.dark-mode .wall-monitoring-topnav-dropdown-menu .dropdown-item:focus {
    background: rgba(51, 65, 85, 0.85);
    color: #fff;
}

body.dark-mode .wall-monitoring-topnav-dropdown-menu .dropdown-divider {
    border-top-color: #334155;
}

.wall-monitoring-theme-fab {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    border: 1.5px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wall-monitoring-theme-fab:hover {
    border-color: rgba(99, 102, 241, 0.55);
    color: #4338ca;
    background: #fff;
}

.wall-monitoring-theme-fab i {
    font-size: 17px;
}

body.dark-mode .wall-monitoring-theme-fab {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(71, 85, 105, 0.9);
    color: #cbd5e1;
}

body.dark-mode .wall-monitoring-theme-fab:hover {
    border-color: rgba(129, 140, 248, 0.55);
    color: #e2e8f0;
}

/* Tablet: bar atas Wall Monitoring bisa dua baris — naikkan offset agar tidak menutupi konten */
@media (min-width: 576px) and (max-width: 991.98px) {
    body.page-wall-monitoring-standalone .app-content-shell {
        padding-top: calc(128px + env(safe-area-inset-top, 0px)) !important;
    }
}

@media (max-width: 575.98px) {
    body.page-wall-monitoring-standalone .app-content-shell {
        /* Bar atas 2 baris (dashboard + jam/API + chip) — butuh ruang lebih dari tinggi gradient lama */
        padding-top: calc(132px + env(safe-area-inset-top, 0px)) !important;
    }

    .wall-monitoring-standby-toprow {
        align-items: flex-start;
        row-gap: 8px;
        padding: 8px 10px;
        padding-top: max(8px, env(safe-area-inset-top, 0px));
    }

    .wall-monitoring-standby-toprow__left {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }

    .wall-monitoring-back-dashboard {
        padding: 6px 10px;
        font-size: 11px;
        letter-spacing: 0.03em;
        white-space: nowrap;
    }

    .wall-monitoring-standby-toprow__right {
        order: 2;
        flex-shrink: 0;
        margin-left: auto;
    }

    .wall-monitoring-standby-toprow__center {
        order: 3;
        flex-basis: 100%;
        flex: 1 1 100%;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 6px 8px;
        padding-top: 6px;
        margin-top: 2px;
        border-top: 1px solid rgba(148, 163, 184, 0.28);
    }

    body.dark-mode .wall-monitoring-standby-toprow__center {
        border-top-color: rgba(51, 65, 85, 0.85);
    }

    .wall-monitoring-standby-toprow__clockwrap {
        flex-wrap: nowrap;
    }

    .wall-monitoring-board__clock {
        font-size: 0.8rem !important;
    }

    .wall-monitoring-board__clock-wib {
        font-size: 0.65rem !important;
    }

    .wall-monitoring-sync-meta {
        margin-left: auto;
    }

    .wall-monitoring-topnav-dropdown-menu {
        min-width: min(calc(100vw - 20px), 300px) !important;
        max-width: calc(100vw - 20px);
        border-radius: 12px !important;
        margin-top: 6px !important;
    }

    .wall-monitoring-topnav-dropdown-menu .dropdown-item {
        min-height: 46px;
        font-size: 0.875rem;
        margin-left: 4px;
        margin-right: 4px;
    }

    .wall-monitoring-menu-fab,
    .wall-monitoring-theme-fab {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }
}
