/* =============================================
   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;
}

.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: block;
    color: #aac4e0;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 14px;
}

.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;
}

/* ── Área principal ── */
.main {
    margin-left: 220px;
    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: #0f3460;
    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;
}

/* 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 {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.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;
}

/* ── 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);
}