/* Aveltrim · cenários fiscais — visual unificado ao padrão de cadastros */
.fsc-dialog{box-sizing:border-box;border:1px solid var(--av-line,#dce6df);border-radius:16px;padding:0;width:min(800px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 28px);overflow:hidden;box-shadow:0 28px 80px rgba(8,26,17,.25);background:var(--av-surface,#fff);color:var(--av-ink,#182823);font:inherit}
.fsc-dialog::backdrop{background:rgba(12,23,19,.48)}
.fsc-shell{box-sizing:border-box;display:flex;flex-direction:column;max-height:calc(100dvh - 28px);min-height:180px}
.fsc-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:19px 24px;border-bottom:1px solid var(--av-line,#e3eae5);flex:none;background:#fff}
.fsc-dialog h2{font-size:19px;letter-spacing:-.022em;line-height:1.35;font-weight:750;margin:0}
.fsc-close{display:grid;place-items:center;min-width:33px!important;width:33px;height:33px;min-height:33px!important;padding:0!important;border-radius:8px;background:#fff;font-size:20px!important;font-weight:400!important;color:#506358}
.fsc-body{box-sizing:border-box;overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:20px 24px 22px;background:#fff}
.fsc-dialog button{font:inherit;font-size:12.5px;font-weight:650;cursor:pointer;min-height:36px;padding:8px 12px;border:1px solid var(--av-line,#dbe5dd);border-radius:8px;background:#fff;color:var(--av-ink,#182823);transition:background .15s ease,border-color .15s ease}
.fsc-dialog button:hover{background:#f6f9f7;border-color:#b9ccbe}
.fsc-dialog button:focus-visible,.fsc-dialog :is(input,select,textarea):focus-visible{outline:2px solid #267d42;outline-offset:2px}
.fsc-primary{background:#198238!important;color:#fff!important;border-color:#198238!important;font-weight:700!important}
.fsc-primary:hover{background:#126f2e!important;border-color:#126f2e!important}
.fsc-primary:disabled,.fsc-dialog button:disabled{opacity:.6;cursor:not-allowed}.fsc-dialog button[type="submit"]:disabled{cursor:progress}
.fsc-headline{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:17px}
.fsc-headline p,.fsc-footer-note{font-size:12.5px;color:#64776b;line-height:1.55;margin:0}.fsc-headline p{max-width:490px}
.fsc-list{display:grid;gap:10px}.fsc-item{display:grid;gap:13px;padding:15px;border:1px solid #dfe8e1;border-radius:11px}
.fsc-row,.fsc-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.fsc-row strong{display:block;font-size:14px}.fsc-row small,.fsc-actions small{display:block;color:#687b6e;font-size:11.5px;margin-top:4px}
.fsc-status{border-radius:999px;background:#eef1ef;color:#65776a;font-size:11px;padding:5px 9px;font-weight:650}.fsc-status.is-on{background:#e9f5ec;color:#19763a}
.fsc-taxes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;background:#f5f8f6;padding:12px 14px;border-radius:8px}
.fsc-taxes span{font-size:11.5px;color:#667b6d}.fsc-taxes b{display:block;color:#1d2e22;font-size:13.5px;margin-top:4px}
.fsc-actions{justify-content:flex-end}.fsc-actions small{flex:1}.fsc-footer-note{border-top:1px solid #e8eee9;padding:14px 0 2px;margin-top:16px}
.fsc-empty{padding:24px;text-align:center;border:1px dashed #d5e1d9;border-radius:10px}.fsc-empty strong{font-size:14px}.fsc-empty p{font-size:12.5px;color:#6c7b70}
.fsc-back{display:flex;gap:12px;align-items:center;margin:0 0 12px}.fsc-back button{background:#f5f8f6;white-space:nowrap}.fsc-back span{font-size:14px;font-weight:750}
.fsc-editor-caption{margin:0 0 16px;color:#637669;font-size:12.5px;line-height:1.5}
.fsc-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border:1px solid #dfe8e1;border-radius:9px;background:#f7faf8;margin:0 0 15px}
.fsc-presets span{color:#5d7062;font-size:12px;font-weight:650;margin-right:4px}
.fsc-form{display:grid;gap:15px}.fsc-section{display:grid;gap:14px;padding:16px 17px 18px;border:1px solid #e2eae4;border-radius:11px;background:#fff}
.fsc-section-title{display:grid;gap:4px}.fsc-section-title h3{margin:0;color:#193021;font-size:14px;font-weight:750}.fsc-section-title p{margin:0;color:#6c7c70;font-size:12px;line-height:1.4}
.fsc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 17px;align-items:start}
.fsc-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12.5px;font-weight:650;color:#2d4033;line-height:1.35}
.fsc-field:first-child:has([name="name"]){grid-column:1/-1}
.fsc-dialog .fsc-field :is(input,select,textarea){box-sizing:border-box;width:100%;min-width:0;margin:0!important;border:1px solid #b8cbbf!important;border-radius:9px!important;background-color:#fff!important;color:#1b2f22!important;font:inherit!important;font-size:14px!important;font-weight:450!important;line-height:1.4!important;box-shadow:none!important;transition:border-color .16s,box-shadow .16s}
.fsc-dialog .fsc-field :is(input,select){height:43px!important;min-height:43px!important;padding:9px 12px!important}
.fsc-dialog .fsc-field input::placeholder,.fsc-dialog .fsc-field textarea::placeholder{color:#8b9b90;opacity:1}
.fsc-dialog .fsc-field select{appearance:none;-webkit-appearance:none;padding-right:37px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.3l5 5 5-5' fill='none' stroke='%235e7365' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center!important;cursor:pointer}
.fsc-dialog .fsc-field :is(input,select,textarea):focus{border-color:#238c49!important;outline:0!important;box-shadow:0 0 0 3px rgba(35,140,73,.14)!important}
.fsc-dialog .fsc-field textarea{min-height:76px;padding:10px 12px!important;resize:vertical!important}
.fsc-advanced{border:1px solid #e2eae4;border-radius:10px;padding:0 16px;background:#fafdfe}
.fsc-advanced>summary{cursor:pointer;min-height:46px;display:flex;align-items:center;gap:8px;font-weight:700;font-size:12.5px;color:#2b4233;list-style:none}
.fsc-advanced>summary::-webkit-details-marker{display:none}.fsc-advanced>summary::after{content:'';width:7px;height:7px;transform:rotate(45deg);border-right:1.6px solid #66786d;border-bottom:1.6px solid #66786d;margin-left:auto;margin-top:-4px;transition:transform .18s}
.fsc-advanced[open]>summary::after{transform:rotate(225deg);margin-top:4px}
.fsc-advanced>summary span{font-weight:450;color:#778679}.fsc-advanced>.fsc-grid{margin:0 0 13px}.fsc-advanced>.fsc-field{margin-bottom:15px}
.fsc-advanced-explain{font-size:12px;line-height:1.5;color:#607165;align-self:end;padding-bottom:6px}
.fsc-editor-info{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid #e2eae4;border-radius:9px;background:#f7faf8;color:#586e5f;font-size:12px;line-height:1.55}
.fsc-info-icon{display:grid;place-items:center;border:1px solid #c9d9ce;border-radius:50%;height:17px;width:17px;min-width:17px;font-weight:700;font-size:11px;color:#237d42;margin-top:1px}
.fsc-editor-info strong{color:#2a4331}
.fsc-save{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding-top:15px;border-top:1px solid #e5ece7;margin-top:0}
.fsc-save [data-error]{margin-right:auto;color:#a42e2e;font-size:12px;line-height:1.4;max-width:50%}.fsc-dialog .fsc-error{color:#a42e2e}
.fsc-history-item{padding:12px 0;border-bottom:1px solid #e3ebe5;display:grid;gap:5px}.fsc-history-item strong{font-size:13px}.fsc-history-item span{font-size:12px;color:#667469}
.fsc-product{border:1px solid #d9e5dc;background:#f8fbf9;border-radius:9px;padding:14px;margin-bottom:14px;display:grid;gap:11px}
.fsc-product-title{display:grid;gap:3px}.fsc-product-title strong{font-size:14px}.fsc-product-title small{font-size:11.5px;color:#64776c}
.fsc-product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fsc-product-grid label{font-size:12px;display:grid;gap:5px}
.fsc-product :is(select,button){min-height:36px;border:1px solid #ceded1;background:#fff;border-radius:7px;padding:6px 10px;font:inherit;max-width:100%;width:100%;box-sizing:border-box}
.fsc-product-proof{display:flex;align-items:center;gap:8px;font-size:12px}.fsc-product-proof input{width:17px;height:17px}
.fsc-product-choice{display:flex;gap:8px}.fsc-product-choice select{flex:1;min-width:0}.fsc-product-choice button{flex:0 0 auto;width:auto;background:#187e39;color:#fff;cursor:pointer}.fsc-product-choice button:disabled{opacity:.5;cursor:not-allowed}
.fsc-product [data-info]{font-size:11px;color:#627366}
.av-product-section:has([data-fsc-product]) .av-activity-picker{display:none!important}
@media(max-width:650px){.fsc-dialog header{padding:15px 16px}.fsc-body{padding:15px 16px}.fsc-headline{align-items:stretch;flex-direction:column}.fsc-taxes{grid-template-columns:repeat(2,minmax(0,1fr))}.fsc-grid,.fsc-product-grid{grid-template-columns:minmax(0,1fr)}.fsc-section{padding:14px}.fsc-product-choice{flex-direction:column}.fsc-product-choice button{width:100%}.fsc-save{flex-wrap:wrap}.fsc-save [data-error]{flex:1 1 100%;max-width:none}.fsc-advanced>summary span{display:none}}
@media(prefers-reduced-motion:reduce){.fsc-dialog button,.fsc-dialog .fsc-field :is(input,select,textarea),.fsc-advanced>summary::after{transition:none!important}}

.fsc-lock-notice{padding:11px 13px;margin:0 0 14px;background:#fffaf0;border:1px solid #efdfbc;border-radius:9px;color:#765623;font-size:12.5px;line-height:1.5}

/* Fiscal scenarios V4 — operational form, standard Aveltrim searchable select */
.fsc-dialog.fsc-v3{width:min(720px,calc(100vw - 30px));border-radius:14px;box-shadow:0 24px 66px #071b112d}
.fsc-v3 .fsc-shell{max-height:calc(100dvh - 28px)}
.fsc-v3 header{padding:18px 24px 16px;border-bottom:1px solid #e5ebe6}
.fsc-v3 .fsc-modal-heading{display:grid;gap:3px;min-width:0}
.fsc-v3 .fsc-overline{font-size:10px;letter-spacing:.08em;color:#43825a;font-weight:700}
.fsc-v3 h2{font-size:18px;font-weight:750;line-height:1.32;letter-spacing:-.025em}
.fsc-v3 .fsc-body{padding:18px 24px 24px;scrollbar-gutter:stable;scrollbar-width:thin}
.fsc-v3 .fsc-back{display:flex;align-items:center;gap:12px;margin:0 0 9px}
.fsc-v3 .fsc-back button{min-height:32px;border:1px solid #dde6df;border-radius:7px;font-size:12px;padding:7px 10px}
.fsc-v3 .fsc-back span{font-size:13px;font-weight:700;color:#283a2d}
.fsc-v3 .fsc-editor-caption{font-size:12px;color:#6b7c70;line-height:1.55;margin:0 0 13px}
/* Simplified presets: not a second nested form */
.fsc-v3 .fsc-template-section{padding:0 0 15px;margin:0 0 16px;border:0;border-bottom:1px solid #e3ebe5;background:transparent;border-radius:0}
.fsc-v3 .fsc-template-head{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;margin-bottom:9px}
.fsc-v3 .fsc-template-head strong{font-size:12.5px;font-weight:720;color:#24382a}
.fsc-v3 .fsc-template-head span{font-size:11.5px;color:#77877b}
.fsc-v3 .fsc-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.fsc-v3 button.fsc-template{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:65px;padding:11px 12px;border:1px solid #dae5de;border-radius:9px;background:#fff;box-sizing:border-box;text-align:left;box-shadow:none}
.fsc-v3 button.fsc-template:hover{background:#f8fbf9;border-color:#9fc9ab}
.fsc-v3 .fsc-template-text{display:grid;gap:3px;min-width:0}
.fsc-v3 .fsc-template strong{font-size:12.5px;font-weight:700;color:#263b2b}
.fsc-v3 .fsc-template small{font-size:11.5px;font-weight:450;line-height:1.4;color:#728275}
.fsc-v3 .fsc-template-indicator{display:grid;place-items:center;width:17px;height:17px;border:1.5px solid #b8c9bd;border-radius:50%;flex:0 0 17px}
.fsc-v3 button.fsc-template.is-selected{border-color:#258a4b;background:#f2faf4;box-shadow:0 0 0 1px #258a4b18}
.fsc-v3 .fsc-template.is-selected .fsc-template-indicator{background:#218442;border-color:#218442;color:#fff}
.fsc-v3 .fsc-template.is-selected .fsc-template-indicator:before{content:'✓';font-size:11px;font-weight:700;line-height:1}
.fsc-v3 .fsc-template-note{font-size:11.5px;line-height:1.5;color:#547761;margin-top:8px}
.fsc-v3 .fsc-template-note:empty{display:none}
/* Strong hierarchy without nested outlined cards */
.fsc-v3 .fsc-form{gap:15px}
.fsc-v3 .fsc-section{padding:0 0 15px;margin:0;border:0;border-bottom:1px solid #e6ede8;border-radius:0;background:transparent;gap:12px}
.fsc-v3 .fsc-section-title{gap:3px}
.fsc-v3 .fsc-section-title h3{font-size:13.5px;font-weight:750;letter-spacing:-.01em;color:#243729}
.fsc-v3 .fsc-section-title p{font-size:11.7px;line-height:1.45;margin:0;color:#748578;max-width:590px}
.fsc-v3 .fsc-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:15px;row-gap:13px}
.fsc-v3 .fsc-field{font-size:12px;font-weight:650;gap:6px;color:#2c4333;min-width:0}
.fsc-v3 .fsc-field :is(input,select,textarea){width:100%;min-width:0;font-family:inherit!important;font-weight:450!important;font-size:13px!important;border:1px solid #c9d7cd!important;background-color:#fff!important;box-shadow:0 1px 1px #0a281209!important;color:#182b1e!important;border-radius:8px!important}
.fsc-v3 .fsc-field :is(input,select){height:41px!important;min-height:41px!important;padding:8px 12px!important}
.fsc-v3 .fsc-field select{appearance:none!important;-webkit-appearance:none!important;cursor:pointer;padding-right:37px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.3l5 5 5-5' fill='none' stroke='%23657769' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center!important}
.fsc-v3 .fsc-field textarea{min-height:68px!important;padding:9px 12px!important;resize:vertical!important}
.fsc-v3 .fsc-field :is(input,select,textarea):focus{outline:0!important;border-color:#278d47!important;box-shadow:0 0 0 3px #278d4721!important}
/* Advanced is a single lightweight accordion */
.fsc-v3 .fsc-advanced{padding:0 12px;border:1px solid #e1eae3;background:#fbfcfb;border-radius:9px}
.fsc-v3 .fsc-advanced>summary{min-height:41px;font-size:12px}
.fsc-v3 .fsc-advanced>summary span{font-size:11px;color:#819084}
.fsc-v3 .fsc-advanced>.fsc-grid{margin-top:8px}
.fsc-v3 .fsc-advanced-explain{font-size:11.5px;line-height:1.4;color:#738277}
.fsc-v3 .fsc-editor-info{display:flex;gap:7px;padding:9px 11px;border:0;background:#f5f8f6;border-radius:8px;color:#647a6b;font-size:11.4px;line-height:1.5}
.fsc-v3 .fsc-save{position:sticky;z-index:2;bottom:-24px;display:flex;align-items:center;justify-content:flex-end;gap:9px;border-top:1px solid #e5ebe6;padding:12px 0 1px;background:#fff;box-shadow:0 -9px 12px #fff}
.fsc-v3 .fsc-save .fsc-primary{min-width:126px}
/* preserve list/load/lock visuals for activity types */
.fsc-v3 .fsc-intro{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:15px}
.fsc-v3 .fsc-intro p{font-size:12px;line-height:1.5;color:#6c7f72;margin:5px 0 0}
.fsc-v3 .fsc-kind{font-size:12px;font-weight:750;color:#28422f}
.fsc-v3 .fsc-energy-current{border:1px solid #e1e9e2;background:#f7faf8;border-radius:9px;padding:12px;display:flex;justify-content:space-between;gap:14px;align-items:center;margin:0 0 15px}
.fsc-v3 .fsc-energy-current strong{font-size:12.5px}
.fsc-v3 .fsc-energy-current small{display:block;color:#76887a;font-size:11px;margin-top:3px}
.fsc-v3 .fsc-current-values{display:flex;gap:18px}
.fsc-v3 .fsc-current-values span{font-size:11px;color:#7a897e;display:grid;gap:2px}
.fsc-v3 .fsc-current-values b{font-size:13px;color:#273e2c}
.fsc-v3 .fsc-list-top{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 0 10px;margin:0 0 12px;border-bottom:1px solid #e4ebe5}
.fsc-v3 .fsc-list-top strong{font-size:13.5px}.fsc-v3 .fsc-list-top span{font-size:11px;color:#7b8c7f}
.fsc-v3 .fsc-empty{padding:25px;background:#fcfdfc}.fsc-v3 .fsc-empty p{margin:0 auto 10px;line-height:1.55}
.fsc-v3 .fsc-empty-mark{margin:0 auto 10px;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#eaf5ed;color:#297b41}
.fsc-v3 .fsc-loading{min-height:150px;display:flex;align-items:center;justify-content:center;gap:12px}
.fsc-v3 .fsc-loader{height:24px;width:24px;border-radius:50%;border:3px solid #dfe9e1;border-top-color:#268648;animation:fsc-spin .8s linear infinite}
@keyframes fsc-spin{to{transform:rotate(360deg)}}
.fsc-v3 .fsc-loading p{font-size:12px;color:#7a897b;margin:4px 0 0}
.fsc-v3 .fsc-load-error{border:1px solid #edcaca;background:#fff9f9;border-radius:9px;padding:19px;display:grid;gap:8px}
.fsc-v3 .fsc-load-error strong{font-size:13px;color:#aa4444}
.fsc-v3 .fsc-load-error p{font-size:12px;color:#795d5d;line-height:1.5;margin:0}
/* first-party dropdown is appended inside the dialog to remain in top layer */
.fsc-v3>.av-select-menu{font-family:inherit!important}
@media(max-width:650px){.fsc-v3 .fsc-body{padding:15px 15px 18px}.fsc-v3 header{padding:15px}.fsc-v3 .fsc-intro{flex-wrap:wrap}.fsc-v3 .fsc-template-head span{display:none}.fsc-v3 .fsc-template-grid,.fsc-v3 .fsc-grid{grid-template-columns:minmax(0,1fr)}.fsc-v3 .fsc-save{bottom:-18px}.fsc-v3 .fsc-current-values{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.fsc-v3 .fsc-loader{animation:none}}

/* AVELTRIM-BOTAO-NOVO-CENARIO-V5 */
.fsc-dialog.fsc-v3 .fsc-intro>div:first-child{flex:1 1 0;min-width:0}.fsc-dialog.fsc-v3 .fsc-intro>button.fsc-primary{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;min-width:145px!important;min-height:38px!important;padding:9px 15px!important;white-space:nowrap!important;line-height:1.2!important}
/* AVELTRIM-AVISO-APROVACAO-ESPACAMENTO */
.fsc-dialog .fsc-lock-notice{padding:13px 15px!important;line-height:1.5!important}.fsc-dialog .fsc-lock-notice strong{display:block!important;margin-bottom:5px!important;font-weight:700!important}.fsc-dialog .fsc-lock-notice span{display:block!important;line-height:1.55!important}