﻿/* ============================================
   EL-SABA GROUP - PREMIUM DESIGN SYSTEM
   Unified Styles for All Pages
   ============================================ */

/* ============================================
   1. CSS VARIABLES (Design Tokens)
   ============================================ */
:root {
    /* Primary Colors */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --info-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Solid Colors */
    --primary-color: #6366f1;
    --primary-dark: #8b5cf6;
    --success-color: #10b981;
    --success-dark: #059669;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    
    /* Neutral Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 20px rgba(99, 102, 241, 0.3);
    --shadow-success: 0 4px 20px rgba(16, 185, 129, 0.3);
    --shadow-danger: 0 4px 12px rgba(239, 68, 68, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   2. PAGE CONTAINERS
   ============================================ */
.premium-page-container {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* ============================================
   3. PREMIUM HEADERS
   ============================================ */
.premium-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}

.premium-header::before {
    content: '';
    position: absolute;
    top: -50%;
    inset-inline-end: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    clip-path: inset(0 0 0 0 round var(--radius-lg));
}

.premium-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    position: relative;
    z-index: 1;
}

.premium-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.premium-header-text h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.premium-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ============================================
   4. BUTTONS
   ============================================ */
/* Primary Button (Add) */
.btn-premium-add {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.btn-premium-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    background: var(--bg-secondary);
}

/* Refresh Button */
.btn-premium-refresh {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.btn-premium-refresh:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.btn-premium-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Excel Export Button */
.btn-premium-excel {
    background: var(--success-gradient);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-premium-excel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.btn-action-edit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    color: var(--info-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-action-edit:hover {
    background: var(--info-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-action-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-action-delete:hover {
    background: var(--danger-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-danger);
}

.btn-action-view {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-action-view:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* ============================================
   5. STATISTICS CARDS
   ============================================ */
.premium-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 14px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.4);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.purple { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%); color: #8b5cf6; }
.stat-icon.green { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%); color: #10b981; }
.stat-icon.blue { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%); color: #3b82f6; }
.stat-icon.orange { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%); color: #f59e0b; }
.stat-icon.red { background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%); color: #ef4444; }
.stat-icon.cyan { background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%); color: #06b6d4; }

.stat-content h4 {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-content p {
    margin: 0.5rem 0 0 0;
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* ============================================
   6. GRID CONTAINER
   ============================================ */
.premium-grid-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    overflow: hidden;
}

.grid-header-section {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-light);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.grid-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.grid-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.grid-header-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* ============================================
   7. BADGES
   ============================================ */
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.8125rem;
    gap: 0.375rem;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-primary {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ============================================
   8. DIALOG STYLES (ADD - GREEN)
   ============================================ */
.premium-add-dialog {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.premium-add-header {
    background: var(--success-gradient);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-success);
    flex-shrink: 0;
    position: relative;
}

.premium-add-content {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.premium-add-content::-webkit-scrollbar { width: 8px; }
.premium-add-content::-webkit-scrollbar-track { background: var(--border-light); border-radius: 10px; }
.premium-add-content::-webkit-scrollbar-thumb { background: var(--success-gradient); border-radius: 10px; }

.premium-add-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.premium-add-footer .form-header i,
.premium-add-footer .footer-info i { color: var(--success-color); }

.premium-add-footer .btn-footer-save {
    background: var(--success-gradient);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* ============================================
   9. DIALOG STYLES (UPDATE - PURPLE)
   ============================================ */
.premium-update-dialog {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.premium-update-header {
    background: var(--primary-gradient);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-primary);
    flex-shrink: 0;
    position: relative;
}

.premium-update-content {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.premium-update-content::-webkit-scrollbar { width: 8px; }
.premium-update-content::-webkit-scrollbar-track { background: var(--border-light); border-radius: 10px; }
.premium-update-content::-webkit-scrollbar-thumb { background: var(--primary-gradient); border-radius: 10px; }

.premium-update-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.premium-update-footer .form-header i,
.premium-update-footer .footer-info i { color: var(--primary-color); }

.premium-update-footer .btn-footer-save {
    background: var(--primary-gradient);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* ============================================
   10. SHARED DIALOG COMPONENTS
   ============================================ */
.dialog-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.dialog-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dialog-header-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.dialog-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.dialog-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.header-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.header-close-btn:hover {
    background: var(--danger-color);
    transform: rotate(90deg);
    box-shadow: var(--shadow-danger);
}

/* Form Cards */
.form-card {
    background: var(--bg-primary);
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.form-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

/* Footer Actions */
.footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.footer-actions {
    display: flex;
    gap: 1rem;
}

.btn-footer-cancel {
    padding: 0.75rem 1.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-footer-cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-footer-save {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-footer-save:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-footer-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   11. LOADING & EMPTY STATES
   ============================================ */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--primary-color);
}

.loading-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-state h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text p {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* ============================================
   12. SYNCFUSION GRID OVERRIDES
   ============================================ */
.e-grid .e-headercell {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    border-right: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0.75rem;
}

.e-grid .e-headercelldiv,
.e-grid .e-headercell .e-headertext {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.e-grid .e-rowcell {
    padding: 1rem 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
    transition: background 0.2s ease;
}

.e-grid .e-row:hover {
    background: rgba(99, 102, 241, 0.05) !important;
}

.e-grid .e-row:nth-child(even) { background: var(--bg-primary); }
.e-grid .e-row:nth-child(odd) { background: var(--bg-secondary); }

.e-grid .e-pager {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid var(--border-color);
    padding: 1rem;
}

.e-grid .e-pager .e-numericcontainer .e-currentitem {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
    font-weight: 700;
}

/* ============================================
   13. RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {
    .premium-page-container { padding: 1rem 0.5rem; }
    .premium-header { padding: 1.5rem 1rem; flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
    .premium-header-text h1 { font-size: 1.5rem; }
    .header-actions { width: 100%; flex-direction: row; justify-content: center; gap: 0.75rem; }
    .btn-premium-add, .btn-premium-refresh { flex: 1; justify-content: center; padding: 0.75rem 1rem; font-size: 0.9rem; min-width: 0; }
    .action-buttons { flex-wrap: wrap; }
    .grid-header-section { padding: 1.25rem 1.5rem; }
    .grid-header-title { font-size: 1rem; }
    .premium-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
    .stat-card { padding: 1.25rem; }
    
    /* Dialog responsive */
    .premium-add-header, .premium-update-header { padding: 1.5rem 1.25rem; }
    .premium-add-content, .premium-update-content { padding: 1.5rem 1rem; max-height: calc(85vh - 250px); }
    .premium-add-footer, .premium-update-footer { padding: 1.25rem 1rem; flex-direction: column; }
    .footer-actions { width: 100%; flex-direction: column; }
    .btn-footer-cancel, .btn-footer-save { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .premium-header { padding: 1.25rem 0.75rem; }
    .premium-header-icon { width: 48px; height: 48px; font-size: 1.5rem; }
    .premium-header-text h1 { font-size: 1.25rem; }
    .header-actions { flex-direction: column; }
    .btn-premium-add, .btn-premium-refresh { width: 100%; flex: unset; padding: 0.625rem 0.75rem; font-size: 0.85rem; }
    .grid-header-section { padding: 1rem 1.25rem; }
    .grid-header-title { font-size: 0.9375rem; }
    .grid-header-title i { font-size: 1.125rem; }
    .premium-stats { grid-template-columns: 1fr; }
    .stat-icon { width: 48px; height: 48px; font-size: 1.25rem; }
    .stat-content p { font-size: 1.5rem; }
}

/* ============================================
   14. RTL SUPPORT
   MudDialog + Premium Components RTL Fixes
   Uses CSS logical properties where possible.
   ============================================ */

/* Text alignment flips */
[dir="rtl"] .premium-details-value,
[dir="rtl"] .dialog-detail-value {
    text-align: left;
}

/* Premium details list label/value spacing */
[dir="rtl"] .premium-details-item {
    flex-direction: row-reverse;
}

/* Decorative bubble on premium-list-header (was hard-coded to right) */
[dir="rtl"] .premium-list-header::before {
    right: auto;
    left: -10%;
}

/* Premium form header decorative bubbles (top corner) */
[dir="rtl"] .premium-form-header::after,
[dir="rtl"] .premium-form-header.green::after,
[dir="rtl"] .premium-form-header.purple::after,
[dir="rtl"] .premium-form-header.blue::after,
[dir="rtl"] .premium-form-header.orange::after,
[dir="rtl"] .premium-form-header.red::after,
[dir="rtl"] .premium-form-header.cyan::after {
    right: auto;
    left: -15%;
}

/* Premium form header secondary bubble (bottom corner) */
[dir="rtl"] .premium-form-header.green::before,
[dir="rtl"] .premium-form-header.purple::before,
[dir="rtl"] .premium-form-header.blue::before {
    left: auto;
    right: -10%;
}

/* Header shine effect sweep direction */
[dir="rtl"] .premium-form-header::before {
    left: auto;
    right: -100%;
    background: linear-gradient(
        -120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
}

[dir="rtl"] .premium-form-header:hover::before {
    left: auto;
    right: 100%;
}

/* Premium form card top accent bar (::before) uses left/right — already full width, safe */

/* Dialog footer actions — keep logical ordering in RTL */
[dir="rtl"] .dialog-footer-actions,
[dir="rtl"] .footer-actions,
[dir="rtl"] .add-dialog-footer .footer-actions,
[dir="rtl"] .update-dialog-footer .footer-actions {
    flex-direction: row-reverse;
}

/* Notification slide direction for RTL (already partially defined in section 35; keep consolidated fix here for container) */
[dir="rtl"] .premium-notification::before {
    left: auto;
    right: 0;
    border-radius: 0 16px 16px 0;
}

/* Auto-assign / shine animations sweep across full width — no change needed */

/* Search box icon position flips for RTL */
[dir="rtl"] .generator-page .search-box input {
    padding: 12px 40px 12px 14px;
}

[dir="rtl"] .generator-page .search-box i {
    left: auto;
    right: 14px;
}

/* ============================================
   15. ANIMATIONS
   ============================================ */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes premium-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fa-spin { animation: spin 1s linear infinite; }
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }
.animate-pulse { animation: premium-pulse 2s infinite; }

/* ============================================
   16. CODE GENERATOR SPECIFIC STYLES
   ============================================ */
.generator-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.generator-step {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.generator-step.active {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.generator-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.generator-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.generator-step.completed .generator-step-number {
    background: var(--success-gradient);
}

.generator-step-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.code-preview {
    background: #1e293b;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    color: #e2e8f0;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.code-preview .keyword { color: #c084fc; }
.code-preview .type { color: #38bdf8; }
.code-preview .string { color: #4ade80; }
.code-preview .comment { color: #64748b; }

/* ============================================
   DIALOG COMPONENTS
   ============================================ */

/* Base Dialog Content */
.dialog-content-base {
    min-width: 500px;
    max-width: 650px;
}

/* Add Dialog - Green Theme */
.add-dialog-content {
    min-width: 500px;
    max-width: 650px;
}

.add-dialog-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 20px 24px;
    margin: -24px -24px 20px -24px;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.add-dialog-header i {
    font-size: 1.5rem;
    color: white;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-dialog-header h3 {
    color: white;
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.add-dialog-header p {
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0 0;
    font-size: 0.9rem;
}

/* Update Dialog - Purple Theme */
.update-dialog-content {
    min-width: 500px;
    max-width: 650px;
}

.update-dialog-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 20px 24px;
    margin: -24px -24px 20px -24px;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.update-dialog-header i {
    font-size: 1.5rem;
    color: white;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.update-dialog-header h3 {
    color: white;
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.update-dialog-header p {
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0 0;
    font-size: 0.9rem;
}

/* Details Dialog - Blue Theme */
.details-dialog-content {
    min-width: 500px;
    max-width: 650px;
}

.details-dialog-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 20px 24px;
    margin: -24px -24px 20px -24px;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.details-dialog-header i {
    font-size: 1.5rem;
    color: white;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-dialog-header h3 {
    color: white;
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.details-dialog-header p {
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0 0;
    font-size: 0.9rem;
}

/* Delete Dialog - Red Theme */
.delete-dialog-content {
    min-width: 400px;
    max-width: 500px;
    text-align: center;
}

.delete-dialog-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    padding: 20px 24px;
    margin: -24px -24px 20px -24px;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.delete-dialog-header i {
    font-size: 2rem;
    color: white;
}

.delete-dialog-header h3 {
    color: white;
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

/* Dialog Form Cards */
.dialog-form-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.dialog-form-card-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.dialog-form-card-title i {
    font-size: 1rem;
}

.dialog-form-card-title.green i { color: #10b981; }
.dialog-form-card-title.purple i { color: #6366f1; }
.dialog-form-card-title.blue i { color: #3b82f6; }
.dialog-form-card-title.orange i { color: #f59e0b; }

/* Form Rows */
.dialog-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dialog-form-row.single {
    grid-template-columns: 1fr;
}

.dialog-form-row.triple {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .dialog-form-row,
    .dialog-form-row.triple {
        grid-template-columns: 1fr;
    }
}

/* Form Fields */
.dialog-form-field {
    display: flex;
    flex-direction: column;
}

.dialog-form-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.dialog-form-field label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.dialog-form-field label .required {
    color: #ef4444;
    font-weight: 700;
}

/* Dialog Actions */
.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.dialog-actions.center {
    justify-content: center;
}

.dialog-actions.space-between {
    justify-content: space-between;
}

/* Dialog Buttons */
.dialog-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.dialog-btn i {
    font-size: 0.9rem;
}

.dialog-btn.cancel {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.dialog-btn.cancel:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.dialog-btn.save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.dialog-btn.save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.dialog-btn.update {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.dialog-btn.update:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dialog-btn.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.dialog-btn.info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.dialog-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.dialog-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.dialog-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Details Dialog Specific */
.dialog-details-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.dialog-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.dialog-detail-item:last-child {
    border-bottom: none;
}

.dialog-detail-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dialog-detail-label i {
    color: #94a3b8;
    font-size: 0.85rem;
}

[dir="rtl"] .dialog-detail-value {
    text-align: left;
}

.dialog-detail-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    text-align: right;
}

.dialog-detail-value.active {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dialog-detail-value.inactive {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dialog-detail-value.pending {
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Loading Container (base; theme-specific variants defined in section 28) */
.dialog-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
}

.dialog-loading-container > p {
    margin-top: 16px;
    color: #64748b;
    font-size: 0.95rem;
}

/* Empty State */
.dialog-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.dialog-empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.dialog-empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* Switch/Toggle in Dialog */
.dialog-switch-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.dialog-switch-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}

/* Section Divider */
.dialog-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.dialog-section-divider::before,
.dialog-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Info Alert in Dialog */
.dialog-info-alert {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
}

.dialog-info-alert i {
    color: #3b82f6;
    font-size: 1.1rem;
    margin-top: 2px;
}

.dialog-info-alert-content {
    flex: 1;
}

.dialog-info-alert-title {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.dialog-info-alert-text {
    color: #1d4ed8;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Warning Alert */
.dialog-warning-alert {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
}

.dialog-warning-alert i {
    color: #f59e0b;
    font-size: 1.1rem;
    margin-top: 2px;
}

.dialog-warning-alert-content {
    flex: 1;
}

.dialog-warning-alert-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.dialog-warning-alert-text {
    color: #a16207;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ============================================
   17. PREMIUM ADD DIALOG (FULL STYLE - GREEN)
   ============================================ */
.premium-add-module-dialog {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.premium-add-module-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
    position: relative;
}

.premium-add-module-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.premium-add-module-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-add-module-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.premium-add-module-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.premium-add-module-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.premium-add-module-content {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.premium-add-module-content::-webkit-scrollbar { width: 8px; }
.premium-add-module-content::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.premium-add-module-content::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #10b981 0%, #059669 100%); border-radius: 10px; }

.premium-add-module-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.premium-add-module-footer .footer-info i { color: #10b981; }
.premium-add-module-footer .form-header i { color: #10b981; }

.premium-add-module-footer .btn-save {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.premium-add-module-footer .btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.premium-add-module-footer .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   18. PREMIUM UPDATE DIALOG (FULL STYLE - PURPLE)
   ============================================ */
.premium-update-module-dialog {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.premium-update-module-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
    position: relative;
}

.premium-update-module-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.premium-update-module-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-update-module-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.premium-update-module-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.premium-update-module-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.premium-update-module-content {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.premium-update-module-content::-webkit-scrollbar { width: 8px; }
.premium-update-module-content::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.premium-update-module-content::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); border-radius: 10px; }

.premium-update-module-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.premium-update-module-footer .footer-info i { color: #6366f1; }
.premium-update-module-footer .form-header i { color: #6366f1; }

.premium-update-module-footer .btn-save {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.premium-update-module-footer .btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.premium-update-module-footer .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   19. PREMIUM DETAILS DIALOG (FULL STYLE - BLUE)
   ============================================ */
.premium-details-module-dialog {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.premium-details-module-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
    position: relative;
}

.premium-details-module-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.premium-details-module-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-details-module-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.premium-details-module-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.premium-details-module-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.premium-details-module-content {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.premium-details-module-content::-webkit-scrollbar { width: 8px; }
.premium-details-module-content::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.premium-details-module-content::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); border-radius: 10px; }

.premium-details-module-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.premium-details-module-footer .btn-close {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.premium-details-module-footer .btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

/* ============================================
   20. PREMIUM FORM COMPONENTS (SHARED)
   Ultra Professional Form Cards & Headers
   El-Saba Group Premium Design System v2.0
   ============================================ */

/* Form Card - Ultra Premium Styling */
.premium-form-card {
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    border-radius: 24px;
    padding: 0;
    margin-bottom: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.02),
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    backdrop-filter: blur(20px);
}

.premium-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        #6366f1 0%, 
        #8b5cf6 25%, 
        #a855f7 50%, 
        #8b5cf6 75%, 
        #6366f1 100%
    );
    background-size: 300% 100%;
    animation: shimmerSlide 4s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.premium-form-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.premium-form-card:hover::before,
.premium-form-card:hover::after {
    opacity: 1;
}

.premium-form-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 25px 60px rgba(99, 102, 241, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 4px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    transform: translateY(-4px);
}

@keyframes shimmerSlide {
    0% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.5); }
}

/* Form Card Body - Enhanced */
.premium-form-card-body {
    padding: 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 252, 0.5) 100%);
}

/* ===========================================
   PREMIUM FORM HEADER - Ultra Professional Design
   El-Saba Group Design System
   =========================================== */
.premium-form-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    margin: 0;
    position: relative;
    border-radius: 24px 24px 0 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

/* Animated shine effect on header */
.premium-form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.7s ease;
}

.premium-form-header:hover::before {
    left: 100%;
}

/* Decorative corner element */
.premium-form-header::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatBubble 6s ease-in-out infinite;
}

@keyframes floatBubble {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, 10px) scale(1.05); }
}

/* Icon Container - Premium Glass Effect */
.premium-form-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 1;
}

.premium-form-header-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-form-header:hover .premium-form-header-icon {
    transform: scale(1.08) rotate(3deg);
}

.premium-form-header:hover .premium-form-header-icon::before {
    opacity: 1;
}

/* Text Container */
.premium-form-header-content {
    flex: 1;
    z-index: 1;
}

.premium-form-header-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.premium-form-header-subtitle {
    margin: 0.375rem 0 0;
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Legacy support for simple headers */
.premium-form-header span {
    font-size: 1.125rem;
    font-weight: 700;
}

.premium-form-header i { 
    font-size: 1.35rem;
    transition: transform 0.3s ease;
}

.premium-form-header:hover i {
    transform: scale(1.1);
}

/* ===========================================
   GREEN THEME - Success/Add Operations
   Ultra Premium Design with Glassmorphism
   =========================================== */
.premium-form-header.green {
    background: linear-gradient(135deg, 
        #10b981 0%, 
        #059669 40%, 
        #047857 70%, 
        #065f46 100%
    );
    color: white;
    box-shadow: 
        0 8px 32px rgba(16, 185, 129, 0.35),
        0 4px 16px rgba(5, 150, 105, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid rgba(4, 120, 87, 0.5);
}

.premium-form-header.green::after {
    content: '';
    position: absolute;
    top: -80%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        ellipse at center,
        rgba(52, 211, 153, 0.3) 0%,
        rgba(16, 185, 129, 0.15) 40%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGreen 4s ease-in-out infinite;
}

@keyframes pulseGreen {
    0%, 100% { 
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.1) translate(-10px, 10px);
        opacity: 0.8;
    }
}

/* Secondary decorative element */
.premium-form-header.green::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(167, 243, 208, 0.2) 0%,
        transparent 60%
    );
    border-radius: 50%;
    pointer-events: none;
}

.premium-form-header.green .premium-form-header-icon {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    color: white;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-form-header.green:hover .premium-form-header-icon {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(52, 211, 153, 0.3);
}

.premium-form-header.green i { 
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.premium-form-header.green:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.premium-form-header.green span,
.premium-form-header.green .premium-form-header-title {
    color: white;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.premium-form-header.green .premium-form-header-subtitle {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-form-card:has(.premium-form-header.green)::before {
    background: linear-gradient(90deg, 
        #10b981 0%, 
        #34d399 30%, 
        #6ee7b7 50%, 
        #34d399 70%, 
        #10b981 100%
    );
    height: 5px;
}

.premium-form-card:has(.premium-form-header.green):hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 
        0 25px 60px rgba(16, 185, 129, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 4px 10px rgba(0, 0, 0, 0.04);
}

/* ===========================================
   PURPLE THEME - Edit/Update Operations
   Ultra Premium Design with Glassmorphism
   =========================================== */
.premium-form-header.purple {
    background: linear-gradient(135deg, 
        #8b5cf6 0%, 
        #7c3aed 30%, 
        #6366f1 60%, 
        #4f46e5 100%
    );
    color: white;
    box-shadow: 
        0 8px 32px rgba(139, 92, 246, 0.35),
        0 4px 16px rgba(99, 102, 241, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid rgba(79, 70, 229, 0.5);
}

.premium-form-header.purple::after {
    content: '';
    position: absolute;
    top: -80%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        ellipse at center,
        rgba(167, 139, 250, 0.3) 0%,
        rgba(139, 92, 246, 0.15) 40%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    animation: pulsePurple 4s ease-in-out infinite;
}

@keyframes pulsePurple {
    0%, 100% { 
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.1) translate(-10px, 10px);
        opacity: 0.8;
    }
}

/* Secondary decorative element */
.premium-form-header.purple::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(196, 181, 253, 0.2) 0%,
        transparent 60%
    );
    border-radius: 50%;
    pointer-events: none;
}

.premium-form-header.purple .premium-form-header-icon {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    color: white;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-form-header.purple:hover .premium-form-header-icon {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(167, 139, 250, 0.3);
}

.premium-form-header.purple i { 
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.premium-form-header.purple:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.premium-form-header.purple span,
.premium-form-header.purple .premium-form-header-title {
    color: white;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.premium-form-header.purple .premium-form-header-subtitle {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-form-card:has(.premium-form-header.purple)::before {
    background: linear-gradient(90deg, 
        #8b5cf6 0%, 
        #a78bfa 30%, 
        #c4b5fd 50%, 
        #a78bfa 70%, 
        #8b5cf6 100%
    );
    height: 5px;
}

.premium-form-card:has(.premium-form-header.purple):hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 
        0 25px 60px rgba(139, 92, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 4px 10px rgba(0, 0, 0, 0.04);
}

/* ===========================================
   BLUE THEME - View/Details Operations
   Ultra Premium Design with Glassmorphism
   =========================================== */
.premium-form-header.blue {
    background: linear-gradient(135deg, 
        #3b82f6 0%, 
        #2563eb 30%, 
        #1d4ed8 60%, 
        #1e40af 100%
    );
    color: white;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.35),
        0 4px 16px rgba(37, 99, 235, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid rgba(30, 64, 175, 0.5);
}

.premium-form-header.blue::after {
    content: '';
    position: absolute;
    top: -80%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        ellipse at center,
        rgba(96, 165, 250, 0.3) 0%,
        rgba(59, 130, 246, 0.15) 40%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    animation: pulseBlue 4s ease-in-out infinite;
}

@keyframes pulseBlue {
    0%, 100% { 
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.1) translate(-10px, 10px);
        opacity: 0.8;
    }
}

.premium-form-header.blue::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(147, 197, 253, 0.2) 0%,
        transparent 60%
    );
    border-radius: 50%;
    pointer-events: none;
}

.premium-form-header.blue .premium-form-header-icon {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    color: white;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-form-header.blue:hover .premium-form-header-icon {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(96, 165, 250, 0.3);
}

.premium-form-header.blue i { 
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.premium-form-header.blue:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.premium-form-header.blue span,
.premium-form-header.blue .premium-form-header-title {
    color: white;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.premium-form-header.blue .premium-form-header-subtitle {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-form-card:has(.premium-form-header.blue)::before {
    background: linear-gradient(90deg, 
        #3b82f6 0%, 
        #60a5fa 30%, 
        #93c5fd 50%, 
        #60a5fa 70%, 
        #3b82f6 100%
    );
    height: 5px;
}

.premium-form-card:has(.premium-form-header.blue):hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 25px 60px rgba(59, 130, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 4px 10px rgba(0, 0, 0, 0.04);
}

/* ===========================================
   ORANGE THEME - Warning/Settings Operations
   =========================================== */
.premium-form-header.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 
        0 4px 20px rgba(245, 158, 11, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-form-header.orange::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.premium-form-header.orange .premium-form-header-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-form-header.orange i { 
    color: white;
}

.premium-form-header.orange span,
.premium-form-header.orange .premium-form-header-title {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-form-header.orange .premium-form-header-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.premium-form-card:has(.premium-form-header.orange)::before {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
}

/* ===========================================
   RED THEME - Danger/Delete Operations
   =========================================== */
.premium-form-header.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 
        0 4px 20px rgba(239, 68, 68, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-form-header.red::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.premium-form-header.red .premium-form-header-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-form-header.red i { 
    color: white;
}

.premium-form-header.red span,
.premium-form-header.red .premium-form-header-title {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-form-header.red .premium-form-header-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.premium-form-card:has(.premium-form-header.red)::before {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 50%, #ef4444 100%);
}

/* ===========================================
   CYAN THEME - Info/Status Operations
   =========================================== */
.premium-form-header.cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 
        0 4px 20px rgba(6, 182, 212, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-form-header.cyan::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.premium-form-header.cyan .premium-form-header-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-form-header.cyan i { 
    color: white;
}

.premium-form-header.cyan span,
.premium-form-header.cyan .premium-form-header-title {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-form-header.cyan .premium-form-header-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.premium-form-card:has(.premium-form-header.cyan)::before {
    background: linear-gradient(90deg, #06b6d4 0%, #22d3ee 50%, #06b6d4 100%);
}

/* ===========================================
   LIGHT THEME VARIANTS (Non-colored backgrounds)
   =========================================== */
.premium-form-header.light-green {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-bottom: 3px solid #86efac;
}

.premium-form-header.light-green .premium-form-header-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.premium-form-header.light-green i { color: #10b981; }

.premium-form-header.light-purple {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #4c1d95;
    border-bottom: 3px solid #c4b5fd;
}

.premium-form-header.light-purple .premium-form-header-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.premium-form-header.light-purple i { color: #6366f1; }

.premium-form-header.light-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-bottom: 3px solid #93c5fd;
}

.premium-form-header.light-blue .premium-form-header-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.premium-form-header.light-blue i { color: #3b82f6; }

/* Responsive Form Header */
@media (max-width: 768px) {
    .premium-form-header {
        padding: 1rem 1.25rem;
    }
    
    .premium-form-header-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .premium-form-header-title {
        font-size: 1rem;
    }
}

/* Details List */
.premium-details-list {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.premium-details-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.premium-details-item:last-child { border-bottom: none; }
.premium-details-item:hover { background: rgba(99, 102, 241, 0.03); }

.premium-details-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-details-label i { color: #94a3b8; font-size: 0.85rem; }

.premium-details-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    text-align: right;
}

.premium-details-value.active {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-details-value.inactive {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   21. LIST PAGE PREMIUM STYLES
   ============================================ */
.premium-list-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.premium-list-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.premium-list-header::before {
    content: '';
    position: absolute;
    top: -50%;
    inset-inline-end: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.premium-list-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    position: relative;
    z-index: 1;
}

.premium-list-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.premium-list-header-text h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
}

.premium-list-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.premium-list-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn-list-add {
    background: white;
    color: #6366f1;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.btn-list-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    background: #f8fafc;
}

.btn-list-refresh {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.btn-list-refresh:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}

.btn-list-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Stats Container */
.premium-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.premium-stat-card {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.premium-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
}

.premium-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.premium-stat-icon.purple { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%); color: #8b5cf6; }
.premium-stat-icon.green { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%); color: #10b981; }
.premium-stat-icon.blue { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%); color: #3b82f6; }
.premium-stat-icon.orange { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%); color: #f59e0b; }
.premium-stat-icon.red { background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%); color: #ef4444; }
.premium-stat-icon.cyan { background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%); color: #06b6d4; }

.premium-stat-content h4 {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-stat-content p {
    margin: 0.5rem 0 0 0;
    font-size: 1.875rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

/* Grid Container */
.premium-grid-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

.premium-grid-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #f1f5f9;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.premium-grid-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.premium-grid-title i { color: #6366f1; font-size: 1.25rem; }

.btn-excel-export {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-excel-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Responsive Styles for New Components */
@media (max-width: 768px) {
    .premium-add-module-header,
    .premium-update-module-header,
    .premium-details-module-header {
        padding: 1.5rem 1.25rem;
    }
    
    .premium-add-module-content,
    .premium-update-module-content,
    .premium-details-module-content {
        padding: 1.5rem 1rem;
        max-height: calc(85vh - 250px);
    }
    
    .premium-add-module-footer,
    .premium-update-module-footer,
    .premium-details-module-footer {
        padding: 1.25rem 1rem;
        flex-direction: column;
    }
    
    .premium-list-page { padding: 1rem 0.5rem; }
    .premium-list-header { padding: 1.5rem 1rem; flex-direction: column; }
    .premium-list-header-text h1 { font-size: 1.5rem; }
    .premium-list-actions { width: 100%; flex-direction: column; }
    .btn-list-add { width: 100%; justify-content: center; }
    .premium-stats-container { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
}

/* ===================================================
   SECTION 22: CODE GENERATOR PAGE STYLES
   =================================================== */

/* Code Generator Variables */
.code-generator-page {
    --gen-primary: #6366f1;
    --gen-primary-dark: #4f46e5;
    --gen-success: #10b981;
    --gen-warning: #f59e0b;
    --gen-danger: #ef4444;
    --gen-info: #3b82f6;
}

/* Main Container */
.generator-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
}

/* Header */
.gen-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(30, 41, 59, 0.2);
}

.gen-header-info h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gen-header-info p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.95rem;
}

.gen-stats {
    display: flex;
    gap: 16px;
}

.gen-stat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 20px;
    text-align: center;
    min-width: 90px;
}

.gen-stat-value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.gen-stat-label {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Layout Grid */
.gen-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
}

@media (max-width: 1400px) {
    .gen-layout {
        grid-template-columns: 1fr;
    }
    .ai-panel {
        order: -1;
    }
}

/* Steps Panel */
.gen-steps {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: fit-content;
}

.gen-steps-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    border: 2px solid transparent;
}

.step-item:hover {
    background: #f8fafc;
}

.step-item.active {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: var(--gen-primary, #6366f1);
}

.step-item.completed {
    background: #f0fdf4;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    background: #e2e8f0;
    color: #64748b;
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: var(--gen-primary, #6366f1);
    color: #fff;
}

.step-item.completed .step-number {
    background: var(--gen-success, #10b981);
    color: #fff;
}

.step-info {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.step-desc {
    font-size: 0.8rem;
    color: #64748b;
}

/* Main Content Panel */
.gen-main {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.gen-main-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gen-main-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gen-main-title i {
    color: var(--gen-primary, #6366f1);
}

.gen-main-body {
    padding: 24px;
}

/* Form Elements */
.generator-page .form-group {
    margin-bottom: 0;
}

.generator-page .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.generator-page .form-row.single {
    grid-template-columns: 1fr;
}

.generator-page .form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
}

.generator-page .form-label i {
    color: var(--gen-primary, #6366f1);
    font-size: 0.9rem;
}

.generator-page .form-label .required {
    color: var(--gen-danger, #ef4444);
}

.generator-page .form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fff;
}

.generator-page .form-control:focus {
    outline: none;
    border-color: var(--gen-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.generator-page .form-control::placeholder {
    color: #94a3b8;
}

.generator-page .input-with-btn {
    display: flex;
    gap: 8px;
}

.generator-page .input-with-btn .form-control {
    flex: 1;
}

/* Icon Buttons */
.generator-page .btn-icon-sm {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    transition: all 0.2s;
}

.generator-page .btn-icon-sm:hover {
    border-color: var(--gen-primary, #6366f1);
    color: var(--gen-primary, #6366f1);
    background: #eef2ff;
}

.generator-page .btn-icon-sm.success {
    border-color: var(--gen-success, #10b981);
    color: var(--gen-success, #10b981);
    background: #f0fdf4;
}

.generator-page .btn-icon-sm.danger {
    border-color: var(--gen-danger, #ef4444);
    color: var(--gen-danger, #ef4444);
    background: #fef2f2;
}

/* Option Cards */
.generator-page .option-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.generator-page .option-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: #fff;
}

.generator-page .option-card:hover {
    border-color: #c7d2fe;
    background: #fafafa;
}

.generator-page .option-card.active {
    border-color: var(--gen-primary, #6366f1);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.generator-page .option-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.3rem;
}

.generator-page .option-card-icon.create {
    background: #dcfce7;
    color: var(--gen-success, #10b981);
}

.generator-page .option-card-icon.select {
    background: #dbeafe;
    color: var(--gen-info, #3b82f6);
}

.generator-page .option-card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.generator-page .option-card-desc {
    font-size: 0.8rem;
    color: #64748b;
}

/* Properties Editor */
.generator-page .props-editor {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.generator-page .props-header {
    background: #f8fafc;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.generator-page .props-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generator-page .props-list {
    max-height: 300px;
    overflow-y: auto;
}

.generator-page .prop-row {
    display: grid;
    grid-template-columns: 1fr 130px 60px 60px 60px 50px;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.generator-page .prop-row:last-child {
    border-bottom: none;
}

.generator-page .prop-row input,
.generator-page .prop-row select {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.generator-page .prop-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
}

.generator-page .prop-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.generator-page .props-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.generator-page .props-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

/* Search Box */
.generator-page .search-box {
    position: relative;
    margin-bottom: 12px;
}

.generator-page .search-box input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
}

.generator-page .search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Items List */
.generator-page .items-list {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.generator-page .list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.generator-page .list-item:last-child {
    border-bottom: none;
}

.generator-page .list-item:hover {
    background: #f8fafc;
}

.generator-page .list-item.selected {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.generator-page .list-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.generator-page .list-item-icon.dto {
    background: #fef3c7;
    color: #d97706;
}

.generator-page .list-item-icon.interface {
    background: #dbeafe;
    color: #2563eb;
}

.generator-page .list-item-info {
    flex: 1;
    min-width: 0;
}

.generator-page .list-item-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.generator-page .list-item-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.generator-page .list-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

/* Feature Section */
.generator-page .feature-section {
    margin-bottom: 24px;
}

.generator-page .feature-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generator-page .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.generator-page .feature-toggle {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
}

.generator-page .feature-toggle:hover {
    border-color: #c7d2fe;
}

.generator-page .feature-toggle.active {
    border-color: var(--gen-primary, #6366f1);
    background: #eef2ff;
}

.generator-page .feature-toggle i {
    font-size: 1.1rem;
}

.generator-page .feature-toggle span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

/* API Section */
.generator-page .api-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.generator-page .api-section-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generator-page .api-endpoints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.generator-page .api-endpoint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
}

.generator-page .api-endpoint.get {
    background: #dcfce7;
    color: #166534;
}

.generator-page .api-endpoint.post {
    background: #dbeafe;
    color: #1e40af;
}

.generator-page .api-endpoint.inactive {
    background: #f1f5f9;
    color: #94a3b8;
    opacity: 0.7;
}

.generator-page .api-endpoint i {
    font-size: 0.8rem;
}

/* Code Preview */
.generator-page .code-preview {
    background: #1e293b;
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
}

.generator-page .code-preview-tabs {
    display: flex;
    background: #0f172a;
    padding: 8px 12px;
    gap: 4px;
    overflow-x: auto;
}

.generator-page .code-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #94a3b8;
    background: transparent;
    border: none;
    white-space: nowrap;
}

.generator-page .code-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.generator-page .code-tab.active {
    background: var(--gen-primary, #6366f1);
    color: #fff;
}

.generator-page .code-content {
    padding: 16px;
    max-height: 300px;
    overflow: auto;
}

.generator-page .code-content pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* AI Panel */
.generator-page .ai-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 180px);
}

.generator-page .ai-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 18px 22px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.generator-page .ai-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.generator-page .ai-header-info h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.generator-page .ai-header-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin: 0;
}

.generator-page .ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    max-height: 380px;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.generator-page .ai-messages::-webkit-scrollbar {
    width: 6px;
}

.generator-page .ai-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.generator-page .ai-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
}

.generator-page .ai-msg {
    margin-bottom: 12px;
}

.generator-page .ai-msg.user {
    text-align: right;
}

.generator-page .ai-msg-bubble {
    display: inline-block;
    padding: 14px 18px;
    border-radius: 16px;
    max-width: 90%;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.generator-page .ai-msg.assistant .ai-msg-bubble {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #14532d;
    border: 1px solid #86efac;
    border-bottom-left-radius: 4px;
    font-weight: 500;
}

.generator-page .ai-msg.assistant .ai-msg-bubble strong {
    color: #059669;
    font-weight: 700;
}

.generator-page .ai-msg.assistant .ai-msg-bubble code {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
}

.generator-page .ai-msg.user .ai-msg-bubble {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.generator-page .ai-suggestions {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.generator-page .ai-suggest-btn {
    padding: 10px 16px;
    border-radius: 22px;
    border: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: #475569;
}

.generator-page .ai-suggest-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.generator-page .ai-input {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.generator-page .ai-input input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    background: #fff;
    transition: all 0.2s;
}

.generator-page .ai-input input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.generator-page .ai-input input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.generator-page .ai-input button {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.generator-page .ai-input button:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.generator-page .ai-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Actions Bar */
.generator-page .gen-actions {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.generator-page .gen-nav-btns {
    display: flex;
    gap: 10px;
}

.generator-page .btn-nav {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generator-page .btn-prev {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.generator-page .btn-prev:hover {
    border-color: #c7d2fe;
    color: var(--gen-primary, #6366f1);
}

.generator-page .btn-next {
    background: var(--gen-primary, #6366f1);
    border: none;
    color: #fff;
}

.generator-page .btn-next:hover {
    background: var(--gen-primary-dark, #4f46e5);
}

.generator-page .btn-generate {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    color: #fff;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.generator-page .btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.generator-page .btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alert Info */
.generator-page .alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
}

.generator-page .alert-info > i {
    color: var(--gen-info, #3b82f6);
    font-size: 1.1rem;
    margin-top: 2px;
}

.generator-page .alert-info-content {
    flex: 1;
}

.generator-page .alert-info-title {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 2px;
}

.generator-page .alert-info-text {
    color: #1d4ed8;
    font-size: 0.85rem;
}

/* Loading Overlay */
.generator-page .loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

@media (max-width: 1400px) {
    .generator-page .gen-layout {
        grid-template-columns: 1fr;
    }

    .generator-page .ai-panel {
        order: -1;
    }
}

/* Developer Tools Section */
.generator-page .dev-tools-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid #86efac;
}

.generator-page .dev-tools-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.generator-page .dev-tools-header i {
    color: #16a34a;
    font-size: 1.2rem;
}

.generator-page .dev-tools-header span {
    font-weight: 700;
    color: #166534;
}

.generator-page .dev-tool-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #86efac;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.generator-page .dev-tool-btn:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

/* Responsive for Code Generator */
@media (max-width: 768px) {
    .generator-page {
        padding: 12px;
    }
    
    .generator-page .gen-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px;
    }
    
    .generator-page .gen-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .generator-page .form-row {
        grid-template-columns: 1fr;
    }
    
    .generator-page .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generator-page .prop-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .generator-page .gen-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .generator-page .gen-nav-btns {
        width: 100%;
        justify-content: center;
    }
    
    .generator-page .btn-generate {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   23. PREMIUM GENERATED PAGE STYLES
   Styles used by generated pages from Code Generator
   ============================================ */

/* Premium Page Container */
.premium-page-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 2rem 1.5rem;
}

/* Premium Loading State */
.premium-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.premium-loading-state p {
    margin-top: 1rem;
    color: #6366f1;
    font-weight: 600;
    font-size: 1rem;
}

/* Premium Empty State */
.premium-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #64748b;
}

.premium-empty-state i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.premium-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.premium-empty-state p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0;
}

/* Premium Action Buttons (Grid Row) */
.premium-action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

/* Premium Badges */
.premium-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    gap: 0.375rem;
}

.premium-badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.premium-badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.premium-badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.premium-badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Premium Syncfusion Grid Override */
.premium-sf-grid {
    border: none !important;
}

.premium-sf-grid .e-headercell {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 1rem 0.75rem !important;
}

.premium-sf-grid .e-headercelldiv,
.premium-sf-grid .e-headercell .e-headertext {
    color: #1e293b !important;
    font-weight: 700 !important;
}

.premium-sf-grid .e-rowcell {
    padding: 0.875rem 0.75rem !important;
    font-size: 0.9375rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9 !important;
    font-weight: 500;
    transition: background 0.2s ease;
}

.premium-sf-grid .e-row:hover {
    background: rgba(99, 102, 241, 0.04) !important;
}

.premium-sf-grid .e-row:nth-child(even) {
    background: #ffffff;
}

.premium-sf-grid .e-row:nth-child(odd) {
    background: #fafbfc;
}

.premium-sf-grid .e-pager {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%) !important;
    border-top: 2px solid #e2e8f0 !important;
    padding: 1rem !important;
}

.premium-sf-grid .e-pager .e-numericcontainer .e-currentitem {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border-color: #6366f1 !important;
    color: white !important;
    font-weight: 700;
}

/* ============================================
   24. PREMIUM DIALOG STYLES (GENERATED)
   ============================================ */

/* Dialog Container (MudDialog Override) */
.premium-dialog-container {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* Dialog Header Variants */
.premium-dialog-header {
    padding: 1.75rem 2rem;
    flex-shrink: 0;
    position: relative;
}

.premium-dialog-header.add {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.premium-dialog-header.edit {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.premium-dialog-header.view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.premium-dialog-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.premium-dialog-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-dialog-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.premium-dialog-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.premium-dialog-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Dialog Close Button */
.dialog-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dialog-close-btn:hover {
    background: #ef4444;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Dialog Body */
.premium-dialog-body {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.premium-dialog-body::-webkit-scrollbar {
    width: 8px;
}

.premium-dialog-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.premium-dialog-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
}

/* Dialog Form Section */
.premium-form-section {
    background: white;
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.premium-form-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

.premium-form-section-header i {
    font-size: 1.25rem;
}

.premium-form-section-header.green i { color: #10b981; }
.premium-form-section-header.purple i { color: #6366f1; }
.premium-form-section-header.blue i { color: #3b82f6; }

/* Dialog Footer */
.premium-dialog-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.premium-dialog-footer.center {
    justify-content: center;
}

.dialog-footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.dialog-footer-info i {
    color: #6366f1;
}

.dialog-footer-actions {
    display: flex;
    gap: 1rem;
}

/* Dialog Buttons */
.btn-dialog-cancel {
    padding: 0.75rem 1.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dialog-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-dialog-save {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dialog-save.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-dialog-save.green:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.btn-dialog-save.purple {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-dialog-save.purple:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.btn-dialog-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-dialog-close {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dialog-close.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-dialog-close.blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

/* Dialog Loading */
.premium-dialog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.premium-dialog-loading p {
    margin-top: 1rem;
    color: #6366f1;
    font-weight: 600;
}

/* Details Grid (for Details Dialog) */
.premium-details-grid {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.premium-details-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.premium-details-item:last-child {
    border-bottom: none;
}

.premium-details-item:hover {
    background: rgba(99, 102, 241, 0.03);
}

.premium-details-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-details-label i {
    color: #94a3b8;
    font-size: 0.85rem;
}

.premium-details-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    text-align: right;
}

.premium-details-value.active {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-details-value.inactive {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dialog Empty State */
.dialog-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #94a3b8;
}

.dialog-empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.dialog-empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* ============================================
   25. ENDPOINT URL CONFIGURATION STYLES
   ============================================ */
.endpoint-url-config {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.endpoint-url-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.endpoint-url-header i {
    color: #6366f1;
}

.optional-label {
    font-weight: 400;
    color: #94a3b8;
}

.endpoint-url-inputs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.url-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 80px;
}

.url-input-group.flex-2 {
    flex: 2;
}

.url-input-group label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}

.url-input {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: monospace;
}

.url-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.action-input {
    background: #f0fdf4;
    border-color: #86efac;
}

.url-separator {
    padding: 8px 4px;
    color: #94a3b8;
    font-weight: 600;
    font-family: monospace;
}

.url-preview {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #64748b;
}

.url-preview i {
    color: #10b981;
}

.url-preview code {
    background: #1e293b;
    color: #4ade80;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    flex: 1;
    overflow-x: auto;
}

/* Auto Assign DTOs Button */
.btn-auto-assign-dto {
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7c3aed;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auto-assign-dto:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-auto-assign-dto i {
    font-size: 1rem;
}

/* Reset Endpoints Button */
.btn-reset-endpoints {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    transition: all 0.2s;
}

.btn-reset-endpoints:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Endpoints Config List */
.endpoints-config-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.endpoint-config-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.endpoint-config-item.enabled {
    border-color: #c7d2fe;
}

.endpoint-config-item.disabled {
    opacity: 0.7;
}

/* Responsive Adjustments for Dialogs */
@media (max-width: 768px) {
    .premium-dialog-header {
        padding: 1.5rem 1.25rem;
    }
    
    .premium-dialog-body {
        padding: 1.5rem 1rem;
        max-height: calc(85vh - 250px);
    }
    
    .premium-dialog-footer {
        padding: 1.25rem 1rem;
        flex-direction: column;
    }
    
    .dialog-footer-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-dialog-cancel,
    .btn-dialog-save,
    .btn-dialog-close {
        width: 100%;
        justify-content: center;
    }
    
    .endpoint-url-inputs {
        flex-direction: column;
    }
    
    .url-separator {
        display: none;
    }
    
    .url-input-group {
        width: 100%;
    }
}

/* ============================================
   26. CODE GENERATOR - ADD DIALOG STYLES
   Styles for generated Add dialogs (Green Theme)
   ============================================ */
.add-dialog-container {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.add-dialog-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

.add-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.add-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.add-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.add-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.add-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.add-dialog-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.add-dialog-content::-webkit-scrollbar {
    width: 8px;
}

.add-dialog-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.add-dialog-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
}

.add-dialog-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.add-dialog-footer .footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.add-dialog-footer .footer-info i {
    color: #10b981;
}

.add-dialog-footer .footer-actions {
    display: flex;
    gap: 1rem;
}

.add-dialog-footer .btn-cancel {
    padding: 0.75rem 1.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #64748b;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.add-dialog-footer .btn-cancel:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.add-dialog-footer .btn-save {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.add-dialog-footer .btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.add-dialog-footer .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   27. CODE GENERATOR - UPDATE DIALOG STYLES
   Styles for generated Update dialogs (Purple Theme)
   ============================================ */
.update-dialog-container {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.update-dialog-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.update-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.update-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.update-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.update-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.update-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.update-dialog-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 200px);
}

.update-dialog-content::-webkit-scrollbar {
    width: 8px;
}

.update-dialog-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.update-dialog-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
}

.update-dialog-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.update-dialog-footer .footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.update-dialog-footer .footer-info i {
    color: #6366f1;
}

.update-dialog-footer .footer-actions {
    display: flex;
    gap: 1rem;
}

.update-dialog-footer .btn-cancel {
    padding: 0.75rem 1.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #64748b;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.update-dialog-footer .btn-cancel:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.update-dialog-footer .btn-save {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.update-dialog-footer .btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.update-dialog-footer .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   28. SHARED FORM STYLES FOR GENERATED DIALOGS
   ============================================ */

/* Form Card - used in Add/Update dialogs */
.generated-form-card {
    background: white;
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.generated-form-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

.generated-form-header i {
    font-size: 1.25rem;
}

.generated-form-header.green i {
    color: #10b981;
}

.generated-form-header.purple i {
    color: #6366f1;
}

.generated-form-header.blue i {
    color: #3b82f6;
}

/* Dialog Loading Container */
.dialog-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.dialog-loading-container p {
    margin-top: 1rem;
    font-weight: 600;
}

.dialog-loading-container.green p {
    color: #10b981;
}

.dialog-loading-container.purple p {
    color: #6366f1;
}

.dialog-loading-container.blue p {
    color: #3b82f6;
}

/* ============================================
   29. RESPONSIVE STYLES FOR GENERATED DIALOGS
   ============================================ */
@media (max-width: 768px) {
    .add-dialog-header,
    .update-dialog-header {
        padding: 1.5rem 1.25rem;
    }
    
    .add-dialog-content,
    .update-dialog-content {
        padding: 1.5rem 1rem;
    }
    
    .add-dialog-footer,
    .update-dialog-footer {
        padding: 1.25rem 1rem;
        flex-direction: column;
    }
    
    .add-dialog-footer .footer-actions,
    .update-dialog-footer .footer-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .add-dialog-footer .btn-cancel,
    .add-dialog-footer .btn-save,
    .update-dialog-footer .btn-cancel,
    .update-dialog-footer .btn-save {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   30. ENDPOINT DTO SELECTOR MODAL STYLES
   ============================================ */
.endpoint-dto-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.endpoint-dto-selector-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.endpoint-dto-selector-header {
    padding: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.endpoint-dto-selector-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.endpoint-dto-selector-header p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.dto-select-item {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dto-select-item:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

/* ============================================
   31. ADDITIONAL UTILITY CLASSES
   ============================================ */

/* Method Badge */
.method-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.method-badge.get {
    background: #dbeafe;
    color: #2563eb;
}

.method-badge.post {
    background: #dcfce7;
    color: #16a34a;
}

.method-badge.put {
    background: #fef3c7;
    color: #d97706;
}

.method-badge.delete {
    background: #fee2e2;
    color: #dc2626;
}

/* Endpoint Icon */
.endpoint-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.endpoint-icon.get {
    background: #dbeafe;
    color: #2563eb;
}

.endpoint-icon.post {
    background: #dcfce7;
    color: #16a34a;
}

/* Property Header Row */
.prop-header-row {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.7rem;
    color: #64748b;
}

/* Namespace Preview Alert */
.namespace-preview-alert {
    margin-top: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #7dd3fc;
    border-radius: 10px;
    padding: 12px 16px;
}

.namespace-preview-alert .alert-title {
    font-size: 0.85rem;
    color: #0369a1;
    font-weight: 600;
}

.namespace-preview-alert .alert-content {
    font-family: monospace;
    font-size: 0.8rem;
    color: #0c4a6e;
    margin-top: 4px;
}

/* ============================================
   32. DTO USAGE SUMMARY PANEL
   Premium visualization for DTO mapping
   ============================================ */

/* DTO Usage Summary Container */
.dto-usage-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.dto-usage-summary:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

/* DTO Map Card */
.dto-map-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.dto-map-card:hover {
    border-color: #c7d2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Auto Assign Button */
.auto-assign-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.auto-assign-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.auto-assign-btn:hover::before {
    left: 100%;
}

.auto-assign-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.auto-assign-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.auto-assign-btn i {
    font-size: 1.1rem;
    animation: magicPulse 2s infinite;
}

@keyframes magicPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* DTO Mapping Info */
.dto-mapping-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Endpoint DTO Select Item Hover */
.dto-select-item {
    transition: all 0.2s ease;
}

.dto-select-item:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac !important;
    transform: translateX(4px);
}

/* ============================================
   33. AI ASSISTANT ENHANCED STYLES
   ============================================ */

/* AI Status Indicators */
.ai-header-icon.ai-online {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.ai-header-icon.ai-offline {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
}

.ai-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.ai-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.ai-status.online i {
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

.ai-status.offline {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* AI Settings Button */
.ai-settings-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-settings-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* AI Settings Panel */
.ai-settings-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-settings-content h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.ai-settings-content h4 i {
    color: #6366f1;
}

.ai-setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ai-setting-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.ai-setting-item input,
.ai-setting-item select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
}

.ai-setting-item input:focus,
.ai-setting-item select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ai-setting-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.ai-save-btn,
.ai-test-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.ai-save-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.ai-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.ai-test-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.ai-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* AI Thinking Animation */
.ai-msg-bubble.ai-thinking {
    display: flex;
    gap: 6px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border: 1px solid #86efac;
}

.ai-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out;
}

.ai-dot:nth-child(1) { animation-delay: 0s; }
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* AI Code Snippet */
.ai-code-snippet {
    margin-top: 12px;
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
}

.ai-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #334155;
    color: #94a3b8;
    font-size: 0.8rem;
}

.ai-code-header span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-code-header button {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ai-code-header button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ai-code-snippet pre {
    margin: 0;
    padding: 14px;
    overflow-x: auto;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.ai-code-snippet code {
    font-family: inherit;
}

/* AI Inline Code */
.ai-inline {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.88em;
    font-weight: 500;
}

.ai-inline-code {
    margin: 10px 0;
    background: #1e293b;
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
}

.ai-inline-code code {
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
}

/* Enhanced AI Message Formatting */
.ai-msg.assistant .ai-msg-bubble {
    line-height: 1.7;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    color: #14532d !important;
    border: 1px solid #86efac;
}

.ai-msg.assistant .ai-msg-bubble strong {
    color: #059669;
    font-weight: 700;
}

.ai-msg.user .ai-msg-bubble {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #ffffff !important;
}

/* AI Panel Scrollbar */
.ai-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.ai-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.ai-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Responsive AI Panel */
@media (max-width: 768px) {
    .ai-settings-panel {
        margin: 8px;
        padding: 12px;
    }
    
    .ai-setting-actions {
        flex-direction: column;
    }
    
    .ai-code-snippet pre {
        font-size: 0.75rem;
        padding: 10px;
    }
}

/* ============================================
   34. CODE GENERATOR - DETAILS DIALOG STYLES
   Premium styles for generated Details dialogs (Blue Theme)
   Note: .premium-details-module-dialog and .details-dialog-header
   are defined in Section 19 (reused here).
   ============================================ */

.details-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.details-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.details-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.details-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.details-header-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Details Dialog Content */
.details-dialog-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 180px);
}

.details-dialog-content::-webkit-scrollbar {
    width: 8px;
}

.details-dialog-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.details-dialog-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
}

/* Details Info Grid */
.details-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.details-info-card {
    background: white;
    border-radius: 14px;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.details-info-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.details-info-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-info-label i {
    color: #3b82f6;
    font-size: 0.875rem;
}

.details-info-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.125rem;
}

.details-info-value.boolean-true {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-info-value.boolean-false {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Details Dialog Footer */
.details-dialog-footer {
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.details-dialog-footer .btn-close {
    padding: 0.875rem 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.details-dialog-footer .btn-close:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Responsive Details Dialog */
@media (max-width: 768px) {
    .details-dialog-header {
        padding: 1.5rem 1.25rem;
    }
    
    .details-dialog-content {
        padding: 1.5rem 1rem;
    }
    
    .details-info-grid {
        grid-template-columns: 1fr;
    }
    
    .details-dialog-footer {
        padding: 1rem;
    }
}

/* ============================================
   35. PREMIUM NOTIFICATION SYSTEM
   Beautiful Toast Notifications
   El-Saba Group Design System
   ============================================ */

/* Notification Container - uses logical properties for RTL support */
.premium-notification-container {
    position: fixed;
    top: 24px;
    inset-inline-end: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

/* Individual Notification */
.premium-notification {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    background: white;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideInNotification 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.premium-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    border-radius: 16px 0 0 16px;
}

.premium-notification.closing {
    animation: slideOutNotification 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

[dir="rtl"] .premium-notification {
    animation-name: slideInNotificationRtl;
}

@keyframes slideInNotificationRtl {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutNotification {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
}

/* Notification Icon Container */
.premium-notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    position: relative;
}

.premium-notification-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: inherit;
    opacity: 0.15;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.15); opacity: 0.08; }
}

/* Notification Content */
.premium-notification-content {
    flex: 1;
    min-width: 0;
}

.premium-notification-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.premium-notification-message {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Close Button */
.premium-notification-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.premium-notification-close:hover {
    background: #f1f5f9;
    color: #64748b;
    transform: rotate(90deg);
}

/* Progress Bar */
.premium-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.premium-notification-progress-bar {
    height: 100%;
    animation: shrinkProgress linear forwards;
}

@keyframes shrinkProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== SUCCESS NOTIFICATION ===== */
.premium-notification.success::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.premium-notification.success .premium-notification-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.premium-notification.success .premium-notification-progress-bar {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* ===== ERROR NOTIFICATION ===== */
.premium-notification.error::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.premium-notification.error .premium-notification-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.premium-notification.error .premium-notification-progress-bar {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* ===== WARNING NOTIFICATION ===== */
.premium-notification.warning::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.premium-notification.warning .premium-notification-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.premium-notification.warning .premium-notification-progress-bar {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

/* ===== INFO NOTIFICATION ===== */
.premium-notification.info::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.premium-notification.info .premium-notification-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.premium-notification.info .premium-notification-progress-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

/* Responsive Notifications */
@media (max-width: 480px) {
    .premium-notification-container {
        top: 16px;
        inset-inline-start: 16px;
        inset-inline-end: 16px;
        max-width: none;
    }

    .premium-notification {
        padding: 14px 16px;
    }

    .premium-notification-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ============================================
   36. PREMIUM MUDBLAZOR FORM FIELD ENHANCEMENTS
   Enhanced styling for MudBlazor form components
   ============================================ */

/* Premium Text Field */
.premium-form-card .mud-input-control {
    margin-bottom: 0;
}

.premium-form-card .mud-input-outlined {
    border-radius: 12px !important;
}

.premium-form-card .mud-input-outlined .mud-input-outlined-border {
    border-width: 2px;
    border-color: #e2e8f0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-form-card .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #cbd5e1;
}

.premium-form-card .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Green theme focus */
.premium-form-card:has(.premium-form-header.green) .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Purple theme focus */
.premium-form-card:has(.premium-form-header.purple) .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Blue theme focus */
.premium-form-card:has(.premium-form-header.blue) .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Premium Checkbox & Switch */
.premium-form-card .mud-checkbox svg,
.premium-form-card .mud-switch-track {
    transition: all 0.3s ease;
}

.premium-form-card .mud-checkbox:hover svg {
    transform: scale(1.1);
}

/* Premium Select */
.premium-form-card .mud-select .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* Premium Date Picker */
.premium-form-card .mud-picker .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* Form Field Labels */
.premium-form-card .mud-input-label {
    font-weight: 600;
    color: #475569;
}

.premium-form-card .mud-input-label.mud-input-label-animated.mud-input-label-margin-dense {
    font-size: 0.9rem;
}

/* Required Field Indicator */
.premium-form-card .mud-input-label:has(+ .mud-input-control[required])::after,
.required-field::after {
    content: ' *';
    color: #ef4444;
    font-weight: 700;
}

/* Helper Text */
.premium-form-card .mud-input-helper-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

/* Error State */
.premium-form-card .mud-input-error .mud-input-outlined-border {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.premium-form-card .mud-input-error .mud-input-helper-text {
    color: #ef4444;
}

/* Adornments */
.premium-form-card .mud-input-adornment {
    color: #94a3b8;
}

.premium-form-card .mud-input.mud-focused .mud-input-adornment {
    color: #6366f1;
}

.premium-form-card:has(.premium-form-header.green) .mud-input.mud-focused .mud-input-adornment {
    color: #10b981;
}

.premium-form-card:has(.premium-form-header.purple) .mud-input.mud-focused .mud-input-adornment {
    color: #8b5cf6;
}

/* ============================================
   37. PREMIUM MudGrid SPACING
   ============================================ */
.premium-form-card .mud-grid {
    margin: 0 -8px;
}

.premium-form-card .mud-grid > .mud-item {
    padding: 8px;
}

/* Form Section Dividers */
.premium-form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

.premium-form-divider::before,
.premium-form-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.premium-form-divider i {
    color: #6366f1;
}
