/* Fiscal > Notas fiscais (NF-e, NFS-e, NFC-e, compras, configuração e relatórios). Prefixo fdoc-. */
.fdoc-page { font-family: 'Source Sans Pro', 'Source Sans 3', system-ui, sans-serif; color: #262b2f; }
.fdoc-page.stack { display: flex; flex-direction: column; gap: 16px; }
.fdoc-icon { width: 1em; height: 1em; flex: none; fill: currentColor; vertical-align: -2px; }
.topbar h1 .fdoc-icon { width: 22px; height: 22px; margin-right: 2px; vertical-align: -3px; }
.fdoc-caret { display: inline-block; margin-left: 6px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid currentColor; vertical-align: middle; }

.fdoc-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fdoc-toolbar-left, .fdoc-toolbar-right { display: flex; align-items: center; gap: 4px; }
.fdoc-toolbar .button { min-height: 37px; gap: 4px; display: inline-flex; align-items: center; font-size: 15.5px; }
.fdoc-toolbar .button:disabled { cursor: not-allowed; }
/* Controles que dependem de serviço externo ficam desabilitados (dica ao passar o mouse), com a aparência do original. */
.fdoc-page .button:disabled { opacity: 1; }
.fdoc-page .button.secondary:disabled { color: #0f1921; }
.fdoc-page .button.accent:disabled { color: #fff; }
.fdoc-icon + .fdoc-icon { margin-left: 4px; }
.fdoc-search { display: flex; flex-basis: 100%; gap: 6px; justify-content: flex-end; }
.fdoc-search[hidden] { display: none; }
.fdoc-tool { display: inline-grid; place-items: center; width: 42px; height: 37px; padding: 0; border: 1px solid #d9dee2; border-radius: 4px; background: #fff; color: #0f1921; cursor: pointer; }
.fdoc-tool.is-dark { border-color: #0f1921; background: #0f1921; color: #fff; }
.fdoc-tool .fdoc-icon { width: 16px; height: 16px; }
.fdoc-month { width: 149px; height: 37px; min-height: 37px; margin: 0; padding: 0 30px 0 13px; border: 1px solid #0f1921; border-radius: 4px; background-color: #0f1921; color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.fdoc-menu-wrap { position: relative; display: inline-block; }
.fdoc-menu { position: absolute; z-index: 5; top: 100%; left: 0; min-width: 240px; margin-top: 2px; padding: 4px 0; border: 1px solid #d9dee2; border-radius: 4px; background: #fff; box-shadow: 0 6px 16px rgba(15, 25, 33, .12); }
.fdoc-menu[hidden] { display: none; }
.fdoc-menu a { display: block; padding: 8px 14px; color: #262b2f; text-decoration: none; font-size: 14px; }
.fdoc-menu a:hover { background: #f4f5f7; }

.fdoc-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 47px; padding: 8px 20px 8px 30px; border: 1px solid #f1c2c4; border-radius: 4px; background: #f8d7da; color: #721c24; font-size: 14px; }
.fdoc-alert strong { font-weight: 700; }
.fdoc-alert-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: not-allowed; }
.fdoc-alert-close { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; color: #a94a52; cursor: pointer; }
.fdoc-alert-close .fdoc-icon { width: 14px; height: 14px; }

/* Estado vazio na medida da captura (1440 px): círculo de 96 px a 48 px do topo, título de 24 px, botões de 37 px, cartões de 36 px de ícone. */
.fdoc-empty { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 48px 34px 24px; border: 1px solid #dfe2e6; border-radius: 8px; background: #fff; text-align: center; }
.fdoc-empty-icon { display: grid; place-items: center; width: 96px; height: 96px; border: 1px solid #e6e9ec; border-radius: 50%; background: #f4f5f7; color: #0f1b24; }
.fdoc-empty-icon .fdoc-icon { width: 38px; height: 38px; }
.fdoc-empty h2 { margin: 18px 0 0; color: #0f1b24; font-size: 24px; line-height: 1.3; font-weight: 600; }
.fdoc-empty p { max-width: 520px; margin: 8px 0 0; color: #6e757c; font-size: 15px; line-height: 22px; }
.fdoc-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 28px; }
.fdoc-empty-actions .button { display: inline-flex; align-items: center; gap: 4px; }
.fdoc-empty-actions .button:disabled { cursor: not-allowed; }
.fdoc-empty-actions .fdoc-icon { width: 14px; height: 14px; }
.fdoc-empty-lead { margin: 0 0 9px; font-size: 11px; line-height: 16px; color: #6e757c; }
.fdoc-cards { display: grid; gap: 12.5px; width: 100%; }
.fdoc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fdoc-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fdoc-card { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border: 1px solid #dfe2e6; border-radius: 6px; text-align: left; }
.fdoc-card strong { display: block; color: #0f1b24; font-size: 15px; font-weight: 600; line-height: 23px; }
.fdoc-card small { display: block; margin-top: 2px; color: #6e757c; font-size: 11px; line-height: 19px; }
.fdoc-card-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 6px; }
.fdoc-card-icon .fdoc-icon { width: 18px; height: 18px; }
.fdoc-card-icon.violet { background: #efeafd; color: #6c3fd1; }
.fdoc-card-icon.blue { background: #e6f0fb; color: #1f6fc5; }
.fdoc-card-icon.green { background: #e3f6ec; color: #1e8a50; }
.fdoc-empty-period { padding-top: 32px; }
.fdoc-money { text-align: right; white-space: nowrap; }
.fdoc-state { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #eef0f2; color: #4a5258; font-size: 12px; font-weight: 600; }
.fdoc-state-draft { background: #fdf6d8; color: #6f5a12; }

/* Formulários (NFS-e e configuração) */
.fdoc-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.fdoc-block { border: 1px solid #dfe2e6; border-radius: 4px; background: #fff; }
.fdoc-block > header { padding: 12px 16px 8px; border-bottom: 1px solid #e6e9ec; background: #f7f7f8; }
.fdoc-block h5 { margin: 0; font-size: 17px; font-weight: 400; color: #262b2f; }
.fdoc-block h5 b { font-weight: 700; }
.fdoc-block h5 .fdoc-icon { width: 15px; height: 15px; color: #555; }
.fdoc-block header small { display: block; margin-top: 2px; color: #737b81; font-size: 10.5px; }
.fdoc-block-body { padding: 14px 16px 16px; }
.fdoc-switch { padding: 12px 16px; }
.fdoc-grid { display: grid; gap: 12px 24px; }
.fdoc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fdoc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fdoc-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fdoc-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; }
.fdoc-stack { display: flex; flex-direction: column; gap: 12px; }
.fdoc-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #616a71; }
.fdoc-field input, .fdoc-field select, .fdoc-field textarea { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid #c7ced4; border-radius: 3px; background: #fff; color: #262b2f; font: inherit; font-size: 14px; }
.fdoc-field textarea { min-height: 92px; resize: vertical; }
.fdoc-field input:disabled { background: #e9ecef; }
.fdoc-required { margin-left: 2px; color: #c9302c; font-style: normal; }
.fdoc-input-group { display: flex; align-items: stretch; }
.fdoc-input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fdoc-addon { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border: 1px solid #c7ced4; border-left: 0; border-radius: 0 3px 3px 0; background: #f4f5f7; color: #262b2f; font: inherit; font-size: 13px; cursor: pointer; }
.fdoc-addon:disabled { cursor: not-allowed; color: #9aa1a7; }
.fdoc-addon .fdoc-icon { width: 14px; height: 14px; }
.fdoc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #262b2f; }
.fdoc-check small { color: #737b81; font-size: 11px; }
.fdoc-block-tools { display: flex; justify-content: flex-end; }
.fdoc-tabs { display: flex; gap: 2px; border-bottom: 1px solid #dfe2e6; }
.fdoc-tabs button { padding: 7px 16px; border: 1px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0; background: none; color: #4a5258; font: inherit; font-size: 14px; cursor: pointer; }
.fdoc-tabs button.is-active { border-color: #dfe2e6; background: #fff; color: #0f1921; font-weight: 600; margin-bottom: -1px; }
.fdoc-tax-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; align-items: end; }
.fdoc-tax-panel[hidden] { display: none; }
.fdoc-ibs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 12px; border: 1px dashed #c7ced4; border-radius: 4px; font-size: 12px; color: #616a71; }
.fdoc-ibs strong { color: #262b2f; font-size: 13px; }
.fdoc-ibs .button { margin-left: auto; }
.fdoc-totals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.fdoc-totals dt { font-size: 11px; color: #737b81; }
.fdoc-totals dd { margin: 0; font-size: 15px; }
.fdoc-net-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 12px; border-radius: 4px; background: #f4f5f7; }
.fdoc-net-row > div { display: flex; flex-direction: column; }
.fdoc-net-row span { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.fdoc-net-row small { color: #737b81; font-size: 11px; }
.fdoc-net { font-size: 22px; }
.fdoc-net-row .button { margin-left: auto; }
.fdoc-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-bottom: 24px; }
.fdoc-actions .button { display: inline-flex; align-items: center; gap: 4px; }
.fdoc-actions .button:disabled { cursor: not-allowed; }
.fdoc-clear { min-height: 30px; }

/* Configuração: passos */
.fdoc-hello { margin: 4px 0 0; font-size: 18px; }
.fdoc-lead { margin: 0; font-size: 12px; color: #616a71; }
.fdoc-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 0; padding: 0; list-style: none; position: relative; }
.fdoc-steps::before { content: ''; position: absolute; top: 12px; left: 12%; right: 12%; height: 1px; background: #d9dee2; }
.fdoc-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #737b81; }
.fdoc-step-dot { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #c7ced4; border-radius: 50%; background: #fff; font-size: 11px; }
.fdoc-steps li.is-current { color: #0f1921; font-weight: 600; }
.fdoc-steps li.is-current .fdoc-step-dot { border-color: #0f1921; background: #0f1921; color: #fff; }

/* Relatórios */
.fdoc-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fdoc-report { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid #dfe2e6; border-radius: 6px; background: #fff; }
.fdoc-report h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.fdoc-report p { margin: 0 0 8px; color: #6e757c; font-size: 12.5px; line-height: 1.45; }
.fdoc-report-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid #e6e9ec; border-radius: 50%; background: #f4f5f7; }
.fdoc-report-icon .fdoc-icon { width: 16px; height: 16px; }
.fdoc-report-open { padding: 0; border: 0; background: none; color: #0f1921; font: inherit; font-size: 12.5px; font-weight: 700; cursor: not-allowed; }
.fdoc-report-open:disabled { color: #0f1921; opacity: .85; }

@media (max-width: 1100px) {
  .fdoc-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fdoc-grid-5, .fdoc-grid-6, .fdoc-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fdoc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fdoc-report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .fdoc-cols-3, .fdoc-cols-4, .fdoc-grid-3, .fdoc-grid-4, .fdoc-grid-5, .fdoc-grid-6, .fdoc-totals, .fdoc-tax-panel { grid-template-columns: 1fr; }
  .fdoc-empty { padding: 28px 14px 18px; }
  .fdoc-steps li { font-size: 10px; }
}

/* Menu "Mais ações" na medida da captura: 215 px de largura, itens de 33 px separados por linha, ícone de 16 px. */
.fdoc-menu { min-width: 215px; margin-top: 4px; padding: 0; overflow: hidden; }
.fdoc-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 33px; padding: 0 12px 0 17px; border: 0; border-top: 1px solid #e3e6e9; background: #fff; color: #262b2f; font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.fdoc-menu-item:first-child { border-top: 0; }
.fdoc-menu-item:hover:not(:disabled) { background: #f4f5f7; }
.fdoc-menu-item:disabled { cursor: not-allowed; }
.fdoc-menu-item .fdoc-icon { flex: none; width: 16px; height: 16px; }

/* Formulário Adicionar NFS-e na medida da captura (1440 px): cabeçalho de bloco de 74 px, título de 20 px, campos de 38 px,
   colunas com 30 px de intervalo e 15 px entre linhas. */
.fdoc-form { gap: 16px; }
.fdoc-block { border-radius: 6px; }
.fdoc-block > header { padding: 16px 20px 10px; min-height: 74px; box-sizing: border-box; border-radius: 6px 6px 0 0; }
.fdoc-block h5 { font-size: 20px; line-height: 1.3; }
.fdoc-block h5 .fdoc-icon { width: 17px; height: 17px; }
.fdoc-block header small { margin-top: 4px; font-size: 11px; }
.fdoc-block-body { padding: 14px 20px 20px; }
.fdoc-field input[type='date'], .fdoc-field input[type='time'] { height: 38px; box-sizing: border-box; }
.fdoc-switch { padding: 15px 20px; }
.fdoc-grid { gap: 15px 30px; }
.fdoc-field { gap: 2px; font-size: 14px; }
.fdoc-field input, .fdoc-field select, .fdoc-field textarea { min-height: 38px; padding: 6px 12px; font-size: 16px; }
.fdoc-addon { padding: 0 12px; }
.fdoc-addon.is-inline { margin-left: -38px; border: 0; background: transparent; padding: 0 10px; z-index: 1; }
.fdoc-input-group:has(.is-inline) input { border-radius: 3px; padding-right: 40px; }

/* Leva 3 (G8): o texto "Outubro de 2026" cabe inteiro (111 px de texto na captura). */
.fdoc-month { padding: 0 22px 0 12px; }
.fdoc-month {
  appearance: none; -webkit-appearance: none; padding: 0 28px 0 13px; background-repeat: no-repeat; background-position: right 12px center; background-size: 9px 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath d='M0 0h10L5 5z' fill='%23fff'/%3E%3C/svg%3E");
}

/* Leva 3 (G8): Configurar a emissão de NF-e na medida da captura (saudação de 20 px, passos de 32 px com rótulo de 14 px,
   corpo dos blocos com 20 px acima, linhas de 75 px, campos e botão do CNPJ de 38 px, 18 px entre os blocos). */
#view-root[data-view='fiscal-note-settings'] .fdoc-hello { margin: -3px 0 0; font-size: 20px; line-height: 30px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-steps { margin: -3px 0 0; }
#view-root[data-view='fiscal-note-settings'] .fdoc-steps::before { top: 16px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-steps li { gap: 7px; font-size: 14px; line-height: 18px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-step-dot { width: 32px; height: 32px; font-size: 13px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-lead { margin: 11px 0 3px; font-size: 14px; line-height: 18px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-block + .fdoc-block { margin-top: 2px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-block-body { padding: 20px 20px 17px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-grid { gap: 14px 30px; }
#view-root[data-view='fiscal-note-settings'] .fdoc-field input, #view-root[data-view='fiscal-note-settings'] .fdoc-field select { height: 38px; min-height: 38px; box-sizing: border-box; }
#view-root[data-view='fiscal-note-settings'] .fdoc-addon { height: 38px; box-sizing: border-box; }

/* Leva 5 (T5): NFS-e adicionar. Data e hora são campos mascarados com botão de calendário e de relógio ao lado;
   o campo encolhe dentro do grupo (a hora não passa da borda do cartão) e o botão tem a altura dos campos. */
.fdoc-input-group { min-width: 0; }
.fdoc-input-group input { min-width: 0; flex: 1 1 auto; }
.fdoc-input-group.is-masked .fdoc-addon { height: 38px; box-sizing: border-box; flex: none; background: #fff; border-color: #c7ced4; }
.fdoc-input-group.is-masked .fdoc-addon .fdoc-icon { width: 20px; height: 20px; }
