/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================================================== */
:root {
    --primary-blue: #0056b3;
    --success-green: #28a745;
    --danger-red: #dc3545;
    --warning-yellow: #f1c40f;
    --history-gray: #bdc3c7; /* Cor para itens finalizados */
    --bg-gray: #f4f7f6;
    --white: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --shadow: 0 4px 10px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; } /* Previne erros de largura de input */

body { 
    font-family: 'Segoe UI', Roboto, sans-serif; 
    background: var(--bg-gray); 
    color: var(--text-dark);
    margin: 0; 
    padding: 0; 
}

header { 
    background: var(--primary-blue); 
    color: var(--white); 
    text-align: center; 
    padding: 25px 20px;
    border-radius: 0 0 50px 50px;
}

/* ==========================================================================
   2. MENU DE NAVEGAÇÃO (TABS)
   ========================================================================== */
.tabs-menu {
    display: flex; 
    justify-content: space-around;
    background: var(--white); 
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 50px 50px 50px 50px;
}

.tab-btn {
    border: none; 
    background: none; 
    color: var(--text-light);
    display: flex; 
    flex-direction: column; 
    align-items: center;
    cursor: pointer; 
    font-size: 0.85em; 
    transition: 0.3s;
    position: relative;
    flex: 1;
}

.tab-btn i { font-size: 1.6em; margin-bottom: 4px; }
.tab-btn.active { color: var(--primary-blue); font-weight: bold; }

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 60%;
    height: 3px;
    background: var(--primary-blue);
}

.badge {
    position: absolute;
    top: 0;
    right: 25%;
    background: var(--danger-red);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    display: none;
}

/* Conteúdo das Abas */
.tab-content { display: none; padding: 20px; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   3. LAYOUT DE GRIDS E ESTRUTURA
   ========================================================================== */
.header-aba {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px; 
    margin: 0 auto 20px auto; 
    padding: 0 10px;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px; 
    max-width: 1200px; 
    margin: 0 auto;
}

/* ==========================================================================
   4. CARDS PADRONIZADOS (O CORAÇÃO DO SISTEMA)
   ========================================================================== */
.card-padrao {
    background: var(--white); 
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
    min-height: 420px;
    transition: transform 0.2s;
}
/* ESTILO PARA PRODUTO BLOQUEADO */
.card-padrao.bloqueado {
    opacity: 0.6;
    filter: grayscale(0.5);
    border-top: 5px solid var(--history-gray) !important;
}
/* PAINEL FINANCEIRO */
.cards-financeiros {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.card-fin {
    flex: 1;
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.card-fin.faturamento { border-left: 8px solid var(--success-green); }
.card-fin.concluidas { border-left: 8px solid var(--primary-blue); }

.card-fin strong {
    font-size: 1.6em;
    display: block;
    margin-top: 5px;
    color: var(--text-dark);
}

.tag-categoria {
    background: #e1f0ff;
    color: var(--primary-blue);
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.card-padrao:hover { transform: translateY(-5px); }
.img-card { width: 100%; height: 180px; object-fit: cover; background: #eee; }
.conteudo-card { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.conteudo-card h3 { margin: 0 0 10px 0; font-size: 1.1em; }

/* Variações de Cores por Aba */
#aba-produtos .card-padrao { border-top: 5px solid var(--primary-blue); }
#aba-solicitacoes .card-padrao { border-top: 5px solid var(--warning-yellow); }
#aba-agenda .card-padrao { border-top: 5px solid var(--success-green); }
#aba-historico .card-padrao { border-top: 5px solid var(--history-gray); opacity: 0.85; }

/* Cores de Títulos */
#aba-produtos h3 { color: var(--primary-blue); }
#aba-solicitacoes h3 { color: var(--warning-yellow); }
#aba-agendamentos h3 { color: var(--success-green); }
#aba-historico h3 { color: var(--text-dark); }

/* Informações Internas */
.detalhes-info { font-size: 0.85em; color: var(--text-light); line-height: 1.6; margin-bottom: 15px; }
.detalhes-info i { width: 22px; color: #999; text-align: center; }

/* ==========================================================================
   5. BOTÕES E AÇÕES
   ========================================================================== */
.acoes-card {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding-top: 10px;
}
.btn-acao-principal{
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}
.btn-novo { background: var(--primary-blue); color: var(--white); border: none; padding: 15px 30px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-confirmar { background: darkgreen; color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; flex: 2; font-weight: bold; }
.btn-recusar { background: #fdf2f2; color: var(--danger-red); border: 1px solid #fee2e2; padding: 10px; border-radius: 6px; cursor: pointer; flex: 1; }
.btn-lixo { background: none; border: none; color: var(--danger-red); cursor: pointer; font-size: 1.1em; }

/* Botão de Finalizar na Agenda */
#aba-agenda .btn-confirmar { background: var(--primary-blue); }

/* BOTÕES ESPECÍFICOS */
.btn-secundario {
    background: #ff2500;
    color: whitesmoke;
    border: 1px solid #ffeeba;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.filtros-financas .btn-secundario{
    background: #3c3c3c;
    color: whitesmoke;
    border: 1px solid #ffeeba;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.btn-ativar {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.input-moderno {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-green);
    color: white;
    text-decoration: none;
    padding: 8px;
    border-radius: 5px;
    font-weight: bold;
    margin: 10px 0;
    font-size: 13px;
    transition: background 0.3s;
}
.btn-whatsapp:hover {
    background-color: #128c7e;
    color: white;
}

/* ==========================================================================
   6. COMPONENTES ESPECÍFICOS (MODAL E BLOQUEIO)
   ========================================================================== */
.modal {
    display: none;
    position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.modal-content { 
    background: var(--white); margin: 50px auto; padding: 30px; 
    border-radius: 15px; width: 90%; max-width: 450px; position: relative; 
}

.campo-grupo { margin-bottom: 15px; }
.campo-grupo label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.9em; }
.campo-grupo input, .campo-grupo textarea { 
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
}

.area-bloqueio { margin-top: 15px; padding-top: 10px; border-top: 1px dashed #ddd; }
.row-bloqueio-duplo { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }

/* Aviso de lista vazia */
.aviso { grid-column: 1/-1; text-align: center; padding: 40px; color: #999; font-style: italic; }

/* Responsividade */
@media (min-width: 600px) {
    .row-bloqueio-duplo { flex-direction: row; }
    .row-bloqueio-duplo input { flex: 1; }
}

#prod-categoria{
    background: var(--white); margin: 3px auto; padding: 3px; 
    border-radius: 5px; width: 50%; max-width: 450px; position: relative; border: 1px solid #ddd; 
}

.info-contato {
    margin: 10px 0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.link-whats-card {
    color: #25d366; /* Verde do WhatsApp */
    text-decoration: none;
    font-weight: bold;
}

.link-whats-card:hover {
    text-decoration: underline;
}

.aviso-erro {
    color: var(--danger-red);
    font-size: 0.8em;
    font-style: italic;
}

.container-grafico {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    min-height: 300px;
}

/* Ajuste para as informações de contato na card */
.contato-cliente {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.85em;
    border: 1px solid #eee;
}

.contato-cliente p {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-whatsapp {
    color: #25d366;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Redução e alinhamento dos botões */
.acoes-solicitacao {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-aprovar-curto {
    background: var(--success-green);
    color: white;
    border: none;
    padding: 8px 15px; /* Botão menor */
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 2; /* Ganha mais espaço que o recusar */
    transition: 0.2s;
}

.btn-recusar-curto {
    background: #fff;
    color: var(--danger-red);
    border: 1px solid var(--danger-red);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}

.btn-aprovar-curto:hover { background: #218838; }
.btn-recusar-curto:hover { background: #fff5f5; }
/* TABELA FINANCEIRA */
.tabela-container {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.tabela-container table { width: 100%; border-collapse: collapse; text-align: left; }
.tabela-container th { background: #f8f9fa; padding: 15px; border-bottom: 2px solid #eee; }
.tabela-container td { padding: 15px; border-bottom: 1px solid #eee; }

.link-endereco {
    color: #2980b9; /* Um azul suave para links */
    text-decoration: none;
    font-weight: 500;
}

.link-endereco:hover {
    text-decoration: underline;
    color: #3498db;
}

/* Opcional: ícone de localização em vermelho para destacar */
.fa-map-marker-alt {
    color: #e74c3c;
}
.container-video {
    position: relative;
    width: 100%;
    /* Sombra para dar profundidade ao vídeo no fundo branco */
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
}

.badge-video {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: bold;
    pointer-events: none; /* Não atrapalha o clique */
}
