/* ==========================================================================
   Contact Form to Email — Shared Admin UI Stylesheet (css/cfte-admin-ui.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
    --cfte-primary: #4f46e5;
    --cfte-primary-hover: #4338ca;
    --cfte-primary-light: #eef2ff;
    --cfte-success: #10b981;
    --cfte-success-bg: #ecfdf5;
    --cfte-warning: #f59e0b;
    --cfte-warning-bg: #fffbeb;
    --cfte-danger: #ef4444;
    --cfte-danger-bg: #fef2f2;
    --cfte-surface: #ffffff;
    --cfte-bg: #f8fafc;
    --cfte-border: #e2e8f0;
    --cfte-text: #0f172a;
    --cfte-text-muted: #64748b;
    --cfte-radius: 12px;
    --cfte-radius-sm: 8px;
    --cfte-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
}

/* --------------------------------------------------------------------------
   2. Base Admin Wrapper & Animations
   -------------------------------------------------------------------------- */
.cfte-admin-wrap {
    max-width: 1320px;
    margin: 20px auto 40px;
    padding-right: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: var(--cfte-text);
    box-sizing: border-box;
}

.cfte-admin-wrap--lg {
    max-width: 1280px;
}

.cfte-admin-wrap--editor {
    max-width: 1240px;
}

.cfte-admin-wrap--md {
    max-width: 1140px;
}

.cfte-admin-wrap--narrow {
    max-width: 1040px;
}

.cfte-admin-wrap *,
.cfte-admin-wrap *::before,
.cfte-admin-wrap *::after {
    box-sizing: border-box;
}

@keyframes cfteSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cfteFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   3. Toast Notifications
   -------------------------------------------------------------------------- */
.cfte-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cfte-success-bg);
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 14px 20px;
    border-radius: var(--cfte-radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: var(--cfte-shadow);
    animation: cfteSlideDown 0.25s ease-out;
}

.cfte-toast a {
    color: #047857;
    font-weight: 700;
    text-decoration: underline;
}

.cfte-toast-error {
    background: var(--cfte-danger-bg);
    border-color: #fecaca;
    color: #991b1b;
}

/* --------------------------------------------------------------------------
   4. Page Header & Badges
   -------------------------------------------------------------------------- */
.cfte-header {
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--cfte-shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cfte-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cfte-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    color: var(--cfte-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cfte-back-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--cfte-primary);
}

.cfte-title-group h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--cfte-text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    line-height: 1.3;
}

.cfte-badge,
.cfte-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cfte-primary-light);
    color: var(--cfte-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
}

.cfte-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--cfte-text-muted);
}

.cfte-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cfte-shortcode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cfte-bg);
    border: 1px dashed #cbd5e1;
    border-radius: var(--cfte-radius-sm);
    padding: 5px 10px;
    font-family: monospace;
    font-size: 12px;
    color: var(--cfte-text-muted);
    white-space: nowrap;
}

.cfte-shortcode-pill code {
    background: transparent;
    color: var(--cfte-text);
    font-weight: 600;
    padding: 0;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.cfte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--cfte-radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: nowrap;
}

.cfte-btn-lg {
    padding: 9px 16px;
    font-size: 13px;
}

.cfte-btn-secondary {
    background: #ffffff;
    border-color: var(--cfte-border);
    color: var(--cfte-text);
}

.cfte-btn-secondary:hover {
    background: var(--cfte-bg);
    border-color: #cbd5e1;
    color: var(--cfte-primary);
}

.cfte-btn-primary {
    background: var(--cfte-primary);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

.cfte-btn-primary:hover {
    background: var(--cfte-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.cfte-btn-soft {
    background: var(--cfte-primary-light);
    color: var(--cfte-primary);
    border-color: #c7d2fe;
}

.cfte-btn-soft:hover {
    background: var(--cfte-primary);
    color: #ffffff;
    border-color: var(--cfte-primary);
}

.cfte-btn-danger {
    background: var(--cfte-danger-bg);
    color: #dc2626;
    border-color: #fecaca;
}

.cfte-btn-danger:hover {
    background: var(--cfte-danger);
    color: #ffffff;
    border-color: var(--cfte-danger);
}

.cfte-mini-btn,
.cfte-copy-btn {
    background: #ffffff;
    border: 1px solid var(--cfte-border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--cfte-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cfte-mini-btn:hover,
.cfte-copy-btn:hover {
    background: var(--cfte-primary);
    color: #ffffff;
    border-color: var(--cfte-primary);
}

/* --------------------------------------------------------------------------
   6. Cards & WordPress Postbox Overrides
   -------------------------------------------------------------------------- */
.cfte-card,
.cfte-admin-wrap .postbox {
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius);
    box-shadow: var(--cfte-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.cfte-card--overflow-visible,
#metabox_form_list.cfte-card {
    overflow: visible;
}

.cfte-card-header,
.cfte-admin-wrap .postbox > .hndle {
    padding: 16px 24px;
    border-bottom: 1px solid var(--cfte-border);
    background: #fcfcfd;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--cfte-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    cursor: default;
    border-radius: var(--cfte-radius) var(--cfte-radius) 0 0;
}

.cfte-card-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--cfte-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfte-card-desc {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--cfte-text-muted);
    font-weight: 400;
}

.cfte-card-body,
.cfte-admin-wrap .postbox > .inside {
    padding: 24px;
    margin: 0;
}

/* --------------------------------------------------------------------------
   7. Alerts, Notices & Sub-boxes
   -------------------------------------------------------------------------- */
.cfte-alert,
.cfte-alert-info {
    padding: 14px 18px;
    border-radius: var(--cfte-radius-sm);
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cfte-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.cfte-alert-info a {
    color: #1d4ed8;
    font-weight: 600;
}

.cfte-alert-warning {
    background: var(--cfte-warning-bg);
    border: 1px solid #fde68a;
    color: #92400e;
}

.cfte-subbox {
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    padding: 18px;
    margin-top: 14px;
}

.cfte-error-notice {
    background: var(--cfte-danger-bg);
    border: 1px solid #fecaca;
    border-radius: var(--cfte-radius-sm);
    padding: 14px 18px;
    font-size: 13.5px;
    color: #991b1b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.cfte-draft-notice {
    background: var(--cfte-warning-bg);
    border: 1px solid #fde68a;
    border-radius: var(--cfte-radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
    margin-top: 22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   8. Grids, Dividers & Form Controls
   -------------------------------------------------------------------------- */
.cfte-section-divider {
    margin: 26px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cfte-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cfte-section-divider:first-child {
    margin-top: 0;
}

.cfte-section-divider h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cfte-primary);
}

.cfte-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.cfte-grid:last-child {
    margin-bottom: 0;
}

.cfte-cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cfte-cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cfte-cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.cfte-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.cfte-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.cfte-inline-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cfte-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.cfte-field:last-child,
.cfte-grid > .cfte-field,
.cfte-grid-2 > .cfte-field,
.cfte-grid-3 > .cfte-field {
    margin-bottom: 0;
}

.cfte-field label,
.cfte-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cfte-text);
    display: block;
}

.cfte-help {
    font-size: 12px;
    color: var(--cfte-text-muted);
    line-height: 1.45;
    margin-top: 2px;
}

/* Base input styling across all admin screens without forcing width: 100% on compact filter bars */
.cfte-admin-wrap input[type="text"],
.cfte-admin-wrap input[type="email"],
.cfte-admin-wrap input[type="number"],
.cfte-admin-wrap input[type="file"],
.cfte-admin-wrap select,
.cfte-admin-wrap textarea {
    max-width: 100%;
    padding: 8px 12px;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--cfte-text);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--cfte-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: none;
    height: auto;
    min-height: 36px;
}

/* Full-width controls inside structured form fields and modals */
.cfte-field input[type="text"],
.cfte-field input[type="email"],
.cfte-field input[type="number"],
.cfte-field select,
.cfte-field textarea,
.cfte-modal-field input[type="email"],
.cfte-modal-field input[type="text"],
.cfte-modal-field textarea,
.cfte-card-header select,
.cfte-builder-wrap #tabs input[type="text"],
.cfte-builder-wrap #tabs select,
.cfte-builder-wrap #tabs textarea {
    width: 100%;
}

.cfte-admin-wrap input[type="text"]:focus,
.cfte-admin-wrap input[type="email"]:focus,
.cfte-admin-wrap input[type="number"]:focus,
.cfte-admin-wrap select:focus,
.cfte-admin-wrap textarea:focus {
    border-color: var(--cfte-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    outline: none;
}

.cfte-admin-wrap input[type="color"] {
    height: 38px;
    width: 90px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: var(--cfte-radius-sm);
    background: #ffffff;
    cursor: pointer;
}

.cftesoft,
.cftesoft th,
.cftesoft label,
.cftesoft input {
    color: #94a3b8;
}

/* --------------------------------------------------------------------------
   9. Forms List Dashboard, Quickstart, Dropdowns & Add-ons
   -------------------------------------------------------------------------- */
.cfte-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius);
    padding: 8px;
    margin-bottom: 22px;
    box-shadow: var(--cfte-shadow);
    flex-wrap: wrap;
}

.cfte-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cfte-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: var(--cfte-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--cfte-text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
}

.cfte-nav-tab:hover {
    background: var(--cfte-bg);
    color: var(--cfte-text);
}

.cfte-nav-tab.is-active {
    background: var(--cfte-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.cfte-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #e2e8f0;
    color: var(--cfte-text);
}

.cfte-nav-tab.is-active .cfte-count-pill {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* 3-Step Quickstart Checklist */
.cfte-quickstart {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--cfte-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--cfte-shadow);
}

.cfte-qs-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.cfte-qs-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--cfte-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfte-qs-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cfte-qs-bar {
    width: 120px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.cfte-qs-bar-fill {
    height: 100%;
    background: var(--cfte-success);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.cfte-qs-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.cfte-qs-step {
    background: #ffffff;
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cfte-qs-step.is-done {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.cfte-qs-step-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cfte-qs-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
    background: var(--cfte-primary-light);
    color: var(--cfte-primary);
    border: 1px solid #c7d2fe;
}

.cfte-qs-step.is-done .cfte-qs-check {
    background: var(--cfte-success);
    color: #ffffff;
    border-color: var(--cfte-success);
}

.cfte-qs-step strong {
    display: block;
    font-size: 13.5px;
    color: var(--cfte-text);
    margin-bottom: 2px;
}

.cfte-qs-step.is-done strong {
    text-decoration: line-through;
    color: #065f46;
}

.cfte-qs-step p {
    margin: 0;
    font-size: 12px;
    color: var(--cfte-text-muted);
    line-height: 1.4;
}

/* Forms Table */
.cfte-table-wrap {
    overflow-x: auto;
}

.cfte-card--overflow-visible .cfte-table-wrap,
#metabox_form_list .cfte-table-wrap {
    overflow: visible;
}

.cfte-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cfte-table th {
    background: var(--cfte-bg);
    color: var(--cfte-text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 13px 16px;
    border-bottom: 1px solid var(--cfte-border);
}

.cfte-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 13.5px;
}

.cfte-table tr:last-child td {
    border-bottom: none;
}

.cfte-table tbody tr:hover td {
    background: #fafbff;
}

.cfte-id-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: 6px;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--cfte-text-muted);
}

.cfte-form-name-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--cfte-text);
    text-decoration: none;
}

.cfte-form-name-link:hover {
    color: var(--cfte-primary);
}

.cfte-rename-inline {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.cfte-rename-inline.is-open {
    display: flex;
}

.cfte-actions-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Overflow Dropdown Menu */
.cfte-dropdown {
    position: relative;
    display: inline-block;
}

.cfte-dropdown-trigger {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--cfte-radius-sm);
    background: #ffffff;
    border: 1px solid var(--cfte-border);
    color: var(--cfte-text-muted);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.cfte-dropdown-trigger:hover {
    background: var(--cfte-bg);
    color: var(--cfte-text);
    border-color: #cbd5e1;
}

.cfte-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 170px;
    background: #ffffff;
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.14);
    padding: 6px;
    z-index: 100;
}

.cfte-dropdown.is-open .cfte-dropdown-menu {
    display: block;
}

.cfte-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--cfte-text);
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}

.cfte-dropdown-item:hover {
    background: var(--cfte-bg);
    color: var(--cfte-primary);
}

.cfte-dropdown-item.is-danger {
    color: #dc2626;
}

.cfte-dropdown-item.is-danger:hover {
    background: var(--cfte-danger-bg);
    color: #b91c1c;
}

.cfte-dropdown-sep {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

/* Add-ons Showcase Grid */
.cfte-addon-cat-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cfte-primary);
    margin: 22px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--cfte-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cfte-addon-cat-title:first-of-type {
    margin-top: 0;
}

.cfte-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.cfte-addon-item {
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    padding: 12px 14px;
    background: var(--cfte-bg);
    transition: all 0.15s ease;
    cursor: pointer;
    position: relative;
}

.cfte-addon-item:hover {
    border-color: #a5b4fc;
    background: var(--cfte-primary-light);
    transform: translateY(-1px);
}

.cfte-addon-item label {
    font-weight: 600;
    font-size: 13px;
    color: var(--cfte-text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    cursor: pointer;
}

.cfte-addon-desc {
    margin: 0 0 0 24px;
    font-size: 12px;
    color: var(--cfte-text-muted);
    line-height: 1.4;
}

/* Scoped to Add-ons so it does not conflict with the builder palette .cfte-pro-pill */
.cfte-addon-item .cfte-pro-pill {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e0e7ff;
    color: var(--cfte-primary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   10. Form Settings Tabs, Builder Container & Sticky Footer
   -------------------------------------------------------------------------- */
.cfte-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    padding: 8px;
    border-radius: var(--cfte-radius);
    margin-bottom: 24px;
    box-shadow: var(--cfte-shadow);
    flex-wrap: wrap;
}

.cfte-tabs-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cfte-tab-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: var(--cfte-radius-sm);
    border: none;
    background: transparent;
    color: var(--cfte-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cfte-tab-trigger:hover {
    color: var(--cfte-text);
    background: var(--cfte-bg);
}

.cfte-tab-trigger.ahb-step-active {
    background: var(--cfte-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.cfte-view-mode-btn {
    font-size: 12px;
    color: var(--cfte-text-muted);
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    padding: 7px 12px;
    border-radius: var(--cfte-radius-sm);
    cursor: pointer;
    font-weight: 500;
}

.cfte-view-mode-btn:hover {
    color: var(--cfte-text);
    border-color: #cbd5e1;
}

.cfte-admin-wrap .ahb-adintsection-container {
    border: none;
    background: transparent;
    margin: 0;
    padding: 0;
}

.cfte-admin-wrap .ahb-adintsection {
    display: none;
    padding: 0;
}

.cfte-admin-wrap .ahb-adintsection.ahb-adintsection-active,
.cfte-admin-wrap.cfte-show-all .ahb-adintsection {
    display: block;
    animation: cfteFadeIn 0.2s ease-out;
}

.cfte-builder-wrap .form-builder {
    min-width: 100% !important;
    height: auto !important;
}

.cfte-pro-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--cfte-radius);
    padding: 20px 24px;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cfte-pro-banner h4 {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--cfte-text);
}

.cfte-pro-banner ul {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--cfte-text-muted);
}

.cfte-pro-banner li {
    margin-bottom: 4px;
}

.cfte-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    margin-top: 20px;
    border-top: 1px solid var(--cfte-border);
}

.cfte-sticky-footer {
    position: sticky;
    bottom: 16px;
    z-index: 90;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius);
    padding: 14px 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.cfte-footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--cfte-text-muted);
}

.cfte-footer-links a {
    color: var(--cfte-primary);
    text-decoration: none;
    font-weight: 500;
}

.cfte-footer-links a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   11. Publish Wizard
   -------------------------------------------------------------------------- */
.cfte-wizard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .cfte-wizard-grid {
        grid-template-columns: 1fr;
    }
}

.cfte-shortcode-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--cfte-bg);
    border: 1px dashed #94a3b8;
    border-radius: var(--cfte-radius-sm);
    padding: 12px 16px;
    margin: 8px 0;
}

.cfte-shortcode-box code {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cfte-text);
    background: transparent;
    padding: 0;
    word-break: break-all;
}

.cfte-pro-callout {
    display: none;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    border: 1px solid #c7d2fe;
    border-left: 4px solid var(--cfte-primary);
    border-radius: var(--cfte-radius-sm);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
}

.cfte-method-item {
    padding: 14px 16px;
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    margin-bottom: 14px;
}

.cfte-method-item:last-child {
    margin-bottom: 0;
}

.cfte-method-item h4 {
    margin: 0 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cfte-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cfte-method-item p {
    margin: 0;
    font-size: 12.5px;
    color: var(--cfte-text-muted);
    line-height: 1.5;
}

.cfte-success-card {
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    border-top: 4px solid var(--cfte-success);
    border-radius: var(--cfte-radius);
    padding: 32px;
    max-width: 760px;
    margin: 10px auto;
    box-shadow: var(--cfte-shadow);
}

.cfte-success-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.cfte-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--cfte-success-bg);
    color: var(--cfte-success);
    border: 1px solid #a7f3d0;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.cfte-success-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--cfte-text);
}

.cfte-url-box {
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    padding: 14px 18px;
    margin: 18px 0 24px;
    font-size: 13.5px;
    color: var(--cfte-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.cfte-url-box a {
    font-weight: 600;
    color: var(--cfte-primary);
    text-decoration: none;
    word-break: break-all;
}

.cfte-url-box a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   12. Messages List, Filters, Pagination & Reply/AI Modal
   -------------------------------------------------------------------------- */
.cfte-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.cfte-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cfte-filter-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cfte-text-muted);
}

.cfte-filter-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cfte-filter-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cfte-toolbar {
    padding: 12px 20px;
    background: #fcfcfd;
    border-bottom: 1px solid var(--cfte-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.cfte-toolbar-footer {
    border-top: 1px solid var(--cfte-border);
    border-bottom: none;
}

.cfte-bulk-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cfte-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.cfte-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--cfte-border);
    background: #ffffff;
    color: var(--cfte-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 12.5px;
    transition: all 0.15s ease;
}

.cfte-pagination .page-numbers:hover {
    background: var(--cfte-bg);
    border-color: #cbd5e1;
    color: var(--cfte-primary);
}

.cfte-pagination .page-numbers.current {
    background: var(--cfte-primary);
    border-color: var(--cfte-primary);
    color: #ffffff;
}

.cfte-messages-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cfte-messages-table th {
    background: var(--cfte-bg);
    color: var(--cfte-text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 13px 16px;
    border-bottom: 1px solid var(--cfte-border);
}

.cfte-messages-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    font-size: 13.5px;
}

.cfte-messages-table tr:last-child td {
    border-bottom: none;
}

.cfte-messages-table tbody tr:hover td {
    background: #fafbff;
}

.cfte-date-meta {
    font-weight: 600;
    color: var(--cfte-text);
    display: block;
    margin-bottom: 4px;
}

.cfte-sub-meta {
    font-size: 11.5px;
    color: var(--cfte-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cfte-email-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--cfte-primary-light);
    color: var(--cfte-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: none;
    word-break: break-all;
}

.cfte-email-pill:hover {
    background: var(--cfte-primary);
    color: #ffffff;
}

.cfte-msg-content {
    line-height: 1.55;
    color: #1e293b;
    word-break: break-word;
}

.cfte-replied-badge {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--cfte-success-bg);
    border: 1px solid #a7f3d0;
    border-left: 3px solid var(--cfte-success);
    color: #065f46;
    font-size: 12.5px;
    border-radius: 6px;
}

.cfte-action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.cfte-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--cfte-text-muted);
}

.cfte-empty-state-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.cfte-code-sample {
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px 18px;
    border-radius: var(--cfte-radius-sm);
    font-family: monospace;
    font-size: 12.5px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 10px 0 0;
}

/* Reply Modal Overlay & Box */
#cfte-reply-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px;
}

.cfte-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    margin: 3% auto;
    border-radius: var(--cfte-radius);
    border: 1px solid var(--cfte-border);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    animation: cfteSlideDown 0.2s ease-out;
}

.cfte-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #fcfcfd;
    border-bottom: 1px solid var(--cfte-border);
}

.cfte-modal-header h2 {
    margin: 0 !important;
    font-size: 17px;
    font-weight: 700;
    color: var(--cfte-text);
}

.cfte-modal-close {
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    color: var(--cfte-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cfte-modal-close:hover {
    background: var(--cfte-danger-bg);
    color: var(--cfte-danger);
    border-color: #fecaca;
}

.cfte-modal-body {
    padding: 22px 24px;
}

.cfte-modal-field {
    margin-bottom: 16px;
}

.cfte-modal-field:last-child {
    margin-bottom: 0;
}

.cfte-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--cfte-text);
}

.cfte-ai-box {
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
    padding: 16px;
    border: 1px solid #c7d2fe;
    border-left: 4px solid var(--cfte-primary);
    border-radius: var(--cfte-radius-sm);
    margin-bottom: 16px;
}

.cfte-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cfte-ai-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cfte-text);
    cursor: pointer;
    user-select: none;
}

.cfte-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.cfte-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cfte-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #94a3b8;
    transition: 0.2s;
    border-radius: 20px;
}

.cfte-slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.2s;
    border-radius: 50%;
}

.cfte-switch input:checked + .cfte-slider {
    background-color: var(--cfte-primary);
}

.cfte-switch input:checked + .cfte-slider::before {
    transform: translateX(18px);
}

.cfte-ai-notice {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--cfte-text-muted);
}

.cfte-ai-controls {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #c7d2fe;
}

.cfte-ai-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.cfte-ai-row input[type="text"] {
    flex: 1;
}

.cfte-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: #fcfcfd;
    border-top: 1px solid var(--cfte-border);
}

#cfte-reply-status {
    margin-right: auto;
    font-size: 13px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   13. Analytics & Reports
   -------------------------------------------------------------------------- */
.cfte-presets-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.cfte-preset-pill {
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--cfte-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cfte-preset-pill:hover {
    background: var(--cfte-primary-light);
    color: var(--cfte-primary);
    border-color: #c7d2fe;
}

.cfte-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.cfte-kpi-card {
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius);
    padding: 18px 20px;
    box-shadow: var(--cfte-shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cfte-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cfte-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cfte-kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--cfte-text);
    line-height: 1.2;
    margin-top: 2px;
}

.cfte-kpi-sub {
    font-size: 12px;
    color: var(--cfte-text-muted);
    margin-top: 2px;
}

.cfte-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 782px) {
    .cfte-charts-grid {
        grid-template-columns: 1fr;
    }
}

.cfte-canvas-wrap {
    position: relative;
    width: 100%;
    height: 260px;
}

.cfte-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.cfte-chart-tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translate(-50%, -115%);
}

.cfte-weekday-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    padding-top: 6px;
}

.cfte-weekday-col {
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    padding: 12px 8px;
    text-align: center;
}

.cfte-weekday-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--cfte-text-muted);
    text-transform: uppercase;
    display: block;
}

.cfte-weekday-count {
    font-size: 16px;
    font-weight: 800;
    color: var(--cfte-text);
    margin: 4px 0 2px;
    display: block;
}

.cfte-weekday-pct {
    font-size: 11px;
    color: var(--cfte-primary);
    font-weight: 600;
}

.cfte-dist-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.cfte-dist-table th {
    background: var(--cfte-bg);
    color: var(--cfte-text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--cfte-border);
}

.cfte-dist-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    vertical-align: middle;
}

.cfte-dist-table tr:last-child td {
    border-bottom: none;
}

.cfte-rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 24px;
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--cfte-text-muted);
}

.cfte-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cfte-progress-track {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.cfte-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.cfte-progress-pct {
    min-width: 48px;
    text-align: right;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--cfte-text);
}

/* --------------------------------------------------------------------------
   14. Custom CSS / JS Code Editor
   -------------------------------------------------------------------------- */
.cfte-mode-switcher {
    display: inline-flex;
    background: var(--cfte-bg);
    border: 1px solid var(--cfte-border);
    padding: 4px;
    border-radius: var(--cfte-radius-sm);
    gap: 4px;
}

.cfte-mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--cfte-text-muted);
    transition: all 0.15s ease;
}

.cfte-mode-tab:hover {
    color: var(--cfte-text);
}

.cfte-mode-tab.active {
    background: var(--cfte-surface);
    color: var(--cfte-primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.cfte-editor-frame {
    border: 1px solid #cbd5e1;
    border-radius: var(--cfte-radius-sm);
    overflow: hidden;
    background: #ffffff;
}

.cfte-editor-frame .CodeMirror {
    height: 440px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13.5px;
    line-height: 1.6;
}

.cfte-editor-frame textarea#editionarea {
    width: 100%;
    min-height: 420px;
    padding: 16px;
    border: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--cfte-text);
    resize: vertical;
}

.cfte-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--cfte-border);
}

.cfte-snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 18px;
}

@media (max-width: 600px) {
    .cfte-snippets-grid {
        grid-template-columns: 1fr;
    }
}

.cfte-snippet-card {
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    background: var(--cfte-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cfte-snippet-header {
    padding: 10px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--cfte-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cfte-text);
}

.cfte-snippet-actions {
    display: inline-flex;
    gap: 6px;
}

.cfte-snippet-code {
    margin: 0;
    padding: 14px 16px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    overflow-x: auto;
    flex: 1;
    white-space: pre;
}

/* --------------------------------------------------------------------------
   15. Add / Edit Message Embedded Form & Metadata
   -------------------------------------------------------------------------- */
.cfte-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.cfte-meta-item {
    background: var(--cfte-surface);
    border: 1px solid var(--cfte-border);
    border-radius: var(--cfte-radius-sm);
    padding: 12px 16px;
    box-shadow: var(--cfte-shadow);
}

.cfte-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cfte-text-muted);
    display: block;
    margin-bottom: 4px;
}

.cfte-meta-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cfte-text);
    word-break: break-all;
}

/* Scoped via .cpp_form so these overrides only affect embedded Add/Edit forms, never the Form Builder */
.cfte-admin-wrap .cpp_form #fbuilder {
    max-width: 100%;
    font-family: inherit;
    color: var(--cfte-text);
}

.cfte-admin-wrap .cpp_form #fbuilder .fform h1,
.cfte-admin-wrap .cpp_form #fbuilder .fform h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--cfte-text);
}

.cfte-admin-wrap .cpp_form #fbuilder .fields {
    margin-bottom: 18px;
    padding: 4px 0;
}

.cfte-admin-wrap .cpp_form #fbuilder .fields > label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cfte-text);
    margin-bottom: 6px;
    display: block;
}

.cfte-admin-wrap .cpp_form #fbuilder input[type="text"],
.cfte-admin-wrap .cpp_form #fbuilder input[type="email"],
.cfte-admin-wrap .cpp_form #fbuilder input[type="number"],
.cfte-admin-wrap .cpp_form #fbuilder input[type="password"],
.cfte-admin-wrap .cpp_form #fbuilder select,
.cfte-admin-wrap .cpp_form #fbuilder textarea {
    width: 100% !important;
    max-width: 620px;
    padding: 9px 12px !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    color: var(--cfte-text) !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--cfte-radius-sm) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: none !important;
}

.cfte-admin-wrap .cpp_form #fbuilder input[type="text"]:focus,
.cfte-admin-wrap .cpp_form #fbuilder input[type="email"]:focus,
.cfte-admin-wrap .cpp_form #fbuilder input[type="number"]:focus,
.cfte-admin-wrap .cpp_form #fbuilder select:focus,
.cfte-admin-wrap .cpp_form #fbuilder textarea:focus {
    border-color: var(--cfte-primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
    outline: none !important;
}

.cfte-admin-wrap .cpp_form .pbSubmit,
.cfte-admin-wrap .cpp_form .cp_subbtn {
    padding: 10px 22px !important;
    background: var(--cfte-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--cfte-radius-sm) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25) !important;
    transition: all 0.15s ease !important;
    margin-top: 8px !important;
}

.cfte-admin-wrap .cpp_form .pbSubmit:hover,
.cfte-admin-wrap .cpp_form .cp_subbtn:hover {
    background: var(--cfte-primary-hover) !important;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   16. Email Deliverability Diagnostic Report
   -------------------------------------------------------------------------- */
.cfte-diag-table {
    margin-top: 20px;
}

.cfte-diag-col-test {
    width: 20%;
}

.cfte-diag-col-status {
    width: 15%;
}

.cfte-diag-status {
    font-weight: 600;
}

.cfte-diag-status .dashicons {
    vertical-align: middle;
}

.cfte-diag-status--pass {
    color: #46b450;
}

.cfte-diag-status--warn {
    color: #ffb900;
}

.cfte-diag-status--critical {
    color: #dc3232;
}

.cfte-diag-msg {
    margin: 0;
    font-weight: 500;
}

.cfte-diag-fix {
    margin-top: 8px;
    padding: 10px;
    background: #fff8e5;
    border-left: 4px solid #ffb900;
}

.cfte-diag-fix .dashicons {
    font-size: 18px;
}
