
.e-dialog.e-dlg-modal {
    min-width: 1400px !important;
    max-width: 98vw !important;
    width: 1400px !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: 1400px !important;
    max-width: 98vw !important;
    width: 1400px !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 (min-width: 1600px) {
    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: 1600px !important;
        width: 1600px !important;
    }
}
@media (max-width: 1400px) {
    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: 95vw !important;
        width: 95vw !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;
}