/* ===== Topbar — compact (70px → 54px) ===== */
#page-topbar {
    height: 54px !important;
}
.navbar-header {
    height: 54px !important;
}
/* Topbar brand-box matches topbar height */
.navbar-header .navbar-brand-box {
    height: 54px !important;
    line-height: 54px;
    padding: 0 1.25rem;
}
/* Sidebar brand-box spans topbar + content gap so logo aligns with page content start */
.app-menu .navbar-brand-box {
    height: calc(54px + 1.5rem) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1rem !important;
    position: relative !important;
}
/* Collapse toggle button stays at the right edge */
.app-menu .navbar-brand-box #vertical-hover {
    position: absolute !important;
    right: 0.75rem !important;
}
/* Logo-lg image: size up to fill the taller brand box */
.app-menu .navbar-brand-box .logo-lg img {
    height: 60px !important;
    max-width: 100% !important;
    width: auto !important;
    object-fit: contain !important;
}
.app-menu .navbar-brand-box .logo-sm img {
    height: 28px !important;
    width: auto !important;
}
/* Page content: replace padding-top:calc(70px+1.5rem) with 54px equivalent.
   For vertical layout there is NO margin-top — only padding-top. */
.page-content {
    padding-top: calc(54px + 1.5rem) !important;
    margin-top: 0 !important;
}

/* ===== Topbar — all header items fit inside 54px bar ===== */
/* .header-item defaults to height:70px in app.min.css — override */
.header-item {
    height: 54px !important;
}
.topbar-user .btn {
    padding: 0 8px;
    height: 54px;
    display: flex;
    align-items: center;
}
.header-profile-user {
    width: 32px !important;
    height: 32px !important;
}
.topbar-user .user-name-text {
    font-size: 13px;
}
.topbar-user .user-name-sub-text {
    font-size: 11px;
}
/* Icon buttons in topbar */
.btn-topbar {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px !important;
}
.btn-topbar i {
    font-size: 18px !important;
}
/* Session countdown timer */
#session-countdown {
    font-size: 13px !important;
}

/* ===== Footer — compact ===== */
.footer {
    padding: 10px calc(var(--bs-gutter-x, 1.5rem) / 2);
    font-size: 13px;
}

/* ===== Loader Container ===== */
#loading {
    position: fixed;
    inset: 0;
    background-color: rgba(243, 243, 249, 0.8); /* <- semi transparan */
    z-index: 99999;
    display: flex;
    /* display: none; */
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* ===== Loader SVG Style ===== */
#loading .ip {
    width: 10em;
    height: 5em;
}

#loading svg {
    width: 80px;
    height: 80px;
}

#loading .ip__track {
    stroke: #e0e0e0;
}

#loading .ip__worm1,
#loading .ip__worm2 {
    animation: worm1 2s linear infinite;
}

#loading .ip__worm2 {
    animation-name: worm2;
}

@keyframes worm1 {
    from {
        stroke-dashoffset: 0;
    }
    50% {
        animation-timing-function: steps(1);
        stroke-dashoffset: -358;
    }
    50.01% {
        animation-timing-function: linear;
        stroke-dashoffset: 358;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes worm2 {
    from {
        stroke-dashoffset: 358;
    }
    50% {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -358;
    }
}

/* ===== Sidebar nav — flush under brand-box, scroll fills remaining height minus footer widget ===== */
.app-menu .navbar-nav {
    padding-top: 4px !important;
    height: calc(100vh - 54px - 1.5rem - 148px) !important;
}

/* ===== Payroll sidebar — DANA-style light blue gradient, one continuous
   background across the logo box and the nav body (no separate header tone) ===== */
.app-menu.navbar-menu {
    border-right: 1px solid rgba(184, 226, 255, .2) !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(160, 222, 255, .38), transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(126, 203, 255, .32), transparent 46%),
        linear-gradient(165deg, #0c5fd6 0%, #1f83ef 45%, #5bbcff 100%) !important;
    background-color: #1470e0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 8px 0 32px rgba(10, 60, 130, .22), inset -1px 0 0 rgba(184, 226, 255, .14);
}

.app-menu.navbar-menu .navbar-brand-box {
    border-bottom: 1px solid rgba(184, 226, 255, .18);
    background: transparent !important;
    backdrop-filter: none;
}

.app-menu.navbar-menu #scrollbar,
.app-menu.navbar-menu #scrollbar .simplebar-content-wrapper {
    background: transparent !important;
}

.app-menu.navbar-menu .sidebar-background {
    opacity: 1 !important;
    background:
        radial-gradient(circle at 115% 18%, transparent 0 92px, rgba(255, 255, 255, .1) 93px 94px, transparent 95px),
        radial-gradient(circle at -25% 78%, transparent 0 110px, rgba(120, 225, 255, .08) 111px 112px, transparent 113px) !important;
    pointer-events: none;
}

.app-menu.navbar-menu .navbar-nav {
    position: relative;
    z-index: 2;
    padding-right: 8px !important;
    padding-left: 8px !important;
}

.app-menu.navbar-menu .navbar-nav .nav-link {
    margin: 2px 0;
    border: 1px solid transparent;
    border-radius: 11px;
    color: rgba(228, 244, 255, .76) !important;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.app-menu.navbar-menu .navbar-nav .nav-link i {
    color: rgba(190, 228, 255, .68) !important;
    transition: color .18s ease;
}

.app-menu.navbar-menu .navbar-nav .nav-link:hover {
    color: #fff !important;
    border-color: rgba(157, 221, 255, .16);
    background: rgba(157, 221, 255, .12) !important;
    transform: translateX(2px);
}

.app-menu.navbar-menu .navbar-nav .nav-link:hover i {
    color: #8fe3ff !important;
}

.app-menu.navbar-menu .navbar-nav > .nav-item > .nav-link.active,
.app-menu.navbar-menu .navbar-nav > .nav-item > .nav-link[aria-expanded="true"] {
    color: #fff !important;
    border-color: rgba(157, 221, 255, .22);
    background: linear-gradient(105deg, rgba(255, 255, 255, .16), rgba(89, 200, 255, .18)) !important;
    box-shadow: 0 9px 22px rgba(10, 35, 90, .2), 0 0 0 1px rgba(120, 220, 255, .08) inset;
}

.app-menu.navbar-menu .navbar-nav > .nav-item > .nav-link.active i,
.app-menu.navbar-menu .navbar-nav > .nav-item > .nav-link[aria-expanded="true"] i {
    color: #9fe8ff !important;
}

.app-menu.navbar-menu .menu-dropdown {
    margin: 3px 0 5px 13px;
    padding: 3px 0 3px 8px;
    border-left: 1px solid rgba(157, 221, 255, .2);
}

.app-menu.navbar-menu .menu-dropdown .nav-link {
    margin: 1px 0;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    color: rgba(220, 240, 255, .66) !important;
}

.app-menu.navbar-menu .menu-dropdown .nav-link::before {
    color: rgba(180, 225, 255, .4) !important;
}

.app-menu.navbar-menu .menu-dropdown .nav-link:hover,
.app-menu.navbar-menu .menu-dropdown .nav-link.active {
    color: #fff !important;
    background: rgba(157, 221, 255, .1) !important;
}

.app-menu.navbar-menu .menu-dropdown .nav-link.active {
    color: #9fe8ff !important;
    font-weight: 600;
}

.app-menu.navbar-menu #sidebar-loading {
    color: rgba(228, 244, 255, .74) !important;
}

.app-menu.navbar-menu #vertical-hover {
    color: rgba(228, 244, 255, .74) !important;
}

/* ===== Sidebar footer widget — widget-img.png icon, scaled to sidebar width ===== */
.app-menu.navbar-menu .sidebar-footer-widget {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 148px;
    padding: 10px calc(1.5rem - 20px) 10px;
    background: transparent;
    pointer-events: none;
}

.app-menu.navbar-menu .sidebar-footer-widget::before {
    position: absolute;
    z-index: -1;
    width: 170px;
    height: 170px;
    content: "";
    filter: blur(10px);
    background: radial-gradient(circle, rgba(94, 210, 255, .32), transparent 70%);
}

.app-menu.navbar-menu .sidebar-footer-widget-img {
    max-width: 100%;
    height: auto;
    max-height: 128px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(6, 22, 62, .4));
    opacity: .95;
}

[data-sidebar-size="sm"] .app-menu.navbar-menu .sidebar-footer-widget {
    display: none;
}

/* ===== Topbar notification tabs ===== */
#notification-payroll-tab,
#notification-giro-tab {
    margin-bottom: 0;
    border: 0;
    color: rgba(255, 255, 255, .72) !important;
    background: transparent;
}

#notification-payroll-tab.active,
#notification-giro-tab.active {
    color: #405896 !important;
    background: #fff !important;
}
