.wrap .card {
    background: white;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 20px;
    margin-bottom: 20px;
}

.wrap .card h2 {
    margin-top: 0;
}

.wrap .widefat {
    border: none;
    width: 100%;
}

.wrap .widefat th {
    font-weight: 600;
}

.memory-bar {
    width: 100%;
    background: #e0e0e0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.memory-bar-fill {
    height: 100%;
    text-align: center;
    line-height: 30px;
    color: black;
    background: #76c7c0;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card-row {
    display: flex;
    width: 100%;
    gap: 20px;
}



.card-memory-usage {
    flex: 0 0 calc(70% - 10px);
}

.card-plugins {
    width: 100%;
    min-width:100%;
}



.plugin-disabled {
    color: #999;
}


.memory-result {
    margin-left: 10px;
    font-weight: bold;
    color: #0073aa;
}


@media (max-width: 768px) {
    .card-row {
        flex-direction: column;
    }
    .card-system-info,
    .card-memory-usage {
        width: 100%;
    }
}











.card-system-info,
.card-memory-usage,
.card-memory-history {
    flex: 1;
}



#memory-history-list {
    max-height: 200px;
    overflow-y: auto;
}



.memory-change {
    font-size: 0.9em;
    color: #666;
}






.plugin-list {
    list-style-type: none;
    padding: 0;
}


.plugin-list li {
    position: relative;
    padding-bottom: 25px; /* Increase this value if you need more space for history bars */
}

.plugin-active {
    background-color: #e6ffe6;
}

.plugin-inactive {
    background-color: #ffe6e6;
}

.plugin-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-right: 10px;
}

.plugin-name {
    margin-right: 10px;
    min-width: 200px;
}

.plugin-active .plugin-name {
    color: #006400;
}

.plugin-inactive .plugin-name {
    color: #8b0000;
}

.plugin-memory-bar {
    flex-grow: 1;
    height: 20px;
    /* background-color: #f0f0f0; */
    border-radius: 10px;
    overflow: hidden;
    margin-right: 10px;
    max-width:80%;
}

.plugin-memory-fill {
    height: 100%;
    width: 0;
    background-color: #4CAF50;
    transition: width 0.5s ease-in-out;
}

.plugin-memory-text {
    display: inline-block;
    line-height: 20px;
    color: white;
    padding: 0 5px;
    font-size: 12px;
}

.plugin-actions {
    float:right;
	position:relative;
    min-width: 100px;
    text-align: right;
    padding-right:6px;
    top:-12px;
    z-index:99;
}

.toggle-plugin {
    width: 100px;
}



/* ====================== */



.plugin-list .memory-usage-plugin {
    opacity: 0.7;
    background-color: #f0f0f0;
}

.plugin-list .memory-usage-plugin .plugin-name {
    color: #666;
}

.plugin-list .memory-usage-plugin .button {
    cursor: not-allowed;
}



.plugin-history-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width:80% !important;
}

.plugin-history-bar {
    height: 4px;
    margin-bottom: 1px;
    border-radius: 2px;
    max-width:80%;
}


.avg-memory {
    font-size: 0.9em;
    background-color: #ffffcc;
    border: 1px solid #ffcc00;
    border-radius: 3px;
    padding: 2px 5px;
    margin-left: 5px;
    display: inline-block;
}

#wp-admin-bar-wpmem_memory_usage .ab-item {
    color: #fff !important;
    background-color: #555 !important;
}




.wpmem-version {
    font-size: 0.7em;
    color: #666;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 400;
    background: #f3f4f5;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #dcdcde;
}

.pluginmemoryusage-system-info-line {
    line-height: 1.5;
    margin-top: 2px;
    margin-bottom: 2px;
    padding: 0;
}









.pluginmemoryusage_version-unknown {
    background: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
    display: inline-block;
}


.pluginmemoryusage_version-latest {
    background: #eaffea;
    color: #006400;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
    display: inline-block;
}

.pluginmemoryusage_version-outdated {
    background: #fff8e1;
    color: #b8860b;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
    display: inline-block;
}




/* Admin Bar Memory Status Colors - High Contrast for Dark Background */
#wp-admin-bar-wpmem_memory_usage .wpmem-good {
    color: #7FFF00 !important; /* Chartreuse - super bright and visible */
    font-weight: 400;
}


#wp-admin-bar-wpmem_memory_usage .wpmem-moderate {
    color: #ffeb3b !important; /* Bright yellow */
    font-weight: 400;
}

#wp-admin-bar-wpmem_memory_usage .wpmem-warning {
    color: #ff9800 !important; /* Bright orange */
    font-weight: 400;
}

#wp-admin-bar-wpmem_memory_usage .wpmem-critical {
    color: #ff7777 !important; /* Salmon pink red */
    font-weight: 600;
    animation: wpmem-pulse 2s infinite;
}


@keyframes wpmem-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}







.pmusage-mini-bar {
    width: 100%;
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 2px 0 8px 0;
}

.pmusage-mini-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
}

.pmusage-bar-good     { background-color: #46b450; }
.pmusage-bar-moderate { background-color: #ffb900; }
.pmusage-bar-warning  { background-color: #ff8c00; }
.pmusage-bar-critical { background-color: #dc3232; }
