.operation.automations-operation { display:block; text-align:left; padding:clamp(1rem,3vw,2.5rem); min-width:0 }
.automations-operation .secondary-action,.automation-preview .secondary-action { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; min-height:2.75rem; padding:.65rem 1rem; border:1px solid var(--color-border); border-radius:var(--radius-control); background:var(--color-surface-muted); color:var(--color-text); font:inherit; font-weight:700; cursor:pointer }
.automations-operation .secondary-action:hover,.automation-preview .secondary-action:hover { border-color:var(--color-brand); color:var(--color-brand) }
.automations-operation button:disabled,.automation-preview button:disabled { opacity:.55; cursor:default }
.automations-heading { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; margin-bottom:1.5rem }
.automations-heading h1 { font-size:clamp(1.6rem,3vw,2.2rem); margin:.25rem 0 }
.automations-heading p,.automation-card p,.automation-hint { color:var(--color-text-muted); line-height:1.6 }
.automations-tabs { display:flex; gap:.5rem; flex-wrap:wrap }
.automations-tabs button[aria-pressed="true"] { color:var(--color-brand); border-color:var(--color-brand); background:var(--color-surface-muted) }
.automation-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr)); gap:1rem }
.automation-card { display:flex; flex-direction:column; gap:.65rem; border:1px solid var(--color-border); border-radius:var(--radius-panel); padding:1.3rem; background:var(--color-surface) }
.automation-card h2 { margin:0; font-size:1.12rem; line-height:1.4 }
.automation-card p { margin:0 0 .5rem; font-size:.94rem; flex:1 }
.automation-tag { align-self:flex-start; color:var(--color-brand); background:var(--color-surface-muted); border-radius:2rem; padding:.3rem .65rem; font-size:.78rem; font-weight:700 }
.automation-card[data-risk="true"] .automation-tag { color:#9a3412; background:#fff1e8 }
.automation-form { display:grid; gap:1.2rem; max-width:60rem }
.automation-form textarea { min-height:6rem; width:100%; resize:vertical; border:1px solid var(--color-border); border-radius:var(--radius-control); padding:.8rem; font:inherit; background:var(--color-surface); color:inherit }
.automation-form .field { margin:0 }
.automation-split { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap:1rem }
.automation-quantity { border:1px solid var(--color-border); background:var(--color-surface-muted); border-radius:var(--radius-panel); padding:1rem }
.automation-quantity strong { display:block; margin:.35rem 0; font-size:1.7rem }
.automation-quantity small { color:var(--color-text-muted) }
.automation-quantity.is-annulled { border-color:#e8bdb2; background:#fff7f4 }
.automation-toolbar { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; margin:1rem 0 }
.automation-message { margin:1rem 0; padding:1rem; border-radius:var(--radius-control); background:var(--color-surface-muted); line-height:1.5; overflow-wrap:anywhere }
.automation-message[data-error="true"] { color:#9f1239; background:#fff1f2 }
.automation-result { display:grid; gap:.75rem; margin:0 }
.automation-result div { display:grid; grid-template-columns:minmax(8rem,1fr) 2fr; gap:1rem; padding:.6rem 0; border-bottom:1px solid var(--color-border) }
.automation-result dt { color:var(--color-text-muted); font-size:.9rem }
.automation-result dd { margin:0; overflow-wrap:anywhere }
.automation-preview { width:min(70rem,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); padding:0; border:1px solid var(--color-border); border-radius:var(--radius-panel) }
.automation-preview .operation-dialog-shell { display:flex; flex-direction:column; max-height:calc(100dvh - 2rem) }
.automation-preview header,.automation-preview footer { flex:none; padding:1.3rem 1.5rem; background:var(--color-surface); margin:0; display:flex; gap:1rem; align-items:center; justify-content:space-between; flex-wrap:wrap }
.automation-preview header { border-bottom:1px solid var(--color-border) }
.automation-preview h2 { margin:0; font-size:1.3rem }
.automation-preview header p { color:var(--color-text-muted); font-size:.9rem; margin:.4rem 0 0 }
.automation-preview header b { color:var(--color-text) }
.automation-preview .operation-dialog-body { overflow:auto; min-height:0; padding:1.5rem; display:grid; gap:1rem }
.automation-preview footer { border-top:1px solid var(--color-border) }
.automation-preview footer { justify-content:flex-end }
.automation-preview footer .field { margin:0; min-width:12rem; flex:1 }
.automation-preview footer .field input { width:100% }
.automation-preview pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:.9rem; margin:0 }
.automation-preview::backdrop { background:#15223b88; backdrop-filter:blur(3px) }
.automation-pager { display:flex; align-items:center; justify-content:flex-end; gap:1rem; margin-top:1rem; flex-wrap:wrap }
.automation-preview button,.automation-form button,.automation-card button { white-space:normal }
@media(max-width:600px) { .automation-preview header,.automation-preview footer,.automation-preview .operation-dialog-body { padding:1rem } .automation-preview footer { align-items:stretch } .automation-preview footer .field { flex-basis:100% } .automation-result div { grid-template-columns:1fr; gap:.2rem } .automation-preview { width:calc(100vw - 1rem); max-height:calc(100dvh - 1rem) } }

.automations-operation #automation-content.automation-resources { width:100%; max-width:none; min-width:0; margin-inline:0; }
.automation-resource { display:grid; gap:1rem; }
.automation-resource > button { justify-self:start; }
.automation-resource h2,.automation-resource p { margin:0; }

.dynamicore-fields {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:1rem}
.dynamicore-alta fieldset {border:1px solid var(--color-border);border-radius:var(--radius-panel);padding:1.2rem;min-width:0}
.dynamicore-alta input {width:100%;min-width:0}
.dynamicore-alta form {margin-block:1rem}
.dynamicore-dialog pre {background:var(--color-surface-muted);padding:1rem;border-radius:var(--radius-control);font-family:ui-monospace,monospace;font-size:.85rem;white-space:pre-wrap;overflow-wrap:anywhere}
.automation-correction-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(18rem,.9fr);gap:1.5rem;align-items:start}
.automation-correction-layout pacc-selection-context[hidden]{display:none}
.automation-correction-layout .automation-form{min-width:0}
@media(max-width:900px){.automation-correction-layout{grid-template-columns:minmax(0,1fr)}}
pacc-data-table[data-payment-correction] .row-key{white-space:normal;overflow-wrap:anywhere}
@media(min-width:768px){pacc-data-table[data-payment-correction] .preview-table{table-layout:fixed}pacc-data-table[data-payment-correction] .preview-table th:first-child,pacc-data-table[data-payment-correction] .preview-table td:first-child{width:30%}pacc-data-table[data-payment-correction] .preview-table th:last-child,pacc-data-table[data-payment-correction] .preview-table td:last-child{width:40%}}
