/* =============================================
   Luzati — Estilo Global
   Usado por todas as páginas do sistema
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 220px;
    background: #0f3460;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow: visible;
}

.sidebar-header {
    padding: 0 16px 20px;
    border-bottom: 1px solid #1a4a7a;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar h2 {
    color: white;
    text-align: center;
    font-size: 14px;
    padding: 12px 24px;
    border-bottom: 1px solid #1a4a7a;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aac4e0;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.sidebar a:hover,
.sidebar a.ativo {
    background: #1a4a7a;
    color: white;
}

.sidebar a.destaque {
    background: #f2a900;
    color: #0f3460;
    font-weight: bold;
    border-radius: 8px;
    margin: 6px 12px;
    padding: 10px 12px;
}

.sidebar a.destaque:hover,
.sidebar a.destaque.ativo {
    background: #ffbc23;
    color: #0f3460;
}

.menu-icone {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.menu-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Rodapé da sidebar: logo ── */
.sidebar-rodape {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sidebar-logo {
    width: 120px;
    height: auto;
}

/* ── Aba de minimizar/maximizar: centralizada na borda entre o menu e o conteúdo ── */
.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    width: 13px;
    height: 46px;
    border-radius: 6px;
    border: none;
    background: #2f6099;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: background 0.16s ease;
}

.sidebar-toggle:hover {
    background: #3d76b8;
}

.sidebar-toggle .seta-expandir {
    display: none;
}

/* ── Estado minimizado ── */
body.sidebar-colapsada .sidebar {
    width: 64px;
}

body.sidebar-colapsada .sidebar-header,
body.sidebar-colapsada .menu-label,
body.sidebar-colapsada .sidebar-logo {
    display: none;
}

body.sidebar-colapsada .sidebar a {
    justify-content: center;
    padding: 14px 0;
}

body.sidebar-colapsada .menu-icone {
    width: 30px;
    font-size: 22px;
}

body.sidebar-colapsada .sidebar a.destaque {
    margin: 6px 10px;
    padding: 10px 0;
}

body.sidebar-colapsada .sidebar-rodape {
    padding: 16px 0;
}

body.sidebar-colapsada .sidebar-toggle .seta-colapsar {
    display: none;
}

body.sidebar-colapsada .sidebar-toggle .seta-expandir {
    display: inline;
}

body.sidebar-colapsada .main {
    margin-left: 64px;
}

/* ── Área principal ── */
.main {
    margin-left: 220px;
    transition: margin-left 0.2s ease;
    padding: 32px;
}

/* ── Topo da página ── */
.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topo h1 {
    font-size: 24px;
    color: #0f3460;
}

/* ── Cards ── */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 16px;
    color: #0f3460;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}

/* ── Resumo (cards de totais) ── */
.resumo-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.resumo-card {
    background: white;
    border-radius: 10px;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex: 1;
}

.resumo-card span {
    font-size: 12px;
    color: #888;
    display: block;
}

.resumo-card strong {
    font-size: 22px;
    color: #0f3460;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: nowrap;
    line-height: 1.2;
}

/* Destaque maior para valores monetários no topo da página */
.resumo-card .valor {
    font-size: 26px;
}

/* Valores monetários: não truncar em nenhuma página */
.valor,
.valor-destaque {
    white-space: nowrap;
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* ── Tabela ── */
.tabela-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background: #1a4a7a;
    color: white;
    padding: 12px 16px;
    text-align: center;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.valor-col {
    white-space: nowrap;
    text-align: center;
}

/* Valores alinhados à esquerda (títulos permanecem centralizados) */
.valor-col-left {
    white-space: nowrap;
    text-align: left;
}

/* Centralizar datas com classe específica */
table tr td.date-col {
    text-align: center;
}

/* Centralizar status (6ª coluna das tabelas) */
table tr td:nth-child(6) {
    text-align: center;
}

table tr td:nth-child(6) .badge {
    margin: 0 auto;
    display: inline-flex;
}

/* Centralizar tags (7ª coluna das tabelas) */
.col-tag {
    text-align: center;
}

td[onclick*="stopPropagation"]:last-child {
    text-align: center;
}

tr:hover td {
    background: #f8f9fa;
}

/* Linha inteira destacada quando o documento está cancelado */
tr.linha-cancelada td {
    background: #fdecee;
}

tr.linha-cancelada:hover td {
    background: #fbdfe2;
}

/* ── Botões ── */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-preview,
.btn-icon {
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1;
}

.btn-primary {
    background: #0f3460;
    color: white;
}

.btn-primary:hover { background: #1a4a7a; }

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover { background: #219a52; }

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover { background: #5a6268; }

.btn-outline {
    background: transparent;
    border: 1px solid #0f3460;
    color: #0f3460;
}

.btn-outline:hover {
    background: #0f3460;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ── Input de arquivo ── */
input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background: #f8f9fa;
    border: 1px dashed #c7d0d9;
    border-radius: 10px;
    font-size: 13px;
    color: #555;
}

input[type="file"]::file-selector-button {
    padding: 9px 20px;
    margin-right: 14px;
    border: none;
    border-radius: 999px;
    background: #0f3460;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

input[type="file"]::file-selector-button:hover {
    background: #1a4a7a;
    transform: translateY(-1px);
}

/* ── Badges ── */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    word-break: keep-all;
}

.badge-ativo      { background: #d4edda; color: #155724; }
.badge-autorizada { background: #d4edda; color: #155724; }
.badge-cancelado  { background: #f8d7da; color: #721c24; }
.badge-cancelada  { background: #f8d7da; color: #721c24; }
.badge-nfe        { background: #e0f0ff; color: #0066cc; }
.badge-nfse       { background: #e0ffe0; color: #006600; }
.badge-cte        { background: #fff0e0; color: #cc6600; }
.badge-boleto     { background: #f0e0ff; color: #6600cc; }

/* ── Mensagens flash ── */
.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.flash.sucesso { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash.erro    { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Grid de campos ── */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.campo {
    margin-bottom: 4px;
}

.campo label {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.campo span {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* ── Valor em destaque ── */
.valor-destaque {
    font-size: 28px;
    color: #0f3460;
    font-weight: bold;
}

/* ── Ações ── */
.acoes {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

/* ── Estado vazio ── */
.vazio {
    text-align: center;
    padding: 60px;
    color: #888;
}

.vazio p {
    font-size: 16px;
    margin-bottom: 16px;
}

/* ── Chave de acesso ── */
.chave {
    font-family: monospace;
    font-size: 12px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    word-break: break-all;
    color: #555;
}

/* ── Filtros ── */
.filtros {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filtro-grupo label {
    font-size: 13px;
    color: #666;
    font-weight: bold;
}

.filtro-grupo-checkbox {
    justify-content: flex-end;
    min-height: 45px;
}

.filtro-grupo-direita {
    margin-left: auto;
}

.filtro-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
}

.filtro-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Mantém os botões Filtrar/Limpar sempre juntos, mesmo quando os
   campos de filtro quebram linha em telas menores */
.filtro-acoes-grupo {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Regra universal: QUALQUER elemento de controle dentro da barra de filtros
   (input, select, botão, botão de tag) usa exatamente a mesma altura e estilo
   de borda, automaticamente. Novos campos não precisam de ajuste manual.
   Checkboxes e campos de cor ficam de fora, pois são elementos pequenos
   dentro dos dropdowns (não fazem parte da fileira de filtros). */
.filtros input:not([type="checkbox"]):not([type="color"]),
.filtros select,
.filtros button:not(.btn-editar-tag):not(.btn-excluir-tag):not(.btn-criar-tag-filtro),
.filtros .tag-filtro-btn {
    min-height: 45px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid #d2d6dc;
    border-radius: 12px;
    font-size: 13px;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    color: #333;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.filtros input:not([type="checkbox"]):not([type="color"]):focus,
.filtros select:focus,
.filtros .tag-filtro-btn:focus {
    border-color: #a3bffa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.filtros input[type="date"] {
    color: #333;
}

.filtros select {
    height: 45px;
    min-width: 180px;
    padding: 0 40px 0 16px;
    border-radius: 12px;
    border: 1px solid #d2d6dc;
    background: #fff;
    background-image: linear-gradient(45deg, transparent 50%, #0f3460 50%),
                      linear-gradient(135deg, #0f3460 50%, transparent 50%),
                      linear-gradient(to right, #fff, #fff);
    background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px), 100% 0;
    background-size: 5px 5px, 5px 5px, 100% 100%;
    background-repeat: no-repeat;
    color: #0f3460;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: inset 0 0 0 1px transparent;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.filtros select:focus {
    border-color: #a3bffa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.filtros select::-ms-expand {
    display: none;
}

.filtros select option {
    background: #fff;
    color: #0f3460;
}

.filtros select option:checked,
.filtros select option[selected] {
    background: #ebf4ff;
    color: #0f3460;
}

.filtros select option:hover {
    background: #f4f7fb;
}

.filtros input[type="date"] {
    padding-right: 40px;
    position: relative;
}

.filtros input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.65;
    cursor: pointer;
    filter: invert(15%) sepia(25%) saturate(400%) hue-rotate(190deg) brightness(85%) contrast(90%);
}

/* ── Container central ── */
.container {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 24px;
}

/* ── Navbar (barra superior) ── */
.navbar {
    background: #0f3460;
    color: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 20px;
    color: white;
}

.navbar .info {
    font-size: 14px;
    opacity: 0.8;
    color: white;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.navbar a.btn-sair   { background: #e94560; }
.navbar a.btn-perfil { background: #27ae60; }

/* ── Boas-vindas ── */
.boas-vindas {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 5px solid #0f3460;
}

.boas-vindas h2 {
    color: #0f3460;
    margin-bottom: 4px;
}

.boas-vindas p {
    color: #666;
    font-size: 14px;
}

/* ── Cards de totais (dashboard) ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card-total {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-total .icone {
    font-size: 32px;
    margin-bottom: 8px;
}

.card-total h3 {
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.card-total .valor {
    font-size: 28px;
    font-weight: bold;
    color: #0f3460;
}

.card-total .total {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Link clicável do card total */
.card-total-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-total-link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s ease;
    flex: 1;
}

.card-total-link:hover {
    transform: translateY(-4px);
}

.card-total-link:hover .card-total {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card-total-form {
    margin: 0;
}

.card-total-form button {
    width: 100%;
}

/* ── Login / Cadastro ── */
.login-body {
    position: relative;
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px 0;
}

.login-topo-contato {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.login-topo-contato:hover {
    background: rgba(255,255,255,.16);
    transform: translateY(-1px);
}

.login-topo-contato-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 380px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-card h2 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.login-card .sub {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
    font-size: 14px;
}

.login-card label {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.login-card input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #0f3460;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.login-card button:hover { background: #16213e; }

.login-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.login-link a {
    color: #0f3460;
    text-decoration: none;
    font-weight: bold;
}

/* ── Destaques de recursos abaixo do login ── */
.login-features {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 1100px;
    padding: 0 24px;
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
}

.login-feature {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.login-feature:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.18);
    transform: translateY(-2px);
}

.login-feature-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

.login-feature:nth-child(1) .login-feature-icon { background: rgba(59,130,246,.22); }
.login-feature:nth-child(2) .login-feature-icon { background: rgba(168,85,247,.22); }
.login-feature:nth-child(3) .login-feature-icon { background: rgba(20,184,166,.22); }
.login-feature:nth-child(4) .login-feature-icon { background: rgba(245,158,11,.22); }

.login-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.login-feature-title {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.login-feature-desc {
    color: rgba(255,255,255,.6);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1100px) {
    .login-features {
        position: static;
        transform: none;
        margin-top: 24px;
        flex-direction: column;
        max-width: 380px;
    }

    .login-feature-title,
    .login-feature-desc {
        white-space: normal;
    }
}

/* ── Painel de informação do login (abre ao clicar num destaque) ── */
.login-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,20,.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    box-sizing: border-box;
}

.login-info-overlay.ativo {
    display: flex;
}

.login-info-modal {
    position: relative;
    background: rgba(26,26,46,.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    max-width: 760px;
    width: 100%;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    color: #fff;
}

.login-info-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,.08);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.16s ease;
}

.login-info-close:hover {
    background: rgba(255,255,255,.18);
}

.login-info-title {
    font-size: 28px;
    margin-bottom: 20px;
    padding-right: 24px;
}

.login-info-text {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,.85);
    margin-bottom: 32px;
}

#login-info-view.hidden,
.login-contato-view.hidden,
#login-contato-sucesso.hidden,
.login-contato-erro.hidden,
.login-contato-form.hidden {
    display: none;
}

.login-contato-form label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255,255,255,.75);
    font-size: 13px;
    font-weight: 600;
}

.login-contato-form input,
.login-contato-form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.login-contato-form textarea {
    resize: vertical;
}

.login-contato-form input::placeholder,
.login-contato-form textarea::placeholder {
    color: rgba(255,255,255,.35);
}

.login-contato-form input:focus,
.login-contato-form textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,.4);
}

.login-contato-erro {
    color: #ff9aa2;
    font-size: 13px;
    margin-bottom: 12px;
}

.login-contato-enviar {
    width: 100%;
    justify-content: center;
}

.login-info-footer {
    display: flex;
    justify-content: flex-end;
}

.login-info-contato {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #0f3460, #1a4a7a);
    color: #fff;
    border: none;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.login-info-contato:hover {
    background: linear-gradient(90deg, #1a4a7a, #2f6099);
    transform: translateY(-1px);
}

/* ── Configurar Consulta ── */
.status {
    background: #f8f9ff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.status-row span:first-child { color: #666; }
.status-row span:last-child  { color: #333; font-weight: bold; }

.opcao {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.opcao:hover {
    border-color: #0f3460;
    background: #f8f9ff;
}

.opcao input { margin-right: 10px; }

.opcao label {
    display: inline;
    font-weight: normal;
    cursor: pointer;
}

.opcao .desc {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    margin-left: 24px;
}

.voltar {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #0f3460;
    text-decoration: none;
    font-size: 14px;
}

/* ── Formulários (inputs e selects gerais) ── */
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-wide {
    padding: 12px 24px;
    white-space: nowrap;
}

.acao-topo {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

/* ── Navbar perfil hover ── */
.navbar-perfil {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.navbar-perfil:hover {
    background: rgba(255,255,255,0.15);
}

/* ── Paginação ─────────────────────────────────────── */
.paginacao-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.paginacao-por-pagina {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted, #888);
}

.paginacao-por-pagina select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: white;
}

.paginacao-nums {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    background: white;
    transition: all 0.15s;
}

.pag-btn:hover {
    background: #f0f2f5;
    border-color: #bbb;
}

.pag-ativo {
    background: #0f3460 !important;
    color: white !important;
    border-color: #0f3460 !important;
    font-weight: 600;
}

.pag-reticencias {
    font-size: 13px;
    color: #aaa;
    padding: 0 4px;
}

.paginacao-info {
    font-size: 12px;
    color: #aaa;
    margin-left: auto;
}

/* ─── Tags ─────────────────────────────────────── */
.tag-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap; /* keep pill + button on same line */
    position: relative;
    overflow: hidden;
    min-width: 0;
    z-index: 1;
}

.col-tag {
    width: 180px;
    min-width: 180px;
    max-width: 220px;
    vertical-align: middle;
    white-space: nowrap;
}

.col-tag .tag-cell {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px;
}

.col-tag .tag-pill,
.col-tag .tag-add-btn {
    max-width: none;
}

.col-tag .tag-pill {
    max-width: none;
    overflow: visible;
    text-overflow: initial;
    white-space: nowrap;
}

.col-tag .tag-add-btn {
    flex: 0 0 auto;
}

/* ensure the add button aligns vertically within the constrained tag column */
.col-tag .tag-add-btn {
    align-self: center;
    padding: 6px 10px;
}

.tag-pill {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-height: 34px;
}

.tag-pill-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,0.18);
    border-radius: 5px;
    font-size: 10px;
}

.tag-add-btn {
    color: #3b3b3b;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #d6d6d6;
    background: #f5f5f7;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-height: 32px;
    white-space: nowrap;
    transition: background 0.16s ease, transform 0.16s ease;
}

.tag-add-btn:hover {
    background: #eaeaec;
    transform: translateY(-1px);
}

.tag-dropdown,
.tag-filtro-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 52, 96, 0.12);
    min-width: 220px;
    max-width: 320px;
    z-index: 250;
    padding: 12px;
    opacity: 0;
    transform: translateY(-8px);
    animation: dropdownFadeIn 0.18s ease-out forwards;
    box-sizing: border-box;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tag-dropdown-item,
.tag-dropdown-item-selected,
.tag-filtro-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.16s ease;
}

.tag-dropdown-item.selected,
.tag-filtro-item.selected {
    background: #ebf4ff;
    font-weight: 600;
}

.tag-dropdown-item:hover,
.tag-filtro-item:hover {
    background: #f4f7fb;
}

.tag-dropdown-item input[type="checkbox"],
.tag-filtro-item input[type="checkbox"] {
    margin: 0;
}

.tag-dropdown-color,
.tag-filtro-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-dropdown-nova {
    border-top: 1px solid #e8edf5;
    margin-top: 10px;
    padding-top: 10px;
}

.tag-dropdown-nova input[type="text"] {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 6px;
}

.tag-dropdown-nova button {
    width: 100%;
    padding: 5px;
    border: none;
    border-radius: 4px;
    background: #0f3460;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

/* ─── Filtro de Tag ────────────────────────────────── */
.tag-filtro-btn {
    width: 100%;
    min-width: 110px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.tag-filtro-btn:hover {
    background: #f5f5f5;
}

.tag-filtro-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.16s ease;
}

.tag-filtro-item:hover {
    background: #f4f7fb;
}

.tag-filtro-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    cursor: pointer;
    font-size: 13px;
}

.tag-filtro-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-filtro-acoes {
    display: flex;
    gap: 4px;
}

.tag-filtro-acoes button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    border-radius: 4px;
}

.tag-filtro-acoes button:hover {
    background: #e8e8e8;
}

.tag-filtro-nova {
    border-top: 1px solid #eee;
    margin-top: 6px;
    padding-top: 8px;
}

.tag-filtro-nova input[type="text"] {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 6px;
}

.tag-filtro-nova input[type="color"] {
    width: 100%;
    height: 28px;
    margin-bottom: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tag-filtro-nova button {
    width: 100%;
    padding: 5px;
    border: none;
    border-radius: 4px;
    background: #0f3460;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

/* ─── Flatpickr Customização ────────────────────────────────── */
.datepicker {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.datepicker:focus {
    outline: none;
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}

.flatpickr-calendar {
    background: #1a1a2e;
    border: 1px solid #2d3e5f;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.flatpickr-calendar.open {
    z-index: 1000;
}

.flatpickr-days {
    padding: 10px 0;
}

.flatpickr-day {
    color: #aaa;
    border-radius: 6px;
    margin: 2px;
    width: calc(14.2857% - 4px);
}

.flatpickr-day:hover {
    background: #2d3e5f;
    color: #fff;
    border-color: #0f3460;
}

.flatpickr-day.selected {
    background: #0f3460;
    border-color: #0f3460;
    color: #fff;
}

.flatpickr-day.today {
    border-color: #0f3460;
    color: #0f3460;
    font-weight: bold;
}

.flatpickr-weekdays {
    background: #0f3460;
    color: #fff;
}

.flatpickr-weekday {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.flatpickr-months {
    background: #0f3460;
    padding: 10px 0;
}

.flatpickr-month {
    color: #fff;
    font-weight: 600;
}

.flatpickr-current-month {
    color: #fff;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #0f3460;
    color: #fff;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #fff;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: #aaa;
}

/* ─── Choices.js Customização ────────────────────────────────── */
.choices {
    position: relative;
    margin-bottom: 0;
}

.choices-status {
    width: 100%;
}

.choices-status__inner {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 2px solid #e5e9f0;
    border-radius: 10px;
    min-height: 45px;
    padding: 10px 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 8px;
}

.choices-status.is-open .choices-status__inner {
    border-color: #0f3460;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.choices-status.is-focused .choices-status__inner {
    border-color: #0f3460;
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.choices-status__input {
    background-color: transparent;
    border: none;
    color: #1f2937;
    font-size: 14px;
    padding: 0;
    margin: 0;
    font-family: inherit;
    outline: none;
    font-weight: 500;
}

.choices-status__input::placeholder {
    color: #9ca3af;
}

.choices-status__list {
    background: #ffffff;
    border: 2px solid #0f3460;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(15, 52, 96, 0.15);
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 52, 96, 0.2) transparent;
}

.choices-status__list::-webkit-scrollbar {
    width: 6px;
}

.choices-status__list::-webkit-scrollbar-track {
    background: transparent;
}

.choices-status__list::-webkit-scrollbar-thumb {
    background: rgba(15, 52, 96, 0.2);
    border-radius: 3px;
}

.choices-status__list::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 52, 96, 0.3);
}

.choices-status__list--dropdown {
    z-index: 100;
}

.choices-status__item--choice {
    padding: 12px 16px;
    color: #4b5563;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.choices-status__item--choice:hover {
    background: linear-gradient(135deg, #f3f7ff 0%, #e8eef7 100%);
    color: #0f3460;
    padding-left: 20px;
}

.choices-status__item--selectable {
    cursor: pointer;
}

.choices-status__item--selected {
    background: linear-gradient(135deg, #0f3460 0%, #1a4d7a 100%);
    color: #fff;
    border-bottom: 1px solid #0d2a47;
    font-weight: 600;
}

.choices-status__item--selected:hover {
    background: linear-gradient(135deg, #0d2a47 0%, #0b1f33 100%);
    color: #fff;
}

.choices-status__placeholder {
    color: #9ca3af;
    font-size: 14px;
}

/* Customizar o ícone de dropdown */
.choices-status__inner::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) scaleY(0.7);
    color: #0f3460;
    font-size: 12px;
    pointer-events: none;
    transition: transform 0.2s ease;
    font-weight: bold;
}

.choices-status.is-open .choices-status__inner::after {
    transform: translateY(-50%) scaleY(0.7) rotate(180deg);
}

/* ── Observações de documentos (NF-e/NFS-e/CT-e) ── */
.btn-observacoes {
    position: relative;
}

.obs-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.observacoes-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.observacoes-overlay.hidden {
    display: none;
}

.observacoes-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.observacoes-modal {
    position: relative;
    width: 95%;
    max-width: 520px;
    max-height: 82vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.observacoes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.observacoes-header h3 {
    font-size: 16px;
    color: #0f3460;
}

.observacoes-close {
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.observacoes-lista {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.observacoes-vazio {
    color: #999;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

.observacao-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 14px;
}

.observacao-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.observacao-meta {
    font-size: 11px;
    color: #999;
}

.observacao-item-acoes {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.observacao-item-acoes button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.7;
}

.observacao-item-acoes button:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.observacao-status {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.observacao-status-opcao {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eee;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.observacao-status-opcao input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.observacao-status-opcao.ativa {
    font-weight: bold;
}

.observacao-status-opcao:nth-child(1).ativa {
    background: #fff3cd;
    color: #8a6d00;
}

.observacao-status-opcao:nth-child(2).ativa {
    background: #d4edda;
    color: #155724;
}

.observacao-texto {
    font-size: 14px;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.observacao-edicao-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.observacao-anexos {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.observacao-anexo-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8eef5;
    border-radius: 999px;
    padding: 4px 6px 4px 10px;
}

.observacao-anexo-link {
    font-size: 12px;
    color: #0f3460;
    text-decoration: none;
}

.observacao-anexo-item:hover {
    background: #d5e0ee;
}

.observacao-anexo-excluir {
    border: none;
    background: none;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 50%;
}

.observacao-anexo-excluir:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.12);
}

.observacoes-form {
    border-top: 1px solid #eee;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.observacoes-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.observacoes-form-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.observacoes-form-linha input[type="file"] {
    flex: 1;
    margin-bottom: 0;
    padding: 8px;
    font-size: 12px;
}