.livewire-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0.9;
    background-color: white;
}

.livewire-table-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0.9;
}

.navbar-nav .show>.nav-link,
.navbar-nav .nav-link.active {
    color: green !important;
}

/*------------Loading Style--------------- */
.lds-roller {
    display: inline-block;
    width: 80px;
    height: 80px;
    position: fixed;
    top: 40%;
    left: 47%;
    z-index: 100000;
}

.lds-roller div {
    animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transform-origin: 40px 40px;
}

.lds-roller div:after {
    content: " ";
    display: block;
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28a745;
    margin: -4px 0 0 -4px;
}

.lds-roller div:nth-child(1) {
    animation-delay: -0.036s;
}

.lds-roller div:nth-child(1):after {
    top: 63px;
    left: 63px;
}

.lds-roller div:nth-child(2) {
    animation-delay: -0.072s;
}

.lds-roller div:nth-child(2):after {
    top: 68px;
    left: 56px;
}

.lds-roller div:nth-child(3) {
    animation-delay: -0.108s;
}

.lds-roller div:nth-child(3):after {
    top: 71px;
    left: 48px;
}

.lds-roller div:nth-child(4) {
    animation-delay: -0.144s;
}

.lds-roller div:nth-child(4):after {
    top: 72px;
    left: 40px;
}

.lds-roller div:nth-child(5) {
    animation-delay: -0.18s;
}

.lds-roller div:nth-child(5):after {
    top: 71px;
    left: 32px;
}

.lds-roller div:nth-child(6) {
    animation-delay: -0.216s;
}

.lds-roller div:nth-child(6):after {
    top: 68px;
    left: 24px;
}

.lds-roller div:nth-child(7) {
    animation-delay: -0.252s;
}

.lds-roller div:nth-child(7):after {
    top: 63px;
    left: 17px;
}

.lds-roller div:nth-child(8) {
    animation-delay: -0.288s;
}

.lds-roller div:nth-child(8):after {
    top: 56px;
    left: 12px;
}

@keyframes lds-roller {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.modal-backdrop {
    background-color: #0000005c !important;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.img-preview {
    width: 100px;
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
}

input[type="text"][disabled] {
    /* background-color:#EAECEE; */
    color: #778591;;
    cursor: not-allowed !important;
}

.hidden {
    display: none;
}

.bg-dark-green {
    background: #00b44e61 !important;
}

.bg-light-green {
    background: green !important;
}

.bg-light-red {
    background: #e8090985 !important;
}

.bg-light-yellow {
    background: #f7e867fb !important;
}

.bg-light-blue {
    background: #67b8eee1 !important;
}

.bg-light-pink {
    background: #e20bd49a !important;
}

.gap-4px {
    gap: 4px !important;
}

/* ========== Professional Sidebar (sidebar-pro) ========== */
.main-sidebar.sidebar-pro {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.main-sidebar.sidebar-pro .brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 1rem 1.25rem !important;
    transition: background 0.2s ease;
}

.main-sidebar.sidebar-pro .brand-link:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.main-sidebar.sidebar-pro .brand-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-sidebar.sidebar-pro .brand-image {
    height: 48px !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.main-sidebar.sidebar-pro .user-panel {
    padding: 0.875rem 1rem !important;
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.main-sidebar.sidebar-pro .user-panel.user-panel-compact {
    padding: 0.5rem 0.75rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    flex-direction: column;
    align-items: stretch;
}

.main-sidebar.sidebar-pro .user-panel.user-panel-compact > .d-flex {
    margin-bottom: 0.5rem;
}

.main-sidebar.sidebar-pro .user-panel .user-panel-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-sidebar.sidebar-pro .user-panel .user-panel-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.main-sidebar.sidebar-pro .user-panel .user-panel-logout i {
    font-size: 0.7rem;
}

.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel .user-panel-logout span {
    display: none;
}

.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel .user-panel-logout {
    justify-content: center;
}

.main-sidebar.sidebar-pro .user-panel .user-initial {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #93c5fd;
    margin-right: 0.625rem;
}

.main-sidebar.sidebar-pro .user-avatar {
    width: 40px !important;
    height: 40px !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
}

.main-sidebar.sidebar-pro .user-name {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
    letter-spacing: -0.01em;
}

.main-sidebar.sidebar-pro .user-name:hover {
    color: #fff !important;
}

.main-sidebar.sidebar-pro .user-role {
    font-size: 0.7rem !important;
    display: block;
    margin-top: 0.15rem;
}

.main-sidebar.sidebar-pro .sidebar > nav {
    padding-bottom: 1.25rem !important;
}

/* Nav items */
.main-sidebar.sidebar-pro .nav-sidebar .nav-item {
    margin: 0 0.5rem 0 0 !important;
}

.main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link {
    border-radius: 0.375rem !important;
    padding: 0.4rem 0.875rem 0.4rem 0.75rem !important;
    margin-bottom: 0;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
}

.main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    border-radius: 0 2px 2px 0;
    background: #3b82f6;
    transition: height 0.2s ease;
}

.main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f1f5f9 !important;
}

.main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link:hover::before {
    height: 60%;
}

.main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
}

.main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link.active::before {
    height: 70%;
}

.main-sidebar.sidebar-pro .nav-sidebar .nav-icon {
    width: 1.5rem !important;
    margin-right: 0.625rem !important;
    font-size: 0.95rem !important;
    opacity: 0.9;
}

.main-sidebar.sidebar-pro .nav-sidebar .nav-link p {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
}

.main-sidebar.sidebar-pro .nav-sidebar .nav-link .right {
    font-size: 0.7rem !important;
    transition: transform 0.2s ease;
}

.main-sidebar.sidebar-pro .nav-sidebar .nav-item.menu-open > .nav-link .right {
    transform: rotate(-90deg);
}

/* Nav headers - reduce spacing */
.main-sidebar.sidebar-pro .nav-sidebar .nav-header {
    padding-top: 0.5rem !important;
    padding-bottom: 0.25rem !important;
}

.main-sidebar.sidebar-pro .nav-sidebar .nav-header:not(:first-of-type) {
    padding-top: 0.625rem !important;
}

/* Treeview (nested menu) */
.main-sidebar.sidebar-pro .nav-treeview {
    padding: 0.15rem 0 0.15rem 0.5rem !important;
    margin-left: 0.5rem !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.main-sidebar.sidebar-pro .nav-treeview .nav-item .nav-link {
    padding: 0.3rem 0.65rem 0.3rem 1.75rem !important;
    font-size: 0.8125rem !important;
    border-radius: 0.25rem !important;
}

.main-sidebar.sidebar-pro .nav-treeview .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.main-sidebar.sidebar-pro .nav-treeview .nav-item .nav-link.active {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
}

.main-sidebar.sidebar-pro .nav-treeview .nav-icon {
    width: 0.5rem !important;
    font-size: 0.4rem !important;
}

/* Collapsed sidebar (sidebar-mini) */
@media (min-width: 992px) {
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .brand-link {
        padding: 0.75rem !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .brand-image {
        height: 36px !important;
    }

    /* User panel - hide text, show only avatar + logout icon */
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel .info,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel .user-role {
        display: none !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel.user-panel-compact {
        padding: 0.4rem 0.5rem !important;
        margin-left: 0.35rem !important;
        margin-right: 0.35rem !important;
        margin-bottom: 0.4rem !important;
        text-align: center;
        align-items: center;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel.user-panel-compact > .d-flex {
        justify-content: center;
        margin-bottom: 0.35rem;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel .user-initial {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.9rem;
        margin-right: 0;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .user-panel .user-panel-logout {
        padding: 0.3rem;
        min-height: 32px;
    }

    /* Restore full layout on sidebar hover (expand) */
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro:not(.sidebar-no-expand):hover .user-panel.user-panel-compact > .d-flex,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro.sidebar-focused .user-panel.user-panel-compact > .d-flex {
        justify-content: flex-start;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro:not(.sidebar-no-expand):hover .user-panel .user-initial,
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro.sidebar-focused .user-panel .user-initial {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
        margin-right: 0.625rem;
    }

    /* Nav items - ensure proper fit when collapsed */
    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .nav-sidebar .nav-item {
        margin: 0 0.25rem 0 0 !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .nav-sidebar > .nav-item > .nav-link {
        padding: 0.5rem !important;
        justify-content: center;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar.sidebar-pro .nav-sidebar .nav-icon {
        margin-right: 0 !important;
    }
}
