/* --- VARIÁVEIS GLOBAIS ZANTECH --- */
:root {
    --primary-green: #28a745;   /* Verde oficial da sua logo */
    --hover-green: #218838;
    --light-green: #a2fca2;   
    --dark-bg: #121212;         /* Fundo mais profundo e moderno */
    --card-bg: #1e1e1e;         /* Fundo dos cards */
    --text-color: #f1f1f1;
    --border-color: #333;
}

/* --- RESET E BASE --- */
body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* --- GRID DO DASHBOARD --- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

/* --- CARDS DE IA (LISTAGEM) --- */
.card-ia {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.card-ia:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* Destaque para Chamados Concluídos */
.card-concluido {
    border: 2px solid var(--primary-green) !important;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.15);
}

/* Badges e Etiquetas */
.badge-categoria {
    float: right;
    background: #333;
    color: var(--light-green);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-empresa {
    color: var(--primary-green);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: block;
}

/* Texto da Descrição (IA) */
.desc-texto {
    font-size: 0.92rem;
    color: #bbb;
    line-height: 1.6;
    margin-top: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Corta o texto após 5 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rodapé do Card */
.card-footer-custom {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #777;
}

/* --- MODAIS (DARK MODE) --- */
.modal-content {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid #444;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-header {
    border-bottom: 1px solid #333;
    padding: 20px;
}

.modal-title {
    color: var(--primary-green);
    font-weight: 700;
}

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.text-detalhado {
    color: #ddd;
    background: #151515;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid var(--primary-green);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- BOTÕES --- */
.btn-verde {
    background-color: var(--primary-green) !important;
    border: none;
    color: #fff !important;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-verde:hover {
    background-color: var(--hover-green) !important;
    transform: scale(1.05);
}

/* --- OVERLAY DE CARREGAMENTO (ROBÔ IA) --- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.9);
    display: none; /* Ativado via JavaScript */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    color: var(--primary-green);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* Placeholder com contraste alto para fundos escuros */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #cfd6dd !important;
    opacity: 1 !important;
}

.form-control::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #cfd6dd !important;
    opacity: 1 !important;
}

.form-control::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #cfd6dd !important;
    opacity: 1 !important;
}

.form-control:-ms-input-placeholder,
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #cfd6dd !important;
    opacity: 1 !important;
}

.bg-dark.form-control::placeholder,
.bg-secondary.form-control::placeholder,
input.bg-dark::placeholder,
input.bg-secondary::placeholder,
textarea.bg-dark::placeholder,
textarea.bg-secondary::placeholder {
    color: #d7dde3 !important;
    opacity: 1 !important;
}
.app-navbar {
    background-color: #1a1a1a;
}

.app-navbar .nav-link {
    margin-right: 0.5rem;
}

.app-user {
    border-left: 1px solid var(--border-color);
    padding-left: 0.9rem !important;
    margin-left: 0.5rem;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 991.98px) {
    .app-navbar .navbar-nav {
        margin-top: 0.75rem;
        align-items: flex-start !important;
    }

    .app-user {
        border-left: 0;
        padding-left: 0 !important;
        margin-left: 0;
    }

    .card-ia {
        min-height: 300px;
        padding: 14px;
    }
}

@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .table-mobile thead {
        display: none;
    }

    .table-mobile tr {
        display: block;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.75rem;
    }

    .table-mobile td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        border: 0 !important;
        padding: 0.5rem 0.75rem;
    }

    .table-mobile td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #b5b5b5;
        min-width: 120px;
    }
}
