:root{--bg:#f5f5f0;--paper:#fff;--ink:#243d34;--muted:#7a837d;--line:#e5e8e2;--green:#255c46;--lime:#dceba6;--soft:#eef3eb;--orange:#a8622b;--orange-bg:#fff2e4;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);font-size:14px;background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #a6bd63;outline-offset:3px}button{border:0}a{color:inherit;text-decoration:none}.sidebar{width:218px;background:#fcfcf8;border-right:1px solid var(--line);height:100dvh;position:fixed;padding:38px 20px;display:flex;flex-direction:column}.brand{font-size:38px;font-weight:760;letter-spacing:-2px;padding:0 13px;margin-bottom:67px}.brand:first-letter{color:var(--green)}.side-label{font-size:9px;letter-spacing:1.8px;color:#90968c;margin:0 13px 20px}.nav{padding:15px 14px;border-radius:7px;display:flex;gap:14px;align-items:center;background:none;color:#828b81;text-align:left;margin-bottom:9px;font-size:13px}.nav>span:first-child{font-size:19px}.nav.active{background:#e9efdf;color:#31543c;font-weight:650}.nav-dot{background:#4c7044;width:6px;height:6px;border-radius:100%;margin-left:auto}.side-bottom{margin-top:auto;display:flex;align-items:center;gap:9px;border-top:1px solid var(--line);padding-top:22px;font-size:12px}.avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:50%;background:#e6eada;font-size:13px}.side-bottom small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.side-bottom button{margin-left:auto;background:none;color:var(--muted);font-size:21px}.workspace{margin-left:218px;padding:48px 38px 24px;max-width:1900px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px}.eyebrow{font-size:9px;font-weight:650;letter-spacing:2px;margin:0 0 13px;color:var(--muted)}h1{font-size:42px;letter-spacing:-1.7px;line-height:1.05;margin:0 0 12px;font-weight:580}.heading-dot{color:#78994d}.muted{color:var(--muted);font-size:12px;line-height:1.6;margin:0}header .muted{font-size:13px}.header-actions{display:flex;gap:10px}.primary,.secondary{border-radius:6px;padding:12px 17px;font-size:12px;font-weight:600;line-height:1.4}.primary{background:var(--green);color:#fff;box-shadow:0 2px 2px #1434210b}.primary:hover{background:#1b4836}.secondary{background:#fff;border:1px solid #dce1d7;color:#526255}.secondary:hover{background:#f2f5ed}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:30px}.stats article{border:1px solid var(--line);border-radius:9px;padding:21px 21px 19px;background:#fff;min-height:128px}.stats article>span{font-size:9px;color:var(--muted);font-weight:650;letter-spacing:1.2px}.stats strong{display:block;font-size:27px;letter-spacing:-.9px;font-weight:570;margin:12px 0 8px;white-space:nowrap}.stats strong small{font-size:12px;color:var(--muted);font-weight:400;letter-spacing:0}.stats p{margin:0;font-size:10px;color:var(--muted)}.stats .debt-stat{background:#edf2e5;border-color:#e0e7d4}.stats .debt-stat strong{color:#53713b}.ledger{background:white;border:1px solid var(--line);border-radius:10px;overflow:hidden}.ledger-top{display:flex;align-items:center;justify-content:space-between;padding:26px 24px 23px;gap:15px}h2{font-size:17px;margin:0 0 8px;font-weight:600;letter-spacing:-.3px}.count{font-size:10px;background:#eef0e9;padding:3px 7px;border-radius:5px;color:#637454;margin-left:8px;vertical-align:middle}.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:6px;padding:0 12px;min-width:260px;color:#7c897a}.search span{font-size:23px}.search input{border:0;width:100%;padding:11px 0;font-size:11px;outline:0;background:none}.search:focus-within{outline:2px solid #98b47a}.filters{border-top:1px solid #f0f1ec;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.tabs{display:flex;gap:22px}.tabs button{background:none;padding:15px 0;border-bottom:2px solid transparent;color:#899185;font-size:11px;white-space:nowrap}.tabs .selected{color:var(--green);border-bottom-color:var(--green);font-weight:650}.ledger-hint{font-size:9px;color:#a2a89c}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;table-layout:fixed;min-width:1100px}th{text-align:left;background:#fafbf7;color:#8b9487;font-weight:600;font-size:8px;letter-spacing:1px;padding:16px 15px;border-bottom:1px solid var(--line)}td{vertical-align:top;padding:22px 15px;border-bottom:1px solid var(--line);font-size:11px;line-height:1.5;overflow-wrap:anywhere}td+td{border-left:1px solid #f3f4ef}tr:last-child td{border-bottom:0}tbody tr{cursor:pointer}tbody tr:hover{background:#fcfdf8}.id-col{width:9%}.client-col{width:12%}.product-col{width:17%}.reference-col{width:20%}.shipping-col{width:15%}.payment-col{width:15%}.status-col{width:12%}.sale-link{background:none;color:var(--green);font-size:14px;font-weight:650;padding:0}.sub{display:block;color:var(--muted);font-size:10px;margin-top:5px}.client-name{font-size:12px;font-weight:600;display:block;margin-bottom:9px}.origin{display:inline-block;border:1px solid #e5e8df;border-radius:4px;padding:2px 7px;color:#77806f;font-size:9px;background:#fbfcf8}.product{display:flex;gap:7px;margin-bottom:10px}.product:last-child{margin:0}.product strong{font-weight:550}.qty{font-size:10px;color:#4d6840;white-space:nowrap}.product p{font-size:10px;margin:7px 0;color:#758170}.preline{white-space:pre-wrap;overflow-wrap:anywhere}.references{display:flex;gap:10px}.references figure{margin:0;flex:1;min-width:0;max-width:140px}.image-thumb{width:100%;height:90px;padding:5px;border:1px solid #e7e8de;border-radius:4px;background:white}.image-thumb img{height:100%;width:100%;object-fit:contain}.references figcaption{font-size:9px;line-height:1.5;margin-top:7px;color:#6d796a;white-space:pre-wrap}.instructions{font-size:10px;color:#66745f;margin:9px 0 0}.placeholder{color:#a3aa9e;font-size:10px}.micro{display:block;color:#9aa18f;font-size:8px;letter-spacing:1px;margin-bottom:4px}.shipping-text{font-size:10px;color:#7a8273;margin:9px 0 0}.late{color:var(--orange)!important}.amount{display:block;font-size:13px;font-weight:650}.payments-list{margin:12px 0}.payments-list>div{margin:8px 0;color:#6c7965;font-size:10px}.payments-list small{display:block;font-size:8px;color:#95a089;margin-top:2px}.balance{display:inline-block;border-radius:4px;font-size:9px;padding:4px 6px;font-weight:550}.owing{background:var(--orange-bg);color:var(--orange)}.settled{background:#edf2e5;color:#6b8557}.status{display:inline-block;background:#f1f1e7;padding:4px 7px;border-radius:4px;font-size:9px;white-space:nowrap;color:#838167}.status.sent{background:#eaf2e8;color:#62805b}.edit-row{padding:0;background:none;font-size:9px;color:#80916e;margin-top:22px}.ledger-footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:14px 22px;font-size:9px;color:#99a18f}.bottom-note{text-align:center;color:#b0b6a8;font-size:9px;margin:25px 0 0}.empty{text-align:center;padding:60px 20px}.empty-icon{font-size:35px;color:#9aaf7b}.empty h3{font-size:19px;margin-bottom:9px}.empty p{color:var(--muted);font-size:12px;margin-bottom:22px}dialog{border:1px solid #dce2d4;border-radius:13px;color:var(--ink);padding:0;max-height:94dvh;box-shadow:0 20px 90px #102b2633;background:white}dialog::backdrop{background:#102d26a1;backdrop-filter:blur(3px)}#sale-dialog{width:1000px;max-width:calc(100vw - 28px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:25px 30px;border-bottom:1px solid var(--line);background:#fbfcf8}.dialog-header h2{font-size:26px;margin:0}.dialog-header .eyebrow{margin-bottom:8px}.icon-button{background:#eff2e9;color:#617153;border-radius:50%;height:34px;width:34px;font-size:23px}.dialog-body{padding:0 30px 26px}.form-intro{color:#7b8773;font-size:12px;line-height:1.6;padding:18px 0;margin:0}.form-intro span{display:block;color:#9ca591;font-size:10px}.form-section{padding:24px 0;border-bottom:1px solid var(--line)}.section-title{display:flex;gap:13px;align-items:flex-start;margin-bottom:22px}.section-title>span{border:1px solid #e0e6d7;border-radius:5px;padding:5px 7px;color:#7f956a;font-size:10px;background:#f6f8f0}.section-title h3,.form-section h3{margin:0 0 6px;font-size:15px;font-weight:600}.section-title p{font-size:11px;color:#98a08e;margin:0;line-height:1.5}.grid{display:grid;gap:15px}.four{grid-template-columns:.7fr 1fr 1.2fr 1.5fr}.three{grid-template-columns:repeat(3,1fr)}label{display:block;font-size:11px;color:#65745a;line-height:1.4}label input,label textarea,label select{display:block;width:100%;margin-top:7px;border:1px solid #dfe5d6;border-radius:5px;padding:11px 10px;background:#fff;color:var(--ink);font-size:12px;line-height:1.4}input:focus,textarea:focus,select:focus{outline:2px solid #b4c697;outline-offset:1px}input::placeholder,textarea::placeholder{color:#adb4a4}textarea{resize:vertical;min-height:65px}select{min-height:41px}label:has(textarea){margin-top:14px}.item-row{display:grid;grid-template-columns:85px 1.3fr 1fr 1.5fr 22px;gap:12px;align-items:start;background:#f8faf4;padding:15px;margin-bottom:10px;border:1px solid #eaf0e1;border-radius:6px}.item-row label:has(textarea){margin:0}.item-row textarea{min-height:41px;height:41px}.remove{background:none;color:#9d8877;font-size:22px;padding:0;margin-top:24px}.text-button{background:none;color:var(--green);font-size:11px;font-weight:600;padding:12px 0}.field-help{font-size:10px;color:#94a086;line-height:1.6}.image-edit{display:flex;gap:16px;border:1px solid var(--line);padding:12px;border-radius:6px;margin-bottom:10px;align-items:center}.image-edit img{width:110px;height:95px;object-fit:contain;background:#f8faf4;border-radius:4px}.image-edit label{flex:1;margin:0!important;min-width:0}.image-edit .remove{margin:0}.upload-area{position:relative;text-align:center;border:1px dashed #bacba5;border-radius:7px;padding:22px 15px;background:#fbfdf6;cursor:pointer;display:block;margin-top:12px}.upload-area>span{display:block;color:#799b57;font-size:24px}.upload-area strong{font-size:12px}.upload-area small{display:block;font-size:10px;color:#9aa58c;margin:7px 0}.upload-area input{width:100%;font-size:11px;background:none;border:0;max-width:300px;margin:12px auto 0;padding:0}.payment-summary{display:grid;grid-template-columns:1.3fr 1fr 1fr;align-items:center;gap:35px}.payment-summary>div span{display:block;font-size:8px;letter-spacing:1px;color:#94a085;margin:12px 0}.payment-summary strong{font-size:23px;font-weight:550;letter-spacing:-.7px}.accent{color:#5c7d40}.payment-row{display:grid;grid-template-columns:1fr 1.2fr 1fr 1.2fr 22px;gap:12px;padding:14px;background:#f8faf4;border-radius:5px;margin:10px 0}.inline-link{padding:0;background:none;color:var(--green);text-decoration:underline;font-size:10px}.dialog-footer{position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;padding:18px 30px;border-top:1px solid var(--line);background:#fff;gap:15px;z-index:1}.dialog-footer>span{font-size:10px;color:#99a58c}.dialog-footer>div{display:flex;gap:10px}.edit-meta{color:#a1ab96;font-size:10px;padding-top:14px}.form-error{font-size:12px;color:#ab3f29;white-space:pre-wrap;line-height:1.6}.form-error:empty{display:none}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:15px 24px;color:#fff;background:#255c46;border-radius:8px;box-shadow:0 6px 30px #0002;z-index:10;max-width:90vw;font-size:12px}#toast.error{background:#914b35}#settings-dialog{width:540px;max-width:calc(100vw - 28px)}#settings-dialog .form-section>form{margin-top:15px}#settings-dialog form label{margin-bottom:13px}.account-tags{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}.account-tags span{background:#eef2e7;padding:7px 10px;border-radius:4px;font-size:11px}#image-dialog{width:900px;max-width:94vw;background:#fcfdf9}.image-toolbar{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;gap:15px}.image-toolbar p{white-space:pre-wrap;font-size:12px;line-height:1.6}.full-image{display:block;width:100%;max-height:75dvh;object-fit:contain;padding:20px}.auth{width:430px;max-width:90vw;margin:9vh auto;background:#fff;padding:42px;border:1px solid var(--line);border-radius:14px;box-shadow:0 15px 70px #314c2208}.brandmark{font-size:50px;font-weight:750;color:var(--green);letter-spacing:-4px;margin-bottom:35px}.auth h1{font-size:33px;line-height:1.15}.auth .muted{margin-bottom:28px}.auth form label{margin-bottom:17px}.auth form .primary{width:100%;margin:8px 0 24px;text-align:left}.auth .primary span{float:right}.auth>small{display:block;color:#9ba78d;text-align:center;font-size:10px}.demo-banner{position:sticky;top:0;background:#dae9b1;color:#3b582c;text-align:center;padding:8px;font-size:10px;letter-spacing:.5px;z-index:2}.demo-banner~.sidebar{height:calc(100dvh - 28px)}[hidden]{display:none!important}@media(min-width:1650px){.workspace{padding:55px 48px}.stats strong{font-size:32px}td{font-size:12px;padding:24px 18px}.image-thumb{height:110px}}@media(max-width:1200px){.sidebar{width:175px;padding:30px 12px}.workspace{margin-left:175px;padding:35px 22px}.stats{gap:10px}.stats article{padding:18px 14px}.stats strong{font-size:22px}.ledger-hint{display:none}.brand{font-size:32px}.side-label{font-size:8px;letter-spacing:1px}.ledger-top{padding:21px 18px}}@media(max-width:800px){.sidebar{position:relative;width:100%;height:auto;padding:14px 20px;flex-direction:row;align-items:center;border-bottom:1px solid var(--line);border-right:0;gap:12px}.brand{font-size:27px;margin:0 auto 0 0;padding:0}.side-label,.side-bottom,.nav-dot{display:none}.nav{padding:9px;margin:0;font-size:11px;gap:6px}.nav>span:first-child{font-size:15px}.workspace{margin:0;padding:28px 16px}.demo-banner~.sidebar{height:auto}h1{font-size:35px}header{align-items:flex-start;gap:15px;margin-bottom:24px}.header-actions{flex-direction:column}.header-actions .secondary{padding:7px;font-size:10px}.header-actions .primary{font-size:11px;padding:10px}.eyebrow{font-size:8px;letter-spacing:1.3px}.stats{grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:22px}.stats article{min-height:110px}.stats strong{font-size:25px}.ledger-top{align-items:stretch;flex-direction:column;gap:16px}.search{min-width:0}.filters{padding:0 15px;overflow:auto}.tabs{gap:20px}.tabs button{font-size:10px}.ledger-footer{font-size:8px;padding:12px}.dialog-header{padding:20px}.dialog-body{padding:0 20px 20px}.dialog-footer{padding:14px 20px;flex-wrap:wrap}.dialog-footer>div{margin-left:auto}.four,.three{grid-template-columns:repeat(2,minmax(0,1fr))}.item-row{grid-template-columns:70px 1fr 25px;gap:10px;padding:12px}.item-row label:nth-child(3){grid-column:1/2}.item-row label:nth-child(4){grid-column:2/3}.item-row .remove{grid-column:3;grid-row:1}.payment-row{grid-template-columns:1fr 1fr 22px}.payment-row .remove{grid-column:3;grid-row:1}.payment-summary{grid-template-columns:1fr 1fr;gap:15px}.payment-summary>label{grid-column:1/3}.payment-summary strong{font-size:22px}.image-edit img{width:80px;height:80px}.auth{padding:30px;margin-top:6vh}.form-intro{font-size:11px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s ease}dialog[open]{animation:enter .15s ease}@keyframes enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}}

/* Identidad de Grabados Idearte: conservar el logo completo y sus proporciones. */
.brand{display:block;padding:0;margin-bottom:40px;line-height:0;letter-spacing:normal}.brand img{display:block;width:100%;height:auto;background:#fff;border-radius:6px}.brandmark{margin:0 auto 26px;max-width:255px;line-height:0;letter-spacing:normal}.brandmark img{display:block;width:100%;height:auto}.auth .eyebrow{text-align:center}@media(max-width:800px){.brand{width:112px;flex-shrink:0;margin:0 auto 0 0}.sidebar{gap:7px}.nav{padding:8px;font-size:10px}.brandmark{max-width:230px}}

/* Hoja de indicaciones con texto y fotografías intercaladas. */
#detail-editor{border:1px solid #d7decd;border-radius:8px;overflow:hidden;background:#f2f4ed}.document-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:10px 12px;border-bottom:1px solid #dfe4d7;background:#fafbf7}.document-toolbar button,.image-controls button{border:1px solid transparent;background:transparent;color:#56694a;min-width:30px;padding:7px 9px;border-radius:4px;font-size:11px}.document-toolbar button:hover,.image-controls button:hover,.image-controls button.selected{background:#e5edd9;border-color:#d9e3ca}.format-tools{display:flex;gap:2px}.format-tools button{font-size:14px}.format-tools mark{padding:1px 3px}.tool-divider{height:22px;width:1px;background:#dce3d2;margin:0 6px}.toolbar-spacer{flex:1}.document-file-input{display:none}.document-page{margin:22px auto;padding:32px 44px 38px 52px;width:calc(100% - 40px);min-height:360px;background:#fff;box-shadow:0 2px 8px #2d452010;border:1px solid #e7e9e1;overflow-wrap:anywhere}.document-page.drag-over{outline:2px dashed #83a75d;outline-offset:-5px}.document-block{position:relative;padding:9px 0;min-height:43px;border-top:2px solid transparent;border-bottom:2px solid transparent}.block-actions{position:absolute;left:-45px;top:10px;width:39px;display:flex;flex-wrap:wrap;gap:1px;opacity:0;transition:opacity .15s}.document-block:hover>.block-actions,.document-block:focus-within>.block-actions,.block-selected>.block-actions{opacity:1}.block-actions button{width:18px;height:22px;padding:0;background:#f4f7ed;border-radius:3px;color:#8b9a78;font-size:12px}.block-actions .block-drag{cursor:grab;font-size:20px}.block-actions button:hover{background:#dfe9d0;color:#3b5c2b}.editable-text{outline:none;min-height:28px;padding:3px 0;line-height:1.7;font-size:13px;color:#384a31;white-space:pre-wrap}.editable-text:empty:before,.editable-caption:empty:before{content:attr(data-placeholder);color:#abb59e;pointer-events:none}.editable-text:focus{background:#fcfdf8}.detail-document{font-size:11px;line-height:1.6}.doc-text{white-space:pre-wrap;overflow-wrap:anywhere;min-height:8px;margin:5px 0 10px}.doc-text:last-child{margin-bottom:0}.doc-image{margin:8px 0 14px;max-width:100%}.doc-image img{display:block;width:100%;height:auto;object-fit:contain;border-radius:3px}.doc-image figcaption{font-size:10px;color:#7d8d6e;line-height:1.6;margin-top:8px;white-space:pre-wrap}.doc-image.align-left{margin-left:0;margin-right:auto}.doc-image.align-center{margin-left:auto;margin-right:auto}.doc-image.align-right{margin-left:auto;margin-right:0}.image-block.block-selected .resize-image{outline:2px solid #8ba967;outline-offset:3px}.resize-image{position:relative;line-height:0}.resize-corner{position:absolute;right:-9px;bottom:-9px;border-radius:3px;border:2px solid #fff;background:#739754;width:19px;height:19px;line-height:15px;color:white;padding:0;font-size:11px;cursor:nwse-resize;touch-action:none}.editable-caption{min-height:24px;outline:none;border-bottom:1px dashed #e4e8dc;padding:3px 0}.editable-caption:focus{border-color:#9ab777}.image-controls{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:8px 14px;border-bottom:1px solid #e2e8d8;background:#edf3e4;min-height:44px}.image-controls>span{font-size:10px;color:#6c8254;margin-right:auto}.image-controls label{display:flex;align-items:center;gap:8px;font-size:10px}.image-controls input{margin:0;padding:0;width:110px;accent-color:#638a43;outline-offset:4px}.image-controls output{font-size:10px;width:30px;color:#4a6736}.image-controls button{font-size:10px;min-width:0;padding:5px 7px}.document-help{padding:0 18px 15px;font-size:10px;color:#8b9a79;line-height:1.6}.document-error{margin:0;padding:0 18px 14px;font-size:11px;color:#9e4830;line-height:1.6}.document-error:empty{display:none}.drop-before{border-top-color:#80a855!important}.drop-after{border-bottom-color:#80a855!important}mark{background:#fff1a8;color:inherit}.detail-document .doc-image{min-width:35px}.detail-document img{border:1px solid #e6eadf}.detail-document .doc-text{font-size:10px}@media(max-width:800px){.document-page{width:calc(100% - 16px);padding:20px 15px 24px 41px;margin:12px auto;min-height:300px}.block-actions{left:-34px;width:32px}.block-actions button{width:15px;height:22px;font-size:11px}.block-actions .block-drag{font-size:17px}.editable-text{font-size:13px}.image-controls>span{width:100%}.image-controls label{flex:1}.document-toolbar{gap:2px;padding:7px}.document-toolbar button{padding:7px}.document-help{padding:0 12px 12px}.document-block:focus-within .block-actions,.block-selected>.block-actions{opacity:1}}@media(hover:none){.block-actions{opacity:1}}

.width-20{width:20%}.width-25{width:25%}.width-30{width:30%}.width-35{width:35%}.width-40{width:40%}.width-45{width:45%}.width-50{width:50%}.width-55{width:55%}.width-60{width:60%}.width-65{width:65%}.width-70{width:70%}.width-75{width:75%}.width-80{width:80%}.width-85{width:85%}.width-90{width:90%}.width-95{width:95%}.width-100{width:100%}

#detail-editor{overflow:visible}.document-toolbar{position:sticky;top:0;z-index:3;height:54px;flex-wrap:nowrap;border-radius:7px 7px 0 0}.image-controls{position:sticky;top:54px;z-index:2}@media(max-width:800px){.document-toolbar{height:48px;padding:6px;gap:1px}.document-toolbar button{padding:6px;min-width:24px;font-size:10px}.format-tools button{font-size:13px}.tool-divider{margin:0 3px}.image-controls{top:48px}}

.document-page:focus-visible{outline:2px solid #a4ba83;outline-offset:-3px}#detail-editor[aria-busy=true] .document-help{color:#41662b;font-weight:600}.document-toolbar [data-tool=paste]{white-space:nowrap}@media(max-width:800px){.paste-label{display:none}.document-toolbar .tool-divider{display:none}}

.stock-source{display:flex;align-items:center;gap:11px;background:#ebf0e4;border:1px solid #dfe6d5;border-radius:7px;padding:15px 19px;margin:-6px 0 24px}.source-dot{width:7px;height:7px;background:#7e9b53;border-radius:50%;flex-shrink:0}.stock-source>div{flex:1}.stock-source strong{display:block;font-size:11px;font-weight:600}.stock-source>div>span{display:block;font-size:10px;color:#829470;margin-top:4px}.stock-source .secondary{font-size:10px;padding:8px 12px;background:#f8faf4}.stock-table{min-width:920px}.stock-table th:first-child{width:25%}.stock-table th:nth-child(2){width:10%}.stock-table th:nth-child(3){width:13%}.stock-table th:nth-child(4){width:15%}.stock-table th:nth-child(5){width:13%}.stock-table th:nth-child(6){width:14%}.stock-table th:last-child{width:10%}.stock-table td{vertical-align:middle;padding:19px 17px}.stock-table .sale-link{font-size:14px}.stock-table .edit-row{margin:0;white-space:nowrap}.stock-name{display:flex;align-items:center;gap:15px}.stock-shape{display:block;flex-shrink:0;background:linear-gradient(135deg,#e4e6dd,#f7f8f1,#d9ded0);border:1px solid #ccd4c0;box-shadow:inset 0 0 0 3px #fff6}.stock-shape.rectangle{width:33px;height:21px;border-radius:3px}.stock-shape.round{width:27px;height:27px;border-radius:50%;margin:0 3px}.stock-quantity{font-size:23px;font-weight:550;font-variant-numeric:tabular-nums;letter-spacing:-.6px}.stock-status{display:inline-flex;align-items:center;gap:6px;border-radius:4px;padding:4px 7px;font-size:10px;font-weight:500}.stock-status>span{width:5px;height:5px;border-radius:50%;background:currentColor}.stock-status.ok{background:#edf3e5;color:#65814e}.stock-status.low{background:#fcf5df;color:#a08b44}.stock-status.critical,.stock-status.empty{background:#f9ebe5;color:#b17058}.historical{font-size:13px;color:#7f8c73}.stock-review{display:inline-block;color:#ae8055;font-size:9px;background:#fff4e8;border-radius:3px;margin-top:6px;padding:2px 5px}#stock-dialog{width:750px;max-width:calc(100vw - 28px)}.stock-grid{margin-top:17px}.stock-form-status{align-self:center;padding:10px}.stock-form-status>span{display:block;font-size:8px;letter-spacing:1px;color:#9aa68c;margin-bottom:10px}.stock-origin h3,.stock-history h3{font-size:13px}.stock-origin>p{font-size:12px;color:#708360}.stock-origin>div{display:flex;flex-wrap:wrap;gap:15px;font-size:10px;color:#94a286}.stock-origin b{color:#768a63;font-weight:500}.stock-history p{display:flex;flex-direction:column;gap:5px;border-left:2px solid #dce6d1;padding:6px 12px;margin:14px 0;font-size:11px}.stock-history strong{font-weight:550}.stock-history span{color:#80916f;white-space:pre-wrap}.stock-history small{font-size:9px;color:#a0ad93}@media(max-width:800px){.sidebar{padding:12px 14px;gap:4px}.sidebar .brand{width:100px}.sidebar .nav{padding:7px 6px;gap:4px;font-size:10px}.stock-source{padding:12px;gap:8px;align-items:flex-start}.stock-source .secondary{padding:7px;font-size:9px;white-space:nowrap}.stock-source>div>span{font-size:9px;line-height:1.5}.stock-table td{padding:16px}.stock-form-status{padding:3px}.stock-origin>div{gap:8px;flex-direction:column}}

/* Compras e ingresos de chapas */
.purchase-table{min-width:940px}.purchase-table th:nth-child(2){width:36%}.purchase-item-label{margin:0 0 9px}.purchase-item-label:last-child{margin:0}.purchase-item-label strong{font-size:13px;font-weight:600}.purchase-notes{font-size:12px;color:var(--muted);margin:10px 0 0}.purchase-status{display:inline-flex;border-radius:20px;padding:6px 10px;font-size:11px;font-weight:600;white-space:nowrap;background:#eaf0ed;color:#285a49}.purchase-status.historical{background:#f0eee8;color:#6d7068}.purchase-status.cancelled{background:#faeae5;color:#995340}
#purchase-dialog{width:min(1000px,calc(100vw - 32px))}#purchase-dialog .dialog-body{padding:24px 32px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-line{display:grid;grid-template-columns:minmax(125px,1fr) minmax(240px,2.4fr) 110px 30px;gap:12px;align-items:end;margin-bottom:16px}.purchase-line label{min-width:0}.purchase-line select{width:100%}.purchase-line .remove{margin-bottom:8px}.purchase-explanation{padding:15px 18px;background:#f4f4ed;border-radius:10px;margin:0 0 22px;line-height:1.6;color:#616e64}.purchase-read-line{display:flex;gap:20px;padding:16px 0;border-bottom:1px solid #e6e8df}.purchase-read-line strong{white-space:nowrap}.danger-button{border:1px solid #e6c9c0;background:#fff;color:#a54e38;border-radius:9px;padding:10px 14px;cursor:pointer}.danger-button:hover{background:#fff2ed}.micro{display:block;font-size:10px;letter-spacing:1px;color:#788178;margin-bottom:8px}
@media(max-width:760px){.purchase-line{grid-template-columns:1fr 100px 30px;gap:10px}.purchase-line label:first-child{grid-column:1/-1}.purchase-line label:nth-child(2){min-width:0}.purchase-read-line{flex-direction:column;gap:6px}#purchase-dialog .dialog-body{padding:20px}.grid.two{grid-template-columns:1fr}.dialog-footer:has(#purchase-save)>div{flex-wrap:wrap}.sidebar .nav{font-size:10px;padding:9px 6px;gap:4px}.sidebar .nav span:first-child{font-size:14px}.sidebar .brand{width:75px;min-width:75px}.sidebar{gap:3px}}
.purchase-import{padding:20px 24px;border-top:1px solid #e6e8df}
.purchase-line-wrap{margin-bottom:18px;padding:16px;background:#f8f9f5;border:1px solid #e4e8df;border-radius:10px}.purchase-line-wrap .purchase-line{margin-bottom:4px}.purchase-new-stock{border:0;padding:16px 0 0;margin:0}.purchase-new-stock legend{font-size:13px;font-weight:600;padding:10px 0}.purchase-line-wrap[data-mode=new] .purchase-line{grid-template-columns:1fr 30px}.purchase-line-wrap[data-mode=new] .purchase-line>label{max-width:180px}.purchase-line-wrap [hidden]{display:none!important}.purchase-balance{min-height:45px;margin-bottom:9px;white-space:nowrap}.purchase-balance strong{font-size:15px}.purchase-table{min-width:1120px}.purchase-table th:nth-child(2){width:27%}.purchase-table th:nth-child(4){min-width:155px}
.purchase-status.pending{background:#fff0cf;color:#926719}

/* Controles de compras y stock: altura uniforme también en Safari para macOS. */
#purchase-dialog input,#purchase-dialog select,#stock-dialog input,#stock-dialog select{height:42px;min-height:42px;box-sizing:border-box}
#purchase-dialog select,#stock-dialog select{-webkit-appearance:none;appearance:none;padding-right:32px;background-image:linear-gradient(45deg,transparent 50%,#65745a 50%),linear-gradient(135deg,#65745a 50%,transparent 50%);background-position:calc(100% - 16px) 18px,calc(100% - 11px) 18px;background-size:5px 5px;background-repeat:no-repeat}

/* Inventario compacto: ficha accesible desde la medida o la fila. */
.stock-table{min-width:620px}
.stock-table th:first-child{width:36%}.stock-table th:nth-child(2){width:14%}.stock-table th:nth-child(3){width:16%}.stock-table th:nth-child(4){width:18%}.stock-table th:last-child{width:16%}

.stock-delete-help{padding:12px 14px;margin:14px 0;background:#f4f5ef;border-radius:7px;color:#65745a;font-size:12px;line-height:1.6}button.danger-button:disabled{cursor:not-allowed;opacity:.5}

/* Producción: una fila por venta, con estado y programación editables. */
.production-blocked{background:#eff4f8!important;border-color:#d9e5ed!important}.production-filters{overflow-x:auto}.production-filters .tabs{gap:18px}.production-table{min-width:1047px;table-layout:fixed}.production-table th:nth-child(1){width:98px}.production-table th:nth-child(2){width:68px}.production-table th:nth-child(3){width:96px}.production-table th:nth-child(4){width:65px}.production-table th:nth-child(5){width:130px}.production-table th:nth-child(6){width:36px}.production-table th:nth-child(7){width:95px}.production-table th:nth-child(8){width:61px}.production-table th:nth-child(9){width:93px}.production-table th:nth-child(10){width:87px}.production-table th:nth-child(11){width:94px}.production-table th:nth-child(12){width:124px}.production-table td{padding:16px 12px;vertical-align:top}.production-table .amount{font-size:12px;white-space:nowrap}.production-client{font-size:12px}.production-item{min-height:35px;margin-bottom:5px}.production-detail{font-size:11px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.production-dispatch,.production-state{height:38px;min-height:38px;width:100%;border:1px solid #dbe2d4;border-radius:5px;padding:7px;background:#fff;color:var(--ink);font-size:11px}.production-state{-webkit-appearance:none;appearance:none;font-weight:650;padding-right:24px;background-image:linear-gradient(45deg,transparent 50%,#65745a 50%),linear-gradient(135deg,#65745a 50%,transparent 50%);background-position:calc(100% - 13px) 15px,calc(100% - 8px) 15px;background-size:5px 5px;background-repeat:no-repeat}.production-state-cell,.production-table th:last-child{position:sticky;right:0;box-shadow:-4px 0 5px #243d3409}.production-table th:last-child{z-index:2}.production-table tr{--production-row:#fff;background:var(--production-row)}.production-state-cell{background:var(--production-row)}.production-stage-design,.production-stage-sheets{--production-row:#eaf2f8!important}.production-stage-engrave{--production-row:#e7f1df!important}.production-stage-working{--production-row:#f8f1dc!important}.production-stage-pack{--production-row:#edf0df!important}.production-stage-deliver{--production-row:#dedede!important}
.production-stage-boedo{--production-row:#cccccc!important}.production-stage-sent{--production-row:#cccccc!important;color:var(--ink)}.production-state-hint{font-size:9px;line-height:1.5}.production-dispatched{margin-top:12px}#production-dialog{width:min(550px,calc(100vw - 32px))}#production-dialog input{height:42px}
@media(max-width:760px){.sidebar{flex-wrap:wrap}.sidebar .nav{font-size:10px;padding:8px 5px;margin-bottom:0}.production-ledger .ledger-top{align-items:stretch}}

/* Vista de taller compacta para comparar muchos pedidos de un vistazo. */
#production-view>header{margin-bottom:12px}#production-view>header .eyebrow{margin-bottom:6px}#production-view h1{font-size:30px;margin-bottom:4px}#production-view>header .muted{font-size:11px}
#production-view .stats{gap:8px;margin-bottom:12px}#production-view .stats article{min-height:0;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px}#production-view .stats article>span{font-size:8px;letter-spacing:.7px;max-width:120px}#production-view .stats strong{display:flex;align-items:baseline;gap:4px;font-size:20px;margin:0}#production-view .stats strong small{font-size:9px}#production-view .stats p{display:none}
.production-ledger .ledger-top{padding:10px 14px}.production-ledger .ledger-top h2{font-size:14px;margin-bottom:3px}.production-ledger .ledger-top .muted{font-size:10px}.production-ledger .search input{padding:7px 0}.production-filters{padding:0 14px}.production-filters .tabs{gap:16px}.production-filters .tabs button{padding:8px 0;font-size:10px}
.production-table th{padding:8px 5px;letter-spacing:.7px}.production-table td{padding:3px 8px;height:30px;vertical-align:middle;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.production-table .sale-link{font-size:11px}.production-sale-date{display:inline;font-size:9px;margin:0 0 0 6px}.production-client{font-size:11px;font-weight:600}.production-item{display:inline;min-height:0;margin:0}.production-item+.production-item:before{content:' · ';color:#7a837d}.production-detail{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2;font-size:10px;-webkit-line-clamp:unset}.production-table .amount,.production-table td:nth-child(3){font-size:10px}.production-table td>.sub:not(.production-sale-date){display:inline;font-size:9px;margin:0 0 0 5px}.production-dispatch,.production-state{height:24px;min-height:24px;padding:2px 5px;font-size:10px}.production-state{padding-right:17px}
.production-ledger .table-scroll{max-height:66dvh}.production-table thead th{position:sticky;top:0;z-index:2}.production-table thead th:last-child{z-index:3}.production-ledger .ledger-footer{padding:9px 14px}#production-view>.bottom-note{margin:10px 0;font-size:9px}
@media(max-width:760px){#production-view .stats article{padding:7px 9px}#production-view .stats strong{font-size:17px}.production-ledger .ledger-top .muted{display:none}}
#production-view>header .eyebrow,#production-view>header .muted,.production-ledger .ledger-top .muted{display:none}#production-view>header{margin-bottom:10px}#production-view h1{font-size:28px;margin:0}.production-ledger .ledger-top h2{margin:0}.production-table td{height:26px;padding:1px 5px}
.production-table td:nth-child(5),.production-table th:nth-child(5){padding-inline:8px}.production-dispatch,.production-state{height:22px;min-height:22px;min-width:0;padding-top:1px;padding-bottom:1px}.production-state{background-position:calc(100% - 10px) 8px,calc(100% - 5px) 8px}
/* Ventas: controles uniformes y planificación de chapas por producto. */
#sale-dialog input:not([type=checkbox]):not([type=range]):not([type=file]),#sale-dialog select{height:42px;min-height:42px;box-sizing:border-box}
#sale-dialog select{-webkit-appearance:none;appearance:none;padding-right:32px;background-image:linear-gradient(45deg,transparent 50%,#65745a 50%),linear-gradient(135deg,#65745a 50%,transparent 50%);background-position:calc(100% - 16px) 18px,calc(100% - 11px) 18px;background-size:5px 5px;background-repeat:no-repeat}
.sale-stock-controls{grid-column:1/-1;border-top:1px solid #e1e6dc;padding-top:12px;margin-top:4px}.sale-stock-toggle{display:flex;align-items:center;gap:9px;font-weight:600}.sale-stock-toggle input{width:16px;height:16px;margin:0}.sale-stock-fields{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:12px;border:0;padding:12px 0 0;margin:0}.sale-stock-fields[hidden]{display:none}.sale-stock-result{grid-column:1/-1;font-size:11px;color:#526d42;margin:0;line-height:1.6}.reservation-held{color:#527340}
@media(max-width:760px){.sale-stock-fields{grid-template-columns:1fr}}
/* Paleta de resaltado: solo colores conocidos, sin estilos HTML arbitrarios. */
.highlight-green{background:#cce8b5!important}.highlight-violet{background:#e1c6f2!important}.highlight-gray{background:#dedede!important}.highlight-sky{background:#c9e8fa!important}.highlight-yellow{background:#fff2a8!important}.highlight-swatch{display:grid;place-items:center;width:19px;height:19px;border-radius:3px;color:#243d34}.format-tools{display:flex;align-items:center;gap:3px;flex-wrap:wrap}

/* Reserva primero; producto vinculado al catálogo sin edición manual. */
#items .item-row{display:block}.sale-product-fields{display:grid;grid-template-columns:85px 1.3fr 1fr 1.5fr 22px;gap:12px;align-items:start}.sale-stock-controls{border-top:0;border-bottom:1px solid #e1e6dc;padding:0 0 12px;margin:0 0 14px}.sale-product-fields input[readonly]{background:#edf1e8;color:#5c6b56;cursor:default}.stock-reserved{display:block;margin-top:3px;font-size:10px;font-weight:400;color:#78836c;line-height:1.4}
@media(max-width:760px){.sale-product-fields{grid-template-columns:70px 1fr 25px;gap:10px}.sale-product-fields>label:nth-child(3){grid-column:1/2}.sale-product-fields>label:nth-child(4){grid-column:2/3}.sale-product-fields>.remove{grid-column:3;grid-row:1}}

.ledger-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.period-picker { min-width: 0; }
.period-picker select { min-height: 40px; max-width: 100%; }
.accounting-close-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.accounting-close, .accounting-undated { margin-bottom: 18px; }
.expense-ledger { margin-bottom: 18px; }
.expense-table { min-width: 640px; }
.expense-table th:first-child { width: 9%; }
.expense-table th:nth-child(2) { width: 14%; }
.expense-table th:nth-child(3) { width: 16%; }
.expense-table th:nth-child(5) { width: 19%; }
.expense-table th:last-child { width: 16%; }
.accounting-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.accounting-undated { margin-top: 18px; padding: 18px; }
.accounting-undated summary { cursor: pointer; font-weight: 650; }
.accounting-undated li { margin: 5px 0; }
@media (max-width: 620px) {
  .accounting-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-controls { width: 100%; }
}

.sales-table { min-width: 720px; }
.sales-table th { padding: 11px 8px; letter-spacing: .65px; }
.sales-table td { padding: 13px 8px; }
.sales-table .sale-sent > td { background: #e2e2e2; }
.sales-table .sale-sent:hover > td { background: #dadada; }
.sales-table .sale-client-pending > td { background: #dceaff; }
.sales-table .sale-client-pending:hover > td { background: #d1e3ff; }
.sales-table .product { gap: 5px; }
.sales-table .payments-list { margin: 8px 0; }
.sales-table .status { white-space: normal; }
.sales-table .edit-row { margin-top: 10px; }

@media (min-width: 801px) {
  :root { --sidebar-width: clamp(146px, 13vw, 174px); }

  .sidebar { width: var(--sidebar-width); padding: 24px 10px 18px; }
  .sidebar .brand { margin-bottom: 24px; }
  .sidebar .side-label { margin: 0 6px 12px; }
  .sidebar .nav { padding: 10px 7px; gap: 8px; margin-bottom: 4px; font-size: 12px; }
  .sidebar .nav > span:first-child { font-size: 16px; }

  .workspace { margin-left: var(--sidebar-width); padding: 28px clamp(12px, 1.7vw, 26px) 24px; }
  #sales-view > header { margin-bottom: 20px; }
  #sales-view .stats { gap: 10px; margin-bottom: 20px; }
  #sales-view .stats article { min-height: 0; padding: 14px 12px; }
  #sales-view .stats strong { font-size: clamp(17px, 1.9vw, 27px); margin: 7px 0 5px; }
  #sales-view .stats strong small { font-size: 10px; }
  #sales-view .ledger-top { padding: 14px 12px; }
  #sales-view .search { min-width: 0; }
  #sales-view .filters { padding: 0 12px; }
  #sales-view .tabs { gap: 16px; }
  #sales-view .tabs button { padding: 10px 0; }
}

.sale-shipping-fields { display: grid; gap: 12px; margin-top: 12px; }
.sale-shipping-fields > fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sale-shipping-fields > fieldset[hidden] { display: none; }

.sales-list-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.sales-list-heading h2 { margin-bottom: 0; }

.sales-detail-summary .doc-image { width: 100%; max-width: 140px; margin: 0; }
.sales-detail-summary .doc-image img { height: 96px; object-fit: contain; }

.origin.origin-mercadolibre{background:#ffe45c;color:#554600;border-color:#e6ca3b}
.invoice-fields{margin:16px 0}
.invoice-check{display:flex;align-items:center;gap:8px;cursor:pointer}
.invoice-check input[type=checkbox]{width:17px;height:17px;min-height:0;padding:0;accent-color:#255d49;flex-shrink:0}
.invoice-fields fieldset{border:0;padding:0;margin:12px 0 0;min-width:0}
.invoice-fields fieldset[hidden]{display:none}
.invoice-summary{margin:8px 0;color:#255d49;font-size:11px}
.invoice-summary small{display:block;margin-top:3px;overflow-wrap:anywhere}

/* Ventas: controles del encabezado con una altura común. */
#sales-view .ledger-top{align-items:flex-end}
#sales-view .sales-list-heading h2{display:flex;align-items:center;gap:12px;margin:0}
#sales-view .sales-list-heading .count{display:inline-flex;align-items:center;justify-content:center;height:40px;min-width:40px;padding:0 10px;margin:0;font-size:12px;line-height:1}
#sales-view .sales-list-heading>button{height:40px;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center}
#sales-view .period-picker select{height:40px;min-height:40px;padding:0 10px;box-sizing:border-box}
#sales-view .ledger-controls .search{height:40px;min-height:40px}
#sales-view .ledger-controls .search input{height:100%;min-height:0;padding-top:0;padding-bottom:0}
@media(max-width:800px){#sales-view .ledger-top{align-items:stretch}}

.period-config{padding:18px;margin-bottom:18px}
.period-config h2{margin:0 0 16px}
#periods-view .period-picker select,#periods-view .period-config input{min-height:40px;height:40px}
.period-journal{width:100%;min-width:1150px;font-size:11px;border-collapse:collapse}
.period-journal th,.period-journal td{padding:7px 8px;border-right:1px solid var(--line);vertical-align:middle}
.period-journal thead th{text-align:center;white-space:nowrap}
.period-journal .journal-income{background:#e7f1e5}
.period-journal .journal-expense{background:#fff0dc}
.period-journal .journal-money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.period-journal .journal-description{min-width:170px;max-width:300px;overflow-wrap:anywhere}
.period-journal tfoot{background:#eef0e9;font-weight:650}

.period-journal .journal-totals{background:#eef0e9;font-weight:650}
.period-journal .journal-pending{background:#fff5dc;color:#93601d}
#periods-view .journal-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:800px){#periods-view .journal-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.journal-controls{flex-wrap:wrap;align-items:flex-end}
.journal-controls>label{min-width:150px}
.journal-controls select,#journal-dialog select,#journal-dialog input:not([type=checkbox]){height:40px;min-height:40px}
.journal-controls .journal-check{display:flex;align-items:center;gap:8px;min-height:40px}
.journal-check input[type=checkbox]{width:17px;height:17px;min-height:0;margin:0;padding:0;accent-color:var(--green)}
.journal-opening{border-top:1px solid var(--line);padding-top:10px;padding-bottom:10px}
.journal-help{padding:0 14px}
.period-journal tbody tr[data-journal-row]{cursor:pointer}
.period-journal tbody tr[data-journal-row]:hover td{background:#edf3e9}
.period-journal .journal-date{padding:0;background:none;color:var(--green);font:inherit;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}
.period-journal .journal-opening-row td{background:#edf0e7}
#journal-dialog{width:680px;max-width:calc(100vw - 28px)}
#journal-dialog fieldset{border:0;padding:0;margin:16px 0 0;min-width:0}
#journal-dialog [hidden]{display:none}

.journal-origin{font-size:10px;white-space:nowrap;margin-top:4px}

.payment-amount{min-width:0}
.payment-fill-pending{display:inline-block;margin-top:6px;font-size:10px;line-height:1.4}

.journal-yield-accounts{margin-top:16px;margin-bottom:16px}

.journal-account-balances{margin:16px 0}
.journal-account-balances .ledger-top{padding:12px 14px 8px;flex-wrap:wrap;gap:6px}
.journal-account-balances h2{margin:0;font-size:13px}
.journal-account-balances .muted{font-size:10px}
.journal-account-balance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;padding:0 14px 14px}
.journal-account-balance-grid article{padding:10px 12px;background:#f5f8f1;border:1px solid var(--line);border-radius:5px;min-width:0}
.journal-account-balance-grid span{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}
.journal-account-balance-grid strong{display:block;font-size:19px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

.journal-carried-debt{color:#93601d;font-size:10px;margin-top:4px;white-space:nowrap}

/* Referencias y controles compactos del plan de producción. */
.production-list-heading{display:flex;align-items:center;gap:10px}.production-list-heading button{padding:5px 9px;font-size:10px;white-space:nowrap}
.production-origin{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.production-origin.origin-mercadolibre{background:#ffe45c;color:#554600;border:1px solid #e6ca3b;border-radius:4px;padding:2px 3px;font-weight:650;font-size:9px}
.production-due{color:#bd3030;font-weight:700}
.production-note{width:100%;min-width:0;height:22px;min-height:22px;padding:2px 4px;border:1px solid #dbe2d4;border-radius:4px;background:#ffffffb8;color:var(--ink);font:inherit;font-size:10px}.production-note::placeholder{color:#899487}

/* Materiales y dimensiones de los productos. */
.steel-tag{display:inline-block;padding:1px 4px;border-radius:3px}
.steel-304,.origin.steel-304,.sale-product-fields input.steel-304,.sale-product-fields input.steel-304[readonly]{background:#ffdf00;color:#332b00;border-color:#d5b800;font-weight:700}
.sale-product-fields{grid-template-columns:70px minmax(120px,1.5fr) minmax(100px,1fr) 95px 110px 22px;gap:10px}
.sale-product-fields>label:has(textarea){grid-column:1/6;grid-row:2;margin:0}
.sale-product-fields>.remove{grid-column:6;grid-row:1}
#toggle-sale-detail{margin-bottom:12px;padding:7px 12px;font-size:11px}
/* Modalidad abreviada sin aumentar la altura de las filas. */
.production-table{min-width:1100px}
.production-table th:nth-child(1){width:96px}.production-table th:nth-child(2){width:68px}.production-table th:nth-child(3){width:96px}.production-table th:nth-child(4){width:64px}.production-table th:nth-child(5){width:65px}.production-table th:nth-child(6){width:128px}.production-table th:nth-child(7){width:34px}.production-table th:nth-child(8){width:90px}.production-table th:nth-child(9){width:60px}.production-table th:nth-child(10){width:100px}.production-table th:nth-child(11){width:86px}.production-table th:nth-child(12){width:92px}.production-table th:nth-child(13){width:121px}
.production-table td:nth-child(5),.production-table th:nth-child(5){padding-inline:5px}.production-table td:nth-child(6),.production-table th:nth-child(6){padding-inline:8px}
@media(max-width:760px){.sale-product-fields{grid-template-columns:70px minmax(0,1fr) 25px}.sale-product-fields>label:nth-child(1){grid-column:1;grid-row:1}.sale-product-fields>label:nth-child(2){grid-column:2;grid-row:1}.sale-product-fields>label:nth-child(3){grid-column:1/3;grid-row:2}.sale-product-fields>label:nth-child(4){grid-column:1;grid-row:3}.sale-product-fields>label:nth-child(5){grid-column:2;grid-row:3}.sale-product-fields>label:has(textarea){grid-column:1/3;grid-row:4}.sale-product-fields>.remove{grid-column:3;grid-row:1}}

/* El pie de la venta queda por encima de las herramientas del detalle. */
#sale-dialog .dialog-body{position:relative;z-index:0}
#sale-dialog .dialog-footer{z-index:10;isolation:isolate;background:#fff}
.sale-steel-field select{height:41px;min-height:41px}
.sale-steel-field input:not([hidden]){margin-top:6px}
.sale-steel-field select.steel-304{background-color:#ffdf00;color:#332b00;border-color:#d5b800;font-weight:700}
.sale-steel-field select:disabled{opacity:1;color:var(--ink)}
.sale-steel-field select.steel-304:disabled{color:#332b00}

.sale-holes{margin-top:12px;border-top:1px solid #e1e6dc;padding-top:10px}
.sale-holes-toggle{display:flex;align-items:center;gap:8px;font-weight:600}
.sale-holes-toggle input{width:16px;height:16px;margin:0;padding:0;accent-color:var(--green)}
.sale-holes-fields{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;border:0;padding:10px 0 0;margin:0;min-width:0}
.sale-holes-fields>label:has(textarea){margin:0}
.sale-holes-fields select{height:41px;min-height:41px}
.sale-holes-fields textarea{min-height:60px;height:60px}
.product-holes-summary{font-size:10px}
@media(max-width:760px){.sale-holes-fields{grid-template-columns:minmax(0,1fr)}}

.sales-table .product-specs{line-height:1.5}.sales-table .product-specs>span{white-space:nowrap}.sales-table .product-holes-summary{margin-top:4px}

.sale-color{margin-top:12px;border-top:1px solid #e1e6dc;padding-top:10px}
.sale-color-fields{border:0;min-width:0;margin:0;padding:10px 0 0}
.sale-color-fields>label:has(textarea){margin:0}
.sale-color-fields textarea{height:60px;min-height:60px}
.product-color-summary{font-size:10px;margin-top:4px}

.sales-table .product-feature-label{color:#8a2678;font-weight:750}

.sale-origin-field select{height:41px;min-height:41px}.sale-origin-field input:not([hidden]){margin-top:6px}

.sale-settlement-field{max-width:310px;margin:16px 0}

.production-table .production-boedo-mode{font-weight:800;color:#174cba}

.journal-distribution{margin-bottom:14px}.journal-distribution h2{font-size:14px;margin:0}.distribution-help{padding:0 16px 14px;margin:0}
.distribution-table{width:100%;min-width:560px}.distribution-table th{font-size:9px;letter-spacing:.4px;padding:10px}.distribution-table td{font-size:11px;padding:9px 10px;font-variant-numeric:tabular-nums}.distribution-table th:not(:first-child),.distribution-table td:not(:first-child){text-align:right;white-space:nowrap}
.distribution-transfers{padding:12px 16px}.distribution-transfers h3{font-size:13px;margin:0 0 10px}.distribution-transfers ol{padding-left:22px;font-size:12px;line-height:1.9}.distribution-transfers p{font-size:11px}.distribution-inputs{padding:12px 0 18px}
#distribution-preview .journal-account-balance-grid{padding:8px 0 14px}#distribution-preview .journal-account-balance-grid strong{font-size:16px}#distribution-preview .distribution-transfers{padding-inline:0}

.distribution-amount{width:115px;max-width:100%;height:32px;border:1px solid #dbe2d4;border-radius:4px;padding:5px;text-align:right;font:inherit;color:var(--ink);background:#fff}
.distribution-manual{display:block;font-size:9px;color:#6d5380;margin-top:4px}.distribution-manual button{font-size:9px}
#distribution-reset{margin:4px 0 12px;padding:7px 10px;font-size:11px}

.journal-stats .journal-final-highlight{background:#ffe45c;border-color:#e5c63a}
.journal-stats .journal-final-highlight>span,.journal-stats .journal-final-highlight strong{color:#493e00}
.journal-stats .journal-final-highlight p{color:#6b5f23}
.journal-period-title{font-size:.65em;font-weight:600;letter-spacing:-.3px}
@media(max-width:760px){.journal-period-title{display:block;margin-top:7px}}

.journal-header-actions{align-items:flex-end;flex-wrap:wrap}.journal-header-actions .period-picker{min-width:190px}.journal-header-actions .period-picker select{height:41px;min-height:41px;margin-top:5px}

.journal-header-actions .period-picker select{font-size:15px;font-weight:700;height:41px;min-height:41px;padding-block:6px}

.period-journal .journal-opening-row td{background:#dfebff;color:#25476e}.period-journal .journal-opening-row td:first-child{border-left:3px solid #6c98d3}

/* Priorizar el detalle frente a las columnas breves del libro diario. */
.period-journal .journal-description{width:36%;min-width:360px;max-width:none;overflow-wrap:break-word}
.period-journal thead tr:first-child th:nth-child(4){width:36%;min-width:360px}
.period-journal tbody td:first-child{width:85px;white-space:nowrap}
.period-journal tbody td:nth-child(2){min-width:100px}
.period-journal tbody td:nth-child(3){min-width:90px;max-width:130px}
.period-journal th,.period-journal td{padding:6px}

/* Equilibrar el detalle con el espacio necesario para los importes. */
.period-journal{table-layout:auto}
.period-journal .journal-description{width:24%;min-width:220px;max-width:280px;white-space:normal;overflow-wrap:break-word}
.period-journal thead tr:first-child th:nth-child(4){width:24%;min-width:220px}
.period-journal .journal-money{min-width:105px;width:auto;white-space:nowrap;font-size:10px;padding-inline:7px}
.period-journal tbody td:nth-child(2){min-width:85px}
.period-journal tbody td:nth-child(3){min-width:75px;max-width:110px}

/* El libro diario reparte el ancho disponible entre todas sus columnas. */
.period-journal{width:100%;min-width:0;table-layout:fixed}
.period-journal th,.period-journal td{min-width:0;max-width:none;width:auto;padding:6px 4px;overflow-wrap:break-word}
.period-journal .journal-description,.period-journal thead tr:first-child th:nth-child(4){width:auto;min-width:0;max-width:none}
.period-journal tbody td:first-child,.period-journal tbody td:nth-child(2),.period-journal tbody td:nth-child(3){width:auto;min-width:0;max-width:none}
.period-journal .journal-money{width:auto;min-width:0;max-width:none;padding-inline:3px;font-size:clamp(8px,.62vw,10px);letter-spacing:-.2px;white-space:nowrap}
.period-journal thead th{white-space:normal;font-size:clamp(8px,.65vw,10px);letter-spacing:0;overflow-wrap:anywhere}
.period-journal .journal-date{white-space:normal;font-size:clamp(8px,.65vw,10px)}
.period-journal tbody td:nth-child(2),.period-journal tbody td:nth-child(3),.period-journal .journal-description{font-size:clamp(9px,.7vw,11px)}

.expense-list-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.expense-list-heading h2{margin:0}.expense-list-heading button{white-space:nowrap}
.expense-dialog input:not([type=checkbox]),.expense-dialog select{height:42px;min-height:42px;box-sizing:border-box}
.expense-dialog select{-webkit-appearance:none;appearance:none;padding-right:30px;background-image:linear-gradient(45deg,transparent 50%,#65745a 50%),linear-gradient(135deg,#65745a 50%,transparent 50%);background-position:calc(100% - 15px) 18px,calc(100% - 10px) 18px;background-size:5px 5px;background-repeat:no-repeat}

.production-table th:nth-child(8){width:80px}.production-table th:nth-child(9){width:82px}.production-table th:nth-child(10){width:88px}
.production-table .production-measure{white-space:normal;overflow-wrap:break-word;font-size:9px;line-height:1.35}
.production-steel-special{display:inline-block;white-space:nowrap;font-weight:800;background:#ffdf00;color:#332b00;padding:1px 3px;border-radius:3px}

/* Utilización de chapas y evolución del stock. */
.production-table .production-usage-link{display:block;width:100%;padding:0;text-align:left;background:transparent;color:inherit;font:inherit;font-weight:400;line-height:inherit;white-space:inherit;cursor:pointer}
.production-table .production-usage-link:hover{text-decoration:underline;text-underline-offset:3px}
.production-table .production-usage-link.stock-associated{font-weight:800}
#stock-usage-dialog{width:1000px;max-width:calc(100vw - 28px)}
#stock-usage-dialog label input,#stock-usage-dialog label select{height:42px;min-height:42px}
#stock-usage-dialog .dialog-footer{z-index:10;flex-wrap:wrap}
#stock-usage-dialog .dialog-footer>div{flex-wrap:wrap;margin-left:auto}
.usage-line{margin:14px 0;padding:15px;background:#f8faf4;border:1px solid var(--line);border-radius:7px}
.usage-choice{display:grid;grid-template-columns:1fr 2.2fr 120px 120px 22px;gap:12px;align-items:end;margin-top:12px}
.usage-choice>label{min-width:0}.usage-choice .remove{margin:0 0 6px}
.stock-history-table{width:100%;table-layout:fixed;min-width:900px;border-collapse:collapse}
.stock-history-table th,.stock-history-table td{padding:9px 7px;font-size:10px;border-bottom:1px solid var(--line);vertical-align:top}
.stock-history-table th:nth-child(1){width:8%}.stock-history-table th:nth-child(2){width:9%}.stock-history-table th:nth-child(3){width:18%}.stock-history-table th:nth-child(4){width:25%}
.stock-history-table td:nth-child(n+5),.stock-history-table th:nth-child(n+5){text-align:right;white-space:nowrap}
.stock-history-table td:nth-child(-n+4){overflow-wrap:anywhere}
.stock-history-table .stock-history-opening{background:#edf1e4}
.stock-history-table button{padding:0;background:transparent;color:var(--green);font:inherit;text-decoration:underline}
@media(max-width:760px){.usage-choice{grid-template-columns:1fr 1fr 22px}.usage-choice>label:first-child,.usage-choice>label:nth-child(2){grid-column:1/-1}.usage-line{padding:10px}}

.usage-search-results{margin-top:10px;padding:10px;border:1px solid var(--line);border-radius:5px;background:#fff}
.usage-search-results .field-help{margin:0 0 7px;color:var(--ink)}
.usage-search-options{display:flex;flex-direction:column;gap:4px;max-height:180px;overflow-y:auto}
.usage-search-options button{padding:9px 10px;text-align:left;font-size:12px;background:#f4f7ee;color:var(--ink);border:1px solid transparent;border-radius:4px}
.usage-search-options button:hover,.usage-search-options button.selected{background:#e4eed7;border-color:#9eb785}

.sale-stock-fields{grid-template-columns:minmax(0,1fr) minmax(0,2.2fr) 150px;align-items:start}
.sale-stock-fields>label{min-width:0}
.sale-stock-fields .sale-stock-search,.sale-stock-fields select,.sale-stock-fields input[name=stock_requested]{height:42px;min-height:42px}
.sale-stock-search-results{grid-column:1/-1;margin-top:0}
@media(max-width:760px){.sale-stock-fields{grid-template-columns:1fr}}

.usage-release-toggle{display:flex;align-items:center;gap:8px;margin-top:12px;font-weight:600}
#stock-usage-dialog .usage-release-toggle input{width:17px;height:17px;min-height:17px;margin:0;flex:none}
.usage-release-toggle:has(input:disabled){color:var(--muted);font-weight:400}
.usage-reservation-help{margin:6px 0 0}

.stock-history-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.stock-history-filters input,.stock-history-filters select{height:40px;min-height:40px}.stock-history-filters label{min-width:120px}.stock-history-filters label:last-child{min-width:230px}

.purchase-list-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.purchase-list-heading h2{margin:0}.purchase-list-heading button{height:40px}
#purchases-view .ledger-controls{align-items:end}#purchases-view .period-picker select,#purchases-view .ledger-controls .search{height:40px;min-height:40px;box-sizing:border-box}#purchases-view .ledger-controls .search input{height:100%;min-height:0;margin:0}
.history-opening-toggle{display:flex;align-items:center;gap:7px;margin-top:10px}.history-opening-toggle input{width:15px;height:15px;margin:0}#history-sort{margin-top:8px}

.purchase-register-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}
.stock-material-field{min-width:0}.stock-material-field select,.stock-material-field input{height:42px;min-height:42px}.stock-material-field input:not([hidden]){margin-top:8px}

.purchase-current-stock{min-height:45px;margin-bottom:9px;white-space:nowrap;font-size:15px}.purchase-table th:nth-child(5){width:9%}

#misc-stock-dialog{width:800px;max-width:calc(100vw - 28px)}#misc-stock-dialog input,#misc-stock-dialog select{height:42px;min-height:42px}#misc-stock-dialog .dialog-footer{z-index:10}.misc-stock-table{width:100%;table-layout:fixed;min-width:750px}.misc-stock-table th:nth-child(1){width:26%}.misc-stock-table th:nth-child(2){width:13%}.misc-stock-table th:nth-child(3){width:18%}.misc-stock-table th:nth-child(4){width:19%}.misc-stock-table th:nth-child(5){width:11%}.misc-stock-table td{padding:14px 12px;overflow-wrap:anywhere}.misc-stock-table td:nth-child(5){text-align:right}#misc-stock-view .period-picker select,#misc-stock-view .ledger-controls .search{height:40px;min-height:40px}#misc-stock-view .ledger-controls{align-items:end}
