:root {
    --color-bg: #f3f4f8;
    --color-surface: #ffffff;
    --color-border: #e4e7ec;
    --color-text: #101828;
    --color-text-muted: #667085;
    --color-primary: #1d3fd6;
    --color-primary-hover: #16299e;
    --color-primary-soft: #e8edff;
    --color-primary-light: #2f5bff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
    --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.06);
    --font-sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --container-max-width: 1200px;
}
    
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    text-rendering: optimizeLegibility;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:visited {
    color: var(--color-primary);
}

a:hover {
    text-decoration: underline;
}

.icon-link {
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.icon-link:visited {
    color: var(--color-text-muted);
}

.icon-link:hover {
    color: var(--color-primary);
    background: var(--color-primary-soft);
    text-decoration: none;
}

/* Navbar */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: radial-gradient(circle at top, #1c2140 0%, #101323 60%);
    color: #fff;
    padding: 0.85rem 1.75rem;
    box-shadow: var(--shadow-sm);
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.brand-logo {
    height: 50px;
    width: auto;
    display: block;
    background: #fff;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.navbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #cbd0e0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.navbar .nav-link:hover {
    color: #fff;
    text-decoration: none;
}

.navbar .user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #cbd0e0;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    border-radius: 999px;
}

.navbar .user a {
    color: #cbd0e0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.navbar .user a:hover {
    color: #fff;
    text-decoration: none;
}

/* Layout */

.container {
    width: min(100% - 2rem, var(--container-max-width));
    margin-inline: auto;
    padding-block: 2rem;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: 1.25rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.page-header h1 {
    margin: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.25rem;
}

h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

/* Table */

.table-wrap {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: auto;
    background: var(--color-surface);
}

table {
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

th, td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

thead th {
    background: #f9fafb;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: none;
}

.tabela-lancamentos tbody tr {
    box-shadow: inset 0 0 0 0 transparent;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}

tbody tr:hover {
    background: #fafaff;
    box-shadow: inset 3px 0 0 var(--color-primary);
}

/* Cor de fundo da linha por status -- dá pra reconhecer o estado do
   lançamento de relance, já que não tem mais uma coluna de Status
   separada (o status agora é só o pill/badge da coluna Ação). No hover
   a cor intensifica e ganha uma barrinha lateral combinando -- a ordem
   destas regras importa: tr.observacao (aviso) e tr.selecionada
   (seleção ativa) precisam vir depois pra ganhar de um tint de status
   quando as duas classes coexistirem na mesma linha. */
tr.status-emitida {
    background: #f0fdf4;
}

tr.status-emitida:hover {
    background: #e3fbe9;
    box-shadow: inset 3px 0 0 #16a34a;
}

tr.status-cancelada {
    background: #fdf2f2;
}

tr.status-cancelada:hover {
    background: #fbe8e8;
    box-shadow: inset 3px 0 0 #a11212;
}

tr.status-ignorada {
    background: #f7f7f8;
}

tr.status-ignorada:hover {
    background: #eef0f2;
    box-shadow: inset 3px 0 0 #6b7280;
}

tr.status-enviando, tr.status-cancelando {
    background: #eff6ff;
}

tr.status-enviando:hover, tr.status-cancelando:hover {
    background: #dbeafe;
    box-shadow: inset 3px 0 0 #1d4ed8;
}

tr.observacao {
    background: #fffaeb;
}

tr.observacao:hover {
    background: #fef3d6;
    box-shadow: inset 3px 0 0 #93670a;
}

tr.selecionada, tr.selecionada:hover {
    background: var(--color-primary-soft);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.tabela-lancamentos tbody tr {
    cursor: pointer;
}

td.truncate, .truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.linha-cpf {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.76rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.lancamento-acoes {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Pills da coluna Ação (penúltima) -- um único elemento que muda de
   cara conforme o status: botão sólido (Emitir), botão contornado
   (Cancelar), ou um indicador não clicável (Erro / Enviando /
   Cancelando -- não faz sentido reemitir clicando ali, ver o painel
   lateral ou a tela de detalhe pra isso). */
.acao-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 88px;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    font-family: inherit;
}

a.acao-pill:hover, button.acao-pill:hover {
    text-decoration: none;
}

.acao-emitir {
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
}

.acao-emitir:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.acao-cancelar {
    background: #fff;
    color: #a11212;
    border-color: #f3b4b4;
    cursor: pointer;
}

.acao-cancelar:hover {
    background: #fef2f2;
    color: #a11212;
}

.acao-indicador {
    background: #fff;
    cursor: default;
}

.acao-erro {
    color: #93670a;
    border-color: #f7dca0;
    background: #fef3d6;
}

.acao-cancelada {
    color: #a11212;
    border-color: #f3b4b4;
    background: #fde2e1;
}

.acao-andamento {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #dbeafe;
}

.status-info .warning-note {
    margin-top: 0;
}

td.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Key/value detail table */

.kv-table th {
    background: transparent;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 600;
    width: 220px;
    white-space: normal;
}

.kv-table td {
    font-size: 0.92rem;
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-pendente { background: #fef3d6; color: #93670a; }
.badge-enviando { background: #dbeafe; color: #1d4ed8; }
.badge-emitida { background: #d1fadf; color: #05603a; }
.badge-cancelando { background: #dbeafe; color: #1d4ed8; }
.badge-cancelada { background: #fde2e1; color: #a11212; }
.badge-ignorada { background: #eceef1; color: #4b5563; }
.badge-erro { background: #fef3d6; color: #93670a; }

/* Search bar */

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.search-bar:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.search-bar input[type="text"] {
    flex: 1;
    width: auto;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    background: transparent;
}

.search-bar input[type="text"]:focus {
    outline: none;
    box-shadow: none;
}

.search-bar select {
    border: none;
    border-left: 1px solid var(--color-border);
    background: transparent;
    padding: 0 0 0 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    max-width: 160px;
}

.search-bar select:focus {
    outline: none;
}

.search-clear {
    color: var(--color-text-muted);
    display: inline-flex;
}

.search-clear:hover {
    color: var(--color-text);
}

/* Filters / pill nav */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.filters a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-muted);
    background: #eceef3;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.filters a:hover {
    background: #e0e3ec;
    text-decoration: none;
}

.filters a.active {
    background: var(--color-primary);
    color: #fff;
}

.filters-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.3rem;
    border-radius: var(--radius-sm);
    background: rgba(16, 24, 40, 0.08);
    font-size: 0.7rem;
    font-weight: 700;
}

.filters a.active .filters-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Pagination */

.lista-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.lista-rodape-resumo {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    margin-left: auto;
}

.pagination-number, .pagination-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-weight: 600;
}

.pagination-number:hover, .pagination-arrow:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    text-decoration: none;
}

.pagination-number.active {
    background: var(--color-primary);
    color: #fff;
}

.pagination-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    color: var(--color-text-muted);
}

/* Login */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1c2140 0%, #101323 60%);
}

.login-box {
    width: 340px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.login-logo .brand-logo {
    height: 50px;
}

/* Forms */

label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
}

.input, input[type="text"], input[type="email"], input[type="password"], input[type="file"], select.input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    background: var(--color-surface);
    color: var(--color-text);
}

.input:focus, input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

input[type="file"] {
    padding: 0.4rem;
}

input[type="file"]::file-selector-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-right: 0.85rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--color-primary-hover);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.62rem;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn:hover {
    background: var(--color-primary-hover);
}

.btn-auto {
    width: auto;
    padding: 0.6rem 1.3rem;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-sm:hover {
    background: var(--color-primary-hover);
}

.btn-sm-danger {
    background: #a11212;
}

.btn-sm-danger:hover {
    background: #7d0d0d;
}

.errorlist {
    list-style: none;
    color: #a11212;
    font-size: 0.85rem;
    padding: 0;
    margin: 0 0 0.75rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row > div {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 1.1rem;
}

.help-text {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: -0.6rem 0 1.1rem;
}

.config-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.config-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.config-tab:hover {
    color: var(--color-text);
}

.config-tab-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Alerts (toast: fixed position, doesn't push layout, auto-dismisses via JS) */

.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 380px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.alert.alert-hide {
    opacity: 0;
    transform: translateX(8px);
}

.alert-success { background: #d1fadf; color: #05603a; }
.alert-error { background: #fde2e1; color: #a11212; }
.alert-warning { background: #fef3d6; color: #93670a; }

.btn-link, .btn-link:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: background 0.15s;
}

.btn-link:hover {
    background: var(--color-primary-hover);
    color: #fff;
    text-decoration: none;
}

.status-form select {
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    background: var(--color-surface);
    color: var(--color-text);
}

.status-form select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.warning-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    color: #93670a;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    max-width: 320px;
}

.warning-note[hidden] {
    display: none;
}

.warning-note i {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.warning-note-text {
    display: block;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 2rem 1rem;
}

.xml-box {
    white-space: pre-wrap;
    word-break: break-all;
    background: #0f1222;
    color: #d7dae8;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    max-height: 320px;
    overflow: auto;
}

/* Barra flutuante de seleção (aparece na listagem quando >=1 linha
   marcada, com o total de checkboxes selecionados e as ações em lote) */

.barra-selecao[hidden], .painel[hidden] {
    display: none;
}

.barra-selecao {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: calc(100vw - 2rem);
    flex-wrap: wrap;
    background: #101323;
    color: #fff;
    padding: 0.7rem 0.9rem 0.7rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 900;
}

.barra-selecao-contagem {
    font-size: 0.85rem;
    color: #cbd0e0;
    white-space: nowrap;
}

.barra-selecao-contagem strong {
    color: #fff;
}

.barra-selecao-acoes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.barra-selecao .btn-auto {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

.barra-selecao-cancelar {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.barra-selecao-cancelar:hover {
    background: rgba(255, 255, 255, 0.08);
}

.barra-selecao-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    color: #9aa0b4;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.barra-selecao-fechar:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.barra-selecao button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Painel lateral (aberto ao clicar numa linha da listagem) */

.painel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 20, 35, 0.45);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.painel-overlay.aberto {
    opacity: 1;
    pointer-events: auto;
}

.painel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    background: var(--color-surface);
    box-shadow: -8px 0 24px rgba(16, 24, 40, 0.18);
    z-index: 960;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.painel.aberto {
    transform: translateX(0);
}

.painel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.painel-header h2 {
    font-size: 1.05rem;
    margin: 0;
}

.painel-subtitulo {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.painel-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.painel-fechar:hover {
    background: #f3f4f8;
    color: var(--color-text);
}

.painel-corpo {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.painel-carregando {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.painel-resumo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--color-primary-soft);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

.painel-resumo-label {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.painel-resumo-valor {
    font-size: 1.15rem;
    color: var(--color-primary);
    white-space: nowrap;
}

.painel-secao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.painel-secao-header h3, .painel-historico h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    font-weight: 700;
    margin: 0;
}

.painel-editar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}

.painel-editar-btn:hover {
    text-decoration: underline;
}

.painel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
}

.painel-campo-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.15rem;
}

.painel-campo-valor {
    font-size: 0.9rem;
    font-weight: 600;
}

.painel-historico {
    border-top: 1px solid var(--color-border);
    padding-top: 1.25rem;
}

.painel-historico-lista {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.painel-historico-lista li {
    display: flex;
    gap: 0.65rem;
}

.painel-historico-ponto {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.painel-historico-lista p {
    margin: 0;
    font-size: 0.85rem;
}

.painel-historico-lista time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.painel-rodape {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

.painel-rodape .btn-auto {
    width: 100%;
}

.lancamento-editar-form-acoes {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.lancamento-editar-form-acoes a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}