/* FAC OPS RC189 · capa de pulido UX no invasiva */
:root{--fac-ux-red:#8b0f26;--fac-ux-ink:#17202a;--fac-ux-soft:#f7f8fa;--fac-ux-border:#e4e8ed}
html{scroll-behavior:smooth}
body.fac-ux-ready .panel.active,body.fac-ux-ready .service-modal:not(.hidden) .service-modal-card{animation:facUxIn .24s cubic-bezier(.2,.8,.2,1)}
@keyframes facUxIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
button,a,input,select,textarea,[role="button"]{transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease,background-color .18s ease,opacity .18s ease}
button:not(:disabled):active,[role="button"]:not([aria-disabled="true"]):active{transform:scale(.975)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(139,15,38,.18)!important;outline-offset:2px}
table tbody tr{transition:background-color .16s ease,box-shadow .16s ease}
table tbody tr:hover{background:#fffafb!important;box-shadow:inset 3px 0 0 rgba(139,15,38,.35)}
.fac-ux-toast-stack{position:fixed;right:22px;bottom:22px;z-index:2147483000;display:flex;flex-direction:column;gap:10px;pointer-events:none;max-width:min(420px,calc(100vw - 28px))}
.fac-ux-toast{pointer-events:auto;background:#fff;color:var(--fac-ux-ink);border:1px solid var(--fac-ux-border);border-radius:16px;box-shadow:0 18px 50px rgba(27,35,45,.18);padding:13px 15px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;animation:facToastIn .22s ease;overflow:hidden;position:relative}
.fac-ux-toast::after{content:"";position:absolute;left:0;bottom:0;height:3px;width:100%;background:var(--fac-ux-red);animation:facToastLife var(--fac-toast-ms,4200ms) linear forwards}
.fac-ux-toast.success .fac-ux-toast-icon{background:#eaf7ef;color:#167844}.fac-ux-toast.error .fac-ux-toast-icon{background:#fff0f2;color:#b4233c}.fac-ux-toast.warning .fac-ux-toast-icon{background:#fff6e5;color:#9a6200}
.fac-ux-toast-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#f2f4f7;font-weight:900}.fac-ux-toast-title{font-weight:900;font-size:13px}.fac-ux-toast-msg{font-size:12px;color:#59636f;margin-top:2px}.fac-ux-toast button{border:0;background:transparent;font-size:18px;color:#8a929b;cursor:pointer}
@keyframes facToastIn{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}@keyframes facToastLife{to{width:0}}
.fac-ux-loader{position:fixed;inset:0;z-index:2147482000;background:rgba(250,251,252,.58);backdrop-filter:blur(2px);display:none;align-items:center;justify-content:center}.fac-ux-loader.show{display:flex}.fac-ux-loader-card{background:#fff;border:1px solid var(--fac-ux-border);border-radius:18px;padding:16px 20px;display:flex;align-items:center;gap:12px;box-shadow:0 20px 60px rgba(24,34,45,.16);font-weight:850;color:#303943}.fac-ux-spinner{width:22px;height:22px;border:3px solid #eadde1;border-top-color:var(--fac-ux-red);border-radius:50%;animation:facSpin .7s linear infinite}@keyframes facSpin{to{transform:rotate(360deg)}}
.fac-ux-history-btn{width:42px;height:42px;border-radius:13px;border:1px solid var(--fac-ux-border);background:#fff;cursor:pointer;font-size:18px;box-shadow:0 5px 14px rgba(20,28,36,.07)}.fac-ux-history-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(20,28,36,.12)}
.fac-ux-drawer{position:fixed;right:0;top:0;bottom:0;width:min(480px,94vw);z-index:2147483100;background:#fff;box-shadow:-18px 0 55px rgba(20,28,36,.2);transform:translateX(105%);transition:transform .24s ease;display:flex;flex-direction:column}.fac-ux-drawer.open{transform:none}.fac-ux-drawer-head{padding:22px;border-bottom:1px solid var(--fac-ux-border);display:flex;justify-content:space-between;align-items:center}.fac-ux-drawer-head h3{margin:0;font-size:19px}.fac-ux-drawer-close{border:0;background:#f3f5f7;width:36px;height:36px;border-radius:11px;font-size:21px;cursor:pointer}.fac-ux-drawer-body{overflow:auto;padding:14px 18px 28px}.fac-ux-audit{padding:13px 4px;border-bottom:1px solid #edf0f3}.fac-ux-audit-top{display:flex;justify-content:space-between;gap:12px;font-size:12px}.fac-ux-audit-action{font-weight:900;color:#242d37}.fac-ux-audit-time{color:#7b858f;white-space:nowrap}.fac-ux-audit-meta{font-size:12px;color:#606a75;margin-top:5px;line-height:1.45}.fac-ux-empty{text-align:center;padding:48px 18px;color:#7a8490}
.fac-ux-undo{border:0!important;background:var(--fac-ux-red)!important;color:#fff!important;border-radius:10px!important;padding:8px 10px!important;font-weight:850!important;font-size:12px!important}
.fac-ux-saving{position:relative;pointer-events:none;opacity:.78}.fac-ux-saving::after{content:"";display:inline-block;width:13px;height:13px;margin-left:8px;vertical-align:-2px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:facSpin .65s linear infinite}
@media(max-width:760px){.fac-ux-toast-stack{right:14px;bottom:14px;left:14px;max-width:none}.fac-ux-toast{width:auto}.fac-ux-history-btn{width:40px;height:40px}.fac-ux-loader-card{margin:18px}.top-actions{gap:7px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
