*{box-sizing:border-box}body{margin:0;background:#f3f5f8;color:#233044;font:15px system-ui,-apple-system,sans-serif}header{background:#192638;padding:20px 5%;display:flex;align-items:center;justify-content:space-between;color:white;gap:15px}.brand{color:white;font-weight:800;letter-spacing:2px;font-size:22px;text-decoration:none}.brand small{display:block;font-size:9px;letter-spacing:3px;color:#9facbd}nav{display:flex;align-items:center;gap:20px}nav a{color:white;text-decoration:none}nav form{margin:0}main{max-width:1150px;margin:30px auto;padding:0 20px}h1{font-size:30px;margin:0 0 25px}h2{font-size:19px;margin:0 0 20px}h3{font-size:15px}.card{background:white;border:1px solid #e0e5ec;border-radius:14px;padding:25px;margin-bottom:20px}.narrow{max-width:500px;margin:45px auto}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}label{display:block;font-weight:650;font-size:13px;color:#536075;margin-bottom:15px}input,select,textarea{display:block;width:100%;padding:11px 12px;margin-top:7px;border:1px solid #cbd3df;border-radius:7px;font:15px system-ui;color:#192638;background:white}input:focus,select:focus,textarea:focus{outline:2px solid #169f94}input:disabled{background:#edf0f4}input[type=file]{font-size:12px}textarea{min-height:80px;resize:vertical}button,.button{display:inline-block;background:#126f69;color:white;border:0;padding:12px 19px;border-radius:7px;font-weight:700;font-size:14px;text-decoration:none;cursor:pointer}button:disabled{opacity:.6}.secondary{background:#e9edf3;color:#293950}.ghost{background:transparent;color:white;padding:0}a{color:#126f69}.actions{display:flex;align-items:center;gap:20px;margin-bottom:22px}.search{display:flex;align-items:center;gap:14px;margin:20px 0}.search input{margin:0;max-width:480px}.hint,small{font-size:12px;color:#718096;line-height:1.5}.error{padding:16px;background:#fff0ef;border-left:4px solid #b53a32;color:#8e2621}.success{padding:16px;background:#e3f5ef;color:#126b51;margin-bottom:20px}.pre{white-space:pre-wrap;overflow-wrap:anywhere}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px;border-bottom:1px solid #e8ecf2}th{color:#6b788b;font-size:12px}td{font-size:14px}.table-wrap{overflow-x:auto}.attachments{display:flex;flex-wrap:wrap;gap:15px}.attachment{padding:13px;background:#f5f7fa;border-radius:8px;max-width:280px;overflow-wrap:anywhere}.attachment small,.attachment a{display:block;margin:5px 0}.attachment img{max-width:240px;max-height:200px;object-fit:contain}.other[hidden]{display:none}footer{text-align:center;padding:30px;font-size:12px;color:#788497}@media(max-width:800px){.grid{grid-template-columns:1fr 1fr}header{align-items:flex-start}nav{gap:12px;font-size:12px}.brand{font-size:17px}}@media(max-width:500px){.grid{grid-template-columns:1fr}.card{padding:18px}main{padding:0 12px}h1{font-size:24px}.search{flex-wrap:wrap}header{flex-direction:column}}@media print{header nav,.actions,.search,footer{display:none}body{background:white}.card{break-inside:avoid;border-radius:0}main{max-width:100%;margin:0}.attachment img{max-height:160px}}

/* Ficha visual de pedido */
.order-sheet{background:#fff;border:1px solid #d9e1e8;border-radius:14px;overflow:hidden}
.sheet-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:28px 30px;border-bottom:3px solid #126f69}
.eyebrow{display:block;font-size:11px;font-weight:750;letter-spacing:1.4px;color:#536075}
.sheet-heading h2{font-size:28px;margin:8px 0 4px}.sheet-heading p{margin:0;font-size:19px;font-weight:750}
.delivery{text-align:center;background:#edf7f4;padding:15px 22px;border:1px solid #b7d5ce;border-radius:8px}.delivery span{display:block;font-size:10px;letter-spacing:1px;font-weight:750}.delivery strong{display:block;font-size:23px;margin-top:6px}
.order-info{display:grid;grid-template-columns:1.4fr 1fr;gap:25px;padding:24px 30px}
.client-info{display:flex;flex-direction:column;align-items:flex-start;gap:7px;overflow-wrap:anywhere}.client-info>strong{font-size:24px}.client-info>span:not(.eyebrow){font-size:12px;color:#536075;margin-top:8px}.client-info>b{font-size:17px}
.order-info dl{margin:0}.order-info dl>div{display:flex;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid #e4e9ee}.order-info dt{color:#536075;font-size:13px}.order-info dd{margin:0;font-weight:750}
.order-note,.instructions{background:#f5f7f9;border-left:3px solid #126f69;padding:13px 16px;margin:0 30px 22px;font-size:14px}.order-note p,.instructions p{margin:7px 0 0;line-height:1.5}
.work-product{margin:0 30px 24px;border:1px solid #d5dde6;border-radius:10px;overflow:hidden}
.product-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#f0f4f7;padding:17px 20px}.product-heading h2{font-size:21px;margin:7px 0 0;overflow-wrap:anywhere}
.piece-count{min-width:76px;text-align:center;border-left:1px solid #cad6de;padding-left:18px}.piece-count strong{display:block;font-size:30px;line-height:1.1}.piece-count span{font-size:12px}
.specs{display:grid;grid-template-columns:.7fr 1fr 1.2fr;gap:18px;padding:18px 20px;border-bottom:1px solid #e1e7ed}.specs span{display:block;font-size:11px;color:#536075;margin-bottom:6px}.specs strong{font-size:14px;overflow-wrap:anywhere}
.instructions{margin:16px 20px 0}
.visual-files{display:grid;grid-template-columns:1.4fr 1fr;gap:24px;padding:20px}.visual-files h3{font-size:13px;margin:0 0 12px;color:#536075}
.mockup-panel figure{margin:0 0 15px}.mockup-panel img{display:block;width:100%;height:260px;object-fit:contain;background:white}.mockup-panel figcaption{font-size:10px;margin-top:8px;overflow-wrap:anywhere}
.file-row{display:flex;align-items:flex-start;gap:10px;padding:12px 0;border-bottom:1px solid #e1e7ed;break-inside:avoid}.file-row a{font-size:13px;overflow-wrap:anywhere}.file-row small{display:block;font-size:10px;margin-top:5px}.file-number{background:#edf2f6;border:1px solid #d5dde6;border-radius:4px;padding:4px 7px;font-size:11px}.file-row>div{min-width:0}
.sheet-end{text-align:center;border-top:1px solid #e1e7ed;padding:12px;font-size:10px;color:#536075}
@media(max-width:600px){.sheet-heading{padding:20px;align-items:flex-start;flex-direction:column}.order-info{grid-template-columns:1fr;padding:20px}.work-product{margin:0 12px 20px}.order-note{margin:0 12px 20px}.visual-files{grid-template-columns:1fr}.specs{grid-template-columns:1fr 1fr}.delivery strong{font-size:20px}}
@media print{
@page{size:A4;margin:12mm}
body{font-size:11pt;color:#192638}header,main>h1,.success{display:none}main{padding:0;margin:0;width:100%}
.order-sheet{border:0;border-radius:0}.sheet-heading{padding:0 0 5mm;flex-direction:row;align-items:center;break-inside:avoid}.sheet-heading h2{font-size:23pt}.sheet-heading p{font-size:15pt}.delivery{padding:3mm 5mm}.delivery strong{font-size:18pt}
.order-info{grid-template-columns:1.4fr 1fr;padding:5mm 0;break-inside:avoid}.client-info>strong{font-size:18pt}.order-note{margin:0 0 5mm;break-inside:avoid}
.work-product{margin:0 0 5mm;border-radius:0;break-inside:auto}.product-heading{padding:4mm;break-inside:avoid;break-after:avoid}.product-heading h2{font-size:16pt}.specs{grid-template-columns:.7fr 1fr 1.2fr;padding:4mm;break-inside:avoid;break-after:avoid}
.instructions{margin:3mm 4mm 0;break-inside:avoid}.visual-files{grid-template-columns:1.4fr 1fr;gap:5mm;padding:4mm}.mockup-panel figure{break-inside:avoid}.mockup-panel img{height:58mm;width:100%;max-height:none}.mockup-panel figcaption{font-size:8pt}.file-row a{font-size:9pt}.sheet-end{font-size:8pt}
}

/* Revisión 2: legibilidad y contención de imágenes */
.order-sheet{box-shadow:0 6px 24px #19263808}
.sheet-heading{background:#fff}.sheet-heading h2{font-weight:800}
.visual-files{align-items:start}.mockup-panel{min-width:0}.mockup-panel figure{border:1px solid #e1e7ed;padding:12px;border-radius:6px}
.mockup-panel img{max-width:100%;width:100%;height:280px;object-fit:contain}
.mockup-panel figcaption{line-height:1.5}.production-panel{min-width:0}
@media print{
.order-sheet{box-shadow:none}.sheet-heading{border-bottom:2pt solid #192638}
.delivery{background:white;border:1.5pt solid #126f69}
.product-heading{background:white;border-bottom:1pt solid #d5dde6}
.work-product{break-inside:avoid-page}.mockup-panel img{width:100%;max-width:100%;height:62mm;max-height:62mm;object-fit:contain}
.visual-files{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
.mockup-panel figure{margin:0 0 3mm;padding:2mm;break-inside:avoid}
.specs strong{font-size:10pt}.specs span{font-size:8pt}
.order-info dt{font-size:10pt}.order-info dd{font-size:11pt}
.instructions,.order-note{background:white;border:1px solid #d5dde6;border-left:3px solid #126f69}
}
