/**
 * Perito Judicial Manager - Estilos Customizados & Design System
 * Subdomínio: painelperito.familiadiogo.com.br
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #2F5240;
    --accent-hover: #3A6650;
    --emerald-primary: #059669;
    --amber-primary: #d97706;
    --rose-primary: #e11d48;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #0b0f19;
    color: #f1f5f9;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Animação de pulso para prazos que vencem hoje */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
        transform: scale(1.02);
    }
}

.badge-hoje {
    background-color: #ffe4e6 !important;
    color: #9f1239 !important;
    border: 1px solid #fda4af !important;
    animation: pulse-glow 2s infinite ease-in-out;
}

.badge-vencido {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.badge-amanha {
    background-color: #ffedd5 !important;
    color: #9a3412 !important;
    border: 1px solid #fdba74 !important;
}

.badge-urgente {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
}

.badge-normal {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge-protocolado {
    background-color: #e0e7ff !important;
    color: #3730a3 !important;
    border: 1px solid #c7d2fe !important;
}

/* Kanban Columns & Cards */
.kanban-col {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid #1e293b;
    border-radius: 1rem;
    flex: 1 1 0;
    min-width: 280px;
    max-width: none;
}

.kanban-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
}

.kanban-card:hover {
    border-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.kanban-card:active {
    cursor: grabbing;
}

/* Modais */
.modal-overlay {
    background-color: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: #064e3b;
    color: #ecfdf5;
    border-left: 4px solid #10b981;
}

.toast-error {
    background: #4c0519;
    color: #fff1f2;
    border-left: 4px solid #f43f5e;
}

.toast-info {
    background: #1e293b;
    color: #f1f5f9;
    border-left: 4px solid #38bdf8;
}


/* ==========================================================================
   MAPA DO BRASIL (v3.0.0)
   ========================================================================== */
.mapa-wrap { position: relative; width: 100%; max-width: 640px; margin: 0 auto; }
.mapa-svg { width: 100%; height: auto; display: block; }
.mapa-area { stroke: #0f172a; stroke-width: 1; cursor: pointer; transition: fill 0.15s ease, filter 0.15s ease; outline: none; }
.mapa-tooltip { position: absolute; top: 0; left: 0; z-index: 20; pointer-events: none; width: 250px; padding: 12px 14px;
    background: rgba(15,23,42,0.97); border: 1px solid #334155; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.mapa-tooltip.hidden { display: none; }
.mapa-tip-sigla { font-size: 15px; font-weight: 700; color: #f8fafc; }
.mapa-tip-nome { font-size: 11px; color: #94a3b8; margin-bottom: 8px; line-height: 1.3; }
.mapa-tip-linha { display: flex; justify-content: space-between; font-size: 12px; color: #cbd5e1; padding: 2px 0; }
.mapa-tip-alerta { color: #fb7185; }
.justica-btn { color: #94a3b8; }
.justica-btn:hover { color: #e2e8f0; }


/* ==========================================================================
   LAYOUT EXPANDIDO (v3.1.0) — aproveita monitores largos (1920px)
   ========================================================================== */
.app-wrap { max-width: 1840px; }
@media (min-width: 2200px) { .app-wrap { max-width: 2100px; } }

/* Kanban: colunas dividem a largura; só rola na horizontal quando não couber */
#kanban-board { gap: 1rem; scrollbar-width: auto; scrollbar-color: #64748b #1e293b; padding-bottom: 1rem; }
#kanban-board::-webkit-scrollbar { height: 16px; }
#kanban-board::-webkit-scrollbar-track { background: #1e293b; border-radius: 9999px; }
#kanban-board::-webkit-scrollbar-thumb { background: #64748b; border-radius: 9999px; border: 3px solid #1e293b; }
#kanban-board::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Rolagem vertical dentro das colunas e dos painéis: mais larga e altura segue a tela */
.kanban-col-lista { max-height: none !important; overflow-y: visible !important; }
.kanban-col-lista::-webkit-scrollbar, .painel-lista::-webkit-scrollbar { width: 10px; }
.kanban-col-lista::-webkit-scrollbar-thumb, .painel-lista::-webkit-scrollbar-thumb { background: #64748b; border: 2px solid #0f172a; }
.painel-lista { max-height: max(300px, calc(100vh - 640px)); }

/* Mapa maior em telas largas, sem passar da altura da janela */
.mapa-wrap { max-width: 900px; }
.mapa-svg { max-height: calc(100vh - 240px); }
.kanban-col { height: auto !important; align-self: stretch; }
.kanban-col-lista { min-height: 220px; max-height: none !important; overflow-y: visible !important; }


/* ==========================================================================
   PALETA VERDE (#263E32) + OURO (#AF8939) — v3.3.0
   ========================================================================== */
:root {
    --verde-900: #16231C; --verde-800: #263E32; --verde-700: #2F5240; --verde-600: #3A6650; --verde-500: #4A7D63;
    --ouro-700: #8A6C2B;  --ouro-600: #AF8939;  --ouro-500: #C4A052;  --ouro-400: #D4B574; --ouro-300: #E3CD9C;
}

/* Mapa */
.mapa-area { stroke: #0b0f19; }
.mapa-tip-dica { margin-top: 6px; font-size: 10px; color: var(--ouro-400); }
.justica-btn.ativo { background: var(--verde-700); color: #F3E8CB; box-shadow: 0 4px 12px rgba(38,62,50,0.55), inset 0 0 0 1px var(--ouro-600); }

/* Troca do azul padrão pela paleta verde/ouro em todo o painel */
.bg-blue-600 { background-color: var(--verde-700) !important; }
.hover\:bg-blue-500:hover { background-color: var(--verde-600) !important; }
.active\:bg-blue-700:active { background-color: var(--verde-800) !important; }
.bg-blue-950 { background-color: var(--verde-900) !important; }
.bg-blue-600\/10, .bg-blue-500\/10 { background-color: rgba(47,82,64,0.35) !important; }
.text-blue-300 { color: var(--ouro-300) !important; }
.text-blue-400, .hover\:text-blue-400:hover { color: var(--ouro-400) !important; }
.text-blue-500 { color: var(--ouro-500) !important; }
.text-blue-600 { color: var(--ouro-600) !important; }
.hover\:text-blue-300:hover { color: var(--ouro-300) !important; }
.border-blue-800 { border-color: var(--verde-600) !important; }
.border-blue-500, .focus\:border-blue-500:focus { border-color: var(--ouro-600) !important; }
.border-blue-500\/20 { border-color: rgba(175,137,57,0.3) !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: var(--ouro-600) !important; }
.shadow-blue-600\/20, .shadow-blue-500\/10 { --tw-shadow-color: rgba(38,62,50,0.5) !important; }
.selection\:bg-blue-600 *::selection, .selection\:bg-blue-600::selection { background: var(--verde-700); }
.tab-btn.active { border-color: var(--ouro-600) !important; color: var(--ouro-400) !important; }

/* Página inicial minimalista: mapa grande, regiões coloridas com relevo; o resto nos cantos */
.mapa-inicio { position: relative; display: flex; flex-direction: column; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.mapa-cabeca h1 { letter-spacing: -0.01em; }
.mapa-resumo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; margin-top: 0.35rem; font-size: 13px; color: #94a3b8; }
.mapa-resumo strong { color: #F3E8CB; font-weight: 600; }
.mapa-resumo i { font-style: normal; color: #475569; }
.mapa-resumo em { flex-basis: 100%; font-style: normal; font-size: 11px; color: #64748b; }
.mapa-resumo-alerta strong { color: var(--ouro-500); }
.mapa-acoes { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.mapa-links { display: flex; gap: 1.1rem; padding: 0 0.25rem; }
.mapa-links button { font-size: 12px; font-weight: 600; color: #94a3b8; transition: color .15s; }
.mapa-links button:hover { color: var(--ouro-400); }
.mapa-inicio .mapa-wrap { position: relative; max-width: none; width: 100%; display: flex; justify-content: center; }
.mapa-inicio .mapa-svg { width: 100%; max-width: 760px; height: auto; max-height: none; overflow: visible;
    filter: drop-shadow(0 14px 22px rgba(0,0,0,0.45)); }
.mapa-legenda { display: flex; flex-direction: column; gap: 0.5rem; font-size: 11px; color: #94a3b8; }
.mapa-legenda-regioes, .mapa-legenda-selos { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.mapa-legenda span { display: inline-flex; align-items: center; gap: 0.45rem; }
.mapa-leg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.mapa-leg-selo { display: inline-block; width: 12px; height: 12px; border-radius: 9999px; background: #16231C; border: 1.5px solid #F3E8CB; }
.mapa-leg-selo-critico { background: var(--ouro-600); border-color: #FFF4D6; }

/* Telas largas: mapa ocupa a altura toda; título, botões e legenda ficam nos cantos */
@media (min-width: 1200px) {
    .mapa-inicio { display: block; height: calc(100vh - 64px); min-height: 620px; }
    .mapa-inicio .mapa-wrap { position: absolute; inset: 1.25rem 0; }
    .mapa-inicio .mapa-svg { height: 100%; width: auto; max-width: calc(100% - 2 * 290px); }
    .mapa-cabeca { position: absolute; top: 1.5rem; left: 2rem; z-index: 2; max-width: 290px; }
    .mapa-acoes { position: absolute; top: 1.5rem; right: 2rem; z-index: 2; align-items: flex-end; }
    .mapa-legenda { position: absolute; bottom: 1.5rem; left: 2rem; z-index: 2; max-width: 260px; }
    .mapa-legenda-regioes { flex-direction: column; }
}

/* Estados: face colorida pela região, divisa fina; regiões: divisa 4x mais grossa */
.mapa-area { stroke: rgba(11,15,25,0.55); stroke-width: 0.75; cursor: pointer; transition: transform .18s ease, filter .18s ease; outline: none; }
.mapa-area.mapa-hover, .mapa-area:focus { transform: translateY(-3px); filter: brightness(1.12) drop-shadow(0 3px 4px rgba(0,0,0,0.35)); }
.mapa-relevo path { stroke-width: 1.5; }
.mapa-divisa-regiao { fill: none; stroke: #0b0f19; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.mapa-rotulo { font-size: 9px; font-weight: 700; letter-spacing: 0.02em; pointer-events: none; }
.mapa-selo { pointer-events: none; }
.mapa-selo circle { fill: #16231C; stroke: #F3E8CB; stroke-width: 1.2; }
.mapa-selo text { font-size: 7px; font-weight: 700; fill: #F3E8CB; }
.mapa-selo-critico circle { fill: var(--ouro-600); stroke: #FFF4D6; }
.mapa-selo-critico text { fill: #16231C; }

/* Painel de Cadastros */
.cad-col { background: rgba(15,23,42,0.75); border: 1px solid #1e293b; border-radius: 1rem; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cad-col-ativo { border-top: 3px solid var(--verde-600); }
.cad-col-aguardando { border-top: 3px solid var(--ouro-600); }
.cad-col-negado { border-top: 3px solid #8B3A3A; }
.cad-card { background: rgba(30,41,59,0.7); border: 1px solid #334155; border-radius: 0.75rem; padding: 0.75rem; }
.cad-obs { width: 100%; background: #0f172a; border: 1px solid #334155; border-radius: 0.5rem; padding: 0.4rem 0.6rem; font-size: 12px; color: #e2e8f0; resize: vertical; }
.cad-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 11px; font-weight: 600; padding: 0.2rem 0.55rem;
    border-radius: 9999px; background: rgba(47,82,64,0.35); border: 1px solid var(--verde-600); color: var(--ouro-300); max-width: 100%; }
.cad-link:hover { border-color: var(--ouro-600); color: #fff; }
.cad-obs:focus { outline: none; border-color: var(--ouro-600); }

/* Login: selo do perito (v3.5.0) */
.login-selo { width: 112px; height: 112px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,0.5)); }

/* Etiquetas da lista de prazos e movimentações (v3.7.2) */
.tag-mov, .tag-ref { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; font-size: 12px; font-weight: 600; border-radius: 0.375rem; line-height: 1.4; }
.tag-mov { background: var(--verde-700); color: #F3E8CB; border: 1px solid var(--verde-500); }
.tag-ajg, .tag-paga { display: inline-flex; align-items: center; padding: 0.1rem 0.55rem; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; border-radius: 999px; line-height: 1.5; white-space: nowrap; }
.tag-ajg { background: rgba(143,179,156,0.14); color: #B9D3C2; border: 1px solid var(--verde-500); }
.tag-paga { background: rgba(175,137,57,0.18); color: var(--ouro-300); border: 1px solid var(--ouro-600); }
#single-custeio-badge .tag-ajg, #single-custeio-badge .tag-paga { font-size: 12px; padding: 0.15rem 0.7rem; }
.tag-ref { background: rgba(175,137,57,0.14); color: var(--ouro-300); border: 1px solid var(--ouro-700); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   LOGIN (v3.8.0): vidro, profundidade e borda dourada animada
   ========================================================================== */
#view-auth {
    background:
        radial-gradient(1100px 600px at 50% -10%, rgba(47,82,64,0.38), transparent 60%),
        radial-gradient(900px 500px at 90% 110%, rgba(175,137,57,0.12), transparent 60%),
        #070a12 !important;
    perspective: 1200px;
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; pointer-events: none;
    animation: login-flutua 18s ease-in-out infinite alternate; }
.login-orb-1 { width: 440px; height: 440px; background: #2F5240; top: -140px; left: -100px; }
.login-orb-2 { width: 360px; height: 360px; background: rgba(175,137,57,0.5); bottom: -150px; right: -80px; animation-duration: 23s; }
@keyframes login-flutua { to { transform: translate(70px, 50px) scale(1.1); } }

.login-card {
    background: linear-gradient(160deg, rgba(24,41,32,0.72), rgba(13,19,32,0.82));
    border: 1px solid rgba(175,137,57,0.22);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.06);
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
    will-change: transform;
}
.login-card .login-selo { transform: translateZ(50px); animation: selo-flutua 6s ease-in-out infinite;
    filter: drop-shadow(0 16px 22px rgba(0,0,0,0.55)) drop-shadow(0 0 22px rgba(175,137,57,0.28)); }
@keyframes selo-flutua { 50% { transform: translateZ(50px) translateY(-6px); } }
.login-card h1, .login-card form { transform: translateZ(20px); }

/* Campos escuros, inclusive quando o navegador preenche sozinho */
#view-auth input { background: rgba(7,10,18,0.55) !important; border-color: rgba(148,163,184,0.18) !important; }
#view-auth input:focus { border-color: var(--ouro-600) !important; box-shadow: 0 0 0 3px rgba(175,137,57,0.18) !important; outline: none; }
#view-auth input:-webkit-autofill, #view-auth input:-webkit-autofill:hover, #view-auth input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f1f5f9; caret-color: #f1f5f9;
    -webkit-box-shadow: 0 0 0 1000px #0d1420 inset !important; transition: background-color 9999s ease-out; }

/* Botão: vidro verde translúcido com borda dourada girando e um brilho ao passar o mouse */
@property --login-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.btn-login-ouro { position: relative; isolation: isolate; overflow: hidden; border-radius: 0.9rem;
    background: rgba(47,82,64,0.32); color: #F3E8CB; letter-spacing: 0.02em;
    backdrop-filter: blur(6px); box-shadow: 0 12px 30px -12px rgba(175,137,57,0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn-login-ouro::before { content: ''; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; z-index: -1;
    background: conic-gradient(from var(--login-ang), rgba(175,137,57,0.12), #E3CD9C 10%, #AF8939 20%, rgba(175,137,57,0.12) 35%,
        rgba(175,137,57,0.12) 60%, #D4B574 72%, rgba(175,137,57,0.12) 85%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
    animation: login-borda 4s linear infinite; }
.btn-login-ouro::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,240,200,0.22), transparent); transform: skewX(-20deg); transition: left 0.7s ease; }
.btn-login-ouro:hover { transform: translateY(-1px); background: rgba(58,102,80,0.42); box-shadow: 0 16px 36px -12px rgba(175,137,57,0.6); }
.btn-login-ouro:hover::after { left: 130%; }
.btn-login-ouro:active { transform: translateY(0); }
.btn-login-ouro:disabled { opacity: 0.7; cursor: wait; }
@keyframes login-borda { to { --login-ang: 360deg; } }

@media (prefers-reduced-motion: reduce) {
    .login-orb, .login-card .login-selo, .btn-login-ouro::before { animation: none; }
    .login-card { transition: none; }
}

/* ==========================================================================
   PAINEL FINANCEIRO (v3.10.0)
   ========================================================================== */

.fin-filtros { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.fin-tile { background: rgba(15,23,42,0.75); border: 1px solid #1e293b; border-radius: 1rem; padding: 1rem 1.1rem; }
.fin-tile-rotulo { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #94a3b8; }
.fin-tile-valor { font-size: 1.45rem; font-weight: 700; color: #f1f5f9; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.fin-tile-detalhe { font-size: 11px; color: #64748b; margin-top: .2rem; }
.fin-tile-verde { border-top: 3px solid #4A7D63; }
.fin-tile-ouro { border-top: 3px solid #C4A052; }
.fin-tile-destaque { border-top: 3px solid var(--ouro-600); background: linear-gradient(180deg, rgba(175,137,57,0.10), rgba(15,23,42,0.75)); }
.fin-tile-destaque .fin-tile-valor { color: var(--ouro-300); }
.fin-tile-alerta { border-top: 3px solid #8B3A3A; }
.fin-tile-alerta .fin-tile-valor { color: #F0B4B4; }

.fin-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .fin-grid-2 { grid-template-columns: 1fr 1fr; } .fin-grid-assim { grid-template-columns: 3fr 2fr; } }
.fin-card, .fin-bloco { background: rgba(15,23,42,0.75); border: 1px solid #1e293b; border-radius: 1rem; padding: 1.1rem 1.2rem; }
.fin-card-paga { border-top: 3px solid var(--ouro-600); }
.fin-card-ajg { border-top: 3px solid #8FB39C; }
.fin-card-total { font-size: 1.6rem; font-weight: 700; color: #f1f5f9; font-variant-numeric: tabular-nums; }
.fin-card-linhas { margin-top: .9rem; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1.5rem; font-size: 12px; color: #94a3b8; }
.fin-card-linhas strong { color: #e2e8f0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fin-card-linhas .fin-destaque strong { color: var(--ouro-300); }
.fin-card-linhas .fin-alerta strong { color: #F0B4B4; }

.fin-barra { display: flex; gap: 2px; height: 10px; border-radius: 4px; overflow: hidden; background: #1e293b; }
.fin-barra span { display: block; min-width: 3px; transition: filter .15s; }
.fin-barra span:hover { filter: brightness(1.25); }
.fin-barra-alta { height: 22px; border-radius: 6px; }
.fin-barra-vazia { opacity: .6; }
.fin-legenda { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: .75rem; font-size: 12px; color: #94a3b8; }
.fin-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
.fin-legenda strong { color: #e2e8f0; font-weight: 600; margin-left: .25rem; }

.fin-bloco-cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.fin-bloco-cabeca h2 { font-size: 13px; font-weight: 700; color: #f1f5f9; }
.fin-bloco-cabeca span { font-size: 11px; color: #64748b; }

.fin-trib { display: grid; grid-template-columns: 110px 1fr 150px; align-items: center; gap: .75rem; padding: .35rem 0; }
.fin-trib-nome { display: flex; flex-direction: column; font-size: 12px; color: #e2e8f0; line-height: 1.2; }
.fin-trib-nome span { font-size: 10px; color: #64748b; }
.fin-trib-valor { text-align: right; font-size: 12px; font-weight: 600; color: #e2e8f0; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.fin-trib-valor em { font-style: normal; font-size: 10px; font-weight: 500; color: #F0B4B4; }

.fin-fase { display: grid; grid-template-columns: 1fr 40px 120px; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid #1e293b; font-size: 12px; color: #94a3b8; }
.fin-fase-qtd { text-align: center; color: #e2e8f0; }
.fin-fase-val { text-align: right; color: #e2e8f0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fin-pendencia { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: .5rem .7rem; margin-bottom: .4rem;
    border: 1px solid #3b2a2a; background: rgba(139,58,58,0.10); border-radius: .6rem; font-size: 12px; color: #e2e8f0; transition: border-color .15s; }
.fin-pendencia:hover { border-color: #8B3A3A; }
.fin-pendencia small { font-size: 10.5px; color: #94a3b8; }

.fin-tabela { width: 100%; border-collapse: collapse; font-size: 12px; }
.fin-tabela th { text-align: left; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #64748b; padding: .5rem .6rem; border-bottom: 1px solid #334155; white-space: nowrap; }
.fin-tabela td { padding: .55rem .6rem; border-bottom: 1px solid #1e293b; color: #cbd5e1; vertical-align: middle; }
.fin-tabela td small { display: block; font-size: 10.5px; color: #64748b; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-tabela .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-tabela tbody tr { cursor: pointer; transition: background .12s; }
.fin-tabela tbody tr:hover { background: rgba(47,82,64,0.25); }
.fin-sem-valor { font-size: 11px; font-weight: 600; color: #F0B4B4; }
@media (max-width: 640px) { .fin-trib { grid-template-columns: 80px 1fr 110px; } .fin-card-linhas { grid-template-columns: 1fr; } }

/* ==========================================================================
   TELA DO MAPA: seletor deslizante, botões e coluna lateral (v3.11.0)
   ========================================================================== */
.mapa-acoes { width: 100%; max-width: 420px; align-items: stretch !important; gap: 0.85rem; }
@media (min-width: 1200px) { .mapa-acoes { width: 330px; bottom: 1.5rem; } .mapa-inicio .mapa-svg { max-width: calc(100% - 2 * 340px); } }

.justica-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 14px;
    background: rgba(8,12,20,0.85); border: 1px solid #1e293b; box-shadow: inset 0 2px 6px rgba(0,0,0,0.45); }
.justica-pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 10px;
    background: linear-gradient(180deg, #3A6650, #263E32);
    box-shadow: 0 6px 16px rgba(38,62,50,0.55), inset 0 0 0 1px var(--ouro-600), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform .42s cubic-bezier(.65,0,.25,1); }
.justica-switch.trabalho .justica-pill { transform: translateX(100%); }
.justica-opcao { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.6rem 0.3rem; font-size: 12px; font-weight: 600; color: #94a3b8; border-radius: 10px; transition: color .3s; white-space: nowrap; }
.justica-opcao:hover { color: #e2e8f0; }
.justica-opcao.ativo { color: #F3E8CB; }
.justica-opcao.ativo svg { color: var(--ouro-400); }
.justica-opcao:focus-visible { outline: 2px solid var(--ouro-500); outline-offset: 2px; }

.mapa-botoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.mapa-botoes:has(#btn-cadastros.hidden) { grid-template-columns: repeat(2, 1fr); }
.mapa-botao { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.7rem 0.4rem;
    font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; color: #cbd5e1;
    background: rgba(15,23,42,0.8); border: 1px solid #1e293b; border-radius: 12px; transition: transform .15s, border-color .15s, color .15s, background .15s; }
.mapa-botao svg { color: #8FB39C; }
.mapa-botao:hover { transform: translateY(-2px); border-color: var(--verde-500); color: #F3E8CB; background: rgba(38,62,50,0.35); }
.mapa-botao-ouro { color: var(--ouro-300); background: rgba(175,137,57,0.10); border-color: var(--ouro-700); }
.mapa-botao-ouro svg { color: var(--ouro-400); }
.mapa-botao-ouro:hover { border-color: var(--ouro-500); background: rgba(175,137,57,0.20); }

.mapa-lado { display: flex; flex-direction: column; gap: 0.85rem; min-height: 0; overflow-y: auto; }
.lado-card { background: rgba(15,23,42,0.72); border: 1px solid #1e293b; border-radius: 14px; padding: 0.85rem 0.9rem; }
.lado-cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.lado-cabeca h2 { font-size: 12.5px; font-weight: 700; color: #f1f5f9; }
.lado-cabeca span { font-size: 10.5px; color: #64748b; }
.lado-vazio { font-size: 11.5px; color: #64748b; padding: 0.25rem 0; }
.lado-trib { display: grid; grid-template-columns: 1fr 34px 108px; align-items: center; width: 100%; padding: 0.42rem 0.45rem;
    border-radius: 8px; font-size: 12px; color: #cbd5e1; text-align: left; transition: background .12s; }
.lado-trib:hover { background: rgba(47,82,64,0.35); }
.lado-trib-cod { font-weight: 700; color: #F3E8CB; display: inline-flex; align-items: center; gap: 0.35rem; }
.lado-trib-qtd { text-align: center; color: #94a3b8; }
.lado-trib-val { text-align: right; font-variant-numeric: tabular-nums; color: #e2e8f0; }
.lado-ponto { width: 7px; height: 7px; border-radius: 9999px; background: var(--ouro-500); box-shadow: 0 0 0 3px rgba(196,160,82,0.18); }
.lado-mais { width: 100%; margin-top: 0.25rem; font-size: 11px; font-weight: 600; color: var(--ouro-400); text-align: center; padding: 0.3rem; }
.lado-prazo { display: flex; flex-direction: column; gap: 0.2rem; width: 100%; text-align: left; padding: 0.5rem 0.45rem; border-radius: 8px;
    border-bottom: 1px solid #1e293b; transition: background .12s; }
.lado-prazo:last-child { border-bottom: 0; }
.lado-prazo:hover { background: rgba(47,82,64,0.35); }
.lado-prazo-titulo { font-size: 12px; font-weight: 600; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lado-prazo-info { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 10.5px; color: #64748b; }
.lado-prazo-badge { padding: 0.05rem 0.45rem; border-radius: 6px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .justica-pill { transition: none; } .mapa-botao:hover { transform: none; } }
