/*
 * Mamba Performance - Admin Theme
 * Adaptive Light/Dark Mode
 */

/* ============================================
   DESIGN TOKENS (CSS Variables)
   ============================================ */
:root {
    /* --- LIGHT THEME --- */
    --mamba-bg: #f8fafc;
    --mamba-sidebar: #ffffff;
    --mamba-card: #ffffff;
    --mamba-card-hover: #f1f5f9;
    --mamba-border: #e2e8f0;

    --mamba-primary: #10b981;
    --mamba-primary-dark: #059669;
    --mamba-primary-glow: rgba(16, 185, 129, 0.2);

    --mamba-danger: #ef4444;
    --mamba-warning: #f59e0b;
    --mamba-info: #3b82f6;

    --mamba-text-main: #0f172a;
    --mamba-text-muted: #64748b;
    
    /* Legacy variable used in inline styles across tabs */
    --mamba-dark: #0f172a;

    /* Typography - Unified across the plugin */
    --mamba-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mamba-font-mono: 'SF Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;

    --mamba-radius: 10px;
    --mamba-radius-sm: 6px;
    --mamba-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --mamba-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);

    --mamba-input-bg: #ffffff;
    --mamba-input-border: #d1d5db;

    /* Button gradients */
    --mamba-btn-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --mamba-btn-gradient-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* --- DARK THEME (Cyber Mamba) --- */
[data-mamba-theme="dark"] {
    --mamba-bg: #0f172a;
    --mamba-sidebar: #0f172a;
    --mamba-card: #1e293b;
    --mamba-card-hover: #334155;
    --mamba-border: #334155;

    --mamba-primary: #00e676;
    --mamba-primary-dark: #00c853;
    --mamba-primary-glow: rgba(0, 230, 118, 0.25);

    --mamba-text-main: #f1f5f9;
    --mamba-text-muted: #94a3b8;
    
    /* Dark mode override for --mamba-dark used in inline styles */
    --mamba-dark: #f1f5f9;

    --mamba-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --mamba-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);

    --mamba-input-bg: #0f172a;
    --mamba-input-border: #475569;

    --mamba-btn-gradient: linear-gradient(135deg, rgba(0, 230, 118, 0.15) 0%, rgba(0, 200, 100, 0.1) 100%);
    --mamba-btn-gradient-hover: linear-gradient(135deg, #00e676 0%, #00c853 100%);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
.mamba-admin {
    font-family: var(--mamba-font-primary);
    font-size: 14px;
    line-height: 1.6;
    color: var(--mamba-text-main);
    background: var(--mamba-bg);
    margin: 20px 20px 0 0;
    border-radius: var(--mamba-radius);
    box-shadow: var(--mamba-shadow-lg);
    display: flex;
    min-height: 85vh;
    border: 1px solid var(--mamba-border);
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mamba-admin * {
    box-sizing: border-box;
}

/* ============================================
   SIDEBAR
   ============================================ */
.mamba-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--mamba-sidebar);
    border-right: 1px solid var(--mamba-border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    transition: all 0.3s ease;
}

.mamba-brand {
    padding: 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--mamba-border);
    margin-bottom: 24px;
}

.mamba-logo {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
}

[data-mamba-theme="dark"] .mamba-logo {
    filter: drop-shadow(0 0 8px var(--mamba-primary-glow));
}

.mamba-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mamba-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--mamba-text-main);
}

.mamba-badge {
    font-size: 9px;
    font-weight: 700;
    color: #ffffff;
    background: var(--mamba-btn-gradient);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
    letter-spacing: 0.5px;
}

[data-mamba-theme="dark"] .mamba-badge {
    color: #020617;
    background: var(--mamba-primary);
    box-shadow: 0 0 10px var(--mamba-primary-glow);
}

.mamba-brand-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mamba-version {
    font-size: 11px;
    color: var(--mamba-text-muted);
    font-family: var(--mamba-font-mono);
    margin-top: 2px;
    font-weight: 400;
}

/* Navigation */
.mamba-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    flex: 1;
}

.mamba-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--mamba-text-muted);
    text-decoration: none;
    border-radius: var(--mamba-radius-sm);
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.mamba-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--mamba-text-main);
}

[data-mamba-theme="dark"] .mamba-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mamba-nav-item.active {
    background: var(--mamba-primary-glow);
    color: var(--mamba-primary);
    font-weight: 600;
    border-color: rgba(16, 185, 129, 0.15);
}

[data-mamba-theme="dark"] .mamba-nav-item.active {
    border-color: rgba(0, 230, 118, 0.2);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.08);
}

.mamba-nav-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Sidebar Footer */
.mamba-sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--mamba-border);
    margin-top: auto;
}

.mamba-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: var(--mamba-text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--mamba-radius-sm);
    border: 1px solid var(--mamba-border);
    background: var(--mamba-card);
    transition: all 0.2s ease;
}

.mamba-theme-toggle:hover {
    border-color: var(--mamba-primary);
    color: var(--mamba-primary);
}

.mamba-mini-status {
    background: var(--mamba-card);
    padding: 12px;
    border-radius: var(--mamba-radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--mamba-border);
    transition: all 0.2s ease;
}

.mamba-mini-status.active {
    border-color: var(--mamba-primary);
}

.mamba-mini-status .dashicons {
    color: var(--mamba-text-muted);
    font-size: 16px;
}

.mamba-mini-status.active .dashicons {
    color: var(--mamba-primary);
}

.status-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-details .label {
    font-size: 10px;
    color: var(--mamba-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-details .value {
    font-size: 13px;
    font-weight: 600;
    color: var(--mamba-text-main);
    font-family: var(--mamba-font-mono);
}

.status-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mamba-text-muted);
    transition: all 0.3s ease;
}

.mamba-mini-status.active .status-led {
    background: var(--mamba-primary);
    box-shadow: 0 0 8px var(--mamba-primary);
    animation: pulse-led 2s infinite;
}

/* Docs Link in Sidebar */
a.mamba-mini-status.mamba-docs-link {
    text-decoration: none;
    cursor: pointer;
    margin-top: 8px;
}

a.mamba-mini-status.mamba-docs-link:hover {
    border-color: var(--mamba-primary);
    background: var(--mamba-card-hover);
}

a.mamba-mini-status.mamba-docs-link:hover .dashicons {
    color: var(--mamba-primary);
}

@keyframes pulse-led {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.mamba-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, var(--mamba-bg) 0%, rgba(241, 245, 249, 0.5) 100%);
}

[data-mamba-theme="dark"] .mamba-main-content {
    background: linear-gradient(135deg, #0f172a 0%, #1a2744 100%);
}

/* Top Bar */
.mamba-topbar {
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--mamba-border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

[data-mamba-theme="dark"] .mamba-topbar {
    background: rgba(15, 23, 42, 0.9);
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--mamba-text-main);
    margin: 0;
    letter-spacing: -0.5px;
}

.mamba-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Content Body */
.mamba-content-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* ============================================
   BUTTONS - Premium & Elegant
   ============================================ */
.mamba-admin .button,
.mamba-admin button,
.mamba-admin input[type="submit"] {
    font-family: var(--mamba-font-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--mamba-radius-sm);
    border: 1px solid var(--mamba-border);
    background: var(--mamba-card);
    color: var(--mamba-text-main);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mamba-admin .button:hover,
.mamba-admin button:hover {
    background: var(--mamba-card-hover);
    border-color: var(--mamba-text-muted);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Primary Button */
.mamba-admin .button-primary,
.mamba-admin .button.button-primary,
.mamba-warmup-btn {
    background: var(--mamba-btn-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    text-shadow: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.mamba-admin .button-primary:hover,
.mamba-warmup-btn:hover {
    background: var(--mamba-btn-gradient-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

[data-mamba-theme="dark"] .mamba-admin .button-primary,
[data-mamba-theme="dark"] .mamba-warmup-btn {
    background: var(--mamba-btn-gradient) !important;
    border: 1px solid var(--mamba-primary) !important;
    color: var(--mamba-primary) !important;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.15) !important;
}

[data-mamba-theme="dark"] .mamba-admin .button-primary:hover,
[data-mamba-theme="dark"] .mamba-warmup-btn:hover {
    background: var(--mamba-primary) !important;
    color: #020617 !important;
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.4) !important;
}

/* Danger Button */
.mamba-admin .button-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

.mamba-admin .button-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Secondary Button */
.mamba-admin .button-secondary {
    background: transparent !important;
    border: 1px solid var(--mamba-border) !important;
    color: var(--mamba-text-muted) !important;
}

.mamba-admin .button-secondary:hover {
    border-color: var(--mamba-primary) !important;
    color: var(--mamba-primary) !important;
    background: var(--mamba-primary-glow) !important;
}

/* Purge Button (Red style) */
.mamba-purge-btn {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
}

.mamba-purge-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

/* Save Button */
.mamba-save-button {
    background: var(--mamba-btn-gradient) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-shadow: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    border-radius: var(--mamba-radius-sm) !important;
}

.mamba-save-button:hover {
    background: var(--mamba-btn-gradient-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

[data-mamba-theme="dark"] .mamba-save-button {
    background: var(--mamba-primary) !important;
    color: #020617 !important;
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.4) !important;
}

[data-mamba-theme="dark"] .mamba-save-button:hover {
    box-shadow: 0 0 35px rgba(0, 230, 118, 0.6) !important;
}

/* ============================================
   CARDS & SECTIONS
   ============================================ */
.mamba-form-section {
    background: var(--mamba-card);
    border: 1px solid var(--mamba-border);
    border-radius: var(--mamba-radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--mamba-shadow);
    transition: all 0.3s ease;
}

.mamba-form-section:hover {
    box-shadow: var(--mamba-shadow-lg);
}

[data-mamba-theme="dark"] .mamba-form-section {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mamba-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mamba-border);
}

.mamba-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--mamba-primary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mamba-section-title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Optimization Grid */
.mamba-optimization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.mamba-optimization-item {
    background: var(--mamba-card);
    border: 1px solid var(--mamba-border);
    border-radius: var(--mamba-radius-sm);
    padding: 20px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.mamba-optimization-item:hover {
    border-color: var(--mamba-primary);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
}

[data-mamba-theme="dark"] .mamba-optimization-item {
    background: rgba(30, 41, 59, 0.5);
}

[data-mamba-theme="dark"] .mamba-optimization-item:hover {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.08);
}

.mamba-optimization-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.mamba-optimization-content {
    flex: 1;
}

.mamba-optimization-name {
    color: var(--mamba-text-main);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.mamba-optimization-description {
    color: var(--mamba-text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   TOGGLE SWITCHES - Fixed & Elegant
   ============================================ */
.mamba-toggle-switch {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.mamba-toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mamba-toggle-switch label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--mamba-text-muted);
    user-select: none;
    padding-left: 56px;
    min-height: 28px;
    transition: color 0.2s ease;
}

.mamba-toggle-switch label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 26px;
    background: var(--mamba-input-bg);
    border: 2px solid var(--mamba-border);
    border-radius: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mamba-toggle-switch label::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: var(--mamba-text-muted);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked State */
.mamba-toggle-switch input[type="checkbox"]:checked+label {
    color: var(--mamba-primary);
}

.mamba-toggle-switch input[type="checkbox"]:checked+label::before {
    background: var(--mamba-primary);
    border-color: var(--mamba-primary);
    box-shadow: 0 0 12px var(--mamba-primary-glow);
}

.mamba-toggle-switch input[type="checkbox"]:checked+label::after {
    left: 2px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Dark mode checked */
[data-mamba-theme="dark"] .mamba-toggle-switch input[type="checkbox"]:checked+label::before {
    background: transparent;
    border-color: var(--mamba-primary);
    box-shadow: 0 0 15px var(--mamba-primary-glow), inset 0 0 8px rgba(0, 230, 118, 0.1);
}

[data-mamba-theme="dark"] .mamba-toggle-switch input[type="checkbox"]:checked+label::after {
    background: var(--mamba-primary);
    box-shadow: 0 0 10px var(--mamba-primary);
}

/* Hover States */
.mamba-toggle-switch label:hover::before {
    border-color: var(--mamba-text-muted);
}

.mamba-toggle-switch input[type="checkbox"]:checked+label:hover::before {
    border-color: var(--mamba-primary-dark);
}

/* Disabled State */
.mamba-toggle-switch input[type="checkbox"]:disabled+label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.mamba-admin input[type="text"],
.mamba-admin input[type="number"],
.mamba-admin input[type="url"],
.mamba-admin input[type="email"],
.mamba-admin select,
.mamba-admin textarea {
    font-family: var(--mamba-font-primary);
    font-size: 14px;
    background: var(--mamba-input-bg);
    border: 1px solid var(--mamba-input-border);
    color: var(--mamba-text-main);
    padding: 10px 14px;
    border-radius: var(--mamba-radius-sm);
    width: 100%;
    transition: all 0.2s ease;
}

.mamba-admin input:focus,
.mamba-admin select:focus,
.mamba-admin textarea:focus {
    outline: none;
    border-color: var(--mamba-primary);
    box-shadow: 0 0 0 3px var(--mamba-primary-glow);
}

.mamba-admin select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Monospace for technical inputs */
.mamba-admin input[type="number"],
.mamba-setting-control input {
    font-family: var(--mamba-font-mono);
    font-size: 13px;
}

/* ============================================
   FORM ACTIONS
   ============================================ */
.mamba-form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--mamba-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   PREMIUM UPSELL
   ============================================ */
.mamba-premium-upsell {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed var(--mamba-border);
    border-radius: var(--mamba-radius);
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-mamba-theme="dark"] .mamba-premium-upsell {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(148, 163, 184, 0.2);
}

.mamba-premium-upsell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.02) 10px,
            rgba(0, 0, 0, 0.02) 20px);
    pointer-events: none;
}

.mamba-upsell-content {
    position: relative;
    z-index: 1;
}

.mamba-upsell-content .dashicons-lock {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--mamba-warning);
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}

.mamba-upsell-content h5 {
    color: var(--mamba-text-main);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
}

.mamba-upsell-content p {
    color: var(--mamba-text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.mamba-upgrade-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4) !important;
}

.mamba-upgrade-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5) !important;
}

/* Premium Badge */
.mamba-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.mamba-notification {
    background: var(--mamba-card);
    border: 1px solid var(--mamba-border);
    color: var(--mamba-text-main);
    box-shadow: var(--mamba-shadow-lg);
    border-left-width: 4px;
    position: fixed;
    top: 60px;
    right: 24px;
    z-index: 99999;
    padding: 16px 20px;
    border-radius: var(--mamba-radius-sm);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
}

.mamba-notification.show {
    transform: translateX(0);
}

.mamba-notification.success {
    border-left-color: var(--mamba-primary);
}

.mamba-notification.error {
    border-left-color: var(--mamba-danger);
}

/* ============================================
   DASHBOARD METRICS OVERRIDES
   ============================================ */
.mamba-metrics-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.mamba-metric-card {
    background: var(--mamba-card);
    border: 1px solid var(--mamba-border);
    padding: 24px;
    border-radius: var(--mamba-radius);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mamba-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--mamba-btn-gradient);
}

.mamba-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mamba-shadow-lg);
}

.metric-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--mamba-text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--mamba-text-main);
    font-family: var(--mamba-font-mono);
    line-height: 1.2;
}

.metric-trend {
    font-size: 12px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.metric-trend.positive {
    color: var(--mamba-primary);
}

.metric-trend.negative {
    color: var(--mamba-danger);
}

.metric-trend.neutral {
    color: var(--mamba-text-muted);
}

.metric-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--mamba-text-muted);
    line-height: 1.4;
}

/* Score Badge */
.score-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    font-family: var(--mamba-font-mono);
    color: #ffffff;
    background: var(--mamba-btn-gradient);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.score-badge.excellent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.score-badge.good {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.score-badge.average {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
}

.score-badge.poor {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .mamba-sidebar {
        width: 220px;
    }
}

@media (max-width: 992px) {
    .mamba-admin {
        flex-direction: column;
    }

    .mamba-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mamba-border);
    }

    .mamba-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .mamba-nav-item {
        padding: 8px 12px;
    }

    .mamba-nav-item .nav-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .mamba-optimization-grid {
        grid-template-columns: 1fr;
    }

    .mamba-content-body {
        padding: 20px;
    }

    .mamba-topbar {
        padding: 0 20px;
    }

    .page-title {
        font-size: 18px;
    }
}

/* --- Fixes & Overrides --- */
[data-mamba-theme="dark"] .mamba-admin input::placeholder,
[data-mamba-theme="dark"] .mamba-admin textarea::placeholder {
    color: var(--mamba-text-muted);
    opacity: 0.6;
}

[data-mamba-theme="dark"] .mamba-admin input[type="text"],
[data-mamba-theme="dark"] .mamba-admin input[type="number"],
[data-mamba-theme="dark"] .mamba-admin input[type="url"],
[data-mamba-theme="dark"] .mamba-admin input[type="email"],
[data-mamba-theme="dark"] .mamba-admin select,
[data-mamba-theme="dark"] .mamba-admin textarea {
    background-color: var(--mamba-input-bg) !important;
    color: var(--mamba-text-main) !important;
    border-color: var(--mamba-input-border);
}

/* --- FINAL UI FIXES --- */
/* Toggle Correction - Checked state knob position */
.mamba-toggle-switch input[type="checkbox"]:checked+label::after {
    left: 2px !important;
}

/* Dark Mode Input & Branding Fixes */
[data-mamba-theme="dark"] .mamba-sidebar {
    background-color: #0f172a !important;
}

[data-mamba-theme="dark"] .mamba-admin {
    color: #f1f5f9 !important;
}

[data-mamba-theme="dark"] .mamba-admin input,
[data-mamba-theme="dark"] .mamba-admin select,
[data-mamba-theme="dark"] .mamba-admin textarea {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

[data-mamba-theme="dark"] .mamba-admin ::-webkit-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

[data-mamba-theme="dark"] .mamba-admin ::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

[data-mamba-theme="dark"] .mamba-admin :-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

[data-mamba-theme="dark"] .mamba-admin ::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Toggle rules consolidated above */

/* --- FINAL COMPREHENSIVE FIXES --- */

/* 1. Toggle Alignment (Dark Mode Specific Override) */
[data-mamba-theme="dark"] .mamba-toggle-switch input[type="checkbox"]:checked+label::after {
    left: 2px !important;
    background-color: var(--mamba-primary) !important;
}

/* 2. Disabled Selects in Dark Mode */
[data-mamba-theme="dark"] .mamba-admin select:disabled,
[data-mamba-theme="dark"] .mamba-admin select.disabled {
    background-color: #0f172a !important;
    color: #475569 !important;
    border-color: #334155 !important;
    background-image: none !important;
    opacity: 0.7;
    cursor: not-allowed;
}

/* 3. Global Card Dark Mode Fix (Media, DB, General) */
[data-mamba-theme="dark"] .mamba-media-card,
[data-mamba-theme="dark"] .mamba-db-card,
[data-mamba-theme="dark"] .mamba-stat-card,
[data-mamba-theme="dark"] .mamba-task-card,
[data-mamba-theme="dark"] .mamba-optimization-item,
[data-mamba-theme="dark"] .mamba-metric-card,
[data-mamba-theme="dark"] .mamba-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure headings/text inside cards are light */
[data-mamba-theme="dark"] .mamba-media-card h3,
[data-mamba-theme="dark"] .mamba-media-card h4,
[data-mamba-theme="dark"] .mamba-media-card .mamba-db-title,
[data-mamba-theme="dark"] .mamba-optimization-name {
    color: #f1f5f9 !important;
}

[data-mamba-theme="dark"] .mamba-media-card p,
[data-mamba-theme="dark"] .mamba-optimization-description {
    color: #94a3b8 !important;
    margin-bottom: 8px !important;
}

/* 4. Admin Notices - Proper styling for Mamba plugin notices only */
.mamba-admin .notice,
.mamba-warmup-notice {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    margin: 15px 0 !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
}

.mamba-admin .notice p,
.mamba-warmup-notice p {
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 !important;
}

.mamba-admin .notice .notice-dismiss,
.mamba-warmup-notice .notice-dismiss {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    padding: 0 !important;
    margin-left: 12px !important;
    flex-shrink: 0 !important;
}

/* Dark mode notices - scoped to Mamba admin only */
[data-mamba-theme="dark"] .mamba-admin .notice {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-mamba-theme="dark"] .mamba-admin .notice p,
[data-mamba-theme="dark"] .mamba-admin .notice {
    color: #f1f5f9 !important;
}

[data-mamba-theme="dark"] .mamba-admin .notice a {
    color: var(--mamba-primary) !important;
}

[data-mamba-theme="dark"] .mamba-admin .notice-success {
    border-left: 4px solid var(--mamba-primary) !important;
}

[data-mamba-theme="dark"] .mamba-admin .notice-warning {
    border-left: 4px solid #f59e0b !important;
}

[data-mamba-theme="dark"] .mamba-admin .notice-error {
    border-left: 4px solid #ef4444 !important;
}

[data-mamba-theme="dark"] .mamba-admin .notice-info {
    border-left: 4px solid #3b82f6 !important;
}

/* Light mode notices - scoped to Mamba admin only */
.mamba-admin .notice-success {
    background-color: #ecfdf5 !important;
    border-left: 4px solid #10b981 !important;
}

.mamba-admin .notice-warning {
    background-color: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
}

.mamba-admin .notice-error {
    background-color: #fef2f2 !important;
    border-left: 4px solid #ef4444 !important;
}

.mamba-admin .notice-info {
    background-color: #eff6ff !important;
    border-left: 4px solid #3b82f6 !important;
}

/* Mamba Warmup Notice - Enhanced Styling for Light/Dark Mode */
.mamba-warmup-notice {
    border-radius: 6px;
    margin: 15px 0;
}

.mamba-warmup-notice p {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mamba-warmup-notice .mamba-view-warmup-log {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mamba-warmup-notice .mamba-view-warmup-log:hover {
    background: rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.mamba-warmup-notice.notice-success .mamba-view-warmup-log {
    color: #0a5132;
}

.mamba-warmup-notice.notice-warning .mamba-view-warmup-log {
    color: #6b4c00;
}

/* Dark mode specific styling for warmup notices */
[data-mamba-theme="dark"] .mamba-warmup-notice {
    background: var(--mamba-card) !important;
    border-color: var(--mamba-border) !important;
}

[data-mamba-theme="dark"] .mamba-warmup-notice p {
    color: var(--mamba-text-main) !important;
}

[data-mamba-theme="dark"] .mamba-warmup-notice.notice-success {
    border-left-color: var(--mamba-primary) !important;
}

[data-mamba-theme="dark"] .mamba-warmup-notice.notice-warning {
    border-left-color: var(--mamba-warning) !important;
}

[data-mamba-theme="dark"] .mamba-warmup-notice .mamba-view-warmup-log {
    background: rgba(255, 255, 255, 0.1);
    color: var(--mamba-primary) !important;
}

[data-mamba-theme="dark"] .mamba-warmup-notice .mamba-view-warmup-log:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Remove backgrounds for info and performance cards in dark mode */
[data-mamba-theme="dark"] .mamba-info-card,
[data-mamba-theme="dark"] .mamba-performance-card {
    background: transparent !important;
}

/* Fix dark mode text visibility for performance titles and other elements using --mamba-dark */
[data-mamba-theme="dark"] .mamba-performance-title,
[data-mamba-theme="dark"] .mamba-cache-overview-title,
[data-mamba-theme="dark"] .mamba-cache-status-title,
[data-mamba-theme="dark"] .mamba-backends-title,
[data-mamba-theme="dark"] .mamba-backend-name,
[data-mamba-theme="dark"] .mamba-management-title,
[data-mamba-theme="dark"] .mamba-flush-action-title,
[data-mamba-theme="dark"] .mamba-info-title,
[data-mamba-theme="dark"] .mamba-logs-overview-title,
[data-mamba-theme="dark"] .mamba-export-title,
[data-mamba-theme="dark"] .mamba-status-title,
[data-mamba-theme="dark"] .mamba-db-title,
[data-mamba-theme="dark"] .mamba-media-title,
[data-mamba-theme="dark"] .mamba-stat-value,
[data-mamba-theme="dark"] .mamba-detail-value,
[data-mamba-theme="dark"] .mamba-setting-field label,
[data-mamba-theme="dark"] .mamba-upsell-content h5 {
    color: #f1f5f9 !important;
}

/* Additional dark mode background removals */
[data-mamba-theme="dark"] .mamba-backend-item,
[data-mamba-theme="dark"] .mamba-flush-action,
[data-mamba-theme="dark"] .mamba-admin-wrap>.mamba-form-section:first-of-type,
[data-mamba-theme="dark"] .mamba-server-support-item,
[data-mamba-theme="dark"] .mamba-nginx-config {
    background: transparent !important;
}

/* Fix disabled select embossed look in dark mode */
[data-mamba-theme="dark"] .mamba-admin select:disabled,
[data-mamba-theme="dark"] .mamba-admin select.disabled {
    background-color: #0f172a !important;
    color: #475569 !important;
    border-color: #334155 !important;
    background-image: none !important;
    opacity: 0.6 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Inline Status for Purge/Warmup */
.mamba-inline-status {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--mamba-card, #ffffff);
    border: 1px solid var(--mamba-border, #e5e7eb);
    border-left: 4px solid #E68057;
    border-radius: 8px;
    color: var(--mamba-text, #1e293b);
}

[data-mamba-theme="dark"] .mamba-inline-status {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

/* Additional CSS fixes */
.wp-core-ui .button-group.button-small .button,
.wp-core-ui .button.button-small {
    margin-top: 8px !important;
}

.wp-core-ui select.disabled,
.wp-core-ui select:disabled {
    background-image: none !important;
    text-shadow: none !important;
}

.mamba-media-card p,
.mamba-optimization-description {
    margin-bottom: 8px !important;
}

/* 5. Page Cache Grid Overlap Fix */
.mamba-optimization-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)) !important;
    gap: 20px !important;
    align-items: start !important;
    /* Prevent stretching overlap */
    margin-bottom: 20px !important;
}

/* 6. Hide WordPress Admin Footer on Mamba Pages */
.mamba-admin #footer-thankyou,
.mamba-admin-wrap #footer-thankyou,
.mamba-admin #wpfooter,
body.toplevel_page_mamba #wpfooter {
    display: none !important;
}

/* 7. System Card Dark Mode Background Fix */
[data-mamba-theme="dark"] .mamba-system-card {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* 8. Premium Feature Notice in Modal */
.mamba-premium-notice {
    text-align: center;
    padding: 30px 20px;
}

.mamba-premium-notice .premium-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mamba-premium-notice .premium-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

.mamba-premium-notice h4 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mamba-text-main);
}

.mamba-premium-notice p {
    margin: 0 0 20px;
    color: var(--mamba-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.mamba-premium-notice .premium-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mamba-premium-notice .premium-actions .button-primary {
    background: var(--mamba-btn-gradient);
    border: none;
    color: #fff;
    padding: 8px 20px;
    font-weight: 500;
}

.mamba-premium-notice .premium-actions .button-primary:hover {
    background: var(--mamba-btn-gradient-hover);
}

.mamba-premium-notice .premium-actions .button,
.mamba-modal .mamba-premium-notice .premium-actions .button {
    padding: 8px 20px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

.mamba-premium-notice .premium-actions .button:not(.button-primary),
.mamba-modal .mamba-premium-notice .premium-actions .button:not(.button-primary),
.mamba-premium-notice .premium-actions .button.mamba-modal-close,
.mamba-modal .mamba-premium-notice .premium-actions .button.mamba-modal-close {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-style: solid !important;
    border-width: 1px !important;
    color: #0f172a !important;
}

.mamba-premium-notice .premium-actions .button:not(.button-primary):hover,
.mamba-modal .mamba-premium-notice .premium-actions .button:not(.button-primary):hover {
    background: #e2e8f0 !important;
}

[data-mamba-theme="dark"] .mamba-premium-notice .premium-actions .button:not(.button-primary),
[data-mamba-theme="dark"] .mamba-modal .mamba-premium-notice .premium-actions .button:not(.button-primary),
[data-mamba-theme="dark"] .mamba-premium-notice .premium-actions .button.mamba-modal-close,
[data-mamba-theme="dark"] .mamba-modal .mamba-premium-notice .premium-actions .button.mamba-modal-close {
    background: #334155 !important;
    border: 1px solid #475569 !important;
    border-style: solid !important;
    border-width: 1px !important;
    color: #f1f5f9 !important;
}

[data-mamba-theme="dark"] .mamba-premium-notice .premium-actions .button:not(.button-primary):hover,
[data-mamba-theme="dark"] .mamba-modal .mamba-premium-notice .premium-actions .button:not(.button-primary):hover {
    background: #475569 !important;
}

[data-mamba-theme="dark"] .mamba-premium-notice h4 {
    color: var(--mamba-text-main);
}

[data-mamba-theme="dark"] .mamba-premium-notice p {
    color: var(--mamba-text-muted);
}

/* ============================================
   WARMUP MODAL STYLES
   ============================================ */
.mamba-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mamba-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.mamba-modal-content {
    position: relative;
    background: var(--mamba-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mamba-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--mamba-border, #e2e8f0);
    background: linear-gradient(135deg, var(--mamba-primary, #10b981) 0%, var(--mamba-primary-dark, #059669) 100%);
}

.mamba-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mamba-modal-header h3 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mamba-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s ease;
}

.mamba-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mamba-modal-body {
    padding: 20px;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
    color: var(--mamba-text-main, #0f172a);
}

body.mamba-modal-open {
    overflow: hidden;
}

/* Loading State */
.warmup-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--mamba-border, #e2e8f0);
    border-top-color: var(--mamba-primary, #10b981);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.warmup-loading p {
    margin: 0;
    color: var(--mamba-text-muted, #64748b);
    font-size: 14px;
}

/* Progress Section */
.warmup-progress {
    padding: 10px 0;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.progress-ring {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: var(--mamba-border, #e2e8f0);
}

.progress-ring-fill {
    stroke: var(--mamba-primary, #10b981);
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--mamba-text-main, #0f172a);
}

.progress-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--mamba-text-main, #0f172a);
}

.progress-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--mamba-text-muted, #64748b);
}

/* Stats Grid */
.warmup-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--mamba-bg, #f8fafc);
    border: 1px solid var(--mamba-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--mamba-text-muted, #64748b);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--mamba-text-main, #0f172a);
}

.stat-value.success-count {
    color: var(--mamba-primary, #10b981);
}

.stat-value.failed-count {
    color: var(--mamba-danger, #ef4444);
}

/* Current URL Section */
.current-url-section {
    background: var(--mamba-bg, #f8fafc);
    border: 1px solid var(--mamba-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.url-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.url-label {
    font-size: 11px;
    color: var(--mamba-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.url-text {
    font-size: 12px;
    color: var(--mamba-text-main, #0f172a);
    font-family: var(--mamba-font-mono, monospace);
    word-break: break-all;
}

.device-variants {
    display: flex;
    gap: 8px;
}

.variant {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--mamba-card, #ffffff);
    border: 1px solid var(--mamba-border, #e2e8f0);
}

/* Queue and Recent Sections */
.queue-section,
.recent-section {
    margin-bottom: 16px;
}

.queue-section h5,
.recent-section h5 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mamba-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queue-list,
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.queue-item,
.recent-item {
    font-size: 11px;
    padding: 6px 10px;
    background: var(--mamba-bg, #f8fafc);
    border: 1px solid var(--mamba-border, #e2e8f0);
    border-radius: 4px;
    color: var(--mamba-text-muted, #64748b);
    font-family: var(--mamba-font-mono, monospace);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action Buttons */
.warmup-actions,
.results-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--mamba-border, #e2e8f0);
    margin-top: 16px;
}

.warmup-actions .button,
.results-actions .button {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.warmup-actions .cancel-btn {
    background: var(--mamba-danger, #ef4444);
    border-color: var(--mamba-danger, #ef4444);
    color: #fff;
}

.warmup-actions .cancel-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Results Section */
.warmup-results {
    text-align: center;
    padding: 20px 0;
}

.results-summary h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mamba-primary, #10b981);
}

.results-summary p {
    margin: 0 0 20px;
    color: var(--mamba-text-muted, #64748b);
}

.error-details {
    text-align: left;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.error-details h5 {
    margin: 0 0 12px;
    color: var(--mamba-danger, #ef4444);
    font-size: 13px;
}

.error-list {
    max-height: 150px;
    overflow-y: auto;
}

.error-item {
    font-size: 11px;
    padding: 6px 8px;
    background: #ffffff;
    border-radius: 4px;
    margin-bottom: 4px;
    font-family: var(--mamba-font-mono, monospace);
}

/* Dark Mode Modal Styles */
[data-mamba-theme="dark"] .mamba-modal-content {
    background: var(--mamba-card);
    border: 1px solid var(--mamba-border);
}

[data-mamba-theme="dark"] .mamba-modal-body {
    color: var(--mamba-text-main);
}

[data-mamba-theme="dark"] .stat-item,
[data-mamba-theme="dark"] .current-url-section,
[data-mamba-theme="dark"] .queue-item,
[data-mamba-theme="dark"] .recent-item {
    background: var(--mamba-bg);
    border-color: var(--mamba-border);
}

[data-mamba-theme="dark"] .error-details {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-mamba-theme="dark"] .error-item {
    background: var(--mamba-card);
}

/* Modal Minimized State */
.mamba-modal.minimized {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    width: auto;
    height: auto;
    align-items: flex-end;
    justify-content: flex-end;
}

.mamba-modal.minimized .mamba-modal-overlay {
    display: none;
}

.mamba-modal.minimized .mamba-modal-content {
    width: 320px;
    max-height: 80px;
    animation: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mamba-modal.minimized .mamba-modal-body {
    display: none;
}

.mamba-modal.minimized .mamba-modal-header {
    border-radius: 8px;
    cursor: pointer;
}

.mamba-modal.minimized .mamba-modal-header h3 {
    font-size: 13px;
}

/* Background Mode State */
.mamba-modal.background-mode .warmup-actions {
    display: none;
}

.background-status,
.background-complete {
    text-align: center;
    padding: 20px;
}

.background-status .background-icon,
.background-complete .complete-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.background-complete .complete-icon {
    color: var(--mamba-primary, #10b981);
}

.background-status h4,
.background-complete h4 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mamba-text-main, #0f172a);
}

.background-status p,
.background-complete p {
    margin: 0 0 8px;
    color: var(--mamba-text-muted, #64748b);
    font-size: 14px;
}

.background-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

[data-mamba-theme="dark"] .background-status h4,
[data-mamba-theme="dark"] .background-complete h4 {
    color: var(--mamba-text-main);
}

[data-mamba-theme="dark"] .background-status p,
[data-mamba-theme="dark"] .background-complete p {
    color: var(--mamba-text-muted);
}

/* ============================================
   UNSAVED CHANGES REMINDER
   ============================================ */
.mamba-unsaved-reminder {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    font-size: 13px;
    font-weight: 500;
    animation: mamba-slide-up 0.3s ease-out;
}

@keyframes mamba-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mamba-unsaved-reminder .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mamba-unsaved-reminder .reminder-text {
    flex: 1;
}

.mamba-unsaved-reminder .reminder-save-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mamba-unsaved-reminder .reminder-save-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Pulse attention animation for save button */
.mamba-pulse-attention {
    animation: mamba-pulse 1.5s ease-in-out infinite;
}

@keyframes mamba-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(230, 128, 87, 0.2);
    }
    50% {
        box-shadow: 0 2px 20px rgba(230, 128, 87, 0.6), 0 0 0 4px rgba(230, 128, 87, 0.2);
    }
}

/* Dark theme adjustments */
[data-mamba-theme="dark"] .mamba-unsaved-reminder {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.5);
}