.share-popup-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:10000;animation:sharePopupFadeIn .2s ease-out}@keyframes sharePopupFadeIn{0%{opacity:0}to{opacity:1}}.share-popup-container{background:var(--dialog-bg,#ffffff);border-radius:5px;box-shadow:0 8px 32px rgba(0,0,0,.15);width:85%;max-width:420px;animation:sharePopupSlideUp .3s ease-out}@keyframes sharePopupSlideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.share-popup-header{display:flex;align-items:center;justify-content:space-between;padding:10px 10px 10px 15px;border-bottom:1px solid var(--dialog-bdr,#e5e7eb)}.share-popup-header h3{margin:0;font-size:16px;font-weight:600;color:var(--color-text,#111827)}.share-popup-close-btn{background:none;border:none;font-size:28px;color:var(--color-text,#6b7280);cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:6px;transition:all .2s ease}.share-popup-close-btn:hover{background:var(--background,#f3f4f6);color:var(--color-text,#111827)}.share-popup-content{padding:15px}.share-popup-section{margin-bottom:20px}.share-popup-section:last-child{margin-bottom:0}.share-popup-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.share-popup-toggle-info{flex:1 1;display:flex;flex-direction:column;gap:3px}.share-popup-toggle-label{font-size:14px;font-weight:500;color:var(--color-text,#111827)}.share-popup-toggle-desc{font-size:12px;color:var(--color-text,#6b7280)}.share-popup-toggle-switch{position:relative;display:inline-block;width:48px;height:24px;flex-shrink:0}.share-popup-toggle-switch input{opacity:0;width:0;height:0}.share-popup-toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#cbd5e1;transition:all .3s ease;border-radius:24px}.share-popup-toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background-color:white;transition:all .3s ease;border-radius:50%}.share-popup-toggle-switch input:checked+.share-popup-toggle-slider{background-color:#0b74de}.share-popup-toggle-switch input:checked+.share-popup-toggle-slider:before{transform:translateX(24px)}.share-popup-toggle-switch input:disabled+.share-popup-toggle-slider{opacity:.5;cursor:not-allowed}.share-popup-link-row{display:flex;gap:6px;align-items:center}.share-popup-link-input{flex:1 1;padding:8px 10px;border:1px solid var(--dialog-input-bdr,#d1d5db);border-radius:4px;font-size:14px;color:var(--color-text,#111827);background:var(--background,#f9fafb);outline:none}.share-popup-copy-btn{padding:8px 12px;background:#0b74de;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;white-space:nowrap}.share-popup-copy-btn:hover{background:#0960c2}.share-popup-copy-success{background:#10b981!important}.share-popup-copy-success:hover{background:#059669!important}@media (max-width:640px){.share-popup-container{width:95%;max-width:none}.share-popup-header{padding:12px 16px}.share-popup-content{padding:16px}.share-popup-link-row{flex-direction:column}.share-popup-copy-btn,.share-popup-link-input{width:100%}}.delete-block{background-color:rgba(239,68,68,.15);border-left:1px solid #ef4444}.delete-glyph{background-color:#ef4444;width:4px!important}.add-block{background-color:rgba(34,197,94,.15);border-left:1px solid #22c55e}.add-glyph{background-color:#22c55e;width:4px!important}.diff-action-buttons{display:flex;gap:6px}.diff-action-buttons button{border:none;cursor:pointer;padding:2px 10px;border-bottom-left-radius:3px;border-bottom-right-radius:3px;font-size:12px;font-weight:700;transition:all .2s;display:flex;align-items:center;justify-content:center}.accept-btn{background:#22c55e;color:white}.reject-btn{background:#ef4444;color:white}.diff-action-buttons button:hover{transform:scale(1.1);box-shadow:0 2px 8px rgba(0,0,0,.15)}.diff-action-buttons button:active{transform:scale(.95)}.api-key-input__modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:12000;animation:fadeIn .15s ease-out}.api-key-input__modal{background:var(--background);border-radius:4px;width:96%;max-width:420px;box-shadow:0 10px 40px rgba(0,0,0,.3);animation:slideUp .2s ease-out}.api-key-input__modal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid var(--sql-file-name-input-bg)}.api-key-input__modal-header h3{margin:0;font-size:14px;font-weight:600;color:var(--action-color)}.api-key-input__modal-close{background:none;border:none;font-size:24px;line-height:1;color:var(--muted);cursor:pointer;padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all .15s}.api-key-input__modal-close:hover{background:var(--sql-file-name-input-bg);color:var(--action-color)}.api-key-input__modal-body{padding:12px}.api-key-input__modal-input{width:100%;padding:8px 10px;font-size:13px;border:1px solid var(--sql-file-name-input-bg);border-radius:3px;background:var(--sql-file-name-input-bg);color:var(--action-color);outline:none;box-sizing:border-box;font-family:Consolas,Monaco,monospace;letter-spacing:.5px}.api-key-input__modal-input:focus{border-color:var(--focus-outline)}.api-key-input__modal-hint{margin:8px 0 0;font-size:11px;color:var(--muted);line-height:1.4}.api-key-input__modal-hint a{color:var(--focus-outline);text-decoration:none}.api-key-input__modal-hint a:hover{text-decoration:underline}.api-key-input__modal-footer{display:flex;justify-content:flex-end;gap:6px;padding:10px 12px;border-top:1px solid var(--sql-file-name-input-bg)}.api-key-input__modal-btn{padding:5px 12px;font-size:13px;border:none;border-radius:3px;cursor:pointer;font-weight:500;transition:all .15s}.api-key-input__modal-btn.save{background:var(--focus-outline);color:#fff}.api-key-input__modal-btn.save:disabled{opacity:.5;cursor:not-allowed}.api-key-input__modal-btn.cancel{background:var(--sql-file-name-input-bg);color:var(--action-color)}.api-key-input__modal-btn.remove{background:var(--error-bg);color:#fff;margin-right:auto}.ai-prompt-input{background:var(--background);border-top:.5px solid var(--file-name-input-bdr);padding:5px;margin:0;display:flex;flex-direction:column;gap:5px;max-width:100%;width:100%;box-sizing:border-box}.ai-prompt-input__actions{display:flex;justify-content:flex-end;gap:5px}.ai-prompt-input__btn{padding:4px 10px;font-size:13px;cursor:pointer;transition:all .15s;border-radius:3px;border:none;font-weight:500}.ai-prompt-input__btn.accept{background:#16a34a;color:#fff}.ai-prompt-input__btn.accept:hover{background:#15803d}.ai-prompt-input__btn.reject{background:var(--error-bg);color:#fff}.ai-prompt-input__btn.reject:hover{background:#b91c1c}.ai-prompt-input__field{background:var(--sql-file-name-input-bg);color:var(--action-color);border-radius:3px;min-height:37px;max-height:200px;overflow-y:auto;padding:8px 10px;font-size:14px;line-height:1.5;outline:none;width:100%;box-sizing:border-box;position:relative}.ai-prompt-input__field:focus{border-color:var(--focus-outline)}.ai-prompt-input__field--empty:before{content:attr(data-placeholder);color:var(--muted);pointer-events:none;position:absolute;left:10px;top:8px;right:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-prompt-input__field--disabled{opacity:.6;cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.ai-prompt-input__bottom{display:flex;align-items:center;justify-content:flex-end;gap:8px}.ai-prompt-input__model{background:transparent;color:var(--muted);border:none;padding:4px 6px;font-size:13px;outline:none;cursor:pointer;transition:color .15s;text-align:right}.ai-prompt-input__model:hover{color:var(--action-color)}.ai-prompt-input__btn.send{background:var(--focus-outline);color:#fff;padding:6px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:background .15s}.ai-prompt-input__btn.send:hover{background:#1d4ed8}.ai-prompt-input__send-icon{display:flex;align-items:center;justify-content:center}.ai-prompt-input__send-icon svg{width:20px;height:20px;fill:currentColor}.ai-prompt-input__spinner{display:inline-block;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;animation:ai-spinner .6s linear infinite}@keyframes ai-spinner{to{transform:rotate(1turn)}}.ai-prompt-input__explanation{background:var(--sql-file-name-input-bg);border-radius:3px;padding:10px;width:100%;box-sizing:border-box}.ai-prompt-input__explanation-label{font-size:12px;font-weight:600;color:var(--focus-outline);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.ai-prompt-input__explanation-text{font-size:13px;color:var(--action-color);white-space:pre-wrap;word-break:break-word;max-height:300px;overflow-y:auto;line-height:normal}.ai-prompt-input__api-key-btn{background:transparent;border:none;width:30px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:3px;cursor:pointer;transition:all .15s;color:var(--muted);margin-right:auto}.ai-prompt-input__api-key-btn:hover{background:var(--sql-file-name-input-bg);color:var(--action-color)}.ai-prompt-input__api-key-btn--active{color:#16a34a}.ai-prompt-input__api-key-btn--active:hover{color:#15803d}.sql-editor-container{display:flex;height:100dvh;background-color:var(--background);overflow:hidden}.erd-panel,.sql-panel{position:relative;display:flex;flex-direction:column;background:var(--panel-bg);transition:all .3s ease;overflow:hidden}.sql-editor-container.dragging .erd-panel,.sql-editor-container.dragging .sql-panel{transition:none!important}.chat-toggle-wrapper{position:relative;height:0;width:100%;z-index:1000}.chat-toggle-btn{position:absolute;bottom:-1px!important;right:30px;background:var(--background);border:.5px solid var(--file-name-input-bdr);border-bottom:none;border-radius:10px 10px 0 0;padding:3px 10px 0;cursor:pointer;color:var(--action-color);transition:all .15s;display:inline-flex;align-items:center;gap:5px;font-size:13px;z-index:100}.chat-toggle-btn svg{flex-shrink:0;width:16px;height:16px}.sql-panel{min-width:300px;position:relative}.erd-panel{min-width:400px;flex:1 1}.panel-header{padding:8px;background:var(--panel-header-bg);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.panel-header-left{display:flex;align-items:center;gap:12px}.logo-homepage{display:flex;width:32px;height:32px;align-items:center;justify-content:center}.logo-homepage svg{color:var(--theme-color)}.panel-title{font-size:16px;font-weight:600;color:#333;margin:0}.btn-list-sql{display:flex;align-items:center;justify-content:center;background-color:var(--button-bg);border-radius:2px;padding:4px 5px;cursor:pointer;transition:all .2s ease}.btn-list-sql:hover{transform:translateY(-1px)}.btn-list-sql svg{width:18px;height:18px}.btn-list-sql svg path{fill:var(--color-text)}.file-input-container{padding:0;display:flex;align-items:center;justify-content:space-between;background-color:var(--sql-file-name-input-bg);border-bottom:1px solid var(--file-name-input-bdr)}.file-input-container input{width:100%;padding:6px 10px;border-radius:4px;border:none;color:var(--color-text);background-color:transparent;font-size:13px;font-family:var(--font-family,inherit);outline:none;transition:border-color .2s,box-shadow .2s}.file-save-btn{padding:1px 6.5px;margin-right:8px;background-color:#22c55e;border:none;border-radius:2px;color:white;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s,transform .1s;flex-shrink:0}.file-save-btn:hover{background-color:#16a34a;transform:translateY(-1px)}.file-save-btn:active{transform:translateY(0);background-color:#15803d}.file-save-btn:focus-visible{outline:2px solid #22c55e;outline-offset:2px}.file-save-btn.disabled,.file-save-btn:disabled{background-color:#94a3b8;cursor:not-allowed;transform:none;opacity:.6}.file-save-btn.disabled:hover,.file-save-btn:disabled:hover{background-color:#94a3b8;transform:none}.file-save-btn svg{width:20px;height:20px;fill:none;stroke:currentColor}.file-save-btn .save-spinner{display:inline-block;width:18px;height:18px;border:3px solid #fff;border-top-color:#22c55e;border-radius:50%;animation:saveSpin .8s linear infinite;vertical-align:middle;margin:0 auto}@keyframes saveSpin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.panel-actions{display:flex;gap:8px}.action-btn{width:35px;height:35px;display:flex;align-items:center;justify-content:center;border:none;background:var(--button-bg);border-radius:4px;cursor:pointer;color:var(--action-color);transition:background-color .2s,border-color .2s,color .2s;flex-shrink:0;padding:0}.action-btn svg{width:25px;height:25px}.action-btn svg line,.action-btn svg path{stroke:currentColor;fill:currentColor}.action-btn:focus-visible{outline:2px solid var(--focus-outline);outline-offset:2px}.editor-container{flex:1 1;position:relative;overflow:hidden}.editor-loading{display:flex;align-items:center;justify-content:center;height:200px;color:var(--editor-loading-color);font-style:italic}.error-message,.error-message-display{color:#fff;margin:0;font-size:11.5px;background:var(--error-bg);border-radius:0;flex-shrink:0}.error-message-display{padding:5px 10px}.parse-errors-container{padding:2px;display:flex;flex-direction:column;gap:2px;flex-shrink:0}.parse-error-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;background:var(--error-bg);color:#fff;border-radius:3px;font-size:12px;line-height:1.3;width:100%;box-sizing:border-box}.error-content{flex:1 1;min-width:0}.parse-error-item .error-message{display:block;font-weight:500;word-wrap:break-word;line-height:1.3}.warning-item,.warning-message{background:var(--warning-bg);color:#fff}.error-close-btn,.warning-close-btn{background:none;border:none;color:#fff;font-size:16px;font-weight:700;cursor:pointer;padding:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:2px;transition:background-color .2s;flex-shrink:0}.status-bar{padding:8px 16px;background:var(--status-bg);border-top:1px solid var(--border);font-size:12px;color:var(--muted);display:flex;justify-content:space-between;align-items:center;flex-shrink:0;z-index:101}.schema-info{display:flex;gap:16px}.erd-sql-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--erd-sql-loading-overlay-bg);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1000}.erd-sql-loading-spinner{width:40px;height:40px;border:4px solid var(--foreground);border-top:4px solid #3498db;border-radius:50%;animation:erdSqlLoadingSpin 1s linear infinite}.erd-sql-loading-text{margin-top:16px;font-size:16px;color:var(--color-text)}@keyframes erdSqlLoadingSpin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media (max-width:768px){.sql-editor-container{flex-direction:column;height:100dvh}.erd-panel,.sql-panel{width:100%!important;min-width:unset;min-height:0;flex-shrink:0}.status-bar{padding:6px 12px;font-size:11px}.schema-info{gap:8px}.action-btn{width:auto;height:auto;padding:4px 8px;font-size:11px}}#erd-top-controls{position:absolute;top:9px;left:9px;z-index:100;display:flex;flex-direction:row;gap:8px}.erd-top-btn{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:none;background:var(--button-bg);border-radius:3px;cursor:pointer;color:var(--action-color);box-shadow:0 0 4px 0 rgba(0,0,0,.1),0 0 1px 0 rgba(0,0,0,.1);transition:background-color .2s,border-color .2s,color .2s;flex-shrink:0;padding:0}.erd-top-btn svg{width:20px;height:20px}.erd-top-btn svg line,.erd-top-btn svg path{stroke:currentColor;fill:currentColor}.erd-top-btn:focus-visible{outline:2px solid var(--focus-outline);outline-offset:2px}.erd-panel #erd-container{width:100%;height:100%;margin:0;border-radius:0;flex:1 1;overflow:hidden;background-color:var(--erd-bg)}#erd-canvas{display:block;width:100%;height:100%;cursor:default}#erd-controls{position:absolute;top:100px;right:18px;z-index:100;display:flex;flex-direction:column;gap:8px}.erd-btn{width:40px;height:40px;border:none;border-radius:50%;box-shadow:var(--box-shadow);font-size:1.5rem;cursor:pointer;transition:background .2s;background-color:var(--button-bg);color:var(--foreground)}#color-btn{position:relative}#color-btn svg,#full-connect-btn svg,#layout-btn svg{width:20px;height:20px}#add-table-btn svg,#delete-table-btn svg,#fit-btn svg{width:25px;height:25px}#add-table-btn svg,#color-btn svg,#delete-table-btn svg,#fit-btn svg,#full-connect-btn svg,#layout-btn svg{display:block;margin:auto}#fit-btn g,#full-connect-btn svg,#layout-btn svg path{fill:var(--foreground)}#add-table-btn svg path,#delete-table-btn svg path{stroke:var(--foreground)}#color-popup{position:absolute;bottom:12px;right:45px;z-index:2000;background:var(--background);border-radius:5px;box-shadow:var(--box-shadow);padding:5px;display:none;flex-direction:column;align-items:flex-start;width:120px;box-sizing:border-box}.color-dot-container{width:100%;margin-bottom:5px;display:flex;flex-wrap:wrap;gap:6px;justify-content:center}.color-dot{width:23px;height:23px;border-radius:50%;border:2px solid var(--button-bg);cursor:pointer;transition:border .2s,box-shadow .2s}.color-dot.selected{border:2.5px solid var(--foreground)}#color-hex-row{display:flex;align-items:center;gap:0;margin-top:5px;width:100%;padding:2px 6px;box-sizing:border-box;background:var(--foreground);color:var(--background);border-radius:5px}#color-hex-row span{font-size:13px;font-weight:700;font-family:Arial,sans-serif}#color-hex-input{flex:1 1;width:100%;min-width:0;border:none;border-radius:7px;font-size:13px;outline:none;background:transparent;transition:border .2s;color:var(--background)}.create-new-file-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:fadeIn .2s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.create-new-file-dialog{background:var(--dialog-bg);border:1px solid var(--dialog-bdr);border-radius:5px;padding:20px;max-width:600px;width:90%;box-shadow:0 4px 8px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);animation:slideUp .2s ease-out}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.create-new-file-header{text-align:center;margin-bottom:20px}.create-new-file-header h2{margin:0 0 8px;font-size:24px;font-weight:600;color:var(--foreground)}.create-new-file-subtitle{margin:0;font-size:14px;color:var(--color-text-secondary,#6b7280)}.create-new-file-options{display:flex;gap:12px;flex-direction:column}.create-option-card{align-items:flex-start;gap:12px;padding:12px;background:var(--dialog-bg);border:2px solid var(--dialog-bdr);cursor:pointer;text-align:left;width:100%}.create-option-card,.option-icon{display:flex;border-radius:5px;transition:all .15s ease}.option-icon{flex-shrink:0;width:50px;height:50px;padding:3px;align-items:center;justify-content:center;color:white}.option-icon svg{width:100%;height:100%}.sample-card .option-icon{background:#10b981}.blank-card .option-icon{background:#3b82f6}.option-content{flex:1 1}.option-content h3{margin:0 0 4px;font-size:16px;font-weight:600;color:var(--foreground)}.option-content p{margin:0;font-size:14px;color:var(--color-text-secondary,#6b7280);line-height:1.5}@media (min-width:768px){.create-new-file-options{flex-direction:row}.create-option-card{flex-direction:column;text-align:center;align-items:center;flex:1 1}}