/* ─── apForms Admin — Dark Theme (WP-admin only) ─────────────────────────────
   WP-admin apforms pages are intentionally dark-styled.
   This file is NOT loaded on the portal — portal uses portal.css instead.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Reset the .wrap white card that the admin theme applies ─────────────── */
.apf-admin-wrap.wrap {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 10px !important;
}

/* ── Page titles & headers ───────────────────────────────────────────────── */
.apf-admin-wrap h1,
.apf-admin-wrap h2 {
    color: #f0f0f0;
}
.apf-admin-wrap .page-title-action {
    background: #4738a6;
    border-color: #4738a6;
    color: #fff;
    border-radius: 4px;
    text-shadow: none;
    box-shadow: none;
}
.apf-admin-wrap .page-title-action:hover {
    background: #3a2e8f;
    border-color: #3a2e8f;
}

/* ── Forms list table ────────────────────────────────────────────────────── */
.apf-forms-table {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.apf-forms-table thead th {
    background: #16162a !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    color: #aaa !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.apf-forms-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    background: transparent !important;
}
.apf-forms-table tbody tr:hover { background: rgba(255,255,255,0.04) !important; }
.apf-forms-table td { color: #e0e0e0 !important; border: none !important; }
.apf-forms-table .apf-form-title-cell { padding: 10px 8px; }
.apf-forms-table .apf-form-desc-preview { margin: 2px 0 0; color: #888; font-size: 12px; }
.apf-forms-table .apf-shortcode-copy { cursor: pointer; transition: color .15s; font-size: 12px; color: #7c72ff; }
.apf-forms-table .apf-shortcode-copy:hover { color: #a79fff; }
.apf-forms-table .apf-actions-cell { white-space: nowrap; }
.apf-forms-table .apf-actions-cell .button {
    margin: 0 2px;
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #ccc !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
.apf-forms-table .apf-actions-cell .button:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}
.apf-forms-table .apf-delete-btn { color: #f87171 !important; border-color: rgba(248,113,113,0.3) !important; }
.apf-forms-table .apf-delete-btn:hover { background: rgba(248,113,113,0.12) !important; }

.apf-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.apf-badge-active   { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.apf-badge-inactive { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }

/* Empty state */
.apf-empty-state {
    text-align: center; padding: 60px 20px;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; margin-top: 20px;
    color: #e0e0e0;
}
.apf-empty-state .apf-empty-icon { font-size: 48px; margin-bottom: 12px; }
.apf-empty-state h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; color: #f0f0f0; }
.apf-empty-state p  { color: #888; margin-bottom: 20px; }

/* ── Builder wrap ────────────────────────────────────────────────────────── */
.apf-builder-wrap { padding-bottom: 40px; }

.apf-builder-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.apf-form-title-input {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    padding: 6px 10px;
    background: #131320;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: #f0f0f0;
}
.apf-form-title-input::placeholder { color: #555; }
.apf-form-title-input:focus {
    border-color: #7c72ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(124,114,255,.2);
}
.apf-status-select {
    padding: 6px 8px;
    background: #131320;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: #e0e0e0;
}
.apf-save-btn {
    padding: 6px 18px !important;
    font-size: 14px !important;
    background: #4738a6 !important;
    border-color: #4738a6 !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}
.apf-save-btn:hover { background: #3a2e8f !important; border-color: #3a2e8f !important; }

/* ── 3-column builder layout ─────────────────────────────────────────────── */
.apf-builder-layout {
    display: grid;
    grid-template-columns: 200px 1fr 320px;
    gap: 14px;
    align-items: start;
}

/* ── Palette ─────────────────────────────────────────────────────────────── */
.apf-palette {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 12px;
    position: sticky;
    top: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.apf-palette-heading { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .6px; }
.apf-palette-group { margin-bottom: 14px; }
.apf-palette-group-label { font-size: 10px; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; padding-left: 2px; }
.apf-palette-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 7px 10px;
    margin-bottom: 3px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #ccc;
    text-align: left;
    transition: background .12s, border-color .12s, color .12s;
}
.apf-palette-btn:hover { background: rgba(124,114,255,0.15); border-color: rgba(124,114,255,0.4); color: #a79fff; }
.apf-palette-icon { font-size: 14px; width: 18px; text-align: center; }
.apf-palette-label { flex: 1; }

/* ── Canvas area ─────────────────────────────────────────────────────────── */
.apf-canvas-area {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.apf-builder-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: #16162a;
}
.apf-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #777;
    border-bottom: 2px solid transparent;
    transition: color .12s, border-color .12s;
}
.apf-tab:hover { color: #a79fff; }
.apf-tab.active { color: #a79fff; border-bottom-color: #7c72ff; background: rgba(124,114,255,0.06); }

.apf-tab-content { display: none; padding: 16px; min-height: 400px; }
.apf-tab-content.active { display: block; }

.apf-canvas { min-height: 300px; position: relative; }
.apf-canvas-empty { text-align: center; padding: 60px 20px; color: #555; font-size: 14px; }

/* Canvas field cards */
.apf-canvas-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s, background .12s;
    color: #e0e0e0;
}
.apf-canvas-field:hover  { border-color: rgba(124,114,255,0.4); background: rgba(124,114,255,0.08); }
.apf-canvas-field.active { border-color: #7c72ff; box-shadow: 0 0 0 2px rgba(124,114,255,.2); background: rgba(124,114,255,0.12); }
.apf-canvas-field.apf-field-ghost { opacity: .3; }

.apf-field-handle { cursor: grab; color: #555; font-size: 16px; padding: 0 4px; user-select: none; }
.apf-field-handle:active { cursor: grabbing; }

.apf-field-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.apf-field-type-icon { font-size: 14px; flex-shrink: 0; }
.apf-field-label { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e0e0e0; }
.apf-req-mark { color: #f87171; margin-left: 2px; }
.apf-field-type-tag { font-size: 11px; color: #666; background: rgba(255,255,255,0.07); padding: 2px 6px; border-radius: 10px; flex-shrink: 0; margin-left: auto; }

.apf-field-actions { display: flex; gap: 4px; flex-shrink: 0; }
.apf-field-actions button {
    background: none; border: 1px solid transparent; padding: 3px 6px;
    cursor: pointer; border-radius: 3px; font-size: 13px; color: #666;
    transition: background .1s, border-color .1s, color .1s;
}
.apf-field-actions button:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: #ccc; }
.apf-field-del:hover { color: #f87171 !important; border-color: rgba(248,113,113,0.4) !important; }

/* ── Settings & Notifications tabs ──────────────────────────────────────── */
.apf-settings-panel { padding: 8px 0; color: #e0e0e0; }
.apf-settings-table th { width: 180px; color: #aaa; }
.apf-settings-table td, .apf-settings-table th { border-color: rgba(255,255,255,0.07) !important; }
.apf-settings-table input[type="text"],
.apf-settings-table input[type="email"],
.apf-settings-table textarea,
.apf-settings-table select {
    background: #131320 !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #e0e0e0 !important;
    border-radius: 4px;
}

.apf-notif-panel { padding: 8px 0; }
.apf-notif-empty { color: #666; font-style: italic; }
.apf-notif-item {
    display: flex; align-items: center;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px; margin-bottom: 6px;
    color: #e0e0e0;
}
.apf-notif-header { display: flex; align-items: center; gap: 10px; width: 100%; }
.apf-notif-to { color: #777; font-size: 12px; flex: 1; }
.apf-notif-actions { margin-left: auto; display: flex; gap: 5px; }
.apf-add-notif-btn { margin-top: 10px; }

/* ── Editor panel ────────────────────────────────────────────────────────── */
.apf-editor-panel {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    position: sticky;
    top: 32px;
    display: none;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    color: #e0e0e0;
}
.apf-editor-panel.open { display: flex; }

.apf-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: #16162a;
    border-radius: 8px 8px 0 0;
}
.apf-editor-header h3 { margin: 0; font-size: 14px; color: #f0f0f0; }
.apf-editor-close {
    background: none; border: none; font-size: 16px; cursor: pointer;
    color: #666; padding: 2px 6px; border-radius: 3px;
    transition: background .1s, color .1s;
}
.apf-editor-close:hover { background: rgba(255,255,255,0.08); color: #ccc; }

.apf-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: #4738a6 #0d0d1a;
}
.apf-editor-body::-webkit-scrollbar { width: 6px; }
.apf-editor-body::-webkit-scrollbar-track { background: #0d0d1a; }
.apf-editor-body::-webkit-scrollbar-thumb { background: #4738a6; border-radius: 3px; }

.apf-editor-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #16162a;
    border-radius: 0 0 8px 8px;
}
.apf-apply-btn {
    background: #4738a6 !important;
    border-color: #4738a6 !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
.apf-apply-btn:hover { background: #3a2e8f !important; }
.apf-danger-btn { color: #f87171 !important; border-color: rgba(248,113,113,0.4) !important; }
.apf-danger-btn:hover { background: rgba(248,113,113,0.1) !important; }

/* Editor field rows */
.apf-editor-fields { display: flex; flex-direction: column; gap: 12px; }
.apf-editor-row { display: flex; flex-direction: column; gap: 4px; }
.apf-editor-label { font-size: 12px; font-weight: 600; color: #888; }
.apf-editor-input, .apf-editor-textarea {
    width: 100%; padding: 6px 8px;
    background: #131320;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    font-size: 13px;
    color: #e0e0e0;
    box-sizing: border-box;
}
.apf-editor-input:focus, .apf-editor-textarea:focus {
    border-color: #7c72ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(124,114,255,.15);
}
.apf-editor-input::placeholder, .apf-editor-textarea::placeholder { color: #444; }
.apf-field-id-display { font-size: 11px; color: #666; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 3px; }

/* Choices editor */
.apf-choices-editor { margin-bottom: 6px; }
.apf-choice-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.apf-choice-handle { cursor: grab; color: #555; }
.apf-choice-input {
    flex: 1; padding: 5px 7px;
    background: #131320;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    font-size: 13px;
    color: #e0e0e0;
}
.apf-choice-input:focus { border-color: #7c72ff; outline: none; }
.apf-choice-del { background: none; border: none; color: #555; cursor: pointer; font-size: 12px; padding: 2px 6px; }
.apf-choice-del:hover { color: #f87171; }

/* Conditional logic */
.apf-conditions-wrap { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 12px; margin-top: 4px; }
.apf-conditions-heading { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #888; }
.apf-conditions-row { font-size: 13px; margin-bottom: 8px; color: #ccc; }
.apf-conditions-row select {
    margin: 0 4px; padding: 3px 6px;
    background: #131320; border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px; color: #e0e0e0;
}
.apf-cond-rule { display: flex; gap: 5px; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.apf-cond-rule select, .apf-cond-rule input {
    padding: 4px 6px;
    background: #131320;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px; font-size: 12px; color: #e0e0e0;
}
.apf-del-cond-rule { background: none; border: none; color: #555; cursor: pointer; font-size: 12px; }
.apf-del-cond-rule:hover { color: #f87171; }
.apf-add-cond-rule { font-size: 12px !important; padding: 3px 8px !important; height: auto !important; }
.apf-cond-note { color: #555; font-style: italic; font-size: 12px; }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.apf-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.apf-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.apf-modal-box {
    position: relative; z-index: 1;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    width: 90%; max-width: 700px; max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    color: #e0e0e0;
}
.apf-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: #16162a;
    border-radius: 10px 10px 0 0;
}
.apf-modal-header h3 { margin: 0; font-size: 16px; color: #f0f0f0; }
.apf-modal-close {
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: #666; padding: 2px 8px; border-radius: 3px;
    transition: background .1s, color .1s;
}
.apf-modal-close:hover { background: rgba(255,255,255,0.08); color: #ccc; }
.apf-modal-body {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: #4738a6 #0d0d1a;
}
.apf-modal-body::-webkit-scrollbar { width: 6px; }
.apf-modal-body::-webkit-scrollbar-track { background: #16162a; }
.apf-modal-body::-webkit-scrollbar-thumb { background: #4738a6; border-radius: 3px; }
.apf-modal-body input[type="text"],
.apf-modal-body input[type="email"],
.apf-modal-body textarea,
.apf-modal-body select {
    background: #131320 !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #e0e0e0 !important;
    border-radius: 4px;
}
.apf-modal-body label { color: #ccc; }
.apf-modal-body th, .apf-modal-body td { color: #ccc; border-color: rgba(255,255,255,0.07) !important; }
.apf-modal-body code { background: rgba(255,255,255,0.08); color: #a79fff; padding: 2px 6px; border-radius: 3px; }
.apf-modal-body p { color: #aaa; }
.apf-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #16162a;
    display: flex; gap: 8px;
    border-radius: 0 0 10px 10px;
}

/* Entry modal */
.apf-entry-modal-box { max-width: 800px; }
.apf-entry-detail-table { width: 100%; border-collapse: collapse; }
.apf-entry-detail-table th {
    background: #16162a !important;
    text-align: left; padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.08) !important;
    font-size: 13px; color: #888 !important; font-weight: 600;
}
.apf-entry-detail-table td {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.06) !important;
    font-size: 13px; vertical-align: top; color: #e0e0e0;
}
.apf-entry-detail-table tr:nth-child(even) td:first-child { background: rgba(255,255,255,0.03); }
.apf-entry-meta { margin: 12px 0 0; color: #666; font-size: 12px; }

/* ── Entries page ────────────────────────────────────────────────────────── */
.apf-entries-wrap { color: #e0e0e0; }
.apf-entries-wrap h1 { color: #f0f0f0; }
.apf-entries-wrap .apf-entry-count { color: #777; margin: 8px 0 12px; }
.apf-entries-table {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.apf-entries-table thead th {
    background: #16162a !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    color: #aaa !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.apf-entries-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    background: transparent !important;
}
.apf-entries-table tbody tr:hover { background: rgba(255,255,255,0.04) !important; }
.apf-entries-table td { color: #e0e0e0 !important; border: none !important; }
.apf-entries-table .apf-entry-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pagination */
.apf-pagination { margin: 16px 0; display: flex; gap: 4px; }
.apf-pagination a, .apf-pagination span {
    display: inline-block; padding: 5px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px; font-size: 13px; color: #ccc;
    text-decoration: none; transition: background .12s;
}
.apf-pagination a:hover { background: rgba(124,114,255,0.2); border-color: rgba(124,114,255,0.4); color: #a79fff; }
.apf-pagination .apf-current-page { background: #4738a6; border-color: #4738a6; color: #fff; }

/* Export / notices */
.apf-export-link { display: inline-block; margin-bottom: 12px; color: #a79fff; font-size: 13px; text-decoration: none; }
.apf-export-link:hover { color: #c4bcff; text-decoration: underline; }

.apf-portal-notice { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }
.apf-portal-notice.notice-success { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.25); color: #4ade80; }
.apf-portal-notice.notice-error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: #f87171; }

/* Checkboxes & radios inside editor */
.apf-editor-body input[type="checkbox"],
.apf-editor-body input[type="radio"] { accent-color: #7c72ff; }

/* ── Live form preview ──────────────────────────────────────────────────── */
.apf-preview-modal { position: fixed; inset: 0; z-index: 100000; }
.apf-preview-backdrop { position:absolute; inset:0; background:rgba(4,7,18,.72); }
.apf-preview-dialog { position:relative; width:min(760px,calc(100% - 32px)); max-height:calc(100vh - 44px); margin:22px auto; overflow:auto; border:1px solid rgba(255,255,255,.12); border-radius:12px; background:#fff; color:#1f2937; box-shadow:0 24px 80px rgba(0,0,0,.48); }
.apf-preview-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #e5e7eb; }
.apf-preview-header strong { display:block; font-size:16px; color:#111827; }.apf-preview-header span { display:block; margin-top:2px; color:#6b7280; font-size:12px; }.apf-preview-close { border:0; background:transparent; color:#475569; cursor:pointer; font-size:30px; line-height:1; }
.apf-preview-content { padding:28px; }.apf-public-preview { max-width:620px; margin:auto; }.apf-public-preview h2 { margin:0 0 8px; color:#111827; font-size:28px; }.apf-preview-description { margin:0 0 24px; color:#4b5563; line-height:1.55; }.apf-preview-field { margin:0 0 19px; }.apf-preview-field>label { display:block; margin-bottom:7px; color:#1f2937; font-weight:650; }.apf-preview-field b { color:#dc2626; }.apf-preview-field small { display:block; margin:-3px 0 7px; color:#6b7280; }.apf-preview-field input,.apf-preview-field textarea,.apf-preview-field select { box-sizing:border-box; width:100%; padding:10px 12px; border:1px solid #cbd5e1; border-radius:6px; background:#fff; color:#111827; font:14px/1.4 system-ui,sans-serif; }.apf-preview-name { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.apf-preview-choices { display:grid; gap:8px; }.apf-preview-choices label { color:#374151; }.apf-preview-choices input { width:auto; margin-right:7px; }.apf-preview-field.apf-preview-section { padding-top:7px; border-top:1px solid #e5e7eb; }.apf-preview-field.apf-preview-section h3 { margin:14px 0 4px; color:#111827; }.apf-public-preview button[type="submit"] { border:0; border-radius:6px; padding:11px 16px; background:#5b4abf; color:#fff; cursor:pointer; font-weight:700; }.apf-preview-note { margin:16px 0 0; color:#64748b; font-size:12px; }body.apf-preview-open { overflow:hidden; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .apf-builder-layout { grid-template-columns: 180px 1fr; }
    .apf-editor-panel { display: none !important; }
    .apf-editor-panel.open {
        display: flex !important;
        position: fixed; right: 20px; top: 60px;
        width: 300px; z-index: 9999;
        box-shadow: 0 8px 40px rgba(0,0,0,.6);
    }
}
@media (max-width: 900px) {
    .apf-builder-layout { grid-template-columns: 1fr; }
    .apf-palette { position: static; display: flex; flex-wrap: wrap; gap: 5px; }
    .apf-palette-group { display: flex; flex-wrap: wrap; gap: 4px; }
}
