/* Template editor: go creations admin identity, brand accent via [data-tb] */
.te .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.te-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:4px 0 14px;isolation:isolate}
.te-logo{display:block;height:24px;width:auto;margin:0 0 12px}
.te-head h1{word-break:break-word}
.te-state{display:flex;align-items:center;gap:8px;margin:4px 0 0;font-size:13px;color:var(--muted)}
.te-dot{width:8px;height:8px;border-radius:50%;background:var(--tb-acc);box-shadow:0 0 0 1px var(--tb-ink)}
.te-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.te-link-btn{display:inline-flex;align-items:center;padding:10px 16px;border-radius:9px;border:1px solid var(--tb-ink);color:var(--tb-ink)!important;font-weight:600;font-size:14px;text-decoration:none!important;background:var(--surface);transition:background .15s}
.te-link-btn:hover{background:var(--tb-soft)}
.te-msg{margin:0 0 14px;padding:0;border-radius:10px;font-size:14px}
.te-msg:empty{display:none}
.te-msg.ok{padding:11px 14px;background:var(--tb-soft);border-left:4px solid var(--tb-ink);color:#141413}
.te-msg.err{padding:11px 14px;background:#fbeceb;border-left:4px solid #a3271d;color:#7d1d16}
.te-ro{padding:11px 14px;border:1px dashed var(--tb-line);border-radius:10px;background:var(--surface);font-size:13px;color:var(--muted)}
.te-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}
.te-card{border-top:3px solid var(--tb-acc)!important;animation:go-rise .35s cubic-bezier(.2,.8,.2,1) both}
.te-card-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}.te-card-head h2{margin:0}
.te-count{min-width:24px;padding:1px 8px;border-radius:99px;background:var(--tb-soft);color:var(--tb-ink);font-size:12px;font-weight:700;text-align:center}
[data-tb=go] .te-count{color:#4d5200}
.te-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.te-ferr{display:block;min-height:0;font-size:12px;color:#a3271d;margin-top:3px}.te-ferr:empty{display:none}
.te [aria-invalid=true]{border-color:#a3271d!important;background:#fff8f7!important}
.te-brands{display:flex;gap:10px;flex-wrap:wrap;border:0;padding:0;margin:16px 0 0}
.te-brands legend{font-size:13px;font-weight:600;color:#45453f;margin-bottom:6px;padding:0}
.te-brand-opt{position:relative;display:flex;align-items:center;margin:0;padding:12px 16px;border:1px solid var(--tb-line);border-radius:12px;background:var(--surface);cursor:pointer;transition:border-color .15s,background .15s}
.te-brand-opt input{position:absolute;opacity:0;width:1px;height:1px}
.te-brand-opt img{height:20px;width:auto;display:block}
.te-brand-opt:has(input:checked){border-color:var(--tb-ink);background:var(--tb-soft);box-shadow:inset 0 -3px 0 var(--tb-acc)}
.te-brand-opt:has(input:focus-visible){outline:2px solid #000;outline-offset:2px}
.te-brands[disabled] .te-brand-opt{cursor:default;opacity:.7}
.te-brand-fixed{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px;padding:10px 14px;border-radius:12px;background:var(--tb-soft)}.te-brand-fixed img{height:20px}
.te-idx{flex:none;font:800 12px Manrope,sans-serif;color:var(--muted);letter-spacing:.04em;padding-top:11px}
.te-sec{padding:12px 0;border-bottom:1px solid #e4e4de}.te-sec:first-of-type{padding-top:0}
.te-sec-head{display:flex;gap:10px;align-items:flex-start;margin-bottom:8px}.te-sec-head input{font-weight:600}
.te-icon{flex:none;display:grid;place-items:center;width:38px;height:38px;padding:0}
.te-add{margin-top:14px}
.te-add:before{content:"+";margin-right:6px;font-weight:800}
.te-empty{display:flex;flex-direction:column;gap:4px;padding:18px;border:1px dashed #bcbcb4;border-radius:12px;background:#f6f6f2;color:var(--muted);font-size:14px}
.te-empty strong{color:#141413}
.te-item{position:relative;padding:14px 14px 12px;margin-bottom:12px;border:1px solid var(--tb-line);border-left:4px solid var(--tb-acc);border-radius:12px;background:#fdfdfb;transition:border-color .15s}
.te-item:focus-within{border-color:var(--tb-ink)}
.te-item.is-optional{border-left-style:dashed}
.te-item.is-fleet{background:linear-gradient(90deg,var(--tb-soft),#fdfdfb 40%)}
.te-item-head{display:flex;gap:10px;align-items:flex-start}
.te-grow{flex:1;min-width:0}.te-name{font-weight:600}
.te-line{flex:none;padding-top:9px;font:800 15px Manrope,sans-serif;letter-spacing:-.02em;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.te-line small{display:block;font:500 11px "DM Sans",sans-serif;color:var(--muted)}
.te-desc{min-height:56px;margin:8px 0 10px}
.te-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr .7fr 1.1fr;gap:10px}
.te-grid label{font-size:12px}.te-grid input{font-variant-numeric:tabular-nums}
.te-flags{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.te-flag{display:inline-flex;align-items:center;gap:7px;margin:0;padding:6px 11px;border:1px solid #d2d2cb;border-radius:99px;font-size:13px;font-weight:600;cursor:pointer;background:var(--surface);transition:background .15s,border-color .15s}
.te-flag input{width:auto;margin:0}
.te-flag:has(input:checked){background:var(--tb-soft);border-color:var(--tb-ink)}
.te-flag:has(input:disabled){opacity:.55;cursor:default}
.te-vat{max-width:140px;margin-bottom:12px}
.te-terms{min-height:120px}
.te-card h3{margin:18px 0 10px}
.te-pays{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.te-pays li{display:grid;grid-template-columns:1fr 110px 38px;gap:8px;align-items:start}
.te-pays li .te-ferr{grid-column:1/-1}
.te-pct{position:relative}.te-pct input{padding-right:26px;text-align:right}.te-pct span{position:absolute;right:10px;top:10px;color:var(--muted);font-size:14px}
.te-paybar{height:6px;margin:14px 0 4px;border-radius:99px;background:#e4e4de;overflow:hidden}
.te-paybar span{display:block;height:100%;background:var(--tb-ink);transform-origin:left;transition:transform .25s}
[data-tb=go] .te-paybar span{background:#000}
.te-paybar span.bad{background:#a3271d}
.te-aside{position:sticky;top:20px;display:grid;gap:14px}
.te-sum{padding:20px;border-radius:16px;background:#0b0b0a;color:#efefef}
[data-tb=cars] .te-sum{background:linear-gradient(150deg,#160b28,#3a1a6b)}
.te-sum h3{margin:0 0 12px;color:#fafaf7;font-size:14px;text-transform:uppercase;letter-spacing:.08em}
.te-sum-rows div{display:flex;justify-content:space-between;gap:10px;padding:4px 0;font-size:13px;color:#cecec8}
.te-sum-rows b{color:#fafaf7;font-variant-numeric:tabular-nums}
.te-sum-sep{border-top:1px solid #ffffff24;margin-top:6px;padding-top:8px!important}
.te-gross{display:flex;justify-content:space-between;align-items:baseline;margin-top:10px;padding-top:12px;border-top:2px solid var(--tb-acc)}
.te-gross strong{font:800 24px Manrope,sans-serif;letter-spacing:-.04em;color:var(--tb-acc);font-variant-numeric:tabular-nums}
.te-sum-note{margin:10px 0 0;font-size:12px;color:#b5b5ad}
.te-sched{list-style:none;margin:12px 0 0;padding:10px 0 0;border-top:1px dashed #ffffff30;font-size:12px}
.te-sched li{display:flex;justify-content:space-between;gap:8px;padding:2px 0;color:#cecec8}.te-sched b{color:#fafaf7}
.te-sum-err{margin:12px 0 0;padding:7px 10px;border-radius:8px;background:#a3271d;color:#fff;font-size:12px;font-weight:600}
.te-aside-block{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.te-aside-block h3{margin:0 0 8px;font-size:15px}
.te-aside-block p{margin:0 0 8px;font-size:13px}
.te-ref-ok{padding-left:10px;border-left:3px solid var(--tb-ink)}
.te-ref-warn{padding:8px 10px;border-radius:8px;background:#fff4db;color:#6b4a00}
.te-missing{margin:0 0 10px;padding-left:18px;font-size:12px;color:var(--muted)}
.te-wide{width:100%}
.te-skel{height:42px;border-radius:9px;background:linear-gradient(90deg,#ececE6,#f6f6f2,#ececE6);background-size:200% 100%;animation:te-shimmer 1.2s linear infinite}
@keyframes te-shimmer{to{background-position:-200% 0}}
@media(max-width:1000px){.te-layout{grid-template-columns:1fr}.te-aside{position:static;order:-1}.te-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.te-head{flex-direction:column;align-items:stretch}.te-actions>*{flex:1;justify-content:center}.te-two{grid-template-columns:1fr}.te-grid{grid-template-columns:1fr 1fr}.te-item-head{flex-wrap:wrap}.te-line{order:3;width:100%;text-align:left;padding:4px 0 0 30px}.te-pays li{grid-template-columns:1fr 90px 38px}}
@media(prefers-reduced-motion:reduce){.te *,.te-card{animation:none!important;transition:none!important}}
.te-ref-note{padding:8px 10px;border-radius:8px;background:var(--tb-soft);font-size:12px!important;color:#45453f}
.te-basis{max-width:420px;margin-bottom:12px}
.te-disc,.ed-disc{display:flex;gap:4px}.te-disc select,.ed-disc select{width:64px}
.te-sec-meta{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}.te-sec-meta label{flex:1;min-width:120px;font-size:12px}
.te-totals{grid-template-columns:1fr!important}
.pv-totals{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.pv-total{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:12px;background:#2e2347;color:#e6defa}
.pv-total:first-child{background:#5b3fb0}
.pv-total-l{font-size:11px;text-transform:uppercase;letter-spacing:.06em;opacity:.85}
.pv-total strong{font:800 24px Manrope,sans-serif;color:#fff}.pv-total-g{font-size:12px}
.pv-total-note{grid-column:1/-1;font-size:12px;color:#777487}
.ed-sec{margin-bottom:12px}.ed-sec-head{display:flex;gap:8px;align-items:center;margin-bottom:6px}.ed-sec-n{font-weight:800;color:#6958a2}.ed-kind{font-size:11px;padding:2px 8px;border-radius:99px;background:#f1eff8;color:#594887;white-space:nowrap}.ed-body{min-height:160px}.ed-desc{min-height:54px;margin-top:4px;font-size:13px}
