/* Scheduled actions: scoped to the approved dialogs and internal timeline cards. */
.action-form-dialog,.actions-history-dialog,.actions-automation{--primary:var(--theme-accent,#275b8e);--primary-soft:var(--theme-soft,#edf4fc);--border:var(--line,#dfe7f0)}
.action-form-dialog{width:min(610px,calc(100vw - 24px));max-width:610px;max-height:calc(100dvh - 24px);padding:0}
.action-form-dialog .modal-card{width:auto;max-height:calc(100dvh - 24px);overflow-y:auto;padding:20px;gap:12px;display:flex;flex-direction:column}
.actions-kicker{font-size:10px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:var(--primary,#275b8e);margin-bottom:4px}
.action-form-dialog .modal-head{margin:0;align-items:flex-start}
.action-form-dialog .modal-head h3{margin:0;font-size:19px}
.actions-subtitle{font-size:12px;color:var(--muted);margin:5px 0 0;line-height:1.5}
.actions-context{display:flex;gap:10px;align-items:center;background:var(--surface-soft,#f2f6fb);border:1px solid var(--border);padding:9px 12px;border-radius:10px;font-size:12px}
.actions-context strong{display:block;color:var(--text)}
.actions-context .avatar{width:32px;height:32px;font-size:12px}
.actions-fields{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:10px}
.actions-fields input,.actions-fields select{min-width:0;width:100%}
.actions-text-fields{display:grid;gap:12px}
.actions-text-fields.split{grid-template-columns:1fr 1fr;align-items:start}
.actions-text-fields.split textarea{min-height:80px}
.action-form-dialog label{font-size:12px;gap:5px;margin:0}
.action-form-dialog input,.action-form-dialog select{height:36px;min-height:36px;padding:6px 10px}
.action-form-dialog textarea{min-height:62px;resize:vertical;padding:9px 10px;font-size:12px}
.actions-options{margin:0;padding:0;border:0;display:grid;gap:6px}
.actions-options legend{font-size:12px;font-weight:700;margin-bottom:6px}
.actions-options .action-option{display:grid;grid-template-columns:17px 1fr;gap:9px;padding:9px 11px;border:1px solid var(--border);border-radius:10px;background:#fff;cursor:pointer}
.actions-options .action-option:has(input:checked){border-color:var(--primary,#275b8e);background:var(--primary-soft,#edf4fc)}
.action-option input{width:16px!important;height:16px!important;min-height:16px!important;margin:1px 0 0;accent-color:var(--primary)}
.action-option strong{display:block;font-size:12px;line-height:1.4;color:var(--text)}
.action-option small{display:block;font-size:11px;line-height:1.45;font-weight:400;color:#566a80;margin-top:3px}
.actions-help{font-size:11px;color:var(--muted);font-weight:400}
.actions-local-only{font-size:10px;color:#7c6a47;margin:0;line-height:1.4}
.action-form-dialog .modal-actions{margin:0;display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:4px}
.action-form-dialog .modal-actions .actions-local-only{max-width:300px}
.actions-history-dialog{width:min(860px,calc(100vw - 24px));max-width:860px;padding:0;max-height:calc(100dvh - 24px)}
.actions-history-dialog .modal-card{width:auto;max-height:calc(100dvh - 24px);overflow:auto;padding:22px;gap:6px}
.actions-history-dialog .modal-head{align-items:flex-start}
.actions-history-summary{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:0 0 14px;border-bottom:1px solid var(--border);font-size:11px;color:var(--muted)}
.actions-failure-count{border-radius:99px;padding:4px 9px;background:#fff0f0;color:#a63f4d;white-space:nowrap;font-size:11px;font-weight:600}
.actions-top-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;background:#fce2e2;color:#8e2535;border-radius:10px;font-size:10px;margin-left:3px;font-weight:700}
.actions-record{padding:10px 0;border-bottom:1px solid var(--border)}
.actions-record-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:13px}
.actions-type{font-size:12px;color:var(--text);margin:5px 0}
.actions-meta{font-size:11px;color:var(--muted);line-height:1.6}
.actions-state{display:inline-block;white-space:nowrap;padding:3px 9px;border-radius:20px;font-size:10px;font-weight:700;background:#edf2f8;color:#426286}
.actions-state.realizada{background:#e9f4ed;color:#336648}.actions-state.concluida{background:#18713f;color:#fff}.actions-state.falhou{background:#fff0f0;color:#a63f4d}
.actions-state.cancelada{background:#111;color:#fff}.actions-state.pendente{background:#1261c9;color:#fff}
.actions-reason{font-size:11px;color:#994453;margin-top:6px;line-height:1.5}
.actions-record details{margin-top:8px;font-size:12px}
.actions-record summary{cursor:pointer;color:var(--primary);font-size:11px;font-weight:600;width:fit-content}
.actions-details{background:#f6f8fc;border-radius:9px;padding:11px 13px;margin-top:8px;font-size:12px;line-height:1.6}
.actions-details p{margin:5px 0 10px;white-space:pre-wrap}
.actions-row-actions{display:flex;gap:8px;align-items:center;margin-top:9px;flex-wrap:wrap}
.actions-row-actions .btn{font-size:11px;min-height:31px;padding:6px 10px}
.actions-return-card{max-width:570px;align-self:center;width:calc(100% - 28px);margin:18px auto;padding:16px;background:#fffdf5;border:1px solid #e9dcae;border-left:3px solid #c0a154;border-radius:12px;color:#514b35;box-shadow:0 3px 12px #1d385509}
.actions-return-card header{display:flex;gap:10px;align-items:center;font-size:13px;font-weight:700}
.actions-return-card p{font-size:13px;line-height:1.65;margin:12px 0 8px}
.actions-return-card small{font-size:10px;color:#82765c}
.actions-return-card .actions-row-actions{border-top:1px solid #eee5cd;padding-top:10px;margin-top:13px}
.actions-return-card .btn{background:#fffdf7;border:1px solid #dcd1ad;color:#615134}
.actions-return-card .btn.primary{background:#7c6738;color:#fff}
.actions-bell{color:#ea580c;display:inline-flex;align-items:center;gap:3px;font-size:10px;margin-right:4px}
.actions-bell svg,.actions-return-card svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;flex-shrink:0}
.actions-bell svg{fill:currentColor;stroke:none}
.actions-automation{display:flex;align-items:center;justify-content:center;background:var(--bg);height:calc(100dvh - 64px);text-align:center;padding:24px}
.actions-automation-content{max-width:520px}
.actions-automation-icon{margin:0 auto 20px;border-radius:24px;background:var(--primary-soft,#edf4fc);border:1px solid #d7e4f3;width:84px;height:84px;display:grid;place-items:center;color:var(--primary)}
.actions-automation-icon svg{width:38px;height:38px;fill:none;stroke:currentColor;stroke-width:1.5}
.actions-automation h1{font-size:24px;color:var(--text);line-height:1.4;margin:0}
[data-app-view="automation"] .nav-icon{color:inherit}
@media(max-width:760px){
 .topbar #scheduledBtn{display:flex!important;padding:5px;min-height:34px;gap:2px;font-size:16px}
 .topbar #scheduledBtn>span{display:none}
 .topbar .topbar-connection-select{width:106px;max-width:106px}
 .topbar .top-actions{gap:3px}
 .action-form-dialog .modal-card,.actions-history-dialog .modal-card{padding:16px}
 .action-form-dialog{width:calc(100vw - 16px)}
 .action-form-dialog .modal-card{gap:10px}
 .action-option small{font-size:10.5px}
 .actions-fields{gap:8px;grid-template-columns:1fr 1fr}
 .actions-fields .full{grid-column:1/-1}
 .actions-text-fields.split{grid-template-columns:1fr}
 .actions-history-summary{flex-direction:column;align-items:flex-start}
 .actions-record-heading{align-items:flex-start}
 .actions-return-card{width:calc(100% - 12px);padding:13px;margin:12px auto}
 .actions-return-card p{font-size:12px}
 .actions-return-card .actions-row-actions{gap:6px}
 .actions-return-card .btn{font-size:10px;padding:7px 8px;min-height:36px}
 .actions-automation{margin-left:0;height:calc(100dvh - 100px)}
 .actions-automation h1{font-size:21px}
}
