.export-btn{padding:4px 16px;border:none;background:#3D8570;color:#fff;border-radius:20px;cursor:pointer;font-size:11.7px;margin-left:12px;transition:.2s}
.export-btn:hover{background:#5a3a8a}
  * { margin:0; padding:0; box-sizing:border-box; }
  html,.simulator-container {height:100%;}
  .simulator-container {font-family:'Microsoft YaHei','Segoe UI',sans-serif;background:linear-gradient(135deg,#2F6B5A 0%,#3D8570 100%);height:100vh;overflow:hidden;display:flex;flex-direction:column;}
  .topbar{background:linear-gradient(135deg,#2F6B5A 0%,#3D8570 100%);color:#fff;padding:4px 20px;display:flex;align-items:center;gap:14px;flex:0 0 auto;}
  .topbar h1{font-size:1.12em;white-space:nowrap;}
  .topbar .sub{font-size:0.72em;opacity:.85;white-space:nowrap;}
  .main{flex:1 1 auto;display:flex;gap:3px;padding:5px 14px;min-height:0;}
  .left{flex:0 0 46%;display:flex;flex-direction:column;gap:4px;min-height:0;}
  .left-inner{display:flex;flex-direction:row;gap:5px;flex:1 1 auto;min-height:0;}
  .bike-wrap{flex:1 1 auto;background:#fff;border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;min-width:0;}
  .bike-wrap svg{width:100%;height:100%;}
  .specs-panel{flex:0 0 180px;background:#fff;border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.25);padding:4px 10px;display:flex;flex-direction:column;gap:4px;}
  .specs-panel h3{font-size:0.77em;font-weight:bold;color:#2F6B5A;border-bottom:1px solid #EFEAE0;padding-bottom:5px;margin-bottom:2px;}
  .sp-row{display:flex;justify-content:space-between;align-items:center;padding:2px 0;border-bottom:1px solid #f1f5f9;font-size:0.65em;line-height:1.2;}
  .sp-row:last-child{border-bottom:none;}
  .sp-lbl{color:#6B6355;}
  .sp-val{font-weight:bold;color:#4A6B84;}
  .sp-val.green{color:#4A6B84;}
  .sp-val.orange{color:#4A6B84;}
  .sp-val.blue{color:#4A6B84;}
  .sp-section{font-family:"Microsoft YaHei","SimHei","黑体",sans-serif;font-weight:700;color:#2C2A26;font-size:0.70em;margin-top:6px;padding-top:6px;border-top:1px solid #E4DED2;}
  .results{flex:0 0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;}
  .rc{background:linear-gradient(135deg,#2F6B5A,#3D8570);color:#fff;border-radius:10px;padding:4px 4px;text-align:center;box-shadow:0 3px 8px rgba(0,0,0,.2);}
  .rc h3{font-size:0.65em;opacity:.9;font-weight:normal;margin-bottom:2px;}
  .rc .v{font-size:1.35em;font-weight:bold;line-height:1;}
  .right{flex:1 1 auto;background:#fff;border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.25);padding:4px 10px;display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:auto;}
  .row{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;margin-bottom:4px;}
  .field{display:flex;flex-direction:column;margin-bottom:2px;}
  .field label{font-size:0.65em;font-weight:600;color:#6B6355;margin-bottom:2px;}
  .field input,.field select{padding:4px 6px;border:1.5px solid #EFEAE0;border-radius:6px;font-size:0.77em;width:100%;background:#F8F6F1;transition:border-color .2s;}
  .field input:focus,.field select:focus{outline:none;border-color:#2F6B5A;}
  .sec-title{font-size:0.70em;font-weight:bold;color:#2F6B5A;border-left:3px solid #2F6B5A;padding-left:5px;margin-bottom:2px;}
  .preset-line{display:flex;flex-wrap:wrap;gap:3px;}
  .pb{padding:3px 8px;border:none;border-radius:6px;background:linear-gradient(135deg,#2F6B5A,#3D8570);color:#fff;font-size:0.65em;font-weight:bold;cursor:pointer;transition:transform .15s;}
  .pb:hover{transform:translateY(-1px);}
  .charts{display:none;}
  .chart-box{background:#F8F6F1;border-radius:10px;padding:6px;display:flex;flex-direction:column;}
  .chart-box h4{font-size:0.68em;text-align:center;color:#6B6355;margin-bottom:2px;}
  .chart-box canvas{flex:1 1 auto;}
  .table-box{flex:0 0 auto;}
  table{width:100%;border-collapse:collapse;font-size:0.65em;}
  th{background:#2F6B5A;color:#fff;padding:4px 3px;position:sticky;top:0;}
  td{padding:3px;text-align:center;border-bottom:1px solid #eee;}
  tr:hover td{background:#F6F3ED;}
  @media(max-width:1200px){.main{flex-direction:column;}.left{flex:0 0 300px;}}
  .tabs{display:flex;gap:3px;margin-left:auto;}
  .tab{padding:6px 14px;border:none;border-radius:8px;background:rgba(255,255,255,.18);color:#fff;font-size:0.74em;font-weight:bold;cursor:pointer;transition:background .2s;}
  .tab:hover{background:rgba(255,255,255,.32);}
  .tab.active{background:#fff;color:#2F6B5A;}
  .lexy-card{flex:1 1 auto;background:#fff;border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.25);padding:14px 16px;display:flex;flex-direction:column;gap:5px;overflow-y:auto;min-height:0;}.lexy-card .charts{display:flex;height:380px;flex:0 0 auto;gap:16px;margin-top:8px;padding-bottom:8px;}.lexy-card .charts canvas{height:100%!important;width:100%!important;}
  .lexy-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px;}
  .lexy-head h2{font-size:0.85em;color:#2F6B5A;margin:0 0 6px 0;}
  .lexy-motor-tabs{display:flex;gap:3px;align-items:center;}
  .lexy-mbtn{padding:6px 14px;border:none;border-radius:8px;background:linear-gradient(135deg,#7FB3A2,#2F6B5A);color:#fff;font-size:0.77em;font-weight:bold;cursor:pointer;}
  .lexy-mbtn.active{background:linear-gradient(135deg,#2F6B5A,#3D8570);}
  .lexy-assumptions{display:flex;flex-wrap:wrap;align-items:center;gap:5px;background:#F8F6F1;border:1px solid #EFEAE0;border-radius:10px;padding:4px 10px;}
  .lexy-assumptions label{font-size:0.72em;color:#6B6355;display:flex;align-items:center;gap:4px;}
  .lexy-assumptions input,.lexy-assumptions select{padding:4px 6px;border:1px solid #cbd5e0;border-radius:6px;width:62px;font-size:0.77em;}
  .lexy-note{font-size:0.65em;color:#9C9484;flex-basis:100%;line-height:1.5;}
  .lexy-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;}
  .lexy-summary .sm{background:linear-gradient(135deg,#2F6B5A,#3D8570);color:#fff;border-radius:10px;padding:4px;text-align:center;}
  .lexy-summary .sm span{font-size:0.65em;opacity:.85;display:block;margin-bottom:2px;}
  .lexy-summary .sm b{font-size:0.95em;}
  .lexy-card .chart-box{min-height:0;height:100%;padding-bottom:12px;}
  .lexy-card .table-box{flex:1 1 auto;max-height:38vh;}
  .lexy-card table th{font-size:0.65em;}
  .lexy-card table td{font-size:0.67em;}
  .lexy-src{font-size:0.65em;color:#9C9484;line-height:1.5;position:absolute;right:10px;top:10px;width:200px;background:#F8F6F1;padding:10px;border-radius:6px;border:1px solid #EFEAE0;}
  @media(max-width:1200px){.lexy-summary{grid-template-columns:repeat(2,1fr);}}
  /* === View Switch Tabs === */
  .view-tabs{display:flex;gap:4px;margin-bottom:5px;padding:4px 0;border-bottom:1px solid #F0EBE1;}
  .view-tab{padding:6px 16px;border-radius:8px;border:1.5px solid #C9C1B2;background:#fff;color:#2F6B5A;font-size:0.77em;font-weight:600;cursor:pointer;transition:all .15s;}
  .view-tab:hover{background:#F0EBE1;border-color:#2F6B5A;}
  .view-tab.active{background:linear-gradient(135deg,#2F6B5A,#3D8570);color:#fff;border-color:#2F6B5A;box-shadow:0 2px 6px rgba(102,126,234,0.25);}
  /* === Compare Card === */
  #cmpCard{display:none;flex-direction:column;margin-top:16px;background:#fff;border-radius:16px;padding:20px;box-shadow:0 4px 20px rgba(0,0,0,0.08);}
  #cmpCard .cmp-header{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:14px;padding:6px 14px;background:#F6F3ED;border-radius:12px;border:1px solid #F0EBE1;box-shadow:0 1px 4px rgba(0,0,0,0.03);}
  #cmpCard .cmp-select-group{display:flex;align-items:center;gap:3px;}
  #cmpCard .cmp-select-group label{font-size:0.79em;font-weight:600;color:#6B6355;white-space:nowrap;}
  #cmpCard .cmp-select-group select{font-size:0.79em;padding:7px 12px;border:1.5px solid #C9C1B2;border-radius:8px;background:#fff;min-width:150px;transition:border-color .2s;}
  #cmpCard .cmp-badge{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;font-size:0.70em;font-weight:bold;color:#fff;margin-right:6px;box-shadow:0 2px 4px rgba(0,0,0,0.15);}
  #cmpCard .cmp-badge.a{background:linear-gradient(135deg,#2F6B5A,#3D8570);}
  #cmpCard .cmp-badge.b{background:linear-gradient(135deg,#C25450,#D07A6A);}
  #cmpCard .cmp-export-btn{margin-left:auto;padding:4px 16px;background:linear-gradient(135deg,#2F6B5A,#3D8570);border:none;border-radius:8px;cursor:pointer;font-size:0.77em;font-weight:600;color:#fff;box-shadow:0 2px 6px rgba(102,126,234,0.3);transition:transform .15s;}
  #cmpCard .cmp-export-btn:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(102,126,234,0.4);}
  #cmpCard .cmp-table{width:100%;border-collapse:collapse;font-size:0.81em;margin-bottom:20px;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.06);table-layout:fixed;}
.cmp-table th:nth-child(1),.cmp-table td:nth-child(1){width:22%;text-align:center;}
.cmp-table th:nth-child(2),.cmp-table td:nth-child(2){width:30%;text-align:center;}
.cmp-table th:nth-child(3),.cmp-table td:nth-child(3){width:30%;text-align:center;}
.cmp-table th:nth-child(4),.cmp-table td:nth-child(4){width:18%;text-align:center;}
  #cmpCard .cmp-table th,#cmpCard .cmp-table td{padding:5px 14px;border-bottom:1px solid #F0EBE1;text-align:left;}
  #cmpCard .cmp-table th{background:linear-gradient(135deg,#2F6B5A,#3D8570);font-weight:600;color:#fff;text-align:center;padding:10px 8px;}
.cmp-table th select{margin-left:4px;vertical-align:middle;text-align-last:center;}
.cmp-table th{text-align:center;}
.cmp-table th .cmp-badge{vertical-align:middle;}
  #cmpCard .cmp-table .val-a{color:#2F6B5A;font-weight:700;font-size:0.95em;}
  #cmpCard .cmp-table .val-b{color:#C25450;font-weight:700;font-size:0.95em;}
  #cmpCard .cmp-charts{display:flex !important;flex-direction:row !important;gap:20px;width:100%;height:400px;margin-top:16px;}
  #cmpCard .cmp-chart-box{flex:1 1 50% !important;max-width:50%;background:#fff;border:2px solid #4A6B84;border-radius:12px;padding:16px;height:400px;overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;box-shadow:0 4px 12px rgba(59,130,246,0.15);}
  #cmpCard .cmp-chart-box h4{margin:0 0 12px 0;font-size:0.99em;color:#1e40af;text-align:center;font-weight:700;}
/* ===== 测功数据上传弹窗 V1.21 (20260808) ===== */
.dyno-modal { position:fixed; inset:0; background:rgba(15,23,42,0.55); z-index:9999; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(3px); }
.dyno-modal-box { background:#fff; border-radius:16px; width:min(680px,94vw); max-height:88vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,0.3); }
.dyno-modal-head { display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1.5px solid #EFEAE0; position:sticky; top:0; background:#fff; border-radius:16px 16px 0 0; }
.dyno-modal-head h3 { margin:0; font-size:1.05em; color:#1e40af; }
.dyno-close { border:none; background:#f1f5f9; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:0.9em; color:#6B6355; }
.dyno-close:hover { background:#EFEAE0; }
.dyno-modal-body { padding:18px 22px 22px; }
.dyno-drop { border:2.5px dashed #94a3b8; border-radius:12px; padding:28px 16px; text-align:center; cursor:pointer; transition:all .2s; background:#F8F6F1; }
.dyno-drop:hover, .dyno-drop.over { border-color:#2F6B5A; background:#eef2ff; }
.dyno-ops { display:flex; gap:12px; align-items:center; margin-top:12px; flex-wrap:wrap; }
.dyno-btn { border:none; border-radius:8px; padding:9px 18px; font-size:0.84em; cursor:pointer; font-weight:600; transition:all .15s; }
.dyno-btn-primary { background:#2F6B5A; color:#fff; }
.dyno-btn-primary:hover { background:#5568d3; }
.dyno-btn-ghost { background:#EFEAE0; color:#6B6355; }
.dyno-btn-ghost:hover { background:#E4DED2; }
.dyno-status { margin-top:14px; border-radius:10px; padding:12px 16px; font-size:0.82em; line-height:1.8; }
.dyno-status.ok { background:#ecfdf5; border:1.5px solid #6ee7b7; color:#065f46; }
.dyno-status.err { background:#fef2f2; border:1.5px solid #fca5a5; color:#991b1b; }
.dyno-form-row { display:flex; gap:14px; flex-wrap:wrap; margin-top:16px; }
.dyno-form-row label { font-size:0.78em; color:#475569; display:flex; flex-direction:column; gap:4px; font-weight:600; }
.dyno-form-row input, .dyno-form-row select { border:1.5px solid #EFEAE0; border-radius:7px; padding:7px 10px; font-size:0.92em; width:130px; }
.dyno-form-row input:focus, .dyno-form-row select:focus { outline:none; border-color:#2F6B5A; }
.dyno-judge { margin-top:16px; border-radius:12px; background:#f0f9ff; border:1.5px solid #7dd3fc; padding:14px 16px; }
.judge-title { font-weight:800; color:#0c4a6e; font-size:0.92em; margin-bottom:10px; }
.judge-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:8px; }
.judge-item { background:#fff; border-radius:8px; padding:8px 10px; text-align:center; border:1.5px solid #EFEAE0; }
.judge-item .jk { font-size:0.68em; color:#6B6355; margin-bottom:2px; }
.judge-item .jv { font-size:0.98em; font-weight:800; }
.judge-item .jl { font-size:0.68em; font-weight:700; margin-top:2px; }
.judge-item.good { border-color:#6ee7b7; } .judge-item.good .jv { color:#059669; } .judge-item.good .jl { color:#059669; }
.judge-item.warn { border-color:#fcd34d; } .judge-item.warn .jv { color:#d97706; } .judge-item.warn .jl { color:#d97706; }
.judge-item.bad  { border-color:#fca5a5; } .judge-item.bad .jv { color:#dc2626; } .judge-item.bad .jl { color:#dc2626; }
.judge-note { margin-top:10px; font-size:0.76em; color:#0369a1; line-height:1.6; }
/* 防线三：数据预览确认面板 */
.dyno-preview{display:none;}
.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.preview-title{font-size:1em;font-weight:800;color:#1e40af;}
.preview-source{font-size:0.72em;color:#6B6355;background:#f1f5f9;padding:3px 10px;border-radius:6px;}
.preview-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px;margin-bottom:14px;}
.ps-item{background:#F8F6F1;border:1.5px solid #EFEAE0;border-radius:8px;padding:10px 8px;text-align:center;}
.ps-val{font-size:1.05em;font-weight:800;color:#2C2A26;}
.ps-label{font-size:0.68em;color:#6B6355;margin-top:2px;}
.preview-warns{background:#fffbeb;border:1.5px solid #fcd34d;border-radius:10px;padding:10px 14px;margin-bottom:14px;}
.preview-warn-title{font-weight:800;font-size:0.78em;color:#92400e;margin-bottom:6px;}
.preview-warn-item{font-size:0.76em;color:#78350f;padding:2px 0;line-height:1.6;}
.preview-chart-box{background:#fff;border:1.5px solid #EFEAE0;border-radius:10px;padding:12px;margin-bottom:14px;height:270px;}
.preview-actions{display:flex;gap:10px;justify-content:center;margin-top:6px;}
/* 防线四：计算结果健康检查 */
.judge-health-warns{background:#fffbeb;border:1.5px solid #fcd34d;border-radius:10px;padding:10px 14px;margin-top:10px;}
.judge-health-title{font-weight:800;font-size:0.78em;color:#92400e;margin-bottom:6px;}
.judge-health-item{font-size:0.76em;color:#78350f;padding:3px 0;line-height:1.6;}
.lexy-upload-tab { background:linear-gradient(135deg,#2F6B5A,#3D8570) !important; color:#fff !important; border:none !important; font-weight:700 !important; }
.lexy-upload-tab:hover { opacity:0.88; }
.lexy-custom-motor { border:2px solid #2F6B5A !important; color:#4f46e5 !important; font-weight:700 !important; }

/* ===== 电机选择面板上传按钮 + 已存电机列表 V1.21 (20260808) ===== */
.motor-upload-btn { float:right; border:none; background:linear-gradient(135deg,#2F6B5A,#3D8570); color:#fff; border-radius:7px; padding:3px 12px; font-size:0.78em; cursor:pointer; font-weight:700; }
.motor-upload-btn:hover { opacity:0.88; }
.dyno-saved { background:#f0fdf4; border:1.5px solid #86efac; border-radius:10px; padding:10px 14px; margin-bottom:14px; }
.saved-title { font-size:0.82em; font-weight:800; color:#166534; margin-bottom:8px; }
.saved-item { display:flex; align-items:center; gap:10px; padding:6px 8px; background:#fff; border-radius:7px; margin-bottom:5px; border:1px solid #dcfce7; }
.saved-name { font-weight:700; font-size:0.84em; color:#2C2A26; flex:1; }
.saved-info { font-size:0.72em; color:#6B6355; }
.saved-del { border:none; background:#fef2f2; border-radius:6px; padding:3px 8px; cursor:pointer; font-size:0.85em; }
.saved-del:hover { background:#fecaca; }

