:root{--bg: #f6f7fa;--surface: #ffffff;--surface-warm: #fffaf3;--border: #e8ecf2;--border-gold: #f1d8ad;--text: #1f2937;--text-muted: #6b7280;--accent-orange: #e76639;--accent-orange-hover: #d35529;--accent-gold: #c88919;--accent-gold-bg: #fff6e2;--green: #0e9f6e;--red: #d94343;--radius: 14px}*{box-sizing:border-box}html,body,#root{margin:0;padding:0;height:100%;background:var(--bg);color:var(--text);font-family:PingFang SC,Microsoft YaHei,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased}.app-shell{display:flex;flex-direction:column;height:100vh;overflow:hidden}.topbar{height:64px;padding:0 24px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;z-index:10}.topbar-brand{display:flex;align-items:center;gap:12px}.brand-mark{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#ee7648,#e76639 60%,#d45126);display:flex;align-items:center;justify-content:center;color:#fff7ed;box-shadow:0 4px 12px #e7663940}.topbar-title h1{margin:0;font-size:16px;font-weight:700;color:var(--text);line-height:1.2}.topbar-title span{font-size:12px;color:var(--text-muted)}.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text);transition:all .16s ease}.btn:hover:not(:disabled){border-color:#d1d8e3;background:#fafbfd}.btn:disabled{opacity:.6;cursor:not-allowed}.btn-warm{background:var(--accent-gold-bg);border-color:var(--border-gold);color:#96620f}.btn-warm:hover:not(:disabled){background:#ffefc9;border-color:#e6be74}.btn-primary{background:linear-gradient(135deg,#eb6d40,#e76639 55%,#de8c32);border:none;color:#fff;box-shadow:0 4px 14px #e7663947}.btn-primary:hover:not(:disabled){filter:brightness(1.04);transform:translateY(-1px)}.workspace{flex:1;display:grid;grid-template-columns:460px 1fr;min-height:0}.editor-pane{background:var(--surface);border-right:1px solid var(--border);overflow-y:auto;padding:20px 22px 36px;display:flex;flex-direction:column;gap:18px}.preview-pane{background:radial-gradient(circle at 20% 10%,rgba(240,124,80,.07),transparent 40%),radial-gradient(circle at 85% 15%,rgba(235,184,78,.09),transparent 40%),#eef1f6;overflow:auto;padding:24px 32px;display:flex;flex-direction:column;align-items:center;gap:14px}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:680px;font-size:12px;color:var(--text-muted)}.scale-pills{display:flex;align-items:center;gap:6px;background:#ffffffd9;border:1px solid var(--border);border-radius:9px;padding:3px}.scale-pill{border:none;background:transparent;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:600;color:var(--text-muted);cursor:pointer}.scale-pill.active{background:var(--accent-orange);color:#fff}.canvas-frame{border-radius:18px;overflow:hidden;box-shadow:0 20px 50px #0f172a24;background:#fff;line-height:0}.canvas-frame canvas{display:block;max-width:100%;height:auto}.panel-section{border:1px solid var(--border);border-radius:var(--radius);padding:15px 16px;background:#fcfcfd;display:flex;flex-direction:column;gap:12px}.panel-section-header{display:flex;align-items:center;justify-content:space-between}.panel-section-title{margin:0;font-size:14px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:7px}.panel-dot{width:7px;height:7px;border-radius:50%;background:linear-gradient(135deg,#e76639,#e2b14b)}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field{display:flex;flex-direction:column;gap:5px}.field label{font-size:12px;font-weight:600;color:#4b5563}.field input,.field textarea,.field select{width:100%;border:1px solid #dde3ec;border-radius:9px;padding:8px 10px;font-size:13px;color:var(--text);background:#fff;font-family:inherit;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--accent-orange);box-shadow:0 0 0 3px #e766391f}.field textarea{resize:vertical;min-height:62px;line-height:1.5}.metric-edit-card{border:1px solid #eaedf3;border-radius:12px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:9px}.metric-edit-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.metric-badge-name{font-size:13px;font-weight:700;color:var(--text)}.metric-source-tag{font-size:11px;color:#9a6918;background:#fff7e6;border:1px solid #f2d59a;padding:2px 7px;border-radius:999px}.metric-inputs-row{display:grid;grid-template-columns:1.2fr .65fr .9fr .85fr;gap:7px}.status-banner{border-radius:12px;padding:11px 13px;background:var(--surface-warm);border:1px solid var(--border-gold);font-size:12px;display:flex;flex-direction:column;gap:7px}.status-banner-head{display:flex;align-items:center;justify-content:space-between;font-weight:700;color:#8c4a16}.status-list{display:flex;flex-direction:column;gap:4px}.status-row{display:flex;align-items:flex-start;gap:6px;line-height:1.4;color:#5b4634}.status-ok{color:var(--green);font-weight:700}.status-fail{color:var(--red);font-weight:700}.snapshot-info{font-size:12px;color:var(--text-muted);background:#f8f9fb;border:1px dashed #d6dce6;border-radius:10px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px}.bookmark-count{font-size:11px;font-weight:600;color:#96620f;background:var(--accent-gold-bg);border:1px solid var(--border-gold);padding:2px 8px;border-radius:999px}.bookmark-empty{font-size:12px;color:var(--text-muted);line-height:1.5;padding:4px 2px}.bookmark-list{display:flex;flex-direction:column;gap:7px}.bookmark-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:10px;border:1px solid #eaedf3;background:#fff;transition:all .15s ease}.bookmark-item:hover{border-color:#f0c988;background:#fffcf6}.bookmark-item.active{border-color:var(--accent-orange);background:#fff7f2;box-shadow:0 0 0 2px #e766391a}.bookmark-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;background:none;border:none;padding:0;text-align:left;cursor:pointer;font-family:inherit}.bookmark-title{font-size:12.5px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bookmark-meta{font-size:11px;color:var(--text-muted)}.bookmark-del{width:24px;height:24px;border-radius:6px;border:none;background:transparent;color:#9ca3af;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.bookmark-del:hover{background:#fee2e2;color:var(--red)}.bookmark-auto-tag{display:inline-block;margin-left:5px;font-size:10px;font-weight:700;color:#9e650c;background:#fff5db;border:1px solid #ecc676;padding:1px 6px;border-radius:999px;vertical-align:middle}.cron-card{display:flex;flex-direction:column;gap:10px}.cron-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.cron-desc{font-size:12px;color:var(--text-muted);line-height:1.45}.cron-meta{font-size:11.5px;color:#8c5a14;background:#fff8eb;border:1px solid #f2d9a8;border-radius:8px;padding:7px 10px;line-height:1.45}.switch-btn{position:relative;width:44px;height:24px;border-radius:999px;border:none;background:#d1d8e3;cursor:pointer;transition:background .18s ease;flex-shrink:0;padding:0}.switch-btn.on{background:linear-gradient(135deg,#eb6d40,#e2a43b)}.switch-thumb{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:transform .18s ease}.switch-btn.on .switch-thumb{transform:translate(20px)}.sync-badge{font-size:11px;font-weight:600;color:#0e7a55;background:#ecfdf5;border:1px solid #a7f3d0;padding:2px 8px;border-radius:999px}.auth-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at 20% 15%,rgba(240,124,80,.14),transparent 42%),radial-gradient(circle at 82% 20%,rgba(235,184,78,.16),transparent 44%),#f5f6fa}.auth-card{width:100%;max-width:400px;background:#fff;border:1px solid #f0dec2;border-radius:22px;padding:30px 28px;box-shadow:0 22px 60px #1e293b1a;display:flex;flex-direction:column;gap:16px}.auth-header{display:flex;align-items:center;gap:12px}.auth-header h1{margin:0;font-size:18px;font-weight:700;color:var(--text)}.auth-header p{margin:3px 0 0;font-size:12.5px;color:var(--text-muted)}.auth-error{font-size:12.5px;color:var(--red);background:#fef2f2;border:1px solid #fecaca;border-radius:9px;padding:8px 11px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}.modal-card{width:100%;max-width:600px;background:#fff;border-radius:18px;padding:22px 24px;box-shadow:0 24px 64px #0f172a40;display:flex;flex-direction:column;gap:14px}.modal-card h2{margin:0;font-size:17px;font-weight:700}.modal-desc{margin:0;font-size:13px;color:var(--text-muted);line-height:1.55}.modal-textarea{width:100%;min-height:180px;border:1px solid #d5dce6;border-radius:12px;padding:12px;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;outline:none;resize:vertical}.modal-textarea:focus{border-color:var(--accent-orange);box-shadow:0 0 0 3px #e766391f}.modal-actions{display:flex;justify-content:flex-end;gap:10px}.spin{animation:spin .9s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:1080px){.workspace{grid-template-columns:1fr;overflow-y:auto}.app-shell{height:auto;min-height:100vh;overflow:visible}.editor-pane{overflow:visible;border-right:none;border-bottom:1px solid var(--border)}}
