/* Documentos fiscais - formulários independentes, padrão Nota Smart */
.ff-workspace{color:#283a50;max-width:100%;font-size:13px}
.ff-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px;padding:6px 0 13px;border-bottom:1px solid #d7dfe9}
.ff-heading h2{font-size:20px;font-weight:600;color:#263c55;margin:0 0 6px}
.ff-heading span{color:#596d82;font-size:12px}
.ff-draft-badge{background:#e4edf9;color:#075eaa!important;padding:7px 13px;border-radius:16px;font-size:12px!important;font-weight:700}
.ff-panel{background:#fff;border:1px solid #dfe5ed;border-radius:3px;box-shadow:0 2px 10px #1729470b;padding:20px 23px;margin:0 0 17px}
.ff-panel-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 18px}
.ff-panel h3{font-weight:600;color:#2c4159;font-size:16px;margin:0}
.ff-collapse{border:0;background:none;color:#377cc5;font-size:25px;cursor:pointer;min-width:34px}
.ff-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 22px;align-items:end}
.ff-grid.hidden{display:none}
.ff-field{display:flex;flex-direction:column;color:#435771;gap:9px;font-size:12.5px;min-width:0;font-weight:500}
.ff-field input,.ff-field select,.ff-field textarea{width:100%;min-height:42px;border:1px solid #ccd6e3;color:#2b3e55;background:#fff;border-radius:3px;padding:10px 12px;font-size:13px;outline-color:#0672d8}
.ff-field textarea{min-height:100px;resize:vertical}
.ff-field:has(textarea){grid-column:span 2}
.ff-field small{font-size:11px;color:#60738c}
.ff-check{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600;color:#425772;padding:10px}
.ff-check input{width:16px!important;height:16px!important;min-width:16px;accent-color:#0872d2}
.ff-buttons{display:flex;justify-content:flex-end;gap:8px;padding:7px 0 25px}
.ff-buttons button{min-width:130px;height:43px;font-size:13px}
.ff-buttons button:disabled{opacity:.55;cursor:not-allowed}
.ff-preview{max-height:65vh;overflow:auto}
.ff-preview h4{font-size:15px;color:#2c5d92;margin:18px 0 8px;border-bottom:1px solid #dde7ef;padding-bottom:8px}
.ff-preview dl{display:grid;grid-template-columns:210px 1fr;gap:8px;margin:0}
.ff-preview dt{font-size:12px;color:#66758b}
.ff-preview dd{font-size:13px;font-weight:600;color:#2b3e57;margin:0;overflow-wrap:anywhere}
.fiscal-workspace .module-status.importado_autorizado{color:#116334;font-weight:700}
@media(max-width:1000px){.ff-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.ff-panel{padding:16px}.ff-grid{grid-template-columns:1fr}.ff-field:has(textarea){grid-column:span 1}.ff-buttons{flex-wrap:wrap}.ff-preview dl{grid-template-columns:1fr}}


/* CT-e Nota Smart — formulário específico, conforme referência fornecida */
#fiscalFormWorkspace.ff-cte-workspace{--cte-ink:#273b4d;--cte-line:#e4e8ee;--cte-blue:#096cc8;--cte-muted:#66798c;max-width:100%;background:#f1f3f8;margin:0;padding:0 0 15px;color:var(--cte-ink);font-family:inherit;font-size:13px}
.ff-cte-workspace *{box-sizing:border-box}
.ff-cte-workspace .ff-cte-topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:68px;padding:12px 18px;border-bottom:1px solid #e1e6ef;background:#f7f8fb;margin:0 0 13px}
.ff-cte-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:18px;min-width:0}
.ff-cte-breadcrumb h2{font-size:19px;line-height:1.3;font-weight:600;color:#283849;margin:0;white-space:nowrap}
.ff-cte-breadcrumb>span{font-size:12px;color:#8b95a2}
.ff-cte-chip{display:inline-flex;padding:3px 7px;margin-right:7px;border:1px solid #9ca8b5;border-radius:3px;font-size:11px;color:#667789;vertical-align:2px}
.ff-cte-topactions{display:flex;align-items:center;gap:10px;position:relative}
.ff-cte-state{font-size:11px;padding:6px 9px;border:1px solid #cddbed;background:#edf5ff;border-radius:5px;color:#4773a2;white-space:nowrap}
.ff-cte-options{border:1px solid #1876d2;border-radius:5px;padding:9px 14px;color:#0868c3;background:#fff;font-size:12px;font-weight:600;cursor:pointer}
.ff-cte-options-menu{position:absolute;top:100%;right:0;width:218px;background:white;border:1px solid #dce5ef;border-radius:7px;padding:6px;box-shadow:0 12px 35px #203b591f;z-index:15}
.ff-cte-options-menu[hidden]{display:none}
.ff-cte-options-menu button{display:block;border:0;border-radius:4px;padding:11px;background:transparent;text-align:left;width:100%;font-size:12px;color:#2c425c;cursor:pointer}
.ff-cte-options-menu button:hover{background:#eef5ff}
.ff-cte-inline-notice{background:#eaf3fc;border:1px solid #cde2f9;border-left:3px solid #1682d9;color:#34536c;font-size:12px;line-height:1.5;padding:10px 14px;margin:0 18px 14px;border-radius:4px}
.ff-cte-layout{padding:0 18px;display:flex;flex-direction:column;gap:16px}
.ff-cte-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px;min-width:0;align-items:stretch}
.ff-cte-panel{background:#fff;min-width:0;border:1px solid #e4e7ec;border-radius:3px;box-shadow:0 2px 11px rgba(40,57,91,.045);padding:16px 17px 18px}
.ff-cte-panel.ff-cte-large{min-height:250px}
.ff-cte-panel.ff-cte-header{min-height:113px}
.ff-cte-panel-title{margin:0 0 13px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.ff-cte-panel-title h3{margin:0;font-size:14px;font-weight:600;line-height:1.4;color:#3d4855}
.ff-cte-icon{display:inline-flex;min-width:23px;margin-right:5px;color:#66809b;font-weight:normal;justify-content:center}
.ff-cte-collapse{border:0;background:none;color:#728294;font-size:20px;cursor:pointer;line-height:1}
.ff-cte-panel-body[hidden]{display:none!important}
.ff-cte-grid{display:grid;gap:12px 14px;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
.ff-cte-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ff-cte-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.ff-cte-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.ff-cte-field,.ff-cte-workspace .ff-field,.ff-cte-row-field{display:flex;flex-direction:column;min-width:0;gap:7px;color:#69727e;font-size:11.5px;font-weight:500}
.ff-cte-field>input,.ff-cte-field>select,.ff-cte-field>textarea,.ff-cte-workspace .ff-field input,.ff-cte-workspace .ff-field select,.ff-cte-workspace .ff-field textarea,.ff-cte-row-field input,.ff-cte-row-field select{display:block;width:100%;min-width:0;min-height:38px;margin:0;padding:9px 10px;border:1px solid #d8dde5!important;border-radius:3px!important;background:#fff;color:#263c52;font-size:12.5px;outline-color:#0677d6;box-shadow:none!important}
.ff-cte-field>input:disabled{background:#edf0f3;color:#929aa5;cursor:not-allowed}
.ff-cte-field textarea{min-height:92px;resize:vertical;line-height:1.5}
.ff-cte-full{grid-column:1/-1}
.ff-cte-client{position:relative;min-width:0}
.ff-cte-client .ff-field{width:100%}
.ff-cte-client .ff-field select{padding-right:25px}
.ff-cte-client>span{position:absolute;bottom:11px;right:26px;color:#8796a7;pointer-events:none;font-size:16px}
.ff-cte-group-title{font-size:12.5px;margin:17px 0 9px;color:#44566a;font-weight:600;padding-bottom:7px;border-bottom:1px solid #e4e8ec}
.ff-cte-list{display:flex;flex-direction:column;gap:7px;min-width:0}
.ff-cte-row{display:grid;grid-template-columns:minmax(0,1fr) 35px;gap:7px;align-items:end;min-width:0;padding:5px 0}
.ff-cte-row-quantidades{grid-template-columns:minmax(0,74px) minmax(0,1fr) minmax(0,105px) 28px}
.ff-cte-row-componentes{grid-template-columns:minmax(0,1fr) minmax(0,130px) 28px}
.ff-cte-row-faturas{grid-template-columns:repeat(4,minmax(0,1fr)) 28px}
.ff-cte-row-parcelas{grid-template-columns:repeat(2,minmax(0,1fr)) 28px}
.ff-cte-row-documentos{grid-template-columns:minmax(0,130px) minmax(0,1fr) 28px}
.ff-cte-row-field{font-size:10.8px}
.ff-cte-row-field input,.ff-cte-row-field select{min-height:35px;font-size:12px;padding:8px 7px}
.ff-cte-remove{border:0;background:#fff;color:#a5aeb9;font-size:20px;height:35px;min-width:25px;cursor:pointer;align-self:end}
.ff-cte-remove:hover{color:#b12f43;background:#fff0f2}
.ff-cte-add{border:0;background:transparent;color:#557da4;font-size:12px;padding:9px 5px;cursor:pointer;margin:1px auto;display:block}
.ff-cte-add:hover{color:#086bc8;text-decoration:underline}
.ff-cte-tabs,.ff-cte-subtabs{display:flex;align-items:center;gap:0;border-bottom:1px solid #e1e5ed;margin:1px 0 13px}
.ff-cte-tabs button,.ff-cte-subtabs button{border:0;border-bottom:3px solid transparent;background:transparent;cursor:pointer;color:#7b8594;font-size:12px;min-width:82px;padding:11px 10px 9px}
.ff-cte-tabs button[aria-selected=true],.ff-cte-subtabs button[aria-selected=true]{border-color:#096dcc;color:#086ccb;font-weight:600}
.ff-cte-tax-page{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.ff-cte-tax-page[hidden],.ff-cte-workspace [data-cte-subpage][hidden]{display:none!important}
.ff-cte-footnote{color:#718194;font-size:11px;line-height:1.5;margin:14px 0 0}
.ff-cte-subtabs{margin-top:12px}
.ff-cte-workspace .ff-cte-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:6px 18px 8px;padding:8px 0 16px}
.ff-cte-footer-actions{display:flex;gap:8px;align-items:center}
.ff-cte-workspace .ff-cte-btn{height:40px;min-width:110px;border-radius:3px;font-size:12px;font-weight:600;cursor:pointer;padding:0 18px}
.ff-cte-save{background:#076fcc;border:1px solid #076fcc;color:#fff}
.ff-cte-preview{background:#fff;border:1px solid #637487;color:#3e5063}
.ff-cte-generate{background:#18a64c;border:1px solid #149442;color:white}
.ff-cte-btn:disabled{opacity:.62;cursor:not-allowed}
.ff-cte-text-btn{background:transparent;border:0;color:#697b91;font-size:12px;cursor:pointer}
@media (max-width:1220px){.ff-cte-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.ff-cte-row-faturas{grid-template-columns:repeat(2,minmax(0,1fr)) 28px}.ff-cte-row-faturas>label:nth-child(2){grid-column:1}}
@media (max-width:950px){.ff-cte-pair{grid-template-columns:1fr}.ff-cte-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.ff-cte-panel.ff-cte-large{min-height:auto}}
@media (max-width:640px){.ff-cte-layout{padding:0 10px}.ff-cte-workspace .ff-cte-topbar{padding:13px 10px;align-items:flex-start}.ff-cte-breadcrumb>span{width:100%}.ff-cte-state{display:none}.ff-cte-inline-notice{margin:0 10px 12px}.ff-cte-panel{padding:14px 12px}.ff-cte-grid-3,.ff-cte-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.ff-cte-row-quantidades{grid-template-columns:75px minmax(0,1fr) 28px}.ff-cte-row-quantidades>label:nth-child(3){grid-column:1/3}.ff-cte-row-documentos{grid-template-columns:90px minmax(0,1fr) 28px}.ff-cte-workspace .ff-cte-footer{margin:5px 10px;align-items:stretch;flex-direction:column}.ff-cte-footer-actions{justify-content:flex-end;flex-wrap:wrap}.ff-cte-btn{flex:1}.ff-cte-tax-page{grid-template-columns:1fr}}
@media (max-width:640px){.ff-cte-row-faturas{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 28px}.ff-cte-row-faturas>label:nth-child(1){grid-column:1;grid-row:1}.ff-cte-row-faturas>label:nth-child(2){grid-column:2;grid-row:1}.ff-cte-row-faturas>label:nth-child(3){grid-column:1;grid-row:2}.ff-cte-row-faturas>label:nth-child(4){grid-column:2;grid-row:2}.ff-cte-row-faturas>.ff-cte-remove{grid-column:3;grid-row:2}}
@media (max-width:400px){.ff-cte-grid-3,.ff-cte-grid-4{grid-template-columns:1fr}}

/* CT-e - combobox IBGE/CFOP e campos em reais, edição 2026-10-23 */
.ff-cte-workspace .ff-cte-panel,.ff-cte-workspace .ff-cte-panel-body,.ff-cte-workspace .ff-cte-layout{overflow:visible}
.ff-cte-workspace .ff-cte-combo{position:relative;min-width:0;z-index:auto}
.ff-cte-workspace .ff-cte-combo:focus-within{z-index:60}
.ff-cte-workspace .ff-cte-combo-control{position:relative;display:block}
.ff-cte-workspace .ff-cte-combo-control input{width:100%;min-width:0;min-height:42px;border:1px solid #ccd8e6;border-radius:4px;padding:10px 34px 10px 11px;font-size:13px;background:white;color:#243b53;outline-color:#1779d8}
.ff-cte-workspace .ff-cte-chevron{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;font-size:17px;color:#8a9db1}
.ff-cte-workspace .ff-cte-results{position:absolute;top:calc(100% + 2px);left:0;right:0;max-height:315px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #68a7e4;background:white;z-index:80;box-shadow:0 10px 28px #172c4930;border-radius:3px}
.ff-cte-workspace .ff-cte-results[hidden]{display:none!important}
.ff-cte-workspace .ff-cte-option{width:100%;display:flex;flex-direction:column;text-align:left;gap:5px;min-height:50px;white-space:normal;background:#fff;border:0;border-bottom:1px solid #e9edf2;padding:11px 14px;font-size:12px;color:#2a4159;cursor:pointer}
.ff-cte-workspace .ff-cte-option strong{font-weight:600;line-height:1.45}
.ff-cte-workspace .ff-cte-option small{font-size:11px;color:#6d8197}
.ff-cte-workspace .ff-cte-option:hover,.ff-cte-workspace .ff-cte-option:focus,.ff-cte-workspace .ff-cte-option[aria-selected=true]{background:#65a7e7;color:#fff;outline:0}
.ff-cte-workspace .ff-cte-option:hover small,.ff-cte-workspace .ff-cte-option[aria-selected=true] small{color:#f4f8ff}
.ff-cte-workspace .ff-cte-empty{padding:13px 15px;color:#62768c;font-size:12px}
.ff-cte-workspace input[data-cte-money]{font-variant-numeric:tabular-nums;letter-spacing:.02em}
@media (max-width:640px){.ff-cte-workspace .ff-cte-results{max-height:260px}.ff-cte-workspace .ff-cte-option{padding:10px 12px}}


/* Bloco CT-e: documentos vinculados, CSTs e ações importação */
.ff-cte-workspace .ff-cte-inline-notice{display:none}
.ff-cte-workspace .ff-cte-options-menu{width:285px;padding:6px;border:1px solid #e2e7ed;border-radius:5px}
.ff-cte-workspace .ff-cte-options-menu button{font-size:13px;padding:12px 15px;color:#32475a}
.ff-cte-workspace .ff-cte-tax-page select{font-size:12px}
.ff-cte-workspace .ff-cte-row-documentos{grid-template-columns:minmax(85px,115px) minmax(180px,1fr) 94px 118px 28px;align-items:end;gap:9px;padding:10px 0;border-bottom:1px solid #e8edf2}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-confirm-ref{height:37px;border:1px solid #0a6dcb;background:#e8f3ff;border-radius:4px;color:#0957a1;font-weight:600;cursor:pointer;padding:0 8px;font-size:11px}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-added{display:inline-flex;align-items:center;justify-content:center;color:#7d8793;border:1px solid #dfe5ea;background:#f5f7fa;border-radius:4px;padding:10px 6px;height:37px;font-size:10.5px;white-space:nowrap}
.ff-cte-workspace .ff-cte-row-documentos.ff-cte-referenced .ff-cte-added{color:#097844;background:#e7f7ef;border-color:#9fdabd}
.ff-cte-workspace .ff-cte-docactions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:12px 0}
.ff-cte-workspace .ff-cte-docactions button{cursor:pointer;border:1px solid #bfd7ee;background:#f7fbff;border-radius:4px;color:#0d67ad;font-size:12px;padding:10px 14px}
.ff-cte-workspace .ff-cte-docnotice{color:#587189;font-size:12px;line-height:1.5;margin:8px 0 0}
.ff-cte-source-notes{max-height:420px;overflow:auto;display:flex;flex-direction:column;gap:6px}
.ff-cte-source-notes label{display:block;border:1px solid #dce7f1;padding:10px;border-radius:4px;font-size:12px}
.ff-cte-source-notes label small{display:block;padding:5px 0 0;color:#5f748b}
@media(max-width:900px){
.ff-cte-workspace .ff-cte-row-documentos{grid-template-columns:minmax(80px,105px) minmax(0,1fr) 28px}
.ff-cte-workspace .ff-cte-row-documentos [data-cte-confirm]{grid-column:1;grid-row:2}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-added{grid-column:2;grid-row:2;justify-self:start;padding:8px 12px}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-remove{grid-column:3;grid-row:1}
}
@media(max-width:560px){
.ff-cte-workspace .ff-cte-row-documentos{grid-template-columns:1fr 30px}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-row-field:nth-child(1){grid-column:1}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-row-field:nth-child(2){grid-column:1/3;grid-row:2}
.ff-cte-workspace .ff-cte-row-documentos [data-cte-confirm]{grid-row:3;grid-column:1}
.ff-cte-workspace .ff-cte-row-documentos .ff-cte-added{grid-row:4;grid-column:1}
}

.ff-cte-regime{font-size:12px;color:#49627d;margin:0 0 12px}.ff-cte-regime strong{color:#17598d}

.ff-cte-preflight-result{white-space:pre-line;font-size:12px;color:#875425;padding:4px 18px;line-height:1.6}.ff-cte-preflight-ready{color:#146e50}

.ff-cte-workspace .ff-cte-tax-help{grid-column:1/-1;display:block;color:#536c85;font-size:12px;line-height:1.5;margin:4px 0 8px}

/* CT-e autorizado: identificação fiscal e ações visíveis após a SEFAZ. */
.cte-authorized-summary{
 background:#eef8f3;border:1px solid #b2dcc5;border-left:5px solid #199968;
 border-radius:12px;padding:18px 20px;margin:10px 0 18px;
 color:#173e33;line-height:1.75;font-size:15px;
}
.cte-authorized-summary>strong{font-size:19px;display:block;margin-bottom:8px;color:#107d59}
.cte-summary-key{overflow-wrap:anywhere}
.cte-authorized-summary code{
 display:inline-block;background:#fff;color:#173e33;border:1px solid #cbe1d6;
 border-radius:6px;padding:4px 8px;letter-spacing:.4px;user-select:all;font-size:14px;
}
.cte-authorized-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.cte-authorized-actions button{
 border:1px solid #1b75bc;border-radius:8px;background:#fff;color:#135da1;
 cursor:pointer;padding:10px 16px;font-weight:650;font-size:14px;
}
.cte-authorized-actions button:first-child{background:#086ab4;color:white}
.cte-authorized-actions button:hover{filter:brightness(.96)}
@media(max-width:600px){
 .cte-authorized-summary{padding:13px;margin:8px 0}
 .cte-authorized-actions button{width:100%}
 .cte-authorized-summary code{font-size:12px}
}

/* R14: CT-e viewer follows the NF-e modal pattern (not full screen). */
.fiscal-modal-cover.cte-dacte-modal{padding:18px!important}
.fiscal-modal-cover.cte-dacte-modal>.fiscal-modal{
 width:min(1140px,92vw)!important;max-width:1140px!important;
 height:min(820px,90dvh)!important;max-height:90dvh!important;
 border-radius:3px!important;overflow:hidden!important;
}
.fiscal-modal-cover.cte-dacte-modal .fiscal-modal-body{
 padding:16px 20px!important;overflow:hidden!important;
 min-height:0!important;display:flex!important;flex:1 1 auto!important;
}
.fiscal-modal-cover.cte-dacte-modal .fiscal-document-pdf{
 flex:1 1 auto!important;width:100%!important;height:100%!important;
 min-height:0!important;max-height:none!important;
 border:1px solid #cfdae6!important;border-radius:2px!important;
 background:#fafafa;
}
.fiscal-modal-cover.cte-dacte-modal .fiscal-modal>header{
 padding:15px 20px!important;min-height:56px!important;
}
.fiscal-modal-cover.cte-dacte-modal .fiscal-modal footer{
 padding:13px 20px!important;min-height:65px!important;gap:8px!important;
}
@media(max-width:700px){
 .fiscal-modal-cover.cte-dacte-modal{padding:6px!important}
 .fiscal-modal-cover.cte-dacte-modal>.fiscal-modal{
  width:calc(100vw - 12px)!important;height:min(90dvh,820px)!important;
  max-height:90dvh!important;}
 .fiscal-modal-cover.cte-dacte-modal .fiscal-modal-body{
  padding:7px!important}
 .fiscal-modal-cover.cte-dacte-modal .fiscal-modal footer{
  padding:8px!important}
}
