body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.page-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 15px;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin: 5px 0 0 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.form-builder-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

.components-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
}

.components-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.component-group {
    margin-bottom: 24px;
}

.component-group:last-child {
    margin-bottom: 0;
}

.component-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.component-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.component-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.component-item i {
    color: #2196f3;
    width: 16px;
    font-size: 14px;
}

.form-canvas {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.canvas-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafbfc;
}

.settings-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.canvas-body {
    flex: 1;
    padding: 30px 24px;
    min-height: 400px;
    position: relative;
}

.empty-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c757d;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #fafbfc;
}

.empty-canvas i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #dee2e6;
}

.empty-canvas h6 {
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.empty-canvas p {
    margin: 0;
    font-size: 0.875rem;
}

.canvas-actions {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.properties-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
}

.properties-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-alert {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1565c0;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    text-align: center;
    padding: 20px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fafbfc;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.mobile-preview {
    margin-bottom: 0;
}

.preview-device {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-device i {
    font-size: 2.5rem;
    color: #dee2e6;
    margin-bottom: 12px;
}

.form-field {
    background: #fdfdfd;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.2s ease;
}

.form-field:hover {
    border-color: #2196f3;
    box-shadow: 0 2px 12px rgba(33, 150, 243, 0.1);
}

.field-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    gap: 6px;
}

.form-field:hover .field-controls {
    opacity: 1;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #d0d7de;
    padding: 8px 12px;
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-text {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
}

@media (max-width: 1200px) {
    .form-builder-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .form-settings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}