:root{font-family:Inter,"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#202124;background:#f4f5f7;font-size:16px;--red:#e30613;--red-dark:#bd0010;--ink:#18191b;--muted:#687078;--line:#e3e5e8;--soft:#f7f8f9;--sidebar:#151719;--shadow:0 10px 30px rgba(18,20,24,.055)}
*{box-sizing:border-box}html{min-height:100%}body{margin:0;min-height:100vh;background:linear-gradient(135deg,#f7f8f9 0,#f1f3f5 75%);color:var(--ink)}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid #d8dce0;background:#fff;color:#292d31;padding:.72rem 1rem;border-radius:.55rem;transition:background .15s,border-color .15s,transform .15s,box-shadow .15s}button:hover{background:#f7f7f7;border-color:#aeb4ba}button:active{transform:translateY(1px)}button:disabled{opacity:.5;cursor:wait;transform:none}.primary{background:var(--red);border-color:var(--red);color:#fff;font-weight:650;box-shadow:0 5px 14px rgba(227,6,19,.16)}.primary:hover{background:var(--red-dark);border-color:var(--red-dark);box-shadow:0 7px 18px rgba(227,6,19,.22)}.plus{font-size:1.15rem;margin-right:.25rem}
.sidebar{position:fixed;z-index:5;inset:0 auto 0 0;width:15rem;background:var(--sidebar);color:#fff;padding:2.25rem 1.35rem 1.5rem;display:flex;flex-direction:column;border-right:1px solid #25282b}.brand{color:#fff;text-decoration:none;display:grid;grid-template-columns:3rem 1fr;align-items:center;gap:.85rem}.brand-full{width:9.25rem;height:3rem;object-fit:contain;background:var(--red);grid-column:1/-1;border-radius:.2rem}.brand-mark{display:none;width:2.9rem;height:2.9rem;object-fit:cover;background:var(--red)}.brand span{grid-column:1/-1;border-top:1px solid #303337;padding-top:.9rem;font-size:.88rem;font-weight:650;letter-spacing:.08em}.brand small{display:block;margin-top:.35rem;color:#858b92;font-size:.7rem;letter-spacing:.13em;font-weight:500}.navlabel{font-size:.72rem;color:#747a81;margin:3.5rem .75rem 1rem;letter-spacing:.14em;text-transform:uppercase}nav{display:grid;gap:.45rem}nav button{border:0;background:transparent;text-align:left;color:#aeb3b9;padding:.92rem .8rem;display:flex;align-items:center;gap:.85rem;border-radius:.5rem;font-weight:550}nav button i{font-style:normal;font-size:.65rem;color:#656b71;border:1px solid #3b3f43;width:1.65rem;height:1.65rem;display:grid;place-items:center;border-radius:.35rem}nav button:hover{color:#fff;background:#232629;border-color:transparent}nav button.active{color:#fff;background:#292c2f;box-shadow:inset 3px 0 var(--red)}nav button.active i{color:#fff;background:var(--red);border-color:var(--red)}.sidefoot{margin-top:auto;border-top:1px solid #303337;padding:1.2rem .7rem .2rem;display:flex;gap:.65rem;align-items:flex-start}.sidefoot b{display:block;font-size:.76rem;font-weight:600}.sidefoot small{display:block;margin-top:.38rem;color:#777e84;font-size:.7rem}.statusdot{width:.48rem;height:.48rem;margin-top:.27rem;border-radius:50%;background:#2cc47c;box-shadow:0 0 0 4px rgba(44,196,124,.1)}
main{margin-left:15rem;padding:2.6rem clamp(1.5rem,4vw,4.5rem) 5rem;max-width:112rem}header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:2rem;gap:1.5rem;border-bottom:1px solid #dfe2e5;padding-bottom:1.7rem}.eyebrow{font-size:.7rem;letter-spacing:.16em;color:#7a8188;font-weight:700}h1{font-size:2rem;margin:.65rem 0 .35rem;font-weight:720;letter-spacing:-.04em}header p{color:#727980;font-size:.82rem;margin:0}h2{font-size:1.05rem;margin:0;line-height:1.35}
.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;gap:1rem;background:#fff;border:1px solid var(--line);padding:.8rem 1rem;border-radius:.75rem;box-shadow:0 3px 12px rgba(20,22,25,.03)}.toolbar>span{font-size:.78rem;color:#626970;padding-left:.4rem}.toolbar>span:before{content:"";display:inline-block;width:.45rem;height:.45rem;background:var(--red);border-radius:50%;margin-right:.55rem}.toolbar>div{display:flex;gap:.45rem}.toolbar button{font-size:.82rem;padding:.62rem .85rem}.editorgrid{display:grid;grid-template-columns:minmax(0,1fr) 20.5rem;gap:1.25rem;align-items:start}article{background:#fff;border:1px solid var(--line);border-radius:.85rem;padding:1.75rem;margin-bottom:1.25rem;box-shadow:var(--shadow)}.sectiontitle{display:flex;align-items:center;gap:.85rem;margin-bottom:1.65rem;padding-bottom:1rem;border-bottom:1px solid #eceef0}.sectiontitle small{display:block;margin-top:.28rem;color:#9a9fa5;font-size:.65rem;letter-spacing:.12em}.sectiontitle em{margin-left:auto;color:#868d94;font-style:normal;font-size:.72rem}.step{display:grid;place-items:center;width:2.2rem;height:2.2rem;background:var(--red);color:#fff;border-radius:.5rem;font-size:.72rem;font-weight:700;box-shadow:0 5px 12px rgba(227,6,19,.15)}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:1rem 1.25rem;margin-bottom:.9rem}label{display:block;font-size:.78rem;color:#555d64;line-height:1.55;font-weight:550}input,textarea,select{display:block;width:100%;border:1px solid #dadddf;background:#fbfbfc;color:#202326;border-radius:.5rem;padding:.75rem .8rem;margin-top:.4rem;outline:none;font-size:.88rem;line-height:1.45;transition:border-color .15s,box-shadow .15s,background .15s}input:hover,textarea:hover,select:hover{border-color:#b8bdc2;background:#fff}input:focus,textarea:focus,select:focus{border-color:var(--red);background:#fff;box-shadow:0 0 0 3px rgba(227,6,19,.08)}textarea{resize:vertical;min-height:5.5rem}.wide{grid-column:1/-1}.tablewrap{overflow-x:auto;border:1px solid #e5e7e9;border-radius:.55rem}.items{width:100%;border-collapse:collapse;min-width:43rem;background:#fff}th{text-align:left;font-size:.72rem;color:#626970;background:#f3f4f5;padding:.85rem .6rem;font-weight:650;white-space:nowrap}td{padding:.65rem .35rem;border-bottom:1px solid #eceef0}.items tr:last-child td{border-bottom:0}.items input{margin:0;padding:.62rem;min-width:4.3rem;background:#fff}.items textarea{min-width:12rem;min-height:3.5rem;margin:0;padding:.62rem;background:#fff}.items th:first-child{width:43%}.items th:nth-child(2){width:11%}.items th:nth-child(3){width:10%}.items th:nth-child(4){width:15%}.items td:nth-child(5){white-space:nowrap;font-size:.78rem;font-weight:650;font-variant-numeric:tabular-nums}.remove{border:0;padding:.4rem;color:#a74e54;background:transparent;box-shadow:none}.remove:hover{background:#fff0f1;color:var(--red)}.add{width:100%;margin-top:.85rem;border-style:dashed;border-color:#c9cdd1;color:#343a3f;background:#fafafa}.add:hover{border-color:var(--red);color:var(--red);background:#fff7f7}
.summary{position:sticky;top:1.25rem;align-self:start;background:#fff;border:1px solid var(--line);border-radius:.85rem;padding:1.5rem;box-shadow:var(--shadow);overflow:hidden}.summary:before{content:"";position:absolute;inset:0 0 auto;height:.28rem;background:var(--red)}.summaryhead{display:flex;align-items:center;gap:.8rem;margin:.25rem 0 1.6rem}.summaryhead img{width:2.65rem;height:2.65rem;object-fit:cover;background:var(--red);border-radius:.38rem}.summaryhead h2{margin-top:.25rem}.summary>label{margin-top:.9rem}.rates{display:flex;gap:.5rem;margin:.55rem 0 1.6rem}.rates button{flex:1;padding:.7rem .35rem;font-size:.84rem}.rates .active{color:#fff;border-color:var(--red);background:var(--red);font-weight:700;box-shadow:0 5px 12px rgba(227,6,19,.14)}.sumline{display:flex;justify-content:space-between;margin:1rem 0;font-size:.79rem;color:#747b81}.sumline b{color:#292e32;font-variant-numeric:tabular-nums}.grand{border-top:1px solid var(--line);margin-top:1.35rem;padding-top:1.25rem}.grand span{font-size:.72rem;color:#70777d;font-weight:650}.grand strong{display:block;font-size:2rem;font-weight:750;color:var(--red);margin-top:.5rem;overflow-wrap:anywhere;letter-spacing:-.045em;font-variant-numeric:tabular-nums}.hint{font-size:.72rem;color:#858c92;line-height:1.7}.exportnote{margin:1.35rem -1.5rem -1.5rem;padding:1.15rem 1.5rem;background:#f5f5f5;border-top:1px solid #e8e9ea;line-height:1.55}.exportnote b{display:block;font-size:.75rem;color:#3f454a}.exportnote small{display:block;margin-top:.28rem;font-size:.68rem;color:#8a9095}#exportResult{margin-top:2.2rem;font-size:.72rem;overflow-wrap:anywhere;line-height:1.7}a{color:var(--red)}details{border-top:1px solid #eceef0;padding-top:1rem;margin-top:.85rem}summary{cursor:pointer;color:#363d42;font-size:.82rem;font-weight:650;margin-bottom:1rem;list-style:none}summary:before{content:"＋";display:inline-block;color:var(--red);margin-right:.55rem;font-weight:700}details[open] summary:before{content:"−"}
#search{max-width:42rem;margin-bottom:1.5rem;padding:.85rem 1rem}.historycard{display:flex;justify-content:space-between;gap:1.25rem;border-top:1px solid var(--line);padding:1.4rem 0;align-items:center}.historycard h3{font-size:.95rem;margin:0 0 .55rem}.historycard p{font-size:.75rem;color:#747c82;margin:.4rem 0}.historycard .actions{display:flex;gap:.45rem;align-items:center}.historycard strong{color:var(--red);margin-right:.7rem;white-space:nowrap}#toast{position:fixed;bottom:1.75rem;left:calc(50% + 7.5rem);transform:translateX(-50%);background:#202225;color:#fff;box-shadow:0 10px 35px rgba(0,0,0,.24);border-left:4px solid var(--red);border-radius:.45rem;padding:.9rem 1.25rem;max-width:90vw;z-index:20;font-size:.82rem}dialog{border:0;border-radius:.8rem;width:min(54rem,95vw);max-height:92vh;padding:0;box-shadow:0 25px 90px rgba(0,0,0,.32)}dialog::backdrop{background:rgba(10,11,12,.68)}.dialogbar{position:sticky;z-index:2;top:0;display:flex;justify-content:space-between;align-items:center;background:#fff;padding:.85rem 1.4rem;border-bottom:1px solid #e5e7e8}.dialogbar:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--red)}#previewBody{padding:2.2rem;line-height:1.7}#previewBody table{border-collapse:collapse;width:100%}#previewBody p{white-space:pre-wrap}#previewBody h2{margin-top:1.25rem}#previewBody td{font-size:.78rem}.empty{padding:3rem;text-align:center;color:#8a9095;font-size:.85rem}[hidden]{display:none!important}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid rgba(227,6,19,.35);outline-offset:2px}
@media(min-width:1600px){.editorgrid{grid-template-columns:minmax(0,1fr) 22rem}}
@media(max-width:1180px){.sidebar{width:12.5rem}.brand-full{width:9rem}main{margin-left:12.5rem;padding:2rem 1.5rem}.editorgrid{grid-template-columns:minmax(0,1fr)}.summary{position:static}.toolbar{flex-wrap:wrap}}
@media(max-width:720px){body{padding-bottom:4.5rem}.sidebar{position:fixed;inset:auto 0 0;width:auto;height:4.5rem;padding:.55rem .75rem;background:#17191b;border-top:1px solid #2d3033;border-right:0;display:block}.brand,.navlabel,.sidefoot{display:none}nav{display:grid;grid-template-columns:repeat(3,1fr);height:100%;gap:.35rem}nav button{justify-content:center;flex-direction:column;gap:.18rem;padding:.35rem;font-size:.68rem}nav button i{display:none}nav button span{font-size:.7rem}nav button.active{box-shadow:inset 0 3px var(--red)}main{margin:0;padding:1rem .8rem 2rem}header{align-items:center;padding:.4rem .25rem 1rem;margin-bottom:1rem}h1{font-size:1.45rem;margin:.35rem 0}.eyebrow{font-size:.58rem}header p{display:none}header .primary{padding:.65rem .8rem;font-size:.76rem}.toolbar{padding:.65rem;align-items:flex-start}.toolbar>span{width:100%;font-size:.7rem}.toolbar>div{display:grid;grid-template-columns:repeat(4,auto);width:100%;gap:.35rem}.toolbar button{font-size:.68rem;padding:.55rem .35rem}article{padding:1rem;border-radius:.7rem}.fields{grid-template-columns:1fr;gap:.85rem}.sectiontitle{margin-bottom:1.1rem}.sectiontitle em{display:none}.wide{grid-column:auto}.summary{padding:1.2rem}.grand strong{font-size:1.8rem}.exportnote{margin:1.2rem -1.2rem -1.2rem}.historycard{align-items:flex-start;flex-direction:column}.historycard .actions{flex-wrap:wrap}.historycard strong{width:100%}#previewBody{padding:1.2rem}#toast{left:50%}}
@media(max-width:390px){.toolbar>div{grid-template-columns:repeat(2,1fr)}.toolbar button{font-size:.72rem}}
/* Wider internal pricing table; horizontal scroll stays inside the card. */
.editorgrid{grid-template-columns:minmax(0,1fr)}.editorgrid>.summary{position:static;max-width:none}.summary .grand{max-width:26rem}.items{min-width:1120px}.items th:first-child{width:48px}.items th:nth-child(2){width:25%}.items th:nth-child(n+3){width:auto}.items td:nth-child(5){white-space:normal}.items input{min-width:80px}.items input[readonly]{background:#f0f2f4;color:#353b40}.items select{margin:0;min-width:70px}.drag-grip{touch-action:none;cursor:grab;padding:10px 8px;font-size:23px}.dragging{opacity:.5}.drop-target{outline:2px solid var(--red);outline-offset:-2px}
#costTip{position:fixed;z-index:30;width:310px;padding:16px;background:#fff;border:1px solid #e5d1d1;border-left:4px solid var(--red);box-shadow:0 10px 40px #0003;border-radius:8px;font-size:14px}#costTip button{float:right;padding:0 5px;border:0}#costTip small{display:block;margin-top:8px;color:#727980}.analysis-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.analysis-table{width:100%;min-width:1000px;border-collapse:collapse}.analysis-table td{font-size:14px;padding:12px}.analysis-table small{color:#79828a}#aStatus{margin:15px 0;color:#66717a}#aReport{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:22px 0}#aReport>div{padding:18px;background:#f6f7f8;border-radius:8px;font-size:14px}#aReport strong{display:block;margin:8px 0;font-size:22px}#aReport small{color:#727980}#aChart svg{width:100%;max-height:350px}#aChart{margin:20px 0}
@media(max-width:900px){.analysis-filters{grid-template-columns:1fr 1fr}#aReport{grid-template-columns:1fr}}
@media(max-width:720px){nav{grid-template-columns:repeat(4,1fr)}}
.editorgrid>.summary{position:relative}
table th{text-align:center!important;vertical-align:middle;white-space:normal;line-height:1.5}table th small{display:block;font-size:11px;font-weight:400;color:#737e87;line-height:1.3;margin-top:4px}.items{table-layout:fixed;min-width:1200px}.items th:nth-child(1){width:56px}.items th:nth-child(2){width:auto}.items th:nth-child(3){width:82px}.items th:nth-child(4){width:92px}.items th:nth-child(5){width:112px}.items th:nth-child(6){width:88px}.items th:nth-child(7){width:122px}.items th:nth-child(8){width:84px}.items th:nth-child(9){width:135px}.items th:nth-child(10){width:58px}.items input,.items textarea,.items select{min-width:0;width:100%}.items input[type=number]{text-align:right;font-variant-numeric:tabular-nums}.items textarea{min-height:82px}.items td:nth-child(9){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.items td:nth-child(1),.items td:nth-child(10){text-align:center}
.translation-hint{margin-top:5px;white-space:pre-wrap;overflow-wrap:anywhere}.translation-hint small{display:block;color:#637582;font-size:12px;line-height:1.4}.translation-hint button{border:0;background:transparent;font-size:11px;padding:3px 0;color:#607d8b;text-align:left}.translation-body{padding:24px}.translation-body label{margin-bottom:16px}.analysis-table td,#previewBody td{white-space:pre-wrap}#previewBody table{table-layout:fixed}#previewBody th:first-child{width:32%}
.items{min-width:1080px}.items td:nth-child(9){font-size:12px}.items th small{font-size:10px}
.bilingual-switch{display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:12px 16px;background:#edf2f4;border-radius:8px}.bilingual-switch input{width:36px;height:20px;margin:0;accent-color:#526d7b;cursor:pointer}.bilingual-switch span{font-weight:600}.bilingual-switch small{font-size:12px;color:#687984}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Account footer and aligned quotation history. */
.sidefoot{flex-direction:column;gap:.7rem;min-width:0}
.account-email{width:100%;font-size:.72rem;line-height:1.5;color:#9299a1;overflow-wrap:anywhere}
.sidefoot .logout-button{display:flex;align-items:center;gap:.55rem;background:transparent;border:1px solid transparent;color:#b8bec5;padding:.55rem .65rem;margin-left:-.65rem;border-radius:.4rem;font-size:.8rem;box-shadow:none;text-align:left}
.sidefoot .logout-button:hover{background:#292c2f;color:#fff;border-color:#3b3f43}
.historycard{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem 1.5rem;align-items:center}
.historycard>div:first-child{min-width:0;overflow-wrap:anywhere}
.historycard .actions{justify-self:end;justify-content:flex-end;display:flex;flex-wrap:nowrap;gap:.5rem}
.historycard .actions strong{display:block;flex:0 0 9rem;width:9rem;text-align:right;margin:0 .5rem 0 0;font-variant-numeric:tabular-nums}
.historycard .actions button{width:7.25rem;flex:0 0 7.25rem;white-space:nowrap;padding:.7rem .6rem}
.historycard>.quote-history{grid-column:1/-1;min-width:0;margin:0;border:0;width:100%}
.quote-history>summary{width:max-content;max-width:100%;margin-left:auto;font-size:.75rem;padding:.5rem 0;overflow-wrap:anywhere}
.quote-history>div{min-width:0;margin-top:.75rem;padding:1rem;background:#f6f8f9;border:1px solid var(--line);border-radius:.5rem}
.quote-history pre{white-space:pre-wrap;overflow-wrap:anywhere}
.quote-history .tablewrap{max-width:100%;overflow-x:auto}
.quote-history summary:focus-visible,.logout-button:focus-visible{outline:3px solid rgba(227,6,19,.5);outline-offset:3px}
@media(max-width:1050px){.historycard{grid-template-columns:minmax(0,1fr)}.historycard .actions{justify-self:end;max-width:100%;flex-wrap:wrap}.historycard>.quote-history{grid-column:1}}
@media(max-width:720px){.historycard .actions{width:100%;gap:.5rem}.historycard .actions strong{flex:1 0 100%;width:100%;margin:0 0 .25rem;text-align:right}.historycard .actions button{max-width:100%}.quote-history>div{padding:.65rem}}
