:root{color-scheme:light;--paper:#f5f5ee;--panel:#fffef9;--ink:#243c32;--muted:#58675f;--line:#ccd3ca;--green:#24584a;--soft:#e5eae1}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--paper);color:var(--ink);font:15px/1.5 "Segoe UI",system-ui,sans-serif;display:grid;grid-template-columns:230px minmax(0,1fr)}button,input,select,a.button{font:inherit}button,a.button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 14px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--ink);text-decoration:none}button:hover,a.button:hover{background:var(--soft)}button:disabled{opacity:.55;cursor:default}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#173e34;color:white}a{color:var(--green)}:is(button,a,input,select):focus-visible{outline:3px solid #3281ab;outline-offset:3px}input,select{width:100%;min-height:42px;border:1px solid var(--line);border-radius:5px;background:var(--panel);color:var(--ink);padding:9px 11px}input::placeholder{color:var(--muted)}label{display:flex;flex-direction:column;gap:6px;font-size:13px}h1,h2,h3,p{margin-top:0}h1{font-size:32px;line-height:1.2;margin-bottom:0;letter-spacing:-.025em}h2{font-size:22px;line-height:1.3;margin-bottom:10px}h3{font-size:16px;line-height:1.4}.muted,small{color:var(--muted)}p{max-width:70ch}.home-nav{position:sticky;top:0;height:100vh;padding:28px 20px;display:flex;flex-direction:column;border-right:1px solid var(--line);gap:28px;background:var(--panel)}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}.brand strong,.brand small{display:block}.brand strong{font-size:18px}.brand small{font-size:11px}.mark{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;background:var(--green);color:white;border-radius:9px}.home-nav nav{display:grid;gap:6px}.home-nav nav button{justify-content:flex-start;border-color:transparent;background:transparent}.home-nav nav button[aria-current=page]{background:var(--soft);font-weight:650}.local-note{margin-top:auto;font-size:12px}.local-note p{margin:6px 0;color:var(--muted)}#homeMain{padding:38px clamp(24px,4vw,64px);max-width:1500px;width:100%}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:30px}.page-heading p{color:var(--muted);font-size:13px;margin-bottom:7px}#homeStatus{font-size:13px;color:var(--muted);margin-bottom:22px}#homeStatus.error,#newError{color:#a53329}.continue-project{display:grid;grid-template-columns:minmax(260px,1.1fr) minmax(220px,1fr);background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:36px}.continue-project .plan-preview{height:280px}.continue-body{padding:28px;align-self:center}.continue-body .primary{margin-top:14px}.plan-preview{width:100%;height:160px;display:block;background:#e9eee7;object-fit:contain}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:30px 0 16px}.section-heading h2{margin:0}.projects-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.project-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden;min-width:0}.project-card .project-body{padding:16px}.project-card h3{overflow-wrap:anywhere;margin-bottom:5px}.project-card p{font-size:12px;margin-bottom:12px;color:var(--muted)}.project-actions{display:flex;gap:6px;flex-wrap:wrap}.project-actions button{font-size:12px;min-height:34px;padding:6px 9px}.project-actions details{position:relative}.project-actions summary{cursor:pointer;padding:6px 9px;min-height:34px;border:1px solid var(--line);border-radius:6px;font-size:12px}.project-actions details[open]>div{display:grid;gap:5px;margin-top:6px}.list-tools{display:flex;gap:18px;align-items:end;margin-bottom:22px}.list-tools label{flex:1}.list-tools label:first-child{flex:2}.list-tools>button{flex:none}.library-intro{display:flex;gap:24px;align-items:start;justify-content:space-between;margin-bottom:22px}.library-intro p{color:var(--muted);font-size:13px}.products-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.product-item{border:1px solid var(--line);border-radius:9px;background:var(--panel);overflow:hidden;min-width:0;display:flex;flex-direction:column}.product-item img{height:130px;width:100%;object-fit:contain;background:#fff}.product-item .product-info{padding:13px;display:flex;flex-direction:column;gap:6px;flex:1}.product-item h3{font-size:13px;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px}.product-item p{font-size:12px;margin:0}.product-item .price{font-weight:650}.product-item button{font-size:12px;min-height:34px;padding:6px}.product-item .actions{display:flex;gap:6px;margin-top:auto;padding-top:8px}.product-item a{font-size:12px}.future-note{margin-top:30px;font-size:13px}.empty{padding:36px 0;max-width:65ch}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-bottom:24px}#newView{max-width:850px}#newView h2{margin-top:24px}fieldset{border:0;padding:0;margin:24px 0;display:flex;gap:20px;flex-wrap:wrap}legend{font-weight:650;margin-bottom:12px}.choice{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:14px}.choice input{width:18px;min-height:18px;flex-shrink:0}#sourceReview{margin:24px 0;padding:20px;background:var(--panel);border:1px solid var(--line);border-radius:8px}#sourcePreview{width:100%;height:240px;background:#e9eee7}#sourceSummary{margin-top:15px}#unitLabel{max-width:280px;margin:18px 0}.notice{font-size:13px;color:var(--muted)}.text-button{background:transparent;border-color:transparent;padding-left:0}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:24px}dialog{max-width:560px;width:calc(100% - 32px);max-height:85vh;overflow:auto;padding:28px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink)}dialog::backdrop{background:#10211999}#dialogContent{display:grid;gap:12px}#moreProjects,#moreProducts{margin-top:24px}[hidden]{display:none!important}[data-theme=dark]{color-scheme:dark;--paper:#171e1a;--panel:#202824;--ink:#e4ebe5;--muted:#afbeb2;--line:#46564b;--green:#39765d;--soft:#2d4135}[data-theme=dark] a{color:#b1d8c6}[data-theme=dark] .brand{color:var(--ink)}[data-theme=dark] .primary{color:white} @media(max-width:1100px){body{grid-template-columns:195px minmax(0,1fr)}.projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.continue-project{grid-template-columns:1fr}.continue-project .plan-preview{height:220px}.continue-body{padding:22px}}@media(max-width:700px){body{display:block}.home-nav{position:static;height:auto;padding:16px;display:grid;grid-template-columns:1fr auto;gap:14px;border-right:0;border-bottom:1px solid var(--line)}.home-nav nav{grid-column:1/-1;display:flex;gap:4px}.home-nav nav button{flex:1;justify-content:center;padding:8px}.home-nav .local-note{display:none}.home-nav>label{grid-column:2;grid-row:1;font-size:11px}.home-nav select{min-height:34px;padding:5px}.brand small{display:none}#homeMain{padding:24px 16px}.page-heading{align-items:start;gap:12px}.page-heading h1{font-size:27px}.page-heading .primary{font-size:12px;padding:8px 10px}.projects-grid,.products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.project-card .project-body{padding:12px}.plan-preview{height:115px}.list-tools,.library-intro{flex-direction:column;align-items:stretch;gap:12px}.form-grid{grid-template-columns:1fr;gap:14px}.continue-project .plan-preview{height:180px}.product-item img{height:110px}.product-item .product-info{padding:10px}.product-item .actions{flex-direction:column}}@media(prefers-reduced-motion:no-preference){button,a.button{transition:background .15s ease-out}}

/* Taller técnico: navegación de taller, superficies navy y controles ámbar. */
:root,[data-theme=dark]{color-scheme:dark;--paper:#101e29;--panel:#172b39;--surface:#203746;--ink:#e6eef4;--muted:#adc0ce;--line:#3c5668;--green:#f5ad45;--soft:#294454;--active:#54788f;--preview:#142632;--preview-line:#adc0ce;--danger:#ffb1a4;--field:#112431}
[data-theme=light]{color-scheme:light;--paper:#e7eef3;--panel:#f8fbfd;--surface:#dce7ee;--ink:#172b39;--muted:#435e70;--line:#9eb2c0;--green:#a75b05;--soft:#cfdee8;--active:#426d88;--preview:#d6e2ea;--preview-line:#36596f;--danger:#a72d20;--field:#fff}
body{display:block}button,a.button{min-height:44px;border-radius:4px;background:var(--surface);font-weight:600}button:disabled{cursor:not-allowed}.primary,[data-theme=dark] .primary{background:var(--green);border-color:var(--green);color:#101e29}.primary:hover,[data-theme=dark] .primary:hover{background:#ffc16b;border-color:#ffc16b;color:#101e29}[data-theme=light] .primary{color:#fff}[data-theme=light] .primary:hover{background:#844805;color:#fff}a,[data-theme=dark] a{color:var(--green)}:is(button,a,input,select,summary):focus-visible{outline:3px solid var(--green);outline-offset:3px}input,select{min-height:44px;border-radius:4px;background:var(--field)}input::placeholder{opacity:1}input[type=radio],input[type=checkbox]{accent-color:var(--green)}label{color:var(--muted)}h1{font-size:clamp(28px,3vw,38px);font-weight:650}h2{font-size:24px;letter-spacing:-.015em}.home-nav{height:auto;min-height:76px;position:sticky;top:0;z-index:20;display:flex;flex-direction:row;align-items:center;gap:30px;padding:0 clamp(18px,3vw,48px);border-right:0;border-bottom:1px solid var(--line)}.brand,[data-theme=dark] .brand{color:var(--ink);flex-shrink:0;gap:11px}.brand strong{font-size:20px;font-weight:650;letter-spacing:-.025em}.brand small{font-size:10px}.mark{background:transparent;border-radius:0;font-size:32px;font-weight:400;color:var(--ink);width:36px;height:40px;border-right:1px solid var(--line);padding-right:10px}.home-nav nav{display:flex;align-self:stretch;gap:3px}.home-nav nav button{position:relative;border:0;border-radius:0;background:transparent;color:var(--muted);padding:0 18px;font-size:14px;gap:8px}.home-nav nav button:hover{background:var(--surface);color:var(--ink)}.home-nav nav button[aria-current=page]{background:var(--surface);color:var(--ink);font-weight:600}.home-nav nav button[aria-current=page]::after{content:"";position:absolute;bottom:0;left:12px;right:12px;height:3px;background:var(--green)}.nav-icon{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.local-note{margin:0 0 0 auto;font-size:11px;max-width:205px;color:var(--muted)}.local-note strong{font-size:12px;color:var(--ink)}.local-note p{margin:3px 0;line-height:1.4}.home-nav>label{font-size:11px;width:96px;flex-shrink:0}.home-nav select{min-height:34px;padding:5px 8px;font-size:12px}#homeMain{max-width:1560px;margin:auto;padding:34px clamp(20px,4vw,64px) 60px}.page-heading{margin-bottom:20px}.page-heading .primary{min-width:166px}#homeStatus{font-size:12px;margin-bottom:24px;padding-bottom:18px;border-bottom:1px solid var(--line)}#homeStatus.error,#newError,#dialogError{color:var(--danger)}#newError:empty{display:none}.continue-project{grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);border-radius:4px}.continue-project .plan-preview{height:340px;border-right:1px solid var(--line)}.continue-body{padding:34px;min-width:0}.continue-body h2{font-size:clamp(26px,3vw,36px);overflow-wrap:anywhere;max-width:20ch}.continue-body>p{font-size:13px}.continue-body>p:first-child{color:var(--green);margin-bottom:12px}.plan-preview{height:185px;background:var(--preview)}.section-heading{gap:16px;margin:32px 0 18px}.section-heading h2{font-size:22px}.section-heading button{background:transparent}.projects-grid{gap:20px}.project-card{border-radius:4px}.project-card .plan-preview{border-bottom:1px solid var(--line)}.project-card .project-body{padding:18px}.project-card p{margin-bottom:16px}.project-actions{gap:8px}.project-actions>button{background:var(--active);color:#fff;border-color:var(--active)}.project-actions button,.project-actions summary{font-size:13px;min-height:40px;padding:8px 12px;border-radius:4px}.project-actions details[open]>div{gap:6px;margin-top:8px}.list-tools{gap:16px;padding:20px;background:var(--panel);border:1px solid var(--line);border-radius:4px}.list-tools label{min-width:0}.library-intro{display:grid;grid-template-columns:1fr auto;gap:16px 24px;align-items:center;margin-bottom:24px}.library-intro>div{grid-column:1;grid-row:1}.library-intro p{margin-bottom:0}.library-intro #openPurchaseInventory{grid-column:2;grid-row:1}.library-intro #addLibraryProduct{grid-column:1/-1;justify-self:start;background:transparent;font-size:13px}.products-grid{gap:16px}.product-item{border-radius:4px}.product-item img{height:180px;background:#edf2f5;color:#334f60;padding:12px}.product-item .product-info{padding:16px;gap:7px}.product-item h3{font-size:14px;display:block;min-height:0;overflow:visible;overflow-wrap:anywhere}.product-item .price{font-size:13px;margin-top:4px}.product-item button{min-height:40px;padding:7px 10px}.product-item .actions{padding-top:14px;flex-wrap:wrap}.product-item .actions button:last-child{flex:1}.future-note{padding-top:20px;border-top:1px solid var(--line)}.empty{padding:50px 0}.empty h2{font-size:32px}.empty p{color:var(--muted)}.empty button{margin-top:12px}#newView{max-width:940px}#newProjectForm{padding:28px;background:var(--panel);border:1px solid var(--line);border-radius:4px;margin-top:24px}fieldset{border-top:1px solid var(--line);padding-top:20px;margin:28px 0;gap:12px}legend{padding-right:15px;font-weight:600}.choice{color:var(--ink);gap:10px}.choice input{margin:0}fieldset .choice{padding:12px 16px;border:1px solid var(--line);background:var(--field);border-radius:4px;flex:1;min-width:180px}fieldset .choice:has(input:checked){border-color:var(--green);background:var(--surface)}#sourceReview{padding:24px 0 0;border:0;border-top:1px solid var(--line);border-radius:0}#sourcePreview{background:var(--preview);border:1px solid var(--line)}.text-button{background:transparent}.dialog-actions{padding-top:20px;border-top:1px solid var(--line)}dialog{max-width:600px;border-radius:4px}dialog::backdrop{background:#06131ccc}#dialogTitle{padding-bottom:18px;border-bottom:1px solid var(--line);font-size:24px;overflow-wrap:anywhere}#dialogContent{gap:14px}#dialogContent>div{display:grid;gap:12px}#dialogContent p{margin:0;overflow-wrap:anywhere}#dialogContent a{display:inline-flex;min-height:44px;align-items:center}#libraryTotal{font-size:13px;margin-bottom:16px}
@media(min-width:1450px){.products-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1150px){.home-nav{gap:20px;padding:0 24px}.local-note{display:none}.home-nav>label{margin-left:auto}.products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.continue-project .plan-preview{height:300px}.continue-body{padding:24px}}
@media(max-width:850px){.home-nav{gap:16px}.home-nav nav button{padding:0 12px}.brand small{display:none}.continue-project{grid-template-columns:1fr 1fr}.continue-project .plan-preview{height:280px}.continue-body h2{font-size:27px}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.list-tools{flex-wrap:wrap}.list-tools>button{width:100%}}
@media(max-width:700px){.home-nav{position:static;display:grid;grid-template-columns:1fr auto;padding:16px 16px 0;gap:14px}.home-nav nav{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,1fr);width:100%;min-height:52px}.home-nav nav button{padding:12px 7px;gap:6px;font-size:12px}.home-nav>label{width:92px}.nav-icon{width:16px;height:16px}#homeMain{padding:26px 16px 40px}.page-heading .primary{min-width:0;font-size:12px;padding:8px 12px}.page-heading p{max-width:23ch;font-size:12px}.continue-project{grid-template-columns:1fr}.continue-project .plan-preview{height:230px;border-right:0;border-bottom:1px solid var(--line)}.continue-body h2{max-width:none}.projects-grid,.products-grid{gap:12px}.project-card .project-body{padding:13px}.project-card h3{font-size:15px}.plan-preview{height:140px}.project-actions button,.project-actions summary{font-size:12px;padding:8px 10px}.list-tools{padding:16px;gap:14px}.list-tools label,.list-tools label:first-child{flex:1 1 100%;width:100%}.library-intro{display:flex;flex-direction:column;align-items:stretch;gap:14px}.library-intro>div{order:-1}.library-intro #addLibraryProduct{align-self:stretch}#newProjectForm{padding:20px 16px}fieldset .choice{flex-basis:100%}.product-item img{height:150px}.product-item .product-info{padding:12px}.product-item .actions button{width:100%}.product-item h3{font-size:13px}.section-heading h2{font-size:20px}.section-heading button{font-size:12px}dialog{padding:22px}.dialog-actions{flex-wrap:wrap}}
@media(max-width:380px){.projects-grid,.products-grid{grid-template-columns:1fr}.home-nav nav button{font-size:11px}.nav-icon{display:none}.page-heading{flex-wrap:wrap}.page-heading .primary{width:100%}}
@media(prefers-reduced-motion:no-preference){button,a.button,summary{transition:background-color .16s ease-out,border-color .16s ease-out}dialog[open]{animation:dialog-enter .18s ease-out}@keyframes dialog-enter{from{transform:translateY(8px)}to{transform:translateY(0)}}}

/* Catálogos separados: misma navegación y datos existentes, sin nuevas fuentes comerciales. */
.catalog-empty{display:flex;align-items:flex-start;gap:28px;padding:36px 0 42px;max-width:850px}.catalog-empty h2{margin-bottom:14px}.catalog-empty p{max-width:62ch}.catalog-empty button{margin-top:8px}.empty-material-icon{width:64px;height:64px;flex:none;fill:none;stroke:var(--muted);stroke-width:1.4}.catalog-project-list,.normative-links{border-top:1px solid var(--line);max-width:1000px}.catalog-project-list>a:not(.button),.normative-links>a{display:grid;grid-template-columns:minmax(160px,1fr) minmax(180px,2fr) auto;align-items:center;gap:18px;min-height:74px;padding:18px 12px;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none}.catalog-project-list>a:hover,.normative-links>a:hover{background:var(--surface)}.catalog-project-list strong,.normative-links strong{overflow-wrap:anywhere}.catalog-project-list span,.normative-links span{color:var(--muted);font-size:13px}.catalog-project-list span:last-child,.normative-links span:last-child{color:var(--green)}#constructionProjects{padding-top:24px;border-top:1px solid var(--line)}#constructionProjects h2{font-size:22px}.section-intro{max-width:850px}.normative-project-label{max-width:520px;margin:24px 0}.normative-note{font-size:13px;margin-top:24px}.home-nav nav button{padding-left:12px;padding-right:12px}
@media(max-width:1380px) and (min-width:701px){.home-nav{flex-wrap:wrap;gap:12px;padding-top:14px}.home-nav nav{order:3;width:100%;min-height:54px}.home-nav nav button{flex:1}.home-nav>label{margin-left:auto}.home-nav .local-note{display:none}}
@media(max-width:700px){.home-nav nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}.home-nav nav button{min-height:52px;padding:10px 8px;white-space:normal}.home-nav nav button:last-child{grid-column:1/-1}.catalog-empty{gap:16px;padding:20px 0 30px}.empty-material-icon{width:40px;height:40px}.catalog-empty h2{font-size:25px}.catalog-project-list>a:not(.button),.normative-links>a{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}.catalog-project-list>a>span:nth-child(2),.normative-links>a>span:nth-child(2){grid-column:1;grid-row:2}.catalog-project-list>a>span:last-child,.normative-links>a>span:last-child{grid-column:2;grid-row:1/3}.normative-project-label{max-width:none}}

/* Catálogo comercial de construcción: misma escala y contraste del taller. */
.material-tools{margin:24px 0 16px;align-items:end}.material-tools>button{flex:none}.material-photo-empty{height:180px;display:grid;place-items:center;background:var(--surface);color:var(--muted);margin:0}.material-dialog{width:min(880px,calc(100vw - 24px));max-width:880px;max-height:90dvh;overflow:auto;background:var(--panel);color:var(--ink);border:1px solid var(--line);padding:24px}.material-dialog h2{margin-top:0}.material-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px}.material-form-grid label{margin:0;min-width:0}.material-form-grid textarea{min-height:72px;width:100%;resize:vertical;background:var(--field,var(--paper));color:var(--ink);border:1px solid var(--line);padding:8px;font:inherit}.material-dialog .actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:16px}.material-dialog [role=status]{min-height:24px;overflow-wrap:anywhere}.material-dialog input:disabled,.material-dialog select:disabled{opacity:.7}.material-products .product-info p{overflow-wrap:anywhere}.material-commercial-controls{border-bottom:1px solid var(--line);padding-bottom:12px}.material-commercial-controls button{margin:4px 4px 0 0}
@media(max-width:600px){.material-form-grid{grid-template-columns:1fr}.material-dialog{padding:18px}.material-tools>button{width:100%}}
