.idcard-designer{background-color:#f5f5f5;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,sans-serif;height:100vh}.designer-header{align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;justify-content:space-between;padding:12px 20px}.template-name-input{background:transparent;border:none;border-radius:6px;font-size:18px;font-weight:600;outline:none;padding:8px 12px;transition:background .2s}.template-name-input:focus,.template-name-input:hover{background:#f0f0f0}.header-actions{display:flex;gap:10px}.designer-body{display:flex;flex:1;overflow:hidden}.designer-sidebar{background:#fff;border-right:1px solid #e0e0e0;overflow-y:auto;padding:16px;width:280px}.designer-sidebar.right-sidebar{border-left:1px solid #e0e0e0;border-right:none}.designer-sidebar h3{border-bottom:1px solid #eee;color:#666;font-size:13px;font-weight:600;letter-spacing:.5px;margin:20px 0 12px;padding-bottom:8px;text-transform:uppercase}.designer-sidebar h3:first-child{margin-top:0}.designer-sidebar h4{color:#888;font-size:12px;font-weight:600;margin:16px 0 8px}.field-types{display:grid;gap:8px;grid-template-columns:1fr 1fr}.field-type-btn{align-items:center;background:#fff;border:1px solid #e0e0e0;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;padding:12px 8px;transition:all .2s}.field-type-btn:hover{background:#f5f9ff;border-color:#2196f3}.field-icon{font-size:20px;margin-bottom:4px}.field-label{color:#666;font-size:11px}.card-settings .setting-group{margin-bottom:16px}.card-settings label{color:#666;display:block;font-size:12px;font-weight:500;margin-bottom:6px}.btn-group{display:flex;gap:0}.btn-group .btn{border-radius:0;border-right-width:0;flex:1}.btn-group .btn:first-child{border-radius:6px 0 0 6px}.btn-group .btn:last-child{border-radius:0 6px 6px 0;border-right-width:1px}.btn-group .btn.active{background:#2196f3;border-color:#2196f3;color:#fff}.size-inputs{align-items:center;display:flex;gap:8px}.size-inputs input{flex:1;width:100%}.size-inputs span{color:#999}.background-upload{display:flex;flex-direction:column;gap:8px}.file-input{display:none}.designer-preview{background:#e8e8e8;display:flex;flex:1;flex-direction:column;overflow:hidden;padding:20px}.side-tabs{align-items:center;display:flex;gap:8px;margin-bottom:16px}.side-tabs .tab{background:#fff;border:none;border-radius:6px;color:#666;cursor:pointer;font-weight:500;padding:8px 20px;transition:all .2s}.side-tabs .tab.active{background:#2196f3;color:#fff}.grid-toggle{align-items:center;color:#666;cursor:pointer;display:flex;font-size:13px;gap:6px;margin-left:auto}.preview-wrapper{align-items:flex-start;background:#ddd;border-radius:8px;display:flex;flex:1;justify-content:center;overflow:auto;padding:20px}.idcard-preview-container{border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,.15)}.fields-list{background:#fff;border-radius:8px;margin-top:16px;max-height:150px;overflow-y:auto;padding:12px}.fields-list h4{color:#666;font-size:12px;margin:0 0 8px}.field-item{align-items:center;border-radius:6px;cursor:pointer;display:flex;gap:8px;padding:8px;transition:background .2s}.field-item:hover{background:#f5f5f5}.field-item.selected{background:#e3f2fd}.field-type-icon{font-size:14px}.field-key{flex:1;font-family:monospace;font-size:13px}.delete-btn{background:#ff5252;border:none;border-radius:50%;color:#fff;cursor:pointer;font-size:14px;height:20px;line-height:1;opacity:0;transition:opacity .2s;width:20px}.field-item:hover .delete-btn{opacity:1}.field-properties{display:flex;flex-direction:column;gap:4px}.property-group{margin-bottom:12px}.property-group label{color:#888;display:block;font-size:11px;font-weight:500;letter-spacing:.3px;margin-bottom:4px;text-transform:uppercase}.property-group input[type=number],.property-group input[type=text],.property-group select{border:1px solid #e0e0e0;border-radius:6px;font-size:13px;padding:8px 10px;transition:border-color .2s;width:100%}.property-group input:focus,.property-group select:focus{border-color:#2196f3;outline:none}.property-group input[type=color]{border:1px solid #e0e0e0;border-radius:6px;cursor:pointer;height:36px;padding:2px;width:100%}.position-grid{display:grid;gap:8px;grid-template-columns:1fr 1fr}.property-group.half{margin-bottom:8px}.table-editor-section{border:1px solid #eee;border-radius:6px;margin-bottom:12px;padding:10px}.table-editor-section>strong{color:#555;display:block;font-size:12px;margin-bottom:10px}.property-group.checkbox-group{align-items:center;display:flex;gap:8px}.property-group.checkbox-group input{margin:0}.property-group.checkbox-group label{color:#666;letter-spacing:0;margin:0;text-transform:none}.table-column-editor{background:#fafafa;border:1px solid #f0f0f0;border-radius:6px;margin-bottom:8px;padding:8px}.table-column-inline{display:grid;gap:8px;grid-template-columns:1fr 1fr}.table-sample-grid{display:grid;gap:4px;margin:8px 0;overflow-x:auto;padding-bottom:4px}.table-sample-grid input{border:1px solid #e0e0e0;font-size:12px}.table-sample-grid input,.table-sample-header{border-radius:4px;min-width:90px;padding:6px 8px}.table-sample-header{background:#f0f0f0;color:#666;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.no-selection{color:#999;font-size:13px;padding:20px;text-align:center}.sample-data{margin-top:8px}.sample-data .hint{color:#888;font-size:12px;margin-bottom:12px}.sample-data .property-group{margin-bottom:8px}.validation-errors{background:#fff3e0;border:1px solid #ffcc80;border-radius:8px;margin-top:20px;padding:12px}.validation-errors h4{color:#e65100;font-size:13px;margin:0 0 8px}.validation-errors ul{margin:0;padding-left:20px}.validation-errors li{color:#bf360c;font-size:12px;margin-bottom:4px}.btn{background:#fff;border:1px solid #e0e0e0;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500;padding:8px 16px;transition:all .2s}.btn:hover{background:#f5f5f5}.btn-primary{background:#2196f3;border-color:#2196f3;color:#fff}.btn-primary:hover{background:#1976d2}.btn-primary:disabled{background:#90caf9;cursor:not-allowed}.btn-secondary{background:#757575;border-color:#757575;color:#fff}.btn-secondary:hover{background:#616161}.btn-danger{background:#f44336;border-color:#f44336;color:#fff}.btn-danger:hover{background:#d32f2f}.btn-outline{background:transparent;border:1px dashed #999;color:#666}.btn-outline:hover{border-color:#2196f3;border-style:solid;color:#2196f3}.btn-sm{font-size:12px;padding:4px 10px}.preview-field{background:hsla(0,0%,100%,.1);transition:outline .2s}.preview-field:hover{outline:1px dashed #2196f3}.preview-field.selected{outline:2px solid #2196f3!important}.resize-handle{background:#2196f3;border:1px solid #fff;border-radius:2px;height:8px;position:absolute;width:8px;z-index:1000}.resize-handle-n{cursor:n-resize;top:-4px}.resize-handle-n,.resize-handle-s{left:50%;transform:translateX(-50%)}.resize-handle-s{bottom:-4px;cursor:s-resize}.resize-handle-e{cursor:e-resize;right:-4px}.resize-handle-e,.resize-handle-w{top:50%;transform:translateY(-50%)}.resize-handle-w{cursor:w-resize;left:-4px}.resize-handle-ne{cursor:ne-resize;right:-4px;top:-4px}.resize-handle-nw{cursor:nw-resize;left:-4px;top:-4px}.resize-handle-se{bottom:-4px;cursor:se-resize;right:-4px}.resize-handle-sw{bottom:-4px;cursor:sw-resize;left:-4px}@media (max-width:1200px){.designer-sidebar{width:240px}}@media (max-width:900px){.designer-body{flex-direction:column}.designer-sidebar{border-bottom:1px solid #e0e0e0;border-right:none;max-height:200px;width:100%}.designer-sidebar.right-sidebar{border-left:none;border-top:1px solid #e0e0e0}}