/* --- 1. CONFIGURAÇÕES GERAIS --- */
html, body { height: 100%; }

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column; 
    background-color: #f0f2f5;
    color: #333;
}

.navbar { border-bottom: 3px solid #0d6efd; }
.navbar-brand { font-weight: bold; letter-spacing: 1px; }

.card { 
    border: none; 
    border-radius: 8px; 
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn-primary { border-radius: 20px; }
.footer { margin-top: auto; }

/* --- 2. COMPONENTES E TABELAS --- */
.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
    transition: all 0.3s ease;
}

.linha-clicavel:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    cursor: pointer;
}

td {
    word-break: break-word;
    max-width: 250px;
}

/* --- 3. DATATABLES (ESTILIZAÇÃO UNIFICADA) --- */

.dataTables_wrapper .row {
    align-items: center;
    margin: 0 !important;
    padding: 10px 0;
}

.dataTables_wrapper .dataTables_info {
    text-align: right !important;
    display: block !important;
    width: 100% !important;
    float: none !important;
    font-size: 0.85rem;
    color: #6c757d;
    padding: 10px 15px !important;
}

.dataTables_wrapper .dataTables_paginate {
    text-align: center !important;
    float: none !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 15px 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
    margin: 0 2px !important;
    border-radius: 4px !important;
    padding: 5px 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
    background: #e9ecef !important;
    color: #0a58ca !important;
}

/* --- 4. NOVOS COMPONENTES (LINHA DO TEMPO E VISITA) --- */

/* Timeline do Chamado */
#area_timeline {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.timeline-item {
    border-left: 2px solid #dee2e6;
    padding-left: 15px;
    margin-bottom: 15px;
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: #0d6efd;
    border-radius: 50%;
}

/* Estilo para campos de formulário dentro de modais */
.modal-body label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 3px;
}

/* --- 5. OUTROS AJUSTES --- */
.ts-control .item {
    background-color: #e9ecef !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
}

@media print {
    body * { visibility: hidden; }
    .secao-impressao, .secao-impressao * { visibility: visible; }
    .no-print { display: none !important; }
}

/* Dashboard Dashboard Resumo */
.card-header-dash { 
    background-color: #f8f9fa !important; 
    font-weight: bold; 
    font-size: 0.9rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 15px !important;
}

.text-orange { color: #ff8c00 !important; }

.grid-stack-item-content { 
    background: white; 
    border-radius: 10px; 
    border: 1px solid #e0e0e0; 
    overflow: hidden;
}

.status-dot { 
    height: 10px; 
    width: 10px; 
    background-color: #28a745; 
    border-radius: 50%; 
    display: inline-block; 
    margin-right: 5px; 
}

.scrollable-dash {
    max-height: 100%;
    overflow-y: auto;
}

.offcanvas-config { width: 350px; }

/* Ajustes de navegação */
.navbar-nav .nav-link { border-bottom: 3px solid transparent; }
.nav-link:focus { color: inherit !important; }

/* Garante que o conteúdo do widget ocupe toda a altura */
.grid-stack-item-content {
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Área interna rolável para listas dentro dos widgets */
.scrollable-dash {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Estilo para os headers dos widgets */
.card-header-dash {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    background: #fdfdfd;
    cursor: grab; /* Indica que pode mover */
}

.card-header-dash:active {
    cursor: grabbing;
}

/* Estilo para as linhas de chamados na dashboard */
.dash-row {
    padding: 8px;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.dash-row:hover {
    background-color: #f1f5f9;
}

.card-header-dash { font-weight: bold; padding: 10px 15px; border-bottom: 1px solid #eee; background: #f8f9fa; display: flex; justify-content: space-between; align-items: center; }
    .grid-stack-item-content { background: #fff; border-radius: 8px; border: 1px solid #e0e0e0; overflow: hidden; }
    .scrollable-dash { overflow-y: auto; height: calc(100% - 45px); }
    .cursor-pointer { cursor: pointer; }