/* ===== 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 ===== */
.app-menu .navbar-nav {
    padding-top: 4px !important;
    height: calc(100vh - 54px - 1.5rem) !important;
}
