
.e-dialog.e-dlg-modal {
    min-width: 1150px !important;
    max-width: 98vw !important;
    width: 1150px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-radius: 12px !important;
    border: none !important;
}

.e-dialog .e-dlg-content > * {
    width: 100% !important;
    box-sizing: border-box !important;
}


/* Modern Page Header */
.form-components-page .modern-page-header {
    background: white;
    padding: 20px 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.form-components-page .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-components-page .header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-components-page .page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.form-components-page .header-actions {
    display: flex;
    gap: 12px;
}

.form-components-page .header-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-components-page .add-btn {
    background: #3b82f6;
    color: white;
}

.form-components-page .add-btn:hover {
    background: #2563eb;
}

/* Modern Container */
.form-components-page .modern-container {
    background: white;
    border-radius: 8px;
}

.form-components-page .modern-table-container {
    min-height: 500px;
}

/* Clean Data Grid */
.form-components-page .clean-data-grid {
    border: none !important;
}

.form-components-page .clean-data-grid .e-gridheader {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.form-components-page .clean-data-grid .e-headercelldiv {
    font-weight: 600;
    color: #374151;
}

.form-components-page .clean-data-grid .e-row:hover {
    background: #f3f4f6;
}


/* Action Buttons */
.form-components-page .action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.form-components-page .action-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.form-components-page .action-btn:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.form-components-page .edit-btn:hover {
    background: #dbeafe;
}

.form-components-page .view-btn:hover {
    background: #fef3c7;
}

.form-components-page .delete-btn:hover {
    background: #fee2e2;
}

/* Modern Toast */
.form-components-page .modern-toast {
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body .form-components-page .e-dialog.e-dlg-modal,
.form-components-page .e-grid .e-dialog,
.e-grid .e-dialog.e-dlg-modal {
    min-width: 1150px !important;
    max-width: 98vw !important;
    width: 1150px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-radius: 12px !important;
    border: none !important;
}

.form-components-page .e-dialog .e-dlg-header-content,
.e-dialog .e-dlg-header-content {
    padding: 20px 28px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: linear-gradient(to bottom, #ffffff, #f9fafb) !important;
}

.form-components-page .e-dialog .e-dlg-header,
.e-dialog .e-dlg-header {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.form-components-page .e-dialog .e-dlg-content,
.e-dialog .e-dlg-content {
    padding: 24px 28px !important;
    overflow-y: auto !important;
    max-height: 80vh !important;
    background: #ffffff !important;
}

/* Dialog footer */
.form-components-page .e-dialog .e-footer-content,
.e-dialog .e-footer-content {
    padding: 18px 28px !important;
    border-top: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

.form-components-page .elegant-field-area,
.form-components-page .elegant-form-section,
.e-dialog .elegant-field-area,
.e-dialog .elegant-form-section {
    margin-bottom: 20px !important;
    padding: 16px 20px !important;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-components-page .elegant-field-area h3,
.form-components-page .elegant-form-section h3,
.e-dialog .elegant-field-area h3,
.e-dialog .elegant-form-section h3 {
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-components-page .elegant-field,
.e-dialog .elegant-field {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 16px !important;
}

.form-components-page .elegant-field input,
.form-components-page .elegant-field textarea,
.form-components-page .elegant-field select,
.e-dialog .elegant-field input,
.e-dialog .elegant-field textarea,
.e-dialog .elegant-field select {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Preview Section - compact */
.form-components-page .preview-section,
.e-dialog .preview-section {
    padding: 20px !important;
    background: white;
    border-radius: 8px;
    margin: 12px 0 !important;
    min-height: 120px;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-components-page .preview-section p,
.e-dialog .preview-section p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.form-components-page .code-editor-section,
.e-dialog .code-editor-section {
    margin-top: 20px !important;
    min-height: 600px !important;
    width: 100% !important;
}

.form-components-page .monaco-editor-container,
.e-dialog .monaco-editor-container,
.monaco-editor-container {
    width: 100% !important;
    min-height: 600px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

/* Alert Styles - modern */
.form-components-page .alert,
.e-dialog .alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-components-page .alert-danger,
.e-dialog .alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-components-page .alert-danger strong,
.e-dialog .alert-danger strong {
    color: #7f1d1d;
    font-size: 15px;
}

.form-components-page .alert-danger textarea,
.e-dialog .alert-danger textarea {
    margin-top: 8px;
    background: white;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    color: #7f1d1d;
    width: 100%;
    font-family: 'Consolas', 'Monaco', monospace;
    box-sizing: border-box;
}

/* Button Spacing & Design */
.form-components-page .mt-4,
.e-dialog .mt-4 {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Syncfusion Button Overrides - modern */
.form-components-page .e-primary,
.form-components-page .e-btn.e-primary,
.e-dialog .e-primary,
.e-dialog .e-btn.e-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.2s ease !important;
}

.form-components-page .e-primary:hover,
.form-components-page .e-btn.e-primary:hover,
.e-dialog .e-primary:hover,
.e-dialog .e-btn.e-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4) !important;
}

.form-components-page .e-primary:active,
.form-components-page .e-btn.e-primary:active,
.e-dialog .e-primary:active,
.e-dialog .e-btn.e-primary:active {
    transform: translateY(0);
}

.form-components-page .e-dialog input[type="text"],
.form-components-page .e-dialog textarea,
.form-components-page .e-dialog select,
.e-dialog input[type="text"],
.e-dialog textarea,
.e-dialog select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
}

.form-components-page .e-dialog input[type="text"]:focus,
.form-components-page .e-dialog textarea:focus,
.form-components-page .e-dialog select:focus,
.e-dialog input[type="text"]:focus,
.e-dialog textarea:focus,
.e-dialog select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.form-components-page .e-dialog label,
.e-dialog label {
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 6px !important;
    display: block !important;
    font-size: 14px !important;
}


/* Image editor container */
.form-components-page .image-editor-container,
.e-dialog .image-editor-container {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-components-page .image-editor-container:hover,
.e-dialog .image-editor-container:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* MudStack spacing - compact */
.form-components-page .mud-stack,
.e-dialog .mud-stack {
    gap: 16px !important;
}

/* Scrollbar styling */
.form-components-page .e-dialog .e-dlg-content::-webkit-scrollbar,
.e-dialog .e-dlg-content::-webkit-scrollbar {
    width: 8px;
}

.form-components-page .e-dialog .e-dlg-content::-webkit-scrollbar-track,
.e-dialog .e-dlg-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-components-page .e-dialog .e-dlg-content::-webkit-scrollbar-thumb,
.e-dialog .e-dlg-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.form-components-page .e-dialog .e-dlg-content::-webkit-scrollbar-thumb:hover,
.e-dialog .e-dlg-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


@media (max-width: 1200px) {
    body .form-components-page .e-dialog.e-dlg-modal,
    .form-components-page .e-grid .e-dialog,
    .e-grid .e-dialog.e-dlg-modal,
    .e-dialog.e-dlg-modal {
        min-width: 96vw !important;
        width: 96vw !important;
    }
}

@media (max-width: 768px) {
    body .form-components-page .e-dialog.e-dlg-modal,
    .form-components-page .e-grid .e-dialog,
    .e-grid .e-dialog.e-dlg-modal,
    .e-dialog.e-dlg-modal {
        min-width: 98vw !important;
        width: 98vw !important;
    }

    .form-components-page .e-dialog .e-dlg-content,
    .e-dialog .e-dlg-content {
        padding: 16px !important;
    }

    .form-components-page .monaco-editor-container,
    .e-dialog .monaco-editor-container,
    .monaco-editor-container {
        min-height: 400px !important;
    }
}

/* Full width utility */
.form-components-page .w-100,
.e-dialog .w-100 {
    width: 100% !important;
}

/* Box sizing utility */
.form-components-page .box-border,
.e-dialog .box-border {
    box-sizing: border-box !important;
}
@media (max-width: 1100px) {
    .form-components-page .fc-topbar,
    .form-components-page .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .form-components-page .fc-topbar-note {
        text-align: left;
    }

    .form-components-page .header-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .form-components-page {
        padding: 0 8px 16px;
    }

    .form-components-page .modern-page-header,
    .form-components-page .fc-topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .form-components-page .page-title-row {
        align-items: flex-start;
    }

    .form-components-page .page-title {
        font-size: 24px;
    }

    .form-components-page .action-buttons {
        flex-direction: column;
    }
}

/* Form Components refresh */
.form-components-page {
    padding: 0 14px 24px;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 40%, #eef2f8 100%);
    min-height: 100%;
}

.form-components-page .fc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 10px 0 16px;
    padding: 10px 14px;
    background: rgba(255,255,255,.82);
    border: 1px solid #e5ebf5;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(8px);
}

.form-components-page .fc-topbar-note {
    color: #64748b;
    font-size: 12.5px;
    font-weight: 500;
    text-align: right;
}

.form-components-page .modern-page-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 52%, #eef4ff 100%);
    padding: 14px 22px;
    margin-bottom: 14px;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.form-components-page .modern-page-header::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.16) 0%, rgba(59,130,246,0) 72%);
    pointer-events: none;
}

.form-components-page .header-content {
    position: relative;
    z-index: 1;
    gap: 20px;
}

.form-components-page .page-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #335c9b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.form-components-page .page-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-components-page .page-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 6px 16px rgba(59,130,246,.22);
    font-size: 16px;
    flex-shrink: 0;
}

.form-components-page .page-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.15;
}

.form-components-page .page-subtitle {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: #5b6b82;
    max-width: 720px;
}

.form-components-page .header-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
}

.form-components-page .add-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.form-components-page .add-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.form-components-page .modern-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.form-components-page .table-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.form-components-page .table-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #172033;
}

.form-components-page .table-section-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #66758d;
}

.form-components-page .modern-table-container {
    min-height: 500px;
    padding: 0 10px 8px;
}

.form-components-page .clean-data-grid .e-gridheader {
    background: #f8fbff;
    border-bottom: 1px solid #dbe5f2;
}

.form-components-page .clean-data-grid .e-headercell {
    background: transparent !important;
    border-color: #edf2f7 !important;
}

.form-components-page .clean-data-grid .e-headercelldiv {
    font-weight: 700;
    color: #334155;
    font-size: 12.5px;
}

.form-components-page .clean-data-grid .e-rowcell {
    border-color: #edf2f7 !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.form-components-page .clean-data-grid .e-row:hover {
    background: #f8fbff;
}

.form-components-page .clean-data-grid .e-toolbar {
    border: none !important;
    background: transparent !important;
    padding: 12px 12px 6px;
}

.form-components-page .clean-data-grid .e-toolbar .e-search-wrapper {
    border-radius: 12px;
    border: 1px solid #d8e2ef;
    background: white;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.form-components-page .clean-data-grid .e-pager {
    border-top: 1px solid #edf2f7 !important;
    background: #fcfdff;
}

.form-components-page .action-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-components-page .action-pill-group,
.form-components-page .action-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-components-page .action-pill .resource-mud-btn.mud-button-root {
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    border-width: 1px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.form-components-page .action-pill .resource-mud-btn .mud-button-label {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    gap: 6px !important;
}

.form-components-page .action-pill-library .resource-mud-btn.btn-save-library {
    background: #eef4ff !important;
    border-color: #c9d9f8 !important;
    color: #2458a6 !important;
}

.form-components-page .action-pill-library .resource-mud-btn.btn-save-library:hover {
    background: #e0ecff !important;
    border-color: #9fbcf3 !important;
}

.form-components-page .action-pill-export .resource-mud-btn.btn-export {
    background: #fff5eb !important;
    border-color: #f5d4ad !important;
    color: #b35a10 !important;
}

.form-components-page .action-pill-export .resource-mud-btn.btn-export:hover:not([disabled]) {
    background: #ffedd5 !important;
    border-color: #f0bb7a !important;
}

.form-components-page .action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe2ea;
    background: white;
    color: #475569;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s, color 0.18s;
    line-height: 1;
}

.form-components-page .action-btn i {
    font-size: 13px;
}

.form-components-page .action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.form-components-page .edit-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.form-components-page .view-btn:hover {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
}

.form-components-page .delete-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* ═══════════════════════════════════════════════════════════════
   Elegant Form Component Styles
   Used by ElegantForm, ElegantHeader, ElegantFields, ElegantField,
   ElegantFieldArea inside the Add/Edit dialog
   ═══════════════════════════════════════════════════════════════ */

/* ── Outer form wrapper ── */
.evolve-elegant-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* ── Form-header (ElegantHeader) ── */
.evolve-elegant-edit-form .form-header {
    display: flex;
    align-items: center;
    padding: 0 0 20px 0;
    border-bottom: 2px solid #e8edf5;
    margin-bottom: 24px;
}

.evolve-elegant-edit-form .form-header .header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.evolve-elegant-edit-form .form-header .header-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.evolve-elegant-edit-form .form-header .header-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

/* ── Fields grid container (ElegantFields) ── */
.evolve-elegant-edit-form .form-content {
    width: 100%;
}

.evolve-elegant-edit-form .evolve-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* ── Individual field row (ElegantField / ElegantFieldArea) ── */
.evolve-elegant-field {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
}

.evolve-elegant-field:last-child {
    border-bottom: none;
}

/* ── Field icon column ── */
.evolve-elegant-field .field-icon-container {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 14px;
}

.evolve-elegant-field .field-icon-container.name-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.evolve-elegant-field .field-icon-container.category-icon {
    background: #f0fdf4;
    color: #16a34a;
}

.evolve-elegant-field .field-icon-container.code-icon {
    background: #faf5ff;
    color: #7c3aed;
}

/* ── Field body (label + input) ── */
.evolve-elegant-field .field-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.evolve-elegant-field .field-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.evolve-elegant-field .field-label .required-dot {
    color: #ef4444;
    font-size: 16px;
    line-height: 1;
}

/* ── Elegant text/input override ── */
.evolve-elegant-field .elegant-input .e-input,
.evolve-elegant-field .elegant-input input,
.evolve-elegant-field .elegant-input .e-textbox {
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    background: #fff !important;
}

.evolve-elegant-field .elegant-input .e-input:focus,
.evolve-elegant-field .elegant-input input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
    outline: none !important;
}

.evolve-elegant-field .elegant-input .e-input-group {
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.evolve-elegant-field .elegant-input .e-input-group.e-input-focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}

/* ── Preview placeholder (shown for new unsaved components) ── */
.e-dialog .preview-placeholder {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1.5px dashed #7dd3fc;
    border-radius: 10px;
    min-height: 90px;
}

.e-dialog .preview-placeholder-icon {
    font-size: 26px;
    color: #38bdf8;
    flex-shrink: 0;
    margin-top: 2px;
}

.e-dialog .preview-placeholder-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.e-dialog .preview-placeholder-text strong {
    font-size: 14px;
    color: #0369a1;
    font-weight: 700;
}

.e-dialog .preview-placeholder-text p {
    margin: 0;
    font-size: 13px;
    color: #0284c7;
    line-height: 1.5;
}

/* ── Thumbnail placeholder (shown in ClipboardImageEditor when no image) ── */
.e-dialog .thumbnail-placeholder-img {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 13px;
    min-height: 56px;
}

.e-dialog .thumbnail-placeholder-img i {
    font-size: 20px;
    color: #d1d5db;
}

/* ── Compact thumbnail paste hint (shown when ShowEditor=false) ── */
.thumbnail-paste-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8faff;
    border: 1.5px dashed #c7d6f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 13px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.thumbnail-paste-hint i.fa-clipboard {
    font-size: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

.thumbnail-paste-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    color: #374151;
}

.thumb-clear-btn {
    margin-left: auto;
    padding: 4px 10px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
}

.thumb-clear-btn:hover {
    background: #fecaca;
}

/* ── MudPaper wrapper for thumbnail — remove default elevation shadow ── */
.clipboard-thumb-wrap {
    box-shadow: none !important;
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════
   2-Column Compact Edit Dialog  (fc-edit-*)
   ═══════════════════════════════════════════════════════════ */

.fc-edit-dialog {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Header row */
.fc-edit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 16px;
    border-bottom: 2px solid #e8edf5;
    margin-bottom: 18px;
}

.fc-edit-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(59,130,246,.25);
}

.fc-edit-header-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.fc-edit-header-sub {
    font-size: 11px;
    color: #94a3b8;
    font-family: monospace;
    margin-top: 2px;
}

/* Two-column body */
.fc-edit-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

/* Left column */
.fc-edit-left {
    flex: 0 0 400px;
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Right column */
.fc-edit-right {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Field row */
.fc-field-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fc-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.fc-required {
    color: #ef4444;
    font-size: 14px;
    line-height: 1;
}

/* Plain native text input */
.fc-plain-input {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 13.5px;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.fc-plain-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
    outline: none;
}

/* Preview box */
.fc-preview-box {
    background: #f9fbff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.fc-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.fc-preview-actions {
    display: flex;
    gap: 6px;
}

.fc-preview-content {
    min-height: 60px;
}

/* Small action buttons inside preview */
.fc-sm-btn.e-btn,
.fc-sm-btn {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    height: 28px !important;
    border-radius: 7px !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.fc-sm-btn.e-btn:hover,
.fc-sm-btn:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

/* Error box */
.fc-error-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 12.5px;
}

.fc-error-box strong {
    font-size: 13px;
    color: #7f1d1d;
}

.fc-error-textarea {
    width: 100%;
    height: 100px;
    resize: vertical;
    font-family: Consolas, monospace;
    font-size: 11px;
    color: #7f1d1d;
    background: white;
    border: 1px solid #fecaca;
    border-radius: 5px;
    padding: 8px;
    box-sizing: border-box;
}

/* Monaco code editor wrapper */
.fc-monaco {
    flex: 1;
    min-height: 560px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

/* Hide the icon column inside ElegantField when used in fc-monaco */
.fc-monaco .evolve-elegant-field .field-icon-container {
    display: none !important;
}

/* Remove extra padding that ElegantField adds when inside fc-monaco */
.fc-monaco .evolve-elegant-field {
    padding: 0 !important;
    border-bottom: none !important;
}

.fc-monaco .evolve-elegant-field .field-body {
    gap: 0 !important;
}

/* Monaco container height override for compact mode */
.fc-monaco .monaco-editor-container,
.fc-monaco .e-editable-container {
    min-height: 560px !important;
    height: 100% !important;
}

/* Stack layout on narrow screens */
@media (max-width: 768px) {
    .fc-edit-body {
        flex-direction: column;
    }
    .fc-edit-left {
        flex: none;
        width: 100%;
    }
    .fc-monaco {
        min-height: 320px;
    }
}
