/* ============================================================
   MetaForge Engine — Admin CSS
   ============================================================ */

#wpcontent:has(.mfe-wrap),
body.toplevel_page_metaforge #wpcontent,
body[class*="page_metaforge"] #wpcontent,
body[class*="page_mfe_"] #wpcontent,
body.auto-fold[class*="page_metaforge"] #wpcontent,
body.auto-fold[class*="page_mfe_"] #wpcontent,
body.folded[class*="page_metaforge"] #wpcontent,
body.folded[class*="page_mfe_"] #wpcontent,
body:has(.mfe-wrap) #wpcontent {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.wrap.mfe-wrap,
.mfe-wrap {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

:root {
    /* Colors */
    --mfe-primary: #2271b1;
    --mfe-primary-hover: #135e96;
    --mfe-primary-soft: #f0f6fa;
    --mfe-bg-light: #f9fafb;
    --mfe-bg-white: #ffffff;
    --mfe-border: #d1d5db;
    --mfe-border-soft: #e5e7eb;
    --mfe-text-dark: #1d2327;
    --mfe-text-muted: #646970;
    --mfe-error: #d63638;
    --mfe-success: #00a32a;

    /* Geometry */
    --mfe-radius: 8px;
    --mfe-radius-sm: 4px;

    /* Shadows */
    --mfe-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --mfe-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --mfe-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@keyframes mfeSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.mfe-spin {
    animation: mfeSpin 1.5s linear infinite;
    display: inline-block;
}

.mfe-wrap * {
    box-sizing: border-box;
}

.mfe-wrap {
    overflow-x: hidden;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* --- Top bar --- */
.mfe-top-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--mfe-bg-white);
    border-bottom: 1px solid var(--mfe-border-soft);
    padding: 12px 28px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

@media screen and (max-width: 782px) {
    .mfe-top-bar {
        padding: 12px 14px !important;
    }
}

/* Sticky top bar for Builder only */
#mfe-group-form .mfe-top-bar {
    position: -webkit-sticky;
    position: sticky;
    top: 32px;
    z-index: 100;
}

body:not(.admin-bar) #mfe-group-form .mfe-top-bar {
    top: 0;
}

@media screen and (max-width: 782px) {
    #mfe-group-form .mfe-top-bar {
        top: 46px;
    }
}

.mfe-top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.mfe-top-bar-left h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--mfe-text-dark);
    margin: 0;
    padding: 0;
}

.mfe-top-bar-left input[type="text"] {
    font-size: 15px;
    font-weight: 600;
    padding: 10px 16px;
    border: 1px solid var(--mfe-border);
    border-radius: var(--mfe-radius);
    width: 320px;
    color: var(--mfe-text-dark);
    background: var(--mfe-bg-light);
    transition: all 0.2s;
}

.mfe-top-bar-left input[type="text"]:focus {
    background: var(--mfe-bg-white);
    border-color: var(--mfe-primary);
    box-shadow: 0 0 0 3px var(--mfe-primary-soft);
    outline: none;
}

.mfe-top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin: 0;
}


.mfe-btn-primary,
button.mfe-btn-primary,
input[type="submit"].mfe-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
    gap: 8px !important;
    height: 42px !important;
    min-height: 42px !important;
    min-width: 165px !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    background: #2271b1 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(34, 113, 177, 0.2) !important;
}

.mfe-btn-primary:hover,
button.mfe-btn-primary:hover {
    background: #135e96 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3) !important;
}

.mfe-btn-secondary,
button.mfe-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
    gap: 8px !important;
    height: 42px !important;
    min-height: 42px !important;
    min-width: 90px !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #3c434a !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.mfe-btn-secondary:hover,
button.mfe-btn-secondary:hover {
    color: #2271b1 !important;
    border-color: #2271b1 !important;
    background: #f0f6fa !important;
}

.mfe-btn-primary .dashicons,
.mfe-btn-secondary .dashicons,
.mfe-ai-prompt-btn .dashicons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Builder wrap --- */
.mfe-builder-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 28px !important;
    box-sizing: border-box !important;
}

@media screen and (max-width: 782px) {
    .mfe-builder-wrap {
        padding: 16px 14px !important;
    }
}

/* --- Card --- */
.mfe-card {
    background: var(--mfe-bg-white);
    /*border: 1px solid var(--mfe-border-soft);*/
    /*border-radius: var(--mfe-radius);*/
    margin-bottom: 24px;
    box-shadow: var(--mfe-shadow-sm);
    overflow: hidden;
}

.mfe-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--mfe-bg-light);
    border-bottom: 1px solid var(--mfe-border-soft);
    cursor: pointer;
    user-select: none;
}

.mfe-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.mfe-card-header-left .dashicons {
    color: #8c8f94;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mfe-card-toggle {
    color: #8c8f94;
}

.mfe-card-body {
    padding: 0;
}

/* --- Fields table header --- */
.mfe-fields-table-header {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #8c8f94;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* FIX: drag cell + actions cell */
.mfe-cell-drag {
    width: 28px;
    flex-shrink: 0;
}

.mfe-cell-order {
    width: 50px;
    flex-shrink: 0;
}

.mfe-cell-label {
    flex: 1.2;
    min-width: 80px;
    padding-right: 8px;
}

.mfe-cell-name {
    flex: 1;
    min-width: 90px;
    color: #6b7280;
    font-family: monospace;
    font-size: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding-right: 8px;
}

.mfe-cell-type {
    width: 150px;
    flex-shrink: 0;
}

.mfe-cell-actions {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Copy Field Name Button */
.mfe-copy-name-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px;
    height: 18px;
    width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: color .15s, background .15s;
}

.mfe-copy-name-btn:hover {
    color: #0073aa;
    background: #f0f7fb;
}

.mfe-copy-name-btn .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

.mfe-head-name {
    word-break: break-all;
}

/* --- Drag handle --- */
.mfe-drag-handle {
    color: #c0c4cc;
    font-size: 16px;
    width: 16px;
    height: 16px;
    cursor: grab;
    transition: color .15s;
    display: inline-block;
    vertical-align: middle;
}

.mfe-drag-handle:hover {
    color: #0073aa;
}

.mfe-drag-handle:active {
    cursor: grabbing;
}

/* --- Sort placeholder --- */
.mfe-sort-placeholder {
    background: #f0f7fb;
    border: 2px dashed #bee3f8;
    border-radius: 6px;
    height: 48px;
    margin: 2px 0;
}

/* --- Field row --- */
.mfe-field-row,
.mfe-sub-field-row {
    display: block;
    width: 100%;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

/* --- Field list containers --- */
.mfe-fields,
.mfe-sf-list {
    display: block;
    width: 100%;
}

.mfe-field-row:last-child,
.mfe-sub-field-row:last-child {
    border-bottom: none;
}

/* Remove extra gap inside nested sub-field lists */
.mfe-sf-list .mfe-sub-field-row {
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.mfe-sf-list .mfe-sub-field-row:last-child {
    border-bottom: none;
}

/* Hide Layout row when nested inside a sub-field body (not a top-level field body) */
.mfe-sf-list .mfe-sub-field-row .mfe-sublayout-row {
    display: none !important;
}

.mfe-field-header,
.mfe-sf-row-header {
    display: flex;
    align-items: center;
    padding: 12px 12px;
    cursor: pointer;
}

.mfe-field-header:hover,
.mfe-sf-row-header:hover {
    background: #f9fafb;
}

.mfe-field-header .mfe-cell-order,
.mfe-sf-row-header .mfe-cell-order {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Expand arrow */
.mfe-expand-arrow {
    color: #9ca3af;
    font-size: 15px;
    width: 15px;
    height: 15px;
    transition: transform .2s;
    flex-shrink: 0;
}

.mfe-field-wrap.is-open>.mfe-field-header .mfe-expand-arrow,
.mfe-field-wrap.is-open>.mfe-sf-row-header .mfe-expand-arrow {
    transform: rotate(90deg);
}

/* Number badge */
.mfe-index {
    background: #e5e7eb;
    color: #374151;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.mfe-head-title {
    font-size: 13px;
}

.mfe-head-title strong {
    font-weight: 600;
    color: #0073aa;
}

.mfe-head-name {
    font-size: 12px;
    color: #6b7280;
    font-family: monospace;
}

/* Type badge */
.mfe-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f7fb;
    border: 1px solid #bee3f8;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #0073aa;
    white-space: nowrap;
}

.mfe-type-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Duplicate button */
.mfe-duplicate-field {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    color: #9ca3af;
    cursor: pointer;
    padding: 3px 6px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    transition: color .15s, border-color .15s;
}

.mfe-duplicate-field:hover {
    color: #0073aa;
    border-color: #bee3f8;
    background: #f0f7fb;
}

.mfe-duplicate-field .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Code button format */
.mfe-code-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    color: #9ca3af;
    cursor: pointer;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
    margin-right: 4px;
    height: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mfe-code-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mfe-code-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.mfe-code-btn:active {
    transform: translateY(0);
}

/* Disabled states for unsaved fields & buttons */
.mfe-code-btn:disabled,
.mfe-code-btn.is-disabled,
.mfe-duplicate-field:disabled,
.mfe-duplicate-field.is-disabled {
    opacity: 0.38 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
}

.mfe-code-btn:disabled:hover,
.mfe-code-btn.is-disabled:hover,
.mfe-duplicate-field:disabled:hover,
.mfe-duplicate-field.is-disabled:hover {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed !important;
}

.mfe-top-bar button:disabled,
.mfe-top-bar button.is-disabled,
.mfe-top-bar button[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}

/* --- Field body --- */
.mfe-field-body {
    display: none;
    /* never inherit flex from parent */
    width: 100%;
    /* always full width of the row */
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.mfe-field-wrap.is-open > .mfe-field-body {
    display: block;
}

/* Tabs */
.mfe-field-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.mfe-field-tabs li {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}

.mfe-field-tabs li:hover {
    color: #0073aa;
}

.mfe-field-tabs li.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    font-weight: 600;
}

.mfe-tab-content {
    display: none;
}

.mfe-tab-content.active {
    display: block;
}

/* Setting rows — two-column form layout (Label 28% | Input 72%) */
.mfe-setting-row {
    display: flex !important;
    flex-direction: row;
    /* explicit — never inherit column from parent */
    align-items: flex-start;
    width: 100%;
    /* always fill the field body */
    border-bottom: 1px solid #f3f4f6;
    padding: 14px 20px;
    box-sizing: border-box;
}

.mfe-setting-row.mfe-hidden,
.mfe-setting-row[style*="display: none"] {
    display: none !important;
}

.mfe-setting-row:last-child {
    border-bottom: none;
}

.mfe-setting-label {
    width: 200px;
    /* fixed px width — immune to percentage of narrow flex parents */
    min-width: 160px;
    max-width: 240px;
    padding-right: 20px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    padding-top: 4px;
    flex-shrink: 0;
}

.mfe-setting-label small {
    display: block;
    font-weight: 400;
    color: #9ca3af;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
}

.mfe-setting-input {
    flex: 1;
    min-width: 0;
    width: 0;
    /* forces flex to honour flex:1 correctly */
}

.mfe-setting-input input[type="text"],
.mfe-setting-input input[type="url"],
.mfe-setting-input input[type="number"],
.mfe-setting-input textarea,
.mfe-setting-input select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.mfe-setting-input input[type="text"]:focus,
.mfe-setting-input input[type="url"]:focus,
.mfe-setting-input input[type="number"]:focus,
.mfe-setting-input textarea:focus,
.mfe-setting-input select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, .12);
    outline: none;
}

.mfe-setting-input textarea {
    min-height: 80px;
    resize: vertical;
}

.mfe-wrap .mfe-setting-input input[type="text"],
.mfe-wrap .mfe-setting-input input[type="url"],
.mfe-wrap .mfe-setting-input input[type="number"],
.mfe-wrap .mfe-setting-input select {
    max-width: 500px;
}

.mfe-wrap .mfe-setting-input input.mfe-input-sm,
.mfe-setting-input input.mfe-input-sm {
    max-width: 80px;
    width: 80px !important;
}

/* ── Image return format radio pills ── */
.mfe-radio-pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mfe-radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
}

.mfe-radio-pill input[type="radio"] {
    display: none;
}

.mfe-radio-pill.active,
.mfe-radio-pill:has(input:checked) {
    background: #f0f7fb;
    border-color: #0073aa;
    color: #0073aa;
    font-weight: 600;
}

.mfe-radio-pill:hover {
    border-color: #0073aa;
    color: #0073aa;
}

/* --- Sub-fields --- */
.mfe-subfields-row {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 16px 20px 24px 20px !important;
}

.mfe-subfields-row .mfe-setting-label {
    width: 100% !important;
    margin-bottom: 12px;
}

.mfe-subfields-row .mfe-setting-input {
    width: 100% !important;
}

.mfe-sub-fields-table {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin-top: 12px;
    width: 100%;
    /* Indigo Guide for nesting */
    border-left: 3px solid #6366f1;
}

/* Deeper nesting tints */
.mfe-sub-field-row .mfe-sub-fields-table {
    background: #fbfbfb;
    border-left-color: #818cf8;
}

.mfe-sub-field-row .mfe-sub-field-row {
    background: #fdfdfd;
}

.mfe-sf-head {
    display: flex;
    background: #f9fafb;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    border-bottom: 1px solid #f0f0f0;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Add field */
.mfe-add-field-action {
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.mfe-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #0073aa !important;
    background: #fff !important;
    border: 1px dashed #bee3f8 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.mfe-btn-add:hover {
    background: #f0f7fb !important;
    border-color: #0073aa !important;
}

/* Actions bar */
.mfe-setting-actions {
    padding: 10px 20px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.mfe-actions-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mfe-field-label-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: .05em;
}

.mfe-delete,
.mfe-delete-sub,
.delete-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #9ca3af;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    transition: color .15s, border-color .15s, background .15s;
    text-decoration: none;
}

.mfe-delete:hover,
.mfe-delete-sub:hover,
.delete-button:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fef2f2;
    text-decoration: none;
}

/* ── Settings card ── */
.mfe-settings-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.mfe-settings-tabs li {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}

.mfe-settings-tabs li:hover {
    color: #0073aa;
}

.mfe-settings-tabs li.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    font-weight: 600;
}

/* Location rules */
.mfe-location-rules {
    padding: 20px;
}

.mfe-rules-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}

.mfe-rules-sublabel {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 14px;
}

.mfe-rule-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mfe-rule-group select {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
    flex: 1;
    min-width: 120px;
}

.mfe-rule-and-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}

.mfe-rule-or-link {
    font-size: 12px;
    color: #9ca3af;
}

.mfe-add-rule-group-btn {
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #0073aa;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    transition: background .15s, border-color .15s;
}

.mfe-add-rule-group-btn:hover {
    background: #f0f7fb;
    border-color: #0073aa;
}

/* Presentation/Group Settings */
.mfe-presentation-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.mfe-presentation-row:last-child {
    border-bottom: none;
}

.mfe-presentation-label {
    width: 28%;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    flex-shrink: 0;
}

.mfe-presentation-input {
    flex: 1;
}

.mfe-presentation-input select,
.mfe-presentation-input input[type="text"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
}

/* ── Conditional logic ── */
.mfe-condition-rules-wrap {
    margin-top: 14px;
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.mfe-rule-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.mfe-rule-row .mfe-rule-field {
    flex: 2;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #1d2327;
    background: #fff;
}

.mfe-rule-row .mfe-rule-operator {
    flex: 1.4;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #1d2327;
    background: #fff;
}

.mfe-rule-row .mfe-rule-value {
    flex: 1.4;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #1d2327;
    background: #fff;
}

.mfe-rule-row select:focus,
.mfe-rule-row input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, .12);
    outline: none;
}

.mfe-remove-rule {
    flex-shrink: 0;
    background: #fff !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 6px !important;
    color: #ef4444 !important;
    padding: 4px 9px !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.mfe-remove-rule:hover {
    background: #fef2f2 !important;
}

.mfe-add-rule {
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #0073aa;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}

.mfe-add-rule:hover {
    background: #f0f7fb;
}

.tablenav {
    padding-top: 10px;
}


/* ── Misc (builder) ── */
.mfe-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Saved badge inside top bar */
.mfe-saved-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #6ee7b7;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    animation: mfe-badge-appear 0.3s ease, mfe-badge-fade 0.5s ease 4s forwards;
    white-space: nowrap;
}

.mfe-saved-badge .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #059669;
}

@keyframes mfe-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mfe-badge-appear {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes mfe-badge-fade {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* Builder select dropdown arrow */
.mfe-wrap select:not([multiple]) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 30px !important;
}

/* Sub-field duplicate button alignment */
.mfe-sf-row-header .mfe-cell-actions,
.mfe-sub-field-row .mfe-cell-actions {
    display: flex;
    align-items: center;
}

/* SortableJS Feedback Classes */
.mfe-sortable-ghost {
    opacity: 0.4;
    background: #f0f7fb !important;
    border: 2px dashed #0073aa !important;
}

.mfe-sortable-drag {
    background: #fff !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    z-index: 999999 !important;
}

.mfe-card-body {
    padding: 10px;
}

/* ══════════════════════════════════════════
   AI CHATBOT PANEL
══════════════════════════════════════════ */
#mfe-ai-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

.mfe-ai-chat-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 420px;
    max-width: 95vw;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    border-left: 3px solid #8b5cf6;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.mfe-ai-chat-panel.mfe-chat-open {
    transform: translateX(0);
}

/* Header */
.mfe-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    flex-shrink: 0;
}

.mfe-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mfe-chat-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mfe-chat-avatar .dashicons {
    color: #fff;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mfe-chat-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.mfe-chat-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

.mfe-chat-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.mfe-chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mfe-chat-close-btn .dashicons {
    color: #fff;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Messages area */
.mfe-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f9fafb;
    scroll-behavior: smooth;
}

.mfe-chat-bubble {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 100%;
    animation: mfeBubbleIn 0.25s ease forwards;
}

@keyframes mfeBubbleIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mfe-chat-ai {
    flex-direction: row;
}

.mfe-chat-user {
    flex-direction: row-reverse;
}

.mfe-bubble-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.mfe-chat-user .mfe-bubble-avatar {
    background: #2271b1;
}

.mfe-bubble-avatar .dashicons {
    color: #fff;
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mfe-bubble-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    border-top-left-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    max-width: calc(100% - 44px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.mfe-chat-user .mfe-bubble-content {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
    border-radius: 12px;
    border-top-right-radius: 4px;
}

.mfe-bubble-content p {
    margin: 0 0 6px;
}

.mfe-bubble-content p:last-child {
    margin-bottom: 0;
}

/* Success bubble (after fields generated) */
.mfe-bubble-success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534 !important;
}

/* Warning/upgrade notice bubble (e.g. repeater→group Free conversion) */
.mfe-bubble-warn {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}

.mfe-bubble-warn a {
    color: #7c3aed !important;
    text-decoration: underline;
}

.mfe-bubble-warn a:hover {
    color: #5b21b6 !important;
}

/* Typing dots */
.mfe-typing-dots {
    display: flex;
    gap: 5px;
    padding: 4px 2px;
}

.mfe-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8b5cf6;
    animation: mfeTyping 1.2s infinite ease-in-out;
}

.mfe-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.mfe-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes mfeTyping {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Input area */
.mfe-chat-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.mfe-chat-textarea {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-height: 120px;
    overflow-y: auto;
}

.mfe-chat-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.mfe-chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #7c3aed;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.mfe-chat-send-btn:hover {
    background: #6d28d9;
    transform: scale(1.08);
}

.mfe-chat-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mfe-chat-send-btn .dashicons {
    color: #fff;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Footer */
.mfe-chat-footer {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    padding: 6px 16px 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

/* --- Code Generator Modal --- */
.metaforge-template-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: mfeFadeIn 0.2s ease;
}

.metaforge-template-modal-overlay[style*="display: block"] {
    display: flex !important;
}

.metaforge-template-modal-box {
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: mfeSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metaforge-template-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.metaforge-template-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metaforge-template-modal-title .dashicons {
    color: #6366f1;
}

.metaforge-template-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metaforge-template-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.metaforge-template-modal-close:hover {
    background: #f1f5f9;
    color: #ef4444;
}

.metaforge-template-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.mfe-code-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.mfe-code-viewport {
    background: #0f172a;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow-x: auto;
}

.mfe-code-viewport pre {
    margin: 0;
    padding: 0;
    font-family: 'Fira Code', 'Cascadia Code', Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #f8fafc;
}

.mfe-code-viewport code {
    background: transparent;
    color: inherit;
    padding: 0;
}

@keyframes mfeFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mfeSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Multi-Select (select[multiple]) ─────────────────────────────────────── */
.mfe-input select[multiple] {
    width: 100%;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    padding: 4px 0;
    font-size: 13px;
    font-family: inherit;
    color: #1e1e1e;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color .15s;
    appearance: none;
    -webkit-appearance: none;
}

.mfe-input select[multiple]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.mfe-input select[multiple] option {
    padding: 6px 10px;
    line-height: 1.6;
    cursor: pointer;
}

.mfe-input select[multiple] option:checked {
    background: #2271b1;
    color: #fff;
}

.mfe-input select[multiple] option:hover {
    background: #f0f6fc;
}

.mfe-input small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 11px;
}

/* ── Taxonomy slug row in builder ─────────────────────────────────────────── */
.mfe-taxonomy-slug-row select {
    min-width: 260px;
    max-width: 100%;
    border: 1px solid #dcdcde;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
    color: #1e1e1e;
    transition: border-color .15s;
}

.mfe-taxonomy-slug-row select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
    outline: none;
}

/* --- Field Group List Table Enhancements --- */
.wp-list-table .column-cb {
    width: 30px !important;
    padding-right: 0 !important;
}

.wp-list-table .column-order {
    width: 30px !important;
}

/* --- Post Order Styles --- */
.mfe-sortable-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mfe-sortable-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    transition: background 0.2s;
}

.mfe-sortable-item:last-child {
    border-bottom: none;
}

.mfe-sortable-item:hover {
    background: #f8fafc;
}

.mfe-sortable-handle {
    cursor: grab;
    color: #94a3b8;
    margin-right: 20px;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.mfe-sortable-handle:hover {
    background: #f1f5f9;
    color: var(--mfe-primary);
}

.mfe-sortable-handle:active {
    cursor: grabbing;
}

.mfe-sortable-title {
    flex: 1;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.mfe-item-id {
    color: #94a3b8;
    font-size: 11px;
    margin-left: 12px;
    font-weight: normal;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.mfe-sortable-item.sortable-ghost {
    opacity: 0.4;
    background: #f0f6fa;
    border: 1px dashed var(--mfe-primary);
}

.mfe-no-items {
    padding: 60px;
    text-align: center;
    color: #64748b;
    font-style: italic;
}

/* --- Location Tags in List Table --- */
.mfe-location-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
    border: 1px solid #e2e8f0;
}

/* --- Drag Handles --- */
.mfe-group-drag-handle,
.mfe-location-drag-handle {
    cursor: move;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.mfe-group-drag-handle:hover,
.mfe-location-drag-handle:hover {
    opacity: 1;
    color: var(--mfe-primary);
}

.mfe-location-rule-placeholder {
    background: #f8fafc;
    border: 1px dashed var(--mfe-primary);
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Custom Notice Styles (Prevent WP Core from moving/disrupting header layout) */
/* Custom Notice Styles (Prevent WP Core from moving/disrupting header layout) */
.mfe-notice-error,
.mfe-notice-warning {
    position: relative;
    margin: 20px 0;
    padding: 12px 40px 12px 20px;
    border-radius: var(--mfe-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid transparent;
    animation: mfe-notice-appear 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mfe-notice-success {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex !important;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    padding: 16px 48px 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35), 0 2px 8px rgba(0, 0, 0, 0.12);
    border: none;
    margin: 0;
    min-width: 200px;
    animation: mfe-toast-appear 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mfe-notice-success p {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff !important;
    line-height: 22px;
    letter-spacing: 0.1px;
}

.mfe-notice-success .mfe-notice-icon {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    margin-right: 10px;
    font-size: 14px !important;
    flex-shrink: 0;
}

.mfe-notice-error {
    background: #fef2f2;
    border-color: #fecaca;
    border-left: 4px solid #dc2626;
}

.mfe-notice-error p {
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    line-height: 20px;
}

.mfe-notice-warning {
    background: #fffbeb;
    border-color: #fef3c7;
    border-left: 4px solid #d97706;
}

.mfe-notice-warning p {
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
    line-height: 20px;
}

.mfe-notice-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: opacity 0.15s, background-color 0.15s, transform 0.15s !important;
    opacity: 0.75 !important;
}

.mfe-notice-close:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.2);
}

.mfe-notice-error .mfe-notice-close:hover,
.mfe-notice-warning .mfe-notice-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

@keyframes mfe-notice-appear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mfe-toast-appear {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Hide default WordPress admin notices on MetaForge pages */
body[class*="metaforge"] div.updated:not([class*="mfe-"]),
body[class*="metaforge"] div.error:not([class*="mfe-"]),
body[class*="metaforge"] div.notice:not([class*="mfe-"]),
body[class*="metaforge"] .update-nag {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   MFE LIST TABLE — Premium Redesign
   Applies to: Field Groups, Post Types, Taxonomies, Options Pages
══════════════════════════════════════════════════════════════ */

/* ── List Form wrapper ─────────────────────────────────────── */
.mfe-list-form {
    margin-top: 0;
    padding: 0 0 24px;
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: 1px solid #c8ccd0 !important;

}

.mfe-list-form input[type=checkbox]:focus,
.mfe-list-form input[type=radio]:focus {
    border-color: var(--mfe-primary, #2271b1) !important;
    box-shadow: 0 0 0 1px var(--mfe-primary, #2271b1) !important;
    outline: 2px solid transparent !important;
}

/* ── Search Box ─────────────────────────────────────────────── */
.mfe-list-form .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.mfe-list-form .search-box input[type="search"] {
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--mfe-border);
    border-radius: var(--mfe-radius);
    font-size: 13px;
    color: var(--mfe-text-dark);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 260px;
    height: 36px;
}

.mfe-list-form .search-box input[type="search"]:focus {
    outline: none;
    border-color: var(--mfe-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.12);
}

.mfe-list-form .search-box input[type="submit"] {
    height: 36px;
    padding: 0 16px;
    background: var(--mfe-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--mfe-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.mfe-list-form .search-box input[type="submit"]:hover {
    background: var(--mfe-primary-hover);
}

/* ── Table container card ──────────────────────────────────── */
.mfe-list-form .wp-list-table {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-collapse: separate !important;
    width: 100% !important;
    background: #fff;
}

/* ── Table Head ─────────────────────────────────────────────── */
.mfe-list-form .wp-list-table thead tr,
.mfe-list-form .wp-list-table tfoot tr {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.mfe-list-form .wp-list-table thead th,
.mfe-list-form .wp-list-table tfoot th,
.mfe-list-form .wp-list-table thead td,
.mfe-list-form .wp-list-table tfoot td {
    border-bottom: 2px solid #e5e7eb !important;
    border-top: none !important;
    padding: 12px 16px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #64748b !important;
    white-space: nowrap;
}

.mfe-list-form .wp-list-table thead th a,
.mfe-list-form .wp-list-table tfoot th a {
    color: #64748b !important;
    font-weight: 700 !important;
}

.mfe-list-form .wp-list-table thead th a:hover,
.mfe-list-form .wp-list-table tfoot th a:hover {
    color: var(--mfe-primary) !important;
}

/* ── Table Rows ─────────────────────────────────────────────── */
.mfe-list-form .wp-list-table tbody tr {
    background: #fff;
    transition: background 0.15s;
    border-bottom: 1px solid #f1f5f9 !important;
}

.mfe-list-form .wp-list-table tbody tr:last-child {
    border-bottom: none !important;
}

.mfe-list-form .wp-list-table tbody tr:hover {
    background: #f8faff !important;
}

.mfe-list-form .wp-list-table tbody tr:hover td,
.mfe-list-form .wp-list-table tbody tr:hover th {
    background: transparent !important;
}

/* Alternate row subtle tint */
.mfe-list-form .wp-list-table tbody tr.alternate {
    background: #fdfdfd;
}

.mfe-list-form .wp-list-table tbody tr.alternate:hover {
    background: #f8faff !important;
}

/* ── Table Cells ─────────────────────────────────────────────── */
.mfe-list-form .wp-list-table td {
    padding: 14px 16px !important;
    font-size: 13px !important;
    color: #374151 !important;
    vertical-align: middle !important;
    border-top: none !important;
}

/* ── Title column ────────────────────────────────────────────── */
.mfe-list-form .wp-list-table td.column-title strong a,
.mfe-list-form .wp-list-table td.column-title .row-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    transition: color 0.15s;
}

.mfe-list-form .wp-list-table td.column-title strong a:hover,
.mfe-list-form .wp-list-table td.column-title .row-title:hover {
    color: var(--mfe-primary) !important;
}

/* ── Row Actions (Edit / Delete links) ───────────────────────── */
.mfe-list-form .wp-list-table .row-actions {
    font-size: 12px !important;
    margin-top: 4px;
    color: #94a3b8 !important;
}

.mfe-list-form .wp-list-table .row-actions span a {
    color: #64748b !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.mfe-list-form .wp-list-table .row-actions span a:hover {
    color: var(--mfe-primary) !important;
    text-decoration: underline;
}

.mfe-list-form .wp-list-table .row-actions .delete a,
.mfe-list-form .wp-list-table .row-actions .trash a {
    color: #94a3b8 !important;
}

.mfe-list-form .wp-list-table .row-actions .delete a:hover,
.mfe-list-form .wp-list-table .row-actions .trash a:hover {
    color: #ef4444 !important;
}

/* ── Slug / code cells ───────────────────────────────────────── */
.mfe-list-form .wp-list-table td.column-slug code,
.mfe-list-form .wp-list-table td code {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

/* ── Yes / No badge cells ────────────────────────────────────── */
.mfe-list-form .wp-list-table td.column-rest_api,
.mfe-list-form .wp-list-table td.column-hierarchical {
    font-size: 12px !important;
    font-weight: 600;
}

/* ── Supports cell ───────────────────────────────────────────── */
.mfe-list-form .wp-list-table td.column-supports {
    font-size: 12px !important;
    color: #64748b !important;
}

/* ── Fields count badge ──────────────────────────────────────── */
.mfe-list-form .wp-list-table td.column-fields {
    font-size: 13px !important;
    font-weight: 700;
    color: var(--mfe-primary) !important;
}

/* ── Checkbox column ─────────────────────────────────────────── */
.mfe-list-form .wp-list-table th.column-cb,
.mfe-list-form .wp-list-table td.column-cb {
    width: 38px !important;
    padding: 12px 12px 12px 16px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.mfe-list-form .wp-list-table .column-cb input[type="checkbox"] {
    margin: 0 auto !important;
    vertical-align: middle !important;
    accent-color: var(--mfe-primary);
}

/* ── Drag handle column ──────────────────────────────────────── */
.mfe-list-form .wp-list-table .column-order {
    width: 40px !important;
    text-align: center !important;
    padding: 14px 8px !important;
}

/* ── No items found state ────────────────────────────────────── */
.mfe-list-form .wp-list-table td.colspanchange {
    padding: 48px 24px !important;
    text-align: center !important;
    color: #94a3b8 !important;
    font-size: 14px !important;
    font-style: italic;
    background: #fafafa !important;
}

/* ── List Table Container & Jerk Prevention ───────────────────── */
.mfe-list-form {
    min-height: 520px !important;
    display: flex !important;
    flex-direction: column !important;
}

.mfe-list-form .wp-list-table {
    margin-bottom: 0 !important;
}

.mfe-list-form .wp-list-table tbody {
    min-height: 380px;
}

/* ── Bulk Actions & Tablenav Bar ─────────────────────────────── */
.mfe-list-form .tablenav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    padding: 10px 16px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 52px !important;
}

.mfe-list-form .tablenav.top {
    border-bottom: 1px solid #f1f5f9 !important;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    margin: 12px 0 0 0 !important;
}

.mfe-list-form .tablenav.bottom {
    border-top: none !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    margin: 0 0 24px 0 !important;
    background: #f8fafc !important;
}

.mfe-list-form .tablenav .actions.bulkactions,
.mfe-list-form .tablenav .actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.mfe-list-form .tablenav .actions select {
    display: inline-flex !important;
    align-items: center !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    line-height: 30px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0 32px 0 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px 14px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.mfe-list-form .tablenav .actions select:hover {
    border-color: #94a3b8 !important;
}

.mfe-list-form .tablenav .actions select:focus {
    border-color: var(--mfe-primary, #2271b1) !important;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2) !important;
}

.mfe-list-form .tablenav .actions input[type="submit"],
.mfe-list-form .tablenav .actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    line-height: 30px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: #ffffff !important;
    color: #334155 !important;
    cursor: pointer !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.15s ease !important;
}

.mfe-list-form .tablenav .actions input[type="submit"]:hover,
.mfe-list-form .tablenav .actions .button:hover {
    border-color: var(--mfe-primary, #2271b1) !important;
    color: var(--mfe-primary, #2271b1) !important;
    background: #eff6ff !important;
}

/* ── Modern Pagination UI ─────────────────────────────────────── */
.mfe-list-form .tablenav .tablenav-pages {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
    float: none !important;
    height: auto !important;
    font-size: 13px !important;
    color: #64748b !important;
}

/* Item Count Badge */
.mfe-list-form .tablenav .displaying-num {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    height: 30px !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* Pagination Links & Nav Buttons */
.mfe-list-form .tablenav .pagination-links {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.mfe-list-form .tablenav-pages .pagination-links a,
.mfe-list-form .tablenav-pages .pagination-links .tablenav-pages-navspan {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    border: 1.5px solid #cbd5e1 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    color: #1e293b !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.mfe-list-form .tablenav-pages .pagination-links a:hover {
    background: var(--mfe-primary, #2271b1) !important;
    border-color: var(--mfe-primary, #2271b1) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(34, 113, 177, 0.3) !important;
    transform: translateY(-1px) !important;
}

.mfe-list-form .tablenav-pages .pagination-links .tablenav-pages-navspan.disabled {
    color: #cbd5e1 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
}

/* Paging Input & Total Pages Text */
.mfe-list-form .tablenav-pages .paging-input {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin: 0 4px !important;
}

.mfe-list-form .tablenav-pages .paging-input input.current-page {
    width: 44px !important;
    height: 32px !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.mfe-list-form .tablenav-pages .paging-input input.current-page:focus {
    border-color: var(--mfe-primary, #2271b1) !important;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.25) !important;
    outline: none !important;
}

.mfe-list-form .tablenav-pages .tablenav-paging-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.mfe-list-form .tablenav-pages .total-pages {
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* ── Location tags (field groups list) ───────────────────────── */
.mfe-location-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px 2px 2px 0;
    border: 1px solid #bfdbfe;
    letter-spacing: 0.02em;
}

/* ── Yes/No pill indicators ──────────────────────────────────── */
.mfe-list-form .wp-list-table td.column-rest_api::before,
.mfe-list-form .wp-list-table td.column-hierarchical::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

/* Colour the dot based on text — JS-free trick using has() */
.mfe-list-form .wp-list-table td.column-rest_api:has(*) {
    /* handled by text content, dots via inline attr trick */
}

/* ══════════════════════════════════════════════════════════════
   LIST PAGE — Spacing, Search & Drag Handle Overhaul
══════════════════════════════════════════════════════════════ */

/* ── 1. Top bar layout with center search slot ───────────────── */
.mfe-top-bar {
    gap: 16px;
}

.mfe-top-bar-left h1 {
    white-space: nowrap;
}

/* Center slot — flexible search form */
.mfe-top-bar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    max-width: 440px;
}

/* ── 2. Inline search form (inside top bar) ──────────────────── */
.mfe-search-form {
    width: 100%;
}

.mfe-search-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    height: 38px;
}

.mfe-search-wrap:focus-within {
    background: #fff;
    border-color: var(--mfe-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.mfe-search-icon {
    display: flex;
    align-items: center;
    padding: 0 10px 0 12px;
    color: #94a3b8;
    flex-shrink: 0;
    pointer-events: none;
}

.mfe-search-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mfe-search-wrap input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 8px 0 0;
    font-size: 13px;
    color: #1e293b;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
}

.mfe-search-wrap input[type="search"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Remove browser cancel (×) button from search inputs */
.mfe-search-wrap input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.mfe-search-wrap button[type="submit"] {
    flex-shrink: 0;
    height: 38px;
    padding: 0 18px;
    background: var(--mfe-primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.mfe-search-wrap button[type="submit"]:hover {
    background: var(--mfe-primary-hover);
}

/* ── 3. Hide the WP default search_box ───────────────────────── */
/* We moved search into the top bar via a custom .mfe-search-form */
.mfe-list-form p.search-box {
    display: none !important;
}

/* ── 4. Remove gap between top bar and list form ─────────────── */
.mfe-wrap:has(.mfe-list-form) .mfe-top-bar {
    margin-bottom: 0 !important;
}

.mfe-list-form {
    margin-top: 0;
    padding: 16px 0 24px;
}

/* ── 5. Bulk actions toolbar — clean, compact, no float mess ─── */
.mfe-list-form .tablenav.top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 12px;
    margin: 0;
    border: none;
    height: auto;
}

.mfe-list-form .tablenav.top .actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mfe-list-form .tablenav.top .actions select {
    height: 34px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 0 28px 0 10px;
    font-size: 13px;
    color: #374151;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.mfe-list-form .tablenav.top .actions select:focus {
    border-color: var(--mfe-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.mfe-list-form .tablenav.top .actions input[type="submit"],
.mfe-list-form .tablenav.top .button {
    height: 34px;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: #fff !important;
    color: #374151 !important;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: none !important;
    line-height: 34px !important;
}

.mfe-list-form .tablenav.top .actions input[type="submit"]:hover,
.mfe-list-form .tablenav.top .button:hover {
    border-color: var(--mfe-primary) !important;
    color: var(--mfe-primary) !important;
    background: var(--mfe-primary-soft) !important;
}

.mfe-list-form .tablenav.top .displaying-num {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

/* Move pagination to the right */
.mfe-list-form .tablenav.top .tablenav-pages {
    margin-left: auto;
}

/* ── 6. Hide bottom tablenav (duplicate of top) ──────────────── */
/* WP renders thead+tfoot; hide bottom bulk bar but keep pagination */
.mfe-list-form .tablenav.bottom .actions {
    display: none !important;
}

.mfe-list-form .tablenav.bottom {
    padding: 8px 0 0;
}

.mfe-list-form .tablenav.bottom .tablenav-pages {
    justify-content: flex-end;
}

/* ── 7. Drag handle reset — SVG handled in title column ────────── */
.mfe-cell-drag {
    width: 24px;
    flex-shrink: 0;
}

/* Drag column — compact */
.mfe-list-form .wp-list-table td.column-order,
.mfe-list-form .wp-list-table th.column-order {
    width: 36px !important;
    padding: 0 8px !important;
    text-align: center !important;
}

/* ── 8. Remove WP default floats that break our layout ───────── */
.mfe-list-form .tablenav .tablenav-pages,
.mfe-list-form .tablenav .actions {
    float: none !important;
}

.mfe-list-form .tablenav:after {
    display: none !important;
}

/* ── 9. Sortable drag visual feedback ────────────────────────── */
.mfe-list-form .wp-list-table tbody tr.ui-sortable-helper {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    background: #fff !important;
    outline: 2px solid var(--mfe-primary);
    border-radius: 6px;
    opacity: 0.98;
}

.mfe-list-form .wp-list-table tbody tr.ui-sortable-placeholder {
    visibility: visible !important;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe) !important;
    border: 2px dashed #93c5fd !important;
    height: 52px;
}

/* ── 10. Sticky top bar shadow when scrolled ──────────────────── */
.mfe-top-bar.is-stuck {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ══════════════════════════════════════════════════════════════
   LIST TABLE BUG-FIX PATCH
   – Overlap fix, compact rows, tfoot hide, toast
══════════════════════════════════════════════════════════════ */

/* ── Views list (All, Trash, etc.) alignment ── */
.mfe-list-form .subsubsub,
.mfe-wrap .subsubsub {
    margin: 8px 0 14px 0 !important;
    padding: 0 !important;
    list-style: none;
    font-size: 13px;
    color: #64748b;
    float: none;
}

.mfe-wrap>.subsubsub {
    margin: 8px 28px 14px 28px !important;
}

@media screen and (max-width: 782px) {
    .mfe-wrap>.subsubsub {
        margin: 8px 14px 14px 14px !important;
    }
}

/* ── A. Non-sticky top bar on list pages (avoids overlap) ────── */
/* List pages don't need a sticky header – only the builder does */
.mfe-wrap:has(.mfe-list-form) .mfe-top-bar {
    position: relative !important;
    top: auto !important;
    margin-bottom: 0 !important;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #f0f4f8;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* ── B. Hide the duplicate tfoot (bottom TITLE/GROUP KEY row) ─── */
.mfe-list-form .wp-list-table tfoot {
    display: none !important;
}

/* ── C. Compact rows — reduce the double-height ──────────────── */
.mfe-list-form .wp-list-table td {
    padding: 10px 16px !important;
    vertical-align: middle !important;
}

/*.mfe-list-form .wp-list-table th,*/
/*.mfe-list-form .wp-list-table thead td {*/
/*    padding: 10px 16px !important;*/
/*}*/

/* ── D. Fix title column — no strikethrough, no text-decoration  */
.mfe-list-form .wp-list-table td.column-title a,
.mfe-list-form .wp-list-table td.column-title a:hover,
.mfe-list-form .wp-list-table td.column-title strong a,
.mfe-list-form .wp-list-table td.column-title .row-title,
.mfe-list-form .wp-list-table td.column-title .row-title:hover {
    text-decoration: none !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.mfe-list-form .wp-list-table td.column-title .row-title:hover {
    color: var(--mfe-primary) !important;
}

/* ── E. Row actions — visible without hover ─────────────────── */
.mfe-wrap .wp-list-table .row-actions,
.mfe-list-form .wp-list-table .row-actions,
.mfe-title-content .row-actions,
.wp-list-table .row-actions {
    position: static !important;
    left: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    margin-top: 5px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.mfe-wrap .wp-list-table .row-actions span,
.mfe-list-form .wp-list-table .row-actions span {
    display: inline !important;
    color: #cbd5e1 !important;
}

.mfe-wrap .wp-list-table .row-actions span a,
.mfe-list-form .wp-list-table .row-actions span a {
    color: #2271b1 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 0 1px !important;
    transition: color 0.15s ease !important;
}

.mfe-wrap .wp-list-table .row-actions span a:hover,
.mfe-list-form .wp-list-table .row-actions span a:hover {
    color: #135e96 !important;
    text-decoration: underline !important;
}

.mfe-wrap .wp-list-table .row-actions span.duplicate a,
.mfe-list-form .wp-list-table .row-actions span.duplicate a {
    color: #2563eb !important;
}

.mfe-wrap .wp-list-table .row-actions span.delete a,
.mfe-wrap .wp-list-table .row-actions span.trash a,
.mfe-list-form .wp-list-table .row-actions span.delete a,
.mfe-list-form .wp-list-table .row-actions span.trash a {
    color: #dc2626 !important;
}

.mfe-wrap .wp-list-table .row-actions span.delete a:hover,
.mfe-wrap .wp-list-table .row-actions span.trash a:hover {
    color: #b91c1c !important;
}

/* ── F. Modern List Form & Tablenav ───── */
.mfe-list-form {
    margin-top: 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.mfe-list-form .tablenav.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 12px 0 !important;
    background: transparent !important;
    border: none !important;
    margin-bottom: 0 !important;
    height: auto;
}

.mfe-list-form .tablenav.top::after,
.mfe-list-form .tablenav.bottom::after {
    content: none !important;
    display: none !important;
    clear: none !important;
}

.mfe-list-form .tablenav.bottom {
    padding: 12px 0 0 !important;
    border-top: none !important;
    background: transparent !important;
}

.mfe-list-form .tablenav.bottom .tablenav-pages {
    float: none !important;
    display: flex;
    justify-content: flex-end;
}

/* ── G. Table Alignment & Cell Layout ─────── */
.mfe-list-form .wp-list-table {
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid #c3c4c7 !important;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    background: #ffffff;
    width: 100% !important;
    table-layout: fixed;
}

.mfe-list-form .wp-list-table thead th {
    background: #f8fafc !important;
    border-bottom: 1px solid #dcdcde !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 11px 16px !important;
    vertical-align: middle !important;
}

.mfe-list-form .wp-list-table tbody tr {
    background: #ffffff;
    transition: background 0.12s ease;
}

.mfe-list-form .wp-list-table tbody tr:hover {
    background: #f8fafc !important;
}

.mfe-list-form .wp-list-table tbody td,
.mfe-list-form .wp-list-table tbody th {
    border-bottom: 1px solid #f0f0f1 !important;
    border-top: none !important;
    vertical-align: middle !important;
    padding: 12px 16px !important;
}

.mfe-list-form .wp-list-table tbody tr:last-child td,
.mfe-list-form .wp-list-table tbody tr:last-child th {
    border-bottom: none !important;
}

/* Checkbox Column */
.mfe-list-form .wp-list-table th.check-column,
.mfe-list-form .wp-list-table td.check-column,
.mfe-list-form .wp-list-table th.column-cb,
.mfe-list-form .wp-list-table td.column-cb {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 12px 0 12px 14px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.mfe-list-form .wp-list-table .check-column input[type="checkbox"],
.mfe-list-form .wp-list-table .column-cb input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    border: 1.5px solid #8c8f94 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
}

.mfe-list-form .wp-list-table .check-column input[type="checkbox"]::before,
.mfe-list-form .wp-list-table .column-cb input[type="checkbox"]::before {
    display: none !important;
    content: none !important;
}

.mfe-list-form .wp-list-table .check-column input[type="checkbox"]:not(:checked),
.mfe-list-form .wp-list-table .column-cb input[type="checkbox"]:not(:checked) {
    background-color: #ffffff !important;
    border-color: #8c8f94 !important;
}

.mfe-list-form .wp-list-table .check-column input[type="checkbox"]:hover,
.mfe-list-form .wp-list-table .column-cb input[type="checkbox"]:hover {
    border-color: var(--mfe-primary, #2271b1) !important;
}

.mfe-list-form .wp-list-table .check-column input[type="checkbox"]:focus,
.mfe-list-form .wp-list-table .column-cb input[type="checkbox"]:focus {
    border-color: var(--mfe-primary, #2271b1) !important;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.25) !important;
    outline: none !important;
}

.mfe-list-form .wp-list-table .check-column input[type="checkbox"]:checked,
.mfe-list-form .wp-list-table .column-cb input[type="checkbox"]:checked {
    background-color: var(--mfe-primary, #2271b1) !important;
    border-color: var(--mfe-primary, #2271b1) !important;
    background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34%20.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E") !important;
    background-size: 14px 14px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Title Column & Inline Drag Handle */
.mfe-list-form .wp-list-table th.column-title,
.mfe-list-form .wp-list-table td.column-title {
    width: 35% !important;
    text-align: left !important;
}

.mfe-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mfe-group-drag-handle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 20px !important;
    color: #94a3b8 !important;
    cursor: grab !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    border-radius: 4px !important;
    background: transparent !important;
    background-image: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.15s ease, visibility 0.15s ease, color 0.15s ease, background 0.15s ease !important;
    position: static !important;
    top: auto !important;
}

.mfe-group-drag-handle svg {
    display: block !important;
    width: 10px !important;
    height: 16px !important;
    fill: currentColor !important;
}

.mfe-list-form .wp-list-table tbody tr:hover .mfe-group-drag-handle,
.wp-list-table tbody tr:hover .mfe-group-drag-handle {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    color: #64748b !important;
}

.mfe-list-form .wp-list-table tbody tr:hover .mfe-group-drag-handle:hover,
.wp-list-table tbody tr:hover .mfe-group-drag-handle:hover {
    color: #2271b1 !important;
    background: #e2e8f0 !important;
}

.mfe-group-drag-handle:active {
    cursor: grabbing !important;
}

.mfe-title-content {
    flex: 1;
    min-width: 0;
}

.mfe-title-content strong a,
.mfe-title-content .row-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.mfe-title-content strong a:hover,
.mfe-title-content .row-title:hover {
    color: #2271b1 !important;
}

/* Key & Slug Columns */
.mfe-list-form .wp-list-table th.column-key,
.mfe-list-form .wp-list-table td.column-key,
.mfe-list-form .wp-list-table th.column-slug,
.mfe-list-form .wp-list-table td.column-slug {
    width: 24% !important;
    text-align: left !important;
}

.mfe-list-form .wp-list-table td.column-key code,
.mfe-list-form .wp-list-table td.column-slug code {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
}

/* Location & Parent Columns */
.mfe-list-form .wp-list-table th.column-post_type,
.mfe-list-form .wp-list-table td.column-post_type,
.mfe-list-form .wp-list-table th.column-parent,
.mfe-list-form .wp-list-table td.column-parent {
    width: 25% !important;
    text-align: left !important;
}

.mfe-location-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2.5px 9px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    margin: 2px 4px 2px 0;
    line-height: 1.4;
    border: 1px solid #bae6fd;
}

/* Fields Column */
.mfe-list-form .wp-list-table th.column-fields,
.mfe-list-form .wp-list-table td.column-fields {
    width: 16% !important;
    text-align: left !important;
}

/* Supports, REST API, Post Types & Hierarchical Columns */
.mfe-list-form .wp-list-table th.column-supports,
.mfe-list-form .wp-list-table td.column-supports {
    width: 25% !important;
    text-align: left !important;
}

.mfe-list-form .wp-list-table th.column-post_types,
.mfe-list-form .wp-list-table td.column-post_types {
    width: 25% !important;
    text-align: left !important;
}

.mfe-list-form .wp-list-table th.column-hierarchical,
.mfe-list-form .wp-list-table td.column-hierarchical {
    width: 15% !important;
    text-align: left !important;
}

.mfe-list-form .wp-list-table th.column-rest_api,
.mfe-list-form .wp-list-table td.column-rest_api {
    width: 15% !important;
    text-align: left !important;
}

/* ── H. Drag success toast notification ───────────────────────── */
#mfe-drag-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    padding: 12px 20px 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35), 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    pointer-events: none;
    letter-spacing: 0.01em;
}

#mfe-drag-toast.mfe-toast-show {
    transform: translateY(0);
    opacity: 1;
}

#mfe-drag-toast .mfe-toast-icon {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#mfe-drag-toast .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fff;
}

#mfe-drag-toast.mfe-toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35), 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── I. Wrap the list table in a proper container ────────────── */
.mfe-list-form .wp-list-table {
    border-top: none !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* The outer .mfe-list-form provides the card shell */
.mfe-wrap:has(.mfe-list-form) .mfe-top-bar+.mfe-list-form {
    margin-top: 0;
}

/* ── J. Search form top-bar alignment ────────────────────────── */
.mfe-top-bar-center {
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
    max-width: 380px;
}

.mfe-search-wrap {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

input[type=checkbox]:focus,
input[type=radio]:focus {
    border-color: var(--mfe-primary, #2271b1);
    box-shadow: 0 0 0 1px var(--mfe-primary, #2271b1);
    outline: 2px solid transparent;
}

/* Premium Setup/Changelog Notice style */
.mfe-wrap .mfe-changelog-notice {
    position: relative;
    margin: 20px 0 24px 0 !important;
    padding: 20px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #8b5cf6 !important;
    /* purple accent line */
    background: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
}

.mfe-wrap .mfe-changelog-notice p {
    margin: 0 0 12px 0;
}

.mfe-wrap .mfe-changelog-notice p:last-of-type {
    margin-bottom: 0;
}

.mfe-wrap .mfe-changelog-notice .mfe-dismiss-btn {
    margin-top: 10px;
}

/* PHP Code Syntax Highlighting */
.mfe-code-comment {
    color: #64748b;
    font-style: italic;
}

.mfe-code-string {
    color: #38bdf8;
}

.mfe-code-tag {
    color: #f43f5e;
    font-weight: bold;
}

.mfe-code-variable {
    color: #fbbf24;
}

.mfe-code-keyword {
    color: #c084fc;
    font-weight: 600;
}

/* Expand Chevron Rotation & Immediate Animation Toggle Fix */
.mfe-expand-arrow {
    transition: transform 0.15s ease !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.mfe-field-wrap.is-open>.mfe-field-header .mfe-expand-arrow,
.mfe-field-wrap.is-open>.mfe-sf-row-header .mfe-expand-arrow {
    transform: rotate(90deg) !important;
}

/* --- SORTABLE LIST STYLES --- */
.mfe-sortable-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mfe-sortable-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    transition: background 0.2s;
}

.mfe-sortable-item:last-child {
    border-bottom: none;
}

.mfe-sortable-item:hover {
    background: #f8fafc;
}

.mfe-sortable-handle {
    cursor: grab;
    color: #94a3b8;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.mfe-sortable-handle:active {
    cursor: grabbing;
}

.mfe-sortable-title {
    flex: 1;
    font-weight: 500;
    color: #1e293b;
}

.mfe-item-id {
    color: #94a3b8;
    font-size: 11px;
    margin-left: 8px;
    font-weight: normal;
}

.mfe-sortable-item.sortable-ghost {
    opacity: 0.4;
    background: #e2e8f0;
}

.mfe-no-items {
    padding: 40px;
    text-align: center;
    color: #64748b;
}

/* ============================================================
   MetaForge Modern Navigation & UI Style Framework
   ============================================================ */

/* ── Top Dark Navigation Header Bar ── */
/* ── Top Dark Navigation Header Bar (Sales Site Palette) ── */
/* 1. Reset #wpcontent & #wpbody-content padding on MetaForge admin pages
      so the dark navigation header sits completely flush against the
      WordPress admin sidebar (expanded, folded/auto-folded, or mobile)
      with zero white gap on the left. */
#wpcontent:has(.mfe-wrap),
body.toplevel_page_metaforge #wpcontent,
body[class*="page_metaforge"] #wpcontent,
body[class*="page_mfe_"] #wpcontent,
body.auto-fold[class*="page_metaforge"] #wpcontent,
body.auto-fold[class*="page_mfe_"] #wpcontent,
body.folded[class*="page_metaforge"] #wpcontent,
body.folded[class*="page_mfe_"] #wpcontent,
body:has(.mfe-wrap) #wpcontent {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#wpbody-content:has(.mfe-wrap),
body.toplevel_page_metaforge #wpbody-content,
body[class*="page_metaforge"] #wpbody-content,
body[class*="page_mfe_"] #wpbody-content,
body:has(.mfe-wrap) #wpbody-content {
    padding-bottom: 40px;
    float: none !important;
}

/* 2. Reset .wrap.mfe-wrap to span 100% width with 0 margins */
html body.wp-admin .wrap.mfe-wrap,
html body.wp-admin .mfe-wrap,
body.auto-fold .wrap.mfe-wrap,
body.auto-fold .mfe-wrap,
body.folded .wrap.mfe-wrap,
body.folded .mfe-wrap,
.wrap.mfe-wrap,
.mfe-wrap {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 3. Top Dark Navigation Header Bar */
.mfe-nav-header {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #060914 !important;
    background-image: linear-gradient(180deg, #0d1428 0%, #060914 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0 28px !important;
    min-height: 76px !important;
    height: 76px !important;
    display: flex;
    align-items: center;
    box-sizing: border-box !important;
    position: relative;
    z-index: 1005;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}

@media screen and (max-width: 782px) {
    .mfe-nav-header {
        padding: 0 14px !important;
        min-height: 60px !important;
        height: auto !important;
    }
}

.mfe-nav-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 76px;
    height: 76px;
}

.mfe-nav-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* ── Brand Logo & PRO Badge ── */
.mfe-header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    padding: 0;
    border-radius: 10px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    flex-shrink: 0;
}

.mfe-header-brand:hover {
    transform: scale(1.06);
}

.mfe-brand-logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mfe-brand-logo-img {
    height: 50px !important;
    width: 50px !important;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    filter: drop-shadow(0 0 14px rgba(124, 58, 237, 0.65));
}

.mfe-brand-pro-pill {
    position: absolute;
    top: -5px;
    right: -10px;
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px;
    padding: 2.5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    line-height: 1;
    pointer-events: none;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
}

.mfe-header-brand-title {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin-left: 10px !important;
    letter-spacing: -0.2px !important;
    display: inline-block !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

/* ── Nav Tabs ── */
.mfe-main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfe-main-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8da2b5 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
}

.mfe-main-nav-item .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
    color: inherit;
}

.mfe-main-nav-item:hover {
    color: #f0f4f8 !important;
    background: rgba(255, 255, 255, 0.07);
}

.mfe-main-nav-item.is-active {
    color: #ffffff !important;
    background: rgba(124, 58, 237, 0.22) !important;
    border-color: rgba(124, 58, 237, 0.45) !important;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
    font-weight: 600;
}

/* ── "Further" / "More" Dropdown ── */
.mfe-main-nav-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1010;
}

.mfe-dropdown-arrow {
    font-size: 13px;
    width: 13px;
    height: 13px;
    margin-left: 2px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mfe-main-nav-dropdown:hover .mfe-dropdown-arrow,
.mfe-main-nav-dropdown.is-open .mfe-dropdown-arrow {
    transform: rotate(180deg);
}

.mfe-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: #0a0f1e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(124, 58, 237, 0.18);
    padding: 6px 0;
    z-index: 1020;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
    pointer-events: none;
}

/* Invisible bridge so mouse hover doesn't drop across the gap */
.mfe-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

.mfe-main-nav-dropdown.is-open .mfe-dropdown-menu,
.mfe-main-nav-dropdown:hover .mfe-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mfe-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #8da2b5 !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: all 0.15s ease;
}

.mfe-dropdown-link .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #63b3ed;
}

.mfe-dropdown-link:hover {
    color: #ffffff !important;
    background: rgba(124, 58, 237, 0.22) !important;
}

.mfe-dropdown-link.is-active {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12) !important;
    font-weight: 600;
}

/* ── Header Right: Pro CTA & Brand ── */
.mfe-nav-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mfe-btn-pro-cta {
    background: linear-gradient(135deg, #241a4f 0%, #0c0d1f 50%, #22194b 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 12px rgba(36, 26, 79, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.mfe-btn-pro-cta:hover {
    transform: translateY(-1.5px);
    background: linear-gradient(135deg, #31236b 0%, #151738 50%, #2e2266 100%) !important;
    box-shadow: 0 6px 20px rgba(36, 26, 79, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    opacity: 1;
}

.mfe-pro-sparkle {
    font-size: 13px;
    color: #ffffff;
    display: inline-block;
    animation: mfeSparkleAnim 2s ease-in-out infinite alternate;
}

@keyframes mfeSparkleAnim {
    0% {
        transform: scale(0.9) rotate(0deg);
        opacity: 0.85;
    }

    100% {
        transform: scale(1.2) rotate(15deg);
        opacity: 1;
    }
}

.mfe-pro-badge-tag {
    background: rgba(255, 255, 255, 0.22);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.2px;
}

.mfe-pro-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.14) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
}

.mfe-pro-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.mfe-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #8da2b5;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.2px;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.mfe-brand-badge:hover {
    color: #ffffff;
    opacity: 1;
}

.mfe-brand-badge:hover .mfe-brand-name {
    color: #ffffff;
}

.mfe-brand-icon {
    color: #38bdf8;
    flex-shrink: 0;
}

.mfe-brand-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    border-radius: 3px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.mfe-brand-badge:hover .mfe-brand-icon-img {
    transform: scale(1.08);
}

.mfe-brand-name {
    color: #8da2b5;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.15s ease;
}

/* ── Sub Header (Title + Inline Add New) Spacing & Sticky Behavior ── */
.mfe-sub-header {
    position: -webkit-sticky;
    position: sticky;
    top: 32px;
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px !important;
    box-sizing: border-box;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body:not(.admin-bar) .mfe-sub-header {
    top: 0;
}

@media screen and (max-width: 782px) {
    .mfe-sub-header {
        top: 46px;
        padding: 14px !important;
    }
}

.mfe-sub-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mfe-sub-header-left .mfe-page-title {
    order: 1;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
    padding: 0 !important;
    line-height: 1.2;
    text-transform: capitalize;
}

.mfe-sub-header-left .mfe-btn-add-new {
    order: 2;
    background: #2271b1;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #2271b1;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.mfe-btn-add-new .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
}

.mfe-btn-add-new:hover {
    background: #135e96;
    border-color: #135e96;
}

.mfe-sub-header-right {
    display: flex;
    align-items: center;
}

.mfe-sub-header-right .mfe-search-form {
    margin: 0;
    padding: 0;
}

.mfe-sub-header-right .mfe-search-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    overflow: hidden;
    height: 34px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.mfe-sub-header-right .mfe-search-wrap:focus-within {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.mfe-sub-header-right .mfe-search-icon {
    padding: 0 6px 0 10px;
    color: #8c8f94;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mfe-sub-header-right .mfe-search-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: #8c8f94;
}

.mfe-sub-header-right .mfe-search-wrap input[type="search"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 13px !important;
    padding: 0 10px 0 2px !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 32px !important;
    line-height: 32px !important;
    width: 220px !important;
    color: #1d2327 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
}

.mfe-sub-header-right .mfe-search-wrap input[type="search"]::placeholder {
    color: #8c8f94 !important;
    font-weight: 400;
}

.mfe-sub-header-right .mfe-search-wrap input[type="search"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.mfe-sub-header-right .mfe-search-wrap button[type="submit"] {
    background: #2271b1 !important;
    color: #ffffff !important;
    border: none !important;
    border-left: 1px solid #135e96 !important;
    padding: 0 16px !important;
    height: 100% !important;
    min-height: 34px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    letter-spacing: 0.01em;
    white-space: nowrap !important;
}

.mfe-sub-header-right .mfe-search-wrap button[type="submit"]:hover {
    background: #135e96 !important;
}

.mfe-list-form {
    padding: 0 28px !important;
    box-sizing: border-box;
}

/* ── Completely Hide Screen Options on MetaForge Pages ── */
body:has(.mfe-wrap) #screen-meta-links,
body.toplevel_page_metaforge #screen-meta-links,
body[class*="page_metaforge"] #screen-meta-links,
body[class*="page_mfe_"] #screen-meta-links,
body:has(.mfe-wrap) #screen-meta,
body.toplevel_page_metaforge #screen-meta,
body[class*="page_metaforge"] #screen-meta,
body[class*="page_mfe_"] #screen-meta {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.mfe-wrap .notice,
.mfe-wrap div.updated,
.mfe-wrap div.error {
    margin-left: 28px !important;
    margin-right: 28px !important;
    margin-top: 14px !important;
}

.mfe-admin-footer {
    padding: 24px 28px 16px 28px !important;
    box-sizing: border-box;
}

/* ── Community / Newsletter Banner (Free version) ── */
.mfe-community-banner {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    position: relative;
}

.mfe-banner-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 3px;
}

.mfe-banner-desc {
    font-size: 12.5px;
    color: #50575e;
    margin-bottom: 3px;
}

.mfe-banner-sub {
    font-size: 11.5px;
    color: #646970;
}

.mfe-banner-sub a {
    color: #2271b1;
    text-decoration: none;
}

.mfe-banner-form-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.mfe-banner-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfe-banner-input {
    height: 32px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    width: 220px;
    background: #ffffff;
}

.mfe-banner-btn {
    height: 32px;
    line-height: 30px;
    font-size: 13px;
    font-weight: 500;
    background: #2271b1;
    border-color: #2271b1;
    color: #ffffff;
    padding: 0 14px;
    border-radius: 4px;
    cursor: pointer;
}

.mfe-banner-dismiss {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #8c8f94;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}

.mfe-banner-dismiss:hover {
    color: #1d2327;
    background: #f0f0f1;
}

/* ── Empty State Card ── */
.mfe-empty-card {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 64px 24px;
    text-align: center;
    margin: 16px 28px 24px 28px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media screen and (max-width: 782px) {
    .mfe-empty-card {
        margin: 16px 14px 24px 14px !important;
    }
}

.mfe-empty-glyph-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1.5px dashed #c3c4c7;
    border-radius: 30px;
    padding: 10px 28px;
    margin-bottom: 30px;
    color: #8c8f94;
    line-height: 1;
}

.mfe-glyph-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8c8f94;
}

.mfe-glyph-text {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 16px;
}

.mfe-glyph-infinity {
    font-size: 20px;
    font-weight: 400;
}

.mfe-glyph-icon.dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mfe-empty-heading {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 16px 0;
}

.mfe-empty-desc {
    font-size: 14px;
    color: #646970;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 32px auto;
}

.mfe-empty-action {
    margin-bottom: 32px;
}

.mfe-btn-cta-large {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2271b1;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 8px 22px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #2271b1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: background 0.15s, border-color 0.15s;
}

.mfe-btn-cta-large:hover {
    background: #135e96;
    border-color: #135e96;
}

.mfe-empty-footer {
    font-size: 13.5px;
    color: #646970;
    margin-top: 4px;
}

.mfe-empty-footer a {
    color: #2271b1;
    text-decoration: underline;
}

/* ── Admin Page Footer ── */
.mfe-admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px 28px !important;
    box-sizing: border-box !important;
    margin-top: 40px;
    border-top: 1px solid #dcdcde;
    font-size: 12px;
    color: #646970;
}

.mfe-footer-left a,
.mfe-footer-right a {
    color: #2271b1;
    text-decoration: none;
}

.mfe-footer-left a:hover,
.mfe-footer-right a:hover {
    text-decoration: underline;
}

.mfe-version {
    color: #50575e;
    font-weight: 600;
}

/* ── Custom Confirm & Alert Modal ─────────────────────────────────────── */
#mfe-confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6) !important;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

#mfe-confirm-modal .mfe-confirm-card {
    background: #ffffff;
    border-radius: 12px;
    width: 460px;
    max-width: 92%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    animation: mfeModalScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mfeModalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#mfe-confirm-modal .mfe-confirm-body {
    padding: 24px 24px 20px;
    text-align: center;
}

#mfe-confirm-modal #mfe-confirm-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

#mfe-confirm-modal #mfe-confirm-icon {
    font-size: 26px;
    width: 26px;
    height: 26px;
    line-height: 26px;
}

#mfe-confirm-modal #mfe-confirm-title {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

#mfe-confirm-modal #mfe-confirm-text {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
    text-align: center;
}

#mfe-confirm-modal #mfe-confirm-input {
    width: 100%;
    margin-top: 16px;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#mfe-confirm-modal #mfe-confirm-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#mfe-confirm-modal .mfe-confirm-footer {
    background: #f8fafc;
    padding: 14px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
}

#mfe-confirm-modal #mfe-confirm-cancel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

#mfe-confirm-modal #mfe-confirm-cancel:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

#mfe-confirm-modal #mfe-confirm-ok {
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    color: #ffffff;
    transition: filter 0.15s;
}

#mfe-confirm-modal #mfe-confirm-ok:hover {
    filter: brightness(0.92);
}

/* ══════════════════════════════════════════════════════════════
   TOOLS & IMPORT / EXPORT UI
══════════════════════════════════════════════════════════════ */
.mfe-tools-content-wrap {
    padding: 24px 28px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

@media screen and (max-width: 782px) {
    .mfe-tools-content-wrap {
        padding: 16px 14px !important;
    }
}

.mfe-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
    margin-top: 0;
    align-items: start;
}

.mfe-card-zero-margin {
    margin: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.mfe-card-header-static {
    cursor: default !important;
}

.mfe-card-body-padded {
    padding: 24px !important;
}

.mfe-export-full-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mfe-export-full-title {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
}

.mfe-export-full-desc {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
}

.mfe-export-btn-full {
    text-decoration: none;
    padding: 8px 18px;
    font-size: 13px;
}

.mfe-export-btn-full .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.mfe-export-accordion {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.mfe-export-section {
    border-bottom: 1px solid #cbd5e1;
}

.mfe-export-section:last-child {
    border-bottom: none;
}

.mfe-export-section-toggle {
    background: #f8fafc;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.mfe-export-section-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfe-export-section-title .dashicons {
    color: #64748b;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mfe-export-section-title .mfe-section-arrow {
    transition: transform 0.2s;
}

.mfe-export-section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mfe-export-badge {
    font-size: 11px;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
    color: #475569;
    font-weight: 600;
}

.mfe-export-check-all {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2271b1;
}

.mfe-export-section-content {
    max-height: 250px;
    overflow-y: auto;
    display: none;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.mfe-export-check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.mfe-export-check-row:hover {
    background: #f8fafc;
}

.mfe-export-check-input {
    width: 16px;
    height: 16px;
    accent-color: #2271b1;
    cursor: pointer;
    flex-shrink: 0;
}

.mfe-export-check-info {
    flex: 1;
    min-width: 0;
}

.mfe-export-check-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mfe-export-check-meta {
    font-size: 11px;
    color: #94a3b8;
}

.mfe-export-check-badge {
    display: none;
    font-size: 11px;
    font-weight: 600;
    color: #2271b1;
    background: #dbeafe;
    border-radius: 12px;
    padding: 2px 8px;
}

.mfe-export-empty-note {
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

.mfe-export-footer-bar {
    margin-top: 0 !important;
    padding: 12px 16px !important;
    background: #f8fafc !important;
    border-top: 1px solid #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    box-sizing: border-box !important;
}

.mfe-export-counter {
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
}

.mfe-import-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.mfe-import-dropzone:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.mfe-import-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.mfe-import-file-input {
    display: none;
}

.mfe-import-text-primary {
    margin: 0;
    font-weight: 600;
    color: #334155;
    font-size: 13px;
}

.mfe-import-text-secondary {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 12px;
}

.mfe-import-selected-file {
    margin-top: 10px;
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
    display: none;
}

.mfe-import-btn {
    margin-top: 16px;
    width: 100%;
    justify-content: center;
    padding: 9px;
    font-size: 13px;
}

.mfe-json-paste-label {
    display: block;
    margin: 20px 0 6px;
    font-weight: 600;
    color: #334155;
    font-size: 13px;
}

.mfe-json-textarea {
    width: 100%;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    resize: vertical;
}

.mfe-sync-card-wrap {
    margin-top: 24px;
}

.mfe-sync-desc {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 16px;
}

.mfe-sync-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mfe-log-viewer-box {
    margin-top: 24px;
}

.mfe-log-textarea {
    width: 100%;
    height: 180px;
    font-family: monospace;
    font-size: 12px;
    background: #0f172a;
    color: #94a3b8;
    padding: 12px;
    border-radius: 6px;
    border: none;
    box-sizing: border-box;
    resize: vertical;
}

.mfe-tools-nav {
    margin: 0 !important;
    padding: 10px 28px 0 28px !important;
    border-bottom: 1px solid #dcdcde !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

@media screen and (max-width: 782px) {
    .mfe-tools-nav {
        padding: 8px 14px 0 14px !important;
    }
}

.mfe-tools-nav .nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 18px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-bottom: 1px solid #dcdcde;
    background: #f8fafc;
    margin: 0 0 -1px 0;
    transition: all 0.15s ease;
    text-decoration: none !important;
}

.mfe-tools-nav .nav-tab:hover {
    background: #ffffff;
    color: #1e293b;
}

.mfe-tools-nav .nav-tab-active,
.mfe-tools-nav .nav-tab-active:hover {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 600;
    border-color: #dcdcde !important;
    border-bottom-color: #ffffff !important;
}

.mfe-tools-nav .nav-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #64748b;
}

.mfe-tools-nav .nav-tab-active .dashicons {
    color: #2271b1;
}

.mfe-export-btn-disabled {
    padding: 8px 18px;
    font-size: 13px;
    opacity: .4;
    pointer-events: none;
}

.mfe-export-btn-disabled .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.mfe-import-label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.mfe-import-max-note {
    color: #94a3b8;
    font-weight: 400;
}

.mfe-import-dropzone-inner {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8fafc;
}

.mfe-import-dropzone-inner .dashicons {
    font-size: 32px;
    color: #94a3b8;
    display: block;
    margin-bottom: 8px;
}

.mfe-import-dropzone-inner p {
    color: #64748b;
    margin: 0 0 12px;
}

.mfe-import-choose-btn {
    cursor: pointer;
    display: inline-block;
}

.mfe-import-filename-preview {
    color: #059669;
    margin: 10px 0 0;
    font-size: 13px;
    display: none;
}

.mfe-import-details {
    margin-bottom: 16px;
}

.mfe-import-summary {
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
}

.mfe-import-strategy-box {
    margin-bottom: 20px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.mfe-import-strategy-title {
    margin: 0 0 10px;
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
}

.mfe-import-radio-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.mfe-import-radio-row:last-child {
    margin-bottom: 0;
}

.mfe-import-radio-row input[type="radio"] {
    margin-top: 3px;
}

.mfe-import-radio-sub {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.mfe-import-danger-text {
    color: #dc2626;
}

.mfe-import-actions-row {
    display: flex;
    justify-content: flex-end;
}

.mfe-import-submit-btn {
    padding: 8px 20px;
    font-size: 13px;
}

.mfe-import-submit-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* System Logs & Audit */
.mfe-card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default !important;
}

.mfe-card-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mfe-header-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.mfe-log-select {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}

.mfe-btn-sm {
    font-size: 12px !important;
    padding: 6px 12px !important;
}

.mfe-btn-sm .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.mfe-btn-danger-sm {
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
}

.mfe-btn-danger-sm .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.mfe-p-0 {
    padding: 0 !important;
}

.mfe-table-borderless {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
}

.mfe-table-borderless thead th {
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
}

.mfe-table-borderless tbody td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.mfe-table-borderless tbody tr:last-child td {
    border-bottom: none !important;
}

.mfe-col-time {
    width: 160px;
}

.mfe-col-event {
    width: 180px;
}

.mfe-col-user {
    width: 120px;
}

.mfe-log-time {
    font-family: monospace;
    font-size: 12px;
    color: #64748b;
}

.mfe-log-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: #e0e7ff;
    color: #3730a3;
    display: inline-block;
}

.mfe-log-user {
    font-weight: 500;
    color: #0f172a;
}

.mfe-log-context {
    font-family: monospace;
    font-size: 11px;
    color: #334155;
    word-break: break-all;
}

.mfe-text-muted {
    color: #94a3b8;
}

/* Migrate MFE Tab */
.mfe-migrate-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mfe-migrate-banner-icon {
    color: #2563eb;
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}

.mfe-migrate-banner-title {
    margin: 0 0 4px;
    color: #1e3a8a;
    font-size: 14px;
}

.mfe-migrate-banner-desc {
    margin: 0;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.5;
}

.mfe-migrate-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    background: #f8fafc;
}

.mfe-migrate-box-title {
    margin: 0 0 12px;
    font-size: 15px;
    color: #0f172a;
}

.mfe-migrate-box-note {
    color: #64748b;
    margin: 0 0 16px;
    font-size: 13px;
}

.mfe-migrate-box-found {
    color: #334155;
    margin: 0 0 16px;
    font-size: 13px;
}

.mfe-migrate-list {
    margin: 0 0 20px;
    padding-left: 20px;
    color: #475569;
    font-size: 13px;
}

.mfe-migrate-item {
    margin-bottom: 6px;
}

.mfe-migrate-id {
    color: #94a3b8;
    font-size: 11px;
}

.mfe-btn-migrate {
    padding: 10px 24px;
    font-size: 14px;
}

.mfe-btn-migrate .dashicons {
    margin-top: 3px;
}

/* ══════════════════════════════════════════════════════════════
   AI SETTINGS & AI PROMPT UI
══════════════════════════════════════════════════════════════ */
.mfe-ai-key-container {
    display: flex;
    align-items: center;
    max-width: 600px;
    gap: 8px;
}

.mfe-ai-key-input-wrap {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.mfe-ai-key-input {
    width: 100%;
    padding-right: 36px;
}

.mfe-ai-key-input.is-configured {
    background: #f3f4f6;
    cursor: not-allowed;
}

.mfe-ai-eye-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    display: flex;
    align-items: center;
}

.mfe-ai-eye-icon {
    font-size: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
}

.mfe-ai-test-status {
    margin-top: 10px;
}

.mfe-ai-test-success {
    color: #10b981;
    font-weight: 500;
}

.mfe-ai-model-select {
    width: 100%;
    max-width: 600px;
}

.mfe-ai-core-notice {
    margin-bottom: 18px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    font-size: 13px;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.mfe-ai-core-notice-icon {
    color: #2563eb;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.mfe-ai-prompt-box,
.mfe-card-ai-assistant .mfe-ai-desc {
    margin: 0 0 14px 0;
    color: #475569;
    font-size: 13.5px;
    line-height: 1.5;
}

.mfe-ai-prompt-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mfe-ai-prompt-input {
    flex-grow: 1;
    height: 42px !important;
    min-height: 42px !important;
    line-height: 42px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 0 16px !important;
    font-size: 13.5px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.mfe-ai-prompt-input:focus {
    border-color: #2271b1 !important;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15) !important;
    outline: none !important;
}

.mfe-ai-prompt-btn {
    height: 42px !important;
    min-height: 42px !important;
    min-width: 165px !important;
    padding: 0 22px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
    background: #2271b1 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(34, 113, 177, 0.2) !important;
    cursor: pointer !important;
    border: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
}

.mfe-ai-prompt-btn:hover {
    background: #135e96 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3) !important;
}

.mfe-ai-status-text {
    margin-top: 12px;
    font-size: 13px;
    display: none;
    font-weight: 500;
}

.mfe-dashicons-helper {
    margin: 5px 0 0 0;
}

.mfe-order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.mfe-order-check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
}

.mfe-order-check-input {
    margin-right: 10px;
}

.mfe-quick-links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mfe-role-notice-box {
    margin-bottom: 20px;
    border-left-color: #eab308;
    background-color: #fefce8;
    border: 1px solid #fef08a;
    padding: 15px;
    border-radius: 6px;
}

.mfe-role-notice-text {
    margin: 0;
    font-size: 13px;
    color: #854d0e;
}

.mfe-field-sm-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 12px;
}

.mfe-btn-full-width {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 0 !important;
    font-size: 12px !important;
}

.mfe-gap-10 {
    gap: 10px !important;
}

.mfe-btn-danger {
    border-color: #fca5a5 !important;
    color: #ef4444 !important;
    background: #fef2f2 !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
}

.mfe-btn-pad-md {
    padding: 6px 16px !important;
    font-size: 13px !important;
}

.mfe-border-none {
    border-bottom: none !important;
}

.mfe-mb-10 {
    margin-bottom: 10px !important;
}

.mfe-mt-10 {
    margin-top: 10px !important;
}

.mfe-mb-20 {
    margin-bottom: 20px !important;
}

.mfe-mt-20 {
    margin-top: 20px !important;
}

.mfe-btn-repair {
    margin-left: 10px !important;
}

.mfe-no-groups-notice {
    color: #9ca3af !important;
}

.mfe-badge-warn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 15px;
}

.mfe-badge-warn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mfe-bottom-bar {
    margin-top: 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    justify-content: flex-end;
}

.mfe-card-ai-assistant {
    margin-bottom: 24px;
    border: 1px solid #e0e7ff;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(99, 102, 241, 0.04);
    overflow: hidden;
}

.mfe-card-ai-assistant .mfe-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
}

.mfe-card-ai-assistant .mfe-card-header-left {
    color: #1e1b4b;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfe-card-ai-assistant .mfe-card-header-left .dashicons {
    color: #6366f1;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mfe-card-ai-assistant .mfe-card-body {
    padding: 20px;
}

.mfe-checkbox-col {
    display: inline-block;
    width: 150px;
    margin-bottom: 10px;
}

.mfe-hidden {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   LIST TABLES STYLING
══════════════════════════════════════════════════════════════ */
.mfe-views-count {
    background: #e0f2fe;
    color: #0369a1;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.mfe-action-sync {
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

.mfe-action-duplicate {
    color: #2563eb !important;
}

.mfe-action-delete {
    color: #ef4444 !important;
}

.mfe-code-muted {
    font-size: 11px !important;
    color: #64748b !important;
}

.mfe-dash-empty {
    color: #94a3b8 !important;
}

.mfe-row-icon {
    vertical-align: text-bottom !important;
    margin-right: 4px !important;
}

.mfe-tag-blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
    font-size: 12px !important;
}

.mfe-tag-gray {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    font-size: 12px !important;
}

.mfe-tag-green {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
    color: #16a34a !important;
    border-color: #bbf7d0 !important;
}

/* Builder View Helpers */
.mfe-badge-inactive {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.mfe-badge-inactive .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mfe-btn-code-modal {
    border-color: #6366f1 !important;
    color: #6366f1 !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-right: 8px !important;
}

.mfe-btn-code-modal .dashicons {
    color: #6366f1;
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.mfe-btn-save-header .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

.mfe-cell-actions {
    text-align: right;
}

.mfe-builder-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mfe-ask-ai-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border-color: #8b5cf6 !important;
    color: #8b5cf6 !important;
    font-weight: 600 !important;
}

.mfe-ask-ai-btn .dashicons {
    color: #8b5cf6;
}

.mfe-stab-content {
    display: none;
}

.mfe-stab-content.is-active {
    display: block;
}

.mfe-location-drag-handle-wrap {
    position: relative;
}

.mfe-location-drag-handle {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    cursor: move;
}

.mfe-rule-or-label {
    font-size: 11px;
    color: #9ca3af;
    margin: 6px 0;
    font-weight: 700;
}

.mfe-rule-group-stacked {
    margin-top: 8px;
}

.mfe-rule-and-label {
    font-size: 12px;
    color: #6b7280;
    margin-right: 8px;
    font-weight: 600;
}

.mfe-location-value-wrap {
    display: inline-block;
}

.mfe-rule-or-link-wrap {
    margin-top: 10px;
}

.mfe-helper-text {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 400;
}

.mfe-bottom-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.mfe-btn-cancel {
    color: #6b7280 !important;
    border-color: #d1d5db !important;
}

#mfe-ai-chat-overlay {
    display: none;
}

.mfe-ai-chat-panel {
    display: none;
}

.mfe-chat-examples-list {
    margin: 8px 0 0 16px;
    font-size: 11px;
    color: #4b5563;
    list-style-type: disc;
}

.mfe-chat-typing {
    display: none;
}

.mfe-chat-footer-icon {
    font-size: 11px;
    width: 11px;
    height: 11px;
    color: #9ca3af;
}

.mfe-btn-sm {
    padding: 6px 12px !important;
    font-size: 11px !important;
}

/* Builder Field UI Classes */
.mfe-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: grab;
    width: 20px;
    height: 20px;
}

.mfe-badge-endpoint {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.mfe-remove-field-header {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ef4444;
    padding: 0 5px;
}

.mfe-remove-field-header .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.mfe-pro-field-warning {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    font-size: 12px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mfe-pro-field-warning .dashicons {
    color: #d97706;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mfe-tab-endpoint-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: #f8fafc;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.mfe-tab-endpoint-checkbox {
    margin: 0 !important;
}

.mfe-tab-endpoint-text {
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
}

.mfe-sync-layouts-btn {
    margin-top: 6px !important;
    font-size: 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 8px !important;
    height: 24px !important;
    line-height: 22px !important;
    cursor: pointer !important;
}

.mfe-sync-layouts-btn .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    margin-top: 2px;
}

.mfe-choices-wrap {
    position: relative;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
}

.mfe-choices-inner {
    display: flex;
    gap: 12px;
    min-height: 120px;
    box-sizing: border-box;
    width: 100%;
}

.mfe-choices-textarea {
    flex: 1;
    border: none !important;
    box-sizing: border-box;
    box-shadow: none !important;
    outline: none !important;
    line-height: 28px !important;
    font-size: 13px !important;
    padding: 8px 8px !important;
    font-family: monospace !important;
    white-space: pre !important;
    overflow-y: hidden !important;
    overflow-x: auto !important;
    resize: none !important;
    background: transparent !important;
    margin: 0 !important;
    min-height: 120px;
}

.mfe-choices-copy-col {
    width: 40px;
    box-sizing: border-box;
    padding: 8px 0;
    font-family: monospace;
    font-size: 13px;
    line-height: 28px;
    border-left: 1px dashed #e2e8f0;
    pointer-events: auto;
    text-align: center;
}

.mfe-choices-spacer {
    height: 28px;
}

.mfe-choices-badge-wrap {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfe-choices-badge-wrap .mfe-choice-badge {
    cursor: pointer;
    color: #6b7280;
    display: inline-flex;
}

.mfe-tax-slug-select {
    min-width: 220px;
}

.mfe-dynamic-source-select {
    max-width: 300px;
    width: 100%;
}

.mfe-setting-input-transparent {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.mfe-fc-layout-block {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.mfe-fc-layout-header {
    background: #f1f5f9;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.mfe-fc-layout-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.mfe-fc-layout-header-left .dashicons-menu {
    color: #94a3b8;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mfe-fc-layout-label-input {
    border: none !important;
    background: transparent !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #334155 !important;
    width: 180px !important;
    outline: none !important;
    box-shadow: none !important;
}

.mfe-fc-slug-label {
    color: #94a3b8;
    font-size: 11px;
}

.mfe-fc-layout-name-input {
    border: none !important;
    background: transparent !important;
    font-size: 11px !important;
    color: #64748b !important;
    width: 120px !important;
    outline: none !important;
    font-family: monospace !important;
    box-shadow: none !important;
}

.mfe-fc-remove-layout {
    color: #ef4444;
    text-decoration: none;
}

.mfe-fc-layout-body {
    padding: 10px;
}

.mfe-fc-add-layout-block {
    margin-top: 4px;
}

.mfe-number-settings-grid {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mfe-mini-label {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.mfe-input-sm {
    width: 75px !important;
}

.mfe-input-md {
    width: 110px !important;
}

.mfe-tab-content {
    display: none;
}

.mfe-tab-content.mfe-tab-general {
    display: block;
}

.mfe-no-border-bottom {
    border-bottom: none !important;
}

.mfe-radio-label-spaced {
    margin-right: 15px;
}

/* General hidden helper & repeater template */
.mfe-repeater-template {
    display: none !important;
}

/* Pro Inactive Field Fallback Notice */
.mfe-pro-inactive-field-box {
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    margin: 8px 0;
}

.mfe-pro-inactive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.mfe-pro-inactive-title {
    color: #0f172a;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mfe-pro-inactive-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.mfe-pro-inactive-lock {
    color: #64748b;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mfe-pro-inactive-desc {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

/* Margin and Button Icon Utilities */
.mfe-mt-16 {
    margin-top: 16px !important;
}

.mfe-svg-btn-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* AI Settings Connector Notice Styles */
.mfe-connector-connected-box {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 6px;
    padding: 12px 16px;
}

.mfe-connector-connected-box.is-connected {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-left: 4px solid #10b981;
}

.mfe-connector-connected-box.is-disconnected {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
}

.mfe-connector-icon {
    font-size: 20px;
    line-height: 1.2;
    margin-top: 1px;
}

.mfe-connector-connected-box.is-connected .mfe-connector-icon {
    color: #059669;
}

.mfe-connector-connected-box.is-disconnected .mfe-connector-icon {
    color: #d97706;
}

.mfe-connector-title {
    font-size: 13px;
}

.mfe-connector-connected-box.is-connected .mfe-connector-title {
    color: #065f46;
}

.mfe-connector-connected-box.is-disconnected .mfe-connector-title {
    color: #92400e;
}

.mfe-connector-desc {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.4;
}

.mfe-connector-connected-box.is-connected .mfe-connector-desc {
    color: #047857;
}

.mfe-connector-connected-box.is-disconnected .mfe-connector-desc {
    color: #b45309;
}

.mfe-connector-link {
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
}

.mfe-connector-connected-box.is-connected .mfe-connector-link {
    color: #065f46;
}

.mfe-connector-connected-box.is-disconnected .mfe-connector-link {
    color: #92400e;
}

.mfe-ai-key-input:disabled {
    background: #f1f5f9 !important;
    cursor: not-allowed !important;
}

.mfe-no-groups-notice {
    display: none;
}


a:focus,
a:focus .media-icon img,
a:focus .plugin-icon,
.wp-person a:focus .gravatar {
    box-shadow: none !important;
}