﻿
/* =============================================================
   SITE.CSS - Versão Final Organizada e Documentada
   -------------------------------------------------------------
   Contém todos os estilos utilizados nos layouts principais
   (_Layout.cshtml, _LayoutFrame.cshtml, _LayoutModal.cshtml).
   Inclui ajustes visuais, botões, loaders, componentes, layout
   e acessibilidade. Mantém todas as regras originais e essenciais.
   ============================================================= */

/* =============================================================
   1. VARIÁVEIS GLOBAIS E TEMAS
   ============================================================= */
:root {
    --brand: #2C84DD;
    --brand-2: #2875c3;
    --hz-bg: #0b1220;
    --hz-surface: #0f172a;
    --hz-border: rgba(148, 163, 184, 0.16);
    --hz-ring: rgba(59, 130, 246, 0.35);
}

/* =============================================================
   2. BOTÕES
   ============================================================= */
.btn-hr {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0;
}

.btn-white {
    border: 1px solid #ccd2da;
    background-color: #fff;
}

    .btn-white:hover,
    .btn-white:focus,
    .btn-white:active {
        border-color: #bdc5cf;
        background-color: #f8f9fc;
    }

.btn-save {
    color: #fff;
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
}

    .btn-save:hover,
    .btn-save:focus,
    .btn-save:active {
        color: #fff !important;
        background-color: var(--brand-2) !important;
        border-color: #2875c3 !important;
    }

/* =============================================================
   3. CORES E UTILITÁRIOS
   ============================================================= */
.bg-hr {
    background-color: var(--brand) !important;
}

.text-hr {
    color: var(--brand) !important;
}

.bg-whatsapp,
.bg-telegram,
.bg-openIA {
    background-color: #ffffff !important;
}

.bold {
    font-weight: bold;
}

/* =============================================================
   4. AVATAR
   ============================================================= */
.avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

.avatar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 13px;
    color: white;
    text-transform: uppercase;
    pointer-events: none;
}

/* =============================================================
   5. TABELAS
   ============================================================= */
.table tbody td {
    vertical-align: middle !important;
    border-color: #f3f5f9 !important;
}

.tableTitle {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: .9rem;
    font-weight: 700;
    background-color: #f3f3f3;
    height: 35px;
}

.tableItem {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
}

.table.table-hover.mb-0 > :not(caption) > * > * {
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
}

/* =============================================================
   6. SIDEBAR E HEADER
   ============================================================= */
.sidebar-disabled {
    pointer-events: none !important;
    opacity: 0.6 !important;
    filter: grayscale(0.4) brightness(0.95);
    cursor: not-allowed !important;
    transition: all 0.25s ease-in-out;
}

#header.sidebar-disabled {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(2px) brightness(0.95);
}

    #header.sidebar-disabled * {
        opacity: 0.7 !important;
    }

#sidebarMenu .nav-link {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

#sidebarMenu .nav {
    margin-top: 0 !important;
    padding-top: 0.25rem !important;
}

#sidebarMenu .menu-title,
#sidebarMenu .sidebar-heading {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* =============================================================
   7. ACESSIBILIDADE E NAV
   ============================================================= */
:where(a, button, [role="button"], .form-control, .nav-link, .dropdown-item):focus-visible {
    outline: 2px solid var(--hz-ring);
    outline-offset: 2px;
}

.nav-sidebar .nav-link {
    border-radius: .5rem;
    transition: 0.2s ease;
}

    .nav-sidebar .nav-link:hover {
        background: rgba(148,163,184,0.08);
    }

    .nav-sidebar .nav-link.active {
        background: rgba(148,163,184,0.16);
        font-weight: 600;
    }

/* =============================================================
   8. LOADERS / ANIMAÇÕES
   ============================================================= */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.5);
    }
}

.loading {
    border: 16px solid #ded8d8;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 1s linear infinite;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(1px);
    z-index: 9998;
    display: none;
}

    .loading-overlay.active {
        display: block;
    }

.loader {
    z-index: 99999999;
    position: fixed; /* <-- Importante */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centraliza */
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}


.bubble {
    position: absolute;
    background-color: #2C84DD;
    border-radius: 50%;
    animation: pulse 1.2s infinite ease-in-out;
}

/* =============================================================
   9. TREEVIEW
   ============================================================= */
.treeview ul {
    list-style: none;
    padding-left: 20px;
}

.treeview li {
    margin: 4px 0;
}

.drag-icon {
    cursor: move;
    color: #888;
}

/* =============================================================
   10. IMPRESSÃO E RESPONSIVIDADE
   ============================================================= */
@media print {
    body * {
        visibility: hidden;
    }

    #printArea, #printArea * {
        visibility: visible;
    }
}

@media (min-width: 992px) {
    main .content {
        padding: 1.25rem 1.5rem;
    }
}

/* =============================================================
   11. SCROLLBAR
   ============================================================= */
* {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

    *::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    *::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 8px;
    }

    *::-webkit-scrollbar-track {
        background: transparent;
    }

/* =============================================================
   12. ÍCONES WHATSAPP / TELEGRAM
   ============================================================= */
.ri-whatsapp-fill,
.ri-whatsapp-line {
    color: #25D366 !important;
}

.ri-telegram-fill,
.ri-telegram-line {
    color: #0088cc !important;
}

/* =============================================================
   13. RESIZER / SHADOW
   ============================================================= */
.resizer {
    width: 5px;
    cursor: col-resize;
    background-color: #ccc;
}

    .resizer:hover {
        background-color: #888;
    }

.resizable {
    overflow: hidden;
    white-space: nowrap;
}

.shadow-custom {
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2) !important;
    border-radius: 10px;
}

/* =============================================================
   14. AJUSTES EXCLUSIVOS PARA OS GRÁFICOS DO CONSOLE
   ============================================================= */

/* ---- Melhor espaçamento dos cards ---- */
.card-one {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    border: none;
    /* sombra clássica usada em dashboards modernos */
    box-shadow: 0 0 30px rgba(41, 41, 65, 0.1);
    transition: all 0.25s ease;
}

/* .card-one:hover {
        box-shadow: 0 0 40px rgba(41, 41, 65, 0.13);
        transform: translateY(-2px);
    }*/

/* ---- Gráficos responsivos ---- */
#monthSend,
#TaskStatus,
#SendStatus,
#SendChannel,
#SendUsers {
    width: 100%;
}

/* Altura para o chart mensal */
#monthSend_div {
    min-height: 240px;
}

/* Donuts centralizados */
#TaskStatus .apexcharts-canvas,
#SendStatus .apexcharts-canvas {
    margin: 0 auto;
}

/* Barras largas */
#SendChannel,
#SendUsers {
    padding-right: 10px;
}

/* ---- RESPONSIVIDADE ---- */
@media (max-width: 768px) {

    .card {
        margin-bottom: 20px;
    }

    #monthSend_div {
        min-height: 170px;
    }

    #monthSend .apexcharts-canvas {
        transform: scale(.95);
        transform-origin: top;
    }

    #TaskStatus .apexcharts-canvas,
    #SendStatus .apexcharts-canvas {
        transform: scale(.90);
    }

    #SendChannel .apexcharts-canvas,
    #SendUsers .apexcharts-canvas {
        transform: scale(.95);
        transform-origin: left top;
    }
}

@media (max-width: 576px) {

    .card-header h6 {
        font-size: .95rem;
    }

    #monthSend .apexcharts-canvas {
        transform: scale(.90);
    }

    .people-item h6 {
        font-size: .9rem;
    }

    .people-item .avatar {
        transform: scale(.9);
    }
}


.indicator-box {
    padding: 10px 14px; /* Antes: 15px */
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    background: #f5f5f5;
    transition: all .2s ease;
}

    .indicator-box:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

/* Valor principal – menor e mais compacto */
.indicator-value {
    font-size: 1.5rem; /* Antes: 1.9rem */
    font-weight: 700;
    margin: 0;
}

/* Título – reduzido */
.indicator-title {
    font-size: 0.8rem; /* Antes: 0.85rem */
    font-weight: 600;
    margin: 0;
}

/* Descrição – menor ainda */
.indicator-desc {
    font-size: 0.72rem; /* Antes: 0.80rem */
    color: #555;
    margin: 2px 0 0 0;
}

/* Ícone – menor e alinhado */
.indicator-icon {
    font-size: 1.1rem; /* Antes: 1.4rem */
    opacity: .7;
}

/* Cores suaves */
.bg-docs {
    background: rgba(59, 130, 246, 0.10);
    border-left: 4px solid #3b82f6;
}

.bg-alert {
    background: rgba(245, 158, 11, 0.10);
    border-left: 4px solid #f59e0b;
}

.bg-bot {
    background: rgba(16, 185, 129, 0.10);
    border-left: 4px solid #10b981;
}


/* Container geral */
.statistic-box {
    padding: 6px 4px; /* reduzido */
}

/* ITEM */
.people-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px; /* antes 12px 14px */
    border-radius: 10px;
    margin-bottom: 6px; /* antes 10px */
    background: #f9fafb;
    transition: background .2s ease, transform .2s ease;
}

    .people-item:hover {
        background: #f1f5f9;
        transform: translateY(-1px); /* reduzimos também */
    }

    /* Avatar */
    .people-item .avatar {
        margin-right: 10px; /* menor */
    }

    .people-item .avatar-initial {
        width: 32px; /* antes 38px */
        height: 32px;
        border-radius: 8px;
        font-size: 0.9rem;
    }

/* Título */
.people-body h6 {
    font-size: 0.75rem; /* antes 0.82rem */
    margin: 0;
    font-weight: 600;
}

/* Valor à direita */
.people-item h6 {
    font-size: 0.95rem; /* antes 1rem */
    font-weight: 700;
    margin: 0;
}




/* --- CARD PADRÃO CONSOLE PARA CHATBOTS --- */

.card-chatbot {
    background: #fff;
    border-radius: 14px;
    border: none;
    box-shadow: 0 0 30px rgba(41,41,65,0.1);
    overflow: hidden;
    transition: .25s ease;
    position: relative;
}

    .card-chatbot:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 40px rgba(41,41,65,0.13);
    }

    /* cabeçalho / menu */
    .card-chatbot .dropdown-file {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    /* Ícone principal do chatbot */
    .card-chatbot .card-file-icon {
        padding: 0px 0 10px 0;
    }

        .card-chatbot .card-file-icon i {
            font-size: 32px;
            color: #4b5563;
        }

    /* Divider minimalista */
    .card-chatbot .divider {
        border-top: 1px solid #eef1f4;
        margin: 0 18px;
    }

    /* Corpo */
    .card-chatbot .card-body {
        padding: 14px 18px 10px 18px;
        text-align: left;
    }

        .card-chatbot .card-body a {
            font-size: .88rem;
            font-weight: 600;
            color: #111827;
            text-decoration: none;
        }

        .card-chatbot .card-body span {
            display: block;
            font-size: .75rem;
            color: #6b7280;
        }

    /* Ícones do WhatsApp / Telegram */
    .card-chatbot .types i {
        font-size: 20px;
        margin-right: 6px;
        opacity: .7;
    }

.card-footer {
    background: #f9fafb;
    padding: 10px 16px;
    font-size: .75rem;
    color: #6b7280;
    border-top: 1px solid #eef1f4;
    line-height: 1.2rem; /* altura da linha */
    min-height: calc(1.2rem * 2); /* DUAS LINHAS */
}
/* Footer */
    





/* =============================================================
   CARDS TOTALIZADORES (NOVO)
   ============================================================= */

.stat-card {
    border-radius: 12px;
    padding: 16px 18px;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.06);
    border-left: 5px solid;
}

.stat-blue {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.stat-yellow {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.stat-green {
    background: #ecfdf5;
    border-left-color: #10b981;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.stat-title {
    font-size: .9rem;
    font-weight: 600;
    margin-top: 4px;
    color: #374151;
}

.stat-desc {
    font-size: .75rem;
    color: #6b7280;
    margin-top: -2px;
}

.chart-loading {
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.loading {
    border: 16px solid #ded8d8; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    text-align: center;
    animation: spin 1s linear infinite;
    z-index: 99999999;
    position: absolute;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 300px;
    top: 0px;
}

loading2 {
    border: 16px solid #ded8d8; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    text-align: center;
    animation: spin 1s linear infinite;
    z-index: 99999999;
    position: fixed;
}