/* Identidad TREIE. La marca emisora de documentos permanece independiente. */
:root{color-scheme:dark;--brand-primary:#2563EB!important;--brand-accent:#7C3AED!important;--surface:#131b30;--surface-raised:#1b2540;--line:#2b3957;color:#edf3ff;background:#0B1020;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{margin:0;background:radial-gradient(ellipse at 75% 15%,#162347 0,transparent 48%),#0B1020;color:#edf3ff;min-height:100vh}
.card{background:#131b30;border:1px solid #2b3957;box-shadow:0 24px 80px #0005;color:#edf3ff}
h1,h2,h3,h4{color:#f7f9ff;letter-spacing:-.025em}p,.intro,.help,.status,.account-email,small{color:#a9b8d0}label{color:#d7e1f1}input,select,textarea{background:#0e172a;color:#edf3ff;border-color:#344563}input::placeholder,textarea::placeholder{color:#8798b2}input:focus,select:focus,textarea:focus{outline:3px solid #22d3ee35;border-color:#22D3EE}button{background:#2563EB;color:#fff;transition:transform .12s ease,background .15s ease;touch-action:manipulation}button:active{transform:scale(.98)}button:focus-visible,a:focus-visible{outline:3px solid #22D3EE;outline-offset:4px}button.secondary{background:#1b2540;color:#dce7f8;border:1px solid #344563}button.danger{background:#9f2445;color:#fff}.link{color:#67e8f9}.notice{background:#102c37;color:#a9f0f8;border:1px solid #225265}.error{background:#351b2c;color:#ffb7c7;border-color:#76324b}
:is(.metrics article,.modules button,.global-search-box,.global-result,.stage-times-box,.stage-times-list article,.stability-summary article,.planning-widget,.company-select-list button,.quote-template-tools,.company-users-anchor,.company-logo-editor,.client-diagnosis-box,.client-bank-box,.knowledge-safety-note,.order-file,.customer-card,.passport-card,.quote-card,.work-order-card,.repair-card,.planning-card,.post-sale-card,.recovery-card){background:#16213a;color:#edf3ff;border-color:#334362}
:is(.modal-card,.modal-content,.sheet,.file-viewer,.file-viewer-content,.planning-board,.planning-column,.technical-intelligence-box,.technical-intelligence-results article){background:#131b30;color:#edf3ff;border-color:#334362}
table{color:#edf3ff}th{background:#1c2d4d;color:#d9e9ff}td{border-color:#344563}tr:nth-child(even){background:#17223a}.metric-link strong{color:#67e8f9}.back-button,.global-home{background:#1b315c;border-color:#365388;box-shadow:none}.v83-test-banner{background:#132339;color:#a5daf0;border-color:#334d70}.platform-credit{color:#b6c6de}.platform-access-brand{background:#0B1020;padding:24px}.platform-access-brand img{max-height:68px;object-fit:contain}.platform-access-brand p{padding:20px 0 0}.account-planning-row{border:1px solid #334362;border-radius:18px;padding:20px;background:#101a2d}#company-logo{object-fit:contain;background:#fff;border-radius:12px;padding:12px;max-width:260px;box-sizing:border-box}
body[data-view="login"] .page{max-width:1320px;padding:24px 48px;margin:auto}body[data-view="login"] #main-card{width:100%;max-width:none;padding:0;background:none;border:0;box-shadow:none}body[data-view="login"] :is(#platform-access-brand,#platform-credit,#install-app-box){display:none}body[data-view="login"] .v83-test-banner{font-size:10px;padding:8px 12px;margin-bottom:24px;opacity:.8}
.treie-login-layout{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(480px,1.2fr);gap:70px;align-items:center;min-height:calc(100vh - 120px)}.treie-login-entry{max-width:420px}.treie-login-logo{width:190px;height:auto;display:block;margin-bottom:30px}.treie-pillars{font-size:11px;letter-spacing:.035em;color:#91a5c9;margin:0 0 18px}.treie-login-entry h1{font-size:clamp(36px,4.1vw,56px);line-height:1.02;font-weight:650;margin:0 0 18px;letter-spacing:-.05em}.treie-login-entry h1 span{color:#22D3EE}.treie-login-description{font-size:15px;line-height:1.6;margin:0 0 28px;max-width:360px}.treie-provider-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}.treie-provider-buttons button{font-size:12px;min-height:48px;padding:10px;background:#182238;border:1px solid #344563;color:#dce4f2;opacity:.65;display:flex;gap:8px;align-items:center;justify-content:center}.treie-provider-buttons span{font-size:18px}.treie-provider-note{font-size:10px;line-height:1.5;color:#a5b3c9;margin:10px 0 18px}.treie-login-divider{display:flex;align-items:center;gap:12px;margin:18px 0;color:#8699b7;font-size:10px}.treie-login-divider:before,.treie-login-divider:after{content:"";height:1px;background:#2a3650;flex:1}#login-form{display:grid;gap:16px}#login-form label{font-size:12px;font-weight:550}#login-form input:not([type=checkbox]){height:48px;border-radius:11px;padding:0 14px;margin-top:8px;font-size:14px;box-sizing:border-box}#login-form .show-password{display:flex;align-items:center;gap:7px;margin:0;font-size:11px;white-space:nowrap}#login-form .show-password input{width:14px;height:14px;margin:0;accent-color:#22D3EE}.treie-login-options{display:flex;align-items:center;justify-content:space-between;gap:8px}#show-recovery{font-size:11px;padding:0;min-height:28px;width:auto;margin:0;background:none;text-decoration:none;color:#a7c8ff}#login-button{background:linear-gradient(105deg,#2563EB,#7C3AED);display:flex;align-items:center;justify-content:space-between;font-size:14px;min-height:50px;border:1px solid #899dff45;box-shadow:0 8px 24px #2563eb22}.treie-private-entry{font-size:10px;color:#8e9fba;margin:18px 0}.treie-private-entry span{color:#22D3EE;margin-right:6px}
.treie-login-experience{padding:32px;border-radius:26px;border:1px solid #50679838;background:linear-gradient(145deg,#152345cc,#111a3099);box-shadow:0 32px 80px #0004;backdrop-filter:blur(20px)}.treie-demo-heading>p:first-child{color:#22D3EE;font-size:10px;font-weight:650;letter-spacing:.12em;margin:0 0 13px}.treie-demo-heading h2{font-size:clamp(28px,3vw,42px);line-height:1.05;letter-spacing:-.04em;margin:0 0 14px}.treie-demo-tagline{font-size:14px;line-height:1.55;margin-bottom:25px}.scene-window{border:1px solid #435781;border-radius:14px;background:#0d1529;overflow:hidden;box-shadow:0 20px 40px #0006;transform:perspective(1600px) rotateY(-3deg)}.scene-titlebar{display:flex;align-items:center;justify-content:space-between;background:#1c2840;padding:12px;font-size:9px;color:#b5c6e0}.scene-window-dots{font-size:8px;color:#567295;letter-spacing:3px}.scene-live{color:#5ddccd;font-size:8px}.scene-shell{display:grid;grid-template-columns:90px 1fr}.scene-sidebar{padding:22px 12px;background:#111b30;border-right:1px solid #263451;display:flex;flex-direction:column;gap:20px;font-size:9px;color:#91a4c7}.scene-sidebar img{margin-bottom:7px;object-fit:contain}.scene-sidebar span:first-of-type{color:#67e8f9}.scene-content{height:350px;overflow:auto;overscroll-behavior:contain;padding:20px;scrollbar-width:thin;scrollbar-color:#435981 #0d1529;scroll-behavior:smooth}.scene-content h3{font-size:21px;margin:8px 0}.scene-content header small{font-size:8px;color:#869bc0;letter-spacing:.1em}.scene-content header p{font-size:9px;margin:0 0 18px}.scene-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}.scene-metrics article{background:#182640;border:1px solid #2c4164;padding:12px 9px;border-radius:9px}.scene-metrics span{display:block;font-size:8px;color:#91a8cc;min-height:24px}.scene-metrics strong{font-size:24px;color:#67e8f9}.scene-content section{background:#141f36;border:1px solid #2c3b5b;border-radius:11px;padding:15px;margin-top:12px;transition:border-color .3s ease}.scene-section-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.scene-section-heading h4{font-size:10px;margin:0}.scene-state{font-size:8px;color:#c9b3ff;background:#37275e;padding:4px 6px;border-radius:20px;white-space:nowrap}.scene-customer{display:flex;align-items:center;gap:9px;margin-top:14px}.scene-avatar{width:29px;height:29px;border-radius:9px;background:#244584;color:#c8e7ff;display:grid;place-items:center;font-size:10px}.scene-customer strong{font-size:11px}.scene-customer span{display:block;font-size:8px;color:#8ca2c8;margin-top:4px}.scene-online-dot{width:6px;height:6px;border-radius:100%;background:#22D3EE;margin-left:auto}.scene-content section>p{font-size:9px;color:#97accd;margin-bottom:0;line-height:1.5}.scene-order-row{display:flex;flex-direction:column;gap:6px;margin-top:15px;font-size:10px}.scene-order-row span{color:#a4b5d2}.scene-assignee{display:flex;justify-content:space-between;font-size:8px;margin-top:14px;color:#90a6cc}.scene-progress-track{margin-top:12px;height:4px;border-radius:4px;background:#293756;overflow:hidden}#scene-progress-fill{height:100%;width:100%;background:linear-gradient(90deg,#22D3EE,#7C3AED);transform-origin:left;transform:scaleX(.1);transition:transform .5s ease}.scene-timeline p{display:flex;align-items:center;gap:8px;font-size:9px;color:#bac9df}.scene-timeline i{width:5px;height:5px;border-radius:50%;background:#2563EB}.scene-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:20px 0 10px}.scene-controls>span{font-size:10px;color:#a4badb}.scene-controls>div{display:flex;gap:8px}.scene-controls button{min-height:32px;padding:7px 10px;font-size:9px;border-radius:8px;background:#223452;color:#c5ddff}.scene-disclosure{font-size:9px;color:#8a9ebd;margin:0}
@media(max-width:1050px){body[data-view=login] .page{padding:20px 25px}.treie-login-layout{gap:30px;grid-template-columns:minmax(300px,.85fr) minmax(380px,1.15fr)}.treie-login-experience{padding:24px}.scene-content{padding:14px}.scene-shell{grid-template-columns:74px 1fr}}
@media(max-width:780px){body[data-view=login] .page{padding:16px 22px}.treie-login-layout{grid-template-columns:1fr;gap:35px;min-height:0}.treie-login-entry{max-width:430px;width:100%;margin:auto}.treie-login-entry h1{font-size:42px}.treie-login-experience{max-width:430px;margin:auto;width:100%;box-sizing:border-box}.scene-window{transform:none}.treie-demo-heading h2{font-size:32px}.scene-content{height:290px}.scene-controls{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}.scene-window{transform:none}}
@media(prefers-reduced-transparency:reduce){.treie-login-experience{background:#15213a;backdrop-filter:none}}
@media(prefers-contrast:more){input,select,textarea,.card,.scene-window,.scene-content section{border-color:#9ab9e8}.treie-login-experience{background:#101a2d}}

/* Compatibilidad con superficies del entorno existente. */
:root{background:#16213a;color:#edf3ff;border-color:#334362}
.card{background:#16213a;color:#edf3ff;border-color:#334362}
.consent-field{background:#16213a;color:#edf3ff;border-color:#334362}
input,select,textarea{background:#16213a;color:#edf3ff;border-color:#334362}
.secondary{background:#16213a;color:#edf3ff;border-color:#334362}
.error{background:#16213a;color:#edf3ff;border-color:#334362}
.admin-tools{background:#16213a;color:#edf3ff;border-color:#334362}
.user-item{background:#16213a;color:#edf3ff;border-color:#334362}
.danger{background:#16213a;color:#edf3ff;border-color:#334362}
.modal-card{background:#16213a;color:#edf3ff;border-color:#334362}
.dispatch-summary-content{background:#16213a;color:#edf3ff;border-color:#334362}
.planning-card{background:#16213a;color:#edf3ff;border-color:#334362}
.planning-form{background:#16213a;color:#edf3ff;border-color:#334362}
.planning-note{background:#16213a;color:#edf3ff;border-color:#334362}
.planning-note.priority-urgente{background:#16213a;color:#edf3ff;border-color:#334362}
.planning-note-actions .secondary{background:#16213a;color:#edf3ff;border-color:#334362}
.dashboard{background:#16213a;color:#edf3ff;border-color:#334362}
.metrics article{background:#16213a;color:#edf3ff;border-color:#334362}
.schedule-readonly p{background:#16213a;color:#edf3ff;border-color:#334362}
.exit-control-box{background:#16213a;color:#edf3ff;border-color:#334362}
.exit-checks label{background:#16213a;color:#edf3ff;border-color:#334362}
.prepared-operators{background:#16213a;color:#edf3ff;border-color:#334362}
.workspace-section{background:#16213a;color:#edf3ff;border-color:#334362}
.vehicle-item{background:#16213a;color:#edf3ff;border-color:#334362}
.passport-summary article{background:#16213a;color:#edf3ff;border-color:#334362}
.passport-asset{background:#16213a;color:#edf3ff;border-color:#334362}
.vehicle-data p{background:#16213a;color:#edf3ff;border-color:#334362}
.order-item{background:#16213a;color:#edf3ff;border-color:#334362}
.component-entry-box{background:#16213a;color:#edf3ff;border-color:#334362}
.technical-case .case-block{background:#16213a;color:#edf3ff;border-color:#334362}
.lookup-result{background:#16213a;color:#edf3ff;border-color:#334362}
.intake-tabs button{background:#16213a;color:#edf3ff;border-color:#334362}
.sale-management-box{background:#16213a;color:#edf3ff;border-color:#334362}
.edit-entry-button{background:#16213a;color:#edf3ff;border-color:#334362}
.order-summary{background:#16213a;color:#edf3ff;border-color:#334362}
.client-decision-actions .danger{background:#16213a;color:#edf3ff;border-color:#334362}
.repair-item{background:#16213a;color:#edf3ff;border-color:#334362}
.warranty-dates span{background:#16213a;color:#edf3ff;border-color:#334362}
.warranty-form{background:#16213a;color:#edf3ff;border-color:#334362}
.warranty-claim{background:#16213a;color:#edf3ff;border-color:#334362}
.company-logo-editor{background:#16213a;color:#edf3ff;border-color:#334362}
.global-search-box{background:#16213a;color:#edf3ff;border-color:#334362}
.global-result{background:#16213a;color:#edf3ff;border-color:#334362}
.stage-times-box{background:#16213a;color:#edf3ff;border-color:#334362}
.stage-times-list article{background:#16213a;color:#edf3ff;border-color:#334362}
.stability-summary article{background:#16213a;color:#edf3ff;border-color:#334362}
.agenda-workshop-summary article{background:#16213a;color:#edf3ff;border-color:#334362}
.workshop-person{background:#16213a;color:#edf3ff;border-color:#334362}
.workshop-agenda-item{background:#16213a;color:#edf3ff;border-color:#334362}
.workshop-agenda-item.overdue{background:#16213a;color:#edf3ff;border-color:#334362}
.order-schedule-box{background:#16213a;color:#edf3ff;border-color:#334362}
.agenda-date-chip{background:#16213a;color:#edf3ff;border-color:#334362}
.preview-banner{background:#16213a;color:#edf3ff;border-color:#334362}
.repair-help{background:#16213a;color:#edf3ff;border-color:#334362}
.automatic-status-box{background:#16213a;color:#edf3ff;border-color:#334362}
.management-summary article,.management-split article{background:#16213a;color:#edf3ff;border-color:#334362}
.management-month{background:#16213a;color:#edf3ff;border-color:#334362}
.management-funnel article:nth-child(4){background:#16213a;color:#edf3ff;border-color:#334362}
.order-files-box{background:#16213a;color:#edf3ff;border-color:#334362}
.order-file-actions .delete-file{background:#16213a;color:#edf3ff;border-color:#334362}
.order-file-actions .share-photo.shared{background:#16213a;color:#edf3ff;border-color:#334362}
.client-photo{background:#16213a;color:#edf3ff;border-color:#334362}
.order-data-editor{background:#16213a;color:#edf3ff;border-color:#334362}
.delete-intake-box{background:#16213a;color:#edf3ff;border-color:#334362}
.order-flow-actions{background:#16213a;color:#edf3ff;border-color:#334362}
.archive-order-box{background:#16213a;color:#edf3ff;border-color:#334362}
.postsale-actions .secondary{background:#16213a;color:#edf3ff;border-color:#334362}
.postsale-result-form{background:#16213a;color:#edf3ff;border-color:#334362}
.agenda-summary .agenda-card{background:#16213a;color:#edf3ff;border-color:#334362}
.prequote-form{background:#16213a;color:#edf3ff;border-color:#334362}
.prequote-directory{background:#16213a;color:#edf3ff;border-color:#334362}
.knowledge-safety-note{background:#16213a;color:#edf3ff;border-color:#334362}
.knowledge-source-form{background:#16213a;color:#edf3ff;border-color:#334362}
.knowledge-extraction{background:#16213a;color:#edf3ff;border-color:#334362}
.knowledge-extraction.error{background:#16213a;color:#edf3ff;border-color:#334362}
.knowledge-search-box{background:#16213a;color:#edf3ff;border-color:#334362}
.knowledge-search-box>.help{background:#16213a;color:#edf3ff;border-color:#334362}
.technical-intelligence-box{background:#16213a;color:#edf3ff;border-color:#334362}
.intelligence-disclaimer{background:#16213a;color:#edf3ff;border-color:#334362}
.intelligence-hypothesis{background:#16213a;color:#edf3ff;border-color:#334362}
.intelligence-evidence-counts span{background:#16213a;color:#edf3ff;border-color:#334362}
.intelligence-warning{background:#16213a;color:#edf3ff;border-color:#334362}
.intelligence-evidence-list p{background:#16213a;color:#edf3ff;border-color:#334362}
.intelligence-structure{background:#16213a;color:#edf3ff;border-color:#334362}
.company-bank-settings{background:#16213a;color:#edf3ff;border-color:#334362}
.file-viewer-card{background:#16213a;color:#edf3ff;border-color:#334362}
.opportunities-summary article{background:#16213a;color:#edf3ff;border-color:#334362}
.opportunities-blocked{background:#16213a;color:#edf3ff;border-color:#334362}
.opportunities-rule,.opportunities-detail{background:#16213a;color:#edf3ff;border-color:#334362}
#delete-intake-panel{background:#16213a;color:#edf3ff;border-color:#334362}
.indicator-popup-card{background:#16213a;color:#edf3ff;border-color:#334362}
#recovery-auto-modal .recovery-state{background:#16213a;color:#edf3ff;border-color:#334362}
#recovery-auto-modal .recovery-state[data-tone=pending]{background:#16213a;color:#edf3ff;border-color:#334362}
#recovery-auto-modal .recovery-process-step{background:#16213a;color:#edf3ff;border-color:#334362}
.v83-test-banner{background:#16213a;color:#edf3ff;border-color:#334362}
#selected-company-name{display:inline-block;background:#fff;border-radius:8px;padding:7px 12px;font-weight:700}
/* Comparación reversible: acceso centrado y visual desplazado hacia el borde. */
body[data-view=login] .page{max-width:1500px;padding:24px 4vw 24px 10vw}.treie-login-layout{grid-template-columns:minmax(320px,.85fr) minmax(480px,1.15fr);gap:8vw}.treie-login-entry{justify-self:center}.treie-login-experience{padding:24px;justify-self:end;width:100%;box-sizing:border-box}.treie-tone-switch{display:flex;gap:4px;padding:4px;border:1px solid #334563;border-radius:10px;width:max-content;margin:0 0 24px}.treie-tone-switch button{min-height:28px;padding:5px 12px;background:none;color:#9fb0ce;font-size:11px;border-radius:7px}.treie-tone-switch button[aria-pressed=true]{background:#263b63;color:#fff}.treie-real-scroll{height:380px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:16px}.treie-real-frame{margin:0 0 24px;padding:14px;background:#131b30;border:1px solid #334563;border-radius:12px}.treie-real-frame-title{margin:0 0 14px;color:#22D3EE;font-size:11px;font-weight:700}.treie-real-frame h1,.treie-real-frame h2{font-size:22px}.treie-real-frame h3{font-size:16px}.treie-real-frame h4{font-size:13px}.treie-real-frame :is(p,small,label){font-size:10px}.treie-real-frame button{min-height:32px;padding:9px;font-size:10px;opacity:1}.treie-real-frame :is(input,select,textarea){min-height:32px;font-size:11px;opacity:1}.treie-real-frame .modules{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.treie-real-frame .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.treie-real-frame .metrics strong{font-size:22px}.treie-real-frame .dashboard-heading{margin:0}.treie-real-frame .form-grid{grid-template-columns:1fr}.treie-real-frame [hidden]{display:none!important}
body[data-tone=light]{color-scheme:light;background:#f6f8fc;color:#14213b}body[data-tone=light] :is(h1,h2,h3,h4){color:#12213a}body[data-tone=light] :is(p,.intro,.help,.account-email,small,label){color:#56677e}body[data-tone=light] :is(.card,.treie-login-experience,.treie-real-frame,.scene-window){background:#fff;color:#162540;border-color:#d6e1ef;box-shadow:0 20px 60px #18295212}body[data-tone=light] :is(input,select,textarea){background:#f7f9fd;color:#15253e;border-color:#cbd7e7}body[data-tone=light] :is(.modules button,.metrics article,.order-file,.global-search-box,.planning-widget,.account-planning-row){background:#f4f7fc;color:#15253e;border-color:#d3dfee}body[data-tone=light] .scene-titlebar{background:#e9eff9;color:#425675}body[data-tone=light] .treie-provider-buttons button{background:#fff;color:#233956;border-color:#cbd7e7}body[data-tone=light] .treie-tone-switch{border-color:#cbd7e7}body[data-tone=light] .treie-tone-switch button{color:#526886}body[data-tone=light] .treie-tone-switch button[aria-pressed=true]{background:#2563EB;color:#fff}body[data-tone=light] .treie-login-description{color:#52647c}body[data-tone=light] .treie-login-logo{background:#0B1020;padding:14px;border-radius:12px;box-sizing:content-box}body[data-tone=light] .treie-real-frame-title{color:#2563EB}body[data-tone=light] .scene-controls button{background:#e4ecfb;color:#254a80}body[data-tone=light] .v83-test-banner{background:#eaf0fa;color:#415c80}body[data-tone=light] .treie-demo-heading>p:first-child{color:#2563EB}body[data-tone=light] .treie-pillars{color:#52647c}body[data-tone=light] #show-recovery{color:#2563EB}body[data-tone=light] .treie-private-entry{color:#56677e}
@media(max-width:1050px){body[data-view=login] .page{padding:20px 30px}.treie-login-layout{gap:35px;grid-template-columns:minmax(300px,.8fr) minmax(380px,1.2fr)}}
@media(max-width:780px){body[data-view=login] .page{padding:16px 22px}.treie-login-layout{grid-template-columns:1fr;gap:30px}.treie-login-experience{justify-self:center}.treie-real-scroll{height:330px}}

body[data-tone=light] .treie-login-logo{background:none;padding:0}
