:root {
    --lpx-theme-light-bg: url('/LeptonX/images/login-pages/login-bg-img-light.svg');
    --lpx-theme-dim-bg: url('/LeptonX/images/login-pages/login-bg-img-dim.svg');
    --lpx-theme-dark-bg: url('/LeptonX/images/login-pages/login-bg-img-dark.svg');
}

:root {
    --lpx-logo: url('/images/logo/leptonx/logo-light.png');
    --lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

.lpx-theme-dark,
.lpx-theme-dim {
    --lpx-logo: url('/images/logo/leptonx/logo-dark.png');
    --lpx-logo-icon: url('/images/logo/leptonx/logo-dark-thumbnail.png');
}

body {
    --bs-body-font-family: Open Sans, sans-serif;
    --bs-card-color: #555555;
    --bs-link-color: #DA51F2;
}

/*.btn {
    --bs-btn-border-width: 0px;
}*/

.dashboard-card-header {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

@media only screen and (min-width: 480px) {
    .lpx-content-container {
        margin-right: 0;
    }
}

.page-header-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header {
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
}

.page-button {
    min-width: 100px;
    height: 40px;
    border-radius: 5px;
    text-align: center;
    line-height: 0;
    flex-shrink: 0;
}

.item-header {
    font-size: 1.35em;
}

.item-description {
    font-size: 0.9em;
    font-weight: 200;
    margin-bottom: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.modal-label {
    font-weight: 200;
    font-size: 1.2em;
}

.centered-notice {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
}

.tooltip-documentation {
    padding: 0;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    color: transparent !important;
}

.btn-loading > * {
    visibility: hidden;
}

/* Spinner overlay */
.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: -0.55rem;
    margin-left: -0.55rem;
    border-radius: 50%;
    border: 2px solid var(--btn-spinner-color, #fff);
    border-top-color: transparent;
    border-right-color: transparent;
    animation: armada-btn-spinner 0.6s linear infinite;
}

@keyframes armada-btn-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Shepherd.js Tour Customization */

.pulsating-glow {
    min-width: 25px;
    position: relative;
    border: 2px solid #DA51F2;
    border-radius: 8px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(218, 81, 242, 0.5),
                    0 0 10px rgba(218, 81, 242, 0.4),
                    0 0 15px rgba(218, 81, 242, 0.3),
                    0 0 20px rgba(218, 81, 242, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(218, 81, 242, 0.8),
                    0 0 20px rgba(218, 81, 242, 0.6),
                    0 0 30px rgba(218, 81, 242, 0.4),
                    0 0 40px rgba(218, 81, 242, 0.3);
    }
}

.shepherd-button:not(:disabled):hover {
    background: #484b5d !important;
    color: #ffffff !important;
}

.shepherd-button {
    background: #DA51F2 !important;
    border: 0 !important;
    border-radius: 3px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    margin-right: 0.5rem !important;
    margin-left: 0.5rem !important;
    width: 100%;
    padding: .5rem 1.5rem !important;
    transition: all .5s ease !important;
}

.shepherd-welcome-step .shepherd-footer {
    padding: 1rem !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: .5rem !important;
    border: none !important;
    background: none !important;
    border-radius: 9px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    flex-direction: column-reverse !important;
}

.shepherd-footer .shepherd-button:last-child {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
}

button.btn.btn-secondary.shepherd-button {
    background: none !important;
    color: #333333 !important;
    font-size: .9em !important;
}

button.btn.btn-secondary.shepherd-button:hover {
    color: #6c6f82 !important;
}

.shepherd-theme-custom .shepherd-text p {
    margin-bottom: .8rem !important;
    color: #555555 !important;
}

.shepherd-theme-custom .shepherd-text ul,
.shepherd-theme-custom .shepherd-text ol {
    color: #555555 !important;
}

.shepherd-theme-custom .shepherd-text h3 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    font-family: Open Sans, sans-serif !important;
    color: #333333 !important;
    line-height: 1.1em !important;
}

.shepherd-theme-custom .shepherd-text {
    padding: 3rem !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    background: #ffffff !important;
    color: #d3d3d3 !important;
    border-radius: 12px 12px 0 0 !important;
}

.shepherd-content {
    border-radius: 12px !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
}

.shepherd-element {
    border-radius: 12px !important;
    max-width: 400px !important;
    box-shadow: none !important;
    outline: none !important;
}

.shepherd-element:focus,
.shepherd-element:focus-visible,
.shepherd-element:focus-within,
.shepherd-content:focus,
.shepherd-content:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.shepherd-theme-custom .shepherd-footer {
    padding: 1rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: .5rem !important;
    border: none !important;
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
}

.ct-small-note-type {
    font-size: .9em;
    font-style: italic;
    line-height: 1.2em;
}

.shepherd-tour-icon {
    display: block;
    margin: 0 auto 1rem auto;
    max-width: 60px;
    height: auto;
}

.shepherd-tour-icon-flipped {
    transform: scaleY(-1);
}

/* Bootstrap modal backdrop is at z-index: 1040 */
/* Bootstrap modal is at z-index: 1050 */
/* Set Shepherd below Bootstrap modals so modals can be interacted with */
.shepherd-modal-overlay-container {
    z-index: 1030 !important;
}

.shepherd-modal-is-visible {
    opacity: 0;
}

.shepherd-element {
    z-index: 1040 !important;
}

/* Ensure Bootstrap modals and their backdrops appear above Shepherd */
.modal-backdrop {
    z-index: 1055 !important;
}

.modal-body {
    padding-bottom: 1.5em !important
}

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

/* Ensure draggable elements appear above Shepherd tour steps */
.ui-draggable-dragging {
    z-index: 1065 !important;
}

/* Banner-style tour steps - fixed to bottom, allows page interaction */
.shepherd-element.shepherd-banner-step {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 12px 12px 0 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
    margin: 0 !important;
}

.shepherd-banner-step .shepherd-arrow {
    display: none !important;
}

.shepherd-banner-step .shepherd-content {
    border-radius: 12px 12px 0 0 !important;
}

.shepherd-banner-step .shepherd-text {
    padding: 1.25rem 2rem 0.25rem !important;
    border-radius: 12px 12px 0 0 !important;
}

.shepherd-banner-step .shepherd-text h3 {
    font-size: 1.3rem !important;
    margin-bottom: 0.3rem !important;
}

.shepherd-banner-step .shepherd-text p {
    margin-bottom: 0.4rem !important;
}

.shepherd-banner-step .shepherd-text .ct-small-note-type {
    margin-bottom: 0.2rem !important;
}

.shepherd-banner-step .shepherd-footer {
    padding: 0.5rem 2rem 1rem !important;
    border-radius: 0 !important;
}

.shepherd-banner-step .shepherd-tour-icon {
    display: none;
}

/* Disable overlay pointer events for banner steps */
.shepherd-modal-overlay-container.shepherd-banner-active,
.shepherd-modal-overlay-container.shepherd-banner-active path {
    pointer-events: none !important;
}

/* Armada brand styles */
.btn-secondary {
    --bs-btn-bg: #484b5d !important;
    --bs-btn-hover-bg: #6c6f82 !important;
    border: none !important;
}

.btn-primary {
    --bs-btn-bg: #DA51F2 !important;
    --bs-btn-hover-bg: #484b5d !important;
    border: none !important;
}

.alert-warning {
    background: #da51f238 !important;
    border: 1px solid #DA51F2 !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.4) !important;
}

/* ── Custom Button System — Light Theme ── */
.lpx-theme-light .ct-button-primary {
    color: #ffffff !important;
    background: #484b5d !important;
    border: 1px solid transparent !important;
}
.lpx-theme-light .ct-button-flat {
    background: none !important;
    border: 1px solid #484b5d !important;
    color: #484b5d !important;
}
.lpx-theme-light .ct-button-secondary {
    background: none !important;
    border: 1px solid #484b5d !important;
    color: #484b5d !important;
}
.lpx-theme-light .ct-button-alert {
    color: #ffffff !important;
    background: #DA51F2 !important;
    border: 1px solid transparent !important;
}
.lpx-theme-light .ct-button-danger {
    color: #ffffff !important;
    background: #c41b1b !important;
    border: 1px solid transparent !important;
}
.lpx-theme-light .ct-button-large {
    text-decoration: none;
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
    border-radius: 0.5rem !important;
    padding: 0.775rem 1.45rem;
    font-size: 0.875rem;
    line-height: .8em !important;
    height: auto !important;
    white-space: nowrap !important;
    width: auto !important;
    font-weight: 600;
}
.lpx-theme-light .ct-button-small {
    text-decoration: none;
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
    border-radius: 0.5rem !important;
    padding: 0.575rem .8rem !important;
    font-size: 0.725rem;
    line-height: .8em !important;
    height: auto !important;
    white-space: nowrap !important;
    width: auto !important;
    font-weight: 600;
}
.lpx-theme-light .ct-button-large:hover,
.lpx-theme-light .ct-button-large:focus {
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}
.lpx-theme-light .ct-button-small:hover,
.lpx-theme-light .ct-button-small:focus {
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}
.lpx-theme-light .ct-button-large:disabled,
.lpx-theme-light .ct-button-small:disabled {
    opacity: .5 !important;
    background: #484b5d !important;
    pointer-events: none !important;
    color: #e9e9e9 !important;
}
.lpx-theme-light .ct-button-flat:hover {
    color: #ffffff !important;
    background: #484b5d !important;
    box-shadow: none !important;
    transform: none !important;
}
.lpx-theme-light .ct-button-secondary:hover {
    color: #ffffff !important;
    background: #484b5d !important;
    box-shadow: none !important;
    transform: none !important;
}
.lpx-theme-light .ct-button-dashed {
    border-style: dashed !important;
}
.lpx-theme-light .form-check-input:checked {
    border-color: #DA51F2 !important;
    background-color: #DA51F2 !important;
}
.lpx-theme-light .lpx-nav-menu .lpx-menu-item-link.selected .lpx-menu-item-icon,
.lpx-theme-light .lpx-nav-menu .lpx-menu-item-link.selected .dd-icon,
.lpx-theme-light .lpx-nav-menu .lpx-menu-item-link.expanded .lpx-menu-item-icon,
.lpx-theme-light .lpx-nav-menu .lpx-menu-item-link.expanded .dd-icon {
    color: #DA51F2 !important;
    opacity: 1;
}

/* ── Custom Button System — Dark Theme ── */
.lpx-theme-dark .ct-button-primary {
    color: #1a1a1a !important;
    background: #e0e0e0 !important;
    border: 1px solid transparent !important;
}
.lpx-theme-dark .ct-button-primary:hover {
    background: #f0f0f0 !important;
}
.lpx-theme-dark .ct-button-flat {
    background: none !important;
    border: 1px solid #a0a3b1 !important;
    color: #a0a3b1 !important;
}
.lpx-theme-dark .ct-button-secondary {
    background: none !important;
    border: 1px solid #a0a3b1 !important;
    color: #a0a3b1 !important;
}
.lpx-theme-dark .ct-button-alert {
    color: #ffffff !important;
    background: #DA51F2 !important;
    border: 1px solid transparent !important;
}
.lpx-theme-dark .ct-button-danger {
    color: #ffffff !important;
    background: #c41b1b !important;
    border: 1px solid transparent !important;
}
.lpx-theme-dark .ct-button-large {
    text-decoration: none;
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
    border-radius: 0.5rem !important;
    padding: 0.775rem 1.45rem;
    font-size: 0.875rem;
    line-height: .8em !important;
    height: auto !important;
    white-space: nowrap !important;
    width: auto !important;
    font-weight: 600;
}
.lpx-theme-dark .ct-button-small {
    text-decoration: none;
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
    border-radius: 0.5rem !important;
    padding: 0.575rem .8rem !important;
    font-size: 0.725rem;
    line-height: .8em !important;
    height: auto !important;
    white-space: nowrap !important;
    width: auto !important;
    font-weight: 600;
}
.lpx-theme-dark .ct-button-large:hover,
.lpx-theme-dark .ct-button-large:focus {
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}
.lpx-theme-dark .ct-button-small:hover,
.lpx-theme-dark .ct-button-small:focus {
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
    transition: box-shadow 0.45s cubic-bezier(0.25, 1, 0.33, 1), transform 0.45s cubic-bezier(0.25, 1, 0.33, 1);
}
.lpx-theme-dark .ct-button-large:disabled,
.lpx-theme-dark .ct-button-small:disabled {
    opacity: .5 !important;
    background: #3a3a3a !important;
    pointer-events: none !important;
    color: #888888 !important;
}
.lpx-theme-dark .ct-button-flat:hover {
    color: #ffffff !important;
    background: #a0a3b1 !important;
    box-shadow: none !important;
    transform: none !important;
}
.lpx-theme-dark .ct-button-secondary:hover {
    color: #ffffff !important;
    background: #a0a3b1 !important;
    box-shadow: none !important;
    transform: none !important;
}
.lpx-theme-dark .ct-button-dashed {
    border-style: dashed !important;
}
.lpx-theme-dark .form-check-input:checked {
    border-color: #DA51F2 !important;
    background-color: #DA51F2 !important;
}
.lpx-theme-dark .lpx-nav-menu .lpx-menu-item-link.selected .lpx-menu-item-icon,
.lpx-theme-dark .lpx-nav-menu .lpx-menu-item-link.selected .dd-icon,
.lpx-theme-dark .lpx-nav-menu .lpx-menu-item-link.expanded .lpx-menu-item-icon,
.lpx-theme-dark .lpx-nav-menu .lpx-menu-item-link.expanded .dd-icon {
    color: #DA51F2 !important;
    opacity: 1;
}

.w-100 {
    width: 100% !important;
}

/* Knowledge Base — shared by KB page and help drawer */
.kb-markdown-body h1, .kb-markdown-body h2, .kb-markdown-body h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.kb-markdown-body h1 { font-size: 1.5rem; }
.kb-markdown-body h2 {
    font-size: 1.25rem;
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.25rem;
}
.kb-markdown-body h3 { font-size: 1.1rem; }
.kb-markdown-body p { margin-bottom: 0.75rem; }
.kb-markdown-body code {
    font-size: 0.875em;
    background: var(--bs-secondary-bg);
    padding: 0.1em 0.3em;
    border-radius: 3px;
}
.kb-markdown-body pre code { background: transparent; padding: 0; }
.kb-markdown-body pre {
    background: var(--bs-secondary-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}
.kb-markdown-body ul, .kb-markdown-body ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}
.kb-markdown-body a { color: var(--bs-link-color); }

/* KB nav */
.kb-doc-link {
    display: block;
    color: var(--bs-body-color);
    font-size: 0.9rem;
    padding: 0.15rem 0;
    text-decoration: none;
}
.kb-doc-link:hover, .kb-doc-link.kb-active {
    color: var(--bs-link-color);
    font-weight: 500;
}
.kb-category-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    font-weight: 600;
}

/* Help drawer two-panel layout */
#helpDrawer .hd-offcanvas-body {
    padding: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}
.hd-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.hd-panel-scroll {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* ── Mobile responsive ── */

/* Hide LeptonX mobile navbar globally — replaced by custom mobile menu */
.lpx-mobile-navbar {
    display: none !important;
}

.lpx-mobile-menu {
    bottom: 0px !important;
    height: 100% !important;
}

/* Floating mobile menu button — hidden on desktop */
#armada-mobile-menu-btn {
    display: none;
}

/* Mobile menu injected footer (theme toggle + logout).
   Hidden by default; shown only when the mobile menu is open via the adjacent
   sibling selector. position:fixed keeps it pinned to the bottom of the screen
   regardless of scroll position inside the menu. */
#armada-mobile-menu-footer {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 16px;
    z-index: 1050;
    background: var(--lpx-navbar-color, var(--bs-body-bg));
    padding: 10px 14px;
    width: fit-content;
}

.lpx-mobile-menu:not(.hidden) + #armada-mobile-menu-footer {
    display: block;
}

/* Nudge the mobile menu's bottom padding so the last nav item clears the footer pill */
.lpx-mobile-menu {
    padding-bottom: 70px !important;
}

@media (max-width: 1199px) {
    #main {
        padding: 0 !important;
    }
    .lpx-content {
        padding-top: 10px !important;
    }
    /* Hide sidebar; override LeptonX's hover-trigger mode at 768–1199px */
    .lpx-sidebar-container {
        display: none !important;
    }
    /* Remove the 72px left margin LeptonX applies for the collapsed sidebar */
    .lpx-content-container {
        height: 100% !important;
        margin-left: 0 !important;
    }
    /* Make the mobile menu work in the 768–1199px range where LeptonX
       normally hides it (it uses display:none via min-width:768px rule) */
    .lpx-mobile-menu:not(.hidden) {
        display: block !important;
    }

    /* Floating mobile menu button */
    #armada-mobile-menu-btn {
        display: block;
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 1049;
        width: 64px;
        height: 64px;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
    }
    #armada-mobile-menu-btn img {
        width: 100%;
        height: 100%;
        display: block;
    }

}