/* ====== Base responsiva dos cards do painel ====== */
.card.card-painel{
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  border-radius: 1px;        /* cantos quase retos */
  overflow: hidden;
}

/* Alturas responsivas por breakpoint */
@media (min-width: 1px){        /* Desktop */
  .card.card-painel{ height: 160px !important; min-height: 160px !important; max-height: 160px !important; }
}
@media (min-width: 768px) and (max-width: 991.98px){  /* Tablet */
  .card.card-painel{ height: 120px !important; min-height: 120px !important; max-height: 120px !important; }
}
@media (max-width: 767.98px){     /* Celular */
  .card.card-painel{ height: 140px !important; min-height: 140px !important; max-height: 140px !important; }
}

/* Espaçamento interno e tipografia compactos */
.card-painel .card-body{ padding: 10px 12px !important; }
.card-count-painel{ font-weight: 700; line-height: 1.15; font-size: 1.35rem; }
.card-count-painel small{ display:inline-block; margin-top:2px; font-weight:400; font-size:.82rem; opacity:.95; }

/* Ícone decorativo de fundo (zoom suave ao focar/hover no card) */
.card-painel .bg-icon{
  position: absolute;
  right: 8px; bottom: 6px;
  font-size: 58px;
  opacity: .2; pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.card-painel:hover .bg-icon,
.card-painel:focus .bg-icon{ transform: scale(1.12); opacity: .3; }

/* "Mais informações" centralizado no rodapé (efeito só nele) */
.card-more-info{
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 4px 10px; border-radius: 1px;
  background-color: rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  font-size: .82rem; font-weight: 500; text-decoration: none; outline: none;
  transition: color .3s ease, background-color .3s ease, transform .2s ease;
  width: 100%;
  height: 20%;
}
.card-more-info:hover,
.card-more-info:focus{ color:#fff; background-color: rgba(255,255,255,.25); }
.card-more-info i{ font-size: .95em; transition: transform .3s ease; }
.card-more-info:hover i,
.card-more-info:focus i{ transform: translateX(3px); }

/* Paleta por tipo de card */
.bg-clientes{      background-color:#2563eb; }  /* azul */
.bg-processos{     background-color:#16a34a; }  /* verde */
.bg-compromissos{  background-color:#a855f7; }  /* roxo */
.bg-colaboradores{ background-color:#f59e0b; }  /* âmbar */

/* Acessibilidade: menos animação se preferido */
@media (prefers-reduced-motion: reduce){
  .card-painel .bg-icon, .card-more-info, .card-more-info i{ transition: none !important; }
}

/*==========================================================
                BOTÃO EXCLUIR FOTO
===========================================================*/

.avatar-wrap{ position: relative; }
.btn-foto-excluir{
  position: absolute; top: 8px; right: 8px;
  border: none; border-radius: 10px; padding: .4rem .5rem;
  background: rgba(0,0,0,.6); color: #fff; cursor: pointer;
}
.btn-foto-excluir:hover{ transform: scale(1.03); }


/* Container da imagem */
.foto-box {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

/* Imagem */
.foto-box .foto-img {
    display: block;
    width: 150px;  /* ajuste conforme necessário */
    height: 150px; /* ajuste conforme necessário */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* Botão Excluir sobre a imagem, invisível por padrão */
.foto-box .btn-excluir {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.2rem 0.4rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;

    /* Inicialmente invisível e deslocado */
    opacity: 0;
    transform: translate(10px, -10px) scale(1);
    transition: all 0.3s ease;
}

/* Ícone dentro do botão */
.foto-box .btn-excluir i {
    display: inline-block;
    transition: all 0.3s ease;
}

/* Hover sobre a imagem ou foco no botão */
.foto-box:hover .btn-excluir,
.foto-box .btn-excluir:focus {
    opacity: 1;
    color: #ff0000; /* vermelho vivo */
    transform: translate(0, 0) scale(1.5); /* aumenta, mas sem inclinar */
    text-shadow: 
        0 0 6px #ff0000, 
        0 0 12px #ff6666, 
        0 0 20px #ff9999; /* glow/shine */
    animation: bounce 0.4s ease forwards, pulse 1s ease-in-out infinite, shine 2s ease-in-out infinite;
}

/* Animação bounce inicial (X reto) */
@keyframes bounce {
    0%   { transform: translate(10px, -10px) scale(1); }
    50%  { transform: translate(0, 0) scale(1.7); }
    70%  { transform: translate(0, 0) scale(1.4); }
    100% { transform: translate(0, 0) scale(1.5); }
}

/* Pulsação contínua */
@keyframes pulse {
    0%, 100% { transform: scale(1.5); }
    50%      { transform: scale(1.7); }
}

/* Brilho contínuo / shine */
@keyframes shine {
    0%, 100% { text-shadow: 0 0 6px #ff0000, 0 0 12px #ff6666, 0 0 20px #ff9999; }
    50%      { text-shadow: 0 0 10px #ff0000, 0 0 20px #ff6666, 0 0 30px #ffcccc; }
}

#modalConfirmaExclusaoFoto .modal-content { border-radius: 14px; }
#modalConfirmaExclusaoFoto .modal-title  { font-weight: 600; }


.hover-dourado:hover {
  color: #FFD700 !important;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* =============================================
   BOTÃO EDITAR - AZUL ESCURO JURÍDICO NO MODAL
============================================== */
.btn-modal-editar {
    background: linear-gradient(135deg, #0a1d3b, #0d2b62);
    border: 1px solid #0d2a54;
    color: #e8f0ff;
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 4px 12px rgba(13, 42, 84, 0.35);
    font-size: 0.95rem;
}

.btn-modal-editar:hover {
    background: linear-gradient(135deg, #123262, #1e4f8c);
    border-color: #1e4f8c;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(30, 79, 140, 0.40);
    transform: translateY(-2px);
}

.btn-modal-editar:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, #0a1d3b, #123262);
}

/* Ícone */
.btn-modal-editar i {
    font-size: 1rem;
    color: #9cc1ff;
    transition: color 0.25s ease-in-out;
}

.btn-modal-editar:hover i {
    color: #ffffff;
}

/* ================================
   BADGES DE STATUS – VISUAL PREMIUM
   ================================ */

.badge-status-base {
    font-size: 0.90rem;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.25);
    transition: all .25s ease-in-out;
}

/* Cinza – Pendente */
.badge-status-pendente {
    background: #6c757d;
    box-shadow: 0 0 10px rgba(108,117,125,0.55);
}

/* Azul – Em andamento */
.badge-status-andamento {
    background: #0d6efd;
    box-shadow: 0 0 10px rgba(13,110,253,0.65);
    animation: andamentoPulse 1.4s infinite ease-in-out;
}

@keyframes andamentoPulse {
    0%   { box-shadow: 0 0 6px rgba(13,110,253,0.6); }
    50%  { box-shadow: 0 0 14px rgba(13,110,253,0.9); }
    100% { box-shadow: 0 0 6px rgba(13,110,253,0.6); }
}

/* Verde – Concluída */
.badge-status-concluida {
    background: #198754;
    box-shadow: 0 0 10px rgba(25,135,84,0.65);
}

/* Vermelho – Atrasada */
.badge-status-atrasada {
    background: #dc3545;
    box-shadow: 0 0 12px rgba(220,53,69,0.70);
    animation: atrasoBlink 1s infinite;
}

@keyframes atrasoBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.65; }
}

/* Título azul jurídico */
.texto-azul-top {
    color: #58a6ff;
}

/* ================================
   CARD PREMIUM DE ANDAMENTO
================================ */
.andamento-card-premium {
    background: rgba(20,20,25,0.8);
    padding: 22px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    max-width: 260px;
    box-shadow: 0 0 25px rgba(0,0,0,0.4);
    margin: auto;
}


/* ================================
   CÍRCULO PREMIUM (compatível JS)
================================ */
#progressCircle {
    width: 155px;
    height: 155px;
    border-radius: 50%;

    background:
        radial-gradient(closest-side, #111 79%, transparent 80% 100%),
        conic-gradient(#0d6efd var(--progress, 0%), #333 0);

    display: flex;
    justify-content: center;
    align-items: center;

    transition: background 0.8s ease, box-shadow 0.5s ease;
}

#progressCircle span {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
}


/* GLOW por status */
#progressCircle.andamento {
    box-shadow: 0 0 18px #3b82f6;
}

#progressCircle.atrasada {
    box-shadow: 0 0 18px #ff4444;
}

#progressCircle.concluida {
    box-shadow: 0 0 18px #22c55e;
}


/* BASE */
.badge-prioridade-base {
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* BAIXA */
.badge-prioridade-baixa {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    color: #fff;
}

/* MÉDIA */
.badge-prioridade-media {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #000;
}

/* ALTA */
.badge-prioridade-alta {
    background: linear-gradient(90deg, #ef4444, #f87171);
    color: #fff;
}

/* URGENTE */
.badge-prioridade-urgente {
    background: linear-gradient(90deg, #7e22ce, #a855f7);
    color: #fff;
}


/* ESCURECER FUNDO DE TODOS OS MODAIS GLOBALMENTE */
.modal-backdrop.show {
    opacity: 0.70 !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(3px);
}

#overlay-global-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1040; /* abaixo dos modais */
}

#overlay-global-modal.show {
    display: block;
    opacity: 1;
}

.andamento-container {
    padding-right: 8px; /* aproxima da borda direita */
}

.progress-circle-wrapper {
    margin-left: auto;
}


/* ============================================================
   AJUSTE GLOBAL — MODAL ABAIXO DA NAVBAR FIXA
============================================================ */
.modal-dialog {
    margin-top: 80px !important; /* desce o modal */
}

.modal.fade .modal-dialog {
    transform: translateY(30px); /* animação mais suave */
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* =========================
   LINK DE RELAÇÃO ENTRE ENTIDADES
   ========================= */

.link-relacao{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

/* nome da entidade */
.link-relacao-texto{
    transition: all .18s ease;
}

/* ícone externo */
.link-relacao-icone{
    font-size: 0.8rem;
    color: #2563eb;
    opacity: 0;
    transform: translateY(1px);
    transition: opacity .18s ease, transform .18s ease;
}

/* hover / foco */

.link-relacao:hover .link-relacao-texto,
.link-relacao:focus .link-relacao-texto{
    text-decoration: underline;
    opacity: .85;
}

.link-relacao:hover .link-relacao-icone,
.link-relacao:focus .link-relacao-icone{
    opacity: 1;
    transform: translateY(0);
}

