dialog:has(.compact-item-form),dialog:has(.compact-catalog),dialog:has(.order-review),dialog:has(.order-delivery),dialog:has(#convert-form){max-width:760px;max-height:92dvh}
dialog:has(.compact-item-form) .modal-head,dialog:has(#convert-form) .modal-head{position:sticky;top:0;z-index:3;background:#fff;padding:18px 24px}
.compact-item-form,.compact-catalog,.order-review,.order-delivery,#convert-form{font-size:1rem;line-height:1.6;min-width:0}
.compact-item-form label,.compact-item-form .check,#convert-form label{font-size:.9375rem;color:#263442}
.compact-item-form :is(input,select,textarea),#convert-form :is(input,select,textarea),.order-delivery input,.compact-catalog input{font-size:1rem;min-height:44px;max-width:100%}
.compact-item-form input[type="checkbox"],#convert-form input[type="checkbox"]{min-height:20px;width:20px;flex:none}
.item-description-summary{border:1px solid #d2dce4;background:#f1f5f8;border-radius:8px;padding:12px 15px;color:#21374a;font-size:1rem;overflow-wrap:anywhere}
.item-essential{margin-top:19px;padding:18px;border:1px solid #dce2e7;border-radius:10px;background:#fff}
.item-essential h3{font-size:1rem;font-weight:700;color:#213341;margin:0 0 14px}
.item-essential [data-repair-fields]{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:14px;margin-top:15px}
.item-essential [data-repair-fields][hidden],[data-level-field][hidden]{display:none}
.compact-section{margin:15px 0;padding:0;border:1px solid #d6dfe5;border-radius:9px;background:#f8fafb;overflow:hidden}
.compact-section>summary{padding:14px 16px;font-size:.9375rem;font-weight:650;color:#223f54;cursor:pointer;line-height:1.5;list-style-position:inside}
.compact-section>summary>span{display:inline-block;margin-left:10px;color:#4f6372;font-size:.875rem;font-weight:500}
.compact-section-body{padding:0 16px 17px}
.compact-section-body .planning-fields{margin:0;padding:0;background:transparent;border:0}
.compact-section-body .planning-fields h3{display:none}
.compact-section .duration-control{margin:6px 0 14px}
.compact-section .duration-presets{gap:6px}
.compact-section .duration-presets button{padding:8px 10px;min-height:36px}
.compact-pending{background:#fff6f4;border-color:#d5a09a}
.compact-pending>summary,.compact-pending>summary>span{color:#7e3029}
.compact-item-form .item-final-confirm{position:sticky;bottom:-25px;margin:20px -25px -25px;padding:16px 25px 22px;background:#fff;border-top:1px solid #dce2e7;z-index:2;box-shadow:0 -8px 18px #192a3610}
.item-final-confirm .check{margin:0 0 14px}
.item-final-confirm .actions{flex-wrap:wrap}
.item-final-confirm button{font-size:.9375rem;white-space:normal;min-height:44px}
.compact-catalog>p{margin:0 0 18px;color:#3f5362}
.compact-catalog .field{margin-bottom:14px}
.staff-catalog-group{margin:9px 0;padding:0;border:1px solid #d3dde4;border-radius:9px;overflow:hidden;background:#fff}
.staff-catalog-group summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;font-size:1rem;font-weight:650;color:#233d51;cursor:pointer;background:#f3f6f8;list-style:none}
.staff-catalog-group summary:after{content:'+';color:#456277;font-size:1.25rem}
.staff-catalog-group[open] summary:after{content:'−'}
.staff-catalog-group summary>span{flex:1}
.staff-catalog-group small{font-size:.875rem;font-weight:500;color:#526878}
.staff-catalog-group summary::-webkit-details-marker{display:none}
.staff-catalog-group>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:9px;gap:7px}
.staff-catalog-service{display:flex;min-height:48px;width:100%;padding:11px 12px;white-space:normal;text-align:left;justify-content:flex-start;font-size:.9375rem;line-height:1.5;border-color:#dce3e8;background:#fff;color:#253c4e}
.staff-catalog-service:hover{background:#fff8cd;border-color:#beab42}
.catalog-empty{padding:18px;background:#f1f5f8;border-radius:8px}
.order-choice{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}
.order-choice button{white-space:normal;min-height:58px;padding:15px;font-size:1rem}
.order-review>.help,#convert-form>.help,.order-delivery>.help{font-size:.875rem;color:#4f5e6b;line-height:1.65}
.order-source-note,.order-revision-note{margin:0 0 22px;padding:17px;border:1px solid #b9cfbf;background:#f0f7f2;color:#254432;border-radius:9px;font-size:1rem;line-height:1.6}
.order-source-note span{display:block;margin-top:5px;font-size:.9375rem}
.order-revision-note{margin:16px 0;background:#f1f5f9;border-color:#c0d0de;color:#253e51}
.order-revision-note p{margin:8px 0 14px}
.order-document-tools{margin:16px 0}
.document-quick-actions{display:flex;flex-wrap:wrap;gap:7px;min-width:145px;max-width:240px}
.document-quick-actions button{min-height:38px;font-size:.875rem}
.document-header-quick{display:inline-flex;flex-wrap:wrap;gap:9px}
.document-header-quick button{min-height:44px;font-size:.9375rem}
#planning-save-recovery{margin:0;border-radius:0;position:relative;z-index:40;font-size:1rem}
#planning-save-recovery .actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}
.modal-footer{flex-wrap:wrap}
dialog:has(.document-preview){max-width:1000px;max-height:94dvh}
dialog:has(.document-preview) .modal-head{position:sticky;top:0;z-index:4;background:#fff}
dialog:has(.document-preview) .modal-footer{position:sticky;bottom:0;z-index:4;background:#f8fafb;box-shadow:0 -5px 14px #192a3610}
dialog:has(.document-preview) .modal-footer button{font-size:.9375rem;min-height:44px}
.document-preview{max-height:56dvh!important}
.preview-save-note{margin-top:0}
#save-failure{background:#fff3f1;border-bottom:2px solid #b45147;color:#672e29}
#save-failure button{font-size:.9375rem;min-height:44px;margin:5px 6px 0 0;white-space:normal}
#save-failure .help{font-size:.875rem;color:#753e36}
@media(max-width:680px){dialog:has(.document-preview){width:calc(100% - 16px)}dialog:has(.document-preview) .modal-footer{justify-content:stretch}dialog:has(.document-preview) .modal-footer button{flex:1;white-space:normal}.document-preview{max-height:52dvh!important}}
.order-document-tools button{font-size:.9375rem;min-height:44px}
.order-whatsapp-choice{margin:20px 0;padding:15px;background:#eff7f2;border:1px solid #bdd2c3;border-radius:8px}
.order-form-final{border-top:1px solid #dce2e7;margin-top:20px;padding-top:18px;display:flex;justify-content:flex-end}
.order-form-final button{min-height:48px;font-size:1rem;white-space:normal}
.order-delivery .actions{margin:20px 0;flex-wrap:wrap}
.order-delivery button{font-size:.9375rem;white-space:normal;min-height:46px}
.order-message-preview{font-size:.9375rem;color:#243b4d;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px;background:#fff;border-radius:8px;border:1px solid #d8e1e7;margin-bottom:13px}
.form-action-error{margin-top:0}
.form-action-error strong{display:block;font-size:1rem}
.form-action-error button{margin-top:13px;font-size:.9375rem}
@media(max-width:680px){dialog:has(.compact-item-form),dialog:has(.compact-catalog),dialog:has(.order-review),dialog:has(.order-delivery),dialog:has(#convert-form){width:calc(100% - 16px);max-height:94dvh;border-radius:12px}dialog:has(.compact-item-form) .modal-body,dialog:has(#convert-form) .modal-body{padding:18px}dialog:has(.compact-item-form) .modal-head,dialog:has(#convert-form) .modal-head{padding:15px 18px}.compact-item-form .form-grid,#convert-form .form-grid{grid-template-columns:1fr;gap:14px}.compact-item-form .span-2{grid-column:auto}.item-essential{padding:15px}.item-essential [data-repair-fields]{grid-template-columns:1fr;gap:13px}.compact-item-form .item-final-confirm{margin:18px -18px -18px;padding:15px 18px 20px;bottom:-18px}.item-final-confirm .actions>*{flex:1;min-width:150px}.staff-catalog-group>div{grid-template-columns:1fr}.order-choice{grid-template-columns:1fr}.order-form-final button{width:100%}.order-delivery .actions>*{flex:1;min-width:170px}.compact-section>summary{padding:13px}.compact-section-body{padding:0 13px 15px}}
@media(prefers-reduced-motion:reduce){dialog:has(.compact-item-form) *,dialog:has(#convert-form) *{scroll-behavior:auto!important}}
@media print{.order-document-tools,.order-revision-note,.form-action-error{display:none!important}}
@media(max-width:680px){.topbar{flex-wrap:wrap;gap:10px;height:auto;align-items:flex-start}.topbar>.actions{flex:1 1 100%}.top-actions{width:100%;min-width:0;gap:8px;justify-content:space-between;flex-wrap:wrap}.top-actions .operator-picker{min-width:0;max-width:100%}.document-header-quick{width:100%}.document-header-quick button{flex:1}.tabs{max-width:100%;min-width:0;overflow-x:auto}body:has(dialog[open]){overflow:hidden}}
.panel-notices{margin:20px 36px 0;min-width:0}
.panel-notices:not(:has(> :not([hidden]))){display:none}
#panel-notices .save-failure,#panel-notices #planning-save-recovery{position:static;inset:auto;z-index:auto;margin:12px 0 0;border:1px solid #cb9089;border-radius:10px;padding:18px 20px;box-shadow:none}
#panel-notices [hidden],.modal-notices [hidden]{display:none!important}
.notice-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.notice-heading strong{flex:1;font-size:1rem;line-height:1.55;min-width:0}
.notice-dismiss,#save-failure .notice-dismiss{display:inline-flex;position:static;flex:none;align-items:center;justify-content:center;width:38px;min-height:38px;margin:0;padding:8px;border:1px solid currentColor;background:transparent;border-radius:7px;color:inherit}
.notice-dismiss .icon{width:18px;height:18px}
#toast{position:static;inset:auto;transform:none;z-index:auto;max-width:none;width:100%;display:none;opacity:1;pointer-events:auto;transition:none;box-shadow:none;margin:12px 0 0;border:1px solid #b5cdbc;background:#eef6f0;color:#284e35;padding:15px 18px;border-radius:10px;font-size:1rem;line-height:1.6}
#toast.show{display:flex;align-items:flex-start;gap:16px;justify-content:space-between}
#toast.error{background:#fff3f1;border-color:#cb9089;color:#672e29}
#toast .notice-copy{flex:1;min-width:0}
#toast p{margin:0;font-size:1rem;line-height:1.6;overflow-wrap:anywhere}
#toast .notice-copy button{margin-top:12px;font-size:.9375rem}
.modal-notices{margin-bottom:16px}
.modal-notices:empty,.modal-notices:not(:has(> :not([hidden]))){display:none}
[data-storage]{flex-wrap:wrap;gap:7px}
[data-storage] button{font-size:.875rem;min-height:36px;white-space:normal}
@media(max-width:680px){.panel-notices{margin:14px 18px 0}#panel-notices .save-failure,#panel-notices #planning-save-recovery{padding:16px}#toast{padding:14px}.notice-heading{gap:10px}}
@media(max-width:680px){.topbar .top-actions [data-storage]{display:flex;flex-basis:100%;justify-content:flex-start;order:5;padding-top:6px;font-size:.875rem}}
@media print{.panel-notices,.modal-notices{display:none!important}}

.order-contact-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.65rem}
.order-contact-row .field{margin:0}
.order-document-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.7rem}
.order-steps{display:flex;flex-wrap:wrap;gap:.4rem .7rem;list-style:none;margin:0;padding:0}
.order-steps li{padding:.3rem .55rem;border:1px solid #d9ddd4;border-radius:.4rem;font-size:.875rem}
.order-steps [aria-current]{background:#f8efac;border-color:#b6a332;color:#292406;font-weight:700}
@media(max-width:540px){.order-contact-row{grid-template-columns:1fr}.order-contact-row button{width:100%}}
